This commit was generated by cvs2svn to compensate for changes in r5757,
which included commits to RCS files with non-trunk default branches. git-svn-id: svn://10.65.10.50/trunk@5758 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e4e927843f
commit
18c8e52948
120
xi/makefile.nt
Executable file
120
xi/makefile.nt
Executable file
@ -0,0 +1,120 @@
|
||||
##################################################################
|
||||
#
|
||||
# Makefile for XVT/NT 4.00 Examples
|
||||
# Compiler: Microsoft Visual C++ 1.0
|
||||
#
|
||||
##################################################################
|
||||
# Copyright 1989-1994 XVT Software Inc.
|
||||
|
||||
!IFNDEF APP_DEBUG
|
||||
APP_DEBUG = FALSE
|
||||
!ENDIF
|
||||
|
||||
# File pathnames
|
||||
XVT_DIR = C:\XVTDSC2\NT_X86\PTK
|
||||
XVT_INCDIR = $(XVT_DIR)\include
|
||||
XVT_LIBDIR = $(XVT_DIR)\lib
|
||||
XVT_BINDIR = $(XVT_DIR)\bin
|
||||
|
||||
XN_API_LIB =$(XVT_LIBDIR)\xvtnmapi.lib
|
||||
XN_HBND_LIB =$(XVT_LIBDIR)\xvtnmhb.lib
|
||||
XN_HIPC_LIB =$(XVT_LIBDIR)\xvtnmhi.lib
|
||||
XN_HNAT_LIB =$(XVT_LIBDIR)\xvtnmhn.lib
|
||||
|
||||
XI_DIR = \XI
|
||||
XI_INCDIR = $(XI_DIR)\include
|
||||
|
||||
##########################################################################
|
||||
#
|
||||
# Compiler/library/linker flags
|
||||
#
|
||||
|
||||
!include <ntwin32.mak>
|
||||
|
||||
!IF "$(APP_DEBUG)" == "TRUE"
|
||||
C_FLAGS_DEBUG = $(cdebug) -DDEBUG
|
||||
L_FLAGS_DEBUG = $(ldebug)
|
||||
!ELSE
|
||||
C_FLAGS_DEBUG =
|
||||
L_FLAGS_DEBUG =
|
||||
!ENDIF
|
||||
|
||||
C_FLAGS = -I. -I$(XVT_INCDIR) -I$(XI_INCDIR) -DSTRICT $(cflags) $(cvarsmt) $(C_FLAGS_DEBUG)
|
||||
|
||||
L_FLAGS = $(ldebug) $(guiflags) $(L_FLAGS_DEBUG)
|
||||
|
||||
L_LIBS = $(XN_API_LIB) $(guilibsmt)
|
||||
L_HELP_LIBS = $(XN_HBND_LIB)
|
||||
# L_HELP_LIBS = $(XN_HIPC_LIB)
|
||||
# L_HELP_LIBS = $(XN_HNAT_LIB)
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Suffix rules
|
||||
#
|
||||
|
||||
.SUFFIXES: .rc .url
|
||||
|
||||
.c.obj:
|
||||
$(CC) $(C_FLAGS) $*.c
|
||||
|
||||
.url.rc:
|
||||
$(XVT_BINDIR)\curl -r rcnt -s -I$(XVT_INCDIR) -DLIBDIR=$(XVT_LIBDIR) $*.url
|
||||
|
||||
.url.res:
|
||||
$(XVT_BINDIR)\curl -r rcnt -s -I$(XVT_INCDIR) -DLIBDIR=$(XVT_LIBDIR) $*.url
|
||||
rc -r -fo $*.res $*.rc
|
||||
|
||||
.rc.res:
|
||||
rc -r -fo $*.res $*.rc
|
||||
|
||||
XILIB = $(XI_DIR)\lib\mxin.lib
|
||||
|
||||
OBJS = xilm.obj xilm2.obj xiutils.obj xitext.obj xistx.obj xitree.obj xiheap.obj xi.obj xi2.obj xicf.obj xidbg.obj
|
||||
|
||||
SRC = ..
|
||||
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# Targets
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
$(XILIB): $(OBJS)
|
||||
del $(XILIB)
|
||||
lib /OUT:$(XILIB) $(OBJS)
|
||||
|
||||
xiutils.obj: $(SRC)\xiutils.c
|
||||
cl $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xitext.obj: $(SRC)\xitext.c
|
||||
cl $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xistx.obj: $(SRC)\xistx.c
|
||||
cl $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xilm.obj: $(SRC)\xilm.c
|
||||
cl $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xilm2.obj: $(SRC)\xilm2.c
|
||||
cl $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xitree.obj: $(SRC)\xitree.c
|
||||
cl $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xiheap.obj: $(SRC)\xiheap.c
|
||||
cl $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xi.obj: $(SRC)\xi.c
|
||||
cl $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xi2.obj: $(SRC)\xi2.c
|
||||
cl $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xicf.obj: $(SRC)\xicf.c
|
||||
cl $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xidbg.obj: $(SRC)\xidbg.c
|
||||
cl $(C_FLAGS) $(SRC)\$*.c
|
||||
|
76
xi/makefile.sch
Executable file
76
xi/makefile.sch
Executable file
@ -0,0 +1,76 @@
|
||||
#=========================================================================
|
||||
# Makefile for XI/CH source
|
||||
# Orca Software distributes these makefiles for convenience. Having a
|
||||
# makefile for a particular platform does not imply that you have a
|
||||
# license to use the source code on that platform. Before using the
|
||||
# source code on any given platform, make sure that you have purchased
|
||||
# the appropriate license.
|
||||
#
|
||||
|
||||
#=========================== System Defines ==============================
|
||||
CC = acc
|
||||
XVTDIR = $(HOME)/xvtdsc2/ch_sparc_sunos/ptk
|
||||
XVTCHLIB = $(XVTDIR)/lib/libxvtcui.a
|
||||
CCOPTS =
|
||||
CURLOPTS =
|
||||
XIDIR = $(HOME)/xi
|
||||
|
||||
# --------------------------- Sun SPARC ------------------------------
|
||||
CURLFLAGS = -r furl -s
|
||||
XVTFLAGS =
|
||||
LD_FLAGS =
|
||||
LIBS = $(XVTLIBS) /usr/5lib/libcurses.a
|
||||
|
||||
#============================== Utilities ================================
|
||||
CURL = $(XVTDIR)/bin/curl $(CURLFLAGS)
|
||||
INCLUDES = -I$(XVTDIR)/include -I$(XIDIR)/include -I$(XIDIR)/src
|
||||
CFLAGS = $(CCOPTS) $(XVTFLAGS) $(INCLUDES)
|
||||
XVTLIBS = $(XVTCHLIB)
|
||||
|
||||
#============================== Resources ================================
|
||||
.SUFFIXES: .url .frl
|
||||
|
||||
.url.frl:
|
||||
$(CURL) $(CURLOPTS) $(INCLUDES) $<
|
||||
|
||||
XILIB = ../lib/libxisch.a
|
||||
SRC = $(XIDIR)/src
|
||||
OBJP = $(XIDIR)/src/sch
|
||||
|
||||
$(XILIB): $(OBJP)/xiheap.o $(OBJP)/xitree.o $(OBJP)/xicf.o $(OBJP)/xitext.o $(OBJP)/xilm.o $(OBJP)/xilm2.o $(OBJP)/xistx.o $(OBJP)/xiutils.o $(OBJP)/xi.o $(OBJP)/xi2.o $(OBJP)/xidbg.o
|
||||
ar rc $(XILIB) $(OBJP)/xiheap.o $(OBJP)/xitree.o $(OBJP)/xicf.o $(OBJP)/xitext.o $(OBJP)/xilm.o $(OBJP)/xilm2.o $(OBJP)/xistx.o $(OBJP)/xiutils.o $(OBJP)/xi.o $(OBJP)/xi2.o $(OBJP)/xidbg.o
|
||||
ranlib $(XILIB)
|
||||
|
||||
$(OBJP)/xiheap.o: $(SRC)/xiheap.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xiheap.c -o $(OBJP)/xiheap.o
|
||||
|
||||
$(OBJP)/xitext.o: $(SRC)/xitext.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xitext.c -o $(OBJP)/xitext.o
|
||||
|
||||
$(OBJP)/xilm.o: $(SRC)/xilm.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xilm.c -o $(OBJP)/xilm.o
|
||||
|
||||
$(OBJP)/xilm2.o: $(SRC)/xilm2.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xilm2.c -o $(OBJP)/xilm2.o
|
||||
|
||||
$(OBJP)/xistx.o: $(SRC)/xistx.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xistx.c -o $(OBJP)/xistx.o
|
||||
|
||||
$(OBJP)/xiutils.o: $(SRC)/xiutils.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xiutils.c -o $(OBJP)/xiutils.o
|
||||
|
||||
$(OBJP)/xi.o: $(SRC)/xi.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xi.c -o $(OBJP)/xi.o
|
||||
|
||||
$(OBJP)/xi2.o: $(SRC)/xi2.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xi2.c -o $(OBJP)/xi2.o
|
||||
|
||||
$(OBJP)/xitree.o: $(SRC)/xitree.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xitree.c -o $(OBJP)/xitree.o
|
||||
|
||||
$(OBJP)/xicf.o: $(SRC)/xicf.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xicf.c -o $(OBJP)/xicf.o
|
||||
|
||||
$(OBJP)/xidbg.o: $(SRC)/xidbg.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xidbg.c -o $(OBJP)/xidbg.o
|
||||
|
186
xi/makefile.sgi
Executable file
186
xi/makefile.sgi
Executable file
@ -0,0 +1,186 @@
|
||||
#
|
||||
# Makefile for XI/X Motif source on SGI
|
||||
# Orca Software distributes these makefiles for convenience. Having a
|
||||
# makefile for a particular platform does not imply that you have a
|
||||
# license to use the source code on that platform. Before using the
|
||||
# source code on any given platform, make sure that you have purchased
|
||||
# the appropriate license.
|
||||
|
||||
|
||||
XVTIDIR = $(XVT_DSC_DIR)/ptk/include
|
||||
XPOIDIR = $(ROOTP)/include
|
||||
|
||||
# Xvt product and system macros.
|
||||
|
||||
PRODUCT = xvtxm
|
||||
SYSTEM = sgi
|
||||
|
||||
# Macros for system utilities.
|
||||
|
||||
SHELL = /bin/sh
|
||||
MAKE = /bin/make
|
||||
CC = /usr/bin/cc
|
||||
AR = /usr/bin/ar
|
||||
ARFLAGS = cr
|
||||
LD = /usr/bin/cc
|
||||
LDFLAGS = -O
|
||||
CD = cd
|
||||
SED = /bin/sed
|
||||
YACC = /bin/yacc -vd
|
||||
CP = /bin/cp
|
||||
LN = /bin/ln -s
|
||||
MKDIR = /bin/mkdir -p
|
||||
MV = /bin/mv -f
|
||||
RM = /bin/rm -f
|
||||
TOUCH = /bin/touch
|
||||
|
||||
UIL = /usr/bin/X11/uil -I$(ROOTP)/include -o
|
||||
|
||||
# Macro for 'makedepend' makefile utility.
|
||||
|
||||
MKDEP = /usr/bin/X11/makedepend
|
||||
|
||||
# Miscellaneous macros.
|
||||
|
||||
STAR = *
|
||||
SHRSUFF = UNDEFINED
|
||||
LSUFF = .a
|
||||
RSUFF = .uid
|
||||
|
||||
LIBUI = $(PRODUCT)ui
|
||||
LIBTK = $(PRODUCT)tk
|
||||
LIBHLP = $(PRODUCT)help
|
||||
LIBHLPCS = $(PRODUCT)help_cs
|
||||
|
||||
XVTBINP = $(ROOTP)/bin
|
||||
XVTLIBP = $(ROOTP)/lib
|
||||
|
||||
XVTLIBS = $(XVTLIBP)/lib$(LIBUI)$(LSUFF) $(XVTLIBP)/lib$(LIBHLP)$(LSUFF) $(XVTLIBP)/lib$(LIBTK)$(LSUFF)
|
||||
TKLDLIBS = -L$(XVTLIBP) -l$(LIBUI) -l$(LIBHLP) -l$(LIBTK) -lMrm -lXm -lXt -lX11
|
||||
|
||||
#
|
||||
# Copyright 1993, XVT Software Inc.
|
||||
#
|
||||
# Imakefile for 'xpoxm' archive.
|
||||
#
|
||||
# $RCSfile: makefile.sgi,v $
|
||||
# $Revision: 1.1.1.1 $ $Date: 1997-12-17 10:43:21 $
|
||||
#
|
||||
|
||||
# Relative paths to build area root directory, source and objects files.
|
||||
|
||||
ROOTP = ..
|
||||
SRCP = .
|
||||
OBJP = ./sgi
|
||||
|
||||
# Macros for compiling C source.
|
||||
|
||||
IDIRS = -I$(XPOIDIR) -I$(XVTIDIR)
|
||||
CFLAGS = -c -g -O -Wf,-XNd8400,-XNp12000 $(IDIRS)
|
||||
|
||||
# Library root names.
|
||||
|
||||
LIBXI = ../lib/libxisgi.a
|
||||
|
||||
TARGETS = $(LIBXI)
|
||||
|
||||
# Errscan command line for generating new 'xvt_perr.h'.
|
||||
|
||||
ERRSCAN = $(XVTDIR)/errscan -h $(ROOTP)/include/xvt_perr.h -o $(ROOTP)/doc/ERRCODES.TXT $(ROOTP)/include/xvt_msgs.h
|
||||
|
||||
# Makefile targets...
|
||||
|
||||
default: libtarget
|
||||
|
||||
# Spreadsheat (gasp!) Custom Control
|
||||
|
||||
XISRC = \
|
||||
$(SRCP)/xi.c \
|
||||
$(SRCP)/xi2.c \
|
||||
$(SRCP)/xicf.c \
|
||||
$(SRCP)/xidbg.c \
|
||||
$(SRCP)/xiheap.c \
|
||||
$(SRCP)/xilm.c \
|
||||
$(SRCP)/xilm2.c \
|
||||
$(SRCP)/xistx.c \
|
||||
$(SRCP)/xitext.c \
|
||||
$(SRCP)/xitree.c \
|
||||
$(SRCP)/xiutils.c
|
||||
|
||||
XIOBJ = \
|
||||
$(OBJP)/xi.o \
|
||||
$(OBJP)/xi2.o \
|
||||
$(OBJP)/xicf.o \
|
||||
$(OBJP)/xidbg.o \
|
||||
$(OBJP)/xiheap.o \
|
||||
$(OBJP)/xilm.o \
|
||||
$(OBJP)/xilm2.o \
|
||||
$(OBJP)/xistx.o \
|
||||
$(OBJP)/xitext.o \
|
||||
$(OBJP)/xitree.o \
|
||||
$(OBJP)/xiutils.o
|
||||
|
||||
$(OBJP)/xi.o: $(SRCP)/xi.c
|
||||
$(CC) $(CFLAGS) -o $(OBJP)/xi.o $(SRCP)/xi.c
|
||||
|
||||
$(OBJP)/xi2.o: $(SRCP)/xi2.c
|
||||
$(CC) $(CFLAGS) -o $(OBJP)/xi2.o $(SRCP)/xi2.c
|
||||
|
||||
$(OBJP)/xicf.o: $(SRCP)/xicf.c
|
||||
$(CC) $(CFLAGS) -o $(OBJP)/xicf.o $(SRCP)/xicf.c
|
||||
|
||||
$(OBJP)/xidbg.o: $(SRCP)/xidbg.c
|
||||
$(CC) $(CFLAGS) -o $(OBJP)/xidbg.o $(SRCP)/xidbg.c
|
||||
|
||||
$(OBJP)/xiheap.o: $(SRCP)/xiheap.c
|
||||
$(CC) $(CFLAGS) -o $(OBJP)/xiheap.o $(SRCP)/xiheap.c
|
||||
|
||||
$(OBJP)/xilm.o: $(SRCP)/xilm.c
|
||||
$(CC) $(CFLAGS) -o $(OBJP)/xilm.o $(SRCP)/xilm.c
|
||||
|
||||
$(OBJP)/xilm2.o: $(SRCP)/xilm2.c
|
||||
$(CC) $(CFLAGS) -o $(OBJP)/xilm2.o $(SRCP)/xilm2.c
|
||||
|
||||
$(OBJP)/xistx.o: $(SRCP)/xistx.c
|
||||
$(CC) $(CFLAGS) -o $(OBJP)/xistx.o $(SRCP)/xistx.c
|
||||
|
||||
$(OBJP)/xitext.o: $(SRCP)/xitext.c
|
||||
$(CC) $(CFLAGS) -o $(OBJP)/xitext.o $(SRCP)/xitext.c
|
||||
|
||||
$(OBJP)/xitree.o: $(SRCP)/xitree.c
|
||||
$(CC) $(CFLAGS) -o $(OBJP)/xitree.o $(SRCP)/xitree.c
|
||||
|
||||
$(OBJP)/xiutils.o: $(SRCP)/xiutils.c
|
||||
$(CC) $(CFLAGS) -o $(OBJP)/xiutils.o $(SRCP)/xiutils.c
|
||||
|
||||
$(LIBXI): $(XIOBJ)
|
||||
$(AR) $(ARFLAGS) $(LIBXI) $?
|
||||
|
||||
# Other Stuff
|
||||
|
||||
xvt_perr:
|
||||
@$(RM) $(ROOTP)/include/xvt_perr.h
|
||||
@$(RM) $(ROOTP)/doc/ERRCODES.TXT
|
||||
$(ERRSCAN) $(ROOTP)/src/$(STAR).c \
|
||||
$(ROOTP)/help/common/$(STAR).c $(ROOTP)/help/compiler/$(STAR).c \
|
||||
$(ROOTP)/help/engine/$(STAR).c $(ROOTP)/help/viewer/$(STAR).c
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
libtarget: $(TARGETS)
|
||||
|
||||
depends:
|
||||
@echo "making 'depends'..."
|
||||
@$(MKDEP) -s "# DO NOT DELETE" -p$(OBJP)/ -- $(CFLAGS) -- $(XISRC)
|
||||
|
||||
LIBS = $(XVTLIBP)/lib$(LIBXI)$(LSUFF)
|
||||
OBJS = $(XIOBJ)
|
||||
|
||||
clean:
|
||||
@echo "making 'clean'..."
|
||||
@$(RM) $(LIBS) $(OBJS)
|
||||
|
||||
bin:
|
||||
|
||||
# DO NOT DELETE THIS LINE -- makedepend depends on it!
|
||||
|
108
xi/makefile.sxm
Executable file
108
xi/makefile.sxm
Executable file
@ -0,0 +1,108 @@
|
||||
#
|
||||
# Makefile for XI/X Motif source on Sun Sparc
|
||||
# Orca Software distributes these makefiles for convenience. Having a
|
||||
# makefile for a particular platform does not imply that you have a
|
||||
# license to use the source code on that platform. Before using the
|
||||
# source code on any given platform, make sure that you have purchased
|
||||
# the appropriate license.
|
||||
|
||||
# Macros for system utilities.
|
||||
|
||||
SHELL = /usr/bin/sh
|
||||
MAKE = /usr/bin/make
|
||||
CC = acc
|
||||
AR = /usr/bin/ar
|
||||
ARFLAGS = cru
|
||||
LD = acc
|
||||
LDFLAGS = -O
|
||||
CD = cd
|
||||
SED = /usr/bin/sed
|
||||
YACC = /usr/lang/yacc -vd
|
||||
CP = /usr/bin/cp
|
||||
LN = /usr/bin/ln -s
|
||||
MKDIR = /usr/bin/mkdir -p
|
||||
MV = /usr/bin/mv -f
|
||||
RM = /usr/bin/rm -f
|
||||
TOUCH = /usr/bin/touch -f
|
||||
|
||||
RANLIB = /usr/bin/ranlib
|
||||
|
||||
UIL = $(MOTIFHOME)/bin/uil -I$(ROOTP)/include -o
|
||||
|
||||
# Macro for 'makedepend' makefile utility.
|
||||
|
||||
MKDEP = $(OPENWINHOME)/bin/makedepend
|
||||
|
||||
# Miscellaneous macros.
|
||||
|
||||
STAR = *
|
||||
SHRSUFF = .so.4.0
|
||||
LSUFF = .a
|
||||
RSUFF = .uid
|
||||
|
||||
BTAG =
|
||||
LTAG =
|
||||
LIBUI = $(PRODUCT)ui$(LTAG)
|
||||
LIBTK = $(PRODUCT)tk$(LTAG)
|
||||
LIBHLP = $(PRODUCT)help$(LTAG)
|
||||
LIBHLPCS = $(PRODUCT)help_cs$(LTAG)
|
||||
|
||||
XVTBINP = $(ROOTP)/bin
|
||||
XVTLIBP = $(ROOTP)/lib
|
||||
|
||||
XVTLIBS = $(XVTLIBP)/lib$(LIBUI)$(LSUFF) $(XVTLIBP)/lib$(LIBHLP)$(SHRSUFF) $(XVTLIBP)/lib$(LIBTK)$(SHRSUFF)
|
||||
TKLDLIBS = -L$(XVTLIBP) -l$(LIBUI) -l$(LIBHLP) -l$(LIBTK) -L$(MOTIFHOME)/lib -L$(OPENWINHOME)/lib -lMrm -lXm -lXt -lX11
|
||||
|
||||
ROOTP = ../../xvtdsc2/sun/ptk
|
||||
SRCP = .
|
||||
OBJP = ./sxm
|
||||
BINP = $(OBJP)
|
||||
|
||||
IDIRS = -I$(ROOTP)/include -I../include -I/d3/include -I/d3/ericw/motif/include
|
||||
CFLAGS = -c -O -DXTFUNCPROTO $(IDIRS) -temp=/usr/temp
|
||||
LDLIBS = $(TKLDLIBS) -lm
|
||||
|
||||
CURL = $(XVTBINP)/curl$(BTAG) -r mtf11 -s -o
|
||||
HELPC = $(XVTBINP)/helpc$(BTAG) -f xvt -I$(ROOTP)/include -o
|
||||
|
||||
XILIB = ../lib/libxisxm.a
|
||||
SRC = .
|
||||
|
||||
$(XILIB): $(OBJP)/xiheap.o $(OBJP)/xitree.o $(OBJP)/xicf.o $(OBJP)/xitext.o $(OBJP)/xistx.o $(OBJP)/xi.o $(OBJP)/xi2.o $(OBJP)/xitree.o $(OBJP)/xicf.o $(OBJP)/xidbg.o $(OBJP)/xilm.o $(OBJP)/xilm2.o $(OBJP)/xiutils.o
|
||||
$(AR) $(ARFLAGS) $(XILIB) $(OBJP)/xiheap.o $(OBJP)/xitree.o $(OBJP)/xicf.o $(OBJP)/xitext.o $(OBJP)/xilm.o $(OBJP)/xilm2.o $(OBJP)/xistx.o $(OBJP)/xiutils.o $(OBJP)/xi.o $(OBJP)/xi2.o $(OBJP)/xitree.o $(OBJP)/xicf.o $(OBJP)/xidbg.o
|
||||
ranlib $(XILIB)
|
||||
|
||||
$(OBJP)/xiheap.o: $(SRC)/xiheap.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xiheap.c -o $(OBJP)/xiheap.o
|
||||
|
||||
$(OBJP)/xitext.o: $(SRC)/xitext.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xitext.c -o $(OBJP)/xitext.o
|
||||
|
||||
$(OBJP)/xilm.o: $(SRC)/xilm.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xilm.c -o $(OBJP)/xilm.o
|
||||
|
||||
$(OBJP)/xilm2.o: $(SRC)/xilm2.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xilm2.c -o $(OBJP)/xilm2.o
|
||||
|
||||
$(OBJP)/xistx.o: $(SRC)/xistx.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xistx.c -o $(OBJP)/xistx.o
|
||||
|
||||
$(OBJP)/xiutils.o: $(SRC)/xiutils.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xiutils.c -o $(OBJP)/xiutils.o
|
||||
|
||||
$(OBJP)/xi.o: $(SRC)/xi.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xi.c -o $(OBJP)/xi.o
|
||||
|
||||
$(OBJP)/xi2.o: $(SRC)/xi2.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xi2.c -o $(OBJP)/xi2.o
|
||||
|
||||
$(OBJP)/xitree.o: $(SRC)/xitree.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xitree.c -o $(OBJP)/xitree.o
|
||||
|
||||
$(OBJP)/xicf.o: $(SRC)/xicf.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xicf.c -o $(OBJP)/xicf.o
|
||||
|
||||
$(OBJP)/xidbg.o: $(SRC)/xidbg.c
|
||||
$(CC) -c $(CFLAGS) $(SRC)/xidbg.c -o $(OBJP)/xidbg.o
|
||||
|
||||
|
172
xi/makefile.wm
Executable file
172
xi/makefile.wm
Executable file
@ -0,0 +1,172 @@
|
||||
#################################################################
|
||||
#
|
||||
# Makefile for XI/Win source
|
||||
# Compiler: Microsoft Visual C++ version 1.0 or 1.5
|
||||
# Orca Software distributes these makefiles for convenience. Having a
|
||||
# makefile for a particular platform does not imply that you have a
|
||||
# license to use the source code on that platform. Before using the
|
||||
# source code on any given platform, make sure that you have purchased
|
||||
# the appropriate license.
|
||||
#
|
||||
##################################################################
|
||||
# Copyright 1989-1994 XVT Software Inc.
|
||||
|
||||
APP_MODEL = LARGE
|
||||
APP_DEBUG = FALSE
|
||||
|
||||
# File pathnames
|
||||
XVT_DIR = \xvtdsc2\win_x86\ptk
|
||||
XVT_INCDIR = $(XVT_DIR)\include
|
||||
XVT_LIBDIR = $(XVT_DIR)\lib
|
||||
XVT_BINDIR = $(XVT_DIR)\bin
|
||||
XI_DIR = \xi
|
||||
XI_INCDIR = $(XI_DIR)\include
|
||||
XI_LIBDIR = $(XI_DIR)\lib
|
||||
LIB = $(XI_LIBDIR)\lmxiw.lib
|
||||
|
||||
all: $(LIB)
|
||||
|
||||
#
|
||||
# Compiler variables
|
||||
#
|
||||
# Note: The debug variables are only enabled when APP_DEBUG is
|
||||
# set to TRUE above.
|
||||
# -Od: Turn off optimization
|
||||
# -Zi: Compile for debugging
|
||||
# -c : Compile without linking
|
||||
# -G2s: Compile for 286 instruction set.
|
||||
# -W3: Turn on warning level 3.
|
||||
# -Zp: Pack structure members.
|
||||
CC = cl
|
||||
CDEBUG = -Od -Zi
|
||||
CFLAGS = -G2s -GA -GEs -W3 -Zp -DWSWIN
|
||||
|
||||
#
|
||||
# Link variables
|
||||
#
|
||||
# Note: The debug variables are only enabled when APP_DEBUG is
|
||||
# set to TRUE above.
|
||||
# /CO : Add debugging information for Codeview.
|
||||
# /ALIGN: aligns segment on 16 byte boundaries.
|
||||
# /NOD: Don't search for default libraries.
|
||||
# /NOE: Prevent linker from searching extended dictionaries.
|
||||
#
|
||||
LINK = link
|
||||
LDEBUG = /CO
|
||||
LFLAGS = /ALIGN:16/NOD/NOE
|
||||
|
||||
#
|
||||
# Debug variables
|
||||
#
|
||||
# Do not modify these.
|
||||
!IF "$(APP_DEBUG)" == "TRUE"
|
||||
C_FLAGS_DEBUG = $(CDEBUG) -DDEBUG
|
||||
L_FLAGS_DEBUG = $(LDEBUG)
|
||||
!ELSE
|
||||
C_FLAGS_DEBUG =
|
||||
L_FLAGS_DEBUG =
|
||||
!ENDIF
|
||||
|
||||
#
|
||||
# Memory Model variables
|
||||
#
|
||||
# Do not modify these.
|
||||
C_FLAGS_MODEL = -AL
|
||||
C_LIBS = llibcew libw oldnames
|
||||
XVT_LIBS_MODEL = $(XVT_LIBDIR)\xvtwmapi.lib $(XVT_LIBDIR)\xvtwmhn.lib
|
||||
XI_LIB_MODEL = $(XI_LIBDIR)\lmxiw.lib
|
||||
|
||||
##########################################################################
|
||||
#
|
||||
# Library Variables
|
||||
#
|
||||
C_FLAGS = $(C_FLAGS_DEBUG) $(CFLAGS) $(C_FLAGS_MODEL) \
|
||||
-I. -I$(XVT_INCDIR) -DSTRICT
|
||||
|
||||
L_FLAGS = $(L_FLAGS_DEBUG) $(LFLAGS)
|
||||
|
||||
L_LIBS = $(C_LIBS) $(XVT_LIBS_MODEL) $(XI_LIB_MODEL)
|
||||
|
||||
L_DEFS = $(XVT_LIBDIR)\xvtwapp.def
|
||||
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Suffix rules
|
||||
#
|
||||
.c.obj:
|
||||
$(CC) $(C_FLAGS) -Fo$* $?
|
||||
|
||||
.url.rc:
|
||||
$(XVT_BINDIR)\curl -r rcwin -s -I$(XVT_INCDIR) $*.url
|
||||
|
||||
.url.res:
|
||||
$(XVT_BINDIR)\curl -r rcwin -s -I$(XVT_INCDIR) $*.url
|
||||
rc -r $*.rc
|
||||
|
||||
.rc.res:
|
||||
rc -r $*.rc
|
||||
|
||||
.SUFFIXES: .rc .url
|
||||
|
||||
.obj.exe:
|
||||
echo $*.obj > wiapp.tmp
|
||||
echo $@ >> wiapp.tmp
|
||||
echo nul >> wiapp.tmp
|
||||
echo $(L_LIBS) >> wiapp.tmp
|
||||
echo $(L_DEFS) >> wiapp.tmp
|
||||
$(LINK) $(L_FLAGS) @wiapp.tmp
|
||||
del wiapp.tmp
|
||||
rc -k -30 $*.res
|
||||
|
||||
clean:
|
||||
-del *.exe
|
||||
-del *.obj
|
||||
-del *.res
|
||||
-del *.rc
|
||||
|
||||
OBJS = xilm.obj xilm2.obj xiutils.obj xitext.obj xistx.obj xitree.obj xiheap.obj xi.obj xi2.obj xicf.obj xidbg.obj
|
||||
|
||||
SRC = ..
|
||||
|
||||
$(LIB): $(OBJS)
|
||||
del $(LIB)
|
||||
lib @<<
|
||||
$(LIB)&
|
||||
$(OBJS), nul
|
||||
<<NOKEEP
|
||||
|
||||
xiutils.obj: $(SRC)\xiutils.c
|
||||
$(CC) -c $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xitext.obj: $(SRC)\xitext.c
|
||||
$(CC) -c $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xistx.obj: $(SRC)\xistx.c
|
||||
$(CC) -c $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xilm.obj: $(SRC)\xilm.c
|
||||
$(CC) -c $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xilm2.obj: $(SRC)\xilm2.c
|
||||
$(CC) -c $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xitree.obj: $(SRC)\xitree.c
|
||||
$(CC) -c $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xiheap.obj: $(SRC)\xiheap.c
|
||||
$(CC) -c $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xi.obj: $(SRC)\xi.c
|
||||
$(CC) -c $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xi2.obj: $(SRC)\xi2.c
|
||||
$(CC) -c $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xicf.obj: $(SRC)\xicf.c
|
||||
$(CC) -c $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
xidbg.obj: $(SRC)\xidbg.c
|
||||
$(CC) -c $(C_FLAGS) $(SRC)\$*.c
|
||||
|
||||
|
22
xi/xi_int.h
Executable file
22
xi/xi_int.h
Executable file
@ -0,0 +1,22 @@
|
||||
#ifndef INCL_XI_INT
|
||||
#define INCL_XI_INT
|
||||
|
||||
int xi_scroll_internal( XI_OBJ *xi_obj, int nbr_lines, int percent,
|
||||
BOOLEAN same_cell );
|
||||
void realloc_ptrs(void * * *ptrs, int nbr_ptrs, void *parent);
|
||||
BOOLEAN xi_move_focus_internal( XI_OBJ *xi_obj, BOOLEAN make_callbacks,
|
||||
BOOLEAN next_if_disabled,
|
||||
int check_for_reenabled);
|
||||
XI_OBJ* xi_search_itf( XI_OBJ *xi_obj, XI_SEARCH_TYPE search_type,
|
||||
int parm1);
|
||||
XI_OBJ * xi_find_next_obj( XI_OBJ *focus_obj, XI_NEXT_TYPE tab_type, long c);
|
||||
void xi_remove_window_from_list(WINDOW win);
|
||||
void xi_clear_lasts(void);
|
||||
void xi_close_window_internal(XI_OBJ *itf);
|
||||
BOOLEAN call_cb(XI_OBJ *itf, XI_EVENT *xiev);
|
||||
void xi_hscroll_internal(XI_OBJ *xi_obj, int nbr_lines, int pos);
|
||||
void XVT_CALLCONV1 xi_hscroll XVT_CC_ARGS((XI_OBJ *xi_obj,
|
||||
int nbr_columns));
|
||||
|
||||
#endif
|
||||
|
304
xi/xidbg.c
Executable file
304
xi/xidbg.c
Executable file
@ -0,0 +1,304 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 1991-1995 by ORCA Software, Inc. *
|
||||
* *
|
||||
* All rights reserved. May not be reproduced or distributed, in printed or *
|
||||
* electronic form, without permission of ORCA Software, Inc. May not be *
|
||||
* distributed as object code, separately or linked with other object modules, *
|
||||
* without permission. *
|
||||
*******************************************************************************/
|
||||
|
||||
#define XI_INTERNAL
|
||||
#include "xiextend.h"
|
||||
#include "xi.h"
|
||||
#include "xiutils.h"
|
||||
|
||||
#define UNDEFINED 1000
|
||||
#define BUFFERLEN 200
|
||||
|
||||
static char * near
|
||||
bool_to_str(BOOLEAN b)
|
||||
{
|
||||
if (b)
|
||||
return "TRUE";
|
||||
else
|
||||
return "FALSE";
|
||||
}
|
||||
|
||||
void
|
||||
xi_event_debug(char *tag, XI_EVENT *xiev, char *s, int len)
|
||||
{
|
||||
char *tmp;
|
||||
char str[BUFFERLEN], str2[BUFFERLEN];
|
||||
int i, j, k;
|
||||
XI_OBJ *xi_obj;
|
||||
|
||||
static struct
|
||||
{
|
||||
int type;
|
||||
char *desc;
|
||||
} event_text[] =
|
||||
{
|
||||
{
|
||||
XIE_CHAR_FIELD, "XIE_CHAR_FIELD "},
|
||||
{XIE_DBL_FIELD, "XIE_DBL_FIELD "},
|
||||
{XIE_CHG_FIELD, "XIE_CHG_FIELD "},
|
||||
{XIE_OFF_FIELD, "XIE_OFF_FIELD "},
|
||||
{XIE_ON_FIELD, "XIE_ON_FIELD "},
|
||||
{XIE_OFF_GROUP, "XIE_OFF_GROUP "},
|
||||
{XIE_ON_GROUP, "XIE_ON_GROUP "},
|
||||
{XIE_OFF_FORM, "XIE_OFF_FORM "},
|
||||
{XIE_ON_FORM, "XIE_ON_FORM "},
|
||||
{XIE_VIR_PAN, "XIE_VIR_PAN "},
|
||||
{XIE_XVT_EVENT, "XIE_XVT_EVENT "},
|
||||
{XIE_XVT_POST_EVENT,"XIE_XVT_POST_EVENT"},
|
||||
{XIE_INIT, "XIE_INIT "},
|
||||
{XIE_BUTTON, "XIE_BUTTON "},
|
||||
{XIE_CHAR_CELL, "XIE_CHAR_CELL "},
|
||||
{XIE_CLEANUP, "XIE_CLEANUP "},
|
||||
{XIE_CLOSE, "XIE_CLOSE "},
|
||||
{XIE_COMMAND, "XIE_COMMAND "},
|
||||
{XIE_DBL_CELL, "XIE_DBL_CELL "},
|
||||
{XIE_GET_FIRST, "XIE_GET_FIRST "},
|
||||
{XIE_GET_LAST, "XIE_GET_LAST "},
|
||||
{XIE_GET_NEXT, "XIE_GET_NEXT "},
|
||||
{XIE_GET_PERCENT, "XIE_GET_PERCENT "},
|
||||
{XIE_GET_PREV, "XIE_GET_PREV "},
|
||||
{XIE_CELL_REQUEST, "XIE_CELL_REQUEST"},
|
||||
{XIE_CHG_CELL, "XIE_CHG_CELL "},
|
||||
{XIE_OFF_CELL, "XIE_OFF_CELL "},
|
||||
{XIE_ON_CELL, "XIE_ON_CELL "},
|
||||
{XIE_OFF_ROW, "XIE_OFF_ROW "},
|
||||
{XIE_ON_ROW, "XIE_ON_ROW "},
|
||||
{XIE_OFF_COLUMN, "XIE_OFF_COLUMN "},
|
||||
{XIE_ON_COLUMN, "XIE_ON_COLUMN "},
|
||||
{XIE_OFF_LIST, "XIE_OFF_LIST "},
|
||||
{XIE_ON_LIST, "XIE_ON_LIST "},
|
||||
{XIE_REC_ALLOCATE, "XIE_REC_ALLOCATE"},
|
||||
{XIE_REC_FREE, "XIE_REC_FREE "},
|
||||
{XIE_ROW_SIZE, "XIE_ROW_SIZE "},
|
||||
{XIE_SELECT, "XIE_SELECT "},
|
||||
{XIE_UPDATE, "XIE_UPDATE "},
|
||||
{XIE_COL_DELETE, "XIE_COL_DELETE "},
|
||||
{XIE_COL_MOVE, "XIE_COL_MOVE "},
|
||||
{XIE_COL_SIZE, "XIE_COL_SIZE "},
|
||||
{UNDEFINED, "Unknown XI Event" }
|
||||
};
|
||||
|
||||
static struct
|
||||
{
|
||||
int type;
|
||||
char *desc;
|
||||
} xvt_event_text[] =
|
||||
{
|
||||
{E_MOUSE_UP, "E_MOUSE_UP"},
|
||||
{E_MOUSE_DOWN, "E_MOUSE_DOWN"},
|
||||
{E_CREATE, "E_CREATE"},
|
||||
{E_MOUSE_MOVE, "E_MOUSE_MOVE"},
|
||||
{E_MOUSE_DBL, "E_MOUSE_DBL"},
|
||||
{E_CHAR, "E_CHAR"},
|
||||
{E_UPDATE, "E_UPDATE"},
|
||||
{E_ACTIVATE, "E_FOCUS"},
|
||||
{E_KILL_WINDOW, "E_DESTROY"},
|
||||
{E_VSCROLL, "E_VSCROLL"},
|
||||
{E_HSCROLL, "E_HSCROLL"},
|
||||
{E_COMMAND, "E_COMMAND"},
|
||||
{E_CLOSE, "E_CLOSE"},
|
||||
{E_SIZE, "E_SIZE"},
|
||||
{E_FONT, "E_FONT"},
|
||||
{E_QUIT, "E_QUIT"},
|
||||
{E_CONTROL, "E_CONTROL"},
|
||||
{UNDEFINED, "Unknown XVT Event"}
|
||||
};
|
||||
|
||||
|
||||
static struct
|
||||
{
|
||||
int type;
|
||||
char *desc;
|
||||
} object_type[] =
|
||||
{
|
||||
{
|
||||
XIT_BTN, "XIT_BTN"},
|
||||
{XIT_CONTAINER, "XIT_CONTAINER"},
|
||||
{XIT_FORM, "XIT_FORM"},
|
||||
{XIT_FIELD, "XIT_FIELD"},
|
||||
{XIT_GROUP, "XIT_GROUP"},
|
||||
{XIT_LINE, "XIT_LINE"},
|
||||
{XIT_RECT, "XIT_RECT"},
|
||||
{XIT_TEXT, "XIT_TEXT"},
|
||||
{XIT_CELL, "XIT_CELL"},
|
||||
{XIT_COLUMN, "XIT_COLUMN"},
|
||||
{XIT_ITF, "XIT_ITF"},
|
||||
{XIT_LIST, "XIT_LIST"},
|
||||
{XIT_ROW, "XIT_ROW"},
|
||||
{UNDEFINED, "Unknown XI Object Type" }
|
||||
};
|
||||
|
||||
for (i = 0; event_text[i].type != xiev->type &&
|
||||
event_text[i].type != UNDEFINED; ++i)
|
||||
;
|
||||
sprintf(str, "%s: %s", tag, event_text[i].desc);
|
||||
*str2 = '\0';
|
||||
switch (xiev->type)
|
||||
{
|
||||
case XIE_XVT_EVENT:
|
||||
case XIE_XVT_POST_EVENT:
|
||||
for (j = 0; xvt_event_text[j].type != xiev->v.xvte.type &&
|
||||
xvt_event_text[j].type != UNDEFINED; ++j)
|
||||
;
|
||||
sprintf(str2, " %s", xvt_event_text[j].desc);
|
||||
break;
|
||||
case XIE_COMMAND:
|
||||
sprintf(str2, " tag %d, shift %s, control %s", xiev->v.cmd.tag,
|
||||
bool_to_str(xiev->v.cmd.shift), bool_to_str(xiev->v.cmd.control));
|
||||
break;
|
||||
case XIE_INIT:
|
||||
case XIE_BUTTON:
|
||||
case XIE_CLOSE:
|
||||
case XIE_DBL_CELL:
|
||||
case XIE_DBL_FIELD:
|
||||
case XIE_CHG_FIELD:
|
||||
case XIE_OFF_FIELD:
|
||||
case XIE_ON_FIELD:
|
||||
case XIE_OFF_GROUP:
|
||||
case XIE_ON_GROUP:
|
||||
case XIE_OFF_FORM:
|
||||
case XIE_ON_FORM:
|
||||
case XIE_CHG_CELL:
|
||||
case XIE_OFF_CELL:
|
||||
case XIE_ON_CELL:
|
||||
case XIE_OFF_ROW:
|
||||
case XIE_ON_ROW:
|
||||
case XIE_OFF_COLUMN:
|
||||
case XIE_ON_COLUMN:
|
||||
case XIE_OFF_LIST:
|
||||
case XIE_ON_LIST:
|
||||
case XIE_CLEANUP:
|
||||
xi_obj = xiev->v.xi_obj;
|
||||
for (k = 0; object_type[k].type != xi_obj->type &&
|
||||
object_type[k].type != UNDEFINED; ++k)
|
||||
;
|
||||
switch (xi_obj->type)
|
||||
{
|
||||
case XIT_CELL:
|
||||
sprintf(str2, " cid %3d, type %s r %d c %d v %d",
|
||||
xi_obj->cid, object_type[k].desc, xi_obj->v.cell.row,
|
||||
xi_obj->v.cell.column, !xi_obj->v.cell.is_vert_scrolled);
|
||||
break;
|
||||
case XIT_ROW:
|
||||
sprintf(str2, " cid %3d, type %s r %d", xi_obj->cid,
|
||||
object_type[k].desc, xi_obj->v.row);
|
||||
break;
|
||||
default:
|
||||
sprintf(str2, " cid %3d, type %s", xi_obj->cid,
|
||||
object_type[k].desc);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case XIE_CHAR_CELL:
|
||||
case XIE_CHAR_FIELD:
|
||||
{
|
||||
char char_str[20];
|
||||
int ch;
|
||||
|
||||
ch = xiev->v.chr.ch;
|
||||
switch (ch)
|
||||
{
|
||||
case K_CLEAR:
|
||||
strcpy(char_str, "K_CLEAR");
|
||||
break;
|
||||
case K_DEL:
|
||||
strcpy(char_str, "K_DEL");
|
||||
break;
|
||||
case '\b':
|
||||
strcpy(char_str, "BS");
|
||||
break;
|
||||
default:
|
||||
char_str[0] = (char)ch;
|
||||
char_str[1] = '\0';
|
||||
break;
|
||||
}
|
||||
xi_obj = xiev->v.chr.xi_obj;
|
||||
for (k = 0; object_type[k].type != xi_obj->type &&
|
||||
object_type[k].type != UNDEFINED; ++k)
|
||||
;
|
||||
switch (xi_obj->type)
|
||||
{
|
||||
case XIT_CELL:
|
||||
sprintf(str2,
|
||||
" cid %3d type %s r %d c %d ch %s shft %d ctrl %d",
|
||||
xi_obj->cid, object_type[k].desc, xi_obj->v.cell.row,
|
||||
xi_obj->v.cell.column, char_str, xiev->v.chr.shift,
|
||||
xiev->v.chr.control);
|
||||
break;
|
||||
case XIT_FIELD:
|
||||
sprintf(str2, " cid %3d type %s ch %s shft %d ctrl %d", xi_obj->cid,
|
||||
object_type[k].desc, char_str, xiev->v.chr.shift,
|
||||
xiev->v.chr.control);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XIE_GET_FIRST:
|
||||
case XIE_GET_LAST:
|
||||
sprintf(str2, " data_rec %08.8lx", (long)xiev->v.rec_request.data_rec);
|
||||
break;
|
||||
case XIE_GET_NEXT:
|
||||
case XIE_GET_PREV:
|
||||
sprintf(str2, " spec_rec %08.8lx, data_rec %08.8lx",
|
||||
(long)xiev->v.rec_request.spec_rec, (long)xiev->v.rec_request.data_rec);
|
||||
break;
|
||||
case XIE_CELL_REQUEST:
|
||||
sprintf(str2, " c %2d, rec %08.8lx, len %3d",
|
||||
(int)xiev->v.cell_request.col_nbr, (long)xiev->v.cell_request.rec,
|
||||
xiev->v.cell_request.len);
|
||||
break;
|
||||
case XIE_GET_PERCENT:
|
||||
sprintf(str2, " list->cid %d, record %08.8lx",
|
||||
xiev->v.get_percent.list->cid,
|
||||
(long)xiev->v.get_percent.record);
|
||||
break;
|
||||
case XIE_SELECT:
|
||||
sprintf(str2, " row %d, selected %d, dbl_click %d shift %d control %d column %d",
|
||||
xiev->v.select.xi_obj->v.row, xiev->v.select.selected,
|
||||
xiev->v.select.dbl_click, xiev->v.select.shift, xiev->v.select.control, xiev->v.select.column);
|
||||
break;
|
||||
case XIE_REC_ALLOCATE:
|
||||
sprintf(str2, " list cid %d", xiev->v.rec_allocate.list->cid);
|
||||
break;
|
||||
case XIE_REC_FREE:
|
||||
sprintf(str2, " list cid %d, record %08.8lx", xiev->v.rec_free.list->cid, xiev->v.rec_free.record);
|
||||
break;
|
||||
case XIE_ROW_SIZE:
|
||||
sprintf(str2, " row %d, new_size %d", xiev->v.row_size.xi_obj->v.row, xiev->v.row_size.new_row_height);
|
||||
break;
|
||||
case XIE_VIR_PAN:
|
||||
sprintf(str2, " delta_x %d, delta_y %d, before_pan %d",
|
||||
xiev->v.vir_pan.delta_x, xiev->v.vir_pan.delta_y,
|
||||
xiev->v.vir_pan.before_pan);
|
||||
break;
|
||||
case XIE_COL_DELETE:
|
||||
sprintf(str2, " list cid %d, col_nbr %d",
|
||||
xiev->v.column.list->cid, xiev->v.column.col_nbr);
|
||||
break;
|
||||
case XIE_COL_MOVE:
|
||||
sprintf(str2, " list cid %d, col_nbr %d, new_col_nbr %d",
|
||||
xiev->v.column.list->cid, xiev->v.column.col_nbr,
|
||||
xiev->v.column.new_col_nbr);
|
||||
break;
|
||||
case XIE_COL_SIZE:
|
||||
sprintf(str2,
|
||||
" list cid %d, col_nbr %d, new_col_width %d new_col_pixel_width %d",
|
||||
xiev->v.column.list->cid, xiev->v.column.col_nbr,
|
||||
xiev->v.column.new_col_width, xiev->v.column.new_col_pixel_width);
|
||||
break;
|
||||
}
|
||||
tmp = (char *)xi_tree_malloc(strlen(str) + strlen(str2) + 2, NULL);
|
||||
strcpy(tmp, str);
|
||||
strcat(tmp, str2);
|
||||
if ((int)strlen(tmp) >= len)
|
||||
tmp[len] = '\0';
|
||||
strcpy(s, tmp);
|
||||
xi_tree_free(tmp);
|
||||
}
|
||||
|
27
xi/xidisply.h
Executable file
27
xi/xidisply.h
Executable file
@ -0,0 +1,27 @@
|
||||
#define C_UL 218 /* upper left */
|
||||
#define C_UR 191 /* upper right */
|
||||
#define C_LL 192 /* lower left */
|
||||
#define C_LR 217 /* lower right */
|
||||
#define C_XD 194 /* T-intersection down */
|
||||
#define C_XU 193 /* T-intersection up */
|
||||
#define C_XR 195 /* T-intersection right */
|
||||
#define C_XL 180 /* T-intersection left */
|
||||
#define C_XX 197 /* 4-way intersection */
|
||||
#define C_H 196 /* horizontal line */
|
||||
#define C_V 179 /* vertical line */
|
||||
#define C_ULD 201 /* next group same as above, but double */
|
||||
#define C_URD 187
|
||||
#define C_LLD 200
|
||||
#define C_LRD 188
|
||||
#define C_XDD 203
|
||||
#define C_XUD 202
|
||||
#define C_XRD 204
|
||||
#define C_XLD 185
|
||||
#define C_XXD 206
|
||||
#define C_HD 205
|
||||
#define C_VD 186
|
||||
#define C_HATCH 176 /* hatching */
|
||||
#define C_SPACE 255
|
||||
|
||||
|
||||
|
65
xi/xiextend.h
Executable file
65
xi/xiextend.h
Executable file
@ -0,0 +1,65 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 1991-1995 by ORCA Software, Inc. *
|
||||
* *
|
||||
* All rights reserved. May not be reproduced or distributed, in printed or *
|
||||
* electronic form, without permission of ORCA Software, Inc. *
|
||||
*******************************************************************************/
|
||||
|
||||
#ifdef WSWIN
|
||||
#define NOCOMM
|
||||
#define NOMINMAX
|
||||
#define NOGDICAPMASKS
|
||||
#define NOVIRTUALKEYCODES
|
||||
#define NOWINMESSAGES
|
||||
#define NOWINSTYLES
|
||||
#define NOSYSMETRICS
|
||||
#define NOMENUS
|
||||
#define NOICONS
|
||||
#define NOKEYSTATES
|
||||
#define NOSYSCOMMANDS
|
||||
#define NORASTEROPS
|
||||
#define NOSHOWWINDOW
|
||||
#define OEMRESOURCE
|
||||
#define NOATOM
|
||||
#define NOCLIPBOARD
|
||||
#define NOCOLOR
|
||||
#define NOCTLMGR
|
||||
#define NODRAWTEXT
|
||||
#define NOGDI
|
||||
#define NOKERNEL
|
||||
/* #define NOUSER */
|
||||
#define NOMB
|
||||
#define NOMEMMGR
|
||||
#define NOMETAFILE
|
||||
#define NOMINMAX
|
||||
#define NOMSG
|
||||
#define NOOPENFILE
|
||||
#define NOSCROLL
|
||||
#define NOSOUND
|
||||
#define NOTEXTMETRIC
|
||||
#define NOWH
|
||||
#define NOWINOFFSETS
|
||||
#define NOCOMM
|
||||
#define NOKANJI
|
||||
#define NOHELP
|
||||
#define NOPROFILER
|
||||
#define NODEFERWINDOWPOS
|
||||
#include <windows.h>
|
||||
#define INTERNAL
|
||||
#endif
|
||||
|
||||
#ifdef OSOS2
|
||||
#define INCL_DOS
|
||||
#define INCL_WIN
|
||||
#define INCL_GPI
|
||||
#define COLOR pm_COLOR
|
||||
#define UINT pm_UINT
|
||||
#define ULONG pm_ULONG
|
||||
#include <os2.h>
|
||||
#undef COLOR
|
||||
#undef UINT
|
||||
#undef ULONG
|
||||
#define INTERNAL
|
||||
#endif
|
||||
|
||||
|
57
xi/xiheap.c
Executable file
57
xi/xiheap.c
Executable file
@ -0,0 +1,57 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 1991-1995 by ORCA Software, Inc. *
|
||||
* *
|
||||
* All rights reserved. May not be reproduced or distributed, in printed or *
|
||||
* electronic form, without permission of ORCA Software, Inc. May not be *
|
||||
* distributed as object code, separately or linked with other object modules, *
|
||||
* without permission. *
|
||||
*******************************************************************************/
|
||||
|
||||
#define XI_INTERNAL
|
||||
|
||||
#include "xi.h"
|
||||
#include "xiheap.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
int nbr_malloc, nbr_free;
|
||||
#endif
|
||||
|
||||
void *
|
||||
heap_malloc(size_t size)
|
||||
{
|
||||
void *p;
|
||||
|
||||
#ifdef DEBUG
|
||||
nbr_malloc++;
|
||||
#endif
|
||||
p = malloc(size);
|
||||
if ( p != NULL )
|
||||
memset((char *)p, '\0', (size_t)size);
|
||||
return(p);
|
||||
}
|
||||
|
||||
void
|
||||
heap_free(void *p)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
nbr_free++;
|
||||
#endif
|
||||
free((char *)p);
|
||||
}
|
||||
|
||||
void *
|
||||
heap_realloc(void *p, size_t size)
|
||||
{
|
||||
return( realloc((char *)p, size ));
|
||||
}
|
||||
|
||||
void
|
||||
heap_dbg(char *title)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
xvt_debug_printf("heap check (%s): malloc's=%u, free's=%u", title, nbr_malloc, nbr_free);
|
||||
#else
|
||||
NOREF(title);
|
||||
#endif
|
||||
}
|
||||
|
48
xi/xiheap.h
Executable file
48
xi/xiheap.h
Executable file
@ -0,0 +1,48 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 1991-1995 by ORCA Software, Inc. *
|
||||
* *
|
||||
* All rights reserved. May not be reproduced or distributed, in printed or *
|
||||
* electronic form, without permission of ORCA Software, Inc. *
|
||||
*******************************************************************************/
|
||||
|
||||
/******************************************************************
|
||||
Heap module
|
||||
******************************************************************/
|
||||
void *heap_malloc(size_t size);
|
||||
void heap_free(void *p);
|
||||
void *heap_realloc(void *p, size_t size);
|
||||
void heap_dbg(char *title);
|
||||
#define MAX_NODE_SIZE 16000
|
||||
#define HEAP_SIZE 32000
|
||||
|
||||
#define NODE_SET_MAGIC(node) (node->size = 0xFFFF)
|
||||
#define NODE_IS_MAGIC(node) (node->size == 0xFFFF)
|
||||
|
||||
#define NODE_MARK_ALLOCATED(node) (node->size |= 0x8000)
|
||||
#define NODE_MARK_FREE(node) (node->size &= 0x7FFF)
|
||||
#define NODE_IS_FREE(node) ( (node->size & 0x8000) == 0 )
|
||||
|
||||
#define NODE_SET_SIZE(node, n) (node->size = (node->size & 0x8000) | (n))
|
||||
#define NODE_GET_SIZE(node) (node->size & 0x7FFF)
|
||||
|
||||
#define PTR_IS_GLOBAL(p) ((PTR_LONG(p) & 0xFFFF) == 0)
|
||||
#define NEXT_NODE(node) ( (NODE *)((char *)node + sizeof(NODE) + NODE_GET_SIZE(node)))
|
||||
|
||||
#define PTR_TO_NODE(p) ((NODE *)(p) - 1)
|
||||
#define NODE_TO_PTR(node) ((char *)(node + 1))
|
||||
|
||||
typedef struct _s_node
|
||||
{
|
||||
unsigned short size;
|
||||
} NODE;
|
||||
|
||||
typedef struct _s_enode
|
||||
{
|
||||
unsigned short size; /* equal to NODE_MAGIC */
|
||||
struct _s_node *next; /* pointer to next heap */
|
||||
} E_NODE;
|
||||
|
||||
#define ALIGNMENT (sizeof(NODE))
|
||||
|
||||
|
||||
|
37
xi/xil.h
Executable file
37
xi/xil.h
Executable file
@ -0,0 +1,37 @@
|
||||
#ifndef INCL_XIL
|
||||
#define INCL_XIL
|
||||
|
||||
#include "xi.h"
|
||||
#include "xvtcm.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
XVTCM_CONTROL_INFO ci;
|
||||
XI_OBJ* itf;
|
||||
XI_EVENT* xiev;
|
||||
} XIL_DATA;
|
||||
|
||||
WINDOW XVT_CALLCONV1 xil_create XVT_CC_ARGS((int cid, int left, int top,
|
||||
int right, int bottom, int prop_count,
|
||||
char** prop_list, WINDOW parent_win,
|
||||
int parent_rid, long parent_flags,
|
||||
char* parent_class));
|
||||
XI_OBJ_DEF* XVT_CALLCONV1 xil_parse XVT_CC_ARGS((int cid, int prop_count,
|
||||
char** prop_list));
|
||||
|
||||
WINDOW XVT_CALLCONV1 xis_create XVT_CC_ARGS((int cid, int left, int top,
|
||||
int right, int bottom, int prop_count,
|
||||
char** prop_list, WINDOW parent_win,
|
||||
int parent_rid, long parent_flags,
|
||||
char* parent_class));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
// End of extern "C"
|
||||
#endif
|
||||
#endif
|
||||
|
650
xi/xilm.h
Executable file
650
xi/xilm.h
Executable file
@ -0,0 +1,650 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 1991-1995 by ORCA Software, Inc. *
|
||||
* *
|
||||
* All rights reserved. May not be reproduced or distributed, in printed or *
|
||||
* electronic form, without permission of ORCA Software, Inc. *
|
||||
*******************************************************************************/
|
||||
|
||||
/******************************************************************
|
||||
LM module
|
||||
******************************************************************/
|
||||
#define LM_ATR_ENABLED XI_ATR_ENABLED
|
||||
|
||||
#define LM_ATR_VISIBLE XI_ATR_VISIBLE
|
||||
#define LM_ATR_NAVIGATE XI_ATR_NAVIGATE
|
||||
#define LM_ATR_TABWRAP XI_ATR_TABWRAP
|
||||
|
||||
typedef enum _lm_cb_type
|
||||
{
|
||||
LM_CB_CHAR,
|
||||
LM_CB_CHANGE,
|
||||
LM_CB_DBL,
|
||||
LM_CB_FOCUS,
|
||||
LM_CB_TEXT,
|
||||
LM_CB_SELECT,
|
||||
LM_CB_CELL_BTN,
|
||||
LM_CB_GET_FIRST,
|
||||
LM_CB_GET_NEXT,
|
||||
LM_CB_GET_PREV,
|
||||
LM_CB_GET_LAST,
|
||||
LM_CB_GET_PERCENT,
|
||||
LM_CB_REC_ALLOCATE,
|
||||
LM_CB_REC_FREE,
|
||||
LM_CB_ROW_SIZE,
|
||||
LM_CB_COL_DELETE,
|
||||
LM_CB_COL_MOVE,
|
||||
LM_CB_COL_SIZE
|
||||
}
|
||||
LM_CB_TYPE;
|
||||
|
||||
typedef struct _lm_cb_data
|
||||
{
|
||||
LM lm;
|
||||
LM_CB_TYPE cb_type;
|
||||
int cid;
|
||||
WINDOW win;
|
||||
int row;
|
||||
int column;
|
||||
long rec;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
long spec_rec;
|
||||
long data_rec;
|
||||
int percent;
|
||||
unsigned long attrib;
|
||||
COLOR color;
|
||||
BOOLEAN refused;
|
||||
int row_height;
|
||||
BOOLEAN has_focus;
|
||||
} rec_request;
|
||||
struct
|
||||
{
|
||||
int new_row_height;
|
||||
BOOLEAN refused;
|
||||
} row_size;
|
||||
struct
|
||||
{
|
||||
long record;
|
||||
} rec_allocate;
|
||||
struct
|
||||
{
|
||||
long record;
|
||||
} rec_free;
|
||||
struct
|
||||
{
|
||||
long record;
|
||||
int percent;
|
||||
} get_percent;
|
||||
struct
|
||||
{
|
||||
char *text;
|
||||
int len;
|
||||
int icon_rid;
|
||||
unsigned long attrib;
|
||||
COLOR color;
|
||||
COLOR back_color;
|
||||
FONT *font;
|
||||
XVT_FNTID font_id;
|
||||
BOOLEAN button;
|
||||
BOOLEAN button_on_left;
|
||||
BOOLEAN button_on_focus;
|
||||
int button_icon_rid;
|
||||
} text;
|
||||
BOOLEAN refused;
|
||||
struct
|
||||
{
|
||||
int ch;
|
||||
BOOLEAN shift;
|
||||
BOOLEAN control;
|
||||
BOOLEAN is_paste;
|
||||
BOOLEAN refused;
|
||||
} chr;
|
||||
struct
|
||||
{
|
||||
BOOLEAN dbl_click;
|
||||
BOOLEAN selected;
|
||||
BOOLEAN refused;
|
||||
BOOLEAN shift;
|
||||
BOOLEAN control;
|
||||
int column;
|
||||
} select;
|
||||
struct
|
||||
{
|
||||
BOOLEAN shift;
|
||||
BOOLEAN control;
|
||||
} cell_btn;
|
||||
struct
|
||||
{
|
||||
int new_col_nbr;
|
||||
BOOLEAN in_fixed;
|
||||
int new_col_width;
|
||||
int new_col_pixel_width;
|
||||
BOOLEAN refused;
|
||||
} column;
|
||||
/* nothing for LM_CB_CHANGE */
|
||||
} v;
|
||||
} LM_CB_DATA;
|
||||
|
||||
typedef void (*LM_CB)(LM_CB_DATA *lm_cb_data);
|
||||
|
||||
#define LM_COL_ATR_ENABLED XI_ATR_ENABLED
|
||||
#define LM_COL_ATR_EDITMENU XI_ATR_EDITMENU
|
||||
#define LM_COL_ATR_AUTOSELECT XI_ATR_AUTOSELECT
|
||||
#define LM_COL_ATR_AUTOSCROLL XI_ATR_AUTOSCROLL
|
||||
#define LM_COL_ATR_RJUST XI_ATR_RJUST
|
||||
#define LM_COL_ATR_READONLY XI_ATR_READONLY
|
||||
#define LM_COL_ATR_PASSWORD XI_ATR_PASSWORD
|
||||
#define LM_COL_ATR_SELECTED XI_ATR_SELECTED
|
||||
#define LM_COL_ATR_SELECTABLE XI_ATR_SELECTABLE
|
||||
#define LM_COL_ATR_COL_SELECTABLE XI_ATR_COL_SELECTABLE
|
||||
#define LM_COL_ATR_VISIBLE XI_ATR_VISIBLE
|
||||
|
||||
#define LM_ROW_ATR_ENABLED XI_ATR_ENABLED
|
||||
#define LM_ROW_ATR_SELECTED XI_ATR_SELECTED
|
||||
|
||||
#define LM_CELL_ATR_SELECTED XI_ATR_SELECTED
|
||||
#define LM_CELL_ATR_RJUST XI_ATR_RJUST
|
||||
#define LM_CELL_ATR_HCENTER XI_ATR_HCENTER
|
||||
|
||||
typedef struct _lm_column_data
|
||||
{
|
||||
unsigned long attrib;
|
||||
short pix_width;
|
||||
short x_pix_pos;
|
||||
short text_offset; /* offset into row text buffer */
|
||||
short text_size;
|
||||
char *heading_text;
|
||||
short width;
|
||||
BOOLEAN center_heading;
|
||||
BOOLEAN heading_well;
|
||||
BOOLEAN heading_platform;
|
||||
BOOLEAN column_well;
|
||||
BOOLEAN column_platform;
|
||||
FONT_OBJ *font;
|
||||
int icon_rid;
|
||||
short icon_x;
|
||||
short icon_y;
|
||||
BOOLEAN size_rows;
|
||||
BOOLEAN suppress_update_heading;
|
||||
BOOLEAN suppress_update_cells;
|
||||
BOOLEAN vertical_align_center;
|
||||
BOOLEAN vertical_align_bottom;
|
||||
BOOLEAN wrap_text;
|
||||
BOOLEAN auto_tab;
|
||||
|
||||
/* temporary variables - don't assume this is good */
|
||||
RCT column_rct; /* used for caching column rectangles to speed drawing */
|
||||
RCT prct; /* physical rect */
|
||||
BOOLEAN needs_update;
|
||||
} LM_COLUMN_DATA;
|
||||
|
||||
typedef struct _lm_column_def
|
||||
{
|
||||
unsigned long attrib;
|
||||
short position;
|
||||
short pix_width; /* pixels */
|
||||
short text_size;
|
||||
char *heading_text;
|
||||
BOOLEAN center_heading;
|
||||
BOOLEAN heading_well;
|
||||
BOOLEAN heading_platform;
|
||||
BOOLEAN column_well;
|
||||
BOOLEAN column_platform;
|
||||
FONT_OBJ *font;
|
||||
int icon_rid;
|
||||
short icon_x;
|
||||
short icon_y;
|
||||
BOOLEAN size_rows;
|
||||
BOOLEAN suppress_update_heading;
|
||||
BOOLEAN suppress_update_cells;
|
||||
BOOLEAN vertical_align_center;
|
||||
BOOLEAN vertical_align_bottom;
|
||||
BOOLEAN wrap_text;
|
||||
BOOLEAN auto_tab;
|
||||
} LM_COLUMN_DEF;
|
||||
|
||||
typedef struct _lm_def
|
||||
{
|
||||
int cid;
|
||||
XI_OBJ *list_obj;
|
||||
XI_OBJ *itf_obj;
|
||||
|
||||
/* XI may specify this */
|
||||
PNT pnt;
|
||||
short pixel_height;
|
||||
/* If absolute height is set, then the height of the list will be exactly height pixels high */
|
||||
BOOLEAN absolute_height;
|
||||
short pixel_width;
|
||||
|
||||
short pix_char_width;
|
||||
unsigned long attrib;
|
||||
LM_CB lm_cb;
|
||||
FONT_OBJ *font;
|
||||
COLOR back_color;
|
||||
COLOR enabled_color; /* but inactive */
|
||||
COLOR disabled_color;
|
||||
COLOR active_color;
|
||||
COLOR active_back_color;
|
||||
COLOR disabled_back_color;
|
||||
COLOR white_space_color;
|
||||
COLOR rule_color;
|
||||
char *parent;
|
||||
BOOLEAN no_heading;
|
||||
BOOLEAN one_row_list;
|
||||
int nbr_rows;
|
||||
int realized_rows_array_len;
|
||||
BOOLEAN sizable_columns;
|
||||
BOOLEAN movable_columns;
|
||||
short fixed_columns;
|
||||
short min_cell_height;
|
||||
short min_heading_height;
|
||||
BOOLEAN no_horz_lines;
|
||||
BOOLEAN no_vert_lines;
|
||||
int first_vis_column;
|
||||
BOOLEAN drop_and_delete;
|
||||
BOOLEAN select_cells;
|
||||
BOOLEAN fixed_row_height;
|
||||
BOOLEAN sizable_rows;
|
||||
BOOLEAN get_all_records;
|
||||
BOOLEAN keep_all_records;
|
||||
BOOLEAN resize_with_window;
|
||||
int horz_sync_list;
|
||||
int vert_sync_list;
|
||||
BOOLEAN row_focus_border;
|
||||
COLOR row_focus_border_color;
|
||||
int max_lines_in_cell;
|
||||
BOOLEAN single_select;
|
||||
BOOLEAN retain_back_color_on_select;
|
||||
} LM_DEF;
|
||||
|
||||
#define LM_HEADING_TEXT 1001
|
||||
|
||||
typedef enum
|
||||
{
|
||||
LM_LIST,
|
||||
LM_ROW,
|
||||
LM_COLUMN,
|
||||
LM_CELL
|
||||
}
|
||||
LM_PART;
|
||||
|
||||
typedef struct _lm_cell_data
|
||||
{
|
||||
unsigned long attrib;
|
||||
FONT_OBJ *font;
|
||||
COLOR color;
|
||||
COLOR back_color;
|
||||
int icon_rid;
|
||||
BOOLEAN button;
|
||||
BOOLEAN button_on_left;
|
||||
BOOLEAN button_on_focus;
|
||||
int button_icon_rid;
|
||||
BOOLEAN valid_data;
|
||||
|
||||
/* multiline cell info */
|
||||
char *string;
|
||||
int pix_width;
|
||||
int nbr_lines;
|
||||
int *line_breaks;
|
||||
int font_height;
|
||||
} LM_CELL_DATA;
|
||||
|
||||
typedef struct _lm_data
|
||||
{
|
||||
int cid;
|
||||
WINDOW win;
|
||||
RCT rct;
|
||||
short pix_top;
|
||||
short pix_hdr_bottom;
|
||||
short pix_row1_top;
|
||||
short pix_char_width;
|
||||
short pix_cell_height;
|
||||
short pix_row_spacing;
|
||||
unsigned long attrib;
|
||||
short nbr_columns;
|
||||
LM_COLUMN_DATA * *lm_column_data;
|
||||
COLOR back_color;
|
||||
COLOR enabled_color; /* but inactive */
|
||||
COLOR disabled_color;
|
||||
COLOR disabled_back_color;
|
||||
COLOR active_color;
|
||||
COLOR active_back_color;
|
||||
COLOR white_space_color;
|
||||
COLOR rule_color;
|
||||
BOOLEAN no_heading;
|
||||
BOOLEAN sizable_columns;
|
||||
BOOLEAN movable_columns;
|
||||
short fixed_columns;
|
||||
short pixel_width;
|
||||
short pixel_height;
|
||||
BOOLEAN moving_column;
|
||||
BOOLEAN sizing_column;
|
||||
int column_being_sized;
|
||||
short min_cell_height;
|
||||
short min_heading_height;
|
||||
BOOLEAN no_horz_lines;
|
||||
BOOLEAN no_vert_lines;
|
||||
BOOLEAN drop_and_delete;
|
||||
BOOLEAN select_cells;
|
||||
BOOLEAN selecting_text;
|
||||
BOOLEAN sizing_row;
|
||||
BOOLEAN resize_with_window;
|
||||
int row_being_sized;
|
||||
int horz_sync_list;
|
||||
int vert_sync_list;
|
||||
BOOLEAN row_focus_border;
|
||||
COLOR row_focus_border_color;
|
||||
int max_lines_in_cell;
|
||||
BOOLEAN single_select;
|
||||
BOOLEAN retain_back_color_on_select;
|
||||
|
||||
/*
|
||||
The following fields contain state information about focus and the
|
||||
list. If txt is not NULL, then editing is currently happening.
|
||||
If txt_is_invisible is TRUE, then editing is suspended because the cell
|
||||
with the focus is not visible, but could be at any point in time.
|
||||
The fields after txt_is_invisible contain state information about
|
||||
restarting editing if the focus becomes visible.
|
||||
*/
|
||||
TXT_DATA *txt;
|
||||
BOOLEAN txt_is_invisible;
|
||||
long focus_rec;
|
||||
long saved_focus_rec;
|
||||
BOOLEAN focus_rec_is_above;
|
||||
COLOR focus_rec_color;
|
||||
unsigned long focus_rec_attrib;
|
||||
int focus_rec_height;
|
||||
char *focus_cell_text;
|
||||
int focus_cell_ip1;
|
||||
int focus_cell_ip2;
|
||||
|
||||
/* run time data */
|
||||
LM_CB lm_cb;
|
||||
XI_OBJ *list_obj;
|
||||
XI_OBJ *itf_obj;
|
||||
FONT_OBJ *font;
|
||||
short text_size;
|
||||
BOOLEAN have_mouse;
|
||||
int column_being_moved;
|
||||
int last_x;
|
||||
int last_y;
|
||||
BOOLEAN down_in_hscrolling;
|
||||
BOOLEAN in_hscrolling;
|
||||
BOOLEAN last_in_hscrolling;
|
||||
int org_x;
|
||||
int org_y;
|
||||
int ascent;
|
||||
int descent;
|
||||
int leading;
|
||||
BOOLEAN selecting_cells;
|
||||
int down_row;
|
||||
int down_column;
|
||||
int cur_row;
|
||||
int cur_column;
|
||||
BOOLEAN down_on_disabled;
|
||||
int delta_x;
|
||||
int first_vis;
|
||||
int last_vis;
|
||||
int vir_left;
|
||||
int vir_right;
|
||||
BOOLEAN btn_down; /* or up */
|
||||
BOOLEAN down_in_btn;
|
||||
int btn_down_row;
|
||||
int btn_down_col;
|
||||
int update_rows_at_top;
|
||||
int update_rows_at_bottom;
|
||||
BOOLEAN update_cells_only;
|
||||
BOOLEAN text_scrolling;
|
||||
int old_row_height;
|
||||
BOOLEAN horizontally_scrolling_list;
|
||||
|
||||
/* vertical scrolling information */
|
||||
RCT mlr;
|
||||
int mlr_height;
|
||||
int rrr_offset; /* offset of mlr */
|
||||
int rrr_bottom; /* total number of vertical pixels in realized row rect */
|
||||
int nbr_rows; /* visible, specified by XI */
|
||||
int realized_rows_array_len; /* also specified by XI */
|
||||
int nbr_realized_rows; /* number of rows actually used in realized row array */
|
||||
int first_fully_vis;
|
||||
int last_fully_vis;
|
||||
BOOLEAN fixed_row_height;
|
||||
BOOLEAN sizable_rows;
|
||||
BOOLEAN get_all_records;
|
||||
BOOLEAN keep_all_records;
|
||||
|
||||
/* the following arrays are all allocated to the length of realized_rows_array_len */
|
||||
long *recs;
|
||||
int *pix_offsets; /* pixel offsets of each row */
|
||||
int *pix_heights; /* pixel heights of each row */
|
||||
BOOLEAN *set_heights;
|
||||
char **buffer;
|
||||
unsigned long *row_attribs;
|
||||
COLOR *row_colors;
|
||||
LM_CELL_DATA * *cell_data;
|
||||
|
||||
} LM_DATA;
|
||||
|
||||
#define NULL_LM (LM)0
|
||||
|
||||
/*
|
||||
There are several intrinsic functions having to do with focus.
|
||||
1. Put focus on the list, start editing
|
||||
Example: starting editing on the list when the focus moves to the list
|
||||
from some other place in XI.
|
||||
lm_start_edit
|
||||
2. Move the focus from one cell on the list to another, make visible if not.
|
||||
Example: tabing from one cell to another.
|
||||
lm_make_invis
|
||||
lm_force_vis
|
||||
lm_make_vis
|
||||
3. Possible transition of the focus from visible to invisible or from
|
||||
invisible to visible.
|
||||
Example: operating the horizontal or vertical scroll bar.
|
||||
Example: resizing the list.
|
||||
lm_make_invis
|
||||
lm_make_vis
|
||||
4. Stop editing, remove focus from the list altogether.
|
||||
Example: stopping editing when the focus moves elsewhere in XI.
|
||||
lm_stop_edit
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
Activities to test
|
||||
1. Resize list
|
||||
2. Resize column
|
||||
3. Move columns around
|
||||
4. Add columns
|
||||
5. Delete columns
|
||||
6. xi_cell_request
|
||||
7. Tab around
|
||||
8. Horizontal scroll
|
||||
9. Vertical scroll
|
||||
10. Drop horizontal thumb
|
||||
11. Drop vertical thumb
|
||||
12. Select range of cells
|
||||
13. Set font on range of cells
|
||||
14. Click on partially vis column
|
||||
15. Size row
|
||||
16. Change wrapping of text in cell
|
||||
*/
|
||||
|
||||
typedef struct _lm_scroll_arg
|
||||
{
|
||||
LM lm;
|
||||
int nbr_lines;
|
||||
int percent;
|
||||
BOOLEAN same_cell;
|
||||
long rec;
|
||||
BOOLEAN have_rec;
|
||||
COLOR color;
|
||||
unsigned long attrib;
|
||||
int row_height;
|
||||
BOOLEAN rec_at_top;
|
||||
int pixels_scrolled; /* this is a return value from lm_scroll */
|
||||
} LM_SCROLL_ARG;
|
||||
|
||||
|
||||
void calculate_pix_offsets(LM_DATA *lmp, BOOLEAN draw_changes );
|
||||
void calculate_visibles(LM_DATA *lmp);
|
||||
void calc_x_pix_pos( LM lm, LM_COLUMN_DATA *lcdata, int position);
|
||||
BOOLEAN do_lm_cb(LM lm, LM_CB_TYPE cb_reason, int row, int column,
|
||||
EVENT *ep, int *percent, int pixels);
|
||||
BOOLEAN do_lm_cb_get(LM lm, LM_CB_TYPE cb_reason, long *spec_rec,
|
||||
long *data_rec, int percent, COLOR *color,
|
||||
unsigned long *attrib, int *row_height);
|
||||
void do_lm_cb_text(LM_DATA *lmp, int row, int col, BOOLEAN preserve_focus );
|
||||
void do_scroll_bar(XI_LIST_DATA *listdata);
|
||||
BOOLEAN lm_adj_h(LM_DATA *lmp, short *h);
|
||||
void lm_allocate_rec_info(LM_DATA *lmp, int realized_rows_array_len);
|
||||
void lm_calc_last_vis(LM_DATA *lmp);
|
||||
int lm_calculate_row_height(LM_DATA *lmp, int row);
|
||||
BOOLEAN lm_cell_has_focus( LM_DATA* lmp, int row, int column,
|
||||
BOOLEAN is_vert_scrolled );
|
||||
void lm_cell_request( LM lm, LM_PART lm_part, int idx1, int idx2);
|
||||
void lm_column_set_pixel_width(LM lm, int idx, int width);
|
||||
LM lm_create( WINDOW win, LM_DEF *lm_def, void *parent);
|
||||
void lm_create_column( LM lm, LM_COLUMN_DEF *lm_column_def,
|
||||
BOOLEAN do_cell_requests, BOOLEAN in_hscrolling);
|
||||
void lm_delete(LM lm);
|
||||
void lm_delete_column(LM lm, int column_nbr, BOOLEAN adjust_hscrolling);
|
||||
BOOLEAN lm_delete_row(LM lm, int row);
|
||||
void lm_draw_line(LM_DATA *lmp, PNT p, BOOLEAN adj_v, BOOLEAN adj_h);
|
||||
int lm_event(LM lm, EVENT *ep);
|
||||
void lm_focus_cb( long lm, int row, int column, BOOLEAN invisible,
|
||||
BOOLEAN set);
|
||||
void lm_force_vis(LM_DATA *lmp);
|
||||
unsigned long lm_get_attrib( LM lm, LM_PART lm_part, int idx, int idx2,
|
||||
BOOLEAN invisible );
|
||||
int lm_get_buf_size(LM lm, LM_PART part, int idx);
|
||||
int lm_get_cid(LM lm);
|
||||
RCT * lm_get_cell_rect( RCT *rctp, LM lm, int row, int col, BOOLEAN inner,
|
||||
BOOLEAN physical_rct);
|
||||
int lm_get_col_spacing(void);
|
||||
int lm_get_fixed_columns( LM lm );
|
||||
void lm_get_focus_cell( LM_DATA *lmp, int *rowp, int *columnp,
|
||||
BOOLEAN* is_vert_scrolled );
|
||||
int lm_get_left_most_far_right_col(LM_DATA *lmp, int nbr_columns);
|
||||
long* lm_get_list_info(LM lm, int *nbr_recs);
|
||||
XI_OBJ* lm_get_list_obj(LM lm);
|
||||
RCT* lm_get_list_rct(LM_DATA *lmp, RCT *r);
|
||||
void lm_get_metrics( XI_OBJ_DEF *obj_def, int *hborder, int *column_div,
|
||||
int *list_bottom);
|
||||
RCT* lm_get_rect(LM lm, LM_PART part, int idx, RCT *rct);
|
||||
RCT* lm_get_row_rect(RCT *rctp, LM lm, int row);
|
||||
void lm_get_sel(LM lm, int *c1, int *c2);
|
||||
char* lm_get_text( LM lm, char *s, int len, int row, int column,
|
||||
BOOLEAN invisible );
|
||||
void lm_get_vertical_metrics( XI_OBJ_DEF* obj_def, int* first_row_y,
|
||||
int* row_spacing, int *client_height,
|
||||
int* title_height );
|
||||
void lm_get_visible_columns(LM lm, int *first_vis, int *last_vis);
|
||||
int lm_get_visible_rows(LM lm, int *first_vis, int *last_vis);
|
||||
void lm_hscroll(LM lm, int nbr_columns, int pos);
|
||||
BOOLEAN lm_insert_row(LM lm, int row);
|
||||
BOOLEAN lm_is_cell_visible(LM_DATA *lmp, int focus_row, int focus_column,
|
||||
BOOLEAN use_txt_is_visible, BOOLEAN *is_hscrolled);
|
||||
|
||||
void lm_invalidate_rect(LM_DATA *lmp, RCT *rctp, BOOLEAN adj_h);
|
||||
void lm_invalidate_rect2( LM_DATA *lmp, RCT *rct_to_invalidate,
|
||||
BOOLEAN adj_left);
|
||||
void lm_invalidate_rows( LM lm, int row_start, int row_end,
|
||||
BOOLEAN invalidate);
|
||||
void lm_invalidate_rows_internal(LM lm, int row_start, int row_end,
|
||||
BOOLEAN redraw, int column,
|
||||
BOOLEAN preserve_focus_text );
|
||||
BOOLEAN lm_list_has_focus(LM_DATA *lmp);
|
||||
void lm_local_hscroll(LM lm, int nbr_columns);
|
||||
void lm_make_invis(LM_DATA *lmp);
|
||||
void lm_make_vis(LM_DATA *lmp);
|
||||
void lm_move_event(LM_DATA *lmp, EVENT *ep);
|
||||
void lm_move_to(LM_DATA *lmp, PNT p, BOOLEAN adj_v, BOOLEAN adj_h);
|
||||
void lm_recalc_metrics(LM lm);
|
||||
void lm_redraw_row(LM_DATA *lmp, int row, BOOLEAN update );
|
||||
void lm_remove_all_rows( LM_DATA far* lm, BOOLEAN delete_focus );
|
||||
BOOLEAN lm_row_has_focus( LM_DATA *lmp, int row, BOOLEAN is_vert_scrolled);
|
||||
int lm_scroll(LM_SCROLL_ARG *arg);
|
||||
void lm_scroll_rect(LM_DATA *lmp, RCT *rctp, int dh, int dv);
|
||||
void lm_set_fixed_columns( LM lm, int new_fixed_count );
|
||||
void lm_set_focus_cell( LM_DATA *lmp, int row, int column,
|
||||
BOOLEAN is_vert_scrolled );
|
||||
void lm_set_attrib( LM lm, LM_PART lm_part, int idx, int idx2,
|
||||
BOOLEAN invisible, unsigned long attrib,
|
||||
int half_baked);
|
||||
void lm_set_buf_size(LM lm, LM_PART part, int idx, int size);
|
||||
void lm_set_column_width(LM lm, int idx, int width);
|
||||
void lm_set_color( LM lm, LM_PART part, int row, int column,
|
||||
BOOLEAN invisible, COLOR color, BOOLEAN half_baked);
|
||||
void lm_set_fixed_columns( LM lm, int new_fixed_count );
|
||||
void lm_set_hscroll_bar(LM lm);
|
||||
void lm_set_hscroll_range(LM lm);
|
||||
void lm_set_icon(LM lm, int icon_rid, int row, int column);
|
||||
void lm_set_focus(LM lm, int row, int column);
|
||||
void lm_set_focus_text( LM_DATA* lmp, const char* new_text );
|
||||
void lm_set_font(LM lm, LM_PART part, int idx, int idx2, FONT_OBJ *font);
|
||||
void lm_set_list_size(LM lm, int height, int width);
|
||||
void lm_set_row_height(LM lm, int row, int height, BOOLEAN set_height,
|
||||
int old_height, BOOLEAN only_update);
|
||||
void lm_set_sel( LM lm, int row, int column, BOOLEAN invisible, int c1,
|
||||
int c2 );
|
||||
void lm_set_text(LM lm, char *s, int row, int column, BOOLEAN invisible);
|
||||
void lm_size_event(LM_DATA *lmp, EVENT *ep);
|
||||
void lm_text_scrolling(XI_OBJ *xi_obj);
|
||||
void lm_wrap_text(LM_DATA *lmp, int row, int col, BOOLEAN set_font);
|
||||
int lm_make_rrr_room_pix(LM_DATA *lmp, int pixels, BOOLEAN do_redraw );
|
||||
BOOLEAN navigate_char_event(LM lm, EVENT *ep);
|
||||
void redraw_cell(LM lm, int row, int col, BOOLEAN update );
|
||||
void select_row( LM lm, int row, int column, BOOLEAN dbl_click );
|
||||
void draw_cell_range( LM_DATA* lmp, int first_row, int last_row,
|
||||
int first_col, int last_col,
|
||||
BOOLEAN in_event_update );
|
||||
|
||||
|
||||
|
||||
#define LMP(l) ((LM_DATA *)(l))
|
||||
|
||||
#if XVT_OS == XVT_OS_CTOS
|
||||
#define RULE_Y_OFFSET_TOP ((npctos_env == CHSERVICE) ? 0 : 1)
|
||||
#define RULE_Y_OFFSET_BOTTOM ((npctos_env == CHSERVICE) ? 0 : 1)
|
||||
#define BORDER_WIDTH ((npctos_env == CHSERVICE) ? 8 : 2)
|
||||
#define RULE_WIDTH_V ((npctos_env == CHSERVICE) ? 8 : 1)
|
||||
#define RULE_WIDTH_H ((npctos_env == CHSERVICE) ? 0 : 1)
|
||||
#define HPIX_PER_CH 8
|
||||
#define VPIX_PER_CH 8
|
||||
#define WIDTHLOOP(idx, wid) for (idx = 0; idx < wid; idx++)
|
||||
#else
|
||||
#if XIWS == WMWS
|
||||
#define RULE_Y_OFFSET_TOP 0
|
||||
#define RULE_Y_OFFSET_BOTTOM 0
|
||||
#define BORDER_WIDTH 8
|
||||
#define RULE_WIDTH_V 8 /* width of vertical lines */
|
||||
#define RULE_WIDTH_H 0 /* width of horz lines */
|
||||
#define HPIX_PER_CH 8
|
||||
#define VPIX_PER_CH 8
|
||||
#else
|
||||
#define RULE_Y_OFFSET_TOP 1
|
||||
#define RULE_Y_OFFSET_BOTTOM 1
|
||||
#define BORDER_WIDTH 2
|
||||
#define RULE_WIDTH_V 1
|
||||
#define RULE_WIDTH_H 1
|
||||
#define WIDTHLOOP(idx, wid) for (idx = 0; idx < wid; idx++)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define ROW_IS_ENABLED(lm, row) (LMP(lm)->row_attribs[row] & LM_ROW_ATR_ENABLED)
|
||||
#define CELL_IS_ENABLED(lm, row, col) (LIST_IS_ENABLED(lm) && ROW_IS_ENABLED(lm, row) && COLUMN_IS_ENABLED(lm, col))
|
||||
#else
|
||||
#define CELL_IS_ENABLED(lm, row, col) (LIST_IS_ENABLED(lm) && COLUMN_IS_ENABLED(lm, col))
|
||||
#endif
|
||||
#define CELL_IS_SELECTED(lm, row, col) ((LMP(lm)->row_attribs[row] & LM_ROW_ATR_SELECTED) || (LMP(lm)->lm_column_data[col]->attrib & LM_COL_ATR_SELECTED) || \
|
||||
(LMP(lm)->cell_data[row][col].attrib & LM_CELL_ATR_SELECTED))
|
||||
#define CELL_IS_SELECTABLE(lm, row, col) (LMP(lm)->lm_column_data[col]->attrib & LM_COL_ATR_SELECTABLE)
|
||||
#define LIST_IS_ENABLED(lm) ((LMP(lm)->attrib & (LM_ATR_ENABLED | LM_ATR_VISIBLE)) == (LM_ATR_ENABLED | LM_ATR_VISIBLE))
|
||||
#define COLUMN_IS_ENABLED(lm, col) (LMP(lm)->lm_column_data[col]->attrib & LM_COL_ATR_ENABLED)
|
||||
#define COLUMN_IS_SELECTABLE(lm, col) (LMP(lm)->lm_column_data[col]->attrib & LM_COL_ATR_COL_SELECTABLE)
|
||||
#define COLUMN_IS_SELECTED(lm, col) (LMP(lm)->lm_column_data[col]->attrib & LM_COL_ATR_SELECTED)
|
||||
|
4913
xi/xilm2.c
Executable file
4913
xi/xilm2.c
Executable file
File diff suppressed because it is too large
Load Diff
1140
xi/xistx.c
Executable file
1140
xi/xistx.c
Executable file
File diff suppressed because it is too large
Load Diff
139
xi/xistx.h
Executable file
139
xi/xistx.h
Executable file
@ -0,0 +1,139 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 1991-1995 by ORCA Software, Inc. *
|
||||
* *
|
||||
* All rights reserved. May not be reproduced or distributed, in printed or *
|
||||
* electronic form, without permission of ORCA Software, Inc. *
|
||||
*******************************************************************************/
|
||||
|
||||
/******************************************************************
|
||||
STX module
|
||||
******************************************************************/
|
||||
#define NULL_STX (STX)0
|
||||
|
||||
#define STX_ATR_ENABLED XI_ATR_ENABLED
|
||||
#define STX_ATR_EDITMENU XI_ATR_EDITMENU
|
||||
#define STX_ATR_AUTOSELECT XI_ATR_AUTOSELECT
|
||||
#define STX_ATR_AUTOSCROLL XI_ATR_AUTOSCROLL
|
||||
#define STX_ATR_RJUST XI_ATR_RJUST
|
||||
#define STX_ATR_BORDER XI_ATR_BORDER
|
||||
#define STX_ATR_VISIBLE XI_ATR_VISIBLE
|
||||
#define STX_ATR_READONLY XI_ATR_READONLY
|
||||
#define STX_ATR_PASSWORD XI_ATR_PASSWORD
|
||||
|
||||
typedef enum
|
||||
{
|
||||
STX_CB_CHAR,
|
||||
STX_CB_CHANGE,
|
||||
STX_CB_DBL,
|
||||
STX_CB_FOCUS
|
||||
}
|
||||
STX_CB_TYPE;
|
||||
|
||||
typedef struct _stx_cb_data
|
||||
{
|
||||
STX stx;
|
||||
STX_CB_TYPE cb_type;
|
||||
int cid;
|
||||
WINDOW win;
|
||||
union
|
||||
{
|
||||
/* nothing for change notify */
|
||||
BOOLEAN refused;
|
||||
struct
|
||||
{
|
||||
int ch;
|
||||
BOOLEAN shift;
|
||||
BOOLEAN control;
|
||||
BOOLEAN is_paste;
|
||||
BOOLEAN refused;
|
||||
} chr;
|
||||
} v;
|
||||
} STX_CB_DATA;
|
||||
|
||||
typedef void (*STX_CB)(STX_CB_DATA *stx_cb_data);
|
||||
|
||||
typedef struct _stx_def
|
||||
{
|
||||
int cid;
|
||||
PNT pnt;
|
||||
short pixel_width;
|
||||
short pix_char_width;
|
||||
unsigned long attrib;
|
||||
short text_size;
|
||||
FONT_OBJ font;
|
||||
COLOR back_color;
|
||||
COLOR enabled_color; /* but inactive */
|
||||
COLOR disabled_color;
|
||||
COLOR active_color;
|
||||
COLOR active_back_color;
|
||||
COLOR disabled_back_color;
|
||||
COLOR hilight_color; /* for well and platform fields */
|
||||
COLOR shadow_color; /* for well and platform fields */
|
||||
XI_RCT xi_rct;
|
||||
STX_CB stx_cb;
|
||||
long app_data;
|
||||
char *parent;
|
||||
BOOLEAN well;
|
||||
BOOLEAN platform;
|
||||
BOOLEAN auto_tab;
|
||||
} STX_DEF;
|
||||
|
||||
typedef struct _stx_data
|
||||
{
|
||||
int cid;
|
||||
WINDOW win;
|
||||
RCT rct;
|
||||
unsigned long attrib;
|
||||
short pix_baseline;
|
||||
FONT_OBJ font;
|
||||
COLOR back_color;
|
||||
COLOR enabled_color; /* but inactive */
|
||||
COLOR disabled_color;
|
||||
COLOR disabled_back_color;
|
||||
COLOR active_color;
|
||||
COLOR active_back_color;
|
||||
COLOR hilight_color; /* for well and platform fields */
|
||||
COLOR shadow_color; /* for well and platform fields */
|
||||
STX_CB stx_cb;
|
||||
short text_size;
|
||||
char *text;
|
||||
BOOLEAN has_focus;
|
||||
TXT_DATA *txt;
|
||||
long app_data;
|
||||
BOOLEAN have_mouse;
|
||||
BOOLEAN use_text_edit;
|
||||
TXEDIT txedit;
|
||||
BOOLEAN well;
|
||||
BOOLEAN platform;
|
||||
BOOLEAN auto_tab;
|
||||
char *buf;
|
||||
long timer_id;
|
||||
BOOLEAN timer_set;
|
||||
} STX_DATA;
|
||||
|
||||
#define STX_LOSE_FOCUS NULL_STX
|
||||
|
||||
STX stx_create(WINDOW win, STX_DEF *stx_def);
|
||||
void stx_delete(STX stx);
|
||||
BOOLEAN stx_event(STX stx, EVENT *ep);
|
||||
void stx_focus_cb(long stx, BOOLEAN set);
|
||||
unsigned long stx_get_attrib(STX stx);
|
||||
int stx_get_cid(STX stx);
|
||||
long stx_get_app_data(STX stx);
|
||||
void stx_get_sel(STX stx, int *c1, int *c2);
|
||||
RCT* stx_get_rect(STX stx, RCT *rct);
|
||||
RCT* stx_get_inside_rect( STX stx, RCT* rect );
|
||||
char* stx_get_text(STX stx, char *s, int len);
|
||||
TXEDIT stx_get_txedit(STX stx);
|
||||
void stx_set_app_data(STX stx, long data);
|
||||
void stx_set_attrib(STX stx, unsigned long attrib);
|
||||
void stx_set_bufsize(STX stx, short size);
|
||||
void stx_set_focus(STX stx);
|
||||
void stx_set_pos(STX stx, PNT p);
|
||||
void stx_set_sel(STX stx, int c1, int c2);
|
||||
void stx_set_text(STX stx, char *s);
|
||||
|
||||
|
||||
|
||||
|
||||
|
1419
xi/xitext.c
Executable file
1419
xi/xitext.c
Executable file
File diff suppressed because it is too large
Load Diff
102
xi/xitext.h
Executable file
102
xi/xitext.h
Executable file
@ -0,0 +1,102 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 1991-1995 by ORCA Software, Inc. *
|
||||
* *
|
||||
* All rights reserved. May not be reproduced or distributed, in printed or *
|
||||
* electronic form, without permission of ORCA Software, Inc. *
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef TXT_INCLUDED
|
||||
#define TXT_INCLUDED
|
||||
|
||||
typedef long TXT;
|
||||
#define NULL_TXT (TXT)0
|
||||
|
||||
#define TXT_ATR_ENABLED XI_ATR_ENABLED
|
||||
#define TXT_ATR_EDITMENU XI_ATR_EDITMENU
|
||||
#define TXT_ATR_AUTOSCROLL XI_ATR_AUTOSCROLL
|
||||
#define TXT_ATR_AUTOSELECT XI_ATR_AUTOSELECT
|
||||
#define TXT_ATR_RJUST XI_ATR_RJUST
|
||||
#define TXT_ATR_BORDER XI_ATR_BORDER
|
||||
#define TXT_ATR_VISIBLE XI_ATR_VISIBLE
|
||||
#define TXT_ATR_FOCUSBORDER XI_ATR_FOCUSBORDER
|
||||
#define TXT_ATR_READONLY XI_ATR_READONLY
|
||||
|
||||
#define TXT_FLAG_TEXT 0x1 /* text has changed */
|
||||
#define TXT_FLAG_SELECTION 0x2 /* includes insertion point */
|
||||
#define TXT_FLAG_SCROLL 0x4 /* scroll position has changed */
|
||||
#define TXT_FLAG_OVF 0x8 /* user filled buffer */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TXT_STATE_NULL,
|
||||
TXT_STATE_SELC,
|
||||
TXT_STATE_SELW
|
||||
}
|
||||
TXT_STATE;
|
||||
|
||||
typedef struct _txt_def
|
||||
{
|
||||
/* must be initialized by creator */
|
||||
RCT rct;
|
||||
XI_OBJ *parent_obj;
|
||||
unsigned long attrib;
|
||||
FONT_OBJ *font;
|
||||
COLOR back_color;
|
||||
COLOR fore_color;
|
||||
COLOR hilight_color; /* for well and platform fields */
|
||||
COLOR shadow_color; /* for well and platform fields */
|
||||
short text_size;
|
||||
char *text;
|
||||
short *hit_test;
|
||||
WINDOW win;
|
||||
BOOLEAN well;
|
||||
BOOLEAN platform;
|
||||
BOOLEAN inside_only;
|
||||
BOOLEAN auto_tab;
|
||||
long timer_id;
|
||||
BOOLEAN timer_set;
|
||||
|
||||
/* initialized by txt_reset */
|
||||
short pix_baseline;
|
||||
unsigned short flags;
|
||||
TXT_STATE state;
|
||||
short selstart, selstop;
|
||||
short scroll_pos;
|
||||
short select_start;
|
||||
short string_xpos;
|
||||
short len;
|
||||
BOOLEAN hasfocus;
|
||||
short ascent;
|
||||
short descent;
|
||||
short leading;
|
||||
} TXT_DATA;
|
||||
/*
|
||||
NOTE: if TXT_ATR_RJUST is set, then scroll_pos indicates how many
|
||||
characters are to the right of the right margin. Otherwise, it indicates
|
||||
how many characters are to the left of the left margin.
|
||||
*/
|
||||
|
||||
|
||||
TXT_DATA *txt_reset(TXT_DATA *txt);
|
||||
BOOLEAN txt_event(TXT_DATA *txt, EVENT *ep, BOOLEAN gaining_focus);
|
||||
unsigned long txt_get_attrib(TXT_DATA *txt);
|
||||
void txt_get_sel(TXT_DATA *txt, int *c1, int *c2);
|
||||
RCT *txt_get_rect(TXT_DATA *txt, RCT *rct);
|
||||
RCT *txt_set_rect(TXT_DATA *txt, RCT *rct);
|
||||
void txt_get_text(TXT_DATA *txt, char *s, int len);
|
||||
void txt_redraw(TXT_DATA *txt, BOOLEAN inside_only);
|
||||
void txt_set_attrib(TXT_DATA *txt, unsigned long attrib);
|
||||
/* turns on/off caret if selstart == selstop */
|
||||
void txt_caret(TXT_DATA *txt, BOOLEAN caret_state);
|
||||
void txt_set_sel(TXT_DATA *txt, int c1, int c2);
|
||||
void txt_set_text(TXT_DATA *txt, char *s);
|
||||
void txt_display_caret(TXT_DATA *txt);
|
||||
void txt_hide_caret(TXT_DATA *txt);
|
||||
#if XIWS == MTFWS
|
||||
void clean_primesel();
|
||||
#endif
|
||||
|
||||
#endif /* TXT_INCLUDED */
|
||||
|
||||
|
||||
|
495
xi/xitree.c
Executable file
495
xi/xitree.c
Executable file
@ -0,0 +1,495 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 1991-1995 by ORCA Software, Inc. *
|
||||
* *
|
||||
* All rights reserved. May not be reproduced or distributed, in printed or *
|
||||
* electronic form, without permission of ORCA Software, Inc. May not be *
|
||||
* distributed as object code, separately or linked with other object modules, *
|
||||
* without permission. *
|
||||
*******************************************************************************/
|
||||
|
||||
/* ERROR CODES 20201-20201 */
|
||||
|
||||
#define XI_INTERNAL
|
||||
|
||||
#include "xi.h"
|
||||
#include "xiheap.h"
|
||||
#include "xiutils.h"
|
||||
|
||||
#ifndef R2
|
||||
#define fatal xvt_dm_post_fatal_exit
|
||||
#endif
|
||||
|
||||
#define PADCHAR ((char)0x8e)
|
||||
#define MAGIC 0xe8
|
||||
|
||||
/*
|
||||
constants to define for more debugging
|
||||
|
||||
PAD - pad allocations with N bytes of magic and check magic number when
|
||||
xi_tree_check_sanity is called
|
||||
FENCE - call xi_tree_check_sanity on every Nth xi_tree_* call
|
||||
PREPAD - put an extra N bytes between the node struct and the data.
|
||||
This padding is never checked.
|
||||
|
||||
sample usage:
|
||||
|
||||
#define PAD 20
|
||||
#define FENCE 10
|
||||
#define PREPAD 10
|
||||
*/
|
||||
/*
|
||||
#define PAD 100
|
||||
#define FENCE 1
|
||||
*/
|
||||
|
||||
typedef struct _tree_node
|
||||
{
|
||||
struct _tree_node *parent;
|
||||
struct _tree_node *sibling;
|
||||
struct _tree_node *child;
|
||||
#if XIWS == MTFWS
|
||||
struct _tree_node *dummy;
|
||||
#endif
|
||||
#ifdef TREEDEBUG
|
||||
int line;
|
||||
char *file;
|
||||
int magic; /* for sanity checks */
|
||||
int size;
|
||||
#ifdef PREPAD
|
||||
char prepad[PREPAD];
|
||||
#endif
|
||||
#endif
|
||||
} TREE_NODE;
|
||||
|
||||
#ifdef TREEDEBUG
|
||||
#undef xi_tree_malloc
|
||||
#undef xi_tree_realloc
|
||||
#define xi_tree_malloc_body xi_tree_malloc_d
|
||||
#define xi_tree_realloc_body xi_tree_realloc_d
|
||||
#define xi_tree_malloc_stub xi_tree_malloc
|
||||
#define xi_tree_realloc_stub xi_tree_realloc
|
||||
#else
|
||||
#define xi_tree_malloc_body xi_tree_malloc
|
||||
#define xi_tree_realloc_body xi_tree_realloc
|
||||
#define xi_tree_malloc_stub xi_tree_malloc_d
|
||||
#define xi_tree_realloc_stub xi_tree_realloc_d
|
||||
#endif
|
||||
|
||||
#define VOIDPTR_TO_TREEPTR(p) ((TREE_NODE *)((char *)(p) - sizeof(TREE_NODE)))
|
||||
#define TREEPTR_TO_VOIDPTR(t) ((void *)((t) + 1))
|
||||
|
||||
#define DBGTAB 3
|
||||
|
||||
static TREE_NODE topnode =
|
||||
{
|
||||
NULL, &topnode, NULL
|
||||
#if XIWS == MTFWS
|
||||
, NULL
|
||||
#endif
|
||||
#ifdef TREEDEBUG
|
||||
, 0, "TOPNODE", MAGIC, 0
|
||||
#endif
|
||||
};
|
||||
static TREE_NODE *top = &topnode;
|
||||
#ifdef TREEDEBUG
|
||||
#ifdef FENCE
|
||||
static int fence_count;
|
||||
#endif
|
||||
static int node_count = 1; /* start with just top node */
|
||||
#endif
|
||||
|
||||
static void
|
||||
dflt_error_fcn(void)
|
||||
{
|
||||
xvt_dm_post_fatal_exit( "xi_tree_memory: Out of memory" );
|
||||
}
|
||||
|
||||
static void (* error_fcn)(void) = dflt_error_fcn;
|
||||
|
||||
#ifdef TREEDEBUG
|
||||
void xi_tree_check_fence(void);
|
||||
void
|
||||
xi_tree_check_fence(void)
|
||||
{
|
||||
#ifdef FENCE
|
||||
static int fence_count;
|
||||
|
||||
fence_count++;
|
||||
if (fence_count % FENCE == 0)
|
||||
xi_tree_check_sanity("FENCE CHECK");
|
||||
#endif
|
||||
}
|
||||
|
||||
static void near
|
||||
adjust_size(size_t *size)
|
||||
{
|
||||
NOREF(size);
|
||||
#ifdef PAD
|
||||
*size += PAD;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void near
|
||||
validate_node(void *p)
|
||||
{
|
||||
if (p != NULL && VOIDPTR_TO_TREEPTR(p)->magic != MAGIC)
|
||||
fatal( "Bad tree node detected: file %s, line %d",
|
||||
VOIDPTR_TO_TREEPTR(p)->file, VOIDPTR_TO_TREEPTR(p)->line );
|
||||
}
|
||||
#endif
|
||||
|
||||
static void near
|
||||
remove_from_siblings_and_parent(TREE_NODE *remove_t)
|
||||
{
|
||||
TREE_NODE *tp;
|
||||
|
||||
/* remove from sibling list */
|
||||
tp = remove_t;
|
||||
while (tp->sibling != remove_t)
|
||||
tp = tp->sibling;
|
||||
tp->sibling = remove_t->sibling;
|
||||
|
||||
/* adjust parent pointers */
|
||||
if (remove_t->parent->child == remove_t)
|
||||
{
|
||||
remove_t->parent->child = ((remove_t->sibling == remove_t) ?
|
||||
NULL : remove_t->sibling);
|
||||
}
|
||||
}
|
||||
|
||||
static void near
|
||||
xi_tree_free_internal(TREE_NODE *remove_t, BOOLEAN toplevel)
|
||||
{
|
||||
TREE_NODE *tp;
|
||||
TREE_NODE *nexttp;
|
||||
|
||||
if (toplevel)
|
||||
{
|
||||
remove_from_siblings_and_parent(remove_t);
|
||||
remove_t->sibling = NULL;
|
||||
}
|
||||
|
||||
/* free all child nodes */
|
||||
tp = remove_t->child;
|
||||
if (tp != NULL)
|
||||
do
|
||||
{
|
||||
/* store next pointer before nuking node */
|
||||
nexttp = tp->sibling;
|
||||
xi_tree_free_internal(tp, FALSE);
|
||||
tp = nexttp;
|
||||
} while (tp != remove_t->child);
|
||||
|
||||
/* free underlying heap manager memory */
|
||||
#ifdef TREEDEBUG
|
||||
heap_free(remove_t->file);
|
||||
node_count--;
|
||||
#endif
|
||||
heap_free(remove_t);
|
||||
}
|
||||
|
||||
void
|
||||
xi_tree_reparent(void *p, void *parent)
|
||||
{
|
||||
TREE_NODE *tn;
|
||||
|
||||
#ifdef TREEDEBUG
|
||||
xi_tree_check_fence();
|
||||
validate_node(p);
|
||||
#endif
|
||||
remove_from_siblings_and_parent(VOIDPTR_TO_TREEPTR(p));
|
||||
tn = VOIDPTR_TO_TREEPTR(p);
|
||||
if (parent == NULL)
|
||||
parent = TREEPTR_TO_VOIDPTR(top);
|
||||
tn->parent = VOIDPTR_TO_TREEPTR(parent);
|
||||
if (tn->parent->child == NULL)
|
||||
{
|
||||
tn->parent->child = tn;
|
||||
tn->sibling = tn;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* insert tn in the sibling list */
|
||||
tn->sibling = tn->parent->child->sibling;
|
||||
tn->parent->child->sibling = tn;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
xi_tree_free(void *p)
|
||||
{
|
||||
#ifdef TREEDEBUG
|
||||
xi_tree_check_fence();
|
||||
validate_node(p);
|
||||
#endif
|
||||
xi_tree_free_internal(VOIDPTR_TO_TREEPTR(p), TRUE);
|
||||
}
|
||||
|
||||
void *
|
||||
xi_tree_get_parent(void *p)
|
||||
{
|
||||
TREE_NODE *parent;
|
||||
|
||||
#ifdef TREEDEBUG
|
||||
validate_node(p);
|
||||
#endif
|
||||
parent = VOIDPTR_TO_TREEPTR(p)->parent;
|
||||
return((parent == top) ? NULL : TREEPTR_TO_VOIDPTR(parent));
|
||||
}
|
||||
|
||||
void *
|
||||
xi_tree_malloc_body(size_t size, void *parent
|
||||
#ifdef TREEDEBUG
|
||||
, int line, char *file
|
||||
#endif
|
||||
)
|
||||
{
|
||||
TREE_NODE *tn;
|
||||
#ifdef TREEDEBUG
|
||||
size_t orig_size = size;
|
||||
|
||||
xi_tree_check_fence();
|
||||
validate_node(parent);
|
||||
adjust_size(&size);
|
||||
#endif
|
||||
tn = (TREE_NODE *)heap_malloc(size + sizeof(TREE_NODE));
|
||||
if (! tn)
|
||||
{
|
||||
(* error_fcn)();
|
||||
return NULL;
|
||||
}
|
||||
#ifdef TREEDEBUG
|
||||
gmemset((char *)tn + sizeof(TREE_NODE) + orig_size,
|
||||
PADCHAR, (long)(size - orig_size));
|
||||
tn->file = (char *)heap_malloc(gstrlen(file) + 1);
|
||||
if (! tn->file)
|
||||
{
|
||||
(* error_fcn)();
|
||||
return NULL;
|
||||
}
|
||||
gstrcpy(tn->file, file);
|
||||
tn->line = line;
|
||||
tn->magic = MAGIC;
|
||||
tn->size = size;
|
||||
node_count++;
|
||||
#endif
|
||||
tn->child = NULL;
|
||||
tn->sibling = tn;
|
||||
if (parent == NULL)
|
||||
parent = TREEPTR_TO_VOIDPTR(top);
|
||||
tn->parent = VOIDPTR_TO_TREEPTR(parent);
|
||||
if (tn->parent->child == NULL)
|
||||
tn->parent->child = tn;
|
||||
else
|
||||
{
|
||||
/* insert tn in the sibling list */
|
||||
tn->sibling = tn->parent->child->sibling;
|
||||
tn->parent->child->sibling = tn;
|
||||
}
|
||||
return(TREEPTR_TO_VOIDPTR(tn));
|
||||
}
|
||||
|
||||
void *
|
||||
xi_tree_realloc_body(void *p, size_t size
|
||||
#ifdef TREEDEBUG
|
||||
, int line, char *file
|
||||
#endif
|
||||
)
|
||||
{
|
||||
TREE_NODE *old_t;
|
||||
TREE_NODE *new_t;
|
||||
TREE_NODE *tp;
|
||||
#ifdef TREEDEBUG
|
||||
size_t orig_size = size;
|
||||
|
||||
xi_tree_check_fence();
|
||||
adjust_size(&size);
|
||||
#endif
|
||||
old_t = VOIDPTR_TO_TREEPTR(p);
|
||||
#ifdef TREEDEBUG
|
||||
validate_node(p);
|
||||
#endif
|
||||
new_t = (TREE_NODE *)heap_realloc(old_t, (size + sizeof(TREE_NODE)));
|
||||
#ifdef TREEDEBUG
|
||||
if (! new_t)
|
||||
{
|
||||
(* error_fcn)();
|
||||
return NULL;
|
||||
}
|
||||
gmemset((char *)new_t + sizeof(TREE_NODE) + orig_size,
|
||||
PADCHAR, (long)(size - orig_size));
|
||||
new_t->line = line;
|
||||
new_t->size = size;
|
||||
heap_free(new_t->file);
|
||||
new_t->file = (char *)heap_malloc(gstrlen(file) + 1);
|
||||
if (! new_t->file)
|
||||
{
|
||||
(* error_fcn)();
|
||||
return NULL;
|
||||
}
|
||||
gstrcpy(new_t->file, file);
|
||||
#endif
|
||||
|
||||
if (new_t != old_t)
|
||||
{
|
||||
/* change parent pointer */
|
||||
if (new_t->parent->child == old_t)
|
||||
new_t->parent->child = new_t;
|
||||
|
||||
/* change sibling pointers */
|
||||
for (tp = new_t; tp->sibling != old_t; tp = tp->sibling)
|
||||
;
|
||||
tp->sibling = new_t;
|
||||
|
||||
/* change children pointers */
|
||||
tp = new_t->child;
|
||||
if (tp != NULL)
|
||||
do
|
||||
{
|
||||
tp->parent = new_t;
|
||||
tp = tp->sibling;
|
||||
} while (tp != new_t->child);
|
||||
}
|
||||
return(TREEPTR_TO_VOIDPTR(new_t))
|
||||
;
|
||||
}
|
||||
|
||||
static void near
|
||||
xi_tree_dbg_internal(TREE_NODE *tn, int level)
|
||||
{
|
||||
char buf[150];
|
||||
char *s;
|
||||
TREE_NODE *tn2;
|
||||
int i, l;
|
||||
|
||||
if (tn == NULL)
|
||||
return;
|
||||
/* print tab indent indicating level */
|
||||
s = buf;
|
||||
for (l = level; l; l--)
|
||||
{
|
||||
for (i=0; i<DBGTAB; i++)
|
||||
*s++ = ' ';
|
||||
}
|
||||
#ifdef TREEDEBUG
|
||||
sprintf( s, "node %08lx: par=%08lx, sib=%08lx, ch=%08lx, file=%s, line=%d",
|
||||
PTR_LONG(tn), PTR_LONG(tn->parent), PTR_LONG(tn->sibling),
|
||||
PTR_LONG(tn->child), tn->file, tn->line );
|
||||
#else
|
||||
sprintf( s, "node %08lx: par=%08lx, sib=%08lx, ch=%08lx",
|
||||
PTR_LONG(tn), PTR_LONG(tn->parent), PTR_LONG(tn->sibling),
|
||||
PTR_LONG(tn->child) );
|
||||
#endif
|
||||
xi_dbg(buf);
|
||||
tn2 = tn->child;
|
||||
if (tn2 != NULL)
|
||||
do
|
||||
{
|
||||
xi_tree_dbg_internal(tn2, level + 1);
|
||||
tn2 = tn2->sibling;
|
||||
} while (tn2 != tn->child);
|
||||
}
|
||||
|
||||
void
|
||||
xi_tree_dbg(char *title)
|
||||
{
|
||||
char buf[100];
|
||||
|
||||
sprintf(buf, "TREE MEMORY DEBUG TRACE (%s)", title);
|
||||
xi_dbg(buf);
|
||||
xi_dbg("=======================");
|
||||
xi_tree_dbg_internal(top, 0);
|
||||
heap_dbg(title);
|
||||
xi_tree_check_sanity(title);
|
||||
}
|
||||
|
||||
static void near
|
||||
xi_tree_check_sanity_internal(TREE_NODE *tn, char *title,
|
||||
int *count)
|
||||
{
|
||||
TREE_NODE *tn2;
|
||||
|
||||
#ifdef TREEDEBUG
|
||||
#ifdef PAD
|
||||
int i;
|
||||
|
||||
/* check pad bytes for node */
|
||||
if (tn != &topnode)
|
||||
for (i = tn->size - PAD; i < tn->size; i++)
|
||||
if (*((char *)tn + sizeof(TREE_NODE) + i) != PADCHAR)
|
||||
fatal( "xi_tree_node padding corrupted: node=%08lx, file=%s, line=%d",
|
||||
PTR_LONG(tn), tn->file, tn->line );
|
||||
#endif
|
||||
#endif
|
||||
/* check that all children point to this node */
|
||||
tn2 = tn->child;
|
||||
(*count)++;
|
||||
if (tn2 != NULL)
|
||||
do
|
||||
{
|
||||
if (tn2->parent != tn)
|
||||
fatal( "memory check %s: tree node %08lx has bad parent",
|
||||
title, PTR_LONG(tn2) );
|
||||
xi_tree_check_sanity_internal(tn2, title, count);
|
||||
tn2 = tn2->sibling;
|
||||
} while (tn2 != tn->child);
|
||||
}
|
||||
|
||||
void
|
||||
xi_tree_check_sanity(char *title)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
xi_tree_check_sanity_internal(top, title, &count);
|
||||
#ifdef TREEDEBUG
|
||||
if (count != node_count)
|
||||
fatal("tree sanity check failed: tree count=%d, allocation count=%d",
|
||||
count, node_count);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef TREEDEBUG
|
||||
void *xi_tree_malloc_stub(size_t size, void *parent);
|
||||
void *
|
||||
xi_tree_malloc_stub(size_t size, void *parent)
|
||||
{
|
||||
return(xi_tree_malloc_body(size, parent, 0, "(unknown)"));
|
||||
}
|
||||
|
||||
void *xi_tree_realloc_stub(void *p, size_t size);
|
||||
void *
|
||||
xi_tree_realloc_stub(void *p, size_t size)
|
||||
{
|
||||
return(xi_tree_realloc_body(p, size, 0, "(unknown)"));
|
||||
}
|
||||
#else
|
||||
void *xi_tree_malloc_stub(size_t size, void *parent,
|
||||
int line, char *file);
|
||||
void *
|
||||
xi_tree_malloc_stub(size_t size, void *parent,
|
||||
int line, char *file)
|
||||
{
|
||||
NOREF(line);
|
||||
NOREF(file);
|
||||
return(xi_tree_malloc_body(size, parent));
|
||||
}
|
||||
|
||||
void *xi_tree_realloc_stub(void *p, size_t size,
|
||||
int line, char *file);
|
||||
void *
|
||||
xi_tree_realloc_stub(void *p, size_t size,
|
||||
int line, char *file)
|
||||
{
|
||||
NOREF(line);
|
||||
NOREF(file);
|
||||
return(xi_tree_realloc_body(p, size));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
xi_tree_reg_error_fcn(void (* fcn)(void))
|
||||
{
|
||||
error_fcn = fcn;
|
||||
}
|
||||
|
||||
|
4343
xi/xiutils.c
Executable file
4343
xi/xiutils.c
Executable file
File diff suppressed because it is too large
Load Diff
115
xi/xiutils.h
Executable file
115
xi/xiutils.h
Executable file
@ -0,0 +1,115 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 1991-1995 by ORCA Software, Inc. *
|
||||
* *
|
||||
* All rights reserved. May not be reproduced or distributed, in printed or *
|
||||
* electronic form, without permission of ORCA Software, Inc. *
|
||||
*******************************************************************************/
|
||||
|
||||
extern CBRUSH ltgray_cbrush;
|
||||
extern CBRUSH gray_cbrush;
|
||||
extern CBRUSH hollow_cbrush;
|
||||
extern FONT_OBJ xi_sysfont;
|
||||
extern RCT big_clip;
|
||||
|
||||
/* DIMENSIONS FOR FIELD OBJET BORDER */
|
||||
#define XI_FLD_XBORDER XI_FU_MULTIPLE /* may change for OL implementation */
|
||||
|
||||
/* UTILITY FUNCTIONS */
|
||||
#ifdef DEBUG
|
||||
void pr_xi_event(XI_OBJ *itf, XI_EVENT *xiev);
|
||||
#endif
|
||||
|
||||
#if 0 /* this is platform-dependent */
|
||||
#define XI_COLUMN_XDIV XI_FU_MULTIPLE
|
||||
#define XI_LIST_XBORDER XI_FU_MULTIPLE
|
||||
#endif
|
||||
|
||||
RCT* adjust_rect(RCT *rct, int pwid);
|
||||
int clip(int val, int mn, int mx);
|
||||
void dbg_rct(char *tag, RCT *rct);
|
||||
void order_ints(int *ip1, int *ip2);
|
||||
char* gmemmove(char *d, char *s, long n);
|
||||
char* gstrncpy(char *dst, char *src, int n);
|
||||
char* tgstrncpy(char *dst, char *src, int n);
|
||||
|
||||
void xi_adjust_sb_vir_itf(WINDOW win, XI_OBJ *itf);
|
||||
void xi_button_rect_calc(XI_OBJ *btn_obj, int sequence);
|
||||
void xi_container_rect_calc( XI_OBJ *cnt_obj, int max_text_len,
|
||||
XI_BTN_TYPE btn_type);
|
||||
FONT_OBJ* xi_def_get_font( XI_OBJ_DEF* obj_def );
|
||||
BOOLEAN xi_get_xil_pref( XI_OBJ* obj );
|
||||
void xi_draw_clipped_text( WINDOW win, char *s, RCT *bound_rct,
|
||||
RCT *clip_rct, unsigned long attrib,
|
||||
BOOLEAN set_the_cpen, int rule_and_space,
|
||||
int len);
|
||||
void xi_dbg(char *buf);
|
||||
void xi_draw_button( XI_OBJ *xi_obj, RCT *rct, char *text,
|
||||
int down_icon_rid, int up_icon_rid,
|
||||
int disabled_icon_rid, BOOLEAN enabled,
|
||||
BOOLEAN visible, BOOLEAN focus, BOOLEAN down,
|
||||
BOOLEAN dflt, BOOLEAN checked, BOOLEAN box_only);
|
||||
BOOLEAN xi_eh(WINDOW win, EVENT *ep);
|
||||
void xi_even_fu(int *f);
|
||||
void xi_even_fu_pnt(PNT *p);
|
||||
RCT* xi_inflate_rect(RCT *rct, int amount);
|
||||
#if XIWS == WMWS
|
||||
void xi_coalesce_invalidates(XI_OBJ *itf, BOOLEAN coalesce);
|
||||
void xi_fix_color(COLOR *color);
|
||||
#endif
|
||||
void xi_fu_to_pu_font(FONT_OBJ *font, PNT *pnt, int nbr_pnts);
|
||||
RCT* xi_get_enclosing_rect(RCT *dst, RCT *src1, RCT *src2);
|
||||
void xi_get_font_metrics_font( FONT_OBJ *font, int *leading, int *ascent,
|
||||
int *descent, int *char_width);
|
||||
int xi_get_fu_height(XI_OBJ *itf);
|
||||
int xi_get_fu_height_font(FONT_OBJ *font);
|
||||
int xi_get_fu_width(XI_OBJ *itf);
|
||||
int xi_get_fu_width_font(FONT_OBJ *font);
|
||||
void xi_get_hsb_rect(XI_OBJ *xi_obj, RCT *rctp);
|
||||
XI_OBJ* xi_get_itf_from_id( int id );
|
||||
RCT* xi_get_rect_internal( XI_OBJ *xi_obj, RCT *rctp, RCT *old_win_rct,
|
||||
RCT *new_win_rct);
|
||||
void xi_get_sb_rect(XI_OBJ *xi_obj, RCT *rctp);
|
||||
BOOLEAN xi_half_baked(WINDOW win);
|
||||
void xi_init_sysvals(void);
|
||||
void xi_make_obj_visible(XI_OBJ *xi_obj);
|
||||
void xi_menu_enable(XI_OBJ *itf, int tag, BOOLEAN enable);
|
||||
void xi_move_column_internal( XI_OBJ *column, int position,
|
||||
BOOLEAN in_hscrolling);
|
||||
void xi_move_list_hscroll_bar(XI_OBJ *xi_obj);
|
||||
void xi_move_list_scroll_bar(XI_OBJ *xi_obj);
|
||||
WINDOW xi_new_control( RCT *lrctp, char *title, WIN_TYPE t, WINDOW parent,
|
||||
BOOLEAN visible, int id, char *templat);
|
||||
int xi_obj_to_idx(XI_OBJ *xi_obj);
|
||||
void xi_realloc_array( void **ptr, int nbr, size_t sz, void *parent);
|
||||
void xi_set_sysval(XI_SV_TYPE valtype, int value);
|
||||
void xi_set_trap_obj(XI_OBJ *obj);
|
||||
void xi_set_update_obj(XI_OBJ *xi_obj);
|
||||
void xi_terminate(void);
|
||||
#ifdef TREEDEBUG
|
||||
#define xi_tree_realloc2(o, s, p) xi_tree_realloc_d2(o, s, p, __LINE__, __FILE__)
|
||||
char* xi_tree_realloc_d2(char *oldp, size_t size, char *parent, int line,
|
||||
char *filename);
|
||||
#else
|
||||
char* xi_tree_realloc2(char *oldp, size_t size, char *parent);
|
||||
#endif
|
||||
XVT_FNTID* xi_font_to_fontid(XI_OBJ *itf, void *a_font, XVT_FNTID *font_id);
|
||||
FONT* xi_fontid_to_font(XVT_FNTID font_id, void *parent);
|
||||
FONT_OBJ xi_create_copy_font_id(XI_OBJ *itf, FONT_OBJ font_id, FONT_OBJ old_font_id);
|
||||
void xi_free_font_id(XI_OBJ *itf, FONT_OBJ font_id);
|
||||
BOOLEAN font_compare ( XVT_FNTID f1, XVT_FNTID f2 );
|
||||
|
||||
/*********************************************************************/
|
||||
/* XI minimal compatability layer */
|
||||
|
||||
extern CPEN hollow_cpen;
|
||||
extern CPEN black_cpen;
|
||||
extern CPEN rubber_cpen;
|
||||
extern CBRUSH white_cbrush;
|
||||
extern CBRUSH hollow_cbrush;
|
||||
|
||||
#define E_KILL_WINDOW E_DESTROY
|
||||
#define E_ACTIVATE E_FOCUS
|
||||
|
||||
|
||||
/*********************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user