Browse Source

* moved to packages dir

peter 26 years ago
parent
commit
9de180b9b1
100 changed files with 22719 additions and 0 deletions
  1. 983 0
      packages/gdbint/Makefile
  2. 55 0
      packages/gdbint/Makefile.fpc
  3. 307 0
      packages/gdbint/gdbcon.pp
  4. 2270 0
      packages/gdbint/gdbint.pp
  5. 186 0
      packages/gdbint/gdbobjs.inc
  6. 177 0
      packages/gdbint/libgdb/Makefile
  7. 10 0
      packages/gdbint/libgdb/Makefile.fpc
  8. 142 0
      packages/gdbint/libgdb/go32v2/Makefile
  9. 142 0
      packages/gdbint/libgdb/linux/Makefile
  10. 142 0
      packages/gdbint/libgdb/win32/Makefile
  11. 97 0
      packages/gdbint/symify.pp
  12. 71 0
      packages/gdbint/testgdb.pp
  13. 912 0
      packages/gtk/Makefile
  14. 38 0
      packages/gtk/Makefile.fpc
  15. 81 0
      packages/gtk/README
  16. 194 0
      packages/gtk/conv/fixexmcdecl.pp
  17. 229 0
      packages/gtk/conv/fixgdk.pp
  18. 224 0
      packages/gtk/conv/fixgdkcdecl.pp
  19. 190 0
      packages/gtk/conv/fixglibcdecl.pp
  20. 251 0
      packages/gtk/conv/fixgtk.pp
  21. 263 0
      packages/gtk/conv/fixgtkcdecl.pp
  22. 923 0
      packages/gtk/examples/Makefile
  23. 18 0
      packages/gtk/examples/Makefile.fpc
  24. 172 0
      packages/gtk/examples/clist.pp
  25. 340 0
      packages/gtk/examples/editform.pp
  26. 119 0
      packages/gtk/examples/entry.pp
  27. 247 0
      packages/gtk/examples/list.pp
  28. 194 0
      packages/gtk/examples/notebook.pp
  29. 109 0
      packages/gtk/examples/pixmap.pp
  30. 224 0
      packages/gtk/examples/progressbar.pp
  31. 175 0
      packages/gtk/examples/scribble-simple.pp
  32. 196 0
      packages/gtk/examples/tictactoe.pp
  33. 69 0
      packages/gtk/examples/ttt_test.pp
  34. 127 0
      packages/gtk/gdk/gdk.pp
  35. 1344 0
      packages/gtk/gdk/gdkkeysyms.pp
  36. 379 0
      packages/gtk/gdk/gdkmain.pp
  37. 350 0
      packages/gtk/gdk/gdkprivate.pp
  38. 91 0
      packages/gtk/gdk/gdkrgb.pp
  39. 1129 0
      packages/gtk/gdk/gdktypes.pp
  40. 141 0
      packages/gtk/gdk/gdkx.pp
  41. 1707 0
      packages/gtk/glib/glib.pp
  42. 94 0
      packages/gtk/glib/gmodule.pp
  43. 107 0
      packages/gtk/gtk/gtk.pp
  44. 86 0
      packages/gtk/gtk/gtkaccelerator.pp
  45. 104 0
      packages/gtk/gtk/gtkaccelgroup.pp
  46. 114 0
      packages/gtk/gtk/gtkaccellabel.pp
  47. 104 0
      packages/gtk/gtk/gtkadjustment.pp
  48. 110 0
      packages/gtk/gtk/gtkalignment.pp
  49. 68 0
      packages/gtk/gtk/gtkarg.pp
  50. 106 0
      packages/gtk/gtk/gtkarrow.pp
  51. 109 0
      packages/gtk/gtk/gtkaspectframe.pp
  52. 114 0
      packages/gtk/gtk/gtkbbox.pp
  53. 92 0
      packages/gtk/gtk/gtkbin.pp
  54. 170 0
      packages/gtk/gtk/gtkbindings.pp
  55. 171 0
      packages/gtk/gtk/gtkbox.pp
  56. 169 0
      packages/gtk/gtk/gtkbutton.pp
  57. 123 0
      packages/gtk/gtk/gtkcalendar.pp
  58. 107 0
      packages/gtk/gtk/gtkcheckbutton.pp
  59. 130 0
      packages/gtk/gtk/gtkcheckmenuitem.pp
  60. 494 0
      packages/gtk/gtk/gtkclist.pp
  61. 148 0
      packages/gtk/gtk/gtkcolorsel.pp
  62. 190 0
      packages/gtk/gtk/gtkcombo.pp
  63. 204 0
      packages/gtk/gtk/gtkcontainer.pp
  64. 293 0
      packages/gtk/gtk/gtkctree.pp
  65. 127 0
      packages/gtk/gtk/gtkcurve.pp
  66. 87 0
      packages/gtk/gtk/gtkdata.pp
  67. 102 0
      packages/gtk/gtk/gtkdialog.pp
  68. 88 0
      packages/gtk/gtk/gtkdnd.pp
  69. 102 0
      packages/gtk/gtk/gtkdrawingarea.pp
  70. 186 0
      packages/gtk/gtk/gtkeditable.pp
  71. 169 0
      packages/gtk/gtk/gtkentry.pp
  72. 338 0
      packages/gtk/gtk/gtkenums.pp
  73. 100 0
      packages/gtk/gtk/gtkeventbox.pp
  74. 58 0
      packages/gtk/gtk/gtkfeatures.pp
  75. 127 0
      packages/gtk/gtk/gtkfilesel.pp
  76. 110 0
      packages/gtk/gtk/gtkfixed.pp
  77. 177 0
      packages/gtk/gtk/gtkfontsel.pp
  78. 109 0
      packages/gtk/gtk/gtkframe.pp
  79. 106 0
      packages/gtk/gtk/gtkgamma.pp
  80. 64 0
      packages/gtk/gtk/gtkgc.pp
  81. 202 0
      packages/gtk/gtk/gtkhandlebox.pp
  82. 104 0
      packages/gtk/gtk/gtkhbbox.pp
  83. 85 0
      packages/gtk/gtk/gtkhbox.pp
  84. 100 0
      packages/gtk/gtk/gtkhpaned.pp
  85. 85 0
      packages/gtk/gtk/gtkhruler.pp
  86. 85 0
      packages/gtk/gtk/gtkhscale.pp
  87. 100 0
      packages/gtk/gtk/gtkhscrollbar.pp
  88. 85 0
      packages/gtk/gtk/gtkhseparator.pp
  89. 89 0
      packages/gtk/gtk/gtkimage.pp
  90. 133 0
      packages/gtk/gtk/gtkincludes.pp
  91. 96 0
      packages/gtk/gtk/gtkinputdialog.pp
  92. 77 0
      packages/gtk/gtk/gtkinvisible.pp
  93. 90 0
      packages/gtk/gtk/gtkitem.pp
  94. 180 0
      packages/gtk/gtk/gtkitemfactory.pp
  95. 154 0
      packages/gtk/gtk/gtklabel.pp
  96. 100 0
      packages/gtk/gtk/gtklayout.pp
  97. 173 0
      packages/gtk/gtk/gtklist.pp
  98. 98 0
      packages/gtk/gtk/gtklistitem.pp
  99. 115 0
      packages/gtk/gtk/gtkmain.pp
  100. 93 0
      packages/gtk/gtk/gtkmarshal.pp

+ 983 - 0
packages/gdbint/Makefile

@@ -0,0 +1,983 @@
+#
+# Makefile generated by fpcmake v0.99.13 on 1999-11-24 22:54
+#
+
+defaultrule: all
+
+#####################################################################
+# Autodetect OS (Linux or Dos or Windows NT)
+# define inlinux when running under linux
+# define inWinNT when running under WinNT
+#####################################################################
+
+# We need only / in the path
+override PATH:=$(subst \,/,$(PATH))
+
+# Search for PWD and determine also if we are under linux
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
+ifeq ($(PWD),)
+nopwd:
+	@echo You need the GNU utils package to use this Makefile!
+	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
+	@exit
+else
+inlinux=1
+endif
+else
+PWD:=$(firstword $(PWD))
+endif
+
+# Detect NT - NT sets OS to Windows_NT
+ifndef inlinux
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+endif
+endif
+
+# Detect OS/2 - OS/2 has OS2_SHELL defined
+ifndef inlinux
+ifndef inWinNT
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+endif
+
+# The extension of executables
+ifdef inlinux
+EXEEXT=
+else
+EXEEXT=.exe
+endif
+
+# The path which is search separated by spaces
+ifdef inlinux
+SEARCHPATH=$(subst :, ,$(PATH))
+else
+SEARCHPATH=$(subst ;, ,$(PATH))
+endif
+
+#####################################################################
+# FPC version/target Detection
+#####################################################################
+
+# What compiler to use ?
+ifndef FPC
+ifdef inOS2
+export FPC=ppos2$(EXEEXT)
+else
+export FPC=ppc386$(EXEEXT)
+endif
+endif
+
+# Target OS
+ifndef OS_TARGET
+export OS_TARGET:=$(shell $(FPC) -iTO)
+endif
+
+# Source OS
+ifndef OS_SOURCE
+export OS_SOURCE:=$(shell $(FPC) -iSO)
+endif
+
+# Target CPU
+ifndef CPU_TARGET
+export CPU_TARGET:=$(shell $(FPC) -iTP)
+endif
+
+# Source CPU
+ifndef CPU_SOURCE
+export CPU_SOURCE:=$(shell $(FPC) -iSP)
+endif
+
+# FPC version
+ifndef FPC_VERSION
+export FPC_VERSION:=$(shell $(FPC) -iV)
+endif
+
+#####################################################################
+# Default Settings
+#####################################################################
+
+# Release ? Then force OPT and don't use extra opts via commandline
+ifdef RELEASE
+override OPT:=-Xs -OG2p3 -n
+endif
+
+# Verbose settings (warning,note,info)
+ifdef VERBOSE
+override OPT+=-vwni
+endif
+
+#####################################################################
+# User Settings
+#####################################################################
+
+
+# Targets
+
+UNITOBJECTS+=gdbint gdbcon
+EXEOBJECTS+=symify
+EXAMPLEOBJECTS+=testgdb
+
+# Clean
+
+
+# Install
+
+
+# Defaults
+
+
+# Directories
+
+ifndef FPCDIR
+FPCDIR=..
+endif
+ifndef PACKAGEDIR
+PACKAGEDIR=$(FPCDIR)/packages
+endif
+override NEEDLIBDIR=libgdb/$(OS_TARGET)
+override NEEDOBJDIR=libgdb/$(OS_TARGET)
+ifndef TARGETDIR
+TARGETDIR=.
+endif
+
+# Packages
+
+
+# Libraries
+
+override NEEDGCCLIB=1
+
+# Info
+
+FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
+
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+#####################################################################
+# Install Directories
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# Where to install shared libraries
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+LIBINSTALLDIR=$(UNITINSTALLDIR)
+endif
+endif
+
+# Where the source files will be stored
+ifndef SOURCEINSTALLDIR
+ifdef inlinux
+SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
+else
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+# Where the some extra (data)files will be stored
+ifndef EXTRAINSTALLDIR
+EXTRAINSTALLDIR=$(BASEINSTALLDIR)
+endif
+
+
+#####################################################################
+# Compiler Command Line
+#####################################################################
+
+# Load commandline OPTDEF and add FPC_CPU define
+override FPCOPTDEF:=-d$(CPU_TARGET)
+
+# Load commandline OPT and add target and unit dir to be sure
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+
+# RTL first and then Unit dir (a unit can override RTLunit). Don't add the
+# dirs if fpcdir=. which can be used for the rtl makefiles
+ifdef FPCDIR
+ifneq ($(FPCDIR),.)
+override FPCOPT+=-Fu$(FPCDIR)/rtl/$(OS_TARGET) -Fu$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+
+ifdef NEEDLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(NEEDLIBDIR))
+endif
+
+ifdef NEEDOBJDIR
+override FPCOPT+=$(addprefix -Fo,$(NEEDOBJDIR))
+endif
+
+# Add GCC lib path if asked
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+
+# Target dirs
+ifdef TARGETDIR
+override FPCOPT+=-FE$(TARGETDIR)
+endif
+
+# Smartlinking
+ifdef SMARTLINK
+override FPCOPT+=-CX
+endif
+
+# Debug
+ifdef DEBUG
+override FPCOPT+=-g
+endif
+
+# Add commandline options
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+endif
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+endif
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+endif
+
+# Add defines from FPCOPTDEF to FPCOPT
+ifdef FPCOPTDEF
+override FPCOPT+=$(FPCOPTDEF)
+endif
+
+# Was a config file specified ?
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+
+override COMPILER=$(FPC) $(FPCOPT)
+
+#####################################################################
+# Shell tools
+#####################################################################
+
+# To copy pograms
+ifndef COPY
+export COPY:=cp -fp
+endif
+
+# To move pograms
+ifndef MOVE
+export MOVE:=mv -f
+endif
+
+# Check delete program
+ifndef DEL
+export DEL:=rm -f
+endif
+
+# Check deltree program
+ifndef DELTREE
+export DELTREE:=rm -rf
+endif
+
+# To install files
+ifndef INSTALL
+ifdef inlinux
+export INSTALL:=install -m 644
+else
+export INSTALL:=$(COPY)
+endif
+endif
+
+# To install programs
+ifndef INSTALLEXE
+ifdef inlinux
+export INSTALLEXE:=install -m 755
+else
+export INSTALLEXE:=$(COPY)
+endif
+endif
+
+# To make a directory.
+ifndef MKDIR
+ifdef inlinux
+export MKDIR:=install -m 755 -d
+else
+export MKDIR:=ginstall -m 755 -d
+endif
+endif
+
+#####################################################################
+# Default Tools
+#####################################################################
+
+# assembler, redefine it if cross compiling
+ifndef AS
+AS=as
+endif
+
+# linker, but probably not used
+ifndef LD
+LD=ld
+endif
+
+# ppas.bat / ppas.sh
+ifdef inlinux
+PPAS=ppas.sh
+else
+ifdef inOS2
+PPAS=ppas.cmd
+else
+PPAS=ppas.bat
+endif
+endif
+
+# also call ppas if with command option -s
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+EXECPPAS=@$(PPAS)
+endif
+
+# ldconfig to rebuild .so cache
+ifdef inlinux
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+
+# echo
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+export ECHO:=echo
+else
+export ECHO:=$(firstword $(ECHO))
+endif
+endif
+
+# ppdep
+ifndef PPDEP
+PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPDEP),)
+PPDEP=
+else
+export PPDEP:=$(firstword $(PPDEP))
+endif
+endif
+
+# ppumove
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE=
+else
+export PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+
+# ppufiles
+ifndef PPUFILES
+PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUFILES),)
+PPUFILES=
+else
+export PPUFILES:=$(firstword $(PPUFILES))
+endif
+endif
+
+# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
+# upx uses that one itself (PFV)
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+export UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+
+# gdate/date
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))
+ifeq ($(DATE),)
+DATE=
+else
+export DATE:=$(firstword $(DATE))
+endif
+else
+export DATE:=$(firstword $(DATE))
+endif
+endif
+
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+
+# ZipProg, you can't use Zip as the var name (PFV)
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG=
+else
+export ZIPPROG:=$(firstword $(ZIPPROG)) -D9 -r
+endif
+endif
+
+ifndef ZIPEXT
+ZIPEXT=.zip
+endif
+
+#####################################################################
+# Default extensions
+#####################################################################
+
+# Default needed extensions (Go32v2,Linux)
+LOADEREXT=.as
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+PACKAGESUFFIX=
+
+# Go32v1
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+PACKAGESUFFIX=v1
+endif
+
+# Go32v2
+ifeq ($(OS_TARGET),go32v2)
+PACKAGESUFFIX=go32
+endif
+
+# Linux
+ifeq ($(OS_TARGET),linux)
+PACKAGESUFFIX=linux
+endif
+
+# Win32
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=win32
+endif
+
+# OS/2
+ifeq ($(OS_TARGET),os2)
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+SMARTEXT=.so
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=os2
+endif
+
+# library prefix
+LIBPREFIX=lib
+ifeq ($(OS_TARGET),go32v2)
+LIBPREFIX=
+endif
+ifeq ($(OS_TARGET),go32v1)
+LIBPREFIX=
+endif
+
+# determine which .pas extension is used
+ifndef PASEXT
+ifdef EXEOBJECTS
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
+else
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
+endif
+ifeq ($(TESTPAS),)
+PASEXT=.pp
+else
+PASEXT=.pas
+endif
+endif
+
+#####################################################################
+# Default rules
+#####################################################################
+
+.PHONY: defaultrule all debug examples test smart shared \
+	showinstall install zipinstall zipinstalladd \
+	clean cleanall depend info
+
+all: fpc_all
+
+debug: fpc_debug
+
+examples: fpc_examples
+
+smart: fpc_smart
+
+shared: fpc_shared
+
+showinstall: fpc_showinstall
+
+install: fpc_install
+
+zipinstall: fpc_zipinstall
+
+zipinstalladd: fpc_zipinstalladd
+
+clean: fpc_clean
+
+cleanall: fpc_cleanall
+
+info: fpc_info
+
+#####################################################################
+# Units
+#####################################################################
+
+.PHONY: fpc_units
+
+override ALLTARGET+=fpc_units
+
+UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
+override INSTALLPPUFILES+=$(UNITPPUFILES)
+override CLEANPPUFILES+=$(UNITPPUFILES)
+
+fpc_units: $(UNITPPUFILES)
+
+#####################################################################
+# Exes
+#####################################################################
+
+.PHONY: fpc_exes
+
+EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
+EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
+
+override ALLTARGET+=fpc_exes
+override INSTALLEXEFILES+=$(EXEFILES)
+override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+
+fpc_exes: $(EXEFILES)
+
+#####################################################################
+# Examples
+#####################################################################
+
+.PHONY: fpc_examples fpc_test
+
+EXAMPLEFILES=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
+EXAMPLEOFILES=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
+
+override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
+
+fpc_examples: all $(EXAMPLEFILES)
+
+fpc_test: examples
+
+#####################################################################
+# General compile rules
+#####################################################################
+
+.PHONY: fpc_all fpc_debug
+
+fpc_all: $(ALLTARGET)
+
+fpc_debug:
+	$(MAKE) all DEBUG=1
+
+# General compile rules, available for both possible PASEXT
+
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
+
+%$(PPUEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(PPUEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+#####################################################################
+# Library
+#####################################################################
+
+.PHONY: fpc_smart fpc_shared
+
+# Default sharedlib units are all unit objects
+ifndef SHAREDLIBUNITOBJECTS
+SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
+endif
+
+fpc_smart:
+	$(MAKE) all SMARTLINK=1
+
+fpc_shared: all
+ifdef inlinux
+ifndef LIBNAME
+	@$(ECHO) LIBNAME not set
+else
+	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
+endif
+else
+	@$(ECHO) Shared Libraries not supported
+endif
+
+#####################################################################
+# Install rules
+#####################################################################
+
+.PHONY: fpc_showinstall fpc_install
+
+ifdef EXTRAINSTALLUNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
+endif
+
+ifdef INSTALLPPUFILES
+ifdef PPUFILES
+ifdef inlinux
+INSTALLPPULINKFILES=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
+INSTALLPPULIBFILES=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
+else
+INSTALLPPULINKFILES=$(shell $(PPUFILES) $(INSTALLPPUFILES))
+endif
+endif
+endif
+
+fpc_showinstall: $(SHOWINSTALLTARGET)
+ifdef INSTALLEXEFILES
+	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
+endif
+ifdef INSTALLPPUFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
+ifneq ($(INSTALLPPULINKFILES),)
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
+endif
+ifneq ($(INSTALLPPULIBFILES),)
+	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
+endif
+endif
+ifdef EXTRAINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
+endif
+
+fpc_install: $(INSTALLTARGET)
+# Create UnitInstallFiles
+ifdef INSTALLEXEFILES
+	$(MKDIR) $(BININSTALLDIR)
+# Compress the exes if upx is defined
+ifdef UPXPROG
+	-$(UPXPROG) $(INSTALLEXEFILES)
+endif
+	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
+endif
+ifdef INSTALLPPUFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
+endif
+ifneq ($(INSTALLPPULIBFILES),)
+	$(MKDIR) $(LIBINSTALLDIR)
+	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
+endif
+endif
+ifdef EXTRAINSTALLFILES
+	$(MKDIR) $(EXTRAINSTALLDIR)
+	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
+endif
+
+#####################################################################
+# Zip
+#####################################################################
+
+.PHONY: fpc_zipinstall fpc_zipinstalladd
+
+# Temporary path to pack a file
+ifndef PACKDIR
+ifndef inlinux
+PACKDIR=pack_tmp
+else
+PACKDIR=/tmp/fpc-pack
+endif
+endif
+
+# Test dir if none specified
+ifndef PACKAGEDIR
+PACKAGEDIR=$(BASEDIR)
+endif
+
+# Add .zip/.tar.gz extension
+ifdef ZIPNAME
+ifndef inlinux
+override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
+endif
+endif
+
+# Default target which is call before zipping
+ifndef ZIPTARGET
+ZIPTARGET=install
+endif
+
+# Note: This will not remove the zipfile first
+fpc_zipinstalladd:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz
+	cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
+	gzip $(PACKAGEDIR)/$(ZIPNAME).tar
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+# First remove the zip and then install
+fpc_zipinstall:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(DEL) $(PACKAGEDIR)/$(ZIPNAME)
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+#####################################################################
+# Clean rules
+#####################################################################
+
+.PHONY: fpc_clean fpc_cleanall
+
+ifdef EXTRACLEANUNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
+endif
+
+ifdef CLEANPPUFILES
+ifdef PPUFILES
+CLEANPPULINKFILES=$(shell $(PPUFILES) $(CLEANPPUFILES))
+endif
+endif
+
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+	-$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+	-$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+	-$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef EXTRACLEANFILES
+	-$(DEL) $(EXTRACLEANFILES)
+endif
+	-$(DEL) $(PPAS) link.res log
+
+fpc_cleanall:
+ifdef CLEANEXEFILES
+	-$(DEL) $(CLEANEXEFILES)
+endif
+	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+	-$(DELTREE) *$(SMARTEXT)
+	-$(DEL) $(PPAS) link.res log
+
+#####################################################################
+# Info rules
+#####################################################################
+
+.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
+	fpc_dirinfo
+
+fpc_info: $(FPCINFO)
+
+fpc_infocfg:
+	@$(ECHO)
+	@$(ECHO)  == Configuration info ==
+	@$(ECHO)
+	@$(ECHO)  FPC....... $(FPC)
+	@$(ECHO)  Version... $(FPC_VERSION)
+	@$(ECHO)  CPU....... $(CPU_TARGET)
+	@$(ECHO)  Source.... $(OS_SOURCE)
+	@$(ECHO)  Target.... $(OS_TARGET)
+	@$(ECHO)
+
+fpc_infoobjects:
+	@$(ECHO)
+	@$(ECHO)  == Object info ==
+	@$(ECHO)
+	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
+	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
+	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
+	@$(ECHO)
+	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
+	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
+	@$(ECHO)
+	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
+	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
+	@$(ECHO)
+
+fpc_infoinstall:
+	@$(ECHO)
+	@$(ECHO)  == Install info ==
+	@$(ECHO)
+ifdef DATE
+	@$(ECHO)  DateStr.............. $(DATESTR)
+endif
+	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
+	@$(ECHO)
+	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
+	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
+	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
+	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
+	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
+	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
+	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
+	@$(ECHO)
+
+#####################################################################
+# Users rules
+#####################################################################
+
+gdbint$(PPUEXT): gdbint$(PASEXT)
+
+gdbcon$(PPUEXT): gdbcon$(PASEXT) gdbint$(PPUEXT)
+
+ifeq ($(OS_TARGET),go32v2)
+DBGCOM=dbgcom$(OEXT)
+else
+DBGCOM=
+endif
+
+ifdef $(COMPILEDBGCOM)
+# FPC conditionnal remove the file watching mecanism introduced
+# in v2.02 of dbgcom.c because it relies
+# on the fact that all files are opened via C lib calls
+# which is wrong for FPC !!
+$(DBGCOM): ../v4.16/dbgcom.c
+	gcc -c -DFPC -Dother_sel -gstabs -o dbgcom.o -I../v4.16 ../v4.16/dbgcom.c
+else
+$(DBGCOM):
+endif
+
+simple: $(DBGCOM)
+	-rm gdbint.ppu
+	ppc386 -dUSE_LIBGDB gdbint
+	ppc386 testgdb
+
+testgdb$(EXEEXT): testgdb.pp gdbint$(PPUEXT) gdbcon$(PPUEXT) $(DBGCOM)
+
+# Allow test for example
+.PHONY: test
+
+test: examples

+ 55 - 0
packages/gdbint/Makefile.fpc

@@ -0,0 +1,55 @@
+#
+#   Makefile.fpc for Free Pascal GDB Interface
+#
+
+[targets]
+units=gdbint gdbcon
+programs=symify
+examples=testgdb
+
+[defaults]
+defaultunits=1
+
+[dirs]
+fpcdir=..
+targetdir=.
+objdir=libgdb/$(OS_TARGET)
+libdir=libgdb/$(OS_TARGET)
+
+[libs]
+libgcc=1
+
+
+[rules]
+gdbint$(PPUEXT): gdbint$(PASEXT)
+
+gdbcon$(PPUEXT): gdbcon$(PASEXT) gdbint$(PPUEXT)
+
+ifeq ($(OS_TARGET),go32v2)
+DBGCOM=dbgcom$(OEXT)
+else
+DBGCOM=
+endif
+
+ifdef $(COMPILEDBGCOM)
+# FPC conditionnal remove the file watching mecanism introduced
+# in v2.02 of dbgcom.c because it relies
+# on the fact that all files are opened via C lib calls
+# which is wrong for FPC !!
+$(DBGCOM): ../v4.16/dbgcom.c
+        gcc -c -DFPC -Dother_sel -gstabs -o dbgcom.o -I../v4.16 ../v4.16/dbgcom.c
+else
+$(DBGCOM):
+endif
+
+simple: $(DBGCOM)
+        -rm gdbint.ppu
+        ppc386 -dUSE_LIBGDB gdbint
+        ppc386 testgdb
+
+testgdb$(EXEEXT): testgdb.pp gdbint$(PPUEXT) gdbcon$(PPUEXT) $(DBGCOM)
+
+# Allow test for example
+.PHONY: test
+
+test: examples

+ 307 - 0
packages/gdbint/gdbcon.pp

@@ -0,0 +1,307 @@
+{
+    $Id$
+    Copyright (c) 1998 by Peter Vreman
+
+    Lowlevel GDB interface which communicates directly with libgdb
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+unit GDBCon;
+interface
+
+uses
+  GDBInt;
+
+type
+  PGDBController=^TGDBController;
+  TGDBController=object(TGDBInterface)
+    progname   : pchar;
+    progargs   : pchar;
+    in_command,
+    init_count : longint;
+    constructor Init;
+    destructor  Done;
+    procedure CommandBegin(const s:string);virtual;
+    procedure Command(const s:string);
+    procedure CommandEnd(const s:string);virtual;
+    procedure Reset;virtual;
+    { tracing }
+    procedure StartTrace;
+    procedure Run;virtual;
+    procedure TraceStep;virtual;
+    procedure TraceNext;virtual;
+    procedure Continue;virtual;
+    { needed for dos because newlines are only #10 (PM) }
+    procedure WriteErrorBuf;
+    procedure WriteOutputBuf;
+    function  GetOutput : Pchar;
+    function  GetError : Pchar;
+    function  LoadFile(var fn:string):boolean;
+    procedure SetArgs(const s : string);
+    procedure ClearSymbols;
+  end;
+
+procedure UnixDir(var s : string);
+
+implementation
+
+uses
+  strings;
+
+procedure UnixDir(var s : string);
+var i : longint;
+begin
+  for i:=1 to length(s) do
+    if s[i]='\' then s[i]:='/';
+end;
+
+constructor TGDBController.Init;
+begin
+  inherited init;
+end;
+
+
+destructor TGDBController.Done;
+begin
+  if assigned(progname) then
+    strdispose(progname);
+  if assigned(progargs) then
+    strdispose(progargs);
+  inherited done;
+end;
+
+
+procedure TGDBController.Command(const s:string);
+begin
+  CommandBegin(s);
+  gdboutputbuf.reset;
+  gdberrorbuf.reset;
+  inc(in_command);
+  gdb_command(s);
+  dec(in_command);
+  {
+    What is that for ?? PM
+    I had to comment it because
+    it resets the debuggere after each command !!
+    Maybe it can happen on errors ??
+  if in_command<0 then
+   begin
+     in_command:=0;
+     inc(in_command);
+     Reset;
+     dec(in_command);
+   end; }
+  CommandEnd(s);
+end;
+
+procedure TGDBController.CommandBegin(const s:string);
+begin
+end;
+
+procedure TGDBController.CommandEnd(const s:string);
+begin
+end;
+
+function TGDBController.LoadFile(var fn:string):boolean;
+var
+  cmd : string;
+begin
+  getdir(0,cmd);
+  UnixDir(cmd);
+  cmd:='cd '+cmd;
+  Command(cmd);
+  GDB__Init;
+  UnixDir(fn);
+  if assigned(progname) then
+    strdispose(progname);
+  getmem(progname,length(fn)+1);
+  strpcopy(progname,fn);
+  Command('file '+fn);
+  LoadFile:=true;
+end;
+
+procedure TGDBController.SetArgs(const s : string);
+begin
+  if assigned(progargs) then
+    strdispose(progargs);
+  getmem(progargs,length(s)+1);
+  strpcopy(progargs,s);
+  command('set args '+s);
+end;
+
+procedure TGDBController.Reset;
+begin
+  call_reset:=false;
+{ DeleteBreakPoints(); }
+  if debuggee_started then
+   begin
+     reset_command:=true;
+     BreakSession;
+     Command('kill');
+     reset_command:=false;
+     debuggee_started:=false;
+   end;
+end;
+
+procedure TGDBController.StartTrace;
+begin
+  Command('tbreak PASCALMAIN');
+  Run;
+end;
+
+procedure TGDBController.Run;
+begin
+  Command('run');
+  inc(init_count);
+end;
+
+
+procedure TGDBController.TraceStep;
+begin
+  Command('step');
+end;
+
+
+procedure TGDBController.TraceNext;
+begin
+  Command('next');
+end;
+
+
+procedure TGDBController.Continue;
+begin
+  Command('continue');
+end;
+
+
+procedure TGDBController.ClearSymbols;
+begin
+  if debuggee_started then
+   Reset;
+  if init_count>0 then
+   Command('file');
+end;
+
+
+procedure BufWrite(Buf : pchar);
+  var p,pe : pchar;
+begin
+  p:=buf;
+  While assigned(p) do
+    begin
+       pe:=strscan(p,#10);
+       if pe<>nil then
+         pe^:=#0;
+       Writeln(p);
+       { restore for dispose }
+       if pe<>nil then
+         pe^:=#10;
+       if pe=nil then
+         p:=nil
+       else
+         begin
+           p:=pe;
+           inc(p);
+         end;
+    end;
+end;
+
+
+function  TGDBController.GetOutput : Pchar;
+begin
+  GetOutput:=gdboutputbuf.buf;
+end;
+
+function  TGDBController.GetError : Pchar;
+var p : pchar;
+begin
+  p:=gdberrorbuf.buf;
+  if (p^=#0) and got_error then
+    GetError:=pchar(longint(gdboutputbuf.buf)+gdboutputbuf.idx)
+  else
+    GetError:=p;
+end;
+
+procedure TGDBController.WriteErrorBuf;
+begin
+   BufWrite(gdberrorbuf.buf);
+end;
+
+
+procedure TGDBController.WriteOutputBuf;
+begin
+   BufWrite(gdboutputbuf.buf);
+end;
+
+
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:32  peter
+    * moved to packages dir
+
+  Revision 1.3  1999/08/23 09:16:48  pierre
+   * Better GetError code
+
+  Revision 1.2  1999/07/12 13:08:19  pierre
+    + added GDBVersion function
+    * tries to intercept quit command from GDB Window
+    + AllowQuit method
+
+  Revision 1.1  1999/05/22 13:43:00  peter
+    * moved
+
+  Revision 1.12  1999/02/11 13:03:27  pierre
+      Problem with last commit
+    + added virtuals CommandBegin and CommandEnd
+    + added command_level for TGDBInterface
+
+
+  Revision 1.10  1999/02/10 09:00:42  pierre
+     * duplicate call_reset removed
+     * frames allocation and freeing corrected
+     + GetError and GetOutput pchar function added
+     + stop_breakpoint_number to know why the program stopped
+       (used for watches)
+
+  Revision 1.9  1999/02/08 17:35:09  pierre
+    + added Run made TraceStep TraceNext Continue virtual
+
+  Revision 1.8  1999/02/08 14:00:00  pierre
+    - removed second debugger_started in TGDBController
+    + StartTrace and Reset made virtual to be able to
+      change CmResetDebugger state in IDE
+
+  Revision 1.7  1999/02/08 11:37:13  pierre
+   + added procargs var and SetArgs method
+
+  Revision 1.6  1999/02/04 14:29:35  pierre
+    + Continue command added
+    * Reset inside command removed
+
+  Revision 1.5  1999/01/22 18:07:44  pierre
+   * Loadfile arg changed to var
+
+  Revision 1.4  1999/01/22 18:05:40  pierre
+   * change dir sep from  to / for dos
+
+  Revision 1.3  1999/01/22 10:23:49  peter
+    * small update to get it working with the IDE
+
+  Revision 1.2  1999/01/18 11:01:58  pierre
+   + working version for go32v2
+
+  Revision 1.1  1998/10/07 15:57:38  peter
+    * initial version
+
+  Revision 1.1  1998/10/07 15:48:20  peter
+    * initial version
+
+}
+

+ 2270 - 0
packages/gdbint/gdbint.pp

@@ -0,0 +1,2270 @@
+{
+    $Id$
+    Copyright (c) 1998 by Peter Vreman
+
+    Lowlevel GDB interface which communicates directly with libgdb
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+unit GdbInt;
+interface
+
+{ this is not needed (PM) $output_format as}
+
+{.$define Debug}
+{.$define DebugCommand}
+{$define NotImplemented}
+
+{$ifdef go32v2}
+ {$undef NotImplemented}
+ { ifdef GDB_V418 changed to ifndef GDB_V416}
+{$ifdef USE_GDB_OBJS}
+  {$include gdbobjs.inc}
+{$else USE_GDB_OBJS}
+  {$LINKLIB gdb}
+{$endif ndef USE_GDB_OBJS}
+  {$LINKLIB dbg}
+  {$LINKLIB c}
+{$endif go32v2}
+
+{$ifdef linux}
+ {$undef NotImplemented}
+ {$LINKLIB ncurses}
+ {$LINKLIB gdb}
+ {$LINKLIB c}
+ {$LINKLIB gcc}
+{$endif linux}
+
+{$ifdef win32}
+ {$undef NotImplemented}
+ {$LINKLIB cygwin}
+ {$LINKLIB gdb}
+ {$ifdef USE_TERMCAP}
+   {$LINKLIB termcap}
+ {$else not USE_TERMCAP}
+   {$LINKLIB ncurses}
+ {$endif not USE_TERMCAP}
+ {$LINKLIB gcc}
+ {$LINKLIB c}
+ {$LINKLIB cygwin}
+ { all those are maybe not necessary
+   but at least user32 is required
+   because of clipboard handling PM }
+ {$LINKLIB kernel32}
+ {$LINKLIB user32}
+ {$LINKLIB shell32}
+{$endif win32}
+
+{$ifdef go32v2}
+ {$define supportexceptions}
+{$endif go32v2}
+{$ifdef linux}
+ {$define supportexceptions}
+{$endif linux}
+
+{$ifdef NotImplemented}
+{$fatal This OS is not yet supported !!!}
+{$endif NotImplemented}
+
+type
+  psyminfo=^tsyminfo;
+  tsyminfo=record
+    address  : longint;
+    fname    : pchar;
+    line     : longint;
+    funcname : pchar;
+    offset   : longint;
+  end;
+
+  tframeentry = object
+    file_name : pchar;
+    function_name : pchar;
+    args : pchar;
+    line_number : longint;
+    address : longint;
+    level : longint;
+    constructor init;
+    destructor done;
+    procedure reset;
+    procedure clear;
+  end;
+  pframeentry=^tframeentry;
+  ppframeentry=^pframeentry;
+
+{$ifndef GDB_V416}
+{ needed for handles }
+{not anymore I textrec.inc}
+
+{ GDB_FILE type }
+type
+  streamtype = (afile,astring);
+  C_FILE     = longint; { at least under DJGPP }
+  P_C_FILE   = ^C_FILE;
+
+  PGDB_FILE = ^TGDB_FILE;
+  TGDB_FILE = record
+              ts_streamtype : streamtype;
+              ts_filestream : P_C_FILE;
+              ts_strbuf : pchar;
+              ts_buflen : longint;
+              end;
+{$ifdef win32}
+  { from sys/reent.h
+    real structure is bigger but only std.. are wanted here PM }
+  REENT = record
+    err : longint;
+    stdin,stdout,stderr : P_C_FILE;
+  end;
+  PREENT = ^REENT;
+
+var _impure_ptr : PREENT;cvar;external;
+
+{$endif win32}
+{$endif not GDB_V416}
+type
+  tgdbbuffer=object
+    buf   : pchar;
+    size,
+    idx   : longint;
+{$ifndef GDB_V416}
+    link  : pgdb_file;
+{$endif not GDB_V416}
+    constructor Init;
+    destructor  Done;
+    procedure Reset;
+    procedure Resize(nsize : longint);
+    procedure Append(p:pchar);
+  end;
+
+  pgdbinterface=^tgdbinterface;
+  tgdbinterface=object
+    gdberrorbuf,
+    gdboutputbuf  : tgdbbuffer;
+    got_error,
+    reset_command,
+    call_reset,
+    Debuggee_started : boolean;
+    { frames and frame info while recording a frame }
+    frames        : ppframeentry;
+    frame_size,
+    frame_count   : longint;
+    record_frames,
+    frame_begin_seen : boolean;
+    frame_level,
+    command_level,
+    stop_breakpoint_number,
+    current_address,
+    current_line_number,
+    signal_start,
+    signal_end,
+    error_start,
+    error_end,
+    function_start,
+    function_end,
+    args_start,
+    args_end,
+    file_start,
+    file_end,
+    line_start,
+    line_end : longint;
+    { breakpoint }
+    last_breakpoint_number,
+    last_breakpoint_address,
+    last_breakpoint_line : longint;
+    last_breakpoint_file : pchar;
+    invalid_breakpoint_line : boolean;
+    { init }
+    constructor init;
+    destructor  done;
+    { Lowlevel }
+    function  error:boolean;
+    function  error_num:longint;
+    procedure gdb_command(const s:string);
+    procedure gdb__init;
+    procedure gdb_done;
+    procedure resize_frames;
+    function  add_frameentry:pframeentry;
+    function  get_frameentry(level : longint):pframeentry;
+    procedure clear_frames;
+    { Highlevel }
+    user_screen_shown,
+    switch_to_user     : boolean;
+    procedure GetAddrSyminfo(addr:longint;var si:tsyminfo);
+    procedure SelectSourceline(fn:pchar;line:longint);
+    procedure StartSession;
+    procedure BreakSession;
+    procedure EndSession(code:longint);
+    procedure DebuggerScreen;
+    procedure UserScreen;
+    { Hooks }
+    procedure DoSelectSourceline(const fn:string;line:longint);virtual;
+    procedure DoStartSession;virtual;
+    procedure DoBreakSession;virtual;
+    procedure DoEndSession(code:longint);virtual;
+    procedure DoDebuggerScreen;virtual;
+    procedure DoUserScreen;virtual;
+    function  AllowQuit : boolean;virtual;
+  end;
+
+
+function  GDBVersion : string;
+
+var
+  curr_gdb : pgdbinterface;
+
+const
+  use_gdb_file : boolean = false;
+var
+  gdb_file : text;
+
+{$ifdef go32v2}
+  { needed to be sure %fs contains the DOS memory selector
+    used in Mem[] code PM }
+  procedure reload_fs;
+{$endif go32v2}
+
+implementation
+
+uses
+{$ifdef win32}
+  initc,
+{$endif win32}
+{$ifdef linux}
+  linux,
+{$endif}
+{$ifdef go32v2}
+  go32,
+  dpmiexcp,
+  initc,
+{$endif}
+  strings;
+
+{*****************************************************************************
+                          Types used by libgdb.a
+*****************************************************************************}
+
+{$ifdef go32v2}
+type
+  jmp_buf = dpmi_jmp_buf;
+  pjmp_buf = pdpmi_jmp_buf;
+
+  function setjmp(var rec : jmp_buf) : longint;cdecl;external;
+
+  procedure longjmp(var rec : jmp_buf;return_value : longint);cdecl;external;
+
+  procedure reload_fs;assembler;
+  asm
+     movw  dosmemselector,%ax
+     movw  %ax,%fs
+  end['EAX'];
+
+{$endif}
+{$ifdef win32}
+  function setjmp(var rec : jmp_buf) : longint;cdecl;external;
+
+  procedure longjmp(var rec : jmp_buf;return_value : longint);cdecl;external;
+
+{$ifndef supportexceptions}
+type
+  { I don't think FPC would accept that
+    the funcvar return type is the funcvar type itself ! PM }
+  SignalHandler   = Procedure(Sig : LongInt);cdecl;
+  function signal(sig : longint;new_signal : SignalHandler) : SignalHandler;cdecl;external;
+
+{define supportexceptions not yet working }
+{$endif now exceptions are supported for win32}
+{$endif win32}
+
+  type
+     CORE_ADDR = longint;
+     pCORE_ADDR = ^CORE_ADDR;
+     pblock = ^block;
+
+     tlanguage = (language_unknown,language_auto,language_c,
+       language_cplus,language_java,language_chill,
+       language_fortran,language_m2,language_asm,
+       language_scm,language_pascal,language_objc);
+
+     bptype = (bp_breakpoint,bp_hardware_breakpoint,
+       bp_until,bp_finish,bp_watchpoint,bp_hardware_watchpoint,
+       bp_read_watchpoint,bp_access_watchpoint,
+       bp_longjmp,bp_longjmp_resume,bp_step_resume,
+       bp_through_sigtramp,bp_watchpoint_scope,
+       bp_call_dummy,bp_shlib_event);
+
+     tenable = (disabled,enabled,shlib_disabled);
+
+     bpdisp = (del,del_at_next_stop,disable,donttouch);
+
+{$PACKRECORDS 4}
+     pbreakpoint = ^breakpoint;
+     breakpoint = record
+          next : pbreakpoint;
+          typ : bptype;
+          enable : tenable;
+          disposition : bpdisp;
+          number : longint;
+          address : CORE_ADDR;
+          line_number : longint;
+          source_file : pchar;
+          silent : byte;
+          ignore_count : longint;
+          shadow_contents : array[0..15] of char;
+          inserted : char;
+          duplicate : char;
+          commands : pointer; {^command_line}
+          frame : CORE_ADDR;
+          cond : pointer; {^expression}
+          addr_string : ^char;
+          language : tlanguage;
+          input_radix : longint;
+          cond_string : ^char;
+          exp_string : ^char;
+          exp : pointer; {^expression}
+          exp_valid_block : pblock; {^block;}
+          val : pointer; {value_ptr;}
+          val_chain : pointer; {value_ptr;}
+          related_breakpoint : pbreakpoint;
+          watchpoint_frame : CORE_ADDR;
+          thread : longint;
+          hit_count : longint;
+          section : pointer; {^asection}
+       end;
+
+     tfreecode=(free_nothing,free_contents,free_linetable);
+
+     psymtab = ^symtab;
+     symtab = record
+          next : psymtab;
+          blockvector : pointer; {^blockvector;}
+          linetable : pointer; {^linetable;}
+          block_line_section : longint;
+          primary : longint;
+          filename : pchar;
+          dirname : pchar;
+          free_code : tfreecode;
+          free_ptr : pchar;
+          nlines : longint;
+          line_charpos : ^longint;
+          language : tlanguage;
+          Debugformat : pchar;
+          version : pchar;
+          fullname : pchar;
+          objfile : pointer; {^objfile;}
+       end;
+
+     psymtab_and_line = ^symtab_and_line;
+     symtab_and_line = record
+          symtab : psymtab;
+{$ifndef GDB_V416}
+          { v4.16 does not have the section field !! }
+          section : pointer; {^asection;}
+{$endif GDB_V416}
+          line : longint;
+          pc : CORE_ADDR;
+          _end : CORE_ADDR;
+       end;
+
+     symtabs_and_lines = record
+          sals : ^symtab_and_line;
+          nelts : longint;
+       end;
+
+    psymbol = ^symbol;
+    pminimal_symbol = ^minimal_symbol;
+
+    general_symbol_info = record
+  (* Name of the symbol.  This is a required field.  Storage for the name is
+     allocated on the psymbol_obstack or symbol_obstack for the associated
+     objfile. *)
+
+      _name : pchar;
+
+  (* Value of the symbol.  Which member of this union to use, and what
+     it means, depends on what kind of symbol this is and its
+     SYMBOL_CLASS.  See comments there for more details.  All of these
+     are in host byte order (though what they point to might be in
+     target byte order, e.g. LOC_CONST_BYTES).  *)
+     value : record
+       case integer of
+      (* The fact that this is a long not a LONGEST mainly limits the
+	 range of a LOC_CONST.  Since LOC_CONST_BYTES exists, I'm not
+	 sure that is a big deal.  *)
+       0 : (ivalue : longint;);
+
+       1 : (block  : pblock;);
+
+       2 : (bytes  : pchar;);
+
+       3 : (address : CORE_ADDR;);
+
+      (* for opaque typedef struct chain *)
+
+       4 : (chain : psymbol;);
+      end;
+
+  (* Since one and only one language can apply, wrap the language specific
+     information inside a union. *)
+
+   (* union
+    {
+      struct cplus_specific      /* For C++ */
+				/*  and Java */
+	{
+	  char *demangled_name;
+	} cplus_specific;
+      struct chill_specific      /* For Chill */
+	{
+	  char *demangled_name;
+	} chill_specific;
+    } language_specific; *)
+     demangled_name : pchar;
+
+  (* Record the source code language that applies to this symbol.
+     This is used to select one of the fields from the language specific
+     union above. *)
+
+    language : tlanguage;
+
+  (* Which section is this symbol in?  This is an index into
+     section_offsets for this objfile.  Negative means that the symbol
+     does not get relocated relative to a section.
+     Disclaimer: currently this is just used for xcoff, so don't
+     expect all symbol-reading code to set it correctly (the ELF code
+     also tries to set it correctly).  *)
+
+    section : word;
+
+  (* The bfd section associated with this symbol. *)
+
+    bfd_section : pointer {^asection};
+  end; { of general_symbol_info record declaration }
+
+  tminimal_symbol_type =
+    (
+      mst_unknown := 0,	        (* Unknown type, the default *)
+      mst_text,		        (* Generally executable instructions *)
+      mst_data,		        (* Generally initialized data *)
+      mst_bss,		        (* Generally uninitialized data *)
+      mst_abs,		        (* Generally absolute (nonrelocatable) *)
+      (* GDB uses mst_solib_trampoline for the start address of a shared
+	 library trampoline entry.  Breakpoints for shared library functions
+	 are put there if the shared library is not yet loaded.
+	 After the shared library is loaded, lookup_minimal_symbol will
+	 prefer the minimal symbol from the shared library (usually
+	 a mst_text symbol) over the mst_solib_trampoline symbol, and the
+	 breakpoints will be moved to their true address in the shared
+	 library via breakpoint_re_set.  *)
+      mst_solib_trampoline,     (* Shared library trampoline code *)
+      (* For the mst_file* types, the names are only guaranteed to be unique
+	 within a given .o file.  *)
+      mst_file_text,            (* Static version of mst_text *)
+      mst_file_data,	        (* Static version of mst_data *)
+      mst_file_bss	        (* Static version of mst_bss *)
+    );
+
+  namespace_enum = (
+  (* UNDEF_NAMESPACE is used when a namespace has not been discovered or
+     none of the following apply.  This usually indicates an error either
+     in the symbol information or in gdb's handling of symbols. *)
+  UNDEF_NAMESPACE,
+
+  (* VAR_NAMESPACE is the usual namespace.  In C, this contains variables,
+     function names, typedef names and enum type values. *)
+  VAR_NAMESPACE,
+
+  (* STRUCT_NAMESPACE is used in C to hold struct, union and enum type names.
+     Thus, if `struct foo' is used in a C program, it produces a symbol named
+     `foo' in the STRUCT_NAMESPACE. *)
+  STRUCT_NAMESPACE,
+
+  (* LABEL_NAMESPACE may be used for names of labels (for gotos);
+     currently it is not used and labels are not recorded at all.  *)
+  LABEL_NAMESPACE,
+
+  (* Searching namespaces. These overlap with VAR_NAMESPACE, providing
+     some granularity with the search_symbols function. *)
+  (* Everything in VAR_NAMESPACE minus FUNCTIONS_-, TYPES_-, and
+     METHODS_NAMESPACE *)
+  VARIABLES_NAMESPACE,
+
+  (* All functions -- for some reason not methods, though. *)
+  FUNCTIONS_NAMESPACE,
+
+  (* All defined types *)
+  TYPES_NAMESPACE,
+
+  (* All class methods -- why is this separated out? *)
+  METHODS_NAMESPACE
+
+  );
+  address_class = (
+  (* Not used; catches errors *)
+  LOC_UNDEF,
+
+  (* Value is constant int SYMBOL_VALUE, host byteorder *)
+  LOC_CONST,
+
+  (* Value is at fixed address SYMBOL_VALUE_ADDRESS *)
+  LOC_STATIC,
+
+  (* Value is in register.  SYMBOL_VALUE is the register number.  *)
+  LOC_REGISTER,
+
+  (* It's an argument; the value is at SYMBOL_VALUE offset in arglist.  *)
+  LOC_ARG,
+
+  (* Value address is at SYMBOL_VALUE offset in arglist.  *)
+  LOC_REF_ARG,
+
+  (* Value is in register number SYMBOL_VALUE.  Just like LOC_REGISTER
+     except this is an argument.  Probably the cleaner way to handle
+     this would be to separate address_class (which would include
+     separate ARG and LOCAL to deal with FRAME_ARGS_ADDRESS versus
+     FRAME_LOCALS_ADDRESS), and an is_argument flag.
+
+     For some symbol formats (stabs, for some compilers at least),
+     the compiler generates two symbols, an argument and a register.
+     In some cases we combine them to a single LOC_REGPARM in symbol
+     reading, but currently not for all cases (e.g. it's passed on the
+     stack and then loaded into a register).  *)
+  LOC_REGPARM,
+
+  (* Value is in specified register.  Just like LOC_REGPARM except the
+     register holds the address of the argument instead of the argument
+     itself. This is currently used for the passing of structs and unions
+     on sparc and hppa.  It is also used for call by reference where the
+     address is in a register, at least by mipsread.c.  *)
+  LOC_REGPARM_ADDR,
+
+  (* Value is a local variable at SYMBOL_VALUE offset in stack frame.  *)
+  LOC_LOCAL,
+
+  (* Value not used; definition in SYMBOL_TYPE.  Symbols in the namespace
+     STRUCT_NAMESPACE all have this class.  *)
+  LOC_TYPEDEF,
+
+  (* Value is address SYMBOL_VALUE_ADDRESS in the code *)
+  LOC_LABEL,
+
+  (* In a symbol table, value is SYMBOL_BLOCK_VALUE of a `struct block'.
+     In a partial symbol table, SYMBOL_VALUE_ADDRESS is the start address
+     of the block.  Function names have this class. *)
+  LOC_BLOCK,
+
+  (* Value is a constant byte-sequence pointed to by SYMBOL_VALUE_BYTES, in
+     target byte order.  *)
+  LOC_CONST_BYTES,
+
+  (* Value is arg at SYMBOL_VALUE offset in stack frame. Differs from
+     LOC_LOCAL in that symbol is an argument; differs from LOC_ARG in
+     that we find it in the frame (FRAME_LOCALS_ADDRESS), not in the
+     arglist (FRAME_ARGS_ADDRESS).  Added for i960, which passes args
+     in regs then copies to frame.  *)
+  LOC_LOCAL_ARG,
+
+  (* Value is at SYMBOL_VALUE offset from the current value of
+     register number SYMBOL_BASEREG.  This exists mainly for the same
+     things that LOC_LOCAL and LOC_ARG do; but we need to do this
+     instead because on 88k DWARF gives us the offset from the
+     frame/stack pointer, rather than the offset from the "canonical
+     frame address" used by COFF, stabs, etc., and we don't know how
+     to convert between these until we start examining prologues.
+
+     Note that LOC_BASEREG is much less general than a DWARF expression.
+     We don't need the generality (at least not yet), and storing a general
+     DWARF expression would presumably take up more space than the existing
+     scheme.  *)
+  LOC_BASEREG,
+
+  (* Same as LOC_BASEREG but it is an argument.  *)
+  LOC_BASEREG_ARG,
+
+  (* Value is at fixed address, but the address of the variable has
+     to be determined from the minimal symbol table whenever the
+     variable is referenced.
+     This happens if debugging information for a global symbol is
+     emitted and the corresponding minimal symbol is defined
+     in another object file or runtime common storage.
+     The linker might even remove the minimal symbol if the global
+     symbol is never referenced, in which case the symbol remains
+     unresolved.  *)
+  LOC_UNRESOLVED,
+
+  (* Value is at a thread-specific location calculated by a
+     target-specific method. *)
+  LOC_THREAD_LOCAL_STATIC,
+
+  (* The variable does not actually exist in the program.
+     The value is ignored.  *)
+  LOC_OPTIMIZED_OUT,
+
+  (* The variable is static, but actually lives at * (address).
+   * I.e. do an extra indirection to get to it.
+   * This is used on HP-UX to get at globals that are allocated
+   * in shared libraries, where references from images other
+   * than the one where the global was allocated are done
+   * with a level of indirection.
+   *)
+  LOC_INDIRECT
+  );
+
+   minimal_symbol = record
+  (* The general symbol info required for all types of symbols.
+     The SYMBOL_VALUE_ADDRESS contains the address that this symbol
+     corresponds to.  *)
+    ginfo : general_symbol_info;
+
+  (* The info field is available for caching machine-specific information
+     so it doesn't have to rederive the info constantly (over a serial line).
+     It is initialized to zero and stays that way until target-dependent code
+     sets it.  Storage for any data pointed to by this field should be allo-
+     cated on the symbol_obstack for the associated objfile.
+     The type would be "void *" except for reasons of compatibility with older
+     compilers.  This field is optional.
+
+     Currently, the AMD 29000 tdep.c uses it to remember things it has decoded
+     from the instructions in the function header, and the MIPS-16 code uses
+     it to identify 16-bit procedures.  *)
+
+    info : pchar;
+
+{$ifdef SOFUN_ADDRESS_MAYBE_MISSING}
+  (* Which source file is this symbol in?  Only relevant for mst_file_*.  *)
+    filename : pchar;
+{$endif}
+
+  (* Classification types for this symbol.  These should be taken as "advisory
+     only", since if gdb can't easily figure out a classification it simply
+     selects mst_unknown.  It may also have to guess when it can't figure out
+     which is a better match between two types (mst_data versus mst_bss) for
+     example.  Since the minimal symbol info is sometimes derived from the
+     BFD library's view of a file, we need to live with what information bfd
+     supplies. *)
+
+    minimal_symbol_type : tminimal_symbol_type;
+  end{ of minimal_symbol};
+
+  block = record
+  (* Addresses in the executable code that are in this block.  *)
+  startaddr,
+  endaddr : CORE_ADDR ;
+
+  (* The symbol that names this block, if the block is the body of a
+     function; otherwise, zero.  *)
+  _function : psymbol;
+
+  (* The `struct block' for the containing block, or 0 if none.
+     The superblock of a top-level local block (i.e. a function in the
+     case of C) is the STATIC_BLOCK.  The superblock of the
+     STATIC_BLOCK is the GLOBAL_BLOCK.  *)
+
+  superblock : pblock;
+
+  (* Version of GCC used to compile the function corresponding
+     to this block, or 0 if not compiled with GCC.  When possible,
+     GCC should be compatible with the native compiler, or if that
+     is not feasible, the differences should be fixed during symbol
+     reading.  As of 16 Apr 93, this flag is never used to distinguish
+     between gcc2 and the native compiler.
+
+     If there is no function corresponding to this block, this meaning
+     of this flag is undefined.  *)
+
+  gcc_compile_flag : byte;
+
+  (* Number of local symbols.  *)
+  nsyms : longint;
+
+  (* The symbols.  If some of them are arguments, then they must be
+     in the order in which we would like to print them.  *)
+  sym : array [0..0] of psymbol;
+  end { of block definition };
+
+  symbol = record
+  (* The general symbol info required for all types of symbols. *)
+    ginfo : general_symbol_info;
+
+  (* Data type of value *)
+    _type : pointer{ptype};
+
+  (* Name space code.  *)
+  namespace : namespace_enum;
+
+  (* Address class *)
+
+  aclass : address_class;
+
+  (* Line number of definition.  FIXME:  Should we really make the assumption
+     that nobody will try to debug files longer than 64K lines?  What about
+     machine generated programs? *)
+
+  line : word;
+
+  (* Some symbols require an additional value to be recorded on a per-
+     symbol basis.  Stash those values here. *)
+
+  (*union
+    {
+      /* Used by LOC_BASEREG and LOC_BASEREG_ARG.  */
+      short basereg;
+    } *)
+  aux_value_base_reg : word;
+
+  (* Link to a list of aliases for this symbol.
+     Only a "primary/main symbol may have aliases.  *)
+  aliases : pointer{palias_list};
+
+  (* List of ranges where this symbol is active.  This is only
+     used by alias symbols at the current time.  *)
+  ranges : pointer{prange_list};
+  end;
+
+     target_signal = (TARGET_SIGNAL_FIRST := 0,
+       TARGET_SIGNAL_HUP := 1,TARGET_SIGNAL_INT := 2,
+       TARGET_SIGNAL_QUIT := 3,TARGET_SIGNAL_ILL := 4,
+       TARGET_SIGNAL_TRAP := 5,TARGET_SIGNAL_ABRT := 6,
+       TARGET_SIGNAL_EMT := 7,TARGET_SIGNAL_FPE := 8,
+       TARGET_SIGNAL_KILL := 9,TARGET_SIGNAL_BUS := 10,
+       TARGET_SIGNAL_SEGV := 11,TARGET_SIGNAL_SYS := 12,
+       TARGET_SIGNAL_PIPE := 13,TARGET_SIGNAL_ALRM := 14,
+       TARGET_SIGNAL_TERM := 15,TARGET_SIGNAL_URG := 16,
+       TARGET_SIGNAL_STOP := 17,TARGET_SIGNAL_TSTP := 18,
+       TARGET_SIGNAL_CONT := 19,TARGET_SIGNAL_CHLD := 20,
+       TARGET_SIGNAL_TTIN := 21,TARGET_SIGNAL_TTOU := 22,
+       TARGET_SIGNAL_IO := 23,TARGET_SIGNAL_XCPU := 24,
+       TARGET_SIGNAL_XFSZ := 25,TARGET_SIGNAL_VTALRM := 26,
+       TARGET_SIGNAL_PROF := 27,TARGET_SIGNAL_WINCH := 28,
+       TARGET_SIGNAL_LOST := 29,TARGET_SIGNAL_USR1 := 30,
+       TARGET_SIGNAL_USR2 := 31,TARGET_SIGNAL_PWR := 32,
+       TARGET_SIGNAL_POLL := 33,TARGET_SIGNAL_WIND := 34,
+       TARGET_SIGNAL_PHONE := 35,TARGET_SIGNAL_WAITING := 36,
+       TARGET_SIGNAL_LWP := 37,TARGET_SIGNAL_DANGER := 38,
+       TARGET_SIGNAL_GRANT := 39,TARGET_SIGNAL_RETRACT := 40,
+       TARGET_SIGNAL_MSG := 41,TARGET_SIGNAL_SOUND := 42,
+       TARGET_SIGNAL_SAK := 43,TARGET_SIGNAL_PRIO := 44,
+       TARGET_SIGNAL_REALTIME_33 := 45,TARGET_SIGNAL_REALTIME_34 := 46,
+       TARGET_SIGNAL_REALTIME_35 := 47,TARGET_SIGNAL_REALTIME_36 := 48,
+       TARGET_SIGNAL_REALTIME_37 := 49,TARGET_SIGNAL_REALTIME_38 := 50,
+       TARGET_SIGNAL_REALTIME_39 := 51,TARGET_SIGNAL_REALTIME_40 := 52,
+       TARGET_SIGNAL_REALTIME_41 := 53,TARGET_SIGNAL_REALTIME_42 := 54,
+       TARGET_SIGNAL_REALTIME_43 := 55,TARGET_SIGNAL_REALTIME_44 := 56,
+       TARGET_SIGNAL_REALTIME_45 := 57,TARGET_SIGNAL_REALTIME_46 := 58,
+       TARGET_SIGNAL_REALTIME_47 := 59,TARGET_SIGNAL_REALTIME_48 := 60,
+       TARGET_SIGNAL_REALTIME_49 := 61,TARGET_SIGNAL_REALTIME_50 := 62,
+       TARGET_SIGNAL_REALTIME_51 := 63,TARGET_SIGNAL_REALTIME_52 := 64,
+       TARGET_SIGNAL_REALTIME_53 := 65,TARGET_SIGNAL_REALTIME_54 := 66,
+       TARGET_SIGNAL_REALTIME_55 := 67,TARGET_SIGNAL_REALTIME_56 := 68,
+       TARGET_SIGNAL_REALTIME_57 := 69,TARGET_SIGNAL_REALTIME_58 := 70,
+       TARGET_SIGNAL_REALTIME_59 := 71,TARGET_SIGNAL_REALTIME_60 := 72,
+       TARGET_SIGNAL_REALTIME_61 := 73,TARGET_SIGNAL_REALTIME_62 := 74,
+       TARGET_SIGNAL_REALTIME_63 := 75,TARGET_SIGNAL_UNKNOWN,
+       TARGET_SIGNAL_DEFAULT,TARGET_SIGNAL_LAST
+       );
+
+     strata = (dummy_stratum,file_stratum,core_stratum,download_stratum,process_stratum);
+
+     ptarget_ops = ^target_ops;
+     target_ops = record
+          to_shortname : pchar;
+          to_longname : pchar;
+          to_doc : pchar;
+          to_open : procedure (_para1:pchar; _para2:longint);
+          to_close : procedure (_para1:longint);
+          to_attach : procedure (_para1:pchar; _para2:longint);
+          to_detach : procedure (_para1:pchar; _para2:longint);
+          to_resume : procedure (_para1:longint; _para2:longint; _para3:target_signal);
+          to_wait : pointer; {function (_para1:longint; _para2:ptarget_waitstatus):longint;}
+          to_fetch_registers : procedure (_para1:longint);
+          to_store_registers : procedure (_para1:longint);
+          to_prepare_to_store : procedure ;
+          to_xfer_memory : function (memaddr:CORE_ADDR; myaddr:pchar; len:longint; write:longint; target:ptarget_ops):longint;
+          to_files_info : procedure (_para1:ptarget_ops);
+          to_insert_breakpoint : function (_para1:CORE_ADDR; _para2:pchar):longint;
+          to_remove_breakpoint : function (_para1:CORE_ADDR; _para2:pchar):longint;
+          to_terminal_init : procedure ;
+          to_terminal_inferior : procedure ;
+          to_terminal_ours_for_output : procedure ;
+          to_terminal_ours : procedure ;
+          to_terminal_info : procedure (_para1:pchar; _para2:longint);
+          to_kill : procedure ;
+          to_load : procedure (_para1:pchar; _para2:longint);
+          to_lookup_symbol : function (_para1:pchar; _para2:pCORE_ADDR):longint;
+          to_create_inferior : procedure (_para1:pchar; _para2:pchar; _para3:ppchar);
+          to_mourn_inferior : procedure ;
+          to_can_run : function :longint;
+          to_notice_signals : procedure (pid:longint);
+          to_thread_alive : function (pid:longint):longint;
+          to_stop : procedure ;
+          to_stratum : strata;
+          DONT_USE : pointer;
+          to_has_all_memory : longint;
+          to_has_memory : longint;
+          to_has_stack : longint;
+          to_has_registers : longint;
+          to_has_execution : longint;
+          to_sections : pointer; {^section_table}
+          to_sections_end : pointer; {^section_table}
+          to_magic : longint;
+       end;
+
+{$PACKRECORDS NORMAL}
+
+{*****************************************************************************
+                   Define external calls to libgdb.a
+*****************************************************************************}
+
+var
+{ external variables }
+  error_return : jmp_buf;cvar;external;
+  quit_return  : jmp_buf;cvar;external;
+  inferior_pid : longint;cvar;external;
+  create_breakpoint_hook : pointer;cvar;external;
+  current_target : target_ops;cvar;external;
+  stop_pc      : CORE_ADDR;cvar;external;
+
+{ we need also to declare some vars }
+  watchdog      : longint;cvar;public;
+  gdb_error     : longint;cvar;public;
+  display_time  : longbool;cvar;public;
+  display_space : longbool;cvar;public;
+
+{$ifndef GDB_V416}
+{ the following are also needed from version 4.18 }
+
+{ Whether this is the command line version or not }
+  tui_version : longint;cvar;public;
+
+{ Whether xdb commands will be handled }
+  xdb_commands : longint;cvar;public;
+
+{ Whether dbx commands will be handled }
+  dbx_commands : longint;cvar;public;
+
+var
+  gdb_stdout : PGDB_FILE;cvar;public;
+  gdb_stderr : PGDB_FILE;cvar;public;
+
+{ used for gdb_stdout and gdb_stderr }
+function xmalloc(size : longint) : pointer;cdecl;external;
+
+{$endif not GDB_V416}
+
+function  find_pc_line(i:CORE_ADDR;l:longint):symtab_and_line;cdecl;external;
+function  find_pc_function(i:CORE_ADDR):psymbol;cdecl;external;
+function  lookup_minimal_symbol_by_pc(i : CORE_ADDR):pminimal_symbol;cdecl;external;
+procedure gdb_init;cdecl;external;
+procedure execute_command(p:pchar;i:longint);cdecl;external;
+procedure target_kill;cdecl;external;
+procedure target_close(i:longint);cdecl;external;
+
+
+{*****************************************************************************
+                                 Helpers
+*****************************************************************************}
+
+procedure Debug(const s:string);
+begin
+  if use_gdb_file then
+    Writeln(gdb_file,s)
+  else
+    Writeln(s);
+end;
+
+
+{*****************************************************************************
+                               TFrameEntry
+*****************************************************************************}
+
+constructor tframeentry.init;
+begin
+  Reset;
+end;
+
+destructor tframeentry.done;
+begin
+  Clear;
+end;
+
+procedure tframeentry.reset;
+begin
+  file_name:=nil;
+  function_name:=nil;
+  args:=nil;
+  line_number:=0;
+  address:=0;
+end;
+
+procedure tframeentry.clear;
+begin
+  if assigned(file_name) then
+   strdispose(file_name);
+  if assigned(function_name) then
+   strdispose(function_name);
+  if assigned(args) then
+   strdispose(args);
+  reset;
+end;
+
+
+{*****************************************************************************
+                                 tgdbbuffer
+*****************************************************************************}
+
+const
+  blocksize=2048;
+
+constructor tgdbbuffer.init;
+begin
+  Buf:=nil;
+{$ifndef GDB_V416}
+  link:=nil;
+{$endif not GDB_V416}
+  Size:=0;
+  Resize(blocksize);
+  Reset;
+end;
+
+
+destructor tgdbbuffer.done;
+begin
+  if assigned(buf) then
+    freemem(buf,size);
+{$ifndef GDB_V416}
+  if assigned(link) then
+    begin
+      link^.ts_streamtype:=afile;
+      link^.ts_strbuf:=nil;
+      link^.ts_buflen:=0;
+    end;
+{$endif not GDB_V416}
+end;
+
+
+
+procedure tgdbbuffer.reset;
+begin
+  idx:=0;
+  Buf[0]:=#0;
+end;
+
+
+procedure tgdbbuffer.append(p:pchar);
+var
+  len : longint;
+begin
+  if not assigned(p) then
+   exit;
+  len:=Strlen(p);
+  if len+idx>size then
+   Resize(len+idx);
+  Move(p^,buf[idx],len);
+  inc(idx,len);
+  buf[idx]:=#0;
+end;
+
+
+procedure tgdbbuffer.resize(nsize : longint);
+var
+  np    : pchar;
+begin
+  nsize:=((nsize+blocksize-1) div blocksize)*blocksize;
+  getmem(np,nsize);
+  if assigned(buf) then
+    begin
+       move(buf^,np^,size);
+       freemem(buf,size);
+    end;
+  buf:=np;
+  size:=nsize;
+{$ifndef GDB_V416}
+  if assigned(link) then
+    begin
+      link^.ts_strbuf:=buf;
+      link^.ts_buflen:=size;
+    end;
+{$endif not GDB_V416}
+end;
+
+
+{*****************************************************************************
+                         Hook calls from libgdb.a
+*****************************************************************************}
+
+{$ifdef go32v2}
+procedure gdbpas_prev_exception_handler;cdecl;public;
+begin
+end;
+{$endif go32v2}
+
+procedure init_proc;cdecl;public;
+begin
+end;
+
+
+procedure annotate_signalled;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|signalled|');
+{$endif}
+end;
+
+
+procedure annotate_signal_name;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|signal_name|');
+  with curr_gdb^ do
+   signal_start:=gdboutputbuf.idx;
+{$endif}
+end;
+
+
+procedure annotate_signal_name_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|signal_name_end|');
+{$endif}
+end;
+
+
+procedure annotate_signal_string;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|signal_string|');
+{$endif}
+end;
+
+
+procedure annotate_signal_string_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|signal_string_end|');
+{$endif}
+  with curr_gdb^ do
+   begin
+     signal_end:=gdboutputbuf.idx;
+{
+  signal = (char *)alloca(signal_end-signal_start+1);
+  strncpy(signal,gdb_output_buffer+signal_start,signal_end-signal_start);
+  signal[signal_end-signal_start] = 0;
+  if (user_screen_shown)
+    __DebuggerScreen();
+    _UserWarning(WARN_SIGNALED,signal);
+    __UserScreen();
+  else
+    _UserWarning(WARN_SIGNALED,signal); }
+     call_reset:=true;
+   end;
+end;
+
+
+procedure annotate_signal;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|signal|');
+{$endif}
+end;
+
+
+procedure annotate_exited(exitstatus:longint);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|exited|');
+{$endif}
+{#ifdef __DJGPP__
+ /* this is very important. The exit code of a djgpp program
+   disables interrupts and after this there is no other interrupt
+   called, which enables interrupts with the iret. */
+  __dpmi_get_and_enable_virtual_interrupt_state();
+#endif }
+{$ifdef go32v2}
+   {$asmmode att}
+     asm
+        movw $0x901,%ax
+        int  $0x31
+     end;
+   {$asmmode default}
+   reload_fs;
+{$endif def go32v2}
+
+  curr_gdb^.DebuggerScreen;
+{  DeleteBreakPoints; }
+  curr_gdb^.EndSession(exitstatus);
+end;
+
+
+procedure annotate_error;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|error|');
+{$endif}
+end;
+
+
+procedure annotate_error_begin;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|error begin|');
+{$endif}
+  with curr_gdb^ do
+   begin
+     error_start:=gdboutputbuf.idx+strlen(gdboutputbuf.buf);
+     got_error:=true;
+   end;
+{$ifdef Debug}
+  Debug('|end of error begin|');
+{$endif}
+end;
+
+
+procedure annotate_starting;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|starting|');
+{$endif}
+{$ifdef go32v2}
+     reload_fs;
+{$endif go32v2}
+  curr_gdb^.UserScreen;
+end;
+
+
+procedure annotate_stopped;cdecl;public;
+var
+  sym : symtab_and_line;
+  fname : pchar;
+begin
+{$ifdef Debug}
+  Debug('|stopped|');
+{$endif}
+  with curr_gdb^ do
+   begin
+{$ifdef go32v2}
+     reload_fs;
+{$endif go32v2}
+     DebuggerScreen;
+     Debuggee_started:=inferior_pid<>0;
+     if not Debuggee_started then exit;
+     if reset_command then exit;
+      sym:=find_pc_line(stop_pc,0);
+     if assigned(sym.symtab) then
+      fname:=sym.symtab^.filename
+     else
+      fname:=nil;
+     SelectSourceLine(fname,sym.line);
+   end;
+end;
+
+
+procedure proc_remove_foreign(pid:longint);cdecl;public;
+begin
+end;
+
+
+procedure breakpoints_changed;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|breakpoints_changed|');
+{$endif}
+end;
+
+
+procedure annotate_breakpoint(num:longint);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|breakpoint(%d)|');
+{$endif}
+  With Curr_gdb^ do
+    stop_breakpoint_number:=num;
+end;
+
+
+procedure annotate_watchpoint(num:longint);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|watchpoint(%d)|');
+{$endif}
+  With Curr_gdb^ do
+    stop_breakpoint_number:=num;
+end;
+
+procedure annotate_catchpoint(num:longint);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|catchpoint(%d)|');
+{$endif}
+  With Curr_gdb^ do
+    stop_breakpoint_number:=num;
+end;
+
+
+procedure annotate_breakpoints_headers;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|breakpoints_headers|');
+{$endif}
+end;
+
+
+procedure annotate_breakpoints_table;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|breakpoints_table|');
+{$endif}
+end;
+
+
+procedure annotate_record;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|record|');
+{$endif}
+end;
+
+
+procedure annotate_breakpoints_table_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|breakpoints_table_end|');
+{$endif}
+end;
+
+
+procedure annotate_frames_invalid;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frames_invalid|');
+{$endif}
+end;
+
+
+procedure annotate_frame_begin(level:longint;pc:CORE_ADDR);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frame_begin(%d,%ld)|');
+{$endif}
+  with curr_gdb^ do
+   begin
+     frame_begin_seen:=true;
+     frame_level:=level;
+     current_address:=pc;
+     current_line_number:=-1;
+     function_start:=-1;
+     function_end:=-1;
+     args_start:=-1;
+     args_end:=-1;
+     file_start:=-1;
+     file_end:=-1;
+     line_start:=-1;
+     line_end:=-1;
+   end;
+end;
+
+
+procedure annotate_frame_address;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frame_address|');
+{$endif}
+end;
+
+
+procedure annotate_frame_address_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frame_address_end|');
+{$endif}
+end;
+
+procedure annotate_frame_function_name;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frame_function_name|');
+{$endif}
+  with curr_gdb^ do
+   function_start:=gdboutputbuf.idx;
+end;
+
+
+procedure annotate_frame_args;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frame_args|');
+{$endif}
+  with curr_gdb^ do
+   begin
+     function_end:=gdboutputbuf.idx;
+     args_start:=gdboutputbuf.idx;
+   end;
+end;
+
+procedure annotate_frame_source_begin;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frame_source_begin|');
+{$endif}
+  with curr_gdb^ do
+   args_end:=gdboutputbuf.idx;
+end;
+
+
+procedure annotate_frame_source_file;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frame_source_file|');
+{$endif}
+  with curr_gdb^ do
+   file_start:=gdboutputbuf.idx;
+end;
+
+procedure annotate_frame_source_file_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frame_source_file_end|');
+{$endif}
+  with curr_gdb^ do
+   file_end:=gdboutputbuf.idx;
+end;
+
+
+procedure annotate_frame_source_line;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frame_source_line|');
+{$endif}
+  with curr_gdb^ do
+   line_start:=gdboutputbuf.idx;
+end;
+
+
+procedure annotate_frame_source_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frame_source_end|');
+{$endif}
+  with curr_gdb^ do
+   line_end:=gdboutputbuf.idx;
+end;
+
+
+procedure annotate_frame_where;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|frame_where|');
+{$endif}
+end;
+
+
+procedure annotate_frame_end;cdecl;public;
+var
+  fe : pframeentry;
+  c  : char;
+  err : integer;
+begin
+{$ifdef Debug}
+  Debug('|frame_end|');
+{$endif}
+  with curr_gdb^ do
+   begin
+     if (not record_frames) and (not frame_begin_seen) then
+      exit;
+     { This can happen, when the function has no Debugging information }
+     if (args_start >= 0) and (args_end < 0) then
+      args_end:=gdboutputbuf.idx;
+     frame_begin_seen:=false;
+     fe:=get_frameentry(frame_level);
+     fe^.address:=current_address;
+     fe^.level:=frame_level;
+     if (function_start>=0) then
+      begin
+        c:=gdboutputbuf.buf[function_end];
+        gdboutputbuf.buf[function_end]:=#0;
+        fe^.function_name:=strnew(gdboutputbuf.buf+function_start);
+        gdboutputbuf.buf[function_end]:=c;
+      end;
+     if (file_start>=0)  then
+      begin
+        c:=gdboutputbuf.buf[file_end];
+        gdboutputbuf.buf[file_end]:=#0;
+        fe^.file_name:=strnew(gdboutputbuf.buf+file_start);
+        gdboutputbuf.buf[file_end]:=c;
+      end;
+     if (args_start>=0) then
+      begin
+        if (gdboutputbuf.buf[args_end-1]=#10) then
+         dec(args_end);
+        c:=gdboutputbuf.buf[args_end];
+        gdboutputbuf.buf[args_end]:=#0;
+        fe^.args:=strnew(gdboutputbuf.buf+args_start);
+        gdboutputbuf.buf[args_end]:=c;
+      end;
+     if (line_start>=0) then
+      begin
+        c:=gdboutputbuf.buf[line_end];
+        gdboutputbuf.buf[line_end]:=#0;
+{     sscanf(gdb_output_buffer+line_start,'%d',&fe^.line_number); }
+        val(strpas(pchar(@gdboutputbuf.buf[line_start])),fe^.line_number,err);
+        gdboutputbuf.buf[line_end]:=c;
+      end;
+   end;
+end;
+
+
+procedure annotate_quit;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|quit|');
+{$endif}
+end;
+
+
+procedure annotate_arg_begin;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|arg_begin|');
+{$endif}
+end;
+
+
+procedure annotate_arg_name_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|arg_name_end|');
+{$endif}
+end;
+
+
+procedure annotate_arg_value(typ:pointer);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|arg_value|');
+{$endif}
+end;
+
+
+procedure annotate_arg_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|arg_end|');
+{$endif}
+end;
+
+procedure annotate_source(filename:pchar;line,character,mid:longint;pc:CORE_ADDR);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|source|');
+{$endif}
+end;
+
+
+procedure annotate_function_call;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|function_call|');
+{$endif}
+end;
+
+
+procedure annotate_signal_handler_caller;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|signal_handler_caller|');
+{$endif}
+end;
+
+
+procedure annotate_array_section_begin(index:longint;elttype:pointer);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|array_section_begin()|');
+{$endif}
+end;
+
+
+procedure annotate_elt_rep(repcount:longint);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|elt_rep()|');
+{$endif}
+end;
+
+procedure annotate_elt_rep_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|elt_rep_end|');
+{$endif}
+end;
+
+
+procedure annotate_elt;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|elt|');
+{$endif}
+end;
+
+
+procedure annotate_array_section_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|array_section_end|');
+{$endif}
+end;
+
+procedure annotate_display_begin;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|display_begin|');
+{$endif}
+end;
+
+
+procedure annotate_display_number_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|display_number_end|');
+{$endif}
+end;
+
+
+procedure annotate_display_format;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|display_format|');
+{$endif}
+end;
+
+procedure annotate_display_expression;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|display_expression|');
+{$endif}
+end;
+
+
+procedure annotate_display_expression_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|display_expression_end|');
+{$endif}
+end;
+
+
+procedure annotate_display_value;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|display_value|');
+{$endif}
+end;
+
+
+procedure annotate_display_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('|display_end|');
+{$endif}
+end;
+
+
+procedure annotate_field (num:longint);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('a_field(%d)');
+{$endif}
+end;
+
+
+procedure annotate_field_begin(typ:pointer);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('a_field_begin\n');
+{$endif}
+end;
+
+
+procedure annotate_field_name_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('a_field_name_end\n');
+{$endif}
+end;
+
+
+procedure annotate_field_value;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('a_field_value\n');
+{$endif}
+end;
+
+
+procedure annotate_field_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('a_field_end\n');
+{$endif}
+end;
+
+
+procedure annotate_value_history_begin (histindex:longint;typ:pointer);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('a_value_history_begin(%d)\n');
+{$endif}
+end;
+
+
+procedure annotate_value_begin (typ:pointer);cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('a_value_begin\n');
+{$endif}
+end;
+
+
+procedure annotate_value_history_value;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('a_value_history_value\n');
+{$endif}
+end;
+
+
+procedure annotate_value_history_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('a_value_history_end\n');
+{$endif}
+end;
+
+
+procedure annotate_value_end;cdecl;public;
+begin
+{$ifdef Debug}
+  Debug('a_value_end\n');
+{$endif}
+end;
+
+
+procedure _initialize_annotate;cdecl;public;
+begin
+end;
+
+
+procedure fputs_unfiltered(linebuffer:pchar;stream:pointer);cdecl;public;
+begin
+  with curr_gdb^ do
+{$ifndef gdb_v416}
+  if stream = gdb_stderr then
+     gdberrorbuf.append(linebuffer)
+  else
+{$endif not gdb_v416}
+     gdboutputbuf.append(linebuffer);
+end;
+
+
+procedure CreateBreakPointHook(var b:breakpoint);cdecl;
+var
+  sym : symtab_and_line;
+begin
+  sym:=find_pc_line(b.address,0);
+  with curr_gdb^ do
+   begin
+     last_breakpoint_number:=b.number;
+     { function breakpoints have zero as file and as line !!
+       but they are valid !! }
+     invalid_breakpoint_line:=(b.line_number<>sym.line) and (b.line_number<>0);
+     last_breakpoint_address:=b.address;
+     last_breakpoint_line:=sym.line;
+     if assigned(sym.symtab) then
+      last_breakpoint_file:=sym.symtab^.filename
+     else
+      last_breakpoint_file:=nil;
+   end;
+end;
+
+
+{*****************************************************************************
+                                 tgdbinterface
+*****************************************************************************}
+
+constructor tgdbinterface.init;
+begin
+  gdboutputbuf.init;
+  gdberrorbuf.init;
+{$ifndef GDB_V416}
+(* GDB_FILE *
+  gdb_file_init_astring (n)
+    int n;
+  should we use xmalloc ?
+  gdb could resize the buffer => crash,
+  but normally it should not if unfiltered !! PM *)
+  gdb_stdout^.ts_streamtype := astring;
+  gdb_stdout^.ts_strbuf := gdboutputbuf.buf;
+  gdb_stdout^.ts_buflen := gdboutputbuf.size;
+  gdboutputbuf.link:=gdb_stdout;
+
+  gdb_stderr^.ts_streamtype := astring;
+  gdb_stderr^.ts_strbuf := gdberrorbuf.buf;
+  gdb_stderr^.ts_buflen := gdberrorbuf.size;
+  gdberrorbuf.link:=gdb_stderr;
+{$endif not GDB_V416}
+
+  gdb__init;
+  curr_gdb:=@self;
+  command_level:=0;
+{ set output mode for GDB }
+{ only these values disable filtering
+  DONT CHANGE THEM !!! PM }
+  gdb_command('set width 0xffffffff');
+  gdb_command('set height 0xffffffff');
+{ other standard commands used for fpc debugging }
+  gdb_command('set print demangle off');
+  gdb_command('set gnutarget auto');
+  gdb_command('set language auto');
+  gdb_command('set print vtbl on');
+  gdb_command('set print object on');
+  gdb_command('set print null-stop');
+end;
+
+
+destructor tgdbinterface.done;
+begin
+  clear_frames;
+  gdb_done;
+  gdboutputbuf.done;
+  gdberrorbuf.done;
+end;
+
+
+procedure tgdbinterface.gdb__init;
+begin
+  gdboutputbuf.reset;
+  gdberrorbuf.reset;
+  create_breakpoint_hook:=@CreateBreakPointHook;
+end;
+
+
+
+procedure tgdbinterface.gdb_done;
+begin
+  if debuggee_started then
+    begin
+      current_target.to_kill;
+      current_target.to_close(1);
+    end;
+  create_breakpoint_hook:=nil;
+end;
+
+
+function tgdbinterface.error:boolean;
+begin
+  error:=got_error;
+end;
+
+function tgdbinterface.error_num:longint;
+begin
+  error_num:=gdb_error;
+end;
+
+var
+   top_level_val : longint;
+
+procedure tgdbinterface.gdb_command(const s:string);
+var
+  command          : array[0..256] of char;
+  s2 : string;
+  old_quit_return,
+  old_error_return : jmp_buf;
+begin
+  inc(command_level);
+  move(s[1],command,length(s));
+  command[length(s)]:=#0;
+  old_quit_return:=quit_return;
+  old_error_return:=error_return;
+  gdb_error:=0;
+  got_error:=false;
+  stop_breakpoint_number:=0;
+  { Trap quit commands }
+  s2:=s;
+  while (length(s2)>0) and ((s2[1]=' ') or (s2[1]=#9)) do
+    s2:=copy(s2,2,255);
+  if (length(s2)>0) and
+     (s2[1]='q') and
+     ((length(s2)=1) or
+      (s2[2]=' ') or
+      ((s2[2]='u') and
+      ((length(s2)=2) or
+       (s2[3]=' ') or
+       ((s2[3]='i') and
+        ((length(s2)=3) or
+         (s2[4]=' ') or
+         ((s2[4]='t') and
+          ((length(s2)=4) or
+           (s2[5]=' ')
+     ))))))) then
+    begin
+      if not AllowQuit then
+        exit;
+    end;
+{$ifdef DebugCommand}
+  Debug('start of handle_gdb_command ('+s+')');
+{$endif}
+  top_level_val:=setjmp(error_return);
+  if top_level_val=0 then
+   begin
+     quit_return:=error_return;
+     execute_command(@command,0);
+{$ifdef go32v2}
+     reload_fs;
+{$endif go32v2}
+   end
+  else
+{$ifdef Debug}
+    Debug('error longjmp in handle_gdb_command ('+s+')');
+{$endif}
+   ;
+{$ifdef DebugCommand}
+  Debug('end of handle_gdb_command ('+s+')');
+{$endif}
+  quit_return:=old_quit_return;
+  error_return:=old_error_return;
+  dec(command_level);
+end;
+
+
+procedure tgdbinterface.resize_frames;
+var
+  i : longint;
+  new_frames : ppframeentry;
+begin
+  if (frame_count>=frame_size) then
+   begin
+     getmem(new_frames,sizeof(pointer)*(frame_count+1));
+     for i:=0 to frame_size-1 do
+       new_frames[i]:=frames[i];
+     if assigned(frames) then
+       freemem(frames,sizeof(pointer)*frame_size);
+     frames:=new_frames;
+     frame_size:=frame_count+1;
+     for i:=frame_count to frame_size-1 do
+      frames[i]:=new(pframeentry,init);
+  end;
+end;
+
+
+function tgdbinterface.add_frameentry:pframeentry;
+begin
+  resize_frames;
+  add_frameentry:=frames[frame_count];
+  inc(frame_count);
+end;
+
+function tgdbinterface.get_frameentry(level : longint) : pframeentry;
+begin
+  { only climb values one by one PM }
+  if level>=frame_count then
+    resize_frames;
+  get_frameentry:=frames[level];
+  frames[level]^.clear;
+  if level>=frame_count then
+    inc(frame_count);
+end;
+
+
+procedure tgdbinterface.clear_frames;
+var
+  i : longint;
+begin
+  for i:=0 to frame_size-1 do
+   dispose(frames[i],done);
+  freemem(frames,sizeof(pointer)*Frame_size);
+  frame_count:=0;
+  frame_size:=0;
+end;
+
+
+{*****************************************************************************
+                      Highlevel tgdbinterface
+*****************************************************************************}
+
+procedure tgdbinterface.GetAddrSyminfo(addr:longint;var si:tsyminfo);
+var
+  sym : symtab_and_line;
+  symbol : psymbol;
+begin
+  sym:=find_pc_line(addr,1);
+  fillchar(si,sizeof(tsyminfo),0);
+  si.address:=addr;
+  si.offset:=addr-sym.pc;
+  if assigned(sym.symtab) then
+   si.fname:=sym.symtab^.filename
+  else
+    si.fname:=nil;
+  si.line:=sym.line;
+  symbol:=find_pc_function(addr);
+  si.funcname:=symbol^.ginfo._name;
+end;
+
+
+{$ifdef kl}
+char *SourceForMain(int *line)
+  struct symbol *sym;
+  struct symtab *symtab;
+  *line = 0;
+  sym = lookup_symbol(_GetMainFunction(), NULL, VAR_NAMESPACE, NULL, &symtab);
+  if (!sym)
+    struct minimal_symbol *msymbol =
+      lookup_minimal_symbol (_GetMainFunction(), NULL, NULL);
+    if (msymbol)
+      *line = SYMBOL_VALUE_ADDRESS(msymbol);
+    return NULL;
+  if (!symtab || !symtab->filename)
+    *line = BLOCK_START(SYMBOL_BLOCK_VALUE(sym));
+    return NULL;
+  if (symtab->linetable)
+    int i;
+    for (i=0;i<symtab->linetable->nitems;i++)
+      if (symtab->linetable->item[i].pc
+          == BLOCK_START(SYMBOL_BLOCK_VALUE(sym)))
+        *line = symtab->linetable->item[i].line;
+        break;
+  else
+    *line = 0;
+  return symtab->filename;
+{$endif}
+
+
+procedure tgdbinterface.SelectSourceLine(fn:pchar;line:longint);
+begin
+  if assigned(fn) then
+   DoSelectSourceLine(StrPas(fn),line);
+end;
+
+
+procedure tgdbinterface.StartSession;
+begin
+  DoStartSession;
+end;
+
+
+procedure tgdbinterface.BreakSession;
+begin
+  DoBreakSession;
+end;
+
+
+procedure tgdbinterface.EndSession(code:longint);
+begin
+  Debuggee_started:=false;
+{$ifdef Go32v2}
+  inferior_pid:=0;
+{$endif}
+  DoEndSession(code);
+end;
+
+
+procedure tgdbinterface.DebuggerScreen;
+begin
+{$ifdef Debug}
+  Debug('|DebuggerScreen|');
+{$endif}
+  if user_screen_shown then
+   DoDebuggerScreen;
+  user_screen_shown:=false;
+end;
+
+
+procedure tgdbinterface.UserScreen;
+begin
+{$ifdef Debug}
+  Debug('|UserScreen|');
+{$endif}
+  if switch_to_user then
+   begin
+     if (not user_screen_shown) then
+      DoUserScreen;
+     user_screen_shown:=true;
+   end;
+end;
+
+
+
+{---------------------------------------
+          Default Hooks
+---------------------------------------}
+
+procedure tgdbinterface.DoSelectSourceLine(const fn:string;line:longint);
+{$ifdef Debug}
+var
+  s : string;
+{$endif}
+begin
+{$ifdef Debug}
+  Str(line,S);
+  Debug('|SelectSource '+fn+':'+s+'|');
+{$endif}
+end;
+
+procedure tgdbinterface.DoStartSession;
+begin
+end;
+
+procedure tgdbinterface.DoBreakSession;
+begin
+end;
+
+procedure tgdbinterface.DoEndSession(code:longint);
+begin
+end;
+
+procedure tgdbinterface.DoDebuggerScreen;
+begin
+end;
+
+procedure tgdbinterface.DoUserScreen;
+begin
+end;
+
+function  tgdbinterface.AllowQuit : boolean;
+begin
+  AllowQuit:=true;
+end;
+
+var
+  version : pchar;cvar;
+
+function  GDBVersion : string;
+begin
+  GDBVersion:='GDB '+StrPas(version);
+end;
+
+
+const next_exit : pointer = nil;
+procedure DoneLibGDB;
+begin
+  exitproc:=next_exit;
+{$ifndef GDB_V416}
+  if assigned(gdb_stdout) then
+    dispose(gdb_stdout);
+  gdb_stdout:=nil;
+  if assigned(gdb_stderr) then
+    dispose(gdb_stderr);
+  gdb_stderr:=nil;
+{$endif not GDB_V416}
+end;
+
+{$ifndef GDB_V416}
+{$ifndef go32v2}
+{$ifndef win32}
+var
+   stdout : p_c_file;cvar;external;
+   stderr : p_c_file;cvar;external;
+{$endif win32}
+{$else go32v2}
+{ the type is not really important
+  for external cvars PM
+  but the main problem is that stdout and stderr
+  and defined as macros under DJGPP !! }
+var
+   __dj_stdout : c_file;cvar;external;
+   __dj_stderr : c_file;cvar;external;
+{$endif go32v2}
+{$endif not GDB_V416}
+
+procedure InitLibGDB;
+{$ifdef supportexceptions}
+var
+  OldSigInt : SignalHandler;
+{$endif supportexceptions}
+begin
+{$ifdef supportexceptions}
+{$ifdef go32v2}
+  OldSigInt:=Signal(SIGINT,SignalHandler(@SIG_DFL));
+{$else}
+  OldSigInt:=Signal(SIGINT,SignalHandler(SIG_DFL));
+{$endif}
+{$endif supportexceptions}
+
+{$ifndef GDB_V416}
+  new(gdb_stdout);
+
+  gdb_stdout^.ts_streamtype := afile;
+{$ifndef go32v2}
+{$ifdef win32}
+ gdb_stdout^.ts_filestream := _impure_ptr^.stdout;
+{$else not win32 }
+ gdb_stdout^.ts_filestream := stdout;{p_c_file(textrec(output).handle); was wrong PM }
+{$endif not win32 }
+{$else go32v2}
+  gdb_stdout^.ts_filestream := @__dj_stdout;
+{$endif go32v2}
+  gdb_stdout^.ts_strbuf := nil;
+  gdb_stdout^.ts_buflen := 0;
+
+  new(gdb_stderr);
+  gdb_stderr^.ts_streamtype := afile;
+{$ifndef go32v2}
+{$ifdef win32}
+  gdb_stderr^.ts_filestream := _impure_ptr^.stderr;
+{$else not win32 }
+  gdb_stderr^.ts_filestream := stderr;
+{$endif not win32 }
+{$else go32v2}
+  gdb_stderr^.ts_filestream := @__dj_stderr;
+{$endif go32v2}
+  gdb_stderr^.ts_strbuf := nil;
+  gdb_stderr^.ts_buflen := 0;
+{$endif not GDB_V416}
+
+  next_exit:=exitproc;
+  exitproc:=@DoneLibGDB;
+  gdb_init;
+{$ifdef supportexceptions}
+  Signal(SIGINT,OldSigInt);
+{$endif supportexceptions}
+  if setjmp(error_return)=0 then
+    begin
+       quit_return:=error_return;
+       exit;
+    end
+  else
+    begin
+{$ifdef Debug}
+       Debug('|LongJump to Init|');
+{$endif}
+{$ifdef go32v2}
+       RunError(99);
+{$endif def go32v2}
+    end;
+  WatchDog:=0;
+end;
+
+
+begin
+  InitLibGDB;
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:32  peter
+    * moved to packages dir
+
+  Revision 1.16  1999/11/09 22:58:08  pierre
+   + symbol structure for function name
+
+  Revision 1.15  1999/11/03 09:35:06  peter
+    * linux updates
+
+  Revision 1.14  1999/10/08 15:22:53  pierre
+    * library order fixes
+    + GDB 4.18 default now
+
+  Revision 1.13  1999/10/04 21:26:05  pierre
+   * Conditional stuff clarified
+
+  Revision 1.12  1999/09/28 23:42:06  pierre
+   + win32 support changes
+
+  Revision 1.11  1999/09/07 09:17:52  pierre
+    * frames better recorded
+    * some v4.18 specific suff changed
+
+  Revision 1.10  1999/08/31 16:16:14  pierre
+   * setting height and width to unlimited was wrong
+
+  Revision 1.9  1999/08/24 21:29:29  pierre
+   + reload_fs after C code calling
+
+  Revision 1.8  1999/08/23 09:17:22  pierre
+   + Errors to gdberrorbuf
+
+  Revision 1.7  1999/07/12 14:52:57  peter
+    * ifdef 418 added
+
+  Revision 1.6  1999/07/12 13:08:18  pierre
+    + added GDBVersion function
+    * tries to intercept quit command from GDB Window
+    + AllowQuit method
+
+  Revision 1.5  1999/07/11 00:16:29  pierre
+   + stuff for v4.18 for DJGPP
+
+  Revision 1.4  1999/07/07 13:12:59  peter
+    * @sig_fdl for go32v2
+
+  Revision 1.3  1999/07/05 13:05:49  michael
+  + Fixed default handler
+
+  Revision 1.2  1999/06/29 12:18:34  pierre
+   * new procvar syntax fix
+
+  Revision 1.1  1999/05/22 13:43:00  peter
+    * moved
+
+  Revision 1.16  1999/02/11 13:03:26  pierre
+      Problem with last commit
+    + added virtuals CommandBegin and CommandEnd
+    + added command_level for TGDBInterface
+
+  Revision 1.15  1999/02/10 09:00:41  pierre
+     * duplicate call_reset removed
+     * frames allocation and freeing corrected
+     + GetError and GetOutput pchar function added
+     + stop_breakpoint_number to know why the program stopped
+       (used for watches)
+
+  Revision 1.14  1999/02/08 17:35:08  pierre
+    + added Run made TraceStep TraceNext Continue virtual
+
+  Revision 1.13  1999/02/08 13:59:59  pierre
+    - removed second debugger_started in TGDBController
+    + StartTrace and Reset made virtual to be able to
+      change CmResetDebugger state in IDE
+
+  Revision 1.12  1999/02/08 11:37:11  pierre
+   + added procargs var and SetArgs method
+
+  Revision 1.11  1999/02/05 17:17:45  pierre
+   * invalid_line renamed invalid_breakpoint_line
+
+  Revision 1.10  1999/02/05 08:35:38  pierre
+   * removed libgdb for cond USE_GDB_OBJS
+
+  Revision 1.9  1999/02/04 16:33:35  pierre
+   + gdb_file and use_gdb_file added for debug writing
+
+  Revision 1.8  1999/02/04 14:35:00  pierre
+    * small go32v2 fixes
+
+  Revision 1.7  1999/02/03 15:57:38  pierre
+   * typo error
+
+  Revision 1.6  1999/02/03 15:03:07  pierre
+   + added error_num function
+
+  Revision 1.5  1999/02/03 15:01:00  pierre
+   * a symtab_and_line record changes from v4.16 to v4.17
+
+  Revision 1.4  1999/01/22 18:05:41  pierre
+   * change dir sep from  to / for dos
+
+  Revision 1.3  1999/01/22 10:23:50  peter
+    * small update to get it working with the IDE
+
+  Revision 1.2  1999/01/18 11:00:34  pierre
+   * frames was not initialized
+
+  Revision 1.1  1998/10/07 15:57:38  peter
+    * initial version
+
+  Revision 1.1  1998/10/07 15:48:20  peter
+    * initial version
+
+}

+ 186 - 0
packages/gdbint/gdbobjs.inc

@@ -0,0 +1,186 @@
+{
+    $Id$
+    Copyright (c) 1999 by Pierre Muller
+    
+    direct GDB objects linking for debug info
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+{ gdb-version/gdb directory must be in objects path }
+{ use ifdef or ifndef GDB_V416 to change objects needed for
+  different gdb versions }
+
+{$L infcmd.o}
+{$L symtab.o}
+{$L top.o}
+{$L target.o}
+{$L utils.o}
+{$L breakpoi.o}
+{$L corefile.o}
+{$L symfile.o}
+{$L ../libibert/concat.o}
+{$L environ.o}
+{$L eval.o}
+{$L infrun.o}
+{$L blockfra.o}
+{$L findvar.o}
+{$L printcmd.o}
+{$L i386-tde.o}
+{$L minsyms.o}
+{$L stack.o}
+{$L gdbtypes.o}
+{$L valops.o}
+{$L values.o}
+{$L valprint.o}
+{$L language.o}
+{$L source.o}
+{$L i387-tde.o}
+{$L command.o}
+{$L objfiles.o}
+{$L demangle.o}
+{$L ../libibert/cplus-de.o}
+{$L gnu-rege.o}
+{$L c-typepr.o}
+{$L typeprin.o}
+{$L init.o}
+{$L parse.o}
+{$L serial.o}
+{$L ../libibert/getrunti.o}
+{$L ../readline/complete.o}
+{$L ../readline/readline.o}
+{$L ../readline/history.o}
+{$L ../gdb/version.o}
+{$L inflow.o}
+{$L ../readline/tilde.o}
+{$L ../readline/bind.o}
+{$L mem-brea.o}
+{$L ../libibert/strsigna.o}
+{$L ../bfd/bfd.o}
+{$L ../libibert/vasprint.o}
+{$L ch-lang.o}
+{$ifdef GDB_V416}
+{$L go32targ.o}
+{$else}
+{$L go32-nat.o}
+{$endif}
+{$L thread.o}
+{$L valarith.o}
+{$L expprint.o}
+{$L exec.o}
+{$L ../bfd/corefile.o}
+{$L ../libibert/obstack.o}
+{$L ../bfd/section.o}
+{$L complain.o}
+{$L ../libibert/argv.o}
+{$L ../bfd/opncls.o}
+{$L ../bfd/format.o}
+{$L bcache.o}
+{$L symmisc.o}
+{$L f-lang.o}
+{$L f-valpri.o}
+{$L cp-valpr.o}
+{$L ../opcodes/dis-buf.o}
+{$L ../opcodes/i386-dis.o}
+{$L scm-lang.o}
+{$L ../libibert/basename.o}
+{$L ../libibert/floatfor.o}
+{$L copying.o}
+{$L ser-go32.o}
+{$L remote.o}
+{$L dcache.o}
+{$L remote-u.o}
+{$L buildsym.o}
+{$L maint.o}
+{$L dbxread.o}
+{$L coffread.o}
+{$L elfread.o}
+{$L mipsread.o}
+{$L stabsrea.o}
+{$L c-lang.o}
+{$L m2-lang.o}
+{$L nlmread.o}
+{$L mdebugre.o}
+{$L os9kread.o}
+{$L p-lang.o}
+{$L p-valpri.o}
+{$L ../readline/display.o}
+{$L ../readline/keymaps.o}
+{$L ../readline/rltty.o}
+{$L ../readline/vi_mode.o}
+{$L ../readline/funmap.o}
+{$L ../readline/parens.o}
+{$L ../bfd/cache.o}
+{$L ch-exp.o}
+{$L ch-typep.o}
+{$L ch-valpr.o}
+{$L ../bfd/libbfd.o}
+{$L ../bfd/archures.o}
+{$L ../bfd/targets.o}
+{$L ../bfd/binary.o}
+{$L f-exp_ta.o}
+{$L f-typepr.o}
+{$L c-valpri.o}
+{$L scm-exp.o}
+{$L c-exp_ta.o}
+{$L scm-valp.o}
+{$L dwarfrea.o}
+{$L m2-exp_t.o}
+{$L m2-typep.o}
+{$L m2-valpr.o}
+{$L p-exp_ta.o}
+{$L p-typepr.o}
+{$L ../readline/isearch.o}
+{$L ../readline/search.o}
+{$L ../bfd/cpu-i386.o}
+{$L ../bfd/coff-go3.o}
+{$L ../bfd/srec.o}
+{$L ../bfd/tekhex.o}
+{$L ../bfd/ihex.o}
+{$L ../bfd/syms.o}
+{$L ../bfd/archive.o}
+{$L ../bfd/reloc.o}
+{$L ../bfd/linker.o}
+{$L ../bfd/coffgen.o}
+{$L ../bfd/cofflink.o}
+{$L ../libibert/hex.o}
+{$L ../bfd/hash.o}
+{$L ../bfd/stabs.o}
+{$ifdef GDB_V418}
+{$L ../readline/histexpa.o}
+{$L ../readline/histfile.o}
+{$L gdbarch.o}
+{$L tracepoi.o}
+{$L ax-gdb.o}
+{$L jv-lang.o}
+{$L ../readline/input.o}
+{$L ../readline/util.o}
+{$L ../readline/terminal.o}
+{$L ../readline/undo.o}
+{$L ../readline/macro.o}
+{$L ../readline/shell.o}
+{$L ../readline/nls.o}
+{$L ../readline/kill.o}
+{$L ../libibert/xstrerro.o}
+{$L ../libibert/objalloc.o}
+{$L dwarf2re.o}
+{$L ../bfd/coff-stg.o}
+{$L ../bfd/i386aout.o}
+{$L ../libibert/fnmatch.o}
+{$L ../readline/histsear.o}
+{$L ax-gener.o}
+{$L jv-exp_t.o}
+{$L jv-typep.o}
+{$L jv-valpr.o}
+{$L ../bfd/aout32.o}
+{$L ../bfd/stab-sym.o}
+{$endif GDB_V418}
+{
+ $Log $
+}

+ 177 - 0
packages/gdbint/libgdb/Makefile

@@ -0,0 +1,177 @@
+#
+# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:51
+#
+
+defaultrule: all
+
+#####################################################################
+# Autodetect OS (Linux or Dos or Windows NT)
+# define inlinux when running under linux
+# define inWinNT when running under WinNT
+#####################################################################
+
+# We need only / in the path
+override PATH:=$(subst \,/,$(PATH))
+
+# Search for PWD and determine also if we are under linux
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
+ifeq ($(PWD),)
+nopwd:
+	@echo You need the GNU utils package to use this Makefile!
+	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
+	@exit
+else
+inlinux=1
+endif
+else
+PWD:=$(firstword $(PWD))
+endif
+
+# Detect NT - NT sets OS to Windows_NT
+ifndef inlinux
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+endif
+endif
+
+# Detect OS/2 - OS/2 has OS2_SHELL defined
+ifndef inlinux
+ifndef inWinNT
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+endif
+
+# The extension of executables
+ifdef inlinux
+EXEEXT=
+else
+EXEEXT=.exe
+endif
+
+# The path which is search separated by spaces
+ifdef inlinux
+SEARCHPATH=$(subst :, ,$(PATH))
+else
+SEARCHPATH=$(subst ;, ,$(PATH))
+endif
+
+#####################################################################
+# FPC version/target Detection
+#####################################################################
+
+# What compiler to use ?
+ifndef FPC
+ifdef inOS2
+export FPC=ppos2$(EXEEXT)
+else
+export FPC=ppc386$(EXEEXT)
+endif
+endif
+
+# Target OS
+ifndef OS_TARGET
+export OS_TARGET:=$(shell $(FPC) -iTO)
+endif
+
+# Source OS
+ifndef OS_SOURCE
+export OS_SOURCE:=$(shell $(FPC) -iSO)
+endif
+
+# Target CPU
+ifndef CPU_TARGET
+export CPU_TARGET:=$(shell $(FPC) -iTP)
+endif
+
+# Source CPU
+ifndef CPU_SOURCE
+export CPU_SOURCE:=$(shell $(FPC) -iSP)
+endif
+
+# FPC version
+ifndef FPC_VERSION
+export FPC_VERSION:=$(shell $(FPC) -iV)
+endif
+
+#####################################################################
+# Default Settings
+#####################################################################
+
+# Release ? Then force OPT and don't use extra opts via commandline
+ifdef RELEASE
+override OPT:=-Xs -OG2p3 -n
+endif
+
+# Verbose settings (warning,note,info)
+ifdef VERBOSE
+override OPT+=-vwni
+endif
+
+#####################################################################
+# User Settings
+#####################################################################
+
+
+# Targets
+
+
+# Clean
+
+
+# Install
+
+
+# Defaults
+
+
+# Directories
+
+
+# Libraries
+
+
+#####################################################################
+# Default rules
+#####################################################################
+
+.PHONY: defaultrule all staticlib sharedlib showinstall install \
+	staticinstall sharedinstall libinstall zipinstall zipinstalladd \
+	clean cleanall depend info
+
+staticlib: fpc_staticlib
+
+sharedlib: fpc_sharedlib
+
+showinstall: fpc_showinstall
+
+install: fpc_install
+
+staticinstall: fpc_staticinstall
+
+sharedinstall: fpc_sharedinstall
+
+libinstall: fpc_libinstall
+
+zipinstall: fpc_zipinstall
+
+zipinstalladd: fpc_zipinstalladd
+
+clean: fpc_clean
+
+clean_all: fpc_clean_all
+
+depend: fpc_depend
+
+info: fpc_info
+
+#####################################################################
+# Users rules
+#####################################################################
+
+
+all:
+	$(MAKE) -C $(OS_TARGET) all

+ 10 - 0
packages/gdbint/libgdb/Makefile.fpc

@@ -0,0 +1,10 @@
+#
+#   Makefile.fpc for Free Component Library
+#
+
+[sections]
+none=1
+
+[rules]
+all:
+        $(MAKE) -C $(OS_TARGET) all

+ 142 - 0
packages/gdbint/libgdb/go32v2/Makefile

@@ -0,0 +1,142 @@
+#
+# $Id$
+#
+# Makefile to create libgdb.a / libgdb.so
+#
+
+ifeq ($(GDB_SRC),)
+ifeq ($(OS),DJGPP)
+GDB_SRC=$(DJDIR)/gnu/gdb-4.18
+else
+ifeq ($(OS_TARGET),win32)
+GDB_SRC=d:/cygwin/cygwin-b20/gnu/gdb-4.18
+else
+GDB_SRC=/usr/src/gdb-4.17
+endif
+endif
+endif
+
+ifeq ($(GDB_OBJ),)
+GDB_OBJ=$(GDB_SRC)
+endif
+
+ifeq ($(OS)),DJGPP)
+OS_CFLAGS=-DMAINTENANCE_CMDS=0 -DHAVE_CONFIG_H -O2 -DHAVE_LONG_DOUBLE=1 \
+	  -DPRINTF_HAS_LONG_DOUBLE=1
+OS_FLAGS=
+MMALLOC_INC=
+MMALLOC_CFLAGS=-DNO_MMALLOC -DNO_MMALLOC_CHECK
+MMALLOC_LIB=
+MMALLOC_LIB_DIR=
+OS_FLAGS+=MMALLOC=$(MMALLOC) MMALLOC_CFLAGS="$(MMALLOC_CFLAGS)"
+CHECKS=check_echo check_awk
+EXCLUDE_REGEX=
+else
+OS_CFLAGS=-DMAINTENANCE_CMDS=1 -DHAVE_CONFIG_H -O2 -DNO_MMALLOC
+#MMALLOC=../mmalloc/libmmalloc.a
+#MMALLOC_INC=o_gdb/mmalloc s_gdb/mmalloc
+#CHECKS=
+#EXCLUDE_REGEX=| sed -e '/.*gnu-regex.*/d'
+endif
+
+MMALLOC_LIB=$(subst ..,$(GDB_OBJ),$(MMALLOC))
+MMALLOC_LIB_DIR=$(subst /libmmalloc.a,,$(MMALLOC_LIB))
+
+vpath %.a $(GDB_OBJ)/bfd $(GDB_OBJ)/intl $(GDB_OBJ)/libiberty $(GDB_OBJ)/opcodes $(GDB_OBJ)/readline $(MMALLOC_LIB_DIR)
+
+_INCS=o_gdb/gdb s_gdb/gdb s_gdb/include s_gdb/gdb/config \
+	o_gdb/bfd s_gdb/bfd \
+	o_gdb/opcodes s_gdb/opcodes \
+	o_gdb/intl s_gdb/intl \
+	o_gdb/readline s_gdb/readline \
+	o_gdb/libiberty s_gdb/libiberty \
+	$(MMALLOC_INC)
+
+INCS=$(subst s_gdb,$(GDB_SRC),$(subst o_gdb,$(GDB_OBJ),$(_INCS)))
+
+INC_PATH=$(addprefix -I,$(INCS))
+
+all:: libgdb.a
+
+libgdb.c: Makefile
+	echo '#include <defs.h>' > libgdb.c
+	echo '#include <breakpoint.h>' >> libgdb.c
+	echo '#include <symtab.h>' >> libgdb.c
+	echo '#include <symfile.h>' >> libgdb.c
+	echo '#include <objfiles.h>' >> libgdb.c
+	echo '#include <inferior.h>' >> libgdb.c
+	echo '#include <gnu-regex.h>' >> libgdb.c
+	echo '#include <expression.h>' >> libgdb.c
+	echo '#include <language.h>' >> libgdb.c
+	echo '#include <complaints.h>' >> libgdb.c
+	echo '#include <coff/internal.h>' >> libgdb.c
+	echo '#include <libcoff.h>' >> libgdb.c
+	echo '#include <ctype.h>' >> libgdb.c
+	echo '#include <string.h>' >> libgdb.c
+	echo '#include <buildsym.h>' >> libgdb.c
+	echo '#include <gdb-stabs.h>' >> libgdb.c
+	echo '#include <stabsread.h>' >> libgdb.c
+	echo '#include <gdbcmd.h>' >> libgdb.c
+	echo '#include <setjmp.h>' >> libgdb.c
+	echo '#include <demangle.h>' >> libgdb.c
+	echo '#include <annotate.h>' >> libgdb.c
+	echo '#include <top.h>' >> libgdb.c
+
+LIBGDB_FLAGS+=$(OS_FLAGS)
+CFLAGS+=$(OS_CFLAGS)
+
+$(GDB_OBJ)/bfd/bfd.h:
+	$(MAKE) -C $(dir $@) $(notdir $@)
+
+ifneq ($(LIBGDB_H),)
+libgdb.h: $(LIBGDB_H)
+	ln -sf $(LIBGDB_H) libgdb.h
+else
+libgdb.h: $(GDB_OBJ)/bfd/bfd.h libgdb.c
+	gcc -E -P $(INC_PATH) $(CFLAGS) $(MMALLOC_CFLAGS) libgdb.c \
+	  | sed -e '/^[ 	]*$$/d' > libgdb.h
+	gcc -E -P -dM $(INC_PATH) $(CFLAGS) $(MMALLOC_CFLAGS) libgdb.c \
+	  | sed -e '/^[ 	]*$$/d' >> libgdb.h
+endif
+
+gdb.t: $(GDB_OBJ)/gdb/libgdb-files
+	printf "%s\n" $(shell cat $<) | sed -n -e 's,^.*\.o,$(dir $<)&,p' $(EXCLUDE_REGEX) > $@
+
+%.t: %.a
+	ar t $< | sed -e 's,^.*\.o,$(dir $<)&,' > $@
+
+libbfd.t: $(GDB_OBJ)/bfd/libbfd.a
+libintl.t: $(GDB_OBJ)/intl/libintl.a
+libiberty.t: $(GDB_OBJ)/libiberty/libiberty.a
+libopcodes.t: $(GDB_OBJ)/opcodes/libopcodes.a
+libreadline.t: $(GDB_OBJ)/readline/libreadline.a
+libmmalloc.t: $(GDB_OBJ)/mmalloc/libmmalloc.a
+
+$(GDB_OBJ)/%.a:
+	$(MAKE) -C $(dir $@) CFLAGS="$(CFLAGS)" $(LIBGDB_FLAGS)
+
+$(GDB_OBJ)/gdb/libgdb-files:
+# this is needed, because the file is part of the src distrib, but
+# the object files not (at least in DJGPP)
+	rm -f $@
+	$(MAKE) -C $(dir $@) $(notdir $@) CFLAGS="$(CFLAGS)" $(LIBGDB_FLAGS)
+
+T_FILES= libbfd.t libiberty.t libintl.t libopcodes.t libreadline.t $(notdir $(subst .a,.t,$(MMALLOC_LIB))) gdb.t
+
+list: $(T_FILES)
+
+libgdb.a: $(CHECKS) list
+	rm -f libgdb.a
+# do not use any xmalloc.o, because it is defined in utils.o
+	ar rcs $@ $(shell cat $(T_FILES) | sed -e '/.*xmalloc.*/d')
+#        rm -f $(T_FILES)
+
+lib.zip : libgdb.a
+	zip lib libgdb.a
+	
+libgdb.so: $(CHECKS) list
+	rm -f libgdb.so
+# do not use any xmalloc.o, because it is defined in utils.o
+	ld -shared -o $@ $(shell cat $(T_FILES) | sed -e '/.*xmalloc.*/d')
+	rm -f $(T_FILES)
+

+ 142 - 0
packages/gdbint/libgdb/linux/Makefile

@@ -0,0 +1,142 @@
+#
+# $Id$
+#
+# Makefile to create libgdb.a / libgdb.so
+#
+
+ifeq ($(GDB_SRC),)
+ifeq ($(OS),DJGPP)
+GDB_SRC=$(DJDIR)/gnu/gdb-4.18
+else
+ifeq ($(OS_TARGET),win32)
+GDB_SRC=d:/cygwin/cygwin-b20/gnu/gdb-4.18
+else
+GDB_SRC=/usr/src/gdb-4.18
+endif
+endif
+endif
+
+ifeq ($(GDB_OBJ),)
+GDB_OBJ=$(GDB_SRC)
+endif
+
+ifeq ($(OS)),DJGPP)
+OS_CFLAGS=-DMAINTENANCE_CMDS=0 -DHAVE_CONFIG_H -O2 -DHAVE_LONG_DOUBLE=1 \
+	  -DPRINTF_HAS_LONG_DOUBLE=1
+OS_FLAGS=
+MMALLOC_INC=
+MMALLOC_CFLAGS=-DNO_MMALLOC -DNO_MMALLOC_CHECK
+MMALLOC_LIB=
+MMALLOC_LIB_DIR=
+OS_FLAGS+=MMALLOC=$(MMALLOC) MMALLOC_CFLAGS="$(MMALLOC_CFLAGS)"
+CHECKS=check_echo check_awk
+EXCLUDE_REGEX=
+else
+OS_CFLAGS=-DMAINTENANCE_CMDS=1 -DHAVE_CONFIG_H -O2 -DNO_MMALLOC
+#MMALLOC=../mmalloc/libmmalloc.a
+#MMALLOC_INC=o_gdb/mmalloc s_gdb/mmalloc
+#CHECKS=
+#EXCLUDE_REGEX=| sed -e '/.*gnu-regex.*/d'
+endif
+
+MMALLOC_LIB=$(subst ..,$(GDB_OBJ),$(MMALLOC))
+MMALLOC_LIB_DIR=$(subst /libmmalloc.a,,$(MMALLOC_LIB))
+
+vpath %.a $(GDB_OBJ)/bfd $(GDB_OBJ)/intl $(GDB_OBJ)/libiberty $(GDB_OBJ)/opcodes $(GDB_OBJ)/readline $(MMALLOC_LIB_DIR)
+
+_INCS=o_gdb/gdb s_gdb/gdb s_gdb/include s_gdb/gdb/config \
+	o_gdb/bfd s_gdb/bfd \
+	o_gdb/opcodes s_gdb/opcodes \
+	o_gdb/intl s_gdb/intl \
+	o_gdb/readline s_gdb/readline \
+	o_gdb/libiberty s_gdb/libiberty \
+	$(MMALLOC_INC)
+
+INCS=$(subst s_gdb,$(GDB_SRC),$(subst o_gdb,$(GDB_OBJ),$(_INCS)))
+
+INC_PATH=$(addprefix -I,$(INCS))
+
+all:: libgdb.a
+
+libgdb.c: Makefile
+	echo '#include <defs.h>' > libgdb.c
+	echo '#include <breakpoint.h>' >> libgdb.c
+	echo '#include <symtab.h>' >> libgdb.c
+	echo '#include <symfile.h>' >> libgdb.c
+	echo '#include <objfiles.h>' >> libgdb.c
+	echo '#include <inferior.h>' >> libgdb.c
+	echo '#include <gnu-regex.h>' >> libgdb.c
+	echo '#include <expression.h>' >> libgdb.c
+	echo '#include <language.h>' >> libgdb.c
+	echo '#include <complaints.h>' >> libgdb.c
+	echo '#include <coff/internal.h>' >> libgdb.c
+	echo '#include <libcoff.h>' >> libgdb.c
+	echo '#include <ctype.h>' >> libgdb.c
+	echo '#include <string.h>' >> libgdb.c
+	echo '#include <buildsym.h>' >> libgdb.c
+	echo '#include <gdb-stabs.h>' >> libgdb.c
+	echo '#include <stabsread.h>' >> libgdb.c
+	echo '#include <gdbcmd.h>' >> libgdb.c
+	echo '#include <setjmp.h>' >> libgdb.c
+	echo '#include <demangle.h>' >> libgdb.c
+	echo '#include <annotate.h>' >> libgdb.c
+	echo '#include <top.h>' >> libgdb.c
+
+LIBGDB_FLAGS+=$(OS_FLAGS)
+CFLAGS+=$(OS_CFLAGS)
+
+$(GDB_OBJ)/bfd/bfd.h:
+	$(MAKE) -C $(dir $@) $(notdir $@)
+
+ifneq ($(LIBGDB_H),)
+libgdb.h: $(LIBGDB_H)
+	ln -sf $(LIBGDB_H) libgdb.h
+else
+libgdb.h: $(GDB_OBJ)/bfd/bfd.h libgdb.c
+	gcc -E -P $(INC_PATH) $(CFLAGS) $(MMALLOC_CFLAGS) libgdb.c \
+	  | sed -e '/^[ 	]*$$/d' > libgdb.h
+	gcc -E -P -dM $(INC_PATH) $(CFLAGS) $(MMALLOC_CFLAGS) libgdb.c \
+	  | sed -e '/^[ 	]*$$/d' >> libgdb.h
+endif
+
+gdb.t: $(GDB_OBJ)/gdb/libgdb-files
+	printf "%s\n" $(shell cat $<) | sed -n -e 's,^.*\.o,$(dir $<)&,p' $(EXCLUDE_REGEX) > $@
+
+%.t: %.a
+	ar t $< | sed -e 's,^.*\.o,$(dir $<)&,' > $@
+
+libbfd.t: $(GDB_OBJ)/bfd/libbfd.a
+libintl.t: $(GDB_OBJ)/intl/libintl.a
+libiberty.t: $(GDB_OBJ)/libiberty/libiberty.a
+libopcodes.t: $(GDB_OBJ)/opcodes/libopcodes.a
+libreadline.t: $(GDB_OBJ)/readline/libreadline.a
+libmmalloc.t: $(GDB_OBJ)/mmalloc/libmmalloc.a
+
+$(GDB_OBJ)/%.a:
+	$(MAKE) -C $(dir $@) CFLAGS="$(CFLAGS)" $(LIBGDB_FLAGS)
+
+$(GDB_OBJ)/gdb/libgdb-files:
+# this is needed, because the file is part of the src distrib, but
+# the object files not (at least in DJGPP)
+	rm -f $@
+	$(MAKE) -C $(dir $@) $(notdir $@) CFLAGS="$(CFLAGS)" $(LIBGDB_FLAGS)
+
+T_FILES= libbfd.t libiberty.t libintl.t libopcodes.t libreadline.t $(notdir $(subst .a,.t,$(MMALLOC_LIB))) gdb.t
+
+list: $(T_FILES)
+
+libgdb.a: $(CHECKS) list
+	rm -f libgdb.a
+# do not use any xmalloc.o, because it is defined in utils.o
+	ar rcs $@ $(shell cat $(T_FILES) | sed -e '/.*xmalloc.*/d')
+	rm -f $(T_FILES)
+
+libgdb.so: $(CHECKS) list
+	rm -f libgdb.so
+# do not use any xmalloc.o, because it is defined in utils.o
+	ld -shared -o $@ $(shell cat $(T_FILES) | sed -e '/.*xmalloc.*/d')
+	rm -f $(T_FILES)
+
+lib.zip : libgdb.a
+	zip lib libgdb.a
+

+ 142 - 0
packages/gdbint/libgdb/win32/Makefile

@@ -0,0 +1,142 @@
+#
+# $Id$
+#
+# Makefile to create libgdb.a / libgdb.so
+#
+
+ifeq ($(GDB_SRC),)
+ifeq ($(OS),DJGPP)
+GDB_SRC=$(DJDIR)/gnu/gdb-4.18
+else
+ifeq ($(OS_TARGET),win32)
+GDB_SRC=/cygwin/cygwin-b20/gnu/gdb/gdb-4.18
+else
+GDB_SRC=/usr/src/gdb-4.17
+endif
+endif
+endif
+
+ifeq ($(GDB_OBJ),)
+GDB_OBJ=$(GDB_SRC)
+endif
+
+ifeq ($(OS)),DJGPP)
+OS_CFLAGS=-DMAINTENANCE_CMDS=0 -DHAVE_CONFIG_H -O2 -DHAVE_LONG_DOUBLE=1 \
+	  -DPRINTF_HAS_LONG_DOUBLE=1
+OS_FLAGS=
+MMALLOC_INC=
+MMALLOC_CFLAGS=-DNO_MMALLOC -DNO_MMALLOC_CHECK
+MMALLOC_LIB=
+MMALLOC_LIB_DIR=
+OS_FLAGS+=MMALLOC=$(MMALLOC) MMALLOC_CFLAGS="$(MMALLOC_CFLAGS)"
+CHECKS=check_echo check_awk
+EXCLUDE_REGEX=
+else
+OS_CFLAGS=-DMAINTENANCE_CMDS=1 -DHAVE_CONFIG_H -O2 -DNO_MMALLOC
+#MMALLOC=../mmalloc/libmmalloc.a
+#MMALLOC_INC=o_gdb/mmalloc s_gdb/mmalloc
+#CHECKS=
+#EXCLUDE_REGEX=| sed -e '/.*gnu-regex.*/d'
+endif
+
+MMALLOC_LIB=$(subst ..,$(GDB_OBJ),$(MMALLOC))
+MMALLOC_LIB_DIR=$(subst /libmmalloc.a,,$(MMALLOC_LIB))
+
+vpath %.a $(GDB_OBJ)/bfd $(GDB_OBJ)/intl $(GDB_OBJ)/libiberty $(GDB_OBJ)/opcodes $(GDB_OBJ)/readline $(MMALLOC_LIB_DIR)
+
+_INCS=o_gdb/gdb s_gdb/gdb s_gdb/include s_gdb/gdb/config \
+	o_gdb/bfd s_gdb/bfd \
+	o_gdb/opcodes s_gdb/opcodes \
+	o_gdb/intl s_gdb/intl \
+	o_gdb/readline s_gdb/readline \
+	o_gdb/libiberty s_gdb/libiberty \
+	$(MMALLOC_INC)
+
+INCS=$(subst s_gdb,$(GDB_SRC),$(subst o_gdb,$(GDB_OBJ),$(_INCS)))
+
+INC_PATH=$(addprefix -I,$(INCS))
+
+all:: libgdb.a
+
+libgdb.c: Makefile
+	echo '#include <defs.h>' > libgdb.c
+	echo '#include <breakpoint.h>' >> libgdb.c
+	echo '#include <symtab.h>' >> libgdb.c
+	echo '#include <symfile.h>' >> libgdb.c
+	echo '#include <objfiles.h>' >> libgdb.c
+	echo '#include <inferior.h>' >> libgdb.c
+	echo '#include <gnu-regex.h>' >> libgdb.c
+	echo '#include <expression.h>' >> libgdb.c
+	echo '#include <language.h>' >> libgdb.c
+	echo '#include <complaints.h>' >> libgdb.c
+	echo '#include <coff/internal.h>' >> libgdb.c
+	echo '#include <libcoff.h>' >> libgdb.c
+	echo '#include <ctype.h>' >> libgdb.c
+	echo '#include <string.h>' >> libgdb.c
+	echo '#include <buildsym.h>' >> libgdb.c
+	echo '#include <gdb-stabs.h>' >> libgdb.c
+	echo '#include <stabsread.h>' >> libgdb.c
+	echo '#include <gdbcmd.h>' >> libgdb.c
+	echo '#include <setjmp.h>' >> libgdb.c
+	echo '#include <demangle.h>' >> libgdb.c
+	echo '#include <annotate.h>' >> libgdb.c
+	echo '#include <top.h>' >> libgdb.c
+
+LIBGDB_FLAGS+=$(OS_FLAGS)
+CFLAGS+=$(OS_CFLAGS)
+
+$(GDB_OBJ)/bfd/bfd.h:
+	$(MAKE) -C $(dir $@) $(notdir $@)
+
+ifneq ($(LIBGDB_H),)
+libgdb.h: $(LIBGDB_H)
+	ln -sf $(LIBGDB_H) libgdb.h
+else
+libgdb.h: $(GDB_OBJ)/bfd/bfd.h libgdb.c
+	gcc -E -P $(INC_PATH) $(CFLAGS) $(MMALLOC_CFLAGS) libgdb.c \
+	  | sed -e '/^[ 	]*$$/d' > libgdb.h
+	gcc -E -P -dM $(INC_PATH) $(CFLAGS) $(MMALLOC_CFLAGS) libgdb.c \
+	  | sed -e '/^[ 	]*$$/d' >> libgdb.h
+endif
+
+gdb.t: $(GDB_OBJ)/gdb/libgdb-files
+	printf "%s\n" $(shell cat $<) | sed -n -e 's,^.*\.o,$(dir $<)&,p' $(EXCLUDE_REGEX) > $@
+
+%.t: %.a
+	ar t $< | sed -e 's,^.*\.o,$(dir $<)&,' > $@
+
+libbfd.t: $(GDB_OBJ)/bfd/libbfd.a
+libintl.t: $(GDB_OBJ)/intl/libintl.a
+libiberty.t: $(GDB_OBJ)/libiberty/libiberty.a
+libopcodes.t: $(GDB_OBJ)/opcodes/libopcodes.a
+libreadline.t: $(GDB_OBJ)/readline/libreadline.a
+libmmalloc.t: $(GDB_OBJ)/mmalloc/libmmalloc.a
+
+$(GDB_OBJ)/%.a:
+	$(MAKE) -C $(dir $@) CFLAGS="$(CFLAGS)" $(LIBGDB_FLAGS)
+
+$(GDB_OBJ)/gdb/libgdb-files:
+# this is needed, because the file is part of the src distrib, but
+# the object files not (at least in DJGPP)
+	rm -f $@
+	$(MAKE) -C $(dir $@) $(notdir $@) CFLAGS="$(CFLAGS)" $(LIBGDB_FLAGS)
+
+T_FILES= libbfd.t libiberty.t libintl.t libopcodes.t libreadline.t $(notdir $(subst .a,.t,$(MMALLOC_LIB))) gdb.t
+
+list: $(T_FILES)
+
+libgdb.a: $(CHECKS) list
+	rm -f libgdb.a
+# do not use any xmalloc.o, because it is defined in utils.o
+	ar rcs $@ $(shell cat $(T_FILES) | sed -e '/.*xmalloc.*/d')
+#        rm -f $(T_FILES)
+
+lib.zip : libgdb.a
+	zip lib libgdb.a
+	
+libgdb.so: $(CHECKS) list
+	rm -f libgdb.so
+# do not use any xmalloc.o, because it is defined in utils.o
+	ld -shared -o $@ $(shell cat $(T_FILES) | sed -e '/.*xmalloc.*/d')
+	rm -f $(T_FILES)
+

+ 97 - 0
packages/gdbint/symify.pp

@@ -0,0 +1,97 @@
+{
+    $Id$
+    Copyright (c) 1998 by Peter Vreman
+
+    Translate backtrace addresses into file and line info
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+program symify;
+uses GDBInt;
+
+var
+  gdb : tgdbinterface;
+
+
+procedure processlog(const fn:string);
+var
+  t    : text;
+  hs,s : string;
+  code : word;
+  i,
+  addr : longint;
+  sym  : tsyminfo;
+begin
+  assign(t,fn);
+  {$I-}
+   reset(t);
+  {$I+}
+  if ioresult<>0 then
+   exit;
+  while not eof(t) do
+   begin
+     readln(t,s);
+     i:=pos('0x',s);
+     if i=3 then
+      begin
+        hs:='$'+Copy(s,5,8);
+        Val(hs,addr,code);
+        if code=0 then
+         begin
+           gdb.GetAddrSymInfo(addr,sym);
+           Write(Copy(s,1,12));
+           if assigned(sym.funcname) then
+             write(' in ',sym.funcname,'+',sym.offset);
+           if assigned(sym.fname) then
+             writeln(' ',sym.fname,':',sym.line)
+           else
+             writeln;
+         end
+        else
+         writeln(s);
+      end
+     else
+      writeln(s);
+   end;
+  close(t);
+end;
+
+
+begin
+  if paramcount<2 then
+   begin
+     writeln('usage: symify <log> <file>');
+     halt(1);
+   end;
+  gdb.init;
+  writeln('loading ',paramstr(2));
+  gdb.gdb_command('file '+paramstr(2));
+  writeln('parsing ',paramstr(1));
+  processlog(paramstr(1));
+  gdb.done;
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.2  1999/11/09 22:59:07  pierre
+   + function name and offset
+
+  Revision 1.1  1999/05/22 13:43:00  peter
+    * moved
+
+  Revision 1.1  1998/10/07 15:57:38  peter
+    * initial version
+
+  Revision 1.1  1998/10/07 15:48:20  peter
+    * initial version
+
+}
+

+ 71 - 0
packages/gdbint/testgdb.pp

@@ -0,0 +1,71 @@
+{
+    $Id$
+    Copyright (c) 1998 by Peter Vreman
+
+    Small example program to the GDB
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+program testgdb;
+uses gdbcon;
+var
+  last,s,parafile : string;
+  gdb : tgdbcontroller;
+begin
+  gdb.init;
+  if paramcount=1 then
+    parafile:=paramstr(1)
+  else
+    parafile:='test';
+  gdb.loadfile(parafile);
+  Writeln('Welcome to the pascal GDB...');
+  Writeln('Type "q" to exit...');
+  last:='';
+  repeat
+    write('>');
+    readln(s);
+    if (s='a') then
+     gdb.starttrace
+    else
+     if (s='s') then
+      gdb.tracestep
+    else
+     if (s='n') then
+      gdb.tracenext
+    else
+     if (s='q') then
+      break
+    else
+     begin
+       if s='' then
+         s:=last;
+       GDB.Command(s);
+       GDB.WriteErrorBuf;
+       GDB.WriteOutputBuf;
+       last:=s;
+     end;
+  until false;
+  Writeln('End of pascal GDB...');
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.1  1999/05/22 13:43:00  peter
+    * moved
+
+  Revision 1.4  1999/01/29 10:32:57  peter
+    * fixes to compile with the makefile
+
+  Revision 1.3  1999/01/22 10:23:51  peter
+    * small update to get it working with the IDE
+
+}
+

+ 912 - 0
packages/gtk/Makefile

@@ -0,0 +1,912 @@
+#
+# Makefile generated by fpcmake v0.99.13 on 1999-11-24 22:54
+#
+
+defaultrule: all
+
+#####################################################################
+# Autodetect OS (Linux or Dos or Windows NT)
+# define inlinux when running under linux
+# define inWinNT when running under WinNT
+#####################################################################
+
+# We need only / in the path
+override PATH:=$(subst \,/,$(PATH))
+
+# Search for PWD and determine also if we are under linux
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
+ifeq ($(PWD),)
+nopwd:
+	@echo You need the GNU utils package to use this Makefile!
+	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
+	@exit
+else
+inlinux=1
+endif
+else
+PWD:=$(firstword $(PWD))
+endif
+
+# Detect NT - NT sets OS to Windows_NT
+ifndef inlinux
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+endif
+endif
+
+# Detect OS/2 - OS/2 has OS2_SHELL defined
+ifndef inlinux
+ifndef inWinNT
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+endif
+
+# The extension of executables
+ifdef inlinux
+EXEEXT=
+else
+EXEEXT=.exe
+endif
+
+# The path which is search separated by spaces
+ifdef inlinux
+SEARCHPATH=$(subst :, ,$(PATH))
+else
+SEARCHPATH=$(subst ;, ,$(PATH))
+endif
+
+#####################################################################
+# FPC version/target Detection
+#####################################################################
+
+# What compiler to use ?
+ifndef FPC
+ifdef inOS2
+export FPC=ppos2$(EXEEXT)
+else
+export FPC=ppc386$(EXEEXT)
+endif
+endif
+
+# Target OS
+ifndef OS_TARGET
+export OS_TARGET:=$(shell $(FPC) -iTO)
+endif
+
+# Source OS
+ifndef OS_SOURCE
+export OS_SOURCE:=$(shell $(FPC) -iSO)
+endif
+
+# Target CPU
+ifndef CPU_TARGET
+export CPU_TARGET:=$(shell $(FPC) -iTP)
+endif
+
+# Source CPU
+ifndef CPU_SOURCE
+export CPU_SOURCE:=$(shell $(FPC) -iSP)
+endif
+
+# FPC version
+ifndef FPC_VERSION
+export FPC_VERSION:=$(shell $(FPC) -iV)
+endif
+
+#####################################################################
+# Default Settings
+#####################################################################
+
+# Release ? Then force OPT and don't use extra opts via commandline
+ifdef RELEASE
+override OPT:=-Xs -OG2p3 -n
+endif
+
+# Verbose settings (warning,note,info)
+ifdef VERBOSE
+override OPT+=-vwni
+endif
+
+#####################################################################
+# User Settings
+#####################################################################
+
+
+# Targets
+
+UNITOBJECTS+=glib gmodule gdk gtk
+
+# Clean
+
+
+# Install
+
+
+# Defaults
+
+
+# Directories
+
+vpath %$(PASEXT) glib gdk gtk
+ifndef FPCDIR
+FPCDIR=..
+endif
+ifndef PACKAGEDIR
+PACKAGEDIR=$(FPCDIR)/packages
+endif
+ifndef TARGETDIR
+TARGETDIR=.
+endif
+
+# Packages
+
+
+# Libraries
+
+LIBNAME=fpgtk
+
+# Info
+
+FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
+
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+#####################################################################
+# Install Directories
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# Where to install shared libraries
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+LIBINSTALLDIR=$(UNITINSTALLDIR)
+endif
+endif
+
+# Where the source files will be stored
+ifndef SOURCEINSTALLDIR
+ifdef inlinux
+SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
+else
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+# Where the some extra (data)files will be stored
+ifndef EXTRAINSTALLDIR
+EXTRAINSTALLDIR=$(BASEINSTALLDIR)
+endif
+
+
+#####################################################################
+# Compiler Command Line
+#####################################################################
+
+# Load commandline OPTDEF and add FPC_CPU define
+override FPCOPTDEF:=-d$(CPU_TARGET)
+
+# Load commandline OPT and add target and unit dir to be sure
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+
+# RTL first and then Unit dir (a unit can override RTLunit). Don't add the
+# dirs if fpcdir=. which can be used for the rtl makefiles
+ifdef FPCDIR
+ifneq ($(FPCDIR),.)
+override FPCOPT+=-Fu$(FPCDIR)/rtl/$(OS_TARGET) -Fu$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+
+# Target dirs
+ifdef TARGETDIR
+override FPCOPT+=-FE$(TARGETDIR)
+endif
+
+# Smartlinking
+ifdef SMARTLINK
+override FPCOPT+=-CX
+endif
+
+# Debug
+ifdef DEBUG
+override FPCOPT+=-g
+endif
+
+# Add commandline options
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+endif
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+endif
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+endif
+
+# Add defines from FPCOPTDEF to FPCOPT
+ifdef FPCOPTDEF
+override FPCOPT+=$(FPCOPTDEF)
+endif
+
+# Was a config file specified ?
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+
+override COMPILER=$(FPC) $(FPCOPT)
+
+#####################################################################
+# Shell tools
+#####################################################################
+
+# To copy pograms
+ifndef COPY
+export COPY:=cp -fp
+endif
+
+# To move pograms
+ifndef MOVE
+export MOVE:=mv -f
+endif
+
+# Check delete program
+ifndef DEL
+export DEL:=rm -f
+endif
+
+# Check deltree program
+ifndef DELTREE
+export DELTREE:=rm -rf
+endif
+
+# To install files
+ifndef INSTALL
+ifdef inlinux
+export INSTALL:=install -m 644
+else
+export INSTALL:=$(COPY)
+endif
+endif
+
+# To install programs
+ifndef INSTALLEXE
+ifdef inlinux
+export INSTALLEXE:=install -m 755
+else
+export INSTALLEXE:=$(COPY)
+endif
+endif
+
+# To make a directory.
+ifndef MKDIR
+ifdef inlinux
+export MKDIR:=install -m 755 -d
+else
+export MKDIR:=ginstall -m 755 -d
+endif
+endif
+
+#####################################################################
+# Default Tools
+#####################################################################
+
+# assembler, redefine it if cross compiling
+ifndef AS
+AS=as
+endif
+
+# linker, but probably not used
+ifndef LD
+LD=ld
+endif
+
+# ppas.bat / ppas.sh
+ifdef inlinux
+PPAS=ppas.sh
+else
+ifdef inOS2
+PPAS=ppas.cmd
+else
+PPAS=ppas.bat
+endif
+endif
+
+# also call ppas if with command option -s
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+EXECPPAS=@$(PPAS)
+endif
+
+# ldconfig to rebuild .so cache
+ifdef inlinux
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+
+# echo
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+export ECHO:=echo
+else
+export ECHO:=$(firstword $(ECHO))
+endif
+endif
+
+# ppdep
+ifndef PPDEP
+PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPDEP),)
+PPDEP=
+else
+export PPDEP:=$(firstword $(PPDEP))
+endif
+endif
+
+# ppumove
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE=
+else
+export PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+
+# ppufiles
+ifndef PPUFILES
+PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUFILES),)
+PPUFILES=
+else
+export PPUFILES:=$(firstword $(PPUFILES))
+endif
+endif
+
+# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
+# upx uses that one itself (PFV)
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+export UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+
+# gdate/date
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))
+ifeq ($(DATE),)
+DATE=
+else
+export DATE:=$(firstword $(DATE))
+endif
+else
+export DATE:=$(firstword $(DATE))
+endif
+endif
+
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+
+# ZipProg, you can't use Zip as the var name (PFV)
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG=
+else
+export ZIPPROG:=$(firstword $(ZIPPROG)) -D9 -r
+endif
+endif
+
+ifndef ZIPEXT
+ZIPEXT=.zip
+endif
+
+#####################################################################
+# Default extensions
+#####################################################################
+
+# Default needed extensions (Go32v2,Linux)
+LOADEREXT=.as
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+PACKAGESUFFIX=
+
+# Go32v1
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+PACKAGESUFFIX=v1
+endif
+
+# Go32v2
+ifeq ($(OS_TARGET),go32v2)
+PACKAGESUFFIX=go32
+endif
+
+# Linux
+ifeq ($(OS_TARGET),linux)
+PACKAGESUFFIX=linux
+endif
+
+# Win32
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=win32
+endif
+
+# OS/2
+ifeq ($(OS_TARGET),os2)
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+SMARTEXT=.so
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=os2
+endif
+
+# library prefix
+LIBPREFIX=lib
+ifeq ($(OS_TARGET),go32v2)
+LIBPREFIX=
+endif
+ifeq ($(OS_TARGET),go32v1)
+LIBPREFIX=
+endif
+
+# determine which .pas extension is used
+ifndef PASEXT
+ifdef EXEOBJECTS
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
+else
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
+endif
+ifeq ($(TESTPAS),)
+PASEXT=.pp
+else
+PASEXT=.pas
+endif
+endif
+
+#####################################################################
+# Default rules
+#####################################################################
+
+.PHONY: defaultrule all debug examples test smart shared \
+	showinstall install zipinstall zipinstalladd \
+	clean cleanall depend info
+
+all: fpc_all
+
+debug: fpc_debug
+
+smart: fpc_smart
+
+shared: fpc_shared
+
+showinstall: fpc_showinstall
+
+install: fpc_install
+
+zipinstall: fpc_zipinstall
+
+zipinstalladd: fpc_zipinstalladd
+
+cleanall: fpc_cleanall
+
+info: fpc_info
+
+#####################################################################
+# Units
+#####################################################################
+
+.PHONY: fpc_units
+
+override ALLTARGET+=fpc_units
+
+UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
+override INSTALLPPUFILES+=$(UNITPPUFILES)
+override CLEANPPUFILES+=$(UNITPPUFILES)
+
+fpc_units: $(UNITPPUFILES)
+
+#####################################################################
+# General compile rules
+#####################################################################
+
+.PHONY: fpc_all fpc_debug
+
+fpc_all: $(ALLTARGET)
+
+fpc_debug:
+	$(MAKE) all DEBUG=1
+
+# General compile rules, available for both possible PASEXT
+
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
+
+%$(PPUEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(PPUEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+#####################################################################
+# Library
+#####################################################################
+
+.PHONY: fpc_smart fpc_shared
+
+# Default sharedlib units are all unit objects
+ifndef SHAREDLIBUNITOBJECTS
+SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
+endif
+
+fpc_smart:
+	$(MAKE) all SMARTLINK=1
+
+fpc_shared: all
+ifdef inlinux
+ifndef LIBNAME
+	@$(ECHO) LIBNAME not set
+else
+	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
+endif
+else
+	@$(ECHO) Shared Libraries not supported
+endif
+
+#####################################################################
+# Install rules
+#####################################################################
+
+.PHONY: fpc_showinstall fpc_install
+
+ifdef EXTRAINSTALLUNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
+endif
+
+ifdef INSTALLPPUFILES
+ifdef PPUFILES
+ifdef inlinux
+INSTALLPPULINKFILES=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
+INSTALLPPULIBFILES=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
+else
+INSTALLPPULINKFILES=$(shell $(PPUFILES) $(INSTALLPPUFILES))
+endif
+endif
+endif
+
+fpc_showinstall: $(SHOWINSTALLTARGET)
+ifdef INSTALLEXEFILES
+	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
+endif
+ifdef INSTALLPPUFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
+ifneq ($(INSTALLPPULINKFILES),)
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
+endif
+ifneq ($(INSTALLPPULIBFILES),)
+	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
+endif
+endif
+ifdef EXTRAINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
+endif
+
+fpc_install: $(INSTALLTARGET)
+# Create UnitInstallFiles
+ifdef INSTALLEXEFILES
+	$(MKDIR) $(BININSTALLDIR)
+# Compress the exes if upx is defined
+ifdef UPXPROG
+	-$(UPXPROG) $(INSTALLEXEFILES)
+endif
+	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
+endif
+ifdef INSTALLPPUFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
+endif
+ifneq ($(INSTALLPPULIBFILES),)
+	$(MKDIR) $(LIBINSTALLDIR)
+	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
+endif
+endif
+ifdef EXTRAINSTALLFILES
+	$(MKDIR) $(EXTRAINSTALLDIR)
+	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
+endif
+
+#####################################################################
+# Zip
+#####################################################################
+
+.PHONY: fpc_zipinstall fpc_zipinstalladd
+
+# Temporary path to pack a file
+ifndef PACKDIR
+ifndef inlinux
+PACKDIR=pack_tmp
+else
+PACKDIR=/tmp/fpc-pack
+endif
+endif
+
+# Test dir if none specified
+ifndef PACKAGEDIR
+PACKAGEDIR=$(BASEDIR)
+endif
+
+# Add .zip/.tar.gz extension
+ifdef ZIPNAME
+ifndef inlinux
+override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
+endif
+endif
+
+# Default target which is call before zipping
+ifndef ZIPTARGET
+ZIPTARGET=install
+endif
+
+# Note: This will not remove the zipfile first
+fpc_zipinstalladd:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz
+	cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
+	gzip $(PACKAGEDIR)/$(ZIPNAME).tar
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+# First remove the zip and then install
+fpc_zipinstall:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(DEL) $(PACKAGEDIR)/$(ZIPNAME)
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+#####################################################################
+# Clean rules
+#####################################################################
+
+.PHONY: fpc_clean fpc_cleanall
+
+ifdef EXTRACLEANUNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
+endif
+
+ifdef CLEANPPUFILES
+ifdef PPUFILES
+CLEANPPULINKFILES=$(shell $(PPUFILES) $(CLEANPPUFILES))
+endif
+endif
+
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+	-$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+	-$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+	-$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef EXTRACLEANFILES
+	-$(DEL) $(EXTRACLEANFILES)
+endif
+	-$(DEL) $(PPAS) link.res log
+
+fpc_cleanall:
+ifdef CLEANEXEFILES
+	-$(DEL) $(CLEANEXEFILES)
+endif
+	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+	-$(DELTREE) *$(SMARTEXT)
+	-$(DEL) $(PPAS) link.res log
+
+#####################################################################
+# Info rules
+#####################################################################
+
+.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
+	fpc_dirinfo
+
+fpc_info: $(FPCINFO)
+
+fpc_infocfg:
+	@$(ECHO)
+	@$(ECHO)  == Configuration info ==
+	@$(ECHO)
+	@$(ECHO)  FPC....... $(FPC)
+	@$(ECHO)  Version... $(FPC_VERSION)
+	@$(ECHO)  CPU....... $(CPU_TARGET)
+	@$(ECHO)  Source.... $(OS_SOURCE)
+	@$(ECHO)  Target.... $(OS_TARGET)
+	@$(ECHO)
+
+fpc_infoobjects:
+	@$(ECHO)
+	@$(ECHO)  == Object info ==
+	@$(ECHO)
+	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
+	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
+	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
+	@$(ECHO)
+	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
+	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
+	@$(ECHO)
+	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
+	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
+	@$(ECHO)
+
+fpc_infoinstall:
+	@$(ECHO)
+	@$(ECHO)  == Install info ==
+	@$(ECHO)
+ifdef DATE
+	@$(ECHO)  DateStr.............. $(DATESTR)
+endif
+	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
+	@$(ECHO)
+	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
+	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
+	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
+	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
+	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
+	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
+	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
+	@$(ECHO)
+
+#####################################################################
+# Users rules
+#####################################################################
+
+clean: fpc_clean
+	$(MAKE) -C examples clean
+	$(MAKE) -C tutorial clean
+
+glib$(PPUEXT): $(wildcard glib/glib*$(PASEXT))
+
+gmodule$(PPUEXT): $(wildcard glib/gmodule*$(PASEXT)) glib$(PPUEXT)
+
+gdk$(PPUEXT): $(wildcard gdk/gdk*$(PASEXT)) glib$(PPUEXT)
+
+gtk$(PPUEXT): $(wildcard gtk/gtk*$(PASEXT)) gdk$(PPUEXT)
+
+# Examples, tutorial
+examples: all
+	$(MAKE) -C examples
+
+tutorial: all
+	$(MAKE) -C tutorial

+ 38 - 0
packages/gtk/Makefile.fpc

@@ -0,0 +1,38 @@
+#
+#   Makefile.fpc for Free Pascal GTK 1.2.x Bindings
+#
+
+[targets]
+units=glib gmodule gdk gtk
+
+[dirs]
+fpcdir=..
+sourcesdir=glib gdk gtk
+targetdir=.
+
+[libs]
+libname=fpgtk
+
+[defaults]
+defaultunits=1
+
+
+[rules]
+clean: fpc_clean
+        $(MAKE) -C examples clean
+        $(MAKE) -C tutorial clean
+
+glib$(PPUEXT): $(wildcard glib/glib*$(PASEXT))
+
+gmodule$(PPUEXT): $(wildcard glib/gmodule*$(PASEXT)) glib$(PPUEXT)
+
+gdk$(PPUEXT): $(wildcard gdk/gdk*$(PASEXT)) glib$(PPUEXT)
+
+gtk$(PPUEXT): $(wildcard gtk/gtk*$(PASEXT)) gdk$(PPUEXT)
+
+# Examples, tutorial
+examples: all
+        $(MAKE) -C examples
+
+tutorial: all
+        $(MAKE) -C tutorial

+ 81 - 0
packages/gtk/README

@@ -0,0 +1,81 @@
+Free Pascal interface to GDK/GTK
+================================
+
+Prerequisites:
+--------------
+
+In order for the makefile to work, you NEED the following file:
+  makefile.fpc
+and it MUST be located in the directory above this directory.
+
+If you have this file on another place in your directory tree, just 
+set the FPCDIR variable so it points to that directory.
+  (e.g. FPCDIR=/usr/lib/fpc/0.99.13; export FPCDIR in bash, or
+        SETENV FPCDIR /usr/lib/fpc/0.99.13 in csh)
+
+If you don't have this file, you can get it from
+  ftp://tflily.fys.kuleuven.ac.be/pub/fpc/source/base.zip
+or one of the mirrors.
+ 
+Compiling the units:
+--------------------
+
+there are 4 targets for the makefile
+
+make all      : compile all units
+make install  : make all first and then install the units
+make examples : compile the examples
+make clean    : clean up object and unit files.
+
+
+Using the units:
+----------------
+
+1) In C, you only need to input gtk.h. Here you need to input all files
+   that you're likely to use, so you may have to experiment.
+
+2) Names :
+   + Pascal reserved words in types, record element names etc. have been
+     prepended with the word 'the'. so 'label' has become 'thelabel'
+   + functions have been kept with the same names.
+   + for types : gdk names have been kept. Pointers to a type are defined
+     as the type name, prepended with P. So 'GtkWidget *' becomes
+     'PGtkWidget'.
+     In gtkobject, names also have been kept.
+     In all other files, types have been prepended with T, that is, the C
+     type 'GtkWidget' has become 'TGtkWidget'
+     
+     This is annoying, but C is case sensitive, and Pascal is not, so
+     there you have it...
+     
+     When translating, I've tried to stick to this scheme as closely as I
+     could. One day, however, all will be done in a uniform manner...
+
+3) Macros. Many C macros have not been translated. The typecasting macros 
+   have been dropped, since they're useless under pascal.
+   Macros to access record members have been translated, BUT they are 
+   to be considered as READ-ONLY. So they can be used to retrieve a value,
+   but not to store one.
+   e.g.
+      function GTK_WIDGET_FLAGS(wid : pgtkwidget) : longint;
+   can be used to retrieve the widget flags, but not to set them.
+   so things like 
+     GTK_WIDGET_FLAGS(wid):=GTK_WIDGET_FLAGS(wid) and someflag;
+   will not work, since this is a function, and NOT a macro as in C.
+  
+4) Packed records. GCC allows you to specify members of a record in
+   bit format. Since this is impossible in pascal, functions and procedures
+   to get/set these elements have been made.
+   e.g.
+     function width_set(var a : TGtkCListColumn) : gint;
+     procedure set_width_set(var a : TGtkCListColumn; __width_set : gint);
+   can be used to get or set the width in a TGtkCListColumn...
+   in general, it's the name with '_set' appended for getting a value
+   (set from 'a set') , and  'set_' prepended (from 'to set') and again
+   '_set' appended.
+   
+   
+And that is about all there is to say about it.
+
+Enjoy !
+Michael.

+ 194 - 0
packages/gtk/conv/fixexmcdecl.pp

@@ -0,0 +1,194 @@
+{$mode objfpc}
+{$H+}
+
+uses
+  sysutils;
+
+Function PosIdx (Const Substr : AnsiString; Const Source : AnsiString;i:longint) : Longint;
+var
+  S : String;
+begin
+  PosIdx:=0;
+  if Length(SubStr)=0 then
+   exit;
+  while (i <= length (Source) - length (substr)) do
+   begin
+     inc (i);
+     S:=copy(Source,i,length(Substr));
+     if S=SubStr then
+      exit(i);
+   end;
+end;
+
+
+   function trimspace(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       while (i>0) and (s[i] in [#9,' ']) do
+        dec(i);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimspace:=Copy(s,j,i-j+1);
+     end;
+
+   function trimbegin(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimbegin:=Copy(s,j,i-j+1);
+     end;
+
+    procedure Replace(var s:string;const s1,s2:string);
+      var
+         last,
+         i  : longint;
+      begin
+        last:=0;
+        repeat
+          i:=posidx(s1,uppercase(s),last);
+          if (i>0) then
+           begin
+             Delete(s,i,length(s1));
+             Insert(s2,s,i);
+             last:=i+1;
+           end;
+        until (i=0);
+      end;
+
+procedure Conv(const fn: string);
+var
+  t,f : text;
+  lasts,funcname,
+  s,ups : string;
+  k,i,j : integer;
+  gotisfunc,
+  impl : boolean;
+begin
+  writeln('processing ',fn);
+  assign(t,fn);
+  assign(f,'fixgdk.tmp');
+  reset(t);
+  rewrite(f);
+  funcname:='';
+  gotisfunc:=false;
+  impl:=false;
+  while not eof(t) do
+   begin
+     readln(t,s);
+
+     Replace(s,'PROCEDURE','procedure');
+     Replace(s,'FUNCTION','function');
+     Replace(s,'FUNCTION  ','function ');
+     Replace(s,'PPG','PPG');
+     Replace(s,'PG','PG');
+     Replace(s,'GCHAR','gchar');
+     Replace(s,'GUCHAR','guchar');
+     Replace(s,'GINT','gint');
+     Replace(s,'GUINT','guint');
+     Replace(s,'GBOOL','gbool');
+     Replace(s,'GSHORT','gshort');
+     Replace(s,'GUSHORT','gushort');
+     Replace(s,'GLONG','glong');
+     Replace(s,'GULONG','gulong');
+     Replace(s,'GFLOAT','gfloat');
+     Replace(s,'GDOUBLE','gdouble');
+     Replace(s,'GPOINTER','gpointer');
+     Replace(s,'GCONSTPOINTER','gconstpointer');
+     Replace(s,'GDK','Gdk');
+     Replace(s,'GDK_','gdk_');
+     Replace(s,'GTK','Gtk');
+     Replace(s,'GTK_','gtk_');
+
+     ups:=UpperCase(s);
+
+     if Pos('IMPLEMENTATION',ups)>0 then
+      impl:=true;
+
+     i:=Pos('PROCEDURE',ups);
+     if i>0 then
+      if Pos('_PROCEDURE',ups)>0 then
+       i:=0;
+     if i=0 then
+      begin
+        i:=Pos('FUNCTION',ups);
+        if Pos('_FUNCTION',ups)>0 then
+         i:=0;
+      end;
+     if i<>0 then
+      begin
+      { Remove Spaces }
+        j:=PosIdx('  ',s,i);
+        while (j>0) do
+         begin
+           Delete(s,j,1);
+           i:=j-1;
+           j:=PosIdx('  ',s,i);
+         end;
+        ups:=UpperCase(s);
+      { Fix Cdecl }
+        if (Pos('g_',s)<>0) or
+           ((i>2) and (s[i-2] in [':','='])) then
+         begin
+           j:=Pos('CDECL;',ups);
+           if j=0 then
+            j:=Length(s)+1
+           else
+            begin
+              k:=Pos('{$IFNDEF WIN32}CDECL;{$ENDIF}',ups);
+              if k>0 then
+               begin
+                 j:=k;
+                 k:=29;
+               end
+              else
+               begin
+                 k:=Pos('{$IFDEF WIN32}STDCALL;{$ELSE}CDECL;{$ENDIF}',ups);
+                 if k>0 then
+                  begin
+                    j:=k;
+                    k:=43;
+                  end
+                 else
+                  k:=6;
+               end;
+              Delete(s,j,k);
+            end;
+           Insert('cdecl;',s,j);
+         end;
+        ups:=UpperCase(s);
+      end;
+
+     { Align function with procedure }
+     if Copy(s,1,8)='function' then
+      Insert(' ',s,9);
+
+     lasts:=s;
+     writeln(f,s);
+   end;
+  close(f);
+  close(t);
+  erase(t);
+  rename(f,fn);
+end;
+
+var
+ i : integer;
+ dir : tsearchrec;
+begin
+  for i:=1to paramcount do
+   begin
+     if findfirst(paramstr(i),$20,dir)=0 then
+      repeat
+        Conv(dir.name);
+      until findnext(dir)<>0;
+     findclose(dir);
+   end;
+end.
+

+ 229 - 0
packages/gtk/conv/fixgdk.pp

@@ -0,0 +1,229 @@
+    function lower(const s : string) : string;
+    {
+      return lowercased string of s
+    }
+      var
+         i : longint;
+      begin
+         for i:=1 to length(s) do
+          if s[i] in ['A'..'Z'] then
+           lower[i]:=char(byte(s[i])+32)
+          else
+           lower[i]:=s[i];
+         lower[0]:=s[0];
+      end;
+
+    function upper(const s : string) : string;
+    {
+      return lowercased string of s
+    }
+      var
+         i : longint;
+      begin
+         for i:=1 to length(s) do
+          if s[i] in ['a'..'z'] then
+           upper[i]:=char(byte(s[i])-32)
+          else
+           upper[i]:=s[i];
+         upper[0]:=s[0];
+      end;
+
+   function trimspace(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       while (i>0) and (s[i] in [#9,' ']) do
+        dec(i);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimspace:=Copy(s,j,i-j+1);
+     end;
+
+   function trimbegin(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimbegin:=Copy(s,j,i-j+1);
+     end;
+
+    procedure Replace(var s:string;const s1,s2:string;single:boolean);
+      var
+         last,
+         i  : longint;
+      begin
+        last:=0;
+        repeat
+          i:=pos(s1,upper(s));
+          if i=last then
+           i:=0;
+          if (i>0) then
+           begin
+             Delete(s,i,length(s1));
+             Insert(s2,s,i);
+             last:=i;
+           end;
+        until single or (i=0);
+      end;
+
+    procedure fixreplace(var s:string);
+      begin
+        replace(s,'P_GDK','PGdk',false);
+        replace(s,'= ^T_GDK','= ^TGdk',false);
+        replace(s,'^T_GDK','PGdk',false);
+        replace(s,'T_GDK','TGdk',false);
+        replace(s,'^GDK','PGdk',false);
+        replace(s,'EXTERNAL_LIBRARY','gdkdll',false);
+      end;
+
+
+var
+  t,f : text;
+  ssmall : string[20];
+  hs,
+  s   : string;
+  name : string;
+  i    : word;
+  func,
+  impl : boolean;
+begin
+  impl:=false;
+  assign(t,paramstr(1));
+  assign(f,'fixgdk.tmp');
+  reset(t);
+  rewrite(f);
+  writeln(f,'{');
+  writeln(f,'   $Id$');
+  writeln(f,'}');
+  writeln(f,'');
+  writeln(f,'{$ifndef gdk_include_files}');
+  writeln(f,'  {$define read_interface}');
+  writeln(f,'  {$define read_implementation}');
+  writeln(f,'{$endif not gdk_include_files}');
+  writeln(f,'');
+  writeln(f,'{$ifndef gdk_include_files}');
+  writeln(f,'');
+  writeln(f,'  unit ',Copy(paramstr(1),1,pos('.',paramstr(1))-1),';');
+  writeln(f,'  interface');
+  writeln(f,'');
+  writeln(f,'  uses');
+  writeln(f,'    glib,gdkmain,');
+  writeln(f,'    gtkobjects;');
+  writeln(f,'');
+  writeln(f,'  {$ifdef win32}');
+  writeln(f,'    const');
+  writeln(f,'      gtkdll=''gdk-1.1.dll''; { leave the .dll else .1.1 -> .1 !! }');
+  writeln(f,'  {$else}');
+  writeln(f,'    const');
+  writeln(f,'      gtkdll=''gdk.so'';');
+  writeln(f,'    {$linklib c}');
+  writeln(f,'  {$endif}');
+  writeln(f,'');
+  writeln(f,'  Type');
+  writeln(f,'    PLongint  = ^Longint;');
+  writeln(f,'    PByte     = ^Byte;');
+  writeln(f,'    PWord     = ^Word;');
+  writeln(f,'    PINteger  = ^Integer;');
+  writeln(f,'    PCardinal = ^Cardinal;');
+  writeln(f,'    PReal     = ^Real;');
+  writeln(f,'    PDouble   = ^Double;');
+  writeln(f,'');
+  writeln(f,'{$endif not gdk_include_files}');
+  writeln(f,'');
+  writeln(f,'{$ifdef read_interface}');
+  writeln(f,'');
+  while not eof(t) do
+   begin
+     read(t,ssmall);
+     fixreplace(ssmall);
+
+     if (not impl) and (copy(trimspace(ssmall),1,14)='implementation') then
+      begin
+        impl:=true;
+        readln(t,s);
+        writeln(f,'{$endif read_interface}');
+        writeln(f,'');
+        writeln(f,'');
+        writeln(f,'{$ifndef gdk_include_files}');
+        writeln(f,'  implementation');
+        writeln(f,'{$endif not gdk_include_files}');
+        writeln(f,'');
+        writeln(f,'{$ifdef read_implementation}');
+        writeln(f,'');
+        continue;
+      end;
+     if (impl) and (copy(trimspace(ssmall),1,4)='end.') then
+      begin
+        writeln(f,'{$endif read_implementation}');
+        writeln(f,'');
+        writeln(f,'');
+        writeln(f,'{$ifndef gdk_include_files}');
+        writeln(f,'end.');
+        writeln(f,'{$endif not gdk_include_files}');
+        writeln(f,'');
+        writeln(f,'{');
+        writeln(f,'  $Log: fixgdk.pp,v $
+        writeln(f,'  Revision 1.1  1999/05/07 15:09:36  peter
+        writeln(f,'    * more fixes
+        writeln(f,'');
+        writeln(f,'}');
+        continue;
+      end;
+
+     readln(t,s);
+     fixreplace(s);
+
+     func:=false;
+     if lower(copy(trimspace(ssmall),1,8))='function' then
+      begin
+        func:=true;
+        name:=trimspace(ssmall+s);
+        delete(name,1,9);
+        name:=trimspace(name);
+        i:=1;
+        while (name[i] in ['_','A'..'Z','a'..'z','0'..'9']) do
+         inc(i);
+        delete(name,i,255);
+        hs:=trimbegin(ssmall);
+        replace(hs,'FUNCTION','function ',true);
+        write(f,hs);
+      end
+     else
+      if lower(copy(trimspace(ssmall),1,9))='procedure' then
+       begin
+         func:=true;
+         name:=trimspace(ssmall+s);
+         delete(name,1,10);
+         name:=trimspace(name);
+         i:=1;
+         while (name[i] in ['_','A'..'Z','a'..'z','0'..'9']) do
+          inc(i);
+         delete(name,i,255);
+         write(f,trimbegin(ssmall));
+       end
+     else
+       write(f,ssmall);
+
+     if func and (copy(name,1,3)='gdk') then
+      begin
+        if pos('cdecl;',s)=0 then
+         begin
+           write(f,s);
+           readln(t,s);
+         end;
+        replace(s,'CDECL;','{$ifndef win32}cdecl;{$endif}',true);
+        writeln(f,s);
+      end
+     else
+      writeln(f,s);
+   end;
+  close(f);
+  close(t);
+  erase(t);
+  rename(f,paramstr(1));
+end.

+ 224 - 0
packages/gtk/conv/fixgdkcdecl.pp

@@ -0,0 +1,224 @@
+{$mode objfpc}
+{$H+}
+
+uses
+  sysutils;
+
+Function PosIdx (Const Substr : AnsiString; Const Source : AnsiString;i:longint) : Longint;
+var
+  S : String;
+begin
+  PosIdx:=0;
+  if Length(SubStr)=0 then
+   exit;
+  while (i <= length (Source) - length (substr)) do
+   begin
+     inc (i);
+     S:=copy(Source,i,length(Substr));
+     if S=SubStr then
+      exit(i);
+   end;
+end;
+
+
+   function trimspace(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       while (i>0) and (s[i] in [#9,' ']) do
+        dec(i);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimspace:=Copy(s,j,i-j+1);
+     end;
+
+   function trimbegin(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimbegin:=Copy(s,j,i-j+1);
+     end;
+
+    procedure Replace(var s:string;const s1,s2:string);
+      var
+         last,
+         i  : longint;
+      begin
+        last:=0;
+        repeat
+          i:=posidx(s1,uppercase(s),last);
+          if (i>0) then
+           begin
+             Delete(s,i,length(s1));
+             Insert(s2,s,i);
+             last:=i+1;
+           end;
+        until (i=0);
+      end;
+
+procedure Conv(const fn: string);
+var
+  t,f : text;
+  lasts,funcname,
+  s,ups : string;
+  k,i,j : integer;
+  gotisfunc,
+  impl : boolean;
+begin
+  writeln('processing ',fn);
+  assign(t,fn);
+  assign(f,'fixgdk.tmp');
+  reset(t);
+  rewrite(f);
+  funcname:='';
+  gotisfunc:=false;
+  impl:=false;
+  while not eof(t) do
+   begin
+     readln(t,s);
+   { Remove unit part }
+     if s='{$ifndef gdk_include_files}' then
+      begin
+        while not eof(t) do
+         begin
+           readln(t,s);
+           if Pos('{$ifdef read_interface}',s)>0 then
+            begin
+              writeln(f,'{****************************************************************************');
+              writeln(f,'                                 Interface');
+              writeln(f,'****************************************************************************}');
+              writeln(f,'');
+              writeln(f,s);
+              break;
+            end;
+           if Pos('{$ifdef read_implementation}',s)>0 then
+            begin
+              writeln(f,'{****************************************************************************');
+              writeln(f,'                              Implementation');
+              writeln(f,'****************************************************************************}');
+              writeln(f,'');
+              writeln(f,s);
+              impl:=true;
+              break;
+            end;
+           if Pos('$Log:',s)>0 then
+            begin
+              writeln(f,'{');
+              writeln(f,s);
+              break;
+            end;
+         end;
+        continue;
+      end;
+
+     Replace(s,'PROCEDURE','procedure');
+     Replace(s,'FUNCTION','function');
+     Replace(s,'FUNCTION  ','function ');
+     Replace(s,'PPG','PPG');
+     Replace(s,'PG','PG');
+     Replace(s,'GCHAR','gchar');
+     Replace(s,'GUCHAR','guchar');
+     Replace(s,'GINT','gint');
+     Replace(s,'GUINT','guint');
+     Replace(s,'GBOOL','gbool');
+     Replace(s,'GSHORT','gshort');
+     Replace(s,'GUSHORT','gushort');
+     Replace(s,'GLONG','glong');
+     Replace(s,'GULONG','gulong');
+     Replace(s,'GFLOAT','gfloat');
+     Replace(s,'GDOUBLE','gdouble');
+     Replace(s,'GPOINTER','gpointer');
+     Replace(s,'GCONSTPOINTER','gconstpointer');
+
+     ups:=UpperCase(s);
+
+     if Pos('IMPLEMENTATION',ups)>0 then
+      impl:=true;
+
+     i:=Pos('PROCEDURE',ups);
+     if i>0 then
+      if Pos('_PROCEDURE',ups)>0 then
+       i:=0;
+     if i=0 then
+      begin
+        i:=Pos('FUNCTION',ups);
+        if Pos('_FUNCTION',ups)>0 then
+         i:=0;
+      end;
+     if i<>0 then
+      begin
+      { Remove Spaces }
+        j:=PosIdx('  ',s,i);
+        while (j>0) do
+         begin
+           Delete(s,j,1);
+           i:=j-1;
+           j:=PosIdx('  ',s,i);
+         end;
+        ups:=UpperCase(s);
+      { Fix Cdecl }
+        if (Pos('gdk_',s)<>0) or
+           ((i>2) and (s[i-2] in [':','='])) then
+         begin
+           j:=Pos('CDECL;',ups);
+           if j=0 then
+            j:=Length(s)+1
+           else
+            begin
+              k:=Pos('{$IFNDEF WIN32}CDECL;{$ENDIF}',ups);
+              if k>0 then
+               begin
+                 j:=k;
+                 k:=29;
+               end
+              else
+               begin
+                 k:=Pos('{$IFDEF WIN32}STDCALL;{$ELSE}CDECL;{$ENDIF}',ups);
+                 if k>0 then
+                  begin
+                    j:=k;
+                    k:=43;
+                  end
+                 else
+                  k:=6;
+               end;
+              Delete(s,j,k);
+            end;
+           Insert('cdecl;',s,j);
+         end;
+        ups:=UpperCase(s);
+      end;
+
+     { Align function with procedure }
+     if Copy(s,1,8)='function' then
+      Insert(' ',s,9);
+
+     lasts:=s;
+     writeln(f,s);
+   end;
+  close(f);
+  close(t);
+  erase(t);
+  rename(f,fn);
+end;
+
+var
+ i : integer;
+ dir : tsearchrec;
+begin
+  for i:=1to paramcount do
+   begin
+     if findfirst(paramstr(i),$20,dir)=0 then
+      repeat
+        Conv(dir.name);
+      until findnext(dir)<>0;
+     findclose(dir);
+   end;
+end.
+

+ 190 - 0
packages/gtk/conv/fixglibcdecl.pp

@@ -0,0 +1,190 @@
+{$mode objfpc}
+{$H+}
+
+uses
+  sysutils;
+
+Function PosIdx (Const Substr : AnsiString; Const Source : AnsiString;i:longint) : Longint;
+var
+  S : String;
+begin
+  PosIdx:=0;
+  if Length(SubStr)=0 then
+   exit;
+  while (i <= length (Source) - length (substr)) do
+   begin
+     inc (i);
+     S:=copy(Source,i,length(Substr));
+     if S=SubStr then
+      exit(i);
+   end;
+end;
+
+
+   function trimspace(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       while (i>0) and (s[i] in [#9,' ']) do
+        dec(i);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimspace:=Copy(s,j,i-j+1);
+     end;
+
+   function trimbegin(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimbegin:=Copy(s,j,i-j+1);
+     end;
+
+    procedure Replace(var s:string;const s1,s2:string);
+      var
+         last,
+         i  : longint;
+      begin
+        last:=0;
+        repeat
+          i:=posidx(s1,uppercase(s),last);
+          if (i>0) then
+           begin
+             Delete(s,i,length(s1));
+             Insert(s2,s,i);
+             last:=i+1;
+           end;
+        until (i=0);
+      end;
+
+procedure Conv(const fn: string);
+var
+  t,f : text;
+  lasts,funcname,
+  s,ups : string;
+  k,i,j : integer;
+  gotisfunc,
+  impl : boolean;
+begin
+  writeln('processing ',fn);
+  assign(t,fn);
+  assign(f,'fixgdk.tmp');
+  reset(t);
+  rewrite(f);
+  funcname:='';
+  gotisfunc:=false;
+  impl:=false;
+  while not eof(t) do
+   begin
+     readln(t,s);
+
+     Replace(s,'PROCEDURE','procedure');
+     Replace(s,'FUNCTION','function');
+     Replace(s,'FUNCTION  ','function ');
+     Replace(s,'PPG','PPG');
+     Replace(s,'PG','PG');
+     Replace(s,'GCHAR','gchar');
+     Replace(s,'GUCHAR','guchar');
+     Replace(s,'GINT','gint');
+     Replace(s,'GUINT','guint');
+     Replace(s,'GBOOL','gbool');
+     Replace(s,'GSHORT','gshort');
+     Replace(s,'GUSHORT','gushort');
+     Replace(s,'GLONG','glong');
+     Replace(s,'GULONG','gulong');
+     Replace(s,'GFLOAT','gfloat');
+     Replace(s,'GDOUBLE','gdouble');
+     Replace(s,'GPOINTER','gpointer');
+     Replace(s,'GCONSTPOINTER','gconstpointer');
+
+     ups:=UpperCase(s);
+
+     if Pos('IMPLEMENTATION',ups)>0 then
+      impl:=true;
+
+     i:=Pos('PROCEDURE',ups);
+     if i>0 then
+      if Pos('_PROCEDURE',ups)>0 then
+       i:=0;
+     if i=0 then
+      begin
+        i:=Pos('FUNCTION',ups);
+        if Pos('_FUNCTION',ups)>0 then
+         i:=0;
+      end;
+     if i<>0 then
+      begin
+      { Remove Spaces }
+        j:=PosIdx('  ',s,i);
+        while (j>0) do
+         begin
+           Delete(s,j,1);
+           i:=j-1;
+           j:=PosIdx('  ',s,i);
+         end;
+        ups:=UpperCase(s);
+      { Fix Cdecl }
+        if (Pos('g_',s)<>0) or
+           ((i>2) and (s[i-2] in [':','='])) then
+         begin
+           j:=Pos('CDECL;',ups);
+           if j=0 then
+            j:=Length(s)+1
+           else
+            begin
+              k:=Pos('{$IFNDEF WIN32}CDECL;{$ENDIF}',ups);
+              if k>0 then
+               begin
+                 j:=k;
+                 k:=29;
+               end
+              else
+               begin
+                 k:=Pos('{$IFDEF WIN32}STDCALL;{$ELSE}CDECL;{$ENDIF}',ups);
+                 if k>0 then
+                  begin
+                    j:=k;
+                    k:=43;
+                  end
+                 else
+                  k:=6;
+               end;
+              Delete(s,j,k);
+            end;
+           Insert('cdecl;',s,j);
+         end;
+        ups:=UpperCase(s);
+      end;
+
+     { Align function with procedure }
+     if Copy(s,1,8)='function' then
+      Insert(' ',s,9);
+
+     lasts:=s;
+     writeln(f,s);
+   end;
+  close(f);
+  close(t);
+  erase(t);
+  rename(f,fn);
+end;
+
+var
+ i : integer;
+ dir : tsearchrec;
+begin
+  for i:=1to paramcount do
+   begin
+     if findfirst(paramstr(i),$20,dir)=0 then
+      repeat
+        Conv(dir.name);
+      until findnext(dir)<>0;
+     findclose(dir);
+   end;
+end.
+

+ 251 - 0
packages/gtk/conv/fixgtk.pp

@@ -0,0 +1,251 @@
+    function lower(const s : string) : string;
+    {
+      return lowercased string of s
+    }
+      var
+         i : longint;
+      begin
+         for i:=1 to length(s) do
+          if s[i] in ['A'..'Z'] then
+           lower[i]:=char(byte(s[i])+32)
+          else
+           lower[i]:=s[i];
+         lower[0]:=s[0];
+      end;
+
+    function upper(const s : string) : string;
+    {
+      return lowercased string of s
+    }
+      var
+         i : longint;
+      begin
+         for i:=1 to length(s) do
+          if s[i] in ['a'..'z'] then
+           upper[i]:=char(byte(s[i])-32)
+          else
+           upper[i]:=s[i];
+         upper[0]:=s[0];
+      end;
+
+   function trimspace(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       while (i>0) and (s[i] in [#9,' ']) do
+        dec(i);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimspace:=Copy(s,j,i-j+1);
+     end;
+
+   function trimbegin(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimbegin:=Copy(s,j,i-j+1);
+     end;
+
+    procedure Replace(var s:string;const s1,s2:string;single:boolean);
+      var
+         last,
+         i  : longint;
+      begin
+        last:=0;
+        repeat
+          i:=pos(s1,upper(s));
+          if i=last then
+           i:=0;
+          if (i>0) then
+           begin
+             Delete(s,i,length(s1));
+             Insert(s2,s,i);
+             last:=i;
+           end;
+        until single or (i=0);
+      end;
+
+    procedure ReplaceCase(var s:string;const s1,s2:string;single:boolean);
+      var
+         last,
+         i  : longint;
+      begin
+        last:=0;
+        repeat
+          i:=pos(s1,s);
+          if i=last then
+           i:=0;
+          if (i>0) then
+           begin
+             Delete(s,i,length(s1));
+             Insert(s2,s,i);
+             last:=i;
+           end;
+        until single or (i=0);
+      end;
+
+    procedure fixreplace(var s:string);
+      begin
+        replace(s,'P_GTK','PGtk',false);
+        replace(s,'= ^T_GTK','= ^TGtk',false);
+        replace(s,'^T_GTK','PGtk',false);
+        replace(s,'T_GTK','TGtk',false);
+        replace(s,'^GTK','PGtk',false);
+        replace(s,'EXTERNAL_LIBRARY','gtkdll',false);
+        replacecase(s,' Gtk',' TGtk',false);
+        replacecase(s,':Gtk',':TGtk',false);
+        replace(s,'^G','PG',false);
+      end;
+
+
+var
+  t,f : text;
+  ssmall : string[20];
+  hs,
+  s   : string;
+  name : string;
+  i    : word;
+  func,
+  impl : boolean;
+begin
+  impl:=false;
+  assign(t,paramstr(1));
+  assign(f,'fixgtk.tmp');
+  reset(t);
+  rewrite(f);
+  writeln(f,'{');
+  writeln(f,'   $Id$');
+  writeln(f,'}');
+  writeln(f,'');
+  writeln(f,'{$ifndef gtk_include_files}');
+  writeln(f,'  {$define read_interface}');
+  writeln(f,'  {$define read_implementation}');
+  writeln(f,'{$endif not gtk_include_files}');
+  writeln(f,'');
+  writeln(f,'{$ifndef gtk_include_files}');
+  writeln(f,'');
+  writeln(f,'  unit ',Copy(paramstr(1),1,pos('.',paramstr(1))-1),';');
+  writeln(f,'  interface');
+  writeln(f,'');
+  writeln(f,'  uses');
+  writeln(f,'    glib,gdkmain,');
+  writeln(f,'    gtkobjects;');
+  writeln(f,'');
+  writeln(f,'  {$ifdef win32}');
+  writeln(f,'    const');
+  writeln(f,'      gtkdll=''gtk-1.1.dll''; { leave the .dll else .1.1 -> .1 !! }');
+  writeln(f,'  {$else}');
+  writeln(f,'    const');
+  writeln(f,'      gtkdll=''gtk.so'';');
+  writeln(f,'    {$linklib c}');
+  writeln(f,'  {$endif}');
+  writeln(f,'');
+  writeln(f,'  Type');
+  writeln(f,'    PLongint  = ^Longint;');
+  writeln(f,'    PByte     = ^Byte;');
+  writeln(f,'    PWord     = ^Word;');
+  writeln(f,'    PINteger  = ^Integer;');
+  writeln(f,'    PCardinal = ^Cardinal;');
+  writeln(f,'    PReal     = ^Real;');
+  writeln(f,'    PDouble   = ^Double;');
+  writeln(f,'');
+  writeln(f,'{$endif not gtk_include_files}');
+  writeln(f,'');
+  writeln(f,'{$ifdef read_interface}');
+  writeln(f,'');
+  while not eof(t) do
+   begin
+     read(t,ssmall);
+     fixreplace(ssmall);
+
+     if (not impl) and (copy(trimspace(ssmall),1,14)='implementation') then
+      begin
+        impl:=true;
+        readln(t,s);
+        writeln(f,'{$endif read_interface}');
+        writeln(f,'');
+        writeln(f,'');
+        writeln(f,'{$ifndef gtk_include_files}');
+        writeln(f,'  implementation');
+        writeln(f,'{$endif not gtk_include_files}');
+        writeln(f,'');
+        writeln(f,'{$ifdef read_implementation}');
+        writeln(f,'');
+        continue;
+      end;
+     if (impl) and (copy(trimspace(ssmall),1,4)='end.') then
+      begin
+        writeln(f,'{$endif read_implementation}');
+        writeln(f,'');
+        writeln(f,'');
+        writeln(f,'{$ifndef gtk_include_files}');
+        writeln(f,'end.');
+        writeln(f,'{$endif not gtk_include_files}');
+        writeln(f,'');
+        writeln(f,'{');
+        writeln(f,'  $Log: fixgtk.pp,v $
+        writeln(f,'  Revision 1.2  1999/05/10 09:02:33  peter
+        writeln(f,'    * gtk 1.2 port working
+        writeln(f,'');
+        writeln(f,'}');
+        continue;
+      end;
+
+     readln(t,s);
+     fixreplace(s);
+
+     func:=false;
+     if lower(copy(trimspace(ssmall),1,8))='function' then
+      begin
+        func:=true;
+        name:=trimspace(ssmall+s);
+        delete(name,1,9);
+        name:=trimspace(name);
+        i:=1;
+        while (name[i] in ['_','A'..'Z','a'..'z','0'..'9']) do
+         inc(i);
+        delete(name,i,255);
+        hs:=trimbegin(ssmall);
+        replace(hs,'FUNCTION','function ',true);
+        write(f,hs);
+      end
+     else
+      if lower(copy(trimspace(ssmall),1,9))='procedure' then
+       begin
+         func:=true;
+         name:=trimspace(ssmall+s);
+         delete(name,1,10);
+         name:=trimspace(name);
+         i:=1;
+         while (name[i] in ['_','A'..'Z','a'..'z','0'..'9']) do
+          inc(i);
+         delete(name,i,255);
+         write(f,trimbegin(ssmall));
+       end
+     else
+       write(f,ssmall);
+
+     if func and (copy(name,1,3)='gtk') then
+      begin
+        if pos('cdecl;',s)=0 then
+         begin
+           write(f,s);
+           readln(t,s);
+         end;
+        replace(s,'CDECL;','{$ifndef win32}cdecl;{$endif}',true);
+        writeln(f,s);
+      end
+     else
+      writeln(f,s);
+   end;
+  close(f);
+  close(t);
+  erase(t);
+  rename(f,paramstr(1));
+end.

+ 263 - 0
packages/gtk/conv/fixgtkcdecl.pp

@@ -0,0 +1,263 @@
+{$mode objfpc}
+{$H+}
+
+uses
+  sysutils;
+
+Function PosIdx (Const Substr : AnsiString; Const Source : AnsiString;i:longint) : Longint;
+var
+  S : String;
+begin
+  PosIdx:=0;
+  if Length(SubStr)=0 then
+   exit;
+  while (i <= length (Source) - length (substr)) do
+   begin
+     inc (i);
+     S:=copy(Source,i,length(Substr));
+     if S=SubStr then
+      exit(i);
+   end;
+end;
+
+
+   function trimspace(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       while (i>0) and (s[i] in [#9,' ']) do
+        dec(i);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimspace:=Copy(s,j,i-j+1);
+     end;
+
+   function trimbegin(const s:string):string;
+     var
+       i,j : longint;
+     begin
+       i:=length(s);
+       j:=1;
+       while (j<i) and (s[j] in [#9,' ']) do
+        inc(j);
+       trimbegin:=Copy(s,j,i-j+1);
+     end;
+
+    procedure Replace(var s:string;const s1,s2:string);
+      var
+         last,
+         i  : longint;
+      begin
+        last:=0;
+        repeat
+          i:=posidx(s1,uppercase(s),last);
+          if (i>0) then
+           begin
+             Delete(s,i,length(s1));
+             Insert(s2,s,i);
+             last:=i+1;
+           end;
+        until (i=0);
+      end;
+
+procedure Conv(const fn: string);
+var
+  t,f : text;
+  lasts,funcname,
+  s,ups : string;
+  k,i,j : integer;
+  gotisfunc,
+  impl : boolean;
+begin
+  writeln('processing ',fn);
+  assign(t,fn);
+  assign(f,'fixgtk.tmp');
+  reset(t);
+  rewrite(f);
+  funcname:='';
+  gotisfunc:=false;
+  impl:=false;
+  while not eof(t) do
+   begin
+     readln(t,s);
+   { Remove unit part }
+     if s='{$ifndef gtk_include_files}' then
+      begin
+        while not eof(t) do
+         begin
+           readln(t,s);
+           if Pos('{$ifdef read_interface}',s)>0 then
+            begin
+              writeln(f,'{****************************************************************************');
+              writeln(f,'                                 Interface');
+              writeln(f,'****************************************************************************}');
+              writeln(f,'');
+              writeln(f,s);
+              break;
+            end;
+           if Pos('{$ifdef read_implementation}',s)>0 then
+            begin
+              writeln(f,'{****************************************************************************');
+              writeln(f,'                              Implementation');
+              writeln(f,'****************************************************************************}');
+              writeln(f,'');
+              writeln(f,s);
+              impl:=true;
+              break;
+            end;
+           if Pos('$Log:',s)>0 then
+            begin
+              writeln(f,'{');
+              writeln(f,s);
+              break;
+            end;
+         end;
+        continue;
+      end;
+
+     Replace(s,'PROCEDURE','procedure');
+     Replace(s,'FUNCTION','function');
+     Replace(s,'FUNCTION  ','function ');
+     Replace(s,'PPG','PPG');
+     Replace(s,'PG','PG');
+     Replace(s,'GCHAR','gchar');
+     Replace(s,'GUCHAR','guchar');
+     Replace(s,'GINT','gint');
+     Replace(s,'GUINT','guint');
+     Replace(s,'GBOOL','gbool');
+     Replace(s,'GSHORT','gshort');
+     Replace(s,'GUSHORT','gushort');
+     Replace(s,'GLONG','glong');
+     Replace(s,'GULONG','gulong');
+     Replace(s,'GFLOAT','gfloat');
+     Replace(s,'GDOUBLE','gdouble');
+     Replace(s,'GPOINTER','gpointer');
+     Replace(s,'GCONSTPOINTER','gconstpointer');
+
+     ups:=UpperCase(s);
+
+     if Pos('IMPLEMENTATION',ups)>0 then
+      impl:=true;
+
+     i:=Pos('PROCEDURE',ups);
+     if i>0 then
+      if Pos('_PROCEDURE',ups)>0 then
+       i:=0;
+     if i=0 then
+      begin
+        i:=Pos('FUNCTION',ups);
+        if Pos('_FUNCTION',ups)>0 then
+         i:=0;
+      end;
+     if i<>0 then
+      begin
+      { Remove Spaces }
+        j:=PosIdx('  ',s,i);
+        while (j>0) do
+         begin
+           Delete(s,j,1);
+           i:=j-1;
+           j:=PosIdx('  ',s,i);
+         end;
+        ups:=UpperCase(s);
+      { Fix Cdecl }
+        if (Pos('g_',s)<>0) or (Pos('TGtkType',s)<>0) or
+           ((i>2) and (s[i-2] in [':','='])) then
+         begin
+           j:=Pos('CDECL;',ups);
+           if j=0 then
+            j:=Length(s)+1
+           else
+            begin
+              k:=Pos('{$IFNDEF WIN32}CDECL;{$ENDIF}',ups);
+              if k>0 then
+               begin
+                 j:=k;
+                 k:=29;
+               end
+              else
+               begin
+                 k:=Pos('{$IFDEF WIN32}STDCALL;{$ELSE}CDECL;{$ENDIF}',ups);
+                 if k>0 then
+                  begin
+                    j:=k;
+                    k:=43;
+                  end
+                 else
+                  k:=6;
+               end;
+              Delete(s,j,k);
+            end;
+           Insert('cdecl;',s,j);
+         end;
+        ups:=UpperCase(s);
+
+        if (not gotisfunc) and (Pos('function GTK_IS_',s)>0) then
+         gotisfunc:=true;
+
+        if not gotisfunc then
+         begin
+           j:=Pos('_GET_TYPE:TGTKTYPE',ups);
+           funcname:=Copy(ups,14,j-14);
+           if (i=1) and (j>0) then
+            begin
+              writeln(f,'function  GTK_'+funcname+'_TYPE'+Copy(s,j+9,Length(s)-(j+9)+1));
+              if impl then
+               begin
+                 writeln(f,'function  GTK_IS_',funcname,'(obj:pointer):boolean;');
+                 writeln(f,'begin');
+                 writeln(f,'  GTK_IS_',funcname,':=(obj<>nil) and GTK_IS_',funcname,'_CLASS(PGtkTypeObject(obj)^.klass);');
+                 writeln(f,'end;');
+                 writeln(f,'function  GTK_IS_',funcname,'_CLASS(klass:pointer):boolean;');
+                 writeln(f,'begin');
+                 writeln(f,'  GTK_IS_',funcname,'_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_',funcname,'_TYPE);');
+                 writeln(f,'end;');
+               end
+              else
+               begin
+                 writeln(f,'function  GTK_IS_',funcname,'(obj:pointer):boolean;');
+                 writeln(f,'function  GTK_IS_',funcname,'_CLASS(klass:pointer):boolean;');
+               end;
+              writeln(f,'');
+            end;
+         end;
+      end
+     else
+     { No procedure/function }
+      begin
+        { Remove the GTK_IS_ type decls }
+        if (Copy(s,1,9)='  GTK_IS_') and (Pos('=',s)>0) and (Pos(':=',s)=0) then
+         begin
+           lasts:=s;
+           continue;
+         end;
+      end;
+
+     { Align function with procedure }
+     if Copy(s,1,8)='function' then
+      Insert(' ',s,9);
+
+     lasts:=s;
+     writeln(f,s);
+   end;
+  close(f);
+  close(t);
+  erase(t);
+  rename(f,fn);
+end;
+
+var
+ i : integer;
+ dir : tsearchrec;
+begin
+  for i:=1to paramcount do
+   begin
+     if findfirst(paramstr(i),$20,dir)=0 then
+      repeat
+        Conv(dir.name);
+      until findnext(dir)<>0;
+     findclose(dir);
+   end;
+end.

+ 923 - 0
packages/gtk/examples/Makefile

@@ -0,0 +1,923 @@
+#
+# Makefile generated by fpcmake v0.99.13 on 1999-11-24 22:54
+#
+
+defaultrule: all
+
+#####################################################################
+# Autodetect OS (Linux or Dos or Windows NT)
+# define inlinux when running under linux
+# define inWinNT when running under WinNT
+#####################################################################
+
+# We need only / in the path
+override PATH:=$(subst \,/,$(PATH))
+
+# Search for PWD and determine also if we are under linux
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
+ifeq ($(PWD),)
+nopwd:
+	@echo You need the GNU utils package to use this Makefile!
+	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
+	@exit
+else
+inlinux=1
+endif
+else
+PWD:=$(firstword $(PWD))
+endif
+
+# Detect NT - NT sets OS to Windows_NT
+ifndef inlinux
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+endif
+endif
+
+# Detect OS/2 - OS/2 has OS2_SHELL defined
+ifndef inlinux
+ifndef inWinNT
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+endif
+
+# The extension of executables
+ifdef inlinux
+EXEEXT=
+else
+EXEEXT=.exe
+endif
+
+# The path which is search separated by spaces
+ifdef inlinux
+SEARCHPATH=$(subst :, ,$(PATH))
+else
+SEARCHPATH=$(subst ;, ,$(PATH))
+endif
+
+#####################################################################
+# FPC version/target Detection
+#####################################################################
+
+# What compiler to use ?
+ifndef FPC
+ifdef inOS2
+export FPC=ppos2$(EXEEXT)
+else
+export FPC=ppc386$(EXEEXT)
+endif
+endif
+
+# Target OS
+ifndef OS_TARGET
+export OS_TARGET:=$(shell $(FPC) -iTO)
+endif
+
+# Source OS
+ifndef OS_SOURCE
+export OS_SOURCE:=$(shell $(FPC) -iSO)
+endif
+
+# Target CPU
+ifndef CPU_TARGET
+export CPU_TARGET:=$(shell $(FPC) -iTP)
+endif
+
+# Source CPU
+ifndef CPU_SOURCE
+export CPU_SOURCE:=$(shell $(FPC) -iSP)
+endif
+
+# FPC version
+ifndef FPC_VERSION
+export FPC_VERSION:=$(shell $(FPC) -iV)
+endif
+
+#####################################################################
+# Default Settings
+#####################################################################
+
+# Release ? Then force OPT and don't use extra opts via commandline
+ifdef RELEASE
+override OPT:=-Xs -OG2p3 -n
+endif
+
+# Verbose settings (warning,note,info)
+ifdef VERBOSE
+override OPT+=-vwni
+endif
+
+#####################################################################
+# User Settings
+#####################################################################
+
+
+# Targets
+
+EXEOBJECTS+=entry notebook scribble-simple clist ttt_test pixmap list progressbar
+
+# Clean
+
+EXTRACLEANUNITS+=tictactoe
+
+# Install
+
+
+# Defaults
+
+
+# Directories
+
+ifndef FPCDIR
+FPCDIR=../..
+endif
+ifndef PACKAGEDIR
+PACKAGEDIR=$(FPCDIR)/packages
+endif
+override NEEDUNITDIR=..
+ifndef TARGETDIR
+TARGETDIR=.
+endif
+
+# Packages
+
+
+# Libraries
+
+override NEEDGCCLIB=1
+override NEEDOTHERLIB=1
+
+# Info
+
+FPCINFO=fpc_infocfg fpc_infoobjects fpc_infoinstall 
+
+#####################################################################
+# Default Directories
+#####################################################################
+
+# Base dir
+ifdef PWD
+BASEDIR:=$(shell $(PWD))
+else
+BASEDIR=.
+endif
+
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
+# set the prefix directory where to install everything
+ifndef PREFIXINSTALLDIR
+ifdef inlinux
+export PREFIXINSTALLDIR=/usr
+else
+export PREFIXINSTALLDIR=/pp
+endif
+endif
+
+# On linux, try to find where libgcc.a is.
+ifdef inlinux
+ifndef GCCLIBDIR
+export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
+endif
+endif
+
+# Where to find other libraries
+ifdef inlinux
+ifndef OTHERLIBDIR
+export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+
+#####################################################################
+# Install Directories
+#####################################################################
+
+# set the base directory where to install everything
+ifndef BASEINSTALLDIR
+ifdef inlinux
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
+else
+BASEINSTALLDIR=$(PREFIXINSTALLDIR)
+endif
+endif
+
+# set the directory where to install the binaries
+ifndef BININSTALLDIR
+ifdef inlinux
+BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
+else
+BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
+endif
+endif
+
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
+endif
+
+# Where to install shared libraries
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+LIBINSTALLDIR=$(UNITINSTALLDIR)
+endif
+endif
+
+# Where the source files will be stored
+ifndef SOURCEINSTALLDIR
+ifdef inlinux
+SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
+else
+SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
+endif
+endif
+
+# Where the doc files will be stored
+ifndef DOCINSTALLDIR
+ifdef inlinux
+DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
+else
+DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
+endif
+endif
+
+# Where the some extra (data)files will be stored
+ifndef EXTRAINSTALLDIR
+EXTRAINSTALLDIR=$(BASEINSTALLDIR)
+endif
+
+
+#####################################################################
+# Compiler Command Line
+#####################################################################
+
+# Load commandline OPTDEF and add FPC_CPU define
+override FPCOPTDEF:=-d$(CPU_TARGET)
+
+# Load commandline OPT and add target and unit dir to be sure
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+
+# RTL first and then Unit dir (a unit can override RTLunit). Don't add the
+# dirs if fpcdir=. which can be used for the rtl makefiles
+ifdef FPCDIR
+ifneq ($(FPCDIR),.)
+override FPCOPT+=-Fu$(FPCDIR)/rtl/$(OS_TARGET) -Fu$(FPCDIR)/units/$(OS_TARGET)
+endif
+endif
+
+ifdef NEEDUNITDIR
+override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
+endif
+
+# Add GCC lib path if asked
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+
+# Add Other dirs path if asked
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+
+# Target dirs
+ifdef TARGETDIR
+override FPCOPT+=-FE$(TARGETDIR)
+endif
+
+# Smartlinking
+ifdef SMARTLINK
+override FPCOPT+=-CX
+endif
+
+# Debug
+ifdef DEBUG
+override FPCOPT+=-g
+endif
+
+# Add commandline options
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+endif
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+endif
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+endif
+
+# Add defines from FPCOPTDEF to FPCOPT
+ifdef FPCOPTDEF
+override FPCOPT+=$(FPCOPTDEF)
+endif
+
+# Was a config file specified ?
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+
+override COMPILER=$(FPC) $(FPCOPT)
+
+#####################################################################
+# Shell tools
+#####################################################################
+
+# To copy pograms
+ifndef COPY
+export COPY:=cp -fp
+endif
+
+# To move pograms
+ifndef MOVE
+export MOVE:=mv -f
+endif
+
+# Check delete program
+ifndef DEL
+export DEL:=rm -f
+endif
+
+# Check deltree program
+ifndef DELTREE
+export DELTREE:=rm -rf
+endif
+
+# To install files
+ifndef INSTALL
+ifdef inlinux
+export INSTALL:=install -m 644
+else
+export INSTALL:=$(COPY)
+endif
+endif
+
+# To install programs
+ifndef INSTALLEXE
+ifdef inlinux
+export INSTALLEXE:=install -m 755
+else
+export INSTALLEXE:=$(COPY)
+endif
+endif
+
+# To make a directory.
+ifndef MKDIR
+ifdef inlinux
+export MKDIR:=install -m 755 -d
+else
+export MKDIR:=ginstall -m 755 -d
+endif
+endif
+
+#####################################################################
+# Default Tools
+#####################################################################
+
+# assembler, redefine it if cross compiling
+ifndef AS
+AS=as
+endif
+
+# linker, but probably not used
+ifndef LD
+LD=ld
+endif
+
+# ppas.bat / ppas.sh
+ifdef inlinux
+PPAS=ppas.sh
+else
+ifdef inOS2
+PPAS=ppas.cmd
+else
+PPAS=ppas.bat
+endif
+endif
+
+# also call ppas if with command option -s
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+EXECPPAS=@$(PPAS)
+endif
+
+# ldconfig to rebuild .so cache
+ifdef inlinux
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+
+# echo
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+export ECHO:=echo
+else
+export ECHO:=$(firstword $(ECHO))
+endif
+endif
+
+# ppdep
+ifndef PPDEP
+PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPDEP),)
+PPDEP=
+else
+export PPDEP:=$(firstword $(PPDEP))
+endif
+endif
+
+# ppumove
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE=
+else
+export PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+
+# ppufiles
+ifndef PPUFILES
+PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUFILES),)
+PPUFILES=
+else
+export PPUFILES:=$(firstword $(PPUFILES))
+endif
+endif
+
+# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
+# upx uses that one itself (PFV)
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+export UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+
+# gdate/date
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))
+ifeq ($(DATE),)
+DATE=
+else
+export DATE:=$(firstword $(DATE))
+endif
+else
+export DATE:=$(firstword $(DATE))
+endif
+endif
+
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+
+# ZipProg, you can't use Zip as the var name (PFV)
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG=
+else
+export ZIPPROG:=$(firstword $(ZIPPROG)) -D9 -r
+endif
+endif
+
+ifndef ZIPEXT
+ZIPEXT=.zip
+endif
+
+#####################################################################
+# Default extensions
+#####################################################################
+
+# Default needed extensions (Go32v2,Linux)
+LOADEREXT=.as
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+PACKAGESUFFIX=
+
+# Go32v1
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+PACKAGESUFFIX=v1
+endif
+
+# Go32v2
+ifeq ($(OS_TARGET),go32v2)
+PACKAGESUFFIX=go32
+endif
+
+# Linux
+ifeq ($(OS_TARGET),linux)
+PACKAGESUFFIX=linux
+endif
+
+# Win32
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=win32
+endif
+
+# OS/2
+ifeq ($(OS_TARGET),os2)
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+SMARTEXT=.so
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+PACKAGESUFFIX=os2
+endif
+
+# library prefix
+LIBPREFIX=lib
+ifeq ($(OS_TARGET),go32v2)
+LIBPREFIX=
+endif
+ifeq ($(OS_TARGET),go32v1)
+LIBPREFIX=
+endif
+
+# determine which .pas extension is used
+ifndef PASEXT
+ifdef EXEOBJECTS
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
+else
+override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
+endif
+ifeq ($(TESTPAS),)
+PASEXT=.pp
+else
+PASEXT=.pas
+endif
+endif
+
+#####################################################################
+# Default rules
+#####################################################################
+
+.PHONY: defaultrule all debug examples test smart shared \
+	showinstall install zipinstall zipinstalladd \
+	clean cleanall depend info
+
+all: fpc_all
+
+debug: fpc_debug
+
+smart: fpc_smart
+
+shared: fpc_shared
+
+showinstall: fpc_showinstall
+
+install: fpc_install
+
+zipinstall: fpc_zipinstall
+
+zipinstalladd: fpc_zipinstalladd
+
+clean: fpc_clean
+
+cleanall: fpc_cleanall
+
+info: fpc_info
+
+#####################################################################
+# Exes
+#####################################################################
+
+.PHONY: fpc_exes
+
+EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
+EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
+
+override ALLTARGET+=fpc_exes
+override INSTALLEXEFILES+=$(EXEFILES)
+override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+
+fpc_exes: $(EXEFILES)
+
+#####################################################################
+# General compile rules
+#####################################################################
+
+.PHONY: fpc_all fpc_debug
+
+fpc_all: $(ALLTARGET)
+
+fpc_debug:
+	$(MAKE) all DEBUG=1
+
+# General compile rules, available for both possible PASEXT
+
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
+
+%$(PPUEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(PPUEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pp
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+%$(EXEEXT): %.pas
+	$(COMPILER) $< $(REDIR)
+	$(EXECPASS)
+
+#####################################################################
+# Library
+#####################################################################
+
+.PHONY: fpc_smart fpc_shared
+
+# Default sharedlib units are all unit objects
+ifndef SHAREDLIBUNITOBJECTS
+SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
+endif
+
+fpc_smart:
+	$(MAKE) all SMARTLINK=1
+
+fpc_shared: all
+ifdef inlinux
+ifndef LIBNAME
+	@$(ECHO) LIBNAME not set
+else
+	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
+endif
+else
+	@$(ECHO) Shared Libraries not supported
+endif
+
+#####################################################################
+# Install rules
+#####################################################################
+
+.PHONY: fpc_showinstall fpc_install
+
+ifdef EXTRAINSTALLUNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
+endif
+
+ifdef INSTALLPPUFILES
+ifdef PPUFILES
+ifdef inlinux
+INSTALLPPULINKFILES=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
+INSTALLPPULIBFILES=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
+else
+INSTALLPPULINKFILES=$(shell $(PPUFILES) $(INSTALLPPUFILES))
+endif
+endif
+endif
+
+fpc_showinstall: $(SHOWINSTALLTARGET)
+ifdef INSTALLEXEFILES
+	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
+endif
+ifdef INSTALLPPUFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
+ifneq ($(INSTALLPPULINKFILES),)
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
+endif
+ifneq ($(INSTALLPPULIBFILES),)
+	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
+endif
+endif
+ifdef EXTRAINSTALLFILES
+	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
+endif
+
+fpc_install: $(INSTALLTARGET)
+# Create UnitInstallFiles
+ifdef INSTALLEXEFILES
+	$(MKDIR) $(BININSTALLDIR)
+# Compress the exes if upx is defined
+ifdef UPXPROG
+	-$(UPXPROG) $(INSTALLEXEFILES)
+endif
+	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
+endif
+ifdef INSTALLPPUFILES
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
+endif
+ifneq ($(INSTALLPPULIBFILES),)
+	$(MKDIR) $(LIBINSTALLDIR)
+	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
+endif
+endif
+ifdef EXTRAINSTALLFILES
+	$(MKDIR) $(EXTRAINSTALLDIR)
+	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
+endif
+
+#####################################################################
+# Zip
+#####################################################################
+
+.PHONY: fpc_zipinstall fpc_zipinstalladd
+
+# Temporary path to pack a file
+ifndef PACKDIR
+ifndef inlinux
+PACKDIR=pack_tmp
+else
+PACKDIR=/tmp/fpc-pack
+endif
+endif
+
+# Test dir if none specified
+ifndef PACKAGEDIR
+PACKAGEDIR=$(BASEDIR)
+endif
+
+# Add .zip/.tar.gz extension
+ifdef ZIPNAME
+ifndef inlinux
+override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)
+endif
+endif
+
+# Default target which is call before zipping
+ifndef ZIPTARGET
+ZIPTARGET=install
+endif
+
+# Note: This will not remove the zipfile first
+fpc_zipinstalladd:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz
+	cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ; cd $(BASEDIR)
+	gzip $(PACKAGEDIR)/$(ZIPNAME).tar
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+# First remove the zip and then install
+fpc_zipinstall:
+ifndef ZIPNAME
+	@$(ECHO) Please specify ZIPNAME!
+	@exit
+else
+	$(DEL) $(PACKAGEDIR)/$(ZIPNAME)
+	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
+ifdef inlinux
+	cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz * ; cd $(BASEDIR)
+else
+	cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(BASEDIR)
+endif
+	$(DELTREE) $(PACKDIR)
+endif
+
+#####################################################################
+# Clean rules
+#####################################################################
+
+.PHONY: fpc_clean fpc_cleanall
+
+ifdef EXTRACLEANUNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
+endif
+
+ifdef CLEANPPUFILES
+ifdef PPUFILES
+CLEANPPULINKFILES=$(shell $(PPUFILES) $(CLEANPPUFILES))
+endif
+endif
+
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+	-$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+	-$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+	-$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef EXTRACLEANFILES
+	-$(DEL) $(EXTRACLEANFILES)
+endif
+	-$(DEL) $(PPAS) link.res log
+
+fpc_cleanall:
+ifdef CLEANEXEFILES
+	-$(DEL) $(CLEANEXEFILES)
+endif
+	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+	-$(DELTREE) *$(SMARTEXT)
+	-$(DEL) $(PPAS) link.res log
+
+#####################################################################
+# Info rules
+#####################################################################
+
+.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
+	fpc_dirinfo
+
+fpc_info: $(FPCINFO)
+
+fpc_infocfg:
+	@$(ECHO)
+	@$(ECHO)  == Configuration info ==
+	@$(ECHO)
+	@$(ECHO)  FPC....... $(FPC)
+	@$(ECHO)  Version... $(FPC_VERSION)
+	@$(ECHO)  CPU....... $(CPU_TARGET)
+	@$(ECHO)  Source.... $(OS_SOURCE)
+	@$(ECHO)  Target.... $(OS_TARGET)
+	@$(ECHO)
+
+fpc_infoobjects:
+	@$(ECHO)
+	@$(ECHO)  == Object info ==
+	@$(ECHO)
+	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
+	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
+	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
+	@$(ECHO)
+	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
+	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
+	@$(ECHO)
+	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
+	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
+	@$(ECHO)
+
+fpc_infoinstall:
+	@$(ECHO)
+	@$(ECHO)  == Install info ==
+	@$(ECHO)
+ifdef DATE
+	@$(ECHO)  DateStr.............. $(DATESTR)
+endif
+	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
+	@$(ECHO)
+	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
+	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
+	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
+	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
+	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
+	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
+	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
+	@$(ECHO)
+

+ 18 - 0
packages/gtk/examples/Makefile.fpc

@@ -0,0 +1,18 @@
+#
+#   Makefile.fpc for Free Pascal GTK 1.2.x Examples
+#
+
+[targets]
+programs=entry notebook scribble-simple clist ttt_test pixmap list progressbar
+
+[clean]
+units=tictactoe
+
+[dirs]
+fpcdir=../..
+unitdir=..
+targetdir=.
+
+[libs]
+libgcc=1
+libother=1

+ 172 - 0
packages/gtk/examples/clist.pp

@@ -0,0 +1,172 @@
+{
+  $Id$
+
+  This file extracted from the Gtk tutorial.
+  clist.c
+
+  Converted from C to Pascal by Frank Loemker
+  <[email protected]>
+}
+program clist;
+uses
+  glib,Gdk,Gtk;
+
+{ User clicked the 'Add List' button. }
+procedure button_add_clicked (data: PGtkCList ); cdecl;
+{ Something silly to add to the list. 4 rows of 2 columns each }
+const drink : array[0..3,0..1] of Pgchar =
+  (('Milk', '3 Oz'),
+   ('Water', '6 l'),
+   ('Carrots', '2'),
+   ('Snakes', '55'));
+var indx : integer ;
+begin
+  { Here we do the actual adding of the text. It's done once for
+    each row. }
+  for indx:=0 to 3 do
+    gtk_clist_append (data, @drink[indx]);
+end;
+
+{ User clicked the 'Clear List' button. }
+procedure button_clear_clicked (data : PGtkCList ); cdecl;
+begin
+  { Clear the list using gtk_clist_clear. This is much faster than
+    calling gtk_clist_remove once for each row. }
+  gtk_clist_clear (data);
+end;
+
+{ The user clicked the 'Hide/Show titles' button. }
+procedure button_hide_show_clicked (data : PGtkCList ); cdecl;
+const flag:integer = 0;
+begin
+  { Just a flag to remember the status. 0 = currently visible }
+
+  if flag = 0 then begin
+        { Hide the titles and set the flag to 1 }
+        gtk_clist_column_titles_hide (data);
+        inc (flag);
+  end else begin
+    { Show the titles and reset flag to 0 }
+    gtk_clist_column_titles_show (data);
+    dec (flag);
+  end;
+end;
+
+{ If we come here, then the user has selected a row in the list. }
+procedure selection_made (thelist : PGtkCLIST ; row, column: gint;
+                          event :  PGdkEventButton ; data : gpointer); cdecl;
+var text : Pgchar;
+begin
+  { Get the text that is stored in the selected row and column
+    which was clicked in. We will receive it as a pointer in the
+    argument text. }
+  gtk_clist_get_text(thelist, row, column, @text);
+
+  { Just prints some information about the selected row }
+  writeln ('You selected row ',row,
+           '. More specifically you clicked in column ',column,
+           ', and the text in this cell is ',text,#10);
+end;
+
+const
+  titles: array[0..1] of Pgchar = ('Ingredients','Amount');
+var
+  window,vbox,hbox,scroll, thelist,
+  button_add, button_clear,button_hide_show : PGtkWidget;
+begin
+  gtk_init (@argc, @argv);
+  gtk_rc_init;
+
+  window := gtk_window_new(gtk_WINDOW_TOPLEVEL);
+  gtk_widget_set_usize(PGtkWIDGET(window), 300, 150);
+
+  gtk_window_set_title(PGtkWINDOW(window), 'GtkCList Example');
+  gtk_signal_connect(PGtkOBJECT(window),'destroy',
+                     tGtksignalfunc(@gtk_main_quit),
+                     NIL);
+
+  vbox := gtk_vbox_new(false, 5);
+  gtk_container_set_border_width(PGtkCONTAINER(vbox), 5);
+  gtk_container_add(PGtkCONTAINER(window), vbox);
+
+  { Create the ScrolledWindow to pack the CList in. }
+  scroll := gtk_scrolled_window_new (NULL,NULL);
+  gtk_scrolled_window_set_policy (PGtkSCROLLEDWINDOW(scroll),
+                                  GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
+  gtk_box_pack_start(PGtkBOX(vbox), scroll, true, true, 0);
+
+  { Create the GtkCList. For this example we use 2 columns }
+  thelist := gtk_clist_new_with_titles (2,titles);
+  gtk_container_add (PGtkContainer(scroll),thelist);
+
+  { When a selection is made, we want to know about it. The callback
+    used is selection_made, and it's code can be found above }
+  gtk_signal_connect(PGtkOBJECT(thelist), 'select_row',
+                     tGtksignalfunc(@selection_made),
+                     NIL);
+
+  { It isn't necessary to shadow the border, but it looks nice :) }
+  gtk_clist_set_shadow_type(PGtkCLIST(thelist), gtk_SHADOW_OUT);
+
+  { What however is important, is that we set the column widths as
+    they will never be right otherwise. Note that the columns are
+    numbered from 0 and up (to 1 in this case). }
+  gtk_clist_set_column_width (PGtkCLIST(thelist), 0, 150);
+  gtk_clist_set_column_width (PGtkCLIST(thelist), 1, 100);
+
+  { Create the buttons and add them to the window. See the button
+    tutorial for more examples and comments on this. }
+  hbox := gtk_hbox_new(false, 0);
+  gtk_box_pack_start(PGtkBOX(vbox), hbox, false, true, 0);
+
+  button_add := gtk_button_new_with_label('Add List');
+  button_clear := gtk_button_new_with_label('Clear List');
+  button_hide_show := gtk_button_new_with_label('Hide/Show titles');
+
+  gtk_box_pack_start (PGtkBOX(hbox), button_add, true, true, 0);
+  gtk_box_pack_start (PGtkBOX(hbox), button_clear, true, true, 0);
+  gtk_box_pack_start (PGtkBOX(hbox), button_hide_show, true, true, 0);
+
+  { Connect our callbacks to the three buttons }
+  gtk_signal_connect_object(PGtkOBJECT(button_add), 'clicked',
+                            tGtksignalfunc(@button_add_clicked),
+                            gpointer(thelist));
+  gtk_signal_connect_object(PGtkOBJECT(button_clear), 'clicked',
+                            tGtksignalfunc(@button_clear_clicked),
+                            gpointer (thelist));
+  gtk_signal_connect_object(PGtkOBJECT(button_hide_show), 'clicked',
+                            tGtksignalfunc(@button_hide_show_clicked),
+                            gpointer (thelist));
+
+  { The interface is completely set up so we show all the widgets and
+    enter the gtk_main loop }
+  gtk_widget_show_all(window);
+  gtk_main();
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.7  1999/10/05 09:28:26  peter
+    * patches from Frank Loemker
+
+  Revision 1.6  1999/05/11 00:37:42  peter
+    * win32 fixes
+
+  Revision 1.5  1999/05/10 19:18:07  peter
+    * more fixes for the examples to work
+
+  Revision 1.1  1999/05/10 09:02:36  peter
+    * Gtk 1.2 port working
+
+  Revision 1.3  1999/02/02 16:13:34  michael
+  + Applied second patch from Frank Loemker
+
+  Revision 1.2  1998/10/22 11:37:27  peter
+    * fixes for win32
+
+  Revision 1.1  1998/10/21 22:27:01  peter
+    + initial version
+
+}

+ 340 - 0
packages/gtk/examples/editform.pp

@@ -0,0 +1,340 @@
+{
+  $Id$
+
+  This file was created with Glade and comes originally from
+  the examples which are delivered with Glade
+}
+
+program editform;
+uses
+  glib,gdk,gtk;
+
+function get_widget(widget:PGtkWidget;widget_name:pchar):PGtkWidget;
+var
+  found_widget : PGtkWidget;
+begin
+  if assigned(widget^.parent) then
+    widget := gtk_widget_get_toplevel (widget);
+  found_widget := gtk_object_get_data (PGtkObject(widget),widget_name);
+  {if not assigned(found_widget) then
+    g_warning ("Widget not found: %s", widget_name);}
+  get_widget := found_widget;
+end;
+
+{ This is an internally used function to set notebook tab widgets. }
+procedure set_notebook_tab(notebook:PGtkWidget;page_num:gint;widget:PGtkWidget);
+var
+  page : PGtkNotebookPage;
+  notebook_page : PGtkWidget;
+begin
+  page := g_list_nth (PGtkNoteBook(notebook)^.children, page_num)^.data;
+  notebook_page := page^.child;
+  gtk_widget_ref (notebook_page);
+  gtk_notebook_remove_page (PGtkNoteBook(notebook), page_num);
+  gtk_notebook_insert_page (PGtkNoteBook(notebook), notebook_page, widget, page_num);
+  gtk_widget_unref (notebook_page);
+end;
+
+Function create_window1:PGtkWidget;
+var
+  tooltips : PGtkTooltips;
+  window1 : PGtkWidget;
+  scrolledwindow1 : PGtkWidget;
+  table1 : PGtkWidget;
+  menubar1 : PGtkWidget;
+  checkbutton1 : PGtkWidget;
+  frame5 : PGtkWidget;
+  table4 : PGtkWidget;
+  text7 : PGtkWidget;
+  entry7 : PGtkWidget;
+  label15 : PGtkWidget;
+  frame4 : PGtkWidget;
+  text6 : PGtkWidget;
+  frame3 : PGtkWidget;
+  table3 : PGtkWidget;
+  text5 : PGtkWidget;
+  entry6 : PGtkWidget;
+  label14 : PGtkWidget;
+  frame2 : PGtkWidget;
+  table2 : PGtkWidget;
+  entry5 : PGtkWidget;
+  label13 : PGtkWidget;
+  label12 : PGtkWidget;
+  optionmenu6 : PGtkWidget;
+  optionmenu6_menu : PGtkWidget;
+  glade_menuitem : PGtkWidget;
+  optionmenu4 : PGtkWidget;
+  optionmenu4_menu : PGtkWidget;
+  frame1 : PGtkWidget;
+  text2 : PGtkWidget;
+  optionmenu2 : PGtkWidget;
+  optionmenu2_menu : PGtkWidget;
+  label1 : PGtkWidget;
+  optionmenu1 : PGtkWidget;
+  optionmenu1_menu : PGtkWidget;
+begin
+  tooltips:=gtk_tooltips_new();
+  window1 := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_object_set_data (GTK_OBJECT (window1), 'window1', window1);
+  gtk_widget_set_usize (window1, 600, 400);
+  gtk_window_set_title (GTK_WINDOW (window1), 'Auslandszahlung');
+  gtk_window_set_policy (GTK_WINDOW (window1), gint(true), gint(true), gint(false));
+  gtk_signal_connect(GTK_OBJECT(window1),'destroy',GTK_SIGNAL_FUNC(@gtk_main_quit),nil);
+
+  scrolledwindow1 := gtk_scrolled_window_new (nil, nil);
+  gtk_object_set_data (GTK_OBJECT (window1), 'scrolledwindow1', scrolledwindow1);
+  gtk_widget_show (scrolledwindow1);
+  gtk_container_add (GTK_CONTAINER (window1), scrolledwindow1);
+  gtk_viewport_set_shadow_type (GTK_VIEWPORT (GTK_SCROLLED_WINDOW (scrolledwindow1)^.viewport), GTK_SHADOW_NONE);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+  table1 := gtk_table_new (9, 3, gint(false));
+  gtk_object_set_data (GTK_OBJECT (window1), 'table1', table1);
+  gtk_widget_show (table1);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow1), table1);
+
+  menubar1 := gtk_menu_bar_new ();
+  gtk_object_set_data (GTK_OBJECT (window1), 'menubar1', menubar1);
+  gtk_widget_show (menubar1);
+  gtk_table_attach (GTK_TABLE (table1), menubar1, 0, 3, 0, 1,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+
+  checkbutton1 := gtk_check_button_new_with_label ('Wahreneinfuhr');
+  gtk_object_set_data (GTK_OBJECT (window1), 'checkbutton1', checkbutton1);
+  gtk_widget_show (checkbutton1);
+  gtk_table_attach (GTK_TABLE (table1), checkbutton1, 0, 3, 8, 9,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (checkbutton1), gint(true));
+
+  frame5 := gtk_frame_new ('Beg'#252'nstigter');
+  gtk_object_set_data (GTK_OBJECT (window1), 'frame5', frame5);
+  gtk_widget_show (frame5);
+  gtk_table_attach (GTK_TABLE (table1), frame5, 0, 3, 5, 6,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_frame_set_label_align (GTK_FRAME (frame5), 0.1, 0.5);
+
+  table4 := gtk_table_new (2, 2, gint(false));
+  gtk_object_set_data (GTK_OBJECT (window1), 'table4', table4);
+  gtk_widget_show (table4);
+  gtk_container_add (GTK_CONTAINER (frame5), table4);
+
+  text7 := gtk_text_new (nil, nil);
+  gtk_object_set_data (GTK_OBJECT (window1), 'text7', text7);
+  gtk_widget_show (text7);
+  gtk_table_attach (GTK_TABLE (table4), text7, 0, 2, 1, 2,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_text_set_editable (GTK_TEXT (text7), gint(true));
+
+  entry7 := gtk_entry_new ();
+  gtk_object_set_data (GTK_OBJECT (window1), 'entry7', entry7);
+  gtk_widget_show (entry7);
+  gtk_table_attach (GTK_TABLE (table4), entry7, 1, 2, 0, 1,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+
+  label15 := gtk_label_new ('Konto-Nr.:');
+  gtk_object_set_data (GTK_OBJECT (window1), 'label15', label15);
+  gtk_widget_show (label15);
+  gtk_table_attach (GTK_TABLE (table4), label15, 0, 1, 0, 1,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+
+  frame4 := gtk_frame_new ('Bank des Beg'#252'nstigten');
+  gtk_object_set_data (GTK_OBJECT (window1), 'frame4', frame4);
+  gtk_widget_show (frame4);
+  gtk_table_attach (GTK_TABLE (table1), frame4, 0, 3, 4, 5,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_frame_set_label_align (GTK_FRAME (frame4), 0.1, 0.5);
+
+  text6 := gtk_text_new (nil, nil);
+  gtk_object_set_data (GTK_OBJECT (window1), 'text6', text6);
+  gtk_widget_show (text6);
+  gtk_container_add (GTK_CONTAINER (frame4), text6);
+  gtk_text_set_editable (GTK_TEXT (text6), gint(true));
+
+  frame3 := gtk_frame_new ('Auftraggeber');
+  gtk_object_set_data (GTK_OBJECT (window1), 'frame3', frame3);
+  gtk_widget_show (frame3);
+  gtk_table_attach (GTK_TABLE (table1), frame3, 0, 3, 3, 4,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_frame_set_label_align (GTK_FRAME (frame3), 0.1, 0.5);
+
+  table3 := gtk_table_new (2, 2, gint(false));
+  gtk_object_set_data (GTK_OBJECT (window1), 'table3', table3);
+  gtk_widget_show (table3);
+  gtk_container_add (GTK_CONTAINER (frame3), table3);
+
+  text5 := gtk_text_new (nil, nil);
+  gtk_object_set_data (GTK_OBJECT (window1), 'text5', text5);
+  gtk_widget_show (text5);
+  gtk_table_attach (GTK_TABLE (table3), text5, 0, 2, 1, 2,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_text_set_editable (GTK_TEXT (text5), gint(true));
+  gtk_widget_realize (text5);
+  gtk_text_insert (GTK_TEXT (text5), nil, nil, nil,
+                   'Adresse', 7);
+
+  entry6 := gtk_entry_new ();
+  gtk_object_set_data (GTK_OBJECT (window1), 'entry6', entry6);
+  gtk_widget_show (entry6);
+  gtk_table_attach (GTK_TABLE (table3), entry6, 1, 2, 0, 1,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+
+  label14 := gtk_label_new ('Konto-Nr.:');
+  gtk_object_set_data (GTK_OBJECT (window1), 'label14', label14);
+  gtk_widget_show (label14);
+  gtk_table_attach (GTK_TABLE (table3), label14, 0, 1, 0, 1,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+
+  frame2 := gtk_frame_new ('Betrag');
+  gtk_object_set_data (GTK_OBJECT (window1), 'frame2', frame2);
+  gtk_widget_show (frame2);
+  gtk_table_attach (GTK_TABLE (table1), frame2, 0, 3, 2, 3,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_frame_set_label_align (GTK_FRAME (frame2), 0.1, 0.5);
+
+  table2 := gtk_table_new (2, 2, gint(false));
+  gtk_object_set_data (GTK_OBJECT (window1), 'table2', table2);
+  gtk_widget_show (table2);
+  gtk_container_add (GTK_CONTAINER (frame2), table2);
+
+  entry5 := gtk_entry_new ();
+  gtk_object_set_data (GTK_OBJECT (window1), 'entry5', entry5);
+  gtk_widget_show (entry5);
+  gtk_table_attach (GTK_TABLE (table2), entry5, 1, 2, 0, 1,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_tooltips_set_tip (tooltips, entry5, 'Betrag in der jeweiligen W'#228'hrung', nil);
+  gtk_entry_set_text (GTK_ENTRY (entry5), 'Some Text');
+
+  label13 := gtk_label_new ('Betrag in Worten');
+  gtk_object_set_data (GTK_OBJECT (window1), 'label13', label13);
+  gtk_widget_show (label13);
+  gtk_table_attach (GTK_TABLE (table2), label13, 1, 2, 1, 2,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_tooltips_set_tip (tooltips, label13, 'wird automatisch erstellt', nil);
+
+  label12 := gtk_label_new ('in Worten');
+  gtk_object_set_data (GTK_OBJECT (window1), 'label12', label12);
+  gtk_widget_show (label12);
+  gtk_table_attach (GTK_TABLE (table2), label12, 0, 1, 1, 2,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_tooltips_set_tip (tooltips, label12, 'Betrag in Worten, wird automatisch gef'#252'llt', nil);
+
+  optionmenu6 := gtk_option_menu_new ();
+  gtk_object_set_data (GTK_OBJECT (window1), 'optionmenu6', optionmenu6);
+  gtk_widget_show (optionmenu6);
+  gtk_table_attach (GTK_TABLE (table2), optionmenu6, 0, 1, 0, 1,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_tooltips_set_tip (tooltips, optionmenu6, 'W'#228'hrung', nil);
+  optionmenu6_menu := gtk_menu_new ();
+  glade_menuitem := gtk_menu_item_new_with_label ('DEM');
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (optionmenu6_menu), glade_menuitem);
+  gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu6), optionmenu6_menu);
+
+  optionmenu4 := gtk_option_menu_new ();
+  gtk_object_set_data (GTK_OBJECT (window1), 'optionmenu4', optionmenu4);
+  gtk_widget_show (optionmenu4);
+  gtk_table_attach (GTK_TABLE (table1), optionmenu4, 0, 3, 7, 8,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  optionmenu4_menu := gtk_menu_new ();
+  glade_menuitem := gtk_menu_item_new_with_label ('Ihre Kosten/Spesen zu Lasten des Auftraggebers');
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (optionmenu4_menu), glade_menuitem);
+  glade_menuitem := gtk_menu_item_new_with_label ('Ihre Kosten/Spesen zu Lasten des Beg'#252'nstigten');
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (optionmenu4_menu), glade_menuitem);
+  glade_menuitem := gtk_menu_item_new_with_label ('Fremde Kosten zu Lasten des Auftraggebers');
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (optionmenu4_menu), glade_menuitem);
+  glade_menuitem := gtk_menu_item_new_with_label ('Fremde Kosten zu Lasten des Beg'#252'nstigten');
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (optionmenu4_menu), glade_menuitem);
+  gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu4), optionmenu4_menu);
+
+  frame1 := gtk_frame_new ('Verwendungszweck');
+  gtk_object_set_data (GTK_OBJECT (window1), 'frame1', frame1);
+  gtk_widget_show (frame1);
+  gtk_table_attach (GTK_TABLE (table1), frame1, 0, 3, 6, 7,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  gtk_frame_set_label_align (GTK_FRAME (frame1), 0.1, 0.5);
+
+  text2 := gtk_text_new (nil, nil);
+  gtk_object_set_data (GTK_OBJECT (window1), 'text2', text2);
+  gtk_widget_show (text2);
+  gtk_container_add (GTK_CONTAINER (frame1), text2);
+  gtk_text_set_editable (GTK_TEXT (text2), gint(true));
+
+  optionmenu2 := gtk_option_menu_new ();
+  gtk_object_set_data (GTK_OBJECT (window1), 'optionmenu2', optionmenu2);
+  gtk_widget_show (optionmenu2);
+  gtk_table_attach (GTK_TABLE (table1), optionmenu2, 2, 3, 1, 2,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  optionmenu2_menu := gtk_menu_new ();
+  glade_menuitem := gtk_menu_item_new_with_label ('DM-Kontos');
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (optionmenu2_menu), glade_menuitem);
+  glade_menuitem := gtk_menu_item_new_with_label ('W'#228'hrungs-Kontos');
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (optionmenu2_menu), glade_menuitem);
+  glade_menuitem := gtk_menu_item_new_with_label ('W'#228'hrungs-Termin-Kontos');
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (optionmenu2_menu), glade_menuitem);
+  gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu2), optionmenu2_menu);
+
+  label1 := gtk_label_new ('zu Lasten des');
+  gtk_object_set_data (GTK_OBJECT (window1), 'label1', label1);
+  gtk_widget_show (label1);
+  gtk_table_attach (GTK_TABLE (table1), label1, 1, 2, 1, 2,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+
+  optionmenu1 := gtk_option_menu_new ();
+  gtk_object_set_data (GTK_OBJECT (window1), 'optionmenu1', optionmenu1);
+  gtk_widget_show (optionmenu1);
+  gtk_table_attach (GTK_TABLE (table1), optionmenu1, 0, 1, 1, 2,
+                    GTK_EXPAND or GTK_SHRINK or GTK_FILL, GTK_EXPAND or GTK_SHRINK or GTK_FILL, 0, 0);
+  optionmenu1_menu := gtk_menu_new ();
+  glade_menuitem := gtk_menu_item_new_with_label ('Zahlung');
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (optionmenu1_menu), glade_menuitem);
+  glade_menuitem := gtk_menu_item_new_with_label ('Akkreditiv');
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (optionmenu1_menu), glade_menuitem);
+  glade_menuitem := gtk_menu_item_new_with_label ('Inkasso-Einl'#246'sung');
+  gtk_widget_show (glade_menuitem);
+  gtk_menu_append (GTK_MENU (optionmenu1_menu), glade_menuitem);
+  gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu1), optionmenu1_menu);
+
+  exit(window1);
+end;
+
+var
+  window1 : PGtkWidget;
+begin
+  gtk_set_locale ();
+  gtk_init (@argc, @argv);
+  gtk_rc_init;
+
+  {
+    The following code was added by Glade to create one of each component
+    (except popup menus), just so that you see something after building
+    the project. Delete any components that you don't want shown initially.
+  }
+  window1 := create_window1 ();
+  gtk_widget_show (window1);
+
+  gtk_main ();
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.2  1999/05/10 19:18:08  peter
+    * more fixes for the examples to work
+
+  Revision 1.1  1999/05/10 09:02:36  peter
+    * gtk 1.2 port working
+
+  Revision 1.1  1998/11/09 10:12:27  peter
+    + initial version
+
+}

+ 119 - 0
packages/gtk/examples/entry.pp

@@ -0,0 +1,119 @@
+{
+  $Id$
+
+  This file extracted from the Gtk tutorial.
+  entry.c
+
+  Converted from C to Pascal by Frank Loemker
+  <[email protected]>
+}
+program entry;
+uses
+  glib,Gdk,Gtk;
+
+procedure enter_callback(widget,entry : PGtkWidget);cdecl;
+var
+  entry_text : Pgchar;
+begin
+  entry_text := gtk_entry_get_text(PGtkEntry(entry));
+  writeln ('Entry contents: ',entry_text);
+end;
+
+
+procedure entry_toggle_editable (checkbutton, entry: PGtkWidget);cdecl;
+begin
+  gtk_entry_set_editable(PGtkEntry(entry),
+                         gboolean(active(PGtkToggleButton(checkbutton)^)));
+end;
+
+
+procedure entry_toggle_visibility (checkbutton,entry : PGtkWidget);cdecl;
+begin
+  gtk_entry_set_visibility(PGtkENTRY(entry),
+                           gboolean(active(PGtkToggleButton(checkbutton)^)));
+end;
+
+
+var window, vbox, hbox,
+  fentry, button, check : PGtkWidget;
+begin
+  gtk_init (@argc, @argv);
+
+  { create a new window }
+  window := gtk_window_new(gtk_WINDOW_TOPLEVEL);
+  gtk_widget_set_usize( PGtkWIDGET (window), 200, 100);
+  gtk_window_set_title(PGtkWINDOW (window), 'Gtk Entry');
+  gtk_signal_connect(PGtkOBJECT (window), 'delete_event',
+                     gtk_SIGNAL_FUNC (@gtk_exit), NIL);
+
+  vbox := gtk_vbox_new (false, 0);
+  gtk_container_add (PGtkCONTAINER (window), vbox);
+  gtk_widget_show (vbox);
+
+  fentry := gtk_entry_new_with_max_length (50);
+  gtk_signal_connect(PGtkOBJECT(fentry), 'activate',
+                     gtk_SIGNAL_FUNC(@enter_callback),
+                     fentry);
+  gtk_entry_set_text (PGtkENTRY (fentry), 'hello');
+  gtk_entry_append_text (PGtkENTRY (fentry), ' world');
+  gtk_entry_select_region (PGtkENTRY (fentry),
+                           0, PGtkENTRY(fentry)^.text_length);
+  gtk_box_pack_start (PGtkBOX (vbox), fentry, true, true, 0);
+  gtk_widget_show (fentry);
+
+  hbox := gtk_hbox_new (false, 0);
+  gtk_container_add (PGtkCONTAINER (vbox), hbox);
+  gtk_widget_show (hbox);
+
+  check := gtk_check_button_new_with_label('Editable');
+  gtk_box_pack_start (PGtkBOX (hbox), check, true, true, 0);
+  gtk_signal_connect (PGtkOBJECT(check), 'toggled',
+                      gtk_SIGNAL_FUNC(@entry_toggle_editable), fentry);
+  gtk_toggle_button_set_active(PGtkTOGGLEBUTTON(check), true);
+  gtk_widget_show (check);
+
+  check := gtk_check_button_new_with_label('Visible');
+  gtk_box_pack_start (PGtkBOX (hbox), check, true, true, 0);
+  gtk_signal_connect (PGtkOBJECT(check), 'toggled',
+                      gtk_SIGNAL_FUNC(@entry_toggle_visibility), fentry);
+  gtk_toggle_button_set_active(PGtkTOGGLEBUTTON(check), true);
+  gtk_widget_show (check);
+
+  button := gtk_button_new_with_label ('Close');
+  gtk_signal_connect_object (PGtkOBJECT (button), 'clicked',
+                             gtk_SIGNAL_FUNC(@gtk_exit),
+                             PGtkOBJECT (window));
+  gtk_box_pack_start (PGtkBOX (vbox), button, true, true, 0);
+
+  GTK_WIDGET_SET_FLAGS (button, gtk_CAN_DEFAULT);
+  gtk_widget_grab_default (button);
+  gtk_widget_show (button);
+
+  gtk_widget_show(window);
+
+  gtk_main();
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.5  1999/10/05 09:28:26  peter
+    * patches from Frank Loemker
+
+  Revision 1.4  1999/05/11 00:37:43  peter
+    * win32 fixes
+
+  Revision 1.3  1999/05/10 19:18:10  peter
+    * more fixes for the examples to work
+
+  Revision 1.1  1999/05/10 09:02:36  peter
+    * Gtk 1.2 port working
+
+  Revision 1.2  1999/02/02 16:13:35  michael
+  + Applied second patch from Frank Loemker
+
+  Revision 1.1  1998/10/21 22:27:01  peter
+    + initial version
+
+}

+ 247 - 0
packages/gtk/examples/list.pp

@@ -0,0 +1,247 @@
+{
+  $Id$
+
+  This file extracted from the GTK tutorial.
+  list.c
+
+  Converted from C to Pascal by Frank Loemker
+  <[email protected]>
+}
+program list;
+uses
+  glib,gdk,gtk;
+
+{ this is our data identification string to store data in list items }
+const
+  list_item_data_key : pgchar = 'list_item_data';
+
+Function itos (I : Longint) : String;
+Var S : String[15];
+begin
+  Str (I,S);
+  itos:=S;
+end;
+
+{ this is the signal handler that got connected to button
+  press/release events of the GtkList }
+procedure sigh_button_event (gtklist: pGtkWidget;event:pGdkEventButton;frame:pGtkWidget);{$ifdef win32}stdcall;{$else}cdecl;{$endif}
+var
+  dlist, free_list : pGList;
+  new_prisoner     : pGtkWidget;
+  list_item        : pGtkWidget;
+  static_dlist     : TGList;
+begin
+  { we only do something if the third (rightmost mouse button
+    was released }
+  if (event^.thetype=GDK_BUTTON_RELEASE) and
+     (event^.button=1) then
+   begin
+      { fetch the currently selected list item which
+        will be our next prisoner ;) }
+      dlist := pGTKLIST(gtklist)^.selection;
+      if dlist<>nil then
+        new_prisoner := pGTKWIDGET(dlist^.data)
+      else
+        new_prisoner := nil;
+
+      { look for already prisoned list items, we
+        will put them back into the list
+        remember to free the doubly linked list that
+        gtk_container_children() returns }
+      dlist := gtk_container_children(pGTKCONTAINER(frame));
+      free_list := dlist;
+      while dlist<>nil do
+       begin
+         list_item := dlist^.data;
+         gtk_widget_reparent(list_item, gtklist);
+         dlist := dlist^.next;
+       end;
+      g_list_free(free_list);
+
+      { if we have a new prisoner, remove him from the
+        GtkList and put him into the frame 'Prison'
+        we need to unselect the item before }
+      if new_prisoner<>nil then
+       begin
+         static_dlist.data := new_prisoner;
+         static_dlist.next := nil;
+         static_dlist.prev := nil;
+         gtk_list_unselect_child(pGTKLIST(gtklist),new_prisoner);
+         gtk_widget_reparent(new_prisoner, frame);
+       end;
+    end;
+end;
+
+{ this is the signal handler that gets called if GtkList
+  emits the 'selection_changed' signal }
+procedure sigh_print_selection (gtklist   : pGtkWidget;func_data : gpointer);{$ifdef win32}stdcall;{$else}cdecl;{$endif}
+var dlist          : pGList;
+  list_item        : pGtkObject;
+  item_data_string : pgchar;
+begin
+  { fetch the doubly linked list of selected items
+    of the GtkList, remember to treat this as read-only! }
+  dlist := pGTKLIST(gtklist)^.selection;
+
+  { if there are no selected items there is nothing more
+    to do than just telling the user so }
+  if dlist=nil then
+   writeln ('Selection cleared')
+  else
+   begin
+     { ok, we got a selection and so we print it }
+     write ('The selection is a ');
+
+     { get the list item from the doubly linked list
+       and then query the data associated with list_item_data_key
+       we then just print it }
+     while dlist<>nil do
+      begin
+        list_item := pGTKOBJECT(dlist^.data);
+        item_data_string := gtk_object_get_data(list_item,list_item_data_key);
+        write (pchar(item_data_string),' ');
+        dlist := dlist^.next;
+      end;
+     writeln;
+   end;
+end;
+
+{ main function to set up the user interface }
+var
+  separator, window, vbox, scrolled_window,
+  frame, thelist, button, list_item : pGtkWidget;
+  dlist                             : pGList;
+  i                                 : guint;
+  buffer                            : array [0..63] of gchar;
+  thelabel                          : pGtkWidget;
+  str                               : pgchar;
+begin
+  { initialize gtk+ (and subsequently gdk) }
+  gtk_init(@argc, @argv);
+  gtk_rc_init;
+
+  { create a window to put all the widgets in
+    connect gtk_main_quit() to the 'destroy' event of
+    the window to handle window manager close-window-events }
+  window := gtk_window_new(GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_title(pGTKWINDOW(window), 'GtkList Example');
+  gtk_signal_connect(pGTKOBJECT(window),'destroy',GTK_SIGNAL_FUNC(@gtk_main_quit),nil);
+
+  { inside the window we need a box to arrange the widgets
+    vertically }
+  vbox := gtk_vbox_new(false, 5);
+  gtk_container_set_border_width(pGTKCONTAINER(vbox), 5);
+  gtk_container_add(pGTKCONTAINER(window), vbox);
+
+  { this is the scolled window to put the GtkList widget inside }
+  scrolled_window := gtk_scrolled_window_new(nil, nil);
+  gtk_widget_set_usize(scrolled_window, 250, 150);
+  gtk_box_pack_start (pGTKBOX(vbox), scrolled_window, true, true, 0);
+
+  { create the GtkList widget
+    connect the sigh_print_selection() signal handler
+    function to the 'selection_changed' signal of the GtkList
+    to print out the selected items each time the selection
+    has changed }
+  thelist := gtk_list_new();
+  gtk_list_set_selection_mode (pGtkList(thelist),GTK_SELECTION_BROWSE);
+  gtk_scrolled_window_add_with_viewport (pGtkScrolledWindow(scrolled_window), thelist);
+  gtk_signal_connect(pGTKOBJECT(thelist),'selection_changed',GTK_SIGNAL_FUNC(@sigh_print_selection),nil);
+
+  { we create a 'Prison' to put a list item in ;) }
+  frame := gtk_frame_new('Prison');
+  gtk_widget_set_usize(frame, 200, 50);
+  gtk_container_set_border_width(pGTKCONTAINER(frame), 5);
+  gtk_frame_set_shadow_type(pGTKFRAME(frame), GTK_SHADOW_OUT);
+  gtk_box_pack_start (pGTKBOX(vbox), frame, false, true, 0);
+
+  { connect the sigh_button_event() signal handler to the GtkList
+    wich will handle the 'arresting' of list items }
+  gtk_signal_connect(pGTKOBJECT(thelist),'button_release_event',GTK_SIGNAL_FUNC(@sigh_button_event),frame);
+
+  { create a separator }
+  separator := gtk_hseparator_new();
+  gtk_box_pack_start (pGTKBOX(vbox), separator, false, true, 0);
+
+  { finaly create a button and connect it's 'clicked' signal
+    to the destroyment of the window }
+  button := gtk_button_new_with_label('Close');
+  gtk_box_pack_start (pGTKBOX(vbox), button, false, true, 0);
+  gtk_signal_connect_object(pGTKOBJECT(button),'clicked',GTK_SIGNAL_FUNC(@gtk_widget_destroy),pGTKOBJECT(window));
+
+  { now we create 5 list items, each having it´s own
+    label and add them to the GtkList using gtk_container_add()
+    also we query the text string from the label and
+    associate it with the list_item_data_key for each list item }
+  for i := 0 to 4 do
+   begin
+     buffer:='ListItemContainer with Label #'+itos(i)+#0;
+     thelabel := gtk_label_new(buffer);
+     list_item := gtk_list_item_new();
+     gtk_container_add(pGTKCONTAINER(list_item), thelabel);
+     gtk_container_add(pGTKCONTAINER(thelist), list_item);
+     gtk_label_get(pGTKLABEL(thelabel), @str);
+     gtk_object_set_data(pGTKOBJECT(list_item),list_item_data_key,str);
+   end;
+
+  { here, we are creating another 5 labels, this time
+    we use gtk_list_item_new_with_label() for the creation
+    we can't query the text string from the label because
+    we don't have the labels pointer and therefore
+    we just associate the list_item_data_key of each
+    list item with the same text string
+    for adding of the list items we put them all into a doubly
+    linked list (GList), and then add them by a single call to
+    gtk_list_append_items()
+    because we use g_list_prepend() to put the items into the
+    doubly linked list, their order will be descending (instead
+    of ascending when using g_list_append()) }
+  dlist := nil;
+  for i:=5 to 9 do
+   begin
+     buffer:='List Item with Label '+itos(i)+#0;
+     list_item := gtk_list_item_new_with_label(buffer);
+     dlist := g_list_prepend(dlist, list_item);
+     gtk_object_set_data(pGTKOBJECT(list_item),list_item_data_key,pchar('ListItem with integrated Label'));
+   end;
+  gtk_list_append_items(pGTKLIST(thelist), dlist);
+
+  { finaly we want to see the window, don't we? ;) }
+  gtk_widget_show_all(window);
+
+  { fire up the main event loop of gtk }
+  gtk_main();
+
+  { we get here after gtk_main_quit() has been called which
+    happens if the main window gets destroyed }
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.8  1999/10/05 09:28:26  peter
+    * patches from Frank Loemker
+
+  Revision 1.7  1999/05/10 19:18:11  peter
+    * more fixes for the examples to work
+
+  Revision 1.6  1999/05/10 09:02:34  peter
+    * gtk 1.2 port working
+
+  Revision 1.5  1999/02/03 11:34:10  michael
+  + Patch from Frank Loemker
+
+  Revision 1.4  1999/02/01 09:52:43  michael
+  + Patch from Frank Loemker
+
+  Revision 1.3  1999/01/26 12:42:20  michael
+  *** empty log message ***
+
+  Revision 1.2  1998/10/22 11:37:28  peter
+    * fixes for win32
+
+  Revision 1.1  1998/10/21 22:27:01  peter
+    + initial version
+
+}

+ 194 - 0
packages/gtk/examples/notebook.pp

@@ -0,0 +1,194 @@
+{
+  $Id$
+
+  This file extracted from the GTK tutorial.
+  notebook.c
+
+  Converted from C to Pascal by Frank Loemker
+  <[email protected]>
+}
+program notebook;
+uses
+ glib,gdk,gtk;
+
+Function itos (I : Longint) : String;
+Var S : String[15];
+begin
+  Str (I,S);
+  itos:=S;
+end;
+
+{ This function rotates the position of the tabs }
+procedure rotate_book (notebook:pGtkNotebook ); cdecl;
+begin
+  gtk_notebook_set_tab_pos (notebook, TGtkPositionType((tab_pos(notebook^) +1) mod 4));
+end;
+
+{ Add/Remove the page tabs and the borders }
+procedure tabsborder_book (notebook:pGtkNotebook ); cdecl;
+var tval, bval : gboolean;
+begin
+  tval := false;
+  bval := false;
+  if show_tabs(notebook^) = 0 then
+    tval := true;
+  if show_border(notebook^) = 0 then
+    bval := true;
+
+  gtk_notebook_set_show_tabs (notebook, tval);
+  gtk_notebook_set_show_border (notebook, bval);
+end;
+
+{ Remove a page from the notebook }
+procedure remove_book (notebook: pGtkNotebook ); cdecl;
+var page : gint ;
+begin
+  page := gtk_notebook_get_current_page(notebook);
+  gtk_notebook_remove_page (notebook, page);
+  { Need to refresh the widget --
+   This forces the widget to redraw itself. }
+  gtk_widget_draw(pGTKWIDGET(notebook), NIL);
+end;
+
+procedure delete (widget : pGtkWidget ; event: pGdkEvent; data: pgpointer ); cdecl;
+begin
+  gtk_main_quit ();
+end;
+
+var
+  window, button, table, thenotebook, frame, thelabel, checkbutton : pGtkWidget;
+  i                                                               : integer;
+  bufferf, bufferl                                                : string[33];
+begin
+  gtk_init (@argc, @argv);
+
+  window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+  gtk_signal_connect (pGTKOBJECT (window), 'delete_event',
+                      GTK_SIGNAL_FUNC (@delete), NIL);
+
+  gtk_container_set_border_width (pGTKCONTAINER (window), 10);
+
+  table := gtk_table_new(2,6,FALSE);
+  gtk_container_add (pGTKCONTAINER (window), table);
+
+  { Create a new notebook, place the position of the tabs }
+  thenotebook := gtk_notebook_new ();
+  gtk_notebook_set_tab_pos (pGTKNOTEBOOK (thenotebook), GTK_POS_TOP);
+  gtk_table_attach_defaults(pGTKTABLE(table), thenotebook, 0,6,0,1);
+
+  { lets append a bunch of pages to the notebook }
+  for i:=0 to 4 do begin
+    bufferf := 'Append Frame '+itos(i+1)+#0;
+    bufferl := 'Page '+itos(i+1)+#0;
+
+    frame := gtk_frame_new (pchar(@bufferf[1]));
+    gtk_container_set_border_width (pGTKCONTAINER (frame), 10);
+    gtk_widget_set_usize (frame, 100, 75);
+
+    thelabel := gtk_label_new (pchar(@bufferf[1]));
+    gtk_container_add (pGTKCONTAINER (frame), thelabel);
+
+    thelabel := gtk_label_new (pchar(@bufferl[1]));
+    gtk_notebook_append_page (pGTKNOTEBOOK (thenotebook), frame, thelabel);
+  end;
+
+  { now lets add a page to a specific spot }
+  checkbutton := gtk_check_button_new_with_label ('Check me please!');
+  gtk_widget_set_usize(checkbutton, 100, 75);
+
+  thelabel := gtk_label_new ('Add page');
+  gtk_notebook_insert_page (pGTKNOTEBOOK (thenotebook), checkbutton, thelabel, 2);
+
+  { Now finally lets prepend pages to the notebook }
+  for i:=0 to 4 do begin
+    bufferf := 'Prepend Frame '+itos(i+1)+#0;
+    bufferl := 'PPage '+itos(i+1)+#0;
+
+    frame := gtk_frame_new (pchar(@bufferf[1]));
+    gtk_container_set_border_width (pGTKCONTAINER (frame), 10);
+    gtk_widget_set_usize (frame, 100, 75);
+
+    thelabel := gtk_label_new (pchar(@bufferf[1]));
+    gtk_container_add (pGTKCONTAINER (frame), thelabel);
+
+    thelabel := gtk_label_new (pchar(@bufferl[1]));
+    gtk_notebook_prepend_page (pGTKNOTEBOOK(thenotebook), frame, thelabel);
+        gtk_widget_show (frame);
+  end;
+
+  { Set what page to start at (page 4) }
+  gtk_notebook_set_page (pGTKNOTEBOOK(thenotebook), 3);
+
+  { create a bunch of buttons }
+  button := gtk_button_new_with_label ('close');
+  gtk_signal_connect_object (pGTKOBJECT (button), 'clicked',
+                             GTK_SIGNAL_FUNC (@delete), NIL);
+  gtk_table_attach(pGTKTABLE(table), button, 0,1,1,2,
+                   GTK_FILL or GTK_EXPAND,GTK_FILL,0,0);
+
+  button := gtk_button_new_with_label ('next page');
+  gtk_signal_connect_object (pGTKOBJECT (button), 'clicked',
+                             GTK_SIGNAL_FUNC (@gtk_notebook_next_page),
+                             pGTKOBJECT (thenotebook));
+  gtk_table_attach(pGTKTABLE(table), button, 1,2,1,2,
+                   GTK_FILL or GTK_EXPAND,GTK_FILL,0,0);
+
+  button := gtk_button_new_with_label ('prev page');
+  gtk_signal_connect_object (pGTKOBJECT (button), 'clicked',
+                             GTK_SIGNAL_FUNC (@gtk_notebook_prev_page),
+                             pGTKOBJECT (thenotebook));
+  gtk_table_attach(pGTKTABLE(table), button, 2,3,1,2,
+                   GTK_FILL or GTK_EXPAND,GTK_FILL,0,0);
+
+  button := gtk_button_new_with_label ('tab position');
+  gtk_signal_connect_object (pGTKOBJECT (button), 'clicked',
+                             GTK_SIGNAL_FUNC (@rotate_book), pGTKOBJECT(thenotebook));
+  gtk_table_attach(pGTKTABLE(table), button, 3,4,1,2,
+                   GTK_FILL or GTK_EXPAND,GTK_FILL,0,0);
+
+  button := gtk_button_new_with_label ('tabs/border on/off');
+  gtk_signal_connect_object (pGTKOBJECT (button), 'clicked',
+                             GTK_SIGNAL_FUNC (@tabsborder_book),
+                             pGTKOBJECT (thenotebook));
+  gtk_table_attach(pGTKTABLE(table), button, 4,5,1,2,
+                   GTK_FILL or GTK_EXPAND,GTK_FILL,0,0);
+
+  button := gtk_button_new_with_label ('remove page');
+  gtk_signal_connect_object (pGTKOBJECT (button), 'clicked',
+                             GTK_SIGNAL_FUNC (@remove_book),
+                             pGTKOBJECT(thenotebook));
+  gtk_table_attach(pGTKTABLE(table), button, 5,6,1,2,
+                   GTK_FILL ,GTK_FILL,0,0);
+
+  gtk_widget_show_all(window);
+
+  gtk_main ();
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.6  1999/10/05 09:28:26  peter
+    * patches from Frank Loemker
+
+  Revision 1.5  1999/05/14 23:48:38  peter
+    * applied patch from Sergio A. Kessler
+
+  Revision 1.4  1999/05/10 19:18:12  peter
+    * more fixes for the examples to work
+
+  Revision 1.1  1999/05/10 09:02:36  peter
+    * gtk 1.2 port working
+
+  Revision 1.3  1999/02/02 16:13:36  michael
+  + Applied second patch from Frank Loemker
+
+  Revision 1.2  1998/10/22 11:37:29  peter
+    * fixes for win32
+
+  Revision 1.1  1998/10/21 22:27:01  peter
+    + initial version
+
+}

+ 109 - 0
packages/gtk/examples/pixmap.pp

@@ -0,0 +1,109 @@
+{
+  $Id$
+
+  This file extracted from the GTK tutorial.
+  pixmap.c
+
+  Converted from C to Pascal by Frank Loemker
+  <[email protected]>
+}
+program pixmap;
+uses
+  glib,gdk,gtk;
+
+{ XPM data of Open-File icon }
+
+const
+  xpm_data:array[0..19] of pchar =
+  ('16 16 3 1',
+   '       c None',
+   '.      c #000000000000',
+   'X      c #FFFFFFFFFFFF',
+   '                ',
+   '   ......       ',
+   '   .XXX.X.      ',
+   '   .XXX.XX.     ',
+   '   .XXX.XXX.    ',
+   '   .XXX.....    ',
+   '   .XXXXXXX.    ',
+   '   .XXXXXXX.    ',
+   '   .XXXXXXX.    ',
+   '   .XXXXXXX.    ',
+   '   .XXXXXXX.    ',
+   '   .XXXXXXX.    ',
+   '   .XXXXXXX.    ',
+   '   .........    ',
+   '                ',
+   '                ');
+{ when invoked (via signal delete_event), terminates the application. }
+procedure close_application(widget : pGtkWidget ; event: pGdkEvent ; data: pgpointer); cdecl;
+begin
+  gtk_main_quit();
+end;
+
+{ is invoked when the button is clicked.  It just prints a message. }
+procedure button_clicked(widget : pGtkWidget ; data: pgpointer); cdecl;
+begin
+  writeln ('button clicked');
+end;
+
+{ GtkWidget is the storage type for widgets }
+var window, pixmapwid, button : pGtkWidget;
+  thepixmap                   : pGdkPixmap;
+  mask                        : pGdkBitmap;
+  style                       : pGtkStyle;
+begin
+  { create the main window, and attach delete_event signal to terminating
+   the application }
+  gtk_init( @argc, @argv );
+  gtk_rc_init;
+
+  window := gtk_window_new( GTK_WINDOW_TOPLEVEL );
+  gtk_signal_connect (pGTKOBJECT (window), 'delete_event',
+                      GTK_SIGNAL_FUNC (@close_application), NIL );
+  gtk_container_set_border_width( pGTKCONTAINER (window), 10 );
+  gtk_widget_show( window );
+
+  { now for the pixmap from gdk }
+  style := gtk_widget_get_style( window );
+  thepixmap := gdk_pixmap_create_from_xpm_d( window^.window,  @mask,
+                                        @style^.bg[GTK_STATE_NORMAL],
+                                        ppgchar (xpm_data ));
+
+  { a pixmap widget to contain the pixmap }
+  pixmapwid := gtk_pixmap_new( thepixmap, mask );
+  gtk_widget_show( pixmapwid );
+
+  { a button to contain the pixmap widget }
+  button := gtk_button_new();
+  gtk_container_add( pGTKCONTAINER(button), pixmapwid );
+  gtk_container_add( pGTKCONTAINER(window), button );
+  gtk_widget_show( button );
+
+  gtk_signal_connect (pGTKOBJECT(button), 'clicked',
+                      GTK_SIGNAL_FUNC(@button_clicked), NIL );
+
+  { show the window }
+  gtk_main ();
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.4  1999/05/11 00:37:44  peter
+    * win32 fixes
+
+  Revision 1.3  1999/05/10 19:18:13  peter
+    * more fixes for the examples to work
+
+  Revision 1.1  1999/05/10 09:02:36  peter
+    * gtk 1.2 port working
+
+  Revision 1.2  1998/10/22 11:37:30  peter
+    * fixes for win32
+
+  Revision 1.1  1998/10/21 22:27:01  peter
+    + initial version
+
+}

+ 224 - 0
packages/gtk/examples/progressbar.pp

@@ -0,0 +1,224 @@
+{
+
+  This is the pascal translation of the progressbar sample from the
+  GTK-1.2 library.
+
+  Converted from C to Pascal by Stefan Hille
+  <[email protected]>
+
+}
+
+
+(* example-start progressbar progressbar.c *)
+program progressbar;
+
+uses glib, gtk, strings;
+
+type
+    ProgressData = record
+        window : PGtkWidget;
+        pbar   : PGtkWidget;
+        timer  : integer;
+    end;
+    PProgressData = ^ProgressData;
+
+(* Update the value of the progress bar so that we get
+ * some movement *)
+function progress_timeout( data : gpointer ) : gint; cdecl;
+var
+    new_val : gfloat;
+    adj     : PGtkAdjustment;
+begin
+
+    (* Calculate the value of the progress bar using the
+     * value range set in the adjustment object *)
+
+    new_val := gtk_progress_get_value( GTK_PROGRESS(data) ) + 1;
+
+    adj := GTK_PROGRESS (data)^.adjustment;
+    if (new_val > adj^.upper) then
+      new_val := adj^.lower;
+
+    (* Set the new value *)
+    gtk_progress_set_value (GTK_PROGRESS (data), new_val);
+
+    (* As this is a timeout function, return TRUE so that it
+     * continues to get called *)
+    progress_timeout := 1;
+end;
+
+
+(* Callback that toggles the text display within the progress
+ * bar trough *)
+procedure toggle_show_text( widget : PGtkWidget;
+pdata : PProgressData);cdecl;
+begin
+    gtk_progress_set_show_text (GTK_PROGRESS (pdata^.pbar),
+                                active(PGtkToggleButton(widget)^));
+end;
+
+(* Callback that toggles the activity mode of the progress
+ * bar *)
+procedure toggle_activity_mode( widget : PGtkWidget;
+                       pdata : PProgressData); cdecl;
+begin
+    gtk_progress_set_activity_mode (GTK_PROGRESS (pdata^.pbar),
+                                active(PGtkToggleButton(widget)^));
+end;
+
+(* Callback that toggles the continuous mode of the progress
+ * bar *)
+procedure set_continuous_mode( widget : PGtkWidget;
+                       pdata : PProgressData); cdecl;
+begin
+    gtk_progress_bar_set_bar_style (GTK_PROGRESS_BAR (pdata^.pbar),
+                                    GTK_PROGRESS_CONTINUOUS);
+end;
+
+(* Callback that toggles the discrete mode of the progress
+ * bar *)
+procedure set_discrete_mode( widget : PGtkWidget;
+                       pdata : PProgressData); cdecl;
+begin
+    gtk_progress_bar_set_bar_style (GTK_PROGRESS_BAR (pdata^.pbar),
+                                    GTK_PROGRESS_DISCRETE);
+end;
+
+(* Clean up allocated memory and remove the timer *)
+procedure destroy_progress( widget : PGtkWidget;
+                       pdata : PProgressData); cdecl;
+begin
+    gtk_timeout_remove (pdata^.timer);
+    pdata^.timer := 0;
+    pdata^.window := NULL;
+    g_free(pdata);
+    gtk_main_quit();
+end;
+
+var
+    pdata : PProgressData;
+    align : PGtkWidget;
+    separator : PGtkWidget;
+    table : PGtkWidget;
+    adj   : PGtkAdjustment;
+    button: PGtkWidget;
+    check : PGtkWidget;
+    vbox  : PGtkWidget;
+
+begin
+    gtk_init (@argc, @argv);
+
+    (* Allocate memory for the data that is passwd to the callbacks *)
+    pdata := g_malloc( sizeof(ProgressData) );
+
+    pdata^.window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+    gtk_window_set_policy (GTK_WINDOW (pdata^.window), 0{FALSE}, 1{TRUE}, 1{TRUE});
+
+    gtk_signal_connect (GTK_OBJECT (pdata^.window), 'destroy',
+                        GTK_SIGNAL_FUNC (@destroy_progress),
+                        pdata);
+
+    gtk_window_set_title (GTK_WINDOW (pdata^.window),'GtkProgressBar' );
+    gtk_container_set_border_width (GTK_CONTAINER (pdata^.window), 0);
+
+    vbox := gtk_vbox_new (FALSE, 5);
+    gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
+    gtk_container_add (GTK_CONTAINER (pdata^.window), vbox);
+
+    (* Create a centering alignment object *)
+    align := gtk_alignment_new (0.5, 0.5, 0, 0);
+    gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 5);
+
+    (* Create a GtkAdjusment object to hold the range of the
+     * progress bar *)
+    adj := PGtkAdjustment( gtk_adjustment_new (0, 1, 150, 0, 0, 0));
+
+    (* Create the GtkProgressBar using the adjustment *)
+    pdata^.pbar := gtk_progress_bar_new_with_adjustment (adj);
+
+    (* Set the format of the string that can be displayed in the
+     * trough of the progress bar:
+     * %p - percentage
+     * %v - value
+     * %l - lower range value
+     * %u - upper range value *)
+    gtk_progress_set_format_string (GTK_PROGRESS (pdata^.pbar),
+                                     '%v from [%l-%u] (=%p%%)');
+    gtk_container_add (GTK_CONTAINER (align), pdata^.pbar);
+
+    (* Add a timer callback to update the value of the progress bar *)
+    pdata^.timer := gtk_timeout_add (100, TGtkFunction(@progress_timeout), pdata^.pbar);
+
+    separator := gtk_hseparator_new ();
+    gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
+
+    (* rows, columns, homogeneous *)
+    table := gtk_table_new (2, 3, FALSE);
+    gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, TRUE, 0);
+
+    (* Add a check button to select displaying of the trough text *)
+    check := gtk_check_button_new_with_label ('Show text');
+    gtk_table_attach (GTK_TABLE (table), check, 0, 1, 0, 1,
+                      GTK_EXPAND or GTK_FILL, GTK_EXPAND or GTK_FILL,
+                      5, 5);
+    gtk_signal_connect (GTK_OBJECT (check), 'clicked',
+                        GTK_SIGNAL_FUNC (@toggle_show_text),
+                        pdata);
+
+    (* Add a check button to toggle activity mode *)
+    check := gtk_check_button_new_with_label ( 'Activity mode');
+    gtk_table_attach (GTK_TABLE (table), check, 0, 1, 1, 2,
+                      GTK_EXPAND or GTK_FILL, GTK_EXPAND or GTK_FILL,
+                      5, 5);
+    gtk_signal_connect (GTK_OBJECT (check), 'clicked',
+                        GTK_SIGNAL_FUNC (@toggle_activity_mode),
+                        pdata);
+
+    separator := gtk_vseparator_new ();
+    gtk_table_attach (GTK_TABLE (table), separator, 1, 2, 0, 2,
+                      GTK_EXPAND or GTK_FILL, GTK_EXPAND or GTK_FILL,
+                      5, 5);
+
+    (* Add a radio button to select continuous display mode *)
+    button := gtk_radio_button_new_with_label (NULL,  'Continuous');
+    gtk_table_attach (GTK_TABLE (table), button, 2, 3, 0, 1,
+                      GTK_EXPAND or GTK_FILL, GTK_EXPAND or GTK_FILL,
+                      5, 5);
+    gtk_signal_connect (GTK_OBJECT (button), 'clicked',
+                        GTK_SIGNAL_FUNC (@set_continuous_mode),
+                        pdata);
+
+    (* Add a radio button to select discrete display mode *)
+    button := gtk_radio_button_new_with_label(
+               gtk_radio_button_group (GTK_RADIO_BUTTON (button)),
+               'Discrete');
+    gtk_table_attach (GTK_TABLE (table), button, 2, 3, 1, 2,
+                      GTK_EXPAND or GTK_FILL, GTK_EXPAND or GTK_FILL,
+                      5, 5);
+    gtk_signal_connect (GTK_OBJECT (button), 'clicked',
+                        GTK_SIGNAL_FUNC (@set_discrete_mode),
+                        pdata);
+
+    separator := gtk_hseparator_new ();
+    gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
+
+    (* Add a button to exit the program *)
+    button := gtk_button_new_with_label ('close');
+    gtk_signal_connect_object (GTK_OBJECT (button), 'clicked',
+                               Gtk_Signal_Func (@gtk_widget_destroy),
+                               GTK_OBJECT (pdata^.window));
+    gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+
+    (* This makes it so the button is the default. *)
+    GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+
+    (* This grabs this button to be the default button. Simply hitting
+     * the 'Enter' key will cause this button to activate. *)
+    gtk_widget_grab_default (button);
+
+    gtk_widget_show_all (pdata^.window);
+
+    gtk_main ();
+
+end.
+(* example-end *)

+ 175 - 0
packages/gtk/examples/scribble-simple.pp

@@ -0,0 +1,175 @@
+{
+  $Id$
+
+  Converted from C to Pascal by Frank Loemker
+  <[email protected]>
+}
+program scribblesimple;
+uses
+  glib,Gdk,Gtk;
+
+{ Backing pixmap for drawing area }
+const
+  pixmap : PGdkPixmap = NIL;
+
+{ Create a new backing pixmap of the appropriate size }
+function  configure_event (widget : PGtkWidget; event: PGdkEventConfigure):boolean; cdecl;
+begin
+  if pixmap<>NIL then
+    gdk_pixmap_unref(pixmap);
+
+  pixmap := gdk_pixmap_new(widget^.window,
+                           widget^.allocation.width,
+                           widget^.allocation.height,
+                           -1);
+  gdk_draw_rectangle (pixmap,
+                      PGtkStyle(widget^.thestyle)^.white_gc,
+                      gint(true),
+                      0, 0,
+                      widget^.allocation.width,
+                      widget^.allocation.height);
+
+  configure_event := TRUE;
+end;
+
+{ Redraw the screen from the backing pixmap }
+function  expose_event (widget : PGtkWidget ; event : PGdkEventExpose ) : boolean; cdecl;
+begin
+  gdk_draw_pixmap(widget^.window,
+                  PGtkStyle(widget^.thestyle)^.fg_gc[gtk_WIDGET_STATE (widget)],
+                  pixmap,
+                  event^.area.x, event^.area.y,
+                  event^.area.x, event^.area.y,
+                  event^.area.width, event^.area.height);
+  expose_event:= FALSE;
+end;
+
+{ Draw a rectangle on the screen }
+procedure draw_brush (widget : PGtkWidget ; x, y: gint16);
+var update_rect : TGdkRectangle;
+begin
+  update_rect.x := x - 5;
+  update_rect.y := y - 5;
+  update_rect.width := 10;
+  update_rect.height := 10;
+  gdk_draw_rectangle (pixmap,
+                      PGtkStyle(widget^.thestyle)^.black_gc,
+                      gint(true),
+                      update_rect.x, update_rect.y,
+                      update_rect.width, update_rect.height);
+  gtk_widget_draw (widget, @update_rect);
+end;
+
+function  button_press_event (widget : PGtkWidget ; event: PGdkEventButton ) : boolean; cdecl;
+begin
+  if (event^.button = 1) and (pixmap <> NIL) then begin
+    draw_brush (widget, trunc(event^.x), trunc(event^.y));
+  end;
+  button_press_event := TRUE;
+end;
+
+function  motion_notify_event (widget : PGtkWidget ; event: PGdkEventMotion ) : boolean; cdecl;
+var x, y : longint ;
+  state  : longint;
+begin
+  if (event^.is_hint<>0) then begin
+    gdk_window_get_pointer (event^.window, @x, @y, @state);
+  end else begin
+    x := trunc(event^.x);
+    y := trunc(event^.y);
+    state := event^.state;
+  end;
+
+  if ((state and gdk_BUTTON1_MASK)<>0) and (pixmap <> NIL) then
+    draw_brush (widget, x, y);
+
+  motion_notify_event := TRUE;
+end;
+
+procedure quit;
+begin
+  gtk_exit (0);
+end;
+
+var window, drawing_area, vbox, button : PGtkWidget;
+begin
+  gtk_init (@argc, @argv);
+  gtk_rc_init;
+
+  window := gtk_window_new (gtk_WINDOW_TOPLEVEL);
+  gtk_widget_set_name (window, 'Test Input');
+
+  vbox := gtk_vbox_new (false, 0);
+  gtk_container_add (PGtkCONTAINER (window), vbox);
+  gtk_widget_show (vbox);
+
+  gtk_signal_connect (PGtkOBJECT (window), 'destroy',
+                      gtk_SIGNAL_FUNC (@quit), NIL);
+
+  { Create the drawing area }
+
+  drawing_area := gtk_drawing_area_new ();
+  gtk_drawing_area_size (PGtkDRAWINGAREA (drawing_area), 200, 200);
+  gtk_box_pack_start (PGtkBOX (vbox), drawing_area, true, true, 0);
+
+  gtk_widget_show (drawing_area);
+
+  { Signals used to handle backing pixmap }
+
+  gtk_signal_connect (PGtkOBJECT (drawing_area), 'expose_event',
+                      gtk_SIGNAL_FUNC (@expose_event), NIL);
+  gtk_signal_connect (PGtkOBJECT(drawing_area),'configure_event',
+                      gtk_SIGNAL_FUNC (@configure_event), NIL);
+
+  { Event signals }
+
+  gtk_signal_connect (PGtkOBJECT (drawing_area), 'motion_notify_event',
+                      gtk_SIGNAL_FUNC (@motion_notify_event), NIL);
+  gtk_signal_connect (PGtkOBJECT (drawing_area), 'button_press_event',
+                      gtk_SIGNAL_FUNC (@button_press_event), NIL);
+
+  gtk_widget_set_events (drawing_area, gdk_EXPOSURE_MASK
+                         or gdk_LEAVE_NOTIFY_MASK
+                         or gdk_BUTTON_PRESS_MASK
+                         or gdk_POINTER_MOTION_MASK
+                         or gdk_POINTER_MOTION_HINT_MASK);
+
+  { .. And a quit button }
+  button := gtk_button_new_with_label ('Quit');
+  gtk_box_pack_start (PGtkBOX (vbox), button, false, false, 0);
+
+  gtk_signal_connect_object (PGtkOBJECT (button), 'clicked',
+                             gtk_SIGNAL_FUNC (@gtk_widget_destroy),
+                             PGtkOBJECT (window));
+  gtk_widget_show (button);
+  gtk_widget_show (window);
+
+  gtk_main ();
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.6  1999/10/05 09:28:26  peter
+    * patches from Frank Loemker
+
+  Revision 1.5  1999/05/11 00:37:45  peter
+    * win32 fixes
+
+  Revision 1.4  1999/05/10 19:18:14  peter
+    * more fixes for the examples to work
+
+  Revision 1.1  1999/05/10 09:02:36  peter
+    * Gtk 1.2 port working
+
+  Revision 1.3  1999/02/02 16:13:37  michael
+  + Applied second patch from Frank Loemker
+
+  Revision 1.2  1998/10/22 11:37:31  peter
+    * fixes for win32
+
+  Revision 1.1  1998/10/21 22:27:01  peter
+    + initial version
+
+}

+ 196 - 0
packages/gtk/examples/tictactoe.pp

@@ -0,0 +1,196 @@
+{
+  $Id$
+
+  Converted from C to Pascal by Frank Loemker
+  <[email protected]>
+}
+unit tictactoe;
+interface
+
+uses
+  glib,gdk,gtk;
+
+type
+  PTictactoe      = ^TTictactoe;
+  TTictactoe      = record
+                      vbox    : TGtkVBox ;
+                      buttons : array [0..2 , 0..2] of pGtkWidget;
+                    end;
+  PTictactoeClass = ^TTictactoeClass;
+  TTictactoeClass = record
+                      parent_class: TGtkVBoxClass ;
+                      tictactoe: Procedure (ttt : pTictactoe); cdecl;
+                    end;
+
+Function tictactoe_get_type : guint;
+Function tictactoe_new : pGtkWidget;
+procedure tictactoe_clear (ttt : pTictactoe);
+
+implementation
+
+const
+  ANZ_SIGNAL = 1;
+type
+  TTT_Signals = (TICTACTOE_SIGNAL);
+const
+  tictactoe_signals: array[TTT_Signals] of guint = (0);
+
+Procedure tictactoe_toggle (widget : pGtkWidget ; ttt: pTictactoe); cdecl;
+const rwins: array[0..7,0..2] of integer =
+  ( ( 0, 0, 0 ), ( 1, 1, 1 ), ( 2, 2, 2 ),
+   ( 0, 1, 2 ), ( 0, 1, 2 ), ( 0, 1, 2 ),
+   ( 0, 1, 2 ), ( 0, 1, 2 ) );
+  cwins:array [0..7,0..2] of integer =
+  ( ( 0, 1, 2 ), ( 0, 1, 2 ), ( 0, 1, 2 ),
+   ( 0, 0, 0 ), ( 1, 1, 1 ), ( 2, 2, 2 ),
+   ( 0, 1, 2 ), ( 2, 1, 0 ) );
+var i, k         : integer;
+  success, found : boolean;
+begin
+  for k:=0 to 7 do
+  begin
+    success := TRUE;
+    found := FALSE;
+
+    for i:=0 to 2 do
+    begin
+      success := success and
+      boolean(active(pGTKTOGGLEBUTTON(ttt^.buttons[rwins[k,i],cwins[k,i]])^));
+      found := found or
+      (ttt^.buttons[rwins[k,i],cwins[k,i]] = widget);
+    end;
+
+    if (success and found) then
+    begin
+      gtk_signal_emit (pGTKOBJECT (ttt),
+                        tictactoe_signals[TICTACTOE_SIGNAL]);
+      break;
+    end;
+  end;
+end;
+
+Procedure gtk_signal_default_marshallerT(theobject : pGtkObject;
+                                         func      : GTK_SIGNAL_FUNC;
+                                         func_data : gpointer;
+                                         args      : pGtkArg); cdecl;
+begin
+{$ifndef win32}
+  gtk_marshal_NONE__NONE (theobject,func,func_data,args);
+{$endif}
+end;
+
+Procedure tictactoe_class_init (theclass : pTictactoeClass );
+var object_class : pGtkObjectClass ;
+begin
+  object_class := pGtkObjectClass (theclass);
+
+  tictactoe_signals[TICTACTOE_SIGNAL] :=gtk_signal_new ('tictactoe',
+                      GTK_RUN_FIRST,
+                      object_class^.thetype,
+                      @theclass^.tictactoe - pointer(theclass),
+                      @gtk_signal_default_marshallerT, GTK_TYPE_NONE, 0);
+
+  gtk_object_class_add_signals (object_class, pguint(@tictactoe_signals), ANZ_SIGNAL);
+
+  theclass^.tictactoe := NIL;
+end;
+
+Procedure tictactoe_init (ttt : pTictactoe );
+var table : pGtkWidget ;
+  i,j     : gint;
+begin
+  table := gtk_table_new (3, 3, true);
+  gtk_container_add (pGTKCONTAINER(ttt), table);
+  gtk_widget_show (table);
+
+  for i:=0 to 2 do
+    for j:=0 to 2 do
+    begin
+      ttt^.buttons[i][j] := gtk_toggle_button_new ();
+      gtk_table_attach_defaults (pGTKTABLE(table), ttt^.buttons[i][j],
+                                 i, i+1, j, j+1);
+      gtk_signal_connect (pGTKOBJECT (ttt^.buttons[i][j]), 'toggled',
+                          GTK_SIGNAL_FUNC (@tictactoe_toggle), ttt);
+      gtk_widget_set_usize (ttt^.buttons[i][j], 20, 20);
+      gtk_widget_show (ttt^.buttons[i][j]);
+    end;
+end;
+
+Procedure tictactoe_class_init2 (theclass : gpointer ); cdecl;
+begin
+  tictactoe_class_init (theclass);
+end;
+
+Procedure tictactoe_init2 (ttt : gpointer; klass:gpointer); cdecl;
+begin
+  tictactoe_init (ttt);
+end;
+
+Function tictactoe_get_type:guint;
+const ttt_type : guint  = 0;
+  ttt_info: TGtkTypeInfo = (
+                                                        type_name : 'Tictactoe';
+                                                        object_size : sizeof (TTictactoe);
+                                                        class_size : sizeof (TTictactoeClass);
+                                                        class_init_func : @tictactoe_class_init2;
+                                                        object_init_func : @tictactoe_init2;
+                                                        );
+begin
+  if (ttt_type = 0) then
+    ttt_type := gtk_type_unique (gtk_vbox_get_type (), @ttt_info);
+
+  tictactoe_get_type:= ttt_type;
+end;
+
+Function tictactoe_new:pGtkWidget;
+begin
+  tictactoe_new:= pGTKWIDGET ( gtk_type_new (tictactoe_get_type ()));
+end;
+
+Procedure tictactoe_clear (ttt :  pTictactoe );
+var i,j : integer;
+begin
+  for i:=0 to 2 do
+    for j:=0 to 2 do
+    begin
+      gtk_signal_handler_block_by_data (pGTKOBJECT(ttt^.buttons[i][j]), ttt);
+      gtk_toggle_button_set_active (pGTKTOGGLEBUTTON (ttt^.buttons[i][j]),
+                                   false);
+      gtk_signal_handler_unblock_by_data (pGTKOBJECT(ttt^.buttons[i][j]), ttt);
+    end;
+end;
+
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.8  1999/10/05 09:28:26  peter
+    * patches from Frank Loemker
+
+  Revision 1.7  1999/06/10 20:00:16  peter
+    * fixed tictactoe
+
+  Revision 1.6  1999/05/10 19:18:15  peter
+    * more fixes for the examples to work
+
+  Revision 1.1  1999/05/10 09:02:36  peter
+    * gtk 1.2 port working
+
+  Revision 1.5  1999/05/07 15:09:38  peter
+    * more fixes
+
+  Revision 1.4  1999/02/02 16:13:38  michael
+  + Applied second patch from Frank Loemker
+
+  Revision 1.3  1999/01/26 12:42:21  michael
+  *** empty log message ***
+
+  Revision 1.2  1998/10/22 11:37:32  peter
+    * fixes for win32
+
+  Revision 1.1  1998/10/21 22:27:01  peter
+    + initial version
+
+}

+ 69 - 0
packages/gtk/examples/ttt_test.pp

@@ -0,0 +1,69 @@
+{
+  $Id$
+
+  Converted from C to Pascal by Frank Loemker
+  <[email protected]>
+}
+program ttt_test;
+uses
+  glib,gdk,gtk,
+  tictactoe;
+
+{$ifndef win32}
+  {$linklib Xext}
+{$endif}
+
+procedure win (widget : pGtkWidget ; data: gpointer); cdecl;
+begin
+  writeln ('Yay!');
+  tictactoe_clear (pTICTACTOE (widget));
+end;
+
+
+var
+  window,ttt : pGtkWidget;
+begin
+  gtk_init (@argc, @argv);
+
+  window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+  gtk_window_set_title (pGTKWINDOW (window), 'Aspect Frame');
+
+  gtk_signal_connect (pGTKOBJECT (window), 'destroy',
+                      GTK_SIGNAL_FUNC (@gtk_exit), NIL);
+
+  gtk_container_set_border_width (pGTKCONTAINER (window), 10);
+
+  ttt := tictactoe_new ();
+
+  gtk_container_add (pGTKCONTAINER (window), ttt);
+  gtk_widget_show (ttt);
+
+  gtk_signal_connect (pGTKOBJECT (ttt), 'tictactoe',
+                      GTK_SIGNAL_FUNC (@win), NIL);
+
+  gtk_widget_show (window);
+
+  gtk_main ();
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.4  1999/10/05 09:28:26  peter
+    * patches from Frank Loemker
+
+  Revision 1.3  1999/06/10 20:00:18  peter
+    * fixed tictactoe
+
+  Revision 1.2  1999/05/10 19:18:16  peter
+    * more fixes for the examples to work
+
+  Revision 1.1  1999/05/10 09:02:36  peter
+    * gtk 1.2 port working
+
+  Revision 1.1  1998/10/21 22:27:01  peter
+    + initial version
+
+}

+ 127 - 0
packages/gtk/gdk/gdk.pp

@@ -0,0 +1,127 @@
+{
+   $Id$
+
+   GDK - The GIMP Drawing Kit
+   Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this library; if not, write to the
+   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.
+
+ **********************************************************************}
+unit gdk;
+interface
+
+{$mode objfpc} { needed for array of const }
+
+uses
+  glib;
+
+{$ifdef win32}
+  const
+    gdkdll='gdk-1.3';
+  {$define gtkwin}
+{$else}
+  const
+    gdkdll='gdk';
+  {$linklib c}
+  {$linklib X11}
+{$endif}
+
+{$packrecords C}
+
+Type
+  PLongint  = ^Longint;
+  PByte     = ^Byte;
+  PWord     = ^Word;
+  PINteger  = ^Integer;
+  PCardinal = ^Cardinal;
+  PReal     = ^Real;
+  PDouble   = ^Double;
+
+{$define gdk_include_files}
+
+{$define read_interface}
+{$undef read_implementation}
+
+{$i gdktypes.pp}
+{$i gdkkeysyms.pp}
+{$i gdkprivate.pp}
+{$i gdkrgb.pp}
+{$i gdkx.pp}
+{$i gdkmain.pp}
+
+
+implementation
+
+{$undef read_interface}
+{$define read_implementation}
+
+{$i gdktypes.pp}
+{$i gdkkeysyms.pp}
+{$i gdkprivate.pp}
+{$i gdkrgb.pp}
+{$i gdkx.pp}
+{$i gdkmain.pp}
+
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 14:35:23  peter
+    * removed glibdll constant
+
+  Revision 1.9  1999/10/21 08:42:00  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.8  1999/10/06 17:42:47  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.7  1999/07/23 16:11:43  peter
+    * use packrecords C
+
+  Revision 1.6  1999/05/11 00:37:46  peter
+    * win32 fixes
+
+  Revision 1.5  1999/05/07 10:40:17  peter
+    * first things for 1.2
+
+  Revision 1.4  1998/11/12 11:35:46  peter
+    + array of const
+
+  Revision 1.3  1998/10/22 11:37:34  peter
+    * fixes for win32
+
+  Revision 1.2  1998/10/21 20:22:00  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 1344 - 0
packages/gtk/gdk/gdkkeysyms.pp

@@ -0,0 +1,1344 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+const
+   GDK_VoidSymbol = $FFFFFF;
+   GDK_BackSpace = $FF08;
+   GDK_Tab = $FF09;
+   GDK_Linefeed = $FF0A;
+   GDK_Clear_Key = $FF0B;
+   GDK_Return = $FF0D;
+   GDK_Pause = $FF13;
+   GDK_Scroll_Lock = $FF14;
+   GDK_Sys_Req = $FF15;
+   GDK_Escape = $FF1B;
+   GDK_Delete_Key = $FFFF;
+   GDK_Multi_key = $FF20;
+   GDK_SingleCandidate = $FF3C;
+   GDK_MultipleCandidate = $FF3D;
+   GDK_PreviousCandidate = $FF3E;
+   GDK_Kanji = $FF21;
+   GDK_Muhenkan = $FF22;
+   GDK_Henkan_Mode = $FF23;
+   GDK_Henkan = $FF23;
+   GDK_Romaji = $FF24;
+   GDK_Hiragana = $FF25;
+   GDK_Katakana = $FF26;
+   GDK_Hiragana_Katakana = $FF27;
+   GDK_Zenkaku = $FF28;
+   GDK_Hankaku = $FF29;
+   GDK_Zenkaku_Hankaku = $FF2A;
+   GDK_Touroku = $FF2B;
+   GDK_Massyo = $FF2C;
+   GDK_Kana_Lock = $FF2D;
+   GDK_Kana_Shift = $FF2E;
+   GDK_Eisu_Shift = $FF2F;
+   GDK_Eisu_toggle = $FF30;
+   GDK_Zen_Koho = $FF3D;
+   GDK_Mae_Koho = $FF3E;
+   GDK_Home = $FF50;
+   GDK_Left = $FF51;
+   GDK_Up = $FF52;
+   GDK_Right = $FF53;
+   GDK_Down = $FF54;
+   GDK_Prior = $FF55;
+   GDK_Page_Up = $FF55;
+   GDK_Next = $FF56;
+   GDK_Page_Down = $FF56;
+   GDK_End = $FF57;
+   GDK_Begin = $FF58;
+   GDK_Select = $FF60;
+   GDK_Print = $FF61;
+   GDK_Execute = $FF62;
+   GDK_Insert = $FF63;
+   GDK_Undo = $FF65;
+   GDK_Redo = $FF66;
+   GDK_Menu = $FF67;
+   GDK_Find = $FF68;
+   GDK_Cancel = $FF69;
+   GDK_Help = $FF6A;
+   GDK_Break = $FF6B;
+   GDK_Mode_switch = $FF7E;
+   GDK_script_switch = $FF7E;
+   GDK_Num_Lock = $FF7F;
+   GDK_KP_Space = $FF80;
+   GDK_KP_Tab = $FF89;
+   GDK_KP_Enter = $FF8D;
+   GDK_KP_F1 = $FF91;
+   GDK_KP_F2 = $FF92;
+   GDK_KP_F3 = $FF93;
+   GDK_KP_F4 = $FF94;
+   GDK_KP_Home = $FF95;
+   GDK_KP_Left = $FF96;
+   GDK_KP_Up = $FF97;
+   GDK_KP_Right = $FF98;
+   GDK_KP_Down = $FF99;
+   GDK_KP_Prior = $FF9A;
+   GDK_KP_Page_Up = $FF9A;
+   GDK_KP_Next = $FF9B;
+   GDK_KP_Page_Down = $FF9B;
+   GDK_KP_End = $FF9C;
+   GDK_KP_Begin = $FF9D;
+   GDK_KP_Insert = $FF9E;
+   GDK_KP_Delete = $FF9F;
+   GDK_KP_Equal = $FFBD;
+   GDK_KP_Multiply = $FFAA;
+   GDK_KP_Add = $FFAB;
+   GDK_KP_Separator = $FFAC;
+   GDK_KP_Subtract = $FFAD;
+   GDK_KP_Decimal = $FFAE;
+   GDK_KP_Divide = $FFAF;
+   GDK_KP_0 = $FFB0;
+   GDK_KP_1 = $FFB1;
+   GDK_KP_2 = $FFB2;
+   GDK_KP_3 = $FFB3;
+   GDK_KP_4 = $FFB4;
+   GDK_KP_5 = $FFB5;
+   GDK_KP_6 = $FFB6;
+   GDK_KP_7 = $FFB7;
+   GDK_KP_8 = $FFB8;
+   GDK_KP_9 = $FFB9;
+   GDK_F1 = $FFBE;
+   GDK_F2 = $FFBF;
+   GDK_F3 = $FFC0;
+   GDK_F4 = $FFC1;
+   GDK_F5 = $FFC2;
+   GDK_F6 = $FFC3;
+   GDK_F7 = $FFC4;
+   GDK_F8 = $FFC5;
+   GDK_F9 = $FFC6;
+   GDK_F10 = $FFC7;
+   GDK_F11 = $FFC8;
+   GDK_L1 = $FFC8;
+   GDK_F12 = $FFC9;
+   GDK_L2 = $FFC9;
+   GDK_F13 = $FFCA;
+   GDK_L3 = $FFCA;
+   GDK_F14 = $FFCB;
+   GDK_L4 = $FFCB;
+   GDK_F15 = $FFCC;
+   GDK_L5 = $FFCC;
+   GDK_F16 = $FFCD;
+   GDK_L6 = $FFCD;
+   GDK_F17 = $FFCE;
+   GDK_L7 = $FFCE;
+   GDK_F18 = $FFCF;
+   GDK_L8 = $FFCF;
+   GDK_F19 = $FFD0;
+   GDK_L9 = $FFD0;
+   GDK_F20 = $FFD1;
+   GDK_L10 = $FFD1;
+   GDK_F21 = $FFD2;
+   GDK_R1 = $FFD2;
+   GDK_F22 = $FFD3;
+   GDK_R2 = $FFD3;
+   GDK_F23 = $FFD4;
+   GDK_R3 = $FFD4;
+   GDK_F24 = $FFD5;
+   GDK_R4 = $FFD5;
+   GDK_F25 = $FFD6;
+   GDK_R5 = $FFD6;
+   GDK_F26 = $FFD7;
+   GDK_R6 = $FFD7;
+   GDK_F27 = $FFD8;
+   GDK_R7 = $FFD8;
+   GDK_F28 = $FFD9;
+   GDK_R8 = $FFD9;
+   GDK_F29 = $FFDA;
+   GDK_R9 = $FFDA;
+   GDK_F30 = $FFDB;
+   GDK_R10 = $FFDB;
+   GDK_F31 = $FFDC;
+   GDK_R11 = $FFDC;
+   GDK_F32 = $FFDD;
+   GDK_R12 = $FFDD;
+   GDK_F33 = $FFDE;
+   GDK_R13 = $FFDE;
+   GDK_F34 = $FFDF;
+   GDK_R14 = $FFDF;
+   GDK_F35 = $FFE0;
+   GDK_R15 = $FFE0;
+   GDK_Shift_L = $FFE1;
+   GDK_Shift_R = $FFE2;
+   GDK_Control_L = $FFE3;
+   GDK_Control_R = $FFE4;
+   GDK_Caps_Lock = $FFE5;
+   GDK_Shift_Lock = $FFE6;
+   GDK_Meta_L = $FFE7;
+   GDK_Meta_R = $FFE8;
+   GDK_Alt_L = $FFE9;
+   GDK_Alt_R = $FFEA;
+   GDK_Super_L = $FFEB;
+   GDK_Super_R = $FFEC;
+   GDK_Hyper_L = $FFED;
+   GDK_Hyper_R = $FFEE;
+   GDK_ISO_Lock = $FE01;
+   GDK_ISO_Level2_Latch = $FE02;
+   GDK_ISO_Level3_Shift = $FE03;
+   GDK_ISO_Level3_Latch = $FE04;
+   GDK_ISO_Level3_Lock = $FE05;
+   GDK_ISO_Group_Shift = $FF7E;
+   GDK_ISO_Group_Latch = $FE06;
+   GDK_ISO_Group_Lock = $FE07;
+   GDK_ISO_Next_Group = $FE08;
+   GDK_ISO_Next_Group_Lock = $FE09;
+   GDK_ISO_Prev_Group = $FE0A;
+   GDK_ISO_Prev_Group_Lock = $FE0B;
+   GDK_ISO_First_Group = $FE0C;
+   GDK_ISO_First_Group_Lock = $FE0D;
+   GDK_ISO_Last_Group = $FE0E;
+   GDK_ISO_Last_Group_Lock = $FE0F;
+   GDK_ISO_Left_Tab = $FE20;
+   GDK_ISO_Move_Line_Up = $FE21;
+   GDK_ISO_Move_Line_Down = $FE22;
+   GDK_ISO_Partial_Line_Up = $FE23;
+   GDK_ISO_Partial_Line_Down = $FE24;
+   GDK_ISO_Partial_Space_Left = $FE25;
+   GDK_ISO_Partial_Space_Right = $FE26;
+   GDK_ISO_Set_Margin_Left = $FE27;
+   GDK_ISO_Set_Margin_Right = $FE28;
+   GDK_ISO_Release_Margin_Left = $FE29;
+   GDK_ISO_Release_Margin_Right = $FE2A;
+   GDK_ISO_Release_Both_Margins = $FE2B;
+   GDK_ISO_Fast_Cursor_Left = $FE2C;
+   GDK_ISO_Fast_Cursor_Right = $FE2D;
+   GDK_ISO_Fast_Cursor_Up = $FE2E;
+   GDK_ISO_Fast_Cursor_Down = $FE2F;
+   GDK_ISO_Continuous_Underline = $FE30;
+   GDK_ISO_Discontinuous_Underline = $FE31;
+   GDK_ISO_Emphasize = $FE32;
+   GDK_ISO_Center_Object = $FE33;
+   GDK_ISO_Enter = $FE34;
+   GDK_dead_grave = $FE50;
+   GDK_dead_acute = $FE51;
+   GDK_dead_circumflex = $FE52;
+   GDK_dead_tilde = $FE53;
+   GDK_dead_macron = $FE54;
+   GDK_dead_breve = $FE55;
+   GDK_dead_abovedot = $FE56;
+   GDK_dead_diaeresis = $FE57;
+   GDK_dead_abovering = $FE58;
+   GDK_dead_doubleacute = $FE59;
+   GDK_dead_caron = $FE5A;
+   GDK_dead_cedilla = $FE5B;
+   GDK_dead_ogonek = $FE5C;
+   GDK_dead_iota = $FE5D;
+   GDK_dead_voiced_sound = $FE5E;
+   GDK_dead_semivoiced_sound = $FE5F;
+   GDK_dead_belowdot = $FE60;
+   GDK_First_Virtual_Screen = $FED0;
+   GDK_Prev_Virtual_Screen = $FED1;
+   GDK_Next_Virtual_Screen = $FED2;
+   GDK_Last_Virtual_Screen = $FED4;
+   GDK_Terminate_Server = $FED5;
+   GDK_AccessX_Enable = $FE70;
+   GDK_AccessX_Feedback_Enable = $FE71;
+   GDK_RepeatKeys_Enable = $FE72;
+   GDK_SlowKeys_Enable = $FE73;
+   GDK_BounceKeys_Enable = $FE74;
+   GDK_StickyKeys_Enable = $FE75;
+   GDK_MouseKeys_Enable = $FE76;
+   GDK_MouseKeys_Accel_Enable = $FE77;
+   GDK_Overlay1_Enable = $FE78;
+   GDK_Overlay2_Enable = $FE79;
+   GDK_AudibleBell_Enable = $FE7A;
+   GDK_Pointer_Left = $FEE0;
+   GDK_Pointer_Right = $FEE1;
+   GDK_Pointer_Up = $FEE2;
+   GDK_Pointer_Down = $FEE3;
+   GDK_Pointer_UpLeft = $FEE4;
+   GDK_Pointer_UpRight = $FEE5;
+   GDK_Pointer_DownLeft = $FEE6;
+   GDK_Pointer_DownRight = $FEE7;
+   GDK_Pointer_Button_Dflt = $FEE8;
+   GDK_Pointer_Button1 = $FEE9;
+   GDK_Pointer_Button2 = $FEEA;
+   GDK_Pointer_Button3 = $FEEB;
+   GDK_Pointer_Button4 = $FEEC;
+   GDK_Pointer_Button5 = $FEED;
+   GDK_Pointer_DblClick_Dflt = $FEEE;
+   GDK_Pointer_DblClick1 = $FEEF;
+   GDK_Pointer_DblClick2 = $FEF0;
+   GDK_Pointer_DblClick3 = $FEF1;
+   GDK_Pointer_DblClick4 = $FEF2;
+   GDK_Pointer_DblClick5 = $FEF3;
+   GDK_Pointer_Drag_Dflt = $FEF4;
+   GDK_Pointer_Drag1 = $FEF5;
+   GDK_Pointer_Drag2 = $FEF6;
+   GDK_Pointer_Drag3 = $FEF7;
+   GDK_Pointer_Drag4 = $FEF8;
+   GDK_Pointer_Drag5 = $FEFD;
+   GDK_Pointer_EnableKeys = $FEF9;
+   GDK_Pointer_Accelerate = $FEFA;
+   GDK_Pointer_DfltBtnNext = $FEFB;
+   GDK_Pointer_DfltBtnPrev = $FEFC;
+   GDK_3270_Duplicate = $FD01;
+   GDK_3270_FieldMark = $FD02;
+   GDK_3270_Right2 = $FD03;
+   GDK_3270_Left2 = $FD04;
+   GDK_3270_BackTab = $FD05;
+   GDK_3270_EraseEOF = $FD06;
+   GDK_3270_EraseInput = $FD07;
+   GDK_3270_Reset = $FD08;
+   GDK_3270_Quit = $FD09;
+   GDK_3270_PA1 = $FD0A;
+   GDK_3270_PA2 = $FD0B;
+   GDK_3270_PA3 = $FD0C;
+   GDK_3270_Test = $FD0D;
+   GDK_3270_Attn = $FD0E;
+   GDK_3270_CursorBlink = $FD0F;
+   GDK_3270_AltCursor = $FD10;
+   GDK_3270_KeyClick = $FD11;
+   GDK_3270_Jump = $FD12;
+   GDK_3270_Ident = $FD13;
+   GDK_3270_Rule = $FD14;
+   GDK_3270_Copy = $FD15;
+   GDK_3270_Play = $FD16;
+   GDK_3270_Setup = $FD17;
+   GDK_3270_Record = $FD18;
+   GDK_3270_ChangeScreen = $FD19;
+   GDK_3270_DeleteWord = $FD1A;
+   GDK_3270_ExSelect = $FD1B;
+   GDK_3270_CursorSelect = $FD1C;
+   GDK_3270_PrintScreen = $FD1D;
+   GDK_3270_Enter = $FD1E;
+   GDK_space = $020;
+   GDK_exclam = $021;
+   GDK_quotedbl = $022;
+   GDK_numbersign = $023;
+   GDK_dollar = $024;
+   GDK_percent = $025;
+   GDK_ampersand = $026;
+   GDK_apostrophe = $027;
+   GDK_quoteright = $027;
+   GDK_parenleft = $028;
+   GDK_parenright = $029;
+   GDK_asterisk = $02a;
+   GDK_plus_key = $02b;
+   GDK_comma = $02c;
+   GDK_minus = $02d;
+   GDK_period = $02e;
+   GDK_slash = $02f;
+   GDK_0 = $030;
+   GDK_1 = $031;
+   GDK_2 = $032;
+   GDK_3 = $033;
+   GDK_4 = $034;
+   GDK_5 = $035;
+   GDK_6 = $036;
+   GDK_7 = $037;
+   GDK_8 = $038;
+   GDK_9 = $039;
+   GDK_colon = $03a;
+   GDK_semicolon = $03b;
+   GDK_less = $03c;
+   GDK_equal = $03d;
+   GDK_greater = $03e;
+   GDK_question = $03f;
+   GDK_at = $040;
+   GDK_Capital_A = $041;
+   GDK_Capital_B = $042;
+   GDK_Capital_C = $043;
+   GDK_Capital_D = $044;
+   GDK_Capital_E = $045;
+   GDK_Capital_F = $046;
+   GDK_Capital_G = $047;
+   GDK_Capital_H = $048;
+   GDK_Capital_I = $049;
+   GDK_Capital_J = $04a;
+   GDK_Capital_K = $04b;
+   GDK_Capital_L = $04c;
+   GDK_Capital_M = $04d;
+   GDK_Capital_N = $04e;
+   GDK_Capital_O = $04f;
+   GDK_Capital_P = $050;
+   GDK_Capital_Q = $051;
+   GDK_Capital_R = $052;
+   GDK_Capital_S = $053;
+   GDK_Capital_T = $054;
+   GDK_Capital_U = $055;
+   GDK_Capital_V = $056;
+   GDK_Capital_W = $057;
+   GDK_Capital_X = $058;
+   GDK_Capital_Y = $059;
+   GDK_Capital_Z = $05a;
+   GDK_bracketleft = $05b;
+   GDK_backslash = $05c;
+   GDK_bracketright = $05d;
+   GDK_asciicircum = $05e;
+   GDK_underscore = $05f;
+   GDK_grave = $060;
+   GDK_quoteleft = $060;
+   GDK_a = $061;
+   GDK_b = $062;
+   GDK_c = $063;
+   GDK_d = $064;
+   GDK_e = $065;
+   GDK_f = $066;
+   GDK_g = $067;
+   GDK_h = $068;
+   GDK_i = $069;
+   GDK_j = $06a;
+   GDK_k = $06b;
+   GDK_l = $06c;
+   GDK_m = $06d;
+   GDK_n = $06e;
+   GDK_o = $06f;
+   GDK_p = $070;
+   GDK_q = $071;
+   GDK_r = $072;
+   GDK_s = $073;
+   GDK_t = $074;
+   GDK_u = $075;
+   GDK_v = $076;
+   GDK_w = $077;
+   GDK_x = $078;
+   GDK_y = $079;
+   GDK_z = $07a;
+   GDK_braceleft = $07b;
+   GDK_bar = $07c;
+   GDK_braceright = $07d;
+   GDK_asciitilde = $07e;
+   GDK_nobreakspace = $0a0;
+   GDK_exclamdown = $0a1;
+   GDK_cent = $0a2;
+   GDK_sterling = $0a3;
+   GDK_currency = $0a4;
+   GDK_yen = $0a5;
+   GDK_brokenbar = $0a6;
+   GDK_section = $0a7;
+   GDK_diaeresis = $0a8;
+   GDK_copyright = $0a9;
+   GDK_ordfeminine = $0aa;
+   GDK_guillemotleft = $0ab;
+   GDK_notsign = $0ac;
+   GDK_hyphen = $0ad;
+   GDK_registered = $0ae;
+   GDK_macron = $0af;
+   GDK_degree = $0b0;
+   GDK_plusminus = $0b1;
+   GDK_twosuperior = $0b2;
+   GDK_threesuperior = $0b3;
+   GDK_acute = $0b4;
+   GDK_mu = $0b5;
+   GDK_paragraph = $0b6;
+   GDK_periodcentered = $0b7;
+   GDK_cedilla = $0b8;
+   GDK_onesuperior = $0b9;
+   GDK_masculine = $0ba;
+   GDK_guillemotright = $0bb;
+   GDK_onequarter = $0bc;
+   GDK_onehalf = $0bd;
+   GDK_threequarters = $0be;
+   GDK_questiondown = $0bf;
+   GDK_Capital_Agrave = $0c0;
+   GDK_Capital_Aacute = $0c1;
+   GDK_Capital_Acircumflex = $0c2;
+   GDK_Capital_Atilde = $0c3;
+   GDK_Capital_Adiaeresis = $0c4;
+   GDK_Capital_Aring = $0c5;
+   GDK_Capital_AE = $0c6;
+   GDK_Capital_Ccedilla = $0c7;
+   GDK_Capital_Egrave = $0c8;
+   GDK_Capital_Eacute = $0c9;
+   GDK_Capital_Ecircumflex = $0ca;
+   GDK_Capital_Ediaeresis = $0cb;
+   GDK_Capital_Igrave = $0cc;
+   GDK_Capital_Iacute = $0cd;
+   GDK_Capital_Icircumflex = $0ce;
+   GDK_Capital_Idiaeresis = $0cf;
+   GDK_Capital_ETH = $0d0;
+   GDK_Capital_Ntilde = $0d1;
+   GDK_Capital_Ograve = $0d2;
+   GDK_Capital_Oacute = $0d3;
+   GDK_Capital_Ocircumflex = $0d4;
+   GDK_Capital_Otilde = $0d5;
+   GDK_Capital_Odiaeresis = $0d6;
+   GDK_Capital_multiply = $0d7;
+   GDK_Capital_Ooblique = $0d8;
+   GDK_Capital_Ugrave = $0d9;
+   GDK_Capital_Uacute = $0da;
+   GDK_Capital_Ucircumflex = $0db;
+   GDK_Capital_Udiaeresis = $0dc;
+   GDK_Capital_Yacute = $0dd;
+   GDK_Capital_THORN = $0de;
+   GDK_Thorn = $0de;
+   GDK_ssharp = $0df;
+   GDK_agrave = $0e0;
+   GDK_aacute = $0e1;
+   GDK_acircumflex = $0e2;
+   GDK_atilde = $0e3;
+   GDK_adiaeresis = $0e4;
+   GDK_aring = $0e5;
+   GDK_ae = $0e6;
+   GDK_ccedilla = $0e7;
+   GDK_egrave = $0e8;
+   GDK_eacute = $0e9;
+   GDK_ecircumflex = $0ea;
+   GDK_ediaeresis = $0eb;
+   GDK_igrave = $0ec;
+   GDK_iacute = $0ed;
+   GDK_icircumflex = $0ee;
+   GDK_idiaeresis = $0ef;
+   GDK_eth = $0f0;
+   GDK_ntilde = $0f1;
+   GDK_ograve = $0f2;
+   GDK_oacute = $0f3;
+   GDK_ocircumflex = $0f4;
+   GDK_otilde = $0f5;
+   GDK_odiaeresis = $0f6;
+   GDK_division = $0f7;
+   GDK_oslash = $0f8;
+   GDK_ugrave = $0f9;
+   GDK_uacute = $0fa;
+   GDK_ucircumflex = $0fb;
+   GDK_udiaeresis = $0fc;
+   GDK_yacute = $0fd;
+   GDK_small_thorn = $0fe;
+   GDK_ydiaeresis = $0ff;
+   GDK_Capital_Aogonek = $1a1;
+   GDK_Capital_breve = $1a2;
+   GDK_Capital_Lstroke = $1a3;
+   GDK_Capital_Lcaron = $1a5;
+   GDK_Capital_Sacute = $1a6;
+   GDK_Capital_Scaron = $1a9;
+   GDK_Capital_Scedilla = $1aa;
+   GDK_Capital_Tcaron = $1ab;
+   GDK_Capital_Zacute = $1ac;
+   GDK_Capital_Zcaron = $1ae;
+   GDK_Capital_Zabovedot = $1af;
+   GDK_aogonek = $1b1;
+   GDK_ogonek = $1b2;
+   GDK_lstroke = $1b3;
+   GDK_lcaron = $1b5;
+   GDK_sacute = $1b6;
+   GDK_caron = $1b7;
+   GDK_scaron = $1b9;
+   GDK_scedilla = $1ba;
+   GDK_tcaron = $1bb;
+   GDK_zacute = $1bc;
+   GDK_doubleacute = $1bd;
+   GDK_zcaron = $1be;
+   GDK_zabovedot = $1bf;
+   GDK_Capital_Racute = $1c0;
+   GDK_Capital_Abreve = $1c3;
+   GDK_Capital_Lacute = $1c5;
+   GDK_Capital_Cacute = $1c6;
+   GDK_Capital_Ccaron = $1c8;
+   GDK_Capital_Eogonek = $1ca;
+   GDK_Capital_Ecaron = $1cc;
+   GDK_Capital_Dcaron = $1cf;
+   GDK_Capital_Dstroke = $1d0;
+   GDK_Capital_Nacute = $1d1;
+   GDK_Capital_Ncaron = $1d2;
+   GDK_Capital_Odoubleacute = $1d5;
+   GDK_Capital_Rcaron = $1d8;
+   GDK_Capital_Uring = $1d9;
+   GDK_Capital_Udoubleacute = $1db;
+   GDK_Capital_Tcedilla = $1de;
+   GDK_racute = $1e0;
+   GDK_abreve = $1e3;
+   GDK_lacute = $1e5;
+   GDK_cacute = $1e6;
+   GDK_ccaron = $1e8;
+   GDK_eogonek = $1ea;
+   GDK_ecaron = $1ec;
+   GDK_dcaron = $1ef;
+   GDK_dstroke = $1f0;
+   GDK_nacute = $1f1;
+   GDK_ncaron = $1f2;
+   GDK_odoubleacute = $1f5;
+   GDK_udoubleacute = $1fb;
+   GDK_rcaron = $1f8;
+   GDK_uring = $1f9;
+   GDK_tcedilla = $1fe;
+   GDK_abovedot = $1ff;
+   GDK_Capital_Hstroke = $2a1;
+   GDK_Capital_Hcircumflex = $2a6;
+   GDK_Capital_Iabovedot = $2a9;
+   GDK_Capital_Gbreve = $2ab;
+   GDK_Capital_Jcircumflex = $2ac;
+   GDK_hstroke = $2b1;
+   GDK_hcircumflex = $2b6;
+   GDK_idotless = $2b9;
+   GDK_gbreve = $2bb;
+   GDK_jcircumflex = $2bc;
+   GDK_Capital_Cabovedot = $2c5;
+   GDK_Capital_Ccircumflex = $2c6;
+   GDK_Capital_Gabovedot = $2d5;
+   GDK_Capital_Gcircumflex = $2d8;
+   GDK_Capital_Ubreve = $2dd;
+   GDK_Capital_Scircumflex = $2de;
+   GDK_cabovedot = $2e5;
+   GDK_ccircumflex = $2e6;
+   GDK_gabovedot = $2f5;
+   GDK_gcircumflex = $2f8;
+   GDK_ubreve = $2fd;
+   GDK_scircumflex = $2fe;
+   GDK_kra = $3a2;
+   GDK_kappa = $3a2;
+   GDK_Capital_Rcedilla = $3a3;
+   GDK_Capital_Itilde = $3a5;
+   GDK_Capital_Lcedilla = $3a6;
+   GDK_Capital_Emacron = $3aa;
+   GDK_Capital_Gcedilla = $3ab;
+   GDK_Capital_Tslash = $3ac;
+   GDK_rcedilla = $3b3;
+   GDK_itilde = $3b5;
+   GDK_lcedilla = $3b6;
+   GDK_emacron = $3ba;
+   GDK_gcedilla = $3bb;
+   GDK_tslash = $3bc;
+   GDK_Capital_ENG = $3bd;
+   GDK_eng = $3bf;
+   GDK_Capital_Amacron = $3c0;
+   GDK_Capital_Iogonek = $3c7;
+   GDK_Capital_Eabovedot = $3cc;
+   GDK_Capital_Imacron = $3cf;
+   GDK_Capital_Ncedilla = $3d1;
+   GDK_Capital_Omacron = $3d2;
+   GDK_Capital_Kcedilla = $3d3;
+   GDK_Capital_Uogonek = $3d9;
+   GDK_Capital_Utilde = $3dd;
+   GDK_Capital_Umacron = $3de;
+   GDK_amacron = $3e0;
+   GDK_iogonek = $3e7;
+   GDK_eabovedot = $3ec;
+   GDK_imacron = $3ef;
+   GDK_ncedilla = $3f1;
+   GDK_omacron = $3f2;
+   GDK_kcedilla = $3f3;
+   GDK_uogonek = $3f9;
+   GDK_utilde = $3fd;
+   GDK_umacron = $3fe;
+   GDK_overline = $47e;
+   GDK_kana_fullstop = $4a1;
+   GDK_kana_openingbracket = $4a2;
+   GDK_kana_closingbracket = $4a3;
+   GDK_kana_comma = $4a4;
+   GDK_kana_conjunctive = $4a5;
+   GDK_kana_middledot = $4a5;
+   GDK_kana_WO = $4a6;
+   GDK_kana_a = $4a7;
+   GDK_kana_i = $4a8;
+   GDK_kana_u = $4a9;
+   GDK_kana_e = $4aa;
+   GDK_kana_o = $4ab;
+   GDK_kana_ya = $4ac;
+   GDK_kana_yu = $4ad;
+   GDK_kana_yo = $4ae;
+   GDK_kana_tsu = $4af;
+   GDK_kana_tu = $4af;
+   GDK_prolongedsound = $4b0;
+   GDK_kana_Capital__A = $4b1;
+   GDK_kana_Capital__I = $4b2;
+   GDK_kana_Capital__U = $4b3;
+   GDK_kana_Capital__E = $4b4;
+   GDK_kana_Capital__O = $4b5;
+   GDK_kana_Capital__KA = $4b6;
+   GDK_kana_Capital__KI = $4b7;
+   GDK_kana_Capital__KU = $4b8;
+   GDK_kana_Capital__KE = $4b9;
+   GDK_kana_Capital__KO = $4ba;
+   GDK_kana_Capital__SA = $4bb;
+   GDK_kana_Capital__SHI = $4bc;
+   GDK_kana_Capital__SU = $4bd;
+   GDK_kana_Capital__SE = $4be;
+   GDK_kana_Capital__SO = $4bf;
+   GDK_kana_Capital__TA = $4c0;
+   GDK_kana_Capital__CHI = $4c1;
+   GDK_kana_Capital__TI = $4c1;
+   GDK_kana_Capital__TSU = $4c2;
+   GDK_kana_Capital__TU = $4c2;
+   GDK_kana_Capital__TE = $4c3;
+   GDK_kana_Capital__TO = $4c4;
+   GDK_kana_Capital__NA = $4c5;
+   GDK_kana_Capital__NI = $4c6;
+   GDK_kana_Capital__NU = $4c7;
+   GDK_kana_Capital__NE = $4c8;
+   GDK_kana_Capital__NO = $4c9;
+   GDK_kana_Capital__HA = $4ca;
+   GDK_kana_Capital__HI = $4cb;
+   GDK_kana_Capital__FU = $4cc;
+   GDK_kana_Capital__HU = $4cc;
+   GDK_kana_Capital__HE = $4cd;
+   GDK_kana_Capital__HO = $4ce;
+   GDK_kana_Capital__MA = $4cf;
+   GDK_kana_Capital__MI = $4d0;
+   GDK_kana_Capital__MU = $4d1;
+   GDK_kana_Capital__ME = $4d2;
+   GDK_kana_Capital__MO = $4d3;
+   GDK_kana_Capital__YA = $4d4;
+   GDK_kana_Capital__YU = $4d5;
+   GDK_kana_Capital__YO = $4d6;
+   GDK_kana_Capital__RA = $4d7;
+   GDK_kana_Capital__RI = $4d8;
+   GDK_kana_Capital__RU = $4d9;
+   GDK_kana_Capital__RE = $4da;
+   GDK_kana_Capital__RO = $4db;
+   GDK_kana_Capital__WA = $4dc;
+   GDK_kana_Capital__N = $4dd;
+   GDK_voicedsound = $4de;
+   GDK_semivoicedsound = $4df;
+   GDK_kana_switch = $FF7E;
+   GDK_arabic_comma = $5ac;
+   GDK_arabic_semicolon = $5bb;
+   GDK_arabic_question_mark = $5bf;
+   GDK_arabic_hamza = $5c1;
+   GDK_arabic_maddaonalef = $5c2;
+   GDK_arabic_hamzaonalef = $5c3;
+   GDK_arabic_hamzaonwaw = $5c4;
+   GDK_arabic_hamzaunderalef = $5c5;
+   GDK_arabic_hamzaonyeh = $5c6;
+   GDK_arabic_alef = $5c7;
+   GDK_arabic_beh = $5c8;
+   GDK_arabic_tehmarbuta = $5c9;
+   GDK_arabic_teh = $5ca;
+   GDK_arabic_theh = $5cb;
+   GDK_arabic_jeem = $5cc;
+   GDK_arabic_hah = $5cd;
+   GDK_arabic_khah = $5ce;
+   GDK_arabic_dal = $5cf;
+   GDK_arabic_thal = $5d0;
+   GDK_arabic_ra = $5d1;
+   GDK_arabic_zain = $5d2;
+   GDK_arabic_seen = $5d3;
+   GDK_arabic_sheen = $5d4;
+   GDK_arabic_sad = $5d5;
+   GDK_arabic_dad = $5d6;
+   GDK_arabic_tah = $5d7;
+   GDK_arabic_zah = $5d8;
+   GDK_arabic_ain = $5d9;
+   GDK_arabic_ghain = $5da;
+   GDK_arabic_tatweel = $5e0;
+   GDK_arabic_feh = $5e1;
+   GDK_arabic_qaf = $5e2;
+   GDK_arabic_kaf = $5e3;
+   GDK_arabic_lam = $5e4;
+   GDK_arabic_meem = $5e5;
+   GDK_arabic_noon = $5e6;
+   GDK_arabic_ha = $5e7;
+   GDK_arabic_heh = $5e7;
+   GDK_arabic_waw = $5e8;
+   GDK_arabic_alefmaksura = $5e9;
+   GDK_arabic_yeh = $5ea;
+   GDK_arabic_fathatan = $5eb;
+   GDK_arabic_dammatan = $5ec;
+   GDK_arabic_kasratan = $5ed;
+   GDK_arabic_fatha = $5ee;
+   GDK_arabic_damma = $5ef;
+   GDK_arabic_kasra = $5f0;
+   GDK_arabic_shadda = $5f1;
+   GDK_arabic_sukun = $5f2;
+   GDK_arabic_switch = $FF7E;
+   GDK_serbian_dje = $6a1;
+   GDK_macedonia_gje = $6a2;
+   GDK_cyrillic_io = $6a3;
+   GDK_ukrainian_ie = $6a4;
+   GDK_ukrainian_je = $6a4;
+   GDK_macedonia_dse = $6a5;
+   GDK_ukrainian_i = $6a6;
+   GDK_ukrainian_yi = $6a7;
+   GDK_cyrillic_je = $6a8;
+   GDK_serbian_je = $6a8;
+   GDK_cyrillic_lje = $6a9;
+   GDK_serbian_lje = $6a9;
+   GDK_cyrillic_nje = $6aa;
+   GDK_serbian_nje = $6aa;
+   GDK_serbian_tshe = $6ab;
+   GDK_macedonia_kje = $6ac;
+   GDK_byelorussian_shortu = $6ae;
+   GDK_cyrillic_dzhe = $6af;
+   GDK_serbian_dze = $6af;
+   GDK_numerosign = $6b0;
+   GDK_serbian_Capital_DJE = $6b1;
+   GDK_macedonia_Capital_GJE = $6b2;
+   GDK_cyrillic_Capital_IO = $6b3;
+   GDK_ukrainian_Capital_IE = $6b4;
+   GDK_ukrainian_Capital_JE = $6b4;
+   GDK_macedonia_Capital_DSE = $6b5;
+   GDK_ukrainian_Capital_I = $6b6;
+   GDK_ukrainian_Capital_YI = $6b7;
+   GDK_cyrillic_Capital_JE = $6b8;
+   GDK_serbian_Capital_JE = $6b8;
+   GDK_cyrillic_Capital_LJE = $6b9;
+   GDK_serbian_Capital_LJE = $6b9;
+   GDK_cyrillic_Capital_NJE = $6ba;
+   GDK_serbian_Capital_NJE = $6ba;
+   GDK_serbian_Capital_TSHE = $6bb;
+   GDK_macedonia_Capital_KJE = $6bc;
+   GDK_byelorussian_Capital_SHORTU = $6be;
+   GDK_cyrillic_Capital_DZHE = $6bf;
+   GDK_serbian_Capital_DZE = $6bf;
+   GDK_cyrillic_yu = $6c0;
+   GDK_cyrillic_a = $6c1;
+   GDK_cyrillic_be = $6c2;
+   GDK_cyrillic_tse = $6c3;
+   GDK_cyrillic_de = $6c4;
+   GDK_cyrillic_ie = $6c5;
+   GDK_cyrillic_ef = $6c6;
+   GDK_cyrillic_ghe = $6c7;
+   GDK_cyrillic_ha = $6c8;
+   GDK_cyrillic_i = $6c9;
+   GDK_cyrillic_shorti = $6ca;
+   GDK_cyrillic_ka = $6cb;
+   GDK_cyrillic_el = $6cc;
+   GDK_cyrillic_em = $6cd;
+   GDK_cyrillic_en = $6ce;
+   GDK_cyrillic_o = $6cf;
+   GDK_cyrillic_pe = $6d0;
+   GDK_cyrillic_ya = $6d1;
+   GDK_cyrillic_er = $6d2;
+   GDK_cyrillic_es = $6d3;
+   GDK_cyrillic_te = $6d4;
+   GDK_cyrillic_u = $6d5;
+   GDK_cyrillic_zhe = $6d6;
+   GDK_cyrillic_ve = $6d7;
+   GDK_cyrillic_softsign = $6d8;
+   GDK_cyrillic_yeru = $6d9;
+   GDK_cyrillic_ze = $6da;
+   GDK_cyrillic_sha = $6db;
+   GDK_cyrillic_e = $6dc;
+   GDK_cyrillic_shcha = $6dd;
+   GDK_cyrillic_che = $6de;
+   GDK_cyrillic_hardsign = $6df;
+   GDK_cyrillic_Capital_YU = $6e0;
+   GDK_cyrillic_Capital_A = $6e1;
+   GDK_cyrillic_Capital_BE = $6e2;
+   GDK_cyrillic_Capital_TSE = $6e3;
+   GDK_cyrillic_Capital_DE = $6e4;
+   GDK_cyrillic_Capital_IE = $6e5;
+   GDK_cyrillic_Capital_EF = $6e6;
+   GDK_cyrillic_Capital_GHE = $6e7;
+   GDK_cyrillic_Capital_HA = $6e8;
+   GDK_cyrillic_Capital_I = $6e9;
+   GDK_cyrillic_Capital_SHORTI = $6ea;
+   GDK_cyrillic_Capital_KA = $6eb;
+   GDK_cyrillic_Capital_EL = $6ec;
+   GDK_cyrillic_Capital_EM = $6ed;
+   GDK_cyrillic_Capital_EN = $6ee;
+   GDK_cyrillic_Capital_O = $6ef;
+   GDK_cyrillic_Capital_PE = $6f0;
+   GDK_cyrillic_Capital_YA = $6f1;
+   GDK_cyrillic_Capital_ER = $6f2;
+   GDK_cyrillic_Capital_ES = $6f3;
+   GDK_cyrillic_Capital_TE = $6f4;
+   GDK_cyrillic_Capital_U = $6f5;
+   GDK_cyrillic_Capital_ZHE = $6f6;
+   GDK_cyrillic_Capital_VE = $6f7;
+   GDK_cyrillic_Capital_SOFTSIGN = $6f8;
+   GDK_cyrillic_Capital_YERU = $6f9;
+   GDK_cyrillic_Capital_ZE = $6fa;
+   GDK_cyrillic_Capital_SHA = $6fb;
+   GDK_cyrillic_Capital_E = $6fc;
+   GDK_cyrillic_Capital_SHCHA = $6fd;
+   GDK_cyrillic_Capital_CHE = $6fe;
+   GDK_cyrillic_Capital_HARDSIGN = $6ff;
+   GDK_greek_Capital_ALPHAaccent = $7a1;
+   GDK_greek_Capital_EPSILONaccent = $7a2;
+   GDK_greek_Capital_ETAaccent = $7a3;
+   GDK_greek_Capital_IOTAaccent = $7a4;
+   GDK_greek_Capital_IOTAdiaeresis = $7a5;
+   GDK_greek_Capital_OMICRONaccent = $7a7;
+   GDK_greek_Capital_UPSILONaccent = $7a8;
+   GDK_greek_Capital_UPSILONdieresis = $7a9;
+   GDK_greek_Capital_OMEGAaccent = $7ab;
+   GDK_greek_accentdieresis = $7ae;
+   GDK_greek_horizbar = $7af;
+   GDK_greek_alphaaccent = $7b1;
+   GDK_greek_epsilonaccent = $7b2;
+   GDK_greek_etaaccent = $7b3;
+   GDK_greek_iotaaccent = $7b4;
+   GDK_greek_iotadieresis = $7b5;
+   GDK_greek_iotaaccentdieresis = $7b6;
+   GDK_greek_omicronaccent = $7b7;
+   GDK_greek_upsilonaccent = $7b8;
+   GDK_greek_upsilondieresis = $7b9;
+   GDK_greek_upsilonaccentdieresis = $7ba;
+   GDK_greek_omegaaccent = $7bb;
+   GDK_greek_Capital_ALPHA = $7c1;
+   GDK_greek_Capital_BETA = $7c2;
+   GDK_greek_Capital_GAMMA = $7c3;
+   GDK_greek_Capital_DELTA = $7c4;
+   GDK_greek_Capital_EPSILON = $7c5;
+   GDK_greek_Capital_ZETA = $7c6;
+   GDK_greek_Capital_ETA = $7c7;
+   GDK_greek_Capital_THETA = $7c8;
+   GDK_greek_Capital_IOTA = $7c9;
+   GDK_greek_Capital_KAPPA = $7ca;
+   GDK_greek_Capital_LAMDA = $7cb;
+   GDK_greek_Capital_LAMBDA = $7cb;
+   GDK_greek_Capital_MU = $7cc;
+   GDK_greek_Capital_NU = $7cd;
+   GDK_greek_Capital_XI = $7ce;
+   GDK_greek_Capital_OMICRON = $7cf;
+   GDK_greek_Capital_PI = $7d0;
+   GDK_greek_Capital_RHO = $7d1;
+   GDK_greek_Capital_SIGMA = $7d2;
+   GDK_greek_Capital_TAU = $7d4;
+   GDK_greek_Capital_UPSILON = $7d5;
+   GDK_greek_Capital_PHI = $7d6;
+   GDK_greek_Capital_CHI = $7d7;
+   GDK_greek_Capital_PSI = $7d8;
+   GDK_greek_Capital_OMEGA = $7d9;
+   GDK_greek_alpha = $7e1;
+   GDK_greek_beta = $7e2;
+   GDK_greek_gamma = $7e3;
+   GDK_greek_delta = $7e4;
+   GDK_greek_epsilon = $7e5;
+   GDK_greek_zeta = $7e6;
+   GDK_greek_eta = $7e7;
+   GDK_greek_theta = $7e8;
+   GDK_greek_iota = $7e9;
+   GDK_greek_kappa = $7ea;
+   GDK_greek_lamda = $7eb;
+   GDK_greek_lambda = $7eb;
+   GDK_greek_mu = $7ec;
+   GDK_greek_nu = $7ed;
+   GDK_greek_xi = $7ee;
+   GDK_greek_omicron = $7ef;
+   GDK_greek_pi = $7f0;
+   GDK_greek_rho = $7f1;
+   GDK_greek_sigma = $7f2;
+   GDK_greek_finalsmallsigma = $7f3;
+   GDK_greek_tau = $7f4;
+   GDK_greek_upsilon = $7f5;
+   GDK_greek_phi = $7f6;
+   GDK_greek_chi = $7f7;
+   GDK_greek_psi = $7f8;
+   GDK_greek_omega = $7f9;
+   GDK_greek_switch = $FF7E;
+   GDK_leftradical = $8a1;
+   GDK_topleftradical = $8a2;
+   GDK_horizconnector = $8a3;
+   GDK_topintegral = $8a4;
+   GDK_botintegral = $8a5;
+   GDK_vertconnector = $8a6;
+   GDK_topleftsqbracket = $8a7;
+   GDK_botleftsqbracket = $8a8;
+   GDK_toprightsqbracket = $8a9;
+   GDK_botrightsqbracket = $8aa;
+   GDK_topleftparens = $8ab;
+   GDK_botleftparens = $8ac;
+   GDK_toprightparens = $8ad;
+   GDK_botrightparens = $8ae;
+   GDK_leftmiddlecurlybrace = $8af;
+   GDK_rightmiddlecurlybrace = $8b0;
+   GDK_topleftsummation = $8b1;
+   GDK_botleftsummation = $8b2;
+   GDK_topvertsummationconnector = $8b3;
+   GDK_botvertsummationconnector = $8b4;
+   GDK_toprightsummation = $8b5;
+   GDK_botrightsummation = $8b6;
+   GDK_rightmiddlesummation = $8b7;
+   GDK_lessthanequal = $8bc;
+   GDK_notequal = $8bd;
+   GDK_greaterthanequal = $8be;
+   GDK_integral = $8bf;
+   GDK_therefore = $8c0;
+   GDK_variation = $8c1;
+   GDK_infinity = $8c2;
+   GDK_nabla = $8c5;
+   GDK_approximate = $8c8;
+   GDK_similarequal = $8c9;
+   GDK_ifonlyif = $8cd;
+   GDK_implies = $8ce;
+   GDK_identical = $8cf;
+   GDK_radical = $8d6;
+   GDK_includedin = $8da;
+   GDK_includes = $8db;
+   GDK_intersection = $8dc;
+   GDK_union = $8dd;
+   GDK_logicaland = $8de;
+   GDK_logicalor = $8df;
+   GDK_partialderivative = $8ef;
+   GDK_function = $8f6;
+   GDK_leftarrow = $8fb;
+   GDK_uparrow = $8fc;
+   GDK_rightarrow = $8fd;
+   GDK_downarrow = $8fe;
+   GDK_blank = $9df;
+   GDK_soliddiamond = $9e0;
+   GDK_checkerboard = $9e1;
+   GDK_ht = $9e2;
+   GDK_ff = $9e3;
+   GDK_cr = $9e4;
+   GDK_lf = $9e5;
+   GDK_nl = $9e8;
+   GDK_vt = $9e9;
+   GDK_lowrightcorner = $9ea;
+   GDK_uprightcorner = $9eb;
+   GDK_upleftcorner = $9ec;
+   GDK_lowleftcorner = $9ed;
+   GDK_crossinglines = $9ee;
+   GDK_horizlinescan1 = $9ef;
+   GDK_horizlinescan3 = $9f0;
+   GDK_horizlinescan5 = $9f1;
+   GDK_horizlinescan7 = $9f2;
+   GDK_horizlinescan9 = $9f3;
+   GDK_leftt = $9f4;
+   GDK_rightt = $9f5;
+   GDK_bott = $9f6;
+   GDK_topt = $9f7;
+   GDK_vertbar = $9f8;
+   GDK_emspace = $aa1;
+   GDK_enspace = $aa2;
+   GDK_em3space = $aa3;
+   GDK_em4space = $aa4;
+   GDK_digitspace = $aa5;
+   GDK_punctspace = $aa6;
+   GDK_thinspace = $aa7;
+   GDK_hairspace = $aa8;
+   GDK_emdash = $aa9;
+   GDK_endash = $aaa;
+   GDK_signifblank = $aac;
+   GDK_ellipsis = $aae;
+   GDK_doubbaselinedot = $aaf;
+   GDK_onethird = $ab0;
+   GDK_twothirds = $ab1;
+   GDK_onefifth = $ab2;
+   GDK_twofifths = $ab3;
+   GDK_threefifths = $ab4;
+   GDK_fourfifths = $ab5;
+   GDK_onesixth = $ab6;
+   GDK_fivesixths = $ab7;
+   GDK_careof = $ab8;
+   GDK_figdash = $abb;
+   GDK_leftanglebracket = $abc;
+   GDK_decimalpoint = $abd;
+   GDK_rightanglebracket = $abe;
+   GDK_marker = $abf;
+   GDK_oneeighth = $ac3;
+   GDK_threeeighths = $ac4;
+   GDK_fiveeighths = $ac5;
+   GDK_seveneighths = $ac6;
+   GDK_trademark = $ac9;
+   GDK_signaturemark = $aca;
+   GDK_trademarkincircle = $acb;
+   GDK_leftopentriangle = $acc;
+   GDK_rightopentriangle = $acd;
+   GDK_emopencircle = $ace;
+   GDK_emopenrectangle = $acf;
+   GDK_leftsinglequotemark = $ad0;
+   GDK_rightsinglequotemark = $ad1;
+   GDK_leftdoublequotemark = $ad2;
+   GDK_rightdoublequotemark = $ad3;
+   GDK_prescription = $ad4;
+   GDK_minutes = $ad6;
+   GDK_seconds = $ad7;
+   GDK_latincross = $ad9;
+   GDK_hexagram = $ada;
+   GDK_filledrectbullet = $adb;
+   GDK_filledlefttribullet = $adc;
+   GDK_filledrighttribullet = $add;
+   GDK_emfilledcircle = $ade;
+   GDK_emfilledrect = $adf;
+   GDK_enopencircbullet = $ae0;
+   GDK_enopensquarebullet = $ae1;
+   GDK_openrectbullet = $ae2;
+   GDK_opentribulletup = $ae3;
+   GDK_opentribulletdown = $ae4;
+   GDK_openstar = $ae5;
+   GDK_enfilledcircbullet = $ae6;
+   GDK_enfilledsqbullet = $ae7;
+   GDK_filledtribulletup = $ae8;
+   GDK_filledtribulletdown = $ae9;
+   GDK_leftpointer = $aea;
+   GDK_rightpointer = $aeb;
+   GDK_club = $aec;
+   GDK_diamond = $aed;
+   GDK_heart_key = $aee;
+   GDK_maltesecross = $af0;
+   GDK_dagger = $af1;
+   GDK_doubledagger = $af2;
+   GDK_checkmark = $af3;
+   GDK_ballotcross = $af4;
+   GDK_musicalsharp = $af5;
+   GDK_musicalflat = $af6;
+   GDK_malesymbol = $af7;
+   GDK_femalesymbol = $af8;
+   GDK_telephone = $af9;
+   GDK_telephonerecorder = $afa;
+   GDK_phonographcopyright = $afb;
+   GDK_caret = $afc;
+   GDK_singlelowquotemark = $afd;
+   GDK_doublelowquotemark = $afe;
+   GDK_cursor = $aff;
+   GDK_leftcaret = $ba3;
+   GDK_rightcaret = $ba6;
+   GDK_downcaret = $ba8;
+   GDK_upcaret = $ba9;
+   GDK_overbar = $bc0;
+   GDK_downtack = $bc2;
+   GDK_upshoe = $bc3;
+   GDK_downstile = $bc4;
+   GDK_underbar = $bc6;
+   GDK_jot = $bca;
+   GDK_quad = $bcc;
+   GDK_uptack = $bce;
+   GDK_circle_key = $bcf;
+   GDK_upstile = $bd3;
+   GDK_downshoe = $bd6;
+   GDK_rightshoe = $bd8;
+   GDK_leftshoe = $bda;
+   GDK_lefttack = $bdc;
+   GDK_righttack = $bfc;
+   GDK_hebrew_doublelowline = $cdf;
+   GDK_hebrew_aleph = $ce0;
+   GDK_hebrew_bet = $ce1;
+   GDK_hebrew_beth = $ce1;
+   GDK_hebrew_gimel = $ce2;
+   GDK_hebrew_gimmel = $ce2;
+   GDK_hebrew_dalet = $ce3;
+   GDK_hebrew_daleth = $ce3;
+   GDK_hebrew_he = $ce4;
+   GDK_hebrew_waw = $ce5;
+   GDK_hebrew_zain = $ce6;
+   GDK_hebrew_zayin = $ce6;
+   GDK_hebrew_chet = $ce7;
+   GDK_hebrew_het = $ce7;
+   GDK_hebrew_tet = $ce8;
+   GDK_hebrew_teth = $ce8;
+   GDK_hebrew_yod = $ce9;
+   GDK_hebrew_finalkaph = $cea;
+   GDK_hebrew_kaph = $ceb;
+   GDK_hebrew_lamed = $cec;
+   GDK_hebrew_finalmem = $ced;
+   GDK_hebrew_mem = $cee;
+   GDK_hebrew_finalnun = $cef;
+   GDK_hebrew_nun = $cf0;
+   GDK_hebrew_samech = $cf1;
+   GDK_hebrew_samekh = $cf1;
+   GDK_hebrew_ayin = $cf2;
+   GDK_hebrew_finalpe = $cf3;
+   GDK_hebrew_pe = $cf4;
+   GDK_hebrew_finalzade = $cf5;
+   GDK_hebrew_finalzadi = $cf5;
+   GDK_hebrew_zade = $cf6;
+   GDK_hebrew_zadi = $cf6;
+   GDK_hebrew_qoph = $cf7;
+   GDK_hebrew_kuf = $cf7;
+   GDK_hebrew_resh = $cf8;
+   GDK_hebrew_shin = $cf9;
+   GDK_hebrew_taw = $cfa;
+   GDK_hebrew_taf = $cfa;
+   GDK_Hebrew_switch = $FF7E;
+   GDK_Thai_kokai = $da1;
+   GDK_Thai_khokhai = $da2;
+   GDK_Thai_khokhuat = $da3;
+   GDK_Thai_khokhwai = $da4;
+   GDK_Thai_khokhon = $da5;
+   GDK_Thai_khorakhang = $da6;
+   GDK_Thai_ngongu = $da7;
+   GDK_Thai_chochan = $da8;
+   GDK_Thai_choching = $da9;
+   GDK_Thai_chochang = $daa;
+   GDK_Thai_soso = $dab;
+   GDK_Thai_chochoe = $dac;
+   GDK_Thai_yoying = $dad;
+   GDK_Thai_dochada = $dae;
+   GDK_Thai_topatak = $daf;
+   GDK_Thai_thothan = $db0;
+   GDK_Thai_thonangmontho = $db1;
+   GDK_Thai_thophuthao = $db2;
+   GDK_Thai_nonen = $db3;
+   GDK_Thai_dodek = $db4;
+   GDK_Thai_totao = $db5;
+   GDK_Thai_thothung = $db6;
+   GDK_Thai_thothahan = $db7;
+   GDK_Thai_thothong = $db8;
+   GDK_Thai_nonu = $db9;
+   GDK_Thai_bobaimai = $dba;
+   GDK_Thai_popla = $dbb;
+   GDK_Thai_phophung = $dbc;
+   GDK_Thai_fofa = $dbd;
+   GDK_Thai_phophan = $dbe;
+   GDK_Thai_fofan = $dbf;
+   GDK_Thai_phosamphao = $dc0;
+   GDK_Thai_moma = $dc1;
+   GDK_Thai_yoyak = $dc2;
+   GDK_Thai_rorua = $dc3;
+   GDK_Thai_ru = $dc4;
+   GDK_Thai_loling = $dc5;
+   GDK_Thai_lu = $dc6;
+   GDK_Thai_wowaen = $dc7;
+   GDK_Thai_sosala = $dc8;
+   GDK_Thai_sorusi = $dc9;
+   GDK_Thai_sosua = $dca;
+   GDK_Thai_hohip = $dcb;
+   GDK_Thai_lochula = $dcc;
+   GDK_Thai_oang = $dcd;
+   GDK_Thai_honokhuk = $dce;
+   GDK_Thai_paiyannoi = $dcf;
+   GDK_Thai_saraa = $dd0;
+   GDK_Thai_maihanakat = $dd1;
+   GDK_Thai_saraaa = $dd2;
+   GDK_Thai_saraam = $dd3;
+   GDK_Thai_sarai = $dd4;
+   GDK_Thai_saraii = $dd5;
+   GDK_Thai_saraue = $dd6;
+   GDK_Thai_sarauee = $dd7;
+   GDK_Thai_sarau = $dd8;
+   GDK_Thai_sarauu = $dd9;
+   GDK_Thai_phinthu = $dda;
+   GDK_Thai_maihanakat_maitho = $dde;
+   GDK_Thai_baht = $ddf;
+   GDK_Thai_sarae = $de0;
+   GDK_Thai_saraae = $de1;
+   GDK_Thai_sarao = $de2;
+   GDK_Thai_saraaimaimuan = $de3;
+   GDK_Thai_saraaimaimalai = $de4;
+   GDK_Thai_lakkhangyao = $de5;
+   GDK_Thai_maiyamok = $de6;
+   GDK_Thai_maitaikhu = $de7;
+   GDK_Thai_maiek = $de8;
+   GDK_Thai_maitho = $de9;
+   GDK_Thai_maitri = $dea;
+   GDK_Thai_maichattawa = $deb;
+   GDK_Thai_thanthakhat = $dec;
+   GDK_Thai_nikhahit = $ded;
+   GDK_Thai_leksun = $df0;
+   GDK_Thai_leknung = $df1;
+   GDK_Thai_leksong = $df2;
+   GDK_Thai_leksam = $df3;
+   GDK_Thai_leksi = $df4;
+   GDK_Thai_lekha = $df5;
+   GDK_Thai_lekhok = $df6;
+   GDK_Thai_lekchet = $df7;
+   GDK_Thai_lekpaet = $df8;
+   GDK_Thai_lekkao = $df9;
+   GDK_Hangul = $ff31;
+   GDK_Hangul_Start = $ff32;
+   GDK_Hangul_End = $ff33;
+   GDK_Hangul_Hanja = $ff34;
+   GDK_Hangul_Jamo = $ff35;
+   GDK_Hangul_Romaja = $ff36;
+   GDK_Hangul_Codeinput = $ff37;
+   GDK_Hangul_Jeonja = $ff38;
+   GDK_Hangul_Banja = $ff39;
+   GDK_Hangul_PreHanja = $ff3a;
+   GDK_Hangul_PostHanja = $ff3b;
+   GDK_Hangul_SingleCandidate = $ff3c;
+   GDK_Hangul_MultipleCandidate = $ff3d;
+   GDK_Hangul_PreviousCandidate = $ff3e;
+   GDK_Hangul_Special = $ff3f;
+   GDK_Hangul_switch = $FF7E;
+   GDK_Hangul_Kiyeog = $ea1;
+   GDK_Hangul_SsangKiyeog = $ea2;
+   GDK_Hangul_KiyeogSios = $ea3;
+   GDK_Hangul_Nieun = $ea4;
+   GDK_Hangul_NieunJieuj = $ea5;
+   GDK_Hangul_NieunHieuh = $ea6;
+   GDK_Hangul_Dikeud = $ea7;
+   GDK_Hangul_SsangDikeud = $ea8;
+   GDK_Hangul_Rieul = $ea9;
+   GDK_Hangul_RieulKiyeog = $eaa;
+   GDK_Hangul_RieulMieum = $eab;
+   GDK_Hangul_RieulPieub = $eac;
+   GDK_Hangul_RieulSios = $ead;
+   GDK_Hangul_RieulTieut = $eae;
+   GDK_Hangul_RieulPhieuf = $eaf;
+   GDK_Hangul_RieulHieuh = $eb0;
+   GDK_Hangul_Mieum = $eb1;
+   GDK_Hangul_Pieub = $eb2;
+   GDK_Hangul_SsangPieub = $eb3;
+   GDK_Hangul_PieubSios = $eb4;
+   GDK_Hangul_Sios = $eb5;
+   GDK_Hangul_SsangSios = $eb6;
+   GDK_Hangul_Ieung = $eb7;
+   GDK_Hangul_Jieuj = $eb8;
+   GDK_Hangul_SsangJieuj = $eb9;
+   GDK_Hangul_Cieuc = $eba;
+   GDK_Hangul_Khieuq = $ebb;
+   GDK_Hangul_Tieut = $ebc;
+   GDK_Hangul_Phieuf = $ebd;
+   GDK_Hangul_Hieuh = $ebe;
+   GDK_Hangul_A = $ebf;
+   GDK_Hangul_AE = $ec0;
+   GDK_Hangul_YA = $ec1;
+   GDK_Hangul_YAE = $ec2;
+   GDK_Hangul_EO = $ec3;
+   GDK_Hangul_E = $ec4;
+   GDK_Hangul_YEO = $ec5;
+   GDK_Hangul_YE = $ec6;
+   GDK_Hangul_O = $ec7;
+   GDK_Hangul_WA = $ec8;
+   GDK_Hangul_WAE = $ec9;
+   GDK_Hangul_OE = $eca;
+   GDK_Hangul_YO = $ecb;
+   GDK_Hangul_U = $ecc;
+   GDK_Hangul_WEO = $ecd;
+   GDK_Hangul_WE = $ece;
+   GDK_Hangul_WI = $ecf;
+   GDK_Hangul_YU = $ed0;
+   GDK_Hangul_EU = $ed1;
+   GDK_Hangul_YI = $ed2;
+   GDK_Hangul_I = $ed3;
+   GDK_Hangul_J_Kiyeog = $ed4;
+   GDK_Hangul_J_SsangKiyeog = $ed5;
+   GDK_Hangul_J_KiyeogSios = $ed6;
+   GDK_Hangul_J_Nieun = $ed7;
+   GDK_Hangul_J_NieunJieuj = $ed8;
+   GDK_Hangul_J_NieunHieuh = $ed9;
+   GDK_Hangul_J_Dikeud = $eda;
+   GDK_Hangul_J_Rieul = $edb;
+   GDK_Hangul_J_RieulKiyeog = $edc;
+   GDK_Hangul_J_RieulMieum = $edd;
+   GDK_Hangul_J_RieulPieub = $ede;
+   GDK_Hangul_J_RieulSios = $edf;
+   GDK_Hangul_J_RieulTieut = $ee0;
+   GDK_Hangul_J_RieulPhieuf = $ee1;
+   GDK_Hangul_J_RieulHieuh = $ee2;
+   GDK_Hangul_J_Mieum = $ee3;
+   GDK_Hangul_J_Pieub = $ee4;
+   GDK_Hangul_J_PieubSios = $ee5;
+   GDK_Hangul_J_Sios = $ee6;
+   GDK_Hangul_J_SsangSios = $ee7;
+   GDK_Hangul_J_Ieung = $ee8;
+   GDK_Hangul_J_Jieuj = $ee9;
+   GDK_Hangul_J_Cieuc = $eea;
+   GDK_Hangul_J_Khieuq = $eeb;
+   GDK_Hangul_J_Tieut = $eec;
+   GDK_Hangul_J_Phieuf = $eed;
+   GDK_Hangul_J_Hieuh = $eee;
+   GDK_Hangul_RieulYeorinHieuh = $eef;
+   GDK_Hangul_SunkyeongeumMieum = $ef0;
+   GDK_Hangul_SunkyeongeumPieub = $ef1;
+   GDK_Hangul_PanSios = $ef2;
+   GDK_Hangul_KkogjiDalrinIeung = $ef3;
+   GDK_Hangul_SunkyeongeumPhieuf = $ef4;
+   GDK_Hangul_YeorinHieuh = $ef5;
+   GDK_Hangul_AraeA = $ef6;
+   GDK_Hangul_AraeAE = $ef7;
+   GDK_Hangul_J_PanSios = $ef8;
+   GDK_Hangul_J_KkogjiDalrinIeung = $ef9;
+   GDK_Hangul_J_YeorinHieuh = $efa;
+   GDK_Korean_Won = $eff;
+
+{$endif read_interface}
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.4  1999/05/11 00:37:48  peter
+    * win32 fixes
+
+  Revision 1.3  1999/05/07 10:40:18  peter
+    * first things for 1.2
+
+  Revision 1.2  1998/10/21 20:22:01  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 379 - 0
packages/gtk/gdk/gdkmain.pp

@@ -0,0 +1,379 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+type
+  PPGdkVisualType = ^PGdkVisualType;
+
+procedure gdk_init(argc:Pgint; argv:pPPgchar);cdecl;external gdkdll name 'gdk_init';
+function  gdk_init_check(argc:Pgint; argv:pPPgchar):gboolean;cdecl;external gdkdll name 'gdk_init_check';
+procedure gdk_exit(error_code:gint);cdecl;external gdkdll name 'gdk_exit';
+procedure gdk_error_trap_push;cdecl;external gdkdll name 'gdk_error_trap_push';
+function  gdk_error_trap_pop:gint;cdecl;external gdkdll name 'gdk_error_trap_pop';
+function  gdk_events_pending:gboolean;cdecl;external gdkdll name 'gdk_events_pending';
+function  gdk_event_get:PGdkEvent;cdecl;external gdkdll name 'gdk_event_get';
+function  gdk_event_peek:PGdkEvent;cdecl;external gdkdll name 'gdk_event_peek';
+function  gdk_event_get_graphics_expose(window:PGdkWindow):PGdkEvent;cdecl;external gdkdll name 'gdk_event_get_graphics_expose';
+procedure gdk_event_put(event:PGdkEvent);cdecl;external gdkdll name 'gdk_event_put';
+function  gdk_event_copy(event:PGdkEvent):PGdkEvent;cdecl;external gdkdll name 'gdk_event_copy';
+procedure gdk_event_free(event:PGdkEvent);cdecl;external gdkdll name 'gdk_event_free';
+function  gdk_event_get_time(event:PGdkEvent):guint32;cdecl;external gdkdll name 'gdk_event_get_time';
+procedure gdk_event_handler_set(func:TGdkEventFunc; data:gpointer; notify:TGDestroyNotify);cdecl;external gdkdll name 'gdk_event_handler_set';
+procedure gdk_set_show_events(show_events:gint);cdecl;external gdkdll name 'gdk_set_show_events';
+procedure gdk_set_use_xshm(use_xshm:gint);cdecl;external gdkdll name 'gdk_set_use_xshm';
+function  gdk_get_show_events:gint;cdecl;external gdkdll name 'gdk_get_show_events';
+function  gdk_get_use_xshm:gint;cdecl;external gdkdll name 'gdk_get_use_xshm';
+function  gdk_get_display:Pgchar;cdecl;external gdkdll name 'gdk_get_display';
+function  gdk_time_get:guint32;cdecl;external gdkdll name 'gdk_time_get';
+function  gdk_timer_get:guint32;cdecl;external gdkdll name 'gdk_timer_get';
+procedure gdk_timer_set(milliseconds:guint32);cdecl;external gdkdll name 'gdk_timer_set';
+procedure gdk_timer_enable;cdecl;external gdkdll name 'gdk_timer_enable';
+procedure gdk_timer_disable;cdecl;external gdkdll name 'gdk_timer_disable';
+function  gdk_input_add_full(source:gint; condition:TGdkInputCondition; thefunction:TGdkInputfunction; data:gpointer; thedestroy:TGdkDestroyNotify):gint;cdecl;external gdkdll name 'gdk_input_add_full';
+function  gdk_input_add(source:gint; condition:TGdkInputCondition; thefunction:TGdkInputfunction; data:gpointer):gint;cdecl;external gdkdll name 'gdk_input_add';
+procedure gdk_input_remove(tag:gint);cdecl;external gdkdll name 'gdk_input_remove';
+function  gdk_pointer_grab(window:PGdkWindow; owner_events:gint; event_mask:TGdkEventMask; confine_to:PGdkWindow; cursor:PGdkCursor; time:guint32):gint;cdecl;external gdkdll name 'gdk_pointer_grab';
+procedure gdk_pointer_ungrab(time:guint32);cdecl;external gdkdll name 'gdk_pointer_ungrab';
+function  gdk_keyboard_grab(window:PGdkWindow; owner_events:gint; time:guint32):gint;cdecl;external gdkdll name 'gdk_keyboard_grab';
+procedure gdk_keyboard_ungrab(time:guint32);cdecl;external gdkdll name 'gdk_keyboard_ungrab';
+function  gdk_pointer_is_grabbed:gint;cdecl;external gdkdll name 'gdk_pointer_is_grabbed';
+function  gdk_screen_width:gint;cdecl;external gdkdll name 'gdk_screen_width';
+function  gdk_screen_height:gint;cdecl;external gdkdll name 'gdk_screen_height';
+function  gdk_screen_width_mm:gint;cdecl;external gdkdll name 'gdk_screen_width_mm';
+function  gdk_screen_height_mm:gint;cdecl;external gdkdll name 'gdk_screen_height_mm';
+procedure gdk_flush;cdecl;external gdkdll name 'gdk_flush';
+procedure gdk_beep;cdecl;external gdkdll name 'gdk_beep';
+procedure gdk_key_repeat_disable;cdecl;external gdkdll name 'gdk_key_repeat_disable';
+procedure gdk_key_repeat_restore;cdecl;external gdkdll name 'gdk_key_repeat_restore';
+function  gdk_visual_get_best_depth:gint;cdecl;external gdkdll name 'gdk_visual_get_best_depth';
+function  gdk_visual_get_best_type:TGdkVisualType;cdecl;external gdkdll name 'gdk_visual_get_best_type';
+function  gdk_visual_get_system:PGdkVisual;cdecl;external gdkdll name 'gdk_visual_get_system';
+function  gdk_visual_get_best:PGdkVisual;cdecl;external gdkdll name 'gdk_visual_get_best';
+function  gdk_visual_get_best_with_depth(depth:gint):PGdkVisual;cdecl;external gdkdll name 'gdk_visual_get_best_with_depth';
+function  gdk_visual_get_best_with_type(visual_type:TGdkVisualType):PGdkVisual;cdecl;external gdkdll name 'gdk_visual_get_best_with_type';
+function  gdk_visual_get_best_with_both(depth:gint; visual_type:TGdkVisualType):PGdkVisual;cdecl;external gdkdll name 'gdk_visual_get_best_with_both';
+function  gdk_visual_ref(visual:PGdkVisual):PGdkVisual;cdecl;external gdkdll name 'gdk_visual_ref';
+procedure gdk_visual_unref(visual:PGdkVisual);cdecl;external gdkdll name 'gdk_visual_unref';
+procedure gdk_query_depths(depths:PPgint; count:Pgint);cdecl;external gdkdll name 'gdk_query_depths';
+procedure gdk_query_visual_types(visual_types:PPGdkVisualType; count:Pgint);cdecl;external gdkdll name 'gdk_query_visual_types';
+function  gdk_list_visuals:PGList;cdecl;external gdkdll name 'gdk_list_visuals';
+function  gdk_window_new(parent:PGdkWindow; attributes:PGdkWindowAttr; attributes_mask:gint):PGdkWindow;cdecl;external gdkdll name 'gdk_window_new';
+procedure gdk_window_destroy(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_destroy';
+function  gdk_window_ref(window:PGdkWindow):PGdkWindow;cdecl;external gdkdll name 'gdk_window_ref';
+procedure gdk_window_unref(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_unref';
+function  gdk_window_at_pointer(win_x:Pgint; win_y:Pgint):PGdkWindow;cdecl;external gdkdll name 'gdk_window_at_pointer';
+procedure gdk_window_show(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_show';
+procedure gdk_window_hide(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_hide';
+procedure gdk_window_withdraw(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_withdraw';
+procedure gdk_window_move(window:PGdkWindow; x:gint; y:gint);cdecl;external gdkdll name 'gdk_window_move';
+procedure gdk_window_resize(window:PGdkWindow; width:gint; height:gint);cdecl;external gdkdll name 'gdk_window_resize';
+procedure gdk_window_move_resize(window:PGdkWindow; x:gint; y:gint; width:gint; height:gint);cdecl;external gdkdll name 'gdk_window_move_resize';
+procedure gdk_window_reparent(window:PGdkWindow; new_parent:PGdkWindow; x:gint; y:gint);cdecl;external gdkdll name 'gdk_window_reparent';
+procedure gdk_window_clear(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_clear';
+procedure gdk_window_clear_area(window:PGdkWindow; x:gint; y:gint; width:gint; height:gint);cdecl;external gdkdll name 'gdk_window_clear_area';
+procedure gdk_window_clear_area_e(window:PGdkWindow; x:gint; y:gint; width:gint; height:gint);cdecl;external gdkdll name 'gdk_window_clear_area_e';
+procedure gdk_window_copy_area(window:PGdkWindow; gc:PGdkGC; x:gint; y:gint; source_window:PGdkWindow; source_x:gint; source_y:gint; width:gint; height:gint);cdecl;external gdkdll name 'gdk_window_copy_area';
+procedure gdk_window_raise(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_raise';
+procedure gdk_window_lower(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_lower';
+procedure gdk_window_set_user_data(window:PGdkWindow; user_data:gpointer);cdecl;external gdkdll name 'gdk_window_set_user_data';
+procedure gdk_window_set_override_redirect(window:PGdkWindow; override_redirect:gboolean);cdecl;external gdkdll name 'gdk_window_set_override_redirect';
+procedure gdk_window_add_filter(window:PGdkWindow; thefunction:TGdkFilterFunc; data:gpointer);cdecl;external gdkdll name 'gdk_window_add_filter';
+procedure gdk_window_remove_filter(window:PGdkWindow; thefunction:TGdkFilterFunc; data:gpointer);cdecl;external gdkdll name 'gdk_window_remove_filter';
+procedure gdk_window_shape_combine_mask(window:PGdkWindow; shape_mask:PGdkBitmap; offset_x:gint; offset_y:gint);cdecl;external gdkdll name 'gdk_window_shape_combine_mask';
+procedure gdk_window_set_child_shapes(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_set_child_shapes';
+procedure gdk_window_merge_child_shapes(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_merge_child_shapes';
+function  gdk_window_is_visible(window:PGdkWindow):gboolean;cdecl;external gdkdll name 'gdk_window_is_visible';
+function  gdk_window_is_viewable(window:PGdkWindow):gboolean;cdecl;external gdkdll name 'gdk_window_is_viewable';
+function  gdk_window_set_static_gravities(window:PGdkWindow; use_static:gboolean):gboolean;cdecl;external gdkdll name 'gdk_window_set_static_gravities';
+{$ifndef gtkwin}
+procedure gdk_add_client_message_filter(message_type:TGdkAtom; func:TGdkFilterFunc; data:gpointer);cdecl;external gdkdll name 'gdk_add_client_message_filter';
+{$endif}
+function  gdk_drag_context_new:PGdkDragContext;cdecl;external gdkdll name 'gdk_drag_context_new';
+procedure gdk_drag_context_ref(context:PGdkDragContext);cdecl;external gdkdll name 'gdk_drag_context_ref';
+procedure gdk_drag_context_unref(context:PGdkDragContext);cdecl;external gdkdll name 'gdk_drag_context_unref';
+procedure gdk_drag_status(context:PGdkDragContext; action:TGdkDragAction; time:guint32);cdecl;external gdkdll name 'gdk_drag_status';
+procedure gdk_drop_reply(context:PGdkDragContext; ok:gboolean; time:guint32);cdecl;external gdkdll name 'gdk_drop_reply';
+procedure gdk_drop_finish(context:PGdkDragContext; success:gboolean; time:guint32);cdecl;external gdkdll name 'gdk_drop_finish';
+function  gdk_drag_get_selection(context:PGdkDragContext):TGdkAtom;cdecl;external gdkdll name 'gdk_drag_get_selection';
+function  gdk_drag_begin(window:PGdkWindow; targets:PGList):PGdkDragContext;cdecl;external gdkdll name 'gdk_drag_begin';
+function  gdk_drag_get_protocol(xid:guint32; protocol:PGdkDragProtocol):guint32;cdecl;external gdkdll name 'gdk_drag_get_protocol';
+procedure gdk_drag_find_window(context:PGdkDragContext; drag_window:PGdkWindow; x_root:gint; y_root:gint; dest_window:PPGdkWindow;protocol:PGdkDragProtocol);cdecl;external gdkdll name 'gdk_drag_find_window';
+function  gdk_drag_motion(context:PGdkDragContext; dest_window:PGdkWindow; protocol:TGdkDragProtocol; x_root:gint; y_root:gint;suggested_action:TGdkDragAction; possible_actions:TGdkDragAction; time:guint32):gboolean;cdecl;external gdkdll name 'gdk_drag_motion';
+procedure gdk_drag_drop(context:PGdkDragContext; time:guint32);cdecl;external gdkdll name 'gdk_drag_drop';
+procedure gdk_drag_abort(context:PGdkDragContext; time:guint32);cdecl;external gdkdll name 'gdk_drag_abort';
+procedure gdk_window_set_hints(window:PGdkWindow; x:gint; y:gint; min_width:gint; min_height:gint; max_width:gint; max_height:gint; flags:gint);cdecl;external gdkdll name 'gdk_window_set_hints';
+procedure gdk_window_set_geometry_hints(window:PGdkWindow; geometry:PGdkGeometry; flags:TGdkWindowHints);cdecl;external gdkdll name 'gdk_window_set_geometry_hints';
+{$ifndef gtkwin}
+procedure gdk_set_sm_client_id(sm_client_id:Pgchar);cdecl;external gdkdll name 'gdk_set_sm_client_id';
+{$endif}
+procedure gdk_window_set_title(window:PGdkWindow; title:Pgchar);cdecl;external gdkdll name 'gdk_window_set_title';
+procedure gdk_window_set_role(window:PGdkWindow; role:Pgchar);cdecl;external gdkdll name 'gdk_window_set_role';
+procedure gdk_window_set_transient_for(window:PGdkWindow; leader:PGdkWindow);cdecl;external gdkdll name 'gdk_window_set_transient_for';
+procedure gdk_window_set_background(window:PGdkWindow; color:PGdkColor);cdecl;external gdkdll name 'gdk_window_set_background';
+procedure gdk_window_set_back_pixmap(window:PGdkWindow; pixmap:PGdkPixmap; parent_relative:gint);cdecl;external gdkdll name 'gdk_window_set_back_pixmap';
+procedure gdk_window_set_cursor(window:PGdkWindow; cursor:PGdkCursor);cdecl;external gdkdll name 'gdk_window_set_cursor';
+procedure gdk_window_set_colormap(window:PGdkWindow; colormap:PGdkColormap);cdecl;external gdkdll name 'gdk_window_set_colormap';
+procedure gdk_window_get_user_data(window:PGdkWindow; data:Pgpointer);cdecl;external gdkdll name 'gdk_window_get_user_data';
+procedure gdk_window_get_geometry(window:PGdkWindow; x:Pgint; y:Pgint; width:Pgint; height:Pgint; depth:Pgint);cdecl;external gdkdll name 'gdk_window_get_geometry';
+procedure gdk_window_get_position(window:PGdkWindow; x:Pgint; y:Pgint);cdecl;external gdkdll name 'gdk_window_get_position';
+procedure gdk_window_get_size(window:PGdkWindow; width:Pgint; height:Pgint);cdecl;external gdkdll name 'gdk_window_get_size';
+function  gdk_window_get_visual(window:PGdkWindow):PGdkVisual;cdecl;external gdkdll name 'gdk_window_get_visual';
+function  gdk_window_get_colormap(window:PGdkWindow):PGdkColormap;cdecl;external gdkdll name 'gdk_window_get_colormap';
+function  gdk_window_get_type(window:PGdkWindow):TGdkWindowType;cdecl;external gdkdll name 'gdk_window_get_type';
+function  gdk_window_get_origin(window:PGdkWindow; x:Pgint; y:Pgint):gint;cdecl;external gdkdll name 'gdk_window_get_origin';
+function  gdk_window_get_deskrelative_origin(window:PGdkWindow; x:Pgint; y:Pgint):gboolean;cdecl;external gdkdll name 'gdk_window_get_deskrelative_origin';
+procedure gdk_window_get_root_origin(window:PGdkWindow; x:Pgint; y:Pgint);cdecl;external gdkdll name 'gdk_window_get_root_origin';
+function  gdk_window_get_pointer(window:PGdkWindow; x:Pgint; y:Pgint; mask:PGdkModifierType):PGdkWindow;cdecl;external gdkdll name 'gdk_window_get_pointer';
+function  gdk_window_get_parent(window:PGdkWindow):PGdkWindow;cdecl;external gdkdll name 'gdk_window_get_parent';
+function  gdk_window_get_toplevel(window:PGdkWindow):PGdkWindow;cdecl;external gdkdll name 'gdk_window_get_toplevel';
+function  gdk_window_get_children(window:PGdkWindow):PGList;cdecl;external gdkdll name 'gdk_window_get_children';
+function  gdk_window_get_events(window:PGdkWindow):TGdkEventMask;cdecl;external gdkdll name 'gdk_window_get_events';
+procedure gdk_window_set_events(window:PGdkWindow; event_mask:TGdkEventMask);cdecl;external gdkdll name 'gdk_window_set_events';
+procedure gdk_window_set_icon(window:PGdkWindow; icon_window:PGdkWindow; pixmap:PGdkPixmap; mask:PGdkBitmap);cdecl;external gdkdll name 'gdk_window_set_icon';
+procedure gdk_window_set_icon_name(window:PGdkWindow; name:Pgchar);cdecl;external gdkdll name 'gdk_window_set_icon_name';
+procedure gdk_window_set_group(window:PGdkWindow; leader:PGdkWindow);cdecl;external gdkdll name 'gdk_window_set_group';
+procedure gdk_window_set_decorations(window:PGdkWindow; decorations:TGdkWMDecoration);cdecl;external gdkdll name 'gdk_window_set_decorations';
+procedure gdk_window_set_functions(window:PGdkWindow; functions:TGdkWMfunction);cdecl;external gdkdll name 'gdk_window_set_functions';
+function  gdk_window_get_toplevels:PGList;cdecl;external gdkdll name 'gdk_window_get_toplevels';
+procedure gdk_window_register_dnd(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_register_dnd';
+procedure gdk_drawable_set_data(drawable:PGdkDrawable; key:Pgchar; data:gpointer; destroy_func:TGDestroyNotify);cdecl;external gdkdll name 'gdk_drawable_set_data';
+function  gdk_cursor_new(cursor_type:TGdkCursorType):PGdkCursor;cdecl;external gdkdll name 'gdk_cursor_new';
+function  gdk_cursor_new_from_pixmap(source:PGdkPixmap; mask:PGdkPixmap; fg:PGdkColor; bg:PGdkColor; x:gint; y:gint):PGdkCursor;cdecl;external gdkdll name 'gdk_cursor_new_from_pixmap';
+procedure gdk_cursor_destroy(cursor:PGdkCursor);cdecl;external gdkdll name 'gdk_cursor_destroy';
+function  gdk_gc_new(window:PGdkWindow):PGdkGC;cdecl;external gdkdll name 'gdk_gc_new';
+function  gdk_gc_new_with_values(window:PGdkWindow; values:PGdkGCValues; values_mask:TGdkGCValuesMask):PGdkGC;cdecl;external gdkdll name 'gdk_gc_new_with_values';
+function  gdk_gc_ref(gc:PGdkGC):PGdkGC;cdecl;external gdkdll name 'gdk_gc_ref';
+procedure gdk_gc_unref(gc:PGdkGC);cdecl;external gdkdll name 'gdk_gc_unref';
+procedure gdk_gc_destroy(gc:PGdkGC);cdecl;external gdkdll name 'gdk_gc_destroy';
+procedure gdk_gc_get_values(gc:PGdkGC; values:PGdkGCValues);cdecl;external gdkdll name 'gdk_gc_get_values';
+procedure gdk_gc_set_foreground(gc:PGdkGC; color:PGdkColor);cdecl;external gdkdll name 'gdk_gc_set_foreground';
+procedure gdk_gc_set_background(gc:PGdkGC; color:PGdkColor);cdecl;external gdkdll name 'gdk_gc_set_background';
+procedure gdk_gc_set_font(gc:PGdkGC; font:PGdkFont);cdecl;external gdkdll name 'gdk_gc_set_font';
+procedure gdk_gc_set_function(gc:PGdkGC; thefunction:TGdkfunction);cdecl;external gdkdll name 'gdk_gc_set_function';
+procedure gdk_gc_set_fill(gc:PGdkGC; fill:TGdkFill);cdecl;external gdkdll name 'gdk_gc_set_fill';
+procedure gdk_gc_set_tile(gc:PGdkGC; tile:PGdkPixmap);cdecl;external gdkdll name 'gdk_gc_set_tile';
+procedure gdk_gc_set_stipple(gc:PGdkGC; stipple:PGdkPixmap);cdecl;external gdkdll name 'gdk_gc_set_stipple';
+procedure gdk_gc_set_ts_origin(gc:PGdkGC; x:gint; y:gint);cdecl;external gdkdll name 'gdk_gc_set_ts_origin';
+procedure gdk_gc_set_clip_origin(gc:PGdkGC; x:gint; y:gint);cdecl;external gdkdll name 'gdk_gc_set_clip_origin';
+procedure gdk_gc_set_clip_mask(gc:PGdkGC; mask:PGdkBitmap);cdecl;external gdkdll name 'gdk_gc_set_clip_mask';
+procedure gdk_gc_set_clip_rectangle(gc:PGdkGC; rectangle:PGdkRectangle);cdecl;external gdkdll name 'gdk_gc_set_clip_rectangle';
+procedure gdk_gc_set_clip_region(gc:PGdkGC; region:PGdkRegion);cdecl;external gdkdll name 'gdk_gc_set_clip_region';
+procedure gdk_gc_set_subwindow(gc:PGdkGC; mode:TGdkSubwindowMode);cdecl;external gdkdll name 'gdk_gc_set_subwindow';
+procedure gdk_gc_set_exposures(gc:PGdkGC; exposures:gint);cdecl;external gdkdll name 'gdk_gc_set_exposures';
+procedure gdk_gc_set_line_attributes(gc:PGdkGC; line_width:gint; line_style:TGdkLineStyle; cap_style:TGdkCapStyle; join_style:TGdkJoinStyle);cdecl;external gdkdll name 'gdk_gc_set_line_attributes';
+procedure gdk_gc_set_dashes(gc:PGdkGC;dash_offset:gint;dashlist:gchar;n:gint);cdecl;external gdkdll name 'gdk_gc_set_dashes';
+procedure gdk_gc_copy(dst_gc:PGdkGC; src_gc:PGdkGC);cdecl;external gdkdll name 'gdk_gc_copy';
+function  gdk_pixmap_new(window:PGdkWindow; width:gint; height:gint; depth:gint):PGdkPixmap;cdecl;external gdkdll name 'gdk_pixmap_new';
+function  gdk_bitmap_create_from_data(window:PGdkWindow; data:Pgchar; width:gint; height:gint):PGdkBitmap;cdecl;external gdkdll name 'gdk_bitmap_create_from_data';
+function  gdk_pixmap_create_from_data(window:PGdkWindow; data:Pgchar; width:gint; height:gint; depth:gint; fg:PGdkColor; bg:PGdkColor):PGdkPixmap;cdecl;external gdkdll name 'gdk_pixmap_create_from_data';
+function  gdk_pixmap_create_from_xpm(window:PGdkWindow; mask:PPGdkBitmap; transparent_color:PGdkColor; filename:Pgchar):PGdkPixmap;cdecl;external gdkdll name 'gdk_pixmap_create_from_xpm';
+function  gdk_pixmap_colormap_create_from_xpm(window:PGdkWindow; colormap:PGdkColormap; mask:PPGdkBitmap; transparent_color:PGdkColor; filename:Pgchar):PGdkPixmap;cdecl;external gdkdll name 'gdk_pixmap_colormap_create_from_xpm';
+function  gdk_pixmap_create_from_xpm_d(window:PGdkWindow; mask:PPGdkBitmap; transparent_color:PGdkColor; data:PPgchar):PGdkPixmap;cdecl;external gdkdll name 'gdk_pixmap_create_from_xpm_d';
+function  gdk_pixmap_colormap_create_from_xpm_d(window:PGdkWindow; colormap:PGdkColormap; mask:PPGdkBitmap; transparent_color:PGdkColor; data:PPgchar):PGdkPixmap;cdecl;external gdkdll name 'gdk_pixmap_colormap_create_from_xpm_d';
+function  gdk_pixmap_ref(pixmap:PGdkPixmap):PGdkPixmap;cdecl;external gdkdll name 'gdk_pixmap_ref';
+procedure gdk_pixmap_unref(pixmap:PGdkPixmap);cdecl;external gdkdll name 'gdk_pixmap_unref';
+function  gdk_bitmap_ref(pixmap:PGdkBitmap):PGdkBitmap;cdecl;external gdkdll name 'gdk_bitmap_ref';
+procedure gdk_bitmap_unref(pixmap:PGdkBitmap);cdecl;external gdkdll name 'gdk_bitmap_unref';
+function  gdk_image_new_bitmap(visual:PGdkVisual; data:gpointer; width:gint; height:gint):PGdkImage;cdecl;external gdkdll name 'gdk_image_new_bitmap';
+function  gdk_image_new(thetype:TGdkImageType; visual:PGdkVisual; width:gint; height:gint):PGdkImage;cdecl;external gdkdll name 'gdk_image_new';
+function  gdk_image_get(window:PGdkWindow; x:gint; y:gint; width:gint; height:gint):PGdkImage;cdecl;external gdkdll name 'gdk_image_get';
+procedure gdk_image_put_pixel(image:PGdkImage; x:gint; y:gint; pixel:guint32);cdecl;external gdkdll name 'gdk_image_put_pixel';
+function  gdk_image_get_pixel(image:PGdkImage; x:gint; y:gint):guint32;cdecl;external gdkdll name 'gdk_image_get_pixel';
+procedure gdk_image_destroy(image:PGdkImage);cdecl;external gdkdll name 'gdk_image_destroy';
+function  gdk_colormap_new(visual:PGdkVisual; allocate:gint):PGdkColormap;cdecl;external gdkdll name 'gdk_colormap_new';
+function  gdk_colormap_ref(cmap:PGdkColormap):PGdkColormap;cdecl;external gdkdll name 'gdk_colormap_ref';
+procedure gdk_colormap_unref(cmap:PGdkColormap);cdecl;external gdkdll name 'gdk_colormap_unref';
+function  gdk_colormap_get_system:PGdkColormap;cdecl;external gdkdll name 'gdk_colormap_get_system';
+function  gdk_colormap_get_system_size:gint;cdecl;external gdkdll name 'gdk_colormap_get_system_size';
+procedure gdk_colormap_change(colormap:PGdkColormap; ncolors:gint);cdecl;external gdkdll name 'gdk_colormap_change';
+function  gdk_colormap_alloc_colors(colormap:PGdkColormap; colors:PGdkColor; ncolors:gint; writeable:gboolean; best_match:gboolean; success:Pgboolean):gint;cdecl;external gdkdll name 'gdk_colormap_alloc_colors';
+function  gdk_colormap_alloc_color(colormap:PGdkColormap; color:PGdkColor; writeable:gboolean; best_match:gboolean):gboolean;cdecl;external gdkdll name 'gdk_colormap_alloc_color';
+procedure gdk_colormap_free_colors(colormap:PGdkColormap; colors:PGdkColor; ncolors:gint);cdecl;external gdkdll name 'gdk_colormap_free_colors';
+function  gdk_colormap_get_visual(colormap:PGdkColormap):PGdkVisual;cdecl;external gdkdll name 'gdk_colormap_get_visual';
+function  gdk_color_copy(color:PGdkColor):PGdkColor;cdecl;external gdkdll name 'gdk_color_copy';
+procedure gdk_color_free(color:PGdkColor);cdecl;external gdkdll name 'gdk_color_free';
+function  gdk_color_parse(spec:Pgchar; color:PGdkColor):gint;cdecl;external gdkdll name 'gdk_color_parse';
+function  gdk_color_hash(colora:PGdkColor; colorb:PGdkColor):guint;cdecl;external gdkdll name 'gdk_color_hash';
+function  gdk_color_equal(colora:PGdkColor; colorb:PGdkColor):gint;cdecl;external gdkdll name 'gdk_color_equal';
+procedure gdk_colors_store(colormap:PGdkColormap; colors:PGdkColor; ncolors:gint);cdecl;external gdkdll name 'gdk_colors_store';
+function  gdk_colors_alloc(colormap:PGdkColormap; contiguous:gint; planes:Pgulong; nplanes:gint; pixels:Pgulong; npixels:gint):gint;cdecl;external gdkdll name 'gdk_colors_alloc';
+procedure gdk_colors_free(colormap:PGdkColormap; pixels:Pgulong; npixels:gint; planes:gulong);cdecl;external gdkdll name 'gdk_colors_free';
+function  gdk_color_white(colormap:PGdkColormap; color:PGdkColor):gint;cdecl;external gdkdll name 'gdk_color_white';
+function  gdk_color_black(colormap:PGdkColormap; color:PGdkColor):gint;cdecl;external gdkdll name 'gdk_color_black';
+function  gdk_color_alloc(colormap:PGdkColormap; color:PGdkColor):gint;cdecl;external gdkdll name 'gdk_color_alloc';
+function  gdk_color_change(colormap:PGdkColormap; color:PGdkColor):gint;cdecl;external gdkdll name 'gdk_color_change';
+function  gdk_font_load(font_name:Pgchar):PGdkFont;cdecl;external gdkdll name 'gdk_font_load';
+function  gdk_fontset_load(fontset_name:Pgchar):PGdkFont;cdecl;external gdkdll name 'gdk_fontset_load';
+function  gdk_font_ref(font:PGdkFont):PGdkFont;cdecl;external gdkdll name 'gdk_font_ref';
+procedure gdk_font_unref(font:PGdkFont);cdecl;external gdkdll name 'gdk_font_unref';
+function  gdk_font_id(font:PGdkFont):gint;cdecl;external gdkdll name 'gdk_font_id';
+function  gdk_font_equal(fonta:PGdkFont; fontb:PGdkFont):gint;cdecl;external gdkdll name 'gdk_font_equal';
+function  gdk_string_width(font:PGdkFont; thestring:Pgchar):gint;cdecl;external gdkdll name 'gdk_string_width';
+function  gdk_text_width(font:PGdkFont; text:Pgchar; text_length:gint):gint;cdecl;external gdkdll name 'gdk_text_width';
+function  gdk_text_width_wc(font:PGdkFont; text:PGdkWChar; text_length:gint):gint;cdecl;external gdkdll name 'gdk_text_width_wc';
+function  gdk_char_width(font:PGdkFont; character:gchar):gint;cdecl;external gdkdll name 'gdk_char_width';
+function  gdk_char_width_wc(font:PGdkFont; character:TGdkWChar):gint;cdecl;external gdkdll name 'gdk_char_width_wc';
+function  gdk_string_measure(font:PGdkFont; thestring:Pgchar):gint;cdecl;external gdkdll name 'gdk_string_measure';
+function  gdk_text_measure(font:PGdkFont; text:Pgchar; text_length:gint):gint;cdecl;external gdkdll name 'gdk_text_measure';
+function  gdk_char_measure(font:PGdkFont; character:gchar):gint;cdecl;external gdkdll name 'gdk_char_measure';
+function  gdk_string_height(font:PGdkFont; thestring:Pgchar):gint;cdecl;external gdkdll name 'gdk_string_height';
+function  gdk_text_height(font:PGdkFont; text:Pgchar; text_length:gint):gint;cdecl;external gdkdll name 'gdk_text_height';
+function  gdk_char_height(font:PGdkFont; character:gchar):gint;cdecl;external gdkdll name 'gdk_char_height';
+procedure gdk_text_extents(font:PGdkFont; text:Pgchar; text_length:gint; lbearing:Pgint; rbearing:Pgint; width:Pgint; ascent:Pgint; descent:Pgint);cdecl;external gdkdll name 'gdk_text_extents';
+procedure gdk_text_extents_wc(font:PGdkFont; text:PGdkWChar; text_length:gint; lbearing:Pgint; rbearing:Pgint; width:Pgint; ascent:Pgint; descent:Pgint);cdecl;external gdkdll name 'gdk_text_extents_wc';
+procedure gdk_string_extents(font:PGdkFont; thestring:Pgchar; lbearing:Pgint; rbearing:Pgint; width:Pgint; ascent:Pgint; descent:Pgint);cdecl;external gdkdll name 'gdk_string_extents';
+procedure gdk_draw_point(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint);cdecl;external gdkdll name 'gdk_draw_point';
+procedure gdk_draw_line(drawable:PGdkDrawable; gc:PGdkGC; x1:gint; y1:gint; x2:gint; y2:gint);cdecl;external gdkdll name 'gdk_draw_line';
+procedure gdk_draw_rectangle(drawable:PGdkDrawable; gc:PGdkGC; filled:gint; x:gint; y:gint; width:gint; height:gint);cdecl;external gdkdll name 'gdk_draw_rectangle';
+procedure gdk_draw_arc(drawable:PGdkDrawable; gc:PGdkGC; filled:gint; x:gint; y:gint; width:gint; height:gint; angle1:gint; angle2:gint);cdecl;external gdkdll name 'gdk_draw_arc';
+procedure gdk_draw_polygon(drawable:PGdkDrawable; gc:PGdkGC; filled:gint; points:PGdkPoint; npoints:gint);cdecl;external gdkdll name 'gdk_draw_polygon';
+procedure gdk_draw_string(drawable:PGdkDrawable; font:PGdkFont; gc:PGdkGC; x:gint; y:gint; thestring:Pgchar);cdecl;external gdkdll name 'gdk_draw_string';
+procedure gdk_draw_text(drawable:PGdkDrawable; font:PGdkFont; gc:PGdkGC; x:gint; y:gint; text:Pgchar; text_length:gint);cdecl;external gdkdll name 'gdk_draw_text';
+procedure gdk_draw_text_wc(drawable:PGdkDrawable; font:PGdkFont; gc:PGdkGC; x:gint; y:gint; text:PGdkWChar; text_length:gint);cdecl;external gdkdll name 'gdk_draw_text_wc';
+procedure gdk_draw_pixmap(drawable:PGdkDrawable; gc:PGdkGC; src:PGdkDrawable; xsrc:gint; ysrc:gint; xdest:gint; ydest:gint; width:gint; height:gint);cdecl;external gdkdll name 'gdk_draw_pixmap';
+{$ifndef gtkwin}
+procedure gdk_draw_bitmap(drawable:PGdkDrawable; gc:PGdkGC; src:PGdkDrawable; xsrc:gint; ysrc:gint; xdest:gint; ydest:gint; width:gint; height:gint);cdecl;external gdkdll name 'gdk_draw_bitmap';
+{$endif}
+procedure gdk_draw_image(drawable:PGdkDrawable; gc:PGdkGC; image:PGdkImage; xsrc:gint; ysrc:gint; xdest:gint; ydest:gint; width:gint; height:gint);cdecl;external gdkdll name 'gdk_draw_image';
+procedure gdk_draw_points(drawable:PGdkDrawable; gc:PGdkGC; points:PGdkPoint; npoints:gint);cdecl;external gdkdll name 'gdk_draw_points';
+procedure gdk_draw_segments(drawable:PGdkDrawable; gc:PGdkGC; segs:PGdkSegment; nsegs:gint);cdecl;external gdkdll name 'gdk_draw_segments';
+procedure gdk_draw_lines(drawable:PGdkDrawable; gc:PGdkGC; points:PGdkPoint; npoints:gint);cdecl;external gdkdll name 'gdk_draw_lines';
+function  gdk_selection_owner_set(owner:PGdkWindow; selection:TGdkAtom; time:guint32; send_event:gint):gint;cdecl;external gdkdll name 'gdk_selection_owner_set';
+function  gdk_selection_owner_get(selection:TGdkAtom):PGdkWindow;cdecl;external gdkdll name 'gdk_selection_owner_get';
+procedure gdk_selection_convert(requestor:PGdkWindow; selection:TGdkAtom; target:TGdkAtom; time:guint32);cdecl;external gdkdll name 'gdk_selection_convert';
+function  gdk_selection_property_get(requestor:PGdkWindow; data:PPguchar; prop_type:PTGdkAtom; prop_format:Pgint):gint;cdecl;external gdkdll name 'gdk_selection_property_get';
+procedure gdk_selection_send_notify(requestor:guint32; selection:TGdkAtom; target:TGdkAtom; theproperty:TGdkAtom; time:guint32);cdecl;external gdkdll name 'gdk_selection_send_notify';
+function  gdk_text_property_to_text_list(encoding:TGdkAtom; format:gint; text:Pguchar; length:gint; list:PPPgchar):gint;cdecl;external gdkdll name 'gdk_text_property_to_text_list';
+procedure gdk_free_text_list(list:PPgchar);cdecl;external gdkdll name 'gdk_free_text_list';
+function  gdk_string_to_compound_text(str:Pgchar; encoding:PTGdkAtom; format:Pgint; ctext:PPguchar; length:Pgint):gint;cdecl;external gdkdll name 'gdk_string_to_compound_text';
+procedure gdk_free_compound_text(ctext:Pguchar);cdecl;external gdkdll name 'gdk_free_compound_text';
+function  gdk_atom_intern(atom_name:Pgchar; only_if_exists:gint):TGdkAtom;cdecl;external gdkdll name 'gdk_atom_intern';
+function  gdk_atom_name(atom:TGdkAtom):Pgchar;cdecl;external gdkdll name 'gdk_atom_name';
+function  gdk_property_get(window:PGdkWindow; theproperty:TGdkAtom; thetype:TGdkAtom; offset:gulong; length:gulong; pdelete:gint; actual_property_type:PTGdkAtom; actual_format:Pgint; actual_length:Pgint; data:PPguchar):gint;cdecl;external gdkdll name 'gdk_property_get';
+procedure gdk_property_change(window:PGdkWindow; theproperty:TGdkAtom; thetype:TGdkAtom; format:gint; mode:TGdkPropMode; data:Pguchar; nelements:gint);cdecl;external gdkdll name 'gdk_property_change';
+procedure gdk_property_delete(window:PGdkWindow; theproperty:TGdkAtom);cdecl;external gdkdll name 'gdk_property_delete';
+function  gdk_rectangle_intersect(src1:PGdkRectangle; src2:PGdkRectangle; dest:PGdkRectangle):gint;cdecl;external gdkdll name 'gdk_rectangle_intersect';
+procedure gdk_rectangle_union(src1:PGdkRectangle; src2:PGdkRectangle; dest:PGdkRectangle);cdecl;external gdkdll name 'gdk_rectangle_union';
+procedure gdk_input_init;cdecl;external gdkdll name 'gdk_input_init';
+procedure gdk_input_exit;cdecl;external gdkdll name 'gdk_input_exit';
+function  gdk_input_list_devices:PGList;cdecl;external gdkdll name 'gdk_input_list_devices';
+procedure gdk_input_set_extension_events(window:PGdkWindow; mask:gint; mode:TGdkExtensionMode);cdecl;external gdkdll name 'gdk_input_set_extension_events';
+procedure gdk_input_set_source(deviceid:guint32; source:TGdkInputSource);cdecl;external gdkdll name 'gdk_input_set_source';
+function  gdk_input_set_mode(deviceid:guint32; mode:TGdkInputMode):gint;cdecl;external gdkdll name 'gdk_input_set_mode';
+procedure gdk_input_set_axes(deviceid:guint32; axes:PGdkAxisUse);cdecl;external gdkdll name 'gdk_input_set_axes';
+procedure gdk_input_set_key(deviceid:guint32; index:guint; keyval:guint; modifiers:TGdkModifierType);cdecl;external gdkdll name 'gdk_input_set_key';
+procedure gdk_input_window_get_pointer(window:PGdkWindow; deviceid:guint32; x:Pgdouble; y:Pgdouble; pressure:Pgdouble; xtilt:Pgdouble; ytilt:Pgdouble; mask:PGdkModifierType);cdecl;external gdkdll name 'gdk_input_window_get_pointer';
+function  gdk_input_motion_events(window:PGdkWindow; deviceid:guint32; start:guint32; stop:guint32; nevents_return:Pgint):PGdkTimeCoord;cdecl;external gdkdll name 'gdk_input_motion_events';
+function  gdk_im_ready:gint;cdecl;external gdkdll name 'gdk_im_ready';
+procedure gdk_im_begin(ic:TGdkIC; window:PGdkWindow);cdecl;external gdkdll name 'gdk_im_begin';
+procedure gdk_im_end;cdecl;external gdkdll name 'gdk_im_end';
+function  gdk_im_decide_style(supported_style:TGdkIMStyle):TGdkIMStyle;cdecl;external gdkdll name 'gdk_im_decide_style';
+function  gdk_im_set_best_style(best_allowed_style:TGdkIMStyle):TGdkIMStyle;cdecl;external gdkdll name 'gdk_im_set_best_style';
+function  gdk_ic_new(attr:TGdkICAttr; mask:TGdkICAttributesType):TGdkIC;cdecl;external gdkdll name 'gdk_ic_new';
+procedure gdk_ic_destroy(ic:TGdkIC);cdecl;external gdkdll name 'gdk_ic_destroy';
+function  gdk_ic_get_style(ic:TGdkIC):TGdkIMStyle;cdecl;external gdkdll name 'gdk_ic_get_style';
+function  gdk_ic_get_events(ic:TGdkIC):TGdkEventMask;cdecl;external gdkdll name 'gdk_ic_get_events';
+{$ifndef gtkwin}
+function  gdk_ic_attr_new:TGdkICAttr;cdecl;external gdkdll name 'gdk_ic_attr_new';
+procedure gdk_ic_attr_destroy(attr:TGdkICAttr);cdecl;external gdkdll name 'gdk_ic_attr_destroy';
+{$endif}
+function  gdk_ic_set_attr(ic:TGdkIC; attr:TGdkICAttr; mask:TGdkICAttributesType):TGdkICAttributesType;cdecl;external gdkdll name 'gdk_ic_set_attr';
+function  gdk_ic_get_attr(ic:TGdkIC; attr:TGdkICAttr; mask:TGdkICAttributesType):TGdkICAttributesType;cdecl;external gdkdll name 'gdk_ic_get_attr';
+function  gdk_wcstombs(src:PGdkWChar):Pgchar;cdecl;external gdkdll name 'gdk_wcstombs';
+function  gdk_mbstowcs(dest:PGdkWChar; src:Pgchar; dest_max:gint):gint;cdecl;external gdkdll name 'gdk_mbstowcs';
+function  gdk_color_context_new(visual:PGdkVisual; colormap:PGdkColormap):PGdkColorContext;cdecl;external gdkdll name 'gdk_color_context_new';
+function  gdk_color_context_new_mono(visual:PGdkVisual; colormap:PGdkColormap):PGdkColorContext;cdecl;external gdkdll name 'gdk_color_context_new_mono';
+procedure gdk_color_context_free(cc:PGdkColorContext);cdecl;external gdkdll name 'gdk_color_context_free';
+function  gdk_color_context_get_pixel(cc:PGdkColorContext; red:gushort; green:gushort; blue:gushort; failed:Pgint):gulong;cdecl;external gdkdll name 'gdk_color_context_get_pixel';
+procedure gdk_color_context_get_pixels(cc:PGdkColorContext; reds:Pgushort; greens:Pgushort; blues:Pgushort; ncolors:gint; colors:Pgulong; nallocated:Pgint);cdecl;external gdkdll name 'gdk_color_context_get_pixels';
+procedure gdk_color_context_get_pixels_incremental(cc:PGdkColorContext; reds:Pgushort; greens:Pgushort; blues:Pgushort; ncolors:gint; used:Pgint; colors:Pgulong; nallocated:Pgint);cdecl;external gdkdll name 'gdk_color_context_get_pixels_incremental';
+function  gdk_color_context_query_color(cc:PGdkColorContext; color:PGdkColor):gint;cdecl;external gdkdll name 'gdk_color_context_query_color';
+function  gdk_color_context_query_colors(cc:PGdkColorContext; colors:PGdkColor; num_colors:gint):gint;cdecl;external gdkdll name 'gdk_color_context_query_colors';
+function  gdk_color_context_add_palette(cc:PGdkColorContext; palette:PGdkColor; num_palette:gint):gint;cdecl;external gdkdll name 'gdk_color_context_add_palette';
+procedure gdk_color_context_init_dither(cc:PGdkColorContext);cdecl;external gdkdll name 'gdk_color_context_init_dither';
+procedure gdk_color_context_free_dither(cc:PGdkColorContext);cdecl;external gdkdll name 'gdk_color_context_free_dither';
+function  gdk_color_context_get_pixel_from_palette(cc:PGdkColorContext; red:Pgushort; green:Pgushort; blue:Pgushort; failed:Pgint):gulong;cdecl;external gdkdll name 'gdk_color_context_get_pixel_from_palette';
+function  gdk_color_context_get_index_from_palette(cc:PGdkColorContext; red:Pgint; green:Pgint; blue:Pgint; failed:Pgint):guchar;cdecl;external gdkdll name 'gdk_color_context_get_index_from_palette';
+function  gdk_region_new:PGdkRegion;cdecl;external gdkdll name 'gdk_region_new';
+procedure gdk_region_destroy(region:PGdkRegion);cdecl;external gdkdll name 'gdk_region_destroy';
+procedure gdk_region_get_clipbox(region:PGdkRegion; rectangle:PGdkRectangle);cdecl;external gdkdll name 'gdk_region_get_clipbox';
+function  gdk_region_empty(region:PGdkRegion):gboolean;cdecl;external gdkdll name 'gdk_region_empty';
+function  gdk_region_equal(region1:PGdkRegion; region2:PGdkRegion):gboolean;cdecl;external gdkdll name 'gdk_region_equal';
+function  gdk_region_point_in(region:PGdkRegion; x:longint; y:longint):gboolean;cdecl;external gdkdll name 'gdk_region_point_in';
+function  gdk_region_rect_in(region:PGdkRegion; rect:PGdkRectangle):TGdkOverlapType;cdecl;external gdkdll name 'gdk_region_rect_in';
+function  gdk_region_polygon(points:PGdkPoint; npoints:gint; fill_rule:TGdkFillRule):PGdkRegion;cdecl;external gdkdll name 'gdk_region_polygon';
+procedure gdk_region_offset(region:PGdkRegion; dx:gint; dy:gint);cdecl;external gdkdll name 'gdk_region_offset';
+procedure gdk_region_shrink(region:PGdkRegion; dx:gint; dy:gint);cdecl;external gdkdll name 'gdk_region_shrink';
+function  gdk_region_union_with_rect(region:PGdkRegion; rect:PGdkRectangle):PGdkRegion;cdecl;external gdkdll name 'gdk_region_union_with_rect';
+function  gdk_regions_intersect(source1:PGdkRegion; source2:PGdkRegion):PGdkRegion;cdecl;external gdkdll name 'gdk_regions_intersect';
+function  gdk_regions_union(source1:PGdkRegion; source2:PGdkRegion):PGdkRegion;cdecl;external gdkdll name 'gdk_regions_union';
+function  gdk_regions_subtract(source1:PGdkRegion; source2:PGdkRegion):PGdkRegion;cdecl;external gdkdll name 'gdk_regions_subtract';
+function  gdk_regions_xor(source1:PGdkRegion; source2:PGdkRegion):PGdkRegion;cdecl;external gdkdll name 'gdk_regions_xor';
+procedure gdk_event_send_clientmessage_toall(event:PGdkEvent);cdecl;external gdkdll name 'gdk_event_send_clientmessage_toall';
+function  gdk_event_send_client_message(event:PGdkEvent; xid:guint32):gboolean;cdecl;external gdkdll name 'gdk_event_send_client_message';
+function  gdk_keyval_name(keyval:guint):Pgchar;cdecl;external gdkdll name 'gdk_keyval_name';
+function  gdk_keyval_from_name(keyval_name:Pgchar):guint;cdecl;external gdkdll name 'gdk_keyval_from_name';
+function  gdk_keyval_to_upper(keyval:guint):guint;cdecl;external gdkdll name 'gdk_keyval_to_upper';
+function  gdk_keyval_to_lower(keyval:guint):guint;cdecl;external gdkdll name 'gdk_keyval_to_lower';
+function  gdk_keyval_is_upper(keyval:guint):gboolean;cdecl;external gdkdll name 'gdk_keyval_is_upper';
+function  gdk_keyval_is_lower(keyval:guint):gboolean;cdecl;external gdkdll name 'gdk_keyval_is_lower';
+var
+  gdk_threads_mutex : PGMutex;external gdkdll name 'gdk_threads_mutex';
+procedure gdk_threads_enter;cdecl;external gdkdll name 'gdk_threads_enter';
+procedure gdk_threads_leave;cdecl;external gdkdll name 'gdk_threads_leave';
+
+{$endif read_interface}
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+{$endif read_implementation}
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 14:35:23  peter
+    * removed glibdll constant
+
+  Revision 1.9  1999/10/06 17:42:47  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/05/11 00:37:49  peter
+    * win32 fixes
+
+  Revision 1.7  1999/05/10 15:18:42  peter
+    * cdecl fixes
+
+  Revision 1.6  1999/05/10 09:02:36  peter
+    * gtk 1.2 port working
+
+  Revision 1.5  1999/05/07 15:09:39  peter
+    * more fixes
+
+  Revision 1.4  1999/05/07 10:40:19  peter
+    * first things for 1.2
+
+  Revision 1.3  1998/11/12 11:35:48  peter
+    + array of const
+
+  Revision 1.2  1998/10/22 11:37:35  peter
+    * fixes for win32
+
+  Revision 1.1  1998/10/21 20:22:02  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 350 - 0
packages/gtk/gdk/gdkprivate.pp

@@ -0,0 +1,350 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PDisplay = pointer;
+     PXImage = pointer;
+     PVisual = pointer;
+     TWindow = longint;
+     TCursor = longint;
+     TAtom = longint;
+     TGC = longint;
+     TColorMap = longint;
+     TXStandardColorMap = array [0..9] of longint;
+     TVisualID = longint;
+     PXEvent = pointer;
+     TRegion = pointer;
+     TXID = longint;
+     Time_T = longint;
+
+     PGdkWindowPrivate = ^TGdkWindowPrivate;
+     TGdkWindowPrivate = record
+          window : TGdkWindow;
+          parent : PGdkWindow;
+          xwindow : TWindow;
+          xdisplay : PDisplay;
+          x : gint16;
+          y : gint16;
+          width : guint16;
+          height : guint16;
+          resize_count : guint8;
+          window_type : guint8;
+          ref_count : guint;
+          flag0 : word;
+          extension_events : gint;
+          filters : PGList;
+          colormap : PGdkColormap;
+          children : PGList;
+       end;
+
+  const
+     bm_TGdkWindowPrivate_destroyed = $3;
+     bp_TGdkWindowPrivate_destroyed = 0;
+     bm_TGdkWindowPrivate_mapped = $4;
+     bp_TGdkWindowPrivate_mapped = 2;
+     bm_TGdkWindowPrivate_guffaw_gravity = $8;
+     bp_TGdkWindowPrivate_guffaw_gravity = 3;
+function  destroyed(var a : TGdkWindowPrivate) : guint;
+procedure set_destroyed(var a : TGdkWindowPrivate; __destroyed : guint);
+function  mapped(var a : TGdkWindowPrivate) : guint;
+procedure set_mapped(var a : TGdkWindowPrivate; __mapped : guint);
+function  guffaw_gravity(var a : TGdkWindowPrivate) : guint;
+procedure set_guffaw_gravity(var a : TGdkWindowPrivate; __guffaw_gravity : guint);
+
+  type
+     PGdkImagePrivate = ^TGdkImagePrivate;
+     TGdkImagePrivate = record
+          image : TGdkImage;
+          ximage : PXImage;
+          xdisplay : PDisplay;
+          x_shm_info : gpointer;
+          image_put : procedure (window:PGdkDrawable; gc:PGdkGC; image:PGdkImage; xsrc:gint; ysrc:gint; xdest:gint; ydest:gint; width:gint; height:gint);cdecl;
+       end;
+
+     PGdkGCPrivate = ^TGdkGCPrivate;
+     TGdkGCPrivate = record
+          gc : TGdkGC;
+          xgc : TGC;
+          xdisplay : PDisplay;
+          ref_count : guint;
+       end;
+
+     TGdkColorInfoFlags = (GDK_COLOR_WRITEABLE := 1 shl 0);
+
+     PGdkColorInfo = ^TGdkColorInfo;
+     TGdkColorInfo = record
+          flags : TGdkColorInfoFlags;
+          ref_count : guint;
+       end;
+
+     PGdkColormapPrivate = ^TGdkColormapPrivate;
+     TGdkColormapPrivate = record
+          colormap : TGdkColormap;
+          xcolormap : TColormap;
+          xdisplay : PDisplay;
+          visual : PGdkVisual;
+          private_val : gint;
+          hash : PGHashTable;
+          info : PGdkColorInfo;
+          last_sync_time : time_t;
+          ref_count : guint;
+       end;
+
+     PGdkVisualPrivate = ^TGdkVisualPrivate;
+     TGdkVisualPrivate = record
+          visual : TGdkVisual;
+          xvisual : PVisual;
+       end;
+
+     PGdkFontPrivate = ^TGdkFontPrivate;
+     TGdkFontPrivate = record
+          font : TGdkFont;
+          xfont : gpointer;
+          xdisplay : PDisplay;
+          ref_count : guint;
+          names : PGSList;
+       end;
+
+     PGdkCursorPrivate = ^TGdkCursorPrivate;
+     TGdkCursorPrivate = record
+          cursor : TGdkCursor;
+          xcursor : TCursor;
+          xdisplay : PDisplay;
+       end;
+
+     PGdkDndCursorInfo = ^TGdkDndCursorInfo;
+     TGdkDndCursorInfo = record
+          gdk_cursor_dragdefault : TCursor;
+          gdk_cursor_dragok : TCursor;
+          drag_pm_default : PGdkWindow;
+          drag_pm_ok : PGdkWindow;
+          default_hotspot : TGdkPoint;
+          ok_hotspot : TGdkPoint;
+          xids : PGList;
+       end;
+
+     PGdkDndGlobals = ^TGdkDndGlobals;
+     TGdkDndGlobals = record
+          gdk_XdeEnter : TGdkAtom;
+          gdk_XdeLeave : TGdkAtom;
+          gdk_XdeRequest : TGdkAtom;
+          gdk_XdeDataAvailable : TGdkAtom;
+          gdk_XdeDataShow : TGdkAtom;
+          gdk_XdeCancel : TGdkAtom;
+          gdk_XdeTypelist : TGdkAtom;
+          c : PGdkDndCursorInfo;
+          drag_startwindows : PPGdkWindow;
+          drag_numwindows : guint;
+          drag_really : gboolean;
+          drag_perhaps : gboolean;
+          dnd_grabbed : gboolean;
+          dnd_drag_target : TWindow;
+          drag_dropcoords : TGdkPoint;
+          dnd_drag_start : TGdkPoint;
+          dnd_drag_oldpos : TGdkPoint;
+          dnd_drag_dropzone : TGdkRectangle;
+          real_sw : PGdkWindowPrivate;
+          dnd_drag_curwin : TWindow;
+          last_drop_time : Time_T;
+       end;
+
+
+     PGdkEventFilter = ^TGdkEventFilter;
+     TGdkEventFilter = record
+          thefunction : TGdkFilterFunc;
+          data : gpointer;
+       end;
+
+     PGdkClientFilter = ^TGdkClientFilter;
+     TGdkClientFilter = record
+          thetype : TGdkAtom;
+          thefunction : TGdkFilterFunc;
+          data : gpointer;
+       end;
+
+{$ifdef USE_XIM}
+
+     PGdkICPrivate = ^TGdkICPrivate;
+     TGdkICPrivate = record
+          xic : XIC;
+          attr : PGdkICAttr;
+          mask : TGdkICAttributesType;
+       end;
+
+{$endif}
+
+     PGdkColorContextPrivate = ^TGdkColorContextPrivate;
+     TGdkColorContextPrivate = record
+          color_context : TGdkColorContext;
+          xdisplay : PDisplay;
+          std_cmap : TXStandardColormap;
+       end;
+
+     PGdkRegionPrivate = ^TGdkRegionPrivate;
+     TGdkRegionPrivate = record
+          region : TGdkRegion;
+          xregion : TRegion;
+       end;
+
+
+     TGdkDebugFlag = (GDK_DEBUG_MISC := 1 shl 0,GDK_DEBUG_EVENTS := 1 shl 1,
+       GDK_DEBUG_DND := 1 shl 2,GDK_DEBUG_COLOR_CONTEXT := 1 shl 3,
+       GDK_DEBUG_XIM := 1 shl 4);
+
+{$ifndef gtkwin}
+function  GDK_window_lookup(xid : longint) : PGdkWindow;
+function  GDK_pixmap_lookup(xid : longint) : PGdkPixmap;
+function  GDK_font_lookup(xid : longint) : PGdkFont;
+
+procedure gdk_events_init;cdecl;external gdkdll name 'gdk_events_init';
+procedure gdk_window_init;cdecl;external gdkdll name 'gdk_window_init';
+procedure gdk_visual_init;cdecl;external gdkdll name 'gdk_visual_init';
+procedure gdk_dnd_init;cdecl;external gdkdll name 'gdk_dnd_init';
+procedure gdk_image_init;cdecl;external gdkdll name 'gdk_image_init';
+procedure gdk_image_exit;cdecl;external gdkdll name 'gdk_image_exit';
+function  gdk_colormap_lookup(xcolormap:TColormap):PGdkColormap;cdecl;external gdkdll name 'gdk_colormap_lookup';
+function  gdk_visual_lookup(xvisual:pVisual):PGdkVisual;cdecl;external gdkdll name 'gdk_visual_lookup';
+procedure gdk_window_add_colormap_windows(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_add_colormap_windows';
+procedure gdk_window_destroy_notify(window:PGdkWindow);cdecl;external gdkdll name 'gdk_window_destroy_notify';
+procedure gdk_xid_table_insert(xid:TXID; data:gpointer);cdecl;external gdkdll name 'gdk_xid_table_insert';
+procedure gdk_xid_table_remove(xid:TXID);cdecl;external gdkdll name 'gdk_xid_table_remove';
+function  gdk_xid_table_lookup(xid:TXID):gpointer;cdecl;external gdkdll name 'gdk_xid_table_lookup';
+function  gdk_send_xevent(window:TWindow; propagate:gboolean; event_mask:glong; event_send:pXEvent):gint;cdecl;external gdkdll name 'gdk_send_xevent';
+procedure gdk_dnd_display_drag_cursor(x:gint; y:gint; drag_ok:gboolean; change_made:gboolean);cdecl;external gdkdll name 'gdk_dnd_display_drag_cursor';
+function  gdk_window_xid_at(base:TWindow; bx:gint; by:gint; x:gint; y:gint; excludes:PGList; excl_child:gboolean):TWindow;cdecl;external gdkdll name 'gdk_window_xid_at';
+function  gdk_window_xid_at_coords(x:gint; y:gint; excludes:PGList; excl_child:gboolean):TWindow;cdecl;external gdkdll name 'gdk_window_xid_at_coords';
+
+    var
+       gdk_debug_level : gint;external gdkdll name 'gdk_debug_level';
+       gdk_show_events : gint;external gdkdll name  'gdk_show_events';
+       gdk_use_xshm : gint;external gdkdll name 'gdk_use_xshm';
+       gdk_stack_trace : gint;external gdkdll name 'gdk_stack_trace';
+       gdk_display_name : Pgchar;external gdkdll name 'gdk_display_name';
+       gdk_display : PDisplay;external gdkdll name 'gdk_display';
+       gdk_screen : gint;external gdkdll name 'gdk_screen';
+       gdk_root_window : TWindow;external gdkdll name 'gdk_root_window';
+       gdk_leader_window : TWindow;external gdkdll name 'gdk_leader_window';
+       gdk_root_parent : TGdkWindowPrivate;external gdkdll name 'gdk_root_parent';
+       gdk_wm_delete_window : TAtom;external gdkdll name 'gdk_wm_delete_window';
+       gdk_wm_take_focus : TAtom;external gdkdll name 'gdk_wm_take_focus';
+       gdk_wm_protocols : TAtom;external gdkdll name 'gdk_wm_protocols';
+       gdk_selection_property : TAtom;external gdkdll name 'gdk_selection_property';
+       gdk_dnd : TGdkDndGlobals;external gdkdll name 'gdk_dnd';
+       gdk_progclass : Pgchar;external gdkdll name 'gdk_progclass';
+       gdk_error_code : gint;external gdkdll name 'gdk_error_code';
+       gdk_error_warnings : gint;external gdkdll name 'gdk_error_warnings';
+       gdk_null_window_warnings : gint;external gdkdll name 'gdk_null_window_warnings';
+       gdk_default_filters : PGList;external gdkdll name 'gdk_default_filters';
+       gdk_nevent_masks : longint;external gdkdll name 'gdk_nevent_masks';
+       gdk_xgrab_window : PGdkWindowPrivate;external gdkdll name 'gdk_xgrab_window';
+
+{$ifdef USE_XIM}
+function  gdk_im_open:gint;cdecl;external gdkdll name 'gdk_im_open';
+procedure gdk_im_close;cdecl;external gdkdll name 'gdk_im_close';
+procedure gdk_ic_cleanup;cdecl;external gdkdll name 'gdk_ic_cleanup';
+
+    var
+       gdk_xim_ic : PGdkICPrivate;external gdkdll name 'gdk_xim_ic';
+       gdk_xim_window : PGdkWindow;external gdkdll name 'gdk_xim_window';
+{$endif}
+
+{$endif win32}
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  destroyed(var a : TGdkWindowPrivate) : guint;
+    begin
+       destroyed:=(a.flag0 and bm_TGdkWindowPrivate_destroyed) shr bp_TGdkWindowPrivate_destroyed;
+    end;
+
+procedure set_destroyed(var a : TGdkWindowPrivate; __destroyed : guint);
+    begin
+       a.flag0:=a.flag0 or ((__destroyed shl bp_TGdkWindowPrivate_destroyed) and bm_TGdkWindowPrivate_destroyed);
+    end;
+
+function  mapped(var a : TGdkWindowPrivate) : guint;
+    begin
+       mapped:=(a.flag0 and bm_TGdkWindowPrivate_mapped) shr bp_TGdkWindowPrivate_mapped;
+    end;
+
+procedure set_mapped(var a : TGdkWindowPrivate; __mapped : guint);
+    begin
+       a.flag0:=a.flag0 or ((__mapped shl bp_TGdkWindowPrivate_mapped) and bm_TGdkWindowPrivate_mapped);
+    end;
+
+function  guffaw_gravity(var a : TGdkWindowPrivate) : guint;
+    begin
+       guffaw_gravity:=(a.flag0 and bm_TGdkWindowPrivate_guffaw_gravity) shr bp_TGdkWindowPrivate_guffaw_gravity;
+    end;
+
+procedure set_guffaw_gravity(var a : TGdkWindowPrivate; __guffaw_gravity : guint);
+    begin
+       a.flag0:=a.flag0 or ((__guffaw_gravity shl bp_TGdkWindowPrivate_guffaw_gravity) and bm_TGdkWindowPrivate_guffaw_gravity);
+    end;
+
+{$ifndef gtkwin}
+function  GDK_window_lookup(xid : longint) : PGdkWindow;
+    begin
+       gdk_window_lookup:=PGdkWindow(gdk_xid_table_lookup(xid));
+    end;
+
+function  GDK_pixmap_lookup(xid : longint) : PGdkPixmap;
+    begin
+       gdk_pixmap_lookup:=PGdkPixmap(gdk_xid_table_lookup(xid));
+    end;
+
+function  GDK_font_lookup(xid : longint) : PGdkFont;
+    begin
+       gdk_font_lookup:=PGdkFont(gdk_xid_table_lookup(xid));
+    end;
+{$endif}
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.8  1999/10/21 14:35:23  peter
+    * removed glibdll constant
+
+  Revision 1.7  1999/10/06 17:42:47  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.6  1999/10/05 09:28:26  peter
+    * patches from Frank Loemker
+
+  Revision 1.5  1999/07/23 16:11:44  peter
+    * use packrecords C
+
+  Revision 1.4  1999/05/11 00:37:51  peter
+    * win32 fixes
+
+  Revision 1.3  1999/05/10 09:02:37  peter
+    * gtk 1.2 port working
+
+  Revision 1.2  1999/05/07 15:09:42  peter
+    * more fixes
+
+  Revision 1.1  1999/05/07 10:40:20  peter
+    * first things for 1.2
+
+}
+

+ 91 - 0
packages/gtk/gdk/gdkrgb.pp

@@ -0,0 +1,91 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGdkRgbCmap = ^TGdkRgbCmap;
+     TGdkRgbCmap = record
+          colors : array[0..255] of guint32;
+          lut : array[0..255] of guchar;
+       end;
+
+procedure gdk_rgb_init;cdecl;external gdkdll name 'gdk_rgb_init';
+function  gdk_rgb_xpixel_from_rgb(rgb:guint32):gulong;cdecl;external gdkdll name 'gdk_rgb_xpixel_from_rgb';
+procedure gdk_rgb_gc_set_foreground(gc:PGdkGC; rgb:guint32);cdecl;external gdkdll name 'gdk_rgb_gc_set_foreground';
+procedure gdk_rgb_gc_set_background(gc:PGdkGC; rgb:guint32);cdecl;external gdkdll name 'gdk_rgb_gc_set_background';
+
+  type
+     TGdkRgbDither = (GDK_RGB_DITHER_NONE,GDK_RGB_DITHER_NORMAL,GDK_RGB_DITHER_MAX);
+
+procedure gdk_draw_rgb_image(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint; width:gint; height:gint; dith:TGdkRgbDither; rgb_buf:Pguchar; rowstride:gint);cdecl;external gdkdll name 'gdk_draw_rgb_image';
+procedure gdk_draw_rgb_image_dithalign(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint; width:gint; height:gint; dith:TGdkRgbDither; rgb_buf:Pguchar; rowstride:gint; xdith:gint; ydith:gint);cdecl;external gdkdll name 'gdk_draw_rgb_image_dithalign';
+procedure gdk_draw_rgb_32_image(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint; width:gint; height:gint; dith:TGdkRgbDither; buf:Pguchar; rowstride:gint);cdecl;external gdkdll name 'gdk_draw_rgb_32_image';
+procedure gdk_draw_gray_image(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint; width:gint; height:gint; dith:TGdkRgbDither; buf:Pguchar; rowstride:gint);cdecl;external gdkdll name 'gdk_draw_gray_image';
+function  gdk_rgb_cmap_new(colors:Pguint32; n_colors:gint):PGdkRgbCmap;cdecl;external gdkdll name 'gdk_rgb_cmap_new';
+procedure gdk_rgb_cmap_free(cmap:PGdkRgbCmap);cdecl;external gdkdll name 'gdk_rgb_cmap_free';
+procedure gdk_draw_indexed_image(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint; width:gint; height:gint; dith:TGdkRgbDither; buf:Pguchar; rowstride:gint; cmap:PGdkRgbCmap);cdecl;external gdkdll name 'gdk_draw_indexed_image';
+function  gdk_rgb_ditherable:gboolean;cdecl;external gdkdll name 'gdk_rgb_ditherable';
+procedure gdk_rgb_set_verbose(verbose:gboolean);cdecl;external gdkdll name 'gdk_rgb_set_verbose';
+procedure gdk_rgb_set_install(install:gboolean);cdecl;external gdkdll name 'gdk_rgb_set_install';
+procedure gdk_rgb_set_min_colors(min_colors:gint);cdecl;external gdkdll name 'gdk_rgb_set_min_colors';
+function  gdk_rgb_get_cmap:PGdkColormap;cdecl;external gdkdll name 'gdk_rgb_get_cmap';
+function  gdk_rgb_get_visual:PGdkVisual;cdecl;external gdkdll name 'gdk_rgb_get_visual';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.7  1999/10/21 14:35:23  peter
+    * removed glibdll constant
+
+  Revision 1.6  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp gdkdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           gdkdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.5  1999/10/06 17:42:47  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.4  1999/05/11 00:37:53  peter
+    * win32 fixes
+
+  Revision 1.3  1999/05/10 09:02:38  peter
+    * gtk 1.2 port working
+
+  Revision 1.2  1999/05/07 15:09:43  peter
+    * more fixes
+
+  Revision 1.1  1999/05/07 10:40:20  peter
+    * first things for 1.2
+
+}
+

+ 1129 - 0
packages/gtk/gdk/gdktypes.pp

@@ -0,0 +1,1129 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+   type
+     PPPChar   = ^PPchar;
+     PPguchar  = Pguchar;
+     PPgchar   = ^Pgchar;
+     PPPgchar  = ^PPgchar;
+     PPgint    = ^Pgint;
+
+     PGdkWChar = ^TGdkWChar;
+     TGdkWChar = guint32;
+
+     TGdkIC = pointer;
+     PGdkIc = ^TGdkIC;
+
+     TGdkAtom = gulong;
+     PTGdkAtom = ^TGdkAtom;
+
+     PPGdkWindow = ^PGdkWindow;
+     PGdkWindow = ^TGdkWindow;
+     TGdkWindow = record
+          user_data : gpointer;
+       end;
+
+     TGdkPixmap = TGdkWindow;
+     PGdkPixmap = ^TGdkWindow;
+     PPGdkPixmap = ^PGdkPixmap;
+     TGdkBitmap = TGdkWindow;
+     PGdkBitMap = ^TGdkBitMap;
+     PPGdkBitMap = ^PGdkBitMap;
+     TGdkDrawable = TGdkWindow;
+     PGdkDrawable = ^TGdkDrawable;
+
+type
+   PGdkWindowType = ^TGdkWindowType;
+   TGdkWindowType =  Longint;
+Const
+   GDK_WINDOW_ROOT = 0;
+   GDK_WINDOW_TOPLEVEL = 1;
+   GDK_WINDOW_CHILD = 2;
+   GDK_WINDOW_DIALOG = 3;
+   GDK_WINDOW_TEMP = 4;
+   GDK_WINDOW_PIXMAP = 5;
+   GDK_WINDOW_FOREIGN = 6;
+
+type
+   PGdkWindowClass = ^TGdkWindowClass;
+   TGdkWindowClass =  Longint;
+Const
+   GDK_INPUT_OUTPUT = 0;
+   GDK_INPUT_ONLY = 1;
+
+type
+   PGdkImageType = ^TGdkImageType;
+   TGdkImageType =  Longint;
+Const
+   GDK_IMAGE_NORMAL = 0;
+   GDK_IMAGE_SHARED = 1;
+   GDK_IMAGE_FASTEST = 2;
+
+type
+   PGdkVisualType = ^TGdkVisualType;
+   TGdkVisualType =  Longint;
+Const
+     GDK_VISUAL_STATIC_GRAY = 0;
+     GDK_VISUAL_GRAYSCALE = 1;
+     GDK_VISUAL_STATIC_COLOR = 2;
+     GDK_VISUAL_PSEUDO_COLOR = 3;
+     GDK_VISUAL_TRUE_COLOR = 4;
+     GDK_VISUAL_DIRECT_COLOR = 5;
+
+type
+   PGdkFontType = ^TGdkFontType;
+   TGdkFontType =  Longint;
+Const
+     GDK_FONT_FONT = 0;
+     GDK_FONT_FONTSET = 1;
+
+type
+   PGdkWindowAttributesType = ^TGdkWindowAttributesType;
+   TGdkWindowAttributesType =  Longint;
+Const
+     GDK_WA_TITLE = (1) shl (1);
+     GDK_WA_X = (1) shl (2);
+     GDK_WA_Y = (1) shl (3);
+     GDK_WA_CURSOR = (1) shl (4);
+     GDK_WA_COLORMAP = (1) shl (5);
+     GDK_WA_VISUAL = (1) shl (6);
+     GDK_WA_WMCLASS = (1) shl (7);
+     GDK_WA_NOREDIR = (1) shl (8);
+
+type
+   PGdkWindowHints = ^TGdkWindowHints;
+   TGdkWindowHints =  Longint;
+Const
+     GDK_HINT_POS = 1 shl 0;
+     GDK_HINT_MIN_SIZE = 1 shl 1;
+     GDK_HINT_MAX_SIZE = 1 shl 2;
+     GDK_HINT_BASE_SIZE = 1 shl 3;
+     GDK_HINT_ASPECT = 1 shl 4;
+     GDK_HINT_RESIZE_INC = 1 shl 5;
+
+type
+   PGdkfunction = ^TGdkfunction;
+   TGdkfunction = Longint;
+Const
+     GDK_COPY = 0;
+     GDK_INVERT = 1;
+     GDK_XOR = 2;
+     GDK_CLEAR = 4;
+     GDK_AND = 5;
+     GDK_AND_REVERSE = 6;
+     GDK_AND_INVERT = 7;
+     GDK_NOOP = 8;
+     GDK_OR = 9;
+     GDK_EQUIV = 10;
+     GDK_OR_REVERSE = 11;
+     GDK_COPY_INVERT = 12;
+     GDK_OR_INVERT = 13;
+     GDK_NAND = 14;
+     GDK_SET = 15;
+
+type
+   PGdkFill = ^TGdkFill;
+   TGdkFill =  Longint;
+Const
+     GDK_SOLID = 0;
+     GDK_TILED = 1;
+     GDK_STIPPLED = 2;
+     GDK_OPAQUE_STIPPLED = 3;
+
+type
+   PGdkFillRule = ^TGdkFillRule;
+   TGdkFillRule =  Longint;
+Const
+     GDK_EVEN_ODD_RULE = 0;
+     GDK_WINDING_RULE = 1;
+
+type
+   PGdkLineStyle = ^TGdkLineStyle;
+   TGdkLineStyle =  Longint;
+Const
+     GDK_LINE_SOLID = 0;
+     GDK_LINE_ON_OFF_DASH = 1;
+     GDK_LINE_DOUBLE_DASH = 2;
+
+type
+   PGdkCapStyle = ^TGdkCapStyle;
+   TGdkCapStyle =  Longint;
+Const
+     GDK_CAP_NOT_LAST = 0;
+     GDK_CAP_BUTT = 1;
+     GDK_CAP_ROUND = 2;
+     GDK_CAP_PROJECTING = 3;
+
+type
+   PGdkJoinStyle = ^TGdkJoinStyle;
+   TGdkJoinStyle =  Longint;
+Const
+     GDK_JOIN_MITER = 0;
+     GDK_JOIN_ROUND = 1;
+     GDK_JOIN_BEVEL = 2;
+
+type
+   PGdkCursorType = ^TGdkCursorType;
+   TGdkCursorType =  Longint;
+
+Const
+     GDK_CURSOR_IS_PIXMAP = -1;
+     GDK_X_CURSOR = 0;
+     GDK_ARROW = 2;
+     GDK_BASED_ARROW_DOWN = 4;
+     GDK_BASED_ARROW_UP = 6;
+     GDK_BOAT = 8;
+     GDK_BOGOSITY = 10;
+     GDK_BOTTOM_LEFT_CORNER = 12;
+     GDK_BOTTOM_RIGHT_CORNER = 14;
+     GDK_BOTTOM_SIDE = 16;
+     GDK_BOTTOM_TEE = 18;
+     GDK_BOX_SPIRAL = 20;
+     GDK_CENTER_PTR = 22;
+     GDK_CIRCLE = 24;
+     GDK_CLOCK = 26;
+     GDK_COFFEE_MUG = 28;
+     GDK_CROSS = 30;
+     GDK_CROSS_REVERSE = 32;
+     GDK_CROSSHAIR = 34;
+     GDK_DIAMOND_CROSS = 36;
+     GDK_DOT = 38;
+     GDK_DOTBOX = 40;
+     GDK_DOUBLE_ARROW = 42;
+     GDK_DRAFT_LARGE = 44;
+     GDK_DRAFT_SMALL = 46;
+     GDK_DRAPED_BOX = 48;
+     GDK_EXCHANGE = 50;
+     GDK_FLEUR = 52;
+     GDK_GOBBLER = 54;
+     GDK_GUMBY = 56;
+     GDK_HAND1 = 58;
+     GDK_HAND2 = 60;
+     GDK_HEART = 62;
+     GDK_ICON = 64;
+     GDK_IRON_CROSS = 66;
+     GDK_LEFT_PTR = 68;
+     GDK_LEFT_SIDE = 70;
+     GDK_LEFT_TEE = 72;
+     GDK_LEFTBUTTON = 74;
+     GDK_LL_ANGLE = 76;
+     GDK_LR_ANGLE = 78;
+     GDK_MAN = 80;
+     GDK_MIDDLEBUTTON = 82;
+     GDK_MOUSE = 84;
+     GDK_PENCIL = 86;
+     GDK_PIRATE = 88;
+     GDK_PLUS = 90;
+     GDK_QUESTION_ARROW = 92;
+     GDK_RIGHT_PTR = 94;
+     GDK_RIGHT_SIDE = 96;
+     GDK_RIGHT_TEE = 98;
+     GDK_RIGHTBUTTON = 100;
+     GDK_RTL_LOGO = 102;
+     GDK_SAILBOAT = 104;
+     GDK_SB_DOWN_ARROW = 106;
+     GDK_SB_H_DOUBLE_ARROW = 108;
+     GDK_SB_LEFT_ARROW = 110;
+     GDK_SB_RIGHT_ARROW = 112;
+     GDK_SB_UP_ARROW = 114;
+     GDK_SB_V_DOUBLE_ARROW = 116;
+     GDK_SHUTTLE = 118;
+     GDK_SIZING = 120;
+     GDK_SPIDER = 122;
+     GDK_SPRAYCAN = 124;
+     GDK_STAR = 126;
+     GDK_TARGET = 128;
+     GDK_TCROSS = 130;
+     GDK_TOP_LEFT_ARROW = 132;
+     GDK_TOP_LEFT_CORNER = 134;
+     GDK_TOP_RIGHT_CORNER = 136;
+     GDK_TOP_SIDE = 138;
+     GDK_TOP_TEE = 140;
+     GDK_TREK = 142;
+     GDK_UL_ANGLE = 144;
+     GDK_UMBRELLA = 146;
+     GDK_UR_ANGLE = 148;
+     GDK_WATCH = 150;
+     GDK_XTERM = 152;
+     GDK_LAST_CURSOR = 153;
+     GDK_NUM_GLYPHS = 154;
+
+type
+   PGdkFilterReturn = ^TGdkFilterReturn;
+   TGdkFilterReturn =  Longint;
+Const
+     GDK_FILTER_CONTINUE = 0;
+     GDK_FILTER_TRANSLATE = 1;
+     GDK_FILTER_REMOVE = 2;
+
+type
+   PGdkVisibilityState = ^TGdkVisibilityState;
+   TGdkVisibilityState =  Longint;
+Const
+     GDK_VISIBILITY_UNOBSCURED = 0;
+     GDK_VISIBILITY_PARTIAL = 1;
+     GDK_VISIBILITY_FULLY_OBSCURED = 2;
+
+type
+   PGdkEventType = ^TGdkEventType;
+   TGdkEventType =  Longint;
+Const
+     GDK_NOTHING = -1;
+     GDK_DELETE = 0;
+     GDK_DESTROY = 1;
+     GDK_EXPOSE = 2;
+     GDK_MOTION_NOTIFY = 3;
+     GDK_BUTTON_PRESS = 4;
+     GDK_2BUTTON_PRESS = 5;
+     GDK_3BUTTON_PRESS = 6;
+     GDK_BUTTON_RELEASE = 7;
+     GDK_KEY_PRESS = 8;
+     GDK_KEY_RELEASE = 9;
+     GDK_ENTER_NOTIFY = 10;
+     GDK_LEAVE_NOTIFY = 11;
+     GDK_FOCUS_CHANGE = 12;
+     GDK_CONFIGURE = 13;
+     GDK_MAP = 14;
+     GDK_UNMAP = 15;
+     GDK_PROPERTY_NOTIFY = 16;
+     GDK_SELECTION_CLEAR = 17;
+     GDK_SELECTION_REQUEST = 18;
+     GDK_SELECTION_NOTIFY = 19;
+     GDK_PROXIMITY_IN = 20;
+     GDK_PROXIMITY_OUT = 21;
+     GDK_DRAG_ENTER = 22;
+     GDK_DRAG_LEAVE = 23;
+     GDK_DRAG_MOTION_EVENT = 24;
+     GDK_DRAG_STATUS_EVENT = 25;
+     GDK_DROP_START = 26;
+     GDK_DROP_FINISHED = 27;
+     GDK_CLIENT_EVENT = 28;
+     GDK_VISIBILITY_NOTIFY = 29;
+     GDK_NO_EXPOSE = 30;
+
+type
+   PGdkEventMask = ^TGdkEventMask;
+   TGdkEventMask =  Longint;
+Const
+     GDK_EXPOSURE_MASK = (1) shl (1);
+     GDK_POINTER_MOTION_MASK = (1) shl (2);
+     GDK_POINTER_MOTION_HINT_MASK = (1) shl (3);
+     GDK_BUTTON_MOTION_MASK = (1) shl (4);
+     GDK_BUTTON1_MOTION_MASK = (1) shl (5);
+     GDK_BUTTON2_MOTION_MASK = (1) shl (6);
+     GDK_BUTTON3_MOTION_MASK = (1) shl (7);
+     GDK_BUTTON_PRESS_MASK = (1) shl (8);
+     GDK_BUTTON_RELEASE_MASK = (1) shl (9);
+     GDK_KEY_PRESS_MASK = (1) shl (10);
+     GDK_KEY_RELEASE_MASK = (1) shl (11);
+     GDK_ENTER_NOTIFY_MASK = (1) shl (12);
+     GDK_LEAVE_NOTIFY_MASK = (1) shl (13);
+     GDK_FOCUS_CHANGE_MASK = (1) shl (14);
+     GDK_STRUCTURE_MASK = (1) shl (15);
+     GDK_PROPERTY_CHANGE_MASK = (1) shl (16);
+     GDK_VISIBILITY_NOTIFY_MASK = (1) shl (17);
+     GDK_PROXIMITY_IN_MASK = (1) shl (18);
+     GDK_PROXIMITY_OUT_MASK = (1) shl (19);
+     GDK_SUBSTRUCTURE_MASK = 1 shl 20;
+     GDK_ALL_EVENTS_MASK = $0FFFFF;
+
+type
+   PGdkNotifyType = ^TGdkNotifyType;
+   TGdkNotifyType =  Longint;
+Const
+     GDK_NOTIFY_ANCESTOR = 0;
+     GDK_NOTIFY_VIRTUAL = 1;
+     GDK_NOTIFY_INFERIOR = 2;
+     GDK_NOTIFY_NONLINEAR = 3;
+     GDK_NOTIFY_NONLINEAR_VIRTUAL = 4;
+     GDK_NOTIFY_UNKNOWN = 5;
+
+type
+     PGdkCrossingMode = ^TGdkCrossingMode;
+     TGdkCrossingMode = longint;
+const
+     GDK_CROSSING_NORMAL = 0;
+     GDK_CROSSING_GRAB = 1;
+     GDK_CROSSING_UNGRAB = 2;
+
+type
+   PGdkModifierType = ^TGdkModifierType;
+   TGdkModifierType =  Longint;
+Const
+     GDK_SHIFT_MASK = (1) shl (0);
+     GDK_LOCK_MASK = (1) shl (1);
+     GDK_CONTROL_MASK = (1) shl (2);
+     GDK_MOD1_MASK = (1) shl (3);
+     GDK_MOD2_MASK = (1) shl (4);
+     GDK_MOD3_MASK = (1) shl (5);
+     GDK_MOD4_MASK = (1) shl (6);
+     GDK_MOD5_MASK = (1) shl (7);
+     GDK_BUTTON1_MASK = (1) shl (8);
+     GDK_BUTTON2_MASK = (1) shl (9);
+     GDK_BUTTON3_MASK = (1) shl (10);
+     GDK_BUTTON4_MASK = (1) shl (11);
+     GDK_BUTTON5_MASK = (1) shl (12);
+     GDK_RELEASE_MASK = 1 shl 13;
+     GDK_MODIFIER_MASK = $3fff;
+
+type
+   PGdkSubwindowMode = ^TGdkSubwindowMode;
+   TGdkSubwindowMode =  Longint;
+Const
+     GDK_CLIP_BY_CHILDREN = 0;
+     GDK_INCLUDE_INFERIORS = 1;
+
+type
+   PGdkInputCondition = ^TGdkInputCondition;
+   TGdkInputCondition =  Longint;
+Const
+     GDK_INPUT_READ = (1) shl (0);
+     GDK_INPUT_WRITE = (1) shl (1);
+     GDK_INPUT_EXCEPTION = (1) shl (2);
+
+type
+   PGdkStatus = ^TGdkStatus;
+   TGdkStatus =  Longint;
+Const
+     GDK_OK = 0;
+     GDK_ERROR = -1;
+     GDK_ERROR_PARAM = -2;
+     GDK_ERROR_FILE = -3;
+     GDK_ERROR_MEM = -4;
+
+type
+   PGdkByteOrder = ^TGdkByteOrder;
+   TGdkByteOrder =  Longint;
+Const
+     GDK_LSB_FIRST = 0;
+     GDK_MSB_FIRST = 1;
+
+type
+   PGdkGCValuesMask = ^TGdkGCValuesMask;
+   TGdkGCValuesMask =  Longint;
+Const
+     GDK_GC_FOREGROUND = (1) shl (0);
+     GDK_GC_BACKGROUND = (1) shl (1);
+     GDK_GC_FONT = (1) shl (2);
+     GDK_GC_function = (1) shl (3);
+     GDK_GC_FILL = (1) shl (4);
+     GDK_GC_TILE = (1) shl (5);
+     GDK_GC_STIPPLE = (1) shl (6);
+     GDK_GC_CLIP_MASK = (1) shl (7);
+     GDK_GC_SUBWINDOW = (1) shl (8);
+     GDK_GC_TS_X_ORIGIN = (1) shl (9);
+     GDK_GC_TS_Y_ORIGIN = (1) shl (10);
+     GDK_GC_CLIP_X_ORIGIN = (1) shl (11);
+     GDK_GC_CLIP_Y_ORIGIN = (1) shl (12);
+     GDK_GC_EXPOSURES = (1) shl (13);
+     GDK_GC_LINE_WIDTH = (1) shl (14);
+     GDK_GC_LINE_STYLE = (1) shl (15);
+     GDK_GC_CAP_STYLE = (1) shl (16);
+     GDK_GC_JOIN_STYLE = (1) shl (17);
+
+type
+   PGdkSelection = ^TGdkSelection;
+   TGdkSelection =  Longint;
+Const
+     GDK_SELECTION_PRIMARY = 1;
+     GDK_SELECTION_SECONDARY = 2;
+
+type
+   PGdkPropertyState = ^TGdkPropertyState;
+   TGdkPropertyState =  Longint;
+Const
+     GDK_PROPERTY_NEW_VALUE = 0;
+     GDK_PROPERTY_DELETE_STATE = 1;
+
+type
+   PGdkPropMode = ^TGdkPropMode;
+   TGdkPropMode =  Longint;
+Const
+     GDK_PROP_MODE_REPLACE = 0;
+     GDK_PROP_MODE_PREPEND = 1;
+     GDK_PROP_MODE_APPEND = 2;
+
+type
+   PGdkInputSource = ^TGdkInputSource;
+   TGdkInputSource =  Longint;
+Const
+     GDK_SOURCE_MOUSE = 0;
+     GDK_SOURCE_PEN = 1;
+     GDK_SOURCE_ERASER = 2;
+     GDK_SOURCE_CURSOR = 3;
+
+type
+   PGdkInputMode = ^TGdkInputMode;
+   TGdkInputMode =  Longint;
+Const
+     GDK_MODE_DISABLED = 0;
+     GDK_MODE_SCREEN = 1;
+     GDK_MODE_WINDOW = 2;
+
+type
+   PGdkAxisUse = ^TGdkAxisUse;
+   TGdkAxisUse =  Longint;
+Const
+     GDK_AXIS_IGNORE = 0;
+     GDK_AXIS_X = 1;
+     GDK_AXIS_Y = 2;
+     GDK_AXIS_PRESSURE = 3;
+     GDK_AXIS_XTILT = 4;
+     GDK_AXIS_YTILT = 5;
+     GDK_AXIS_LAST = 6;
+
+type
+   PGdkTarget = ^TGdkTarget;
+   TGdkTarget =  Longint;
+Const
+     GDK_TARGET_BITMAP = 5;
+     GDK_TARGET_COLORMAP = 7;
+     GDK_TARGET_DRAWABLE = 17;
+     GDK_TARGET_PIXMAP = 20;
+     GDK_TARGET_STRING = 31;
+
+type
+   PGdkSelectionType = ^TGdkSelectionType;
+   TGdkSelectionType =  Longint;
+Const
+     GDK_SELECTION_TYPE_ATOM = 4;
+     GDK_SELECTION_TYPE_BITMAP = 5;
+     GDK_SELECTION_TYPE_COLORMAP = 7;
+     GDK_SELECTION_TYPE_DRAWABLE = 17;
+     GDK_SELECTION_TYPE_INTEGER = 19;
+     GDK_SELECTION_TYPE_PIXMAP = 20;
+     GDK_SELECTION_TYPE_WINDOW = 33;
+     GDK_SELECTION_TYPE_STRING = 31;
+
+type
+   PGdkExtensionMode = ^TGdkExtensionMode;
+   TGdkExtensionMode =  Longint;
+Const
+     GDK_EXTENSION_EVENTS_NONE = 0;
+     GDK_EXTENSION_EVENTS_ALL = 1;
+     GDK_EXTENSION_EVENTS_CURSOR = 2;
+
+type
+   PGdkIMStyle = ^TGdkIMStyle;
+   TGdkIMStyle =  Longint;
+Const
+     GDK_IM_PREEDIT_AREA = $0001;
+     GDK_IM_PREEDIT_CALLBACKS = $0002;
+     GDK_IM_PREEDIT_POSITION = $0004;
+     GDK_IM_PREEDIT_NOTHING = $0008;
+     GDK_IM_PREEDIT_NONE = $0010;
+     GDK_IM_PREEDIT_MASK = $001f;
+     GDK_IM_STATUS_AREA = $0100;
+     GDK_IM_STATUS_CALLBACKS = $0200;
+     GDK_IM_STATUS_NOTHING = $0400;
+     GDK_IM_STATUS_NONE = $0800;
+     GDK_IM_STATUS_MASK = $0f00;
+
+type
+     PGdkICAttributesType = ^TGdkICAttributesType;
+     TGdkICAttributesType = longint;
+const
+     GDK_IC_STYLE = 1 shl 0;
+     GDK_IC_CLIENT_WINDOW = 1 shl 1;
+       GDK_IC_ALL_REQ = 1 shl 0 + 1 shl 1;
+       GDK_IC_FOCUS_WINDOW = 1 shl 2;
+       GDK_IC_FILTER_EVENTS = 1 shl 3;
+       GDK_IC_SPOT_LOCATION = 1 shl 4;
+       GDK_IC_LINE_SPACING = 1 shl 5;
+       GDK_IC_CURSOR = 1 shl 6;
+       GDK_IC_PREEDIT_FONTSET = 1 shl 10;
+       GDK_IC_PREEDIT_AREA = 1 shl 11;
+       GDK_IC_PREEDIT_AREA_NEEDED = 1 shl 12;
+       GDK_IC_PREEDIT_FOREGROUND = 1 shl 13;
+       GDK_IC_PREEDIT_BACKGROUND = 1 shl 14;
+       GDK_IC_PREEDIT_PIXMAP = 1 shl 15;
+       GDK_IC_PREEDIT_COLORMAP = 1 shl 16;
+       GDK_IC_STATUS_FONTSET = 1 shl 21;
+       GDK_IC_STATUS_AREA = 1 shl 22;
+       GDK_IC_STATUS_AREA_NEEDED = 1 shl 23;
+       GDK_IC_STATUS_FOREGROUND = 1 shl 24;
+       GDK_IC_STATUS_BACKGROUND = 1 shl 25;
+       GDK_IC_STATUS_PIXMAP = 1 shl 26;
+       GDK_IC_STATUS_COLORMAP = 1 shl 27;
+       GDK_IC_PREEDIT_AREA_REQ = ((1 shl 11) + (1 shl 10));
+       GDK_IC_PREEDIT_POSITION_REQ = (1 shl 11 + 1 shl 4 + 1 shl 10);
+       GDK_IC_STATUS_AREA_REQ = (1 shl 22 or 1 shl 21);
+
+type
+   PGdkWMDecoration = ^TGdkWMDecoration;
+   TGdkWMDecoration =  Longint;
+Const
+     GDK_DECOR_ALL = (1) shl (0);
+     GDK_DECOR_BORDER = (1) shl (1);
+     GDK_DECOR_RESIZEH = (1) shl (2);
+     GDK_DECOR_TITLE = (1) shl (3);
+     GDK_DECOR_MENU = (1) shl (4);
+     GDK_DECOR_MINIMIZE = (1) shl (5);
+     GDK_DECOR_MAXIMIZE = (1) shl (6);
+
+type
+   PGdkWMfunction = ^TGdkWMfunction;
+   TGdkWMfunction = Longint;
+Const
+     GDK_FUNC_ALL = (1) shl (0);
+     GDK_FUNC_RESIZE = (1) shl (1);
+     GDK_FUNC_MOVE = (1) shl (2);
+     GDK_FUNC_MINIMIZE = (1) shl (3);
+     GDK_FUNC_MAXIMIZE = (1) shl (4);
+     GDK_FUNC_CLOSE = (1) shl (5);
+
+type
+     PGdkInputfunction = ^TGdkInputfunction;
+     TGdkInputfunction = procedure (data:gpointer; source:gint; condition:TGdkInputCondition);cdecl;
+
+     PGdkDestroyNotify = ^TGdkDestroyNotify;
+     TGdkDestroyNotify = procedure (data:gpointer);cdecl;
+
+type
+     PGdkColorContextMode = ^TGdkColorContextMode;
+     TGdkColorContextMode = longint;
+Const
+     GDK_CC_MODE_UNDEFINED = 0;
+     GDK_CC_MODE_BW = 1;
+     GDK_CC_MODE_STD_CMAP = 2;
+     GDK_CC_MODE_TRUE = 3;
+     GDK_CC_MODE_MY_GRAY = 4;
+     GDK_CC_MODE_PALETTE = 5;
+
+type
+   PGdkOverlapType = ^TGdkOverlapType;
+   TGdkOverlapType =  Longint;
+Const
+     GDK_OVERLAP_RECTANGLE_IN = 0;
+     GDK_OVERLAP_RECTANGLE_OUT = 1;
+     GDK_OVERLAP_RECTANGLE_PART = 2;
+
+type
+     PGdkDragAction = ^TGdkDragAction;
+     TGdkDragAction = longint;
+const
+     GDK_ACTION_DEFAULT = 1 shl 0;
+     GDK_ACTION_COPY = 1 shl 1;
+     GDK_ACTION_MOVE = 1 shl 2;
+     GDK_ACTION_LINK = 1 shl 3;
+     GDK_ACTION_PRIVATE = 1 shl 4;
+     GDK_ACTION_ASK = 1 shl 5;
+
+type
+     PGdkDragProtocol = ^TGdkDragProtocol;
+     TGdkDragProtocol = longint;
+const
+     GDK_DRAG_PROTO_MOTIF = 0;
+     GDK_DRAG_PROTO_XDND = 1;
+     GDK_DRAG_PROTO_ROOTWIN = 2;
+     GDK_DRAG_PROTO_NONE = 3;
+
+type
+     PGdkColor = ^TGdkColor;
+     TGdkColor = record
+          pixel : gulong;
+          red : gushort;
+          green : gushort;
+          blue : gushort;
+       end;
+
+     PGdkColormap = ^TGdkColormap;
+     TGdkColormap = record
+          size : gint;
+          colors : PGdkColor;
+       end;
+
+     PGdkVisual = ^TGdkVisual;
+     TGdkVisual = record
+          thetype : TGdkVisualType;
+          depth : gint;
+          byte_order : TGdkByteOrder;
+          colormap_size : gint;
+          bits_per_rgb : gint;
+          red_mask : guint32;
+          red_shift : gint;
+          red_prec : gint;
+          green_mask : guint32;
+          green_shift : gint;
+          green_prec : gint;
+          blue_mask : guint32;
+          blue_shift : gint;
+          blue_prec : gint;
+       end;
+
+     PGdkCursor = ^TGdkCursor;
+
+     PGdkWindowAttr = ^TGdkWindowAttr;
+     TGdkWindowAttr = record
+          title : ^gchar;
+          event_mask : gint;
+          x : gint16;
+          y : gint16;
+          width : gint16;
+          height : gint16;
+          wclass : TGdkWindowClass;
+          visual : PGdkVisual;
+          colormap : PGdkColormap;
+          window_type : TGdkWindowType;
+          cursor : PGdkCursor;
+          wmclass_name : ^gchar;
+          wmclass_class : ^gchar;
+          override_redirect : gboolean;
+       end;
+
+     PGdkGeometry = ^TGdkGeometry;
+     TGdkGeometry = record
+          min_width : gint;
+          min_height : gint;
+          max_width : gint;
+          max_height : gint;
+          base_width : gint;
+          base_height : gint;
+          width_inc : gint;
+          height_inc : gint;
+          min_aspect : gdouble;
+          max_aspect : gdouble;
+       end;
+
+     PGdkImage = ^TGdkImage;
+     PPGdkImage = ^PGdkImage;
+     TGdkImage = record
+          thetype : TGdkImageType;
+          visual : PGdkVisual;
+          byte_order : TGdkByteOrder;
+          width : guint16;
+          height : guint16;
+          depth : guint16;
+          bpp : guint16;
+          bpl : guint16;
+          mem : gpointer;
+       end;
+
+     PGdkFont = ^TGdkFont;
+     TGdkFont = record
+          thetype : TGdkFontType;
+          ascent : gint;
+          descent : gint;
+       end;
+
+     PGdkGCValues = ^TGdkGCValues;
+     TGdkGCValues = record
+          foreground : TGdkColor;
+          background : TGdkColor;
+          font : PGdkFont;
+          thefunction : TGdkfunction;
+          fill : TGdkFill;
+          tile : PGdkPixmap;
+          stipple : PGdkPixmap;
+          clip_mask : PGdkPixmap;
+          subwindow_mode : TGdkSubwindowMode;
+          ts_x_origin : gint;
+          ts_y_origin : gint;
+          clip_x_origin : gint;
+          clip_y_origin : gint;
+          graphics_exposures : gint;
+          line_width : gint;
+          line_style : TGdkLineStyle;
+          cap_style : TGdkCapStyle;
+          join_style : TGdkJoinStyle;
+       end;
+
+     PGdkGC = ^TGdkGC;
+     TGdkGC = record
+          dummy_var : gint;
+       end;
+
+     PGdkPoint = ^TGdkPoint;
+     TGdkPoint = record
+          x : gint16;
+          y : gint16;
+       end;
+
+     PGdkRectangle = ^TGdkRectangle;
+     TGdkRectangle = record
+          x : gint16;
+          y : gint16;
+          width : guint16;
+          height : guint16;
+       end;
+
+     PGdkSegment = ^TGdkSegment;
+     TGdkSegment = record
+          x1 : gint16;
+          y1 : gint16;
+          x2 : gint16;
+          y2 : gint16;
+       end;
+
+     TGdkCursor = record
+          thetype : TGdkCursorType;
+       end;
+
+     PGdkColorContextDither = ^TGdkColorContextDither;
+     TGdkColorContextDither = record
+          fast_rgb : array[0..31] of array[0..31] of array[0..31] of gint;
+          fast_err : array[0..31] of array[0..31] of array[0..31] of gint;
+          fast_erg : array[0..31] of array[0..31] of array[0..31] of gint;
+          fast_erb : array[0..31] of array[0..31] of array[0..31] of gint;
+       end;
+
+     PGdkColorContext = ^TGdkColorContext;
+     TGdkColorContext = record
+          visual : PGdkVisual;
+          colormap : PGdkColormap;
+          num_colors : gint;
+          max_colors : gint;
+          num_allocated : gint;
+          mode : TGdkColorContextMode;
+          need_to_free_colormap : gint;
+          std_cmap_atom : TGdkAtom;
+          clut : Pgulong;
+          cmap : PGdkColor;
+          color_hash : PGHashTable;
+          palette : PGdkColor;
+          num_palette : gint;
+          fast_dither : PGdkColorContextDither;
+          shifts : record
+               red : gint;
+               green : gint;
+               blue : gint;
+            end;
+          masks : record
+               red : gulong;
+               green : gulong;
+               blue : gulong;
+            end;
+          bits : record
+               red : gint;
+               green : gint;
+               blue : gint;
+            end;
+          max_entry : gulong;
+          black_pixel : gulong;
+          white_pixel : gulong;
+       end;
+
+     PGdkDeviceKey = ^TGdkDeviceKey;
+     TGdkDeviceKey = record
+          keyval : guint;
+          modifiers : TGdkModifierType;
+       end;
+
+     PGdkDeviceInfo = ^TGdkDeviceInfo;
+     TGdkDeviceInfo = record
+          deviceid : guint32;
+          name : ^gchar;
+          source : TGdkInputSource;
+          mode : TGdkInputMode;
+          has_cursor : gint;
+          num_axes : gint;
+          axes : ^TGdkAxisUse;
+          num_keys : gint;
+          keys : PGdkDeviceKey;
+       end;
+
+     PGdkTimeCoord = ^TGdkTimeCoord;
+     TGdkTimeCoord = record
+          time : guint32;
+          x : gdouble;
+          y : gdouble;
+          pressure : gdouble;
+          xtilt : gdouble;
+          ytilt : gdouble;
+       end;
+
+     PGdkDragContext = ^TGdkDragContext;
+     TGdkDragContext = record
+          protocol : TGdkDragProtocol;
+          is_source : gboolean;
+          source_window : PGdkWindow;
+          dest_window : PGdkWindow;
+          targets : PGList;
+          actions : TGdkDragAction;
+          suggested_action : TGdkDragAction;
+          action : TGdkDragAction;
+          start_time : guint32;
+       end;
+
+     TGdkXEvent = pointer;
+     PGdkXEvent = ^TGdkXEvent;
+
+     PGdkEvent = ^TGdkEvent;
+
+     TGdkEventFunc = procedure(event:PGdkEvent;data:gpointer);cdecl;
+     TGdkFilterFunc = function (xevent:PGdkXEvent; event:PGdkEvent; data:gpointer):TGdkFilterReturn;cdecl;
+
+     PGdkEventAny = ^TGdkEventAny;
+     TGdkEventAny = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+       end;
+
+     PGdkEventExpose = ^TGdkEventExpose;
+     TGdkEventExpose = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          area : TGdkRectangle;
+          count : gint;
+       end;
+
+     PGdkEventNoExpose = ^TGdkEventNoExpose;
+     TGdkEventNoExpose = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+       end;
+
+     PGdkEventVisibility = ^TGdkEventVisibility;
+     TGdkEventVisibility = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          state : TGdkVisibilityState;
+       end;
+
+     PGdkEventMotion = ^TGdkEventMotion;
+     TGdkEventMotion = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          time : guint32;
+          x : gdouble;
+          y : gdouble;
+          pressure : gdouble;
+          xtilt : gdouble;
+          ytilt : gdouble;
+          state : guint;
+          is_hint : gint16;
+          source : TGdkInputSource;
+          deviceid : guint32;
+          x_root : gdouble;
+          y_root : gdouble;
+       end;
+
+     PGdkEventButton = ^TGdkEventButton;
+     TGdkEventButton = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          time : guint32;
+          x : gdouble;
+          y : gdouble;
+          pressure : gdouble;
+          xtilt : gdouble;
+          ytilt : gdouble;
+          state : guint;
+          button : guint;
+          source : TGdkInputSource;
+          deviceid : guint32;
+          x_root : gdouble;
+          y_root : gdouble;
+       end;
+
+     PGdkEventKey = ^TGdkEventKey;
+     TGdkEventKey = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          time : guint32;
+          state : guint;
+          keyval : guint;
+          length : gint;
+          thestring : Pgchar;
+       end;
+
+     PGdkEventCrossing = ^TGdkEventCrossing;
+     TGdkEventCrossing = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          subwindow : PGdkWindow;
+          time : guint32;
+          x : gdouble;
+          y : gdouble;
+          x_root : gdouble;
+          y_root : gdouble;
+          mode : TGdkCrossingMode;
+          detail : TGdkNotifyType;
+          focus : gboolean;
+          state : guint;
+       end;
+
+     PGdkEventFocus = ^TGdkEventFocus;
+     TGdkEventFocus = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          thein : gint16;
+       end;
+
+     PGdkEventConfigure = ^TGdkEventConfigure;
+     TGdkEventConfigure = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          x : gint16;
+          y : gint16;
+          width : gint16;
+          height : gint16;
+       end;
+
+     PGdkEventProperty = ^TGdkEventProperty;
+     TGdkEventProperty = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          atom : TGdkAtom;
+          time : guint32;
+          state : guint;
+       end;
+
+     PGdkEventSelection = ^TGdkEventSelection;
+     TGdkEventSelection = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          selection : TGdkAtom;
+          target : TGdkAtom;
+          theproperty : TGdkAtom;
+          requestor : guint32;
+          time : guint32;
+       end;
+
+     PGdkEventProximity = ^TGdkEventProximity;
+     TGdkEventProximity = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          time : guint32;
+          source : TGdkInputSource;
+          deviceid : guint32;
+       end;
+
+     PGdkEventClient = ^TGdkEventClient;
+     TGdkEventClient = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          message_type : TGdkAtom;
+          data_format : gushort;
+          dummy : gushort;
+          data : record
+              case longint of
+                 0 : ( b : array[0..19] of char );
+                 1 : ( s : array[0..9] of system.integer );
+                 2 : ( l : array[0..4] of longint );
+              end;
+       end;
+
+     PGdkEventDND = ^TGdkEventDND;
+     TGdkEventDND = record
+          thetype : TGdkEventType;
+          window : PGdkWindow;
+          send_event : gint8;
+          context : PGdkDragContext;
+          time : guint32;
+          x_root : gshort;
+          y_root : gshort;
+       end;
+
+     TGdkEvent = record
+         case longint of
+            0 : ( thetype : TGdkEventType );
+            1 : ( any : TGdkEventAny );
+            2 : ( expose : TGdkEventExpose );
+            3 : ( no_expose : TGdkEventNoExpose );
+            4 : ( visibility : TGdkEventVisibility );
+            5 : ( motion : TGdkEventMotion );
+            6 : ( button : TGdkEventButton );
+            7 : ( key : TGdkEventKey );
+            8 : ( crossing : TGdkEventCrossing );
+            9 : ( focus_change : TGdkEventFocus );
+            10 : ( configure : TGdkEventConfigure );
+            11 : ( theproperty : TGdkEventProperty );
+            12 : ( selection : TGdkEventSelection );
+            13 : ( proximity : TGdkEventProximity );
+            14 : ( client : TGdkEventClient );
+            15 : ( dnd : TGdkEventDND );
+         end;
+
+     PGdkRegion = ^TGdkRegion;
+     TGdkRegion = record
+          user_data : gpointer;
+       end;
+
+     PGdkICAttr = ^TGdkICAttr;
+     TGdkICAttr = record
+          style : TGdkIMStyle;
+          client_window : PGdkWindow;
+          focus_window : PGdkWindow;
+          filter_events : TGdkEventMask;
+          spot_location : TGdkPoint;
+          line_spacing : gint;
+          cursor : PGdkCursor;
+          preedit_fontset : PGdkFont;
+          preedit_area : TGdkRectangle;
+          preedit_area_needed : TGdkRectangle;
+          preedit_foreground : TGdkColor;
+          preedit_background : TGdkColor;
+          preedit_pixmap : PGdkPixmap;
+          preedit_colormap : PGdkColormap;
+          status_fontset : PGdkFont;
+          status_area : TGdkRectangle;
+          status_area_needed : TGdkRectangle;
+          status_foreground : TGdkColor;
+          status_background : TGdkColor;
+          status_pixmap : PGdkPixmap;
+          status_colormap : PGdkColormap;
+       end;
+
+{$endif read_interface}
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.11  1999/10/06 17:42:47  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.10  1999/10/05 09:28:26  peter
+    * patches from Frank Loemker
+
+  Revision 1.9  1999/07/23 16:11:45  peter
+    * use packrecords C
+
+  Revision 1.8  1999/06/29 23:46:50  peter
+    * changed enums to constants
+
+  Revision 1.7  1999/05/11 00:37:54  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 09:02:39  peter
+    * gtk 1.2 port working
+
+  Revision 1.5  1999/05/07 10:40:20  peter
+    * first things for 1.2
+
+  Revision 1.4  1999/01/26 12:42:22  michael
+  *** empty log message ***
+
+  Revision 1.3  1998/10/22 16:58:18  pierre
+   * PTGdkAtom was pointing to itself
+
+  Revision 1.2  1998/10/21 20:22:02  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}

+ 141 - 0
packages/gtk/gdk/gdkx.pp

@@ -0,0 +1,141 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+{$ifndef gtkwin}
+function  GDK_GET_ROOT_WINDOW : PGdkWindow;
+function  GDK_GET_ROOT_PARENT : PGdkWindow;
+function  GDK_GET_XDISPLAY : PDisplay;
+function  GDK_WINDOW_XDISPLAY(win : PGdkWindowPrivate) : PDisplay;
+function  GDK_WINDOW_XWINDOW(win : PGdkWindowPrivate) : Twindow;
+function  GDK_IMAGE_XDISPLAY(image : PGdkImagePrivate) : PDisplay;
+function  GDK_IMAGE_XIMAGE(image : PGdkImagePrivate) : PXImage;
+function  GDK_GC_XDISPLAY(gc : PGdkGCPrivate) : PDisplay;
+function  GDK_GC_XGC(gc : PGdkGCPrivate) : TGC;
+function  GDK_COLORMAP_XDISPLAY(cmap : PGdkColorMapPrivate) : PDisplay;
+function  GDK_COLORMAP_XCOLORMAP(cmap : PGdkColorMapPrivate) : TColorMap;
+function  GDK_VISUAL_XVISUAL(vis : PGdkVisualPrivate) : PVisual;
+function  GDK_FONT_XDISPLAY(font : PGdkFontPrivate) : PDisplay;
+function  GDK_FONT_XFONT(font : PGdkFontPrivate) : gpointer;
+
+function  gdkx_visual_get(xvisualid:TVisualID):PGdkVisual;cdecl;external gdkdll name 'gdkx_visual_get';
+function  gdkx_colormap_get(xcolormap:TColormap):PGdkColormap;cdecl;external gdkdll name 'gdkx_colormap_get';
+function  gdk_get_client_window(dpy:pDisplay; win:TWindow):TWindow;cdecl;external gdkdll name 'gdk_get_client_window';
+function  gdk_pixmap_foreign_new(anid:guint32):PGdkPixmap;cdecl;external gdkdll name 'gdk_pixmap_foreign_new';
+function  gdk_window_foreign_new(anid:guint32):PGdkWindow;cdecl;external gdkdll name 'gdk_window_foreign_new';
+{$endif}
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+{$ifndef gtkwin}
+function  GDK_GET_ROOT_WINDOW : PGdkWindow;
+    begin
+       GDK_GET_ROOT_WINDOW:=PGdkwindow(gdk_root_window);
+    end;
+
+function  GDK_GET_ROOT_PARENT : PGdkWindow;
+    begin
+       GDK_GET_ROOT_PARENT:=PGdkWindow(@(gdk_root_parent));
+    end;
+
+function  GDK_GET_XDISPLAY : PDisplay;
+    begin
+       GDK_GET_XDISPLAY:=gdk_display;
+    end;
+
+function  GDK_WINDOW_XDISPLAY(win : PGdkWindowPrivate) : PDisplay;
+    begin
+       GDK_WINDOW_XDISPLAY:=(PGdkWindowPrivate(win))^.xdisplay;
+    end;
+
+function  GDK_WINDOW_XWINDOW(win : PGdkWindowPrivate) : Twindow;
+    begin
+       GDK_WINDOW_XWINDOW:=(PGdkWindowPrivate(win))^.xwindow;
+    end;
+
+function  GDK_IMAGE_XDISPLAY(image : PGdkImagePrivate) : PDisplay;
+    begin
+       GDK_IMAGE_XDISPLAY:=(PGdkImagePrivate(image))^.xdisplay;
+    end;
+
+function  GDK_IMAGE_XIMAGE(image : PGdkImagePrivate) : PXImage;
+    begin
+       GDK_IMAGE_XIMAGE:=(PGdkImagePrivate(image))^.ximage;
+    end;
+
+function  GDK_GC_XDISPLAY(gc : PGdkGCPrivate) : PDisplay;
+    begin
+       GDK_GC_XDISPLAY:=(PGdkGCPrivate(gc))^.xdisplay;
+    end;
+
+function  GDK_GC_XGC(gc : PGdkGCPrivate) : TGC;
+    begin
+       GDK_GC_XGC:=(PGdkGCPrivate(gc))^.xgc;
+    end;
+
+function  GDK_COLORMAP_XDISPLAY(cmap : PGdkColorMapPrivate) : PDisplay;
+    begin
+       GDK_COLORMAP_XDISPLAY:=(PGdkColormapPrivate(cmap))^.xdisplay;
+    end;
+
+function  GDK_COLORMAP_XCOLORMAP(cmap : PGdkColorMapPrivate) : TColorMap;
+    begin
+       GDK_COLORMAP_XCOLORMAP:=(PGdkColormapPrivate(cmap))^.xcolormap;
+    end;
+
+function  GDK_VISUAL_XVISUAL(vis : PGdkVisualPrivate) : PVisual;
+    begin
+       GDK_VISUAL_XVISUAL:=(PGdkVisualPrivate(vis))^.xvisual;
+    end;
+
+function  GDK_FONT_XDISPLAY(font : PGdkFontPrivate) : PDisplay;
+    begin
+       GDK_FONT_XDISPLAY:=(PGdkFontPrivate(font))^.xdisplay;
+    end;
+
+function  GDK_FONT_XFONT(font : PGdkFontPrivate) : gpointer;
+    begin
+       GDK_FONT_XFONT:=(PGdkFontPrivate(font))^.xfont;
+    end;
+
+{$endif}
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.5  1999/10/21 14:35:23  peter
+    * removed glibdll constant
+
+  Revision 1.4  1999/10/06 17:42:47  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.3  1999/05/11 00:37:55  peter
+    * win32 fixes
+
+  Revision 1.2  1999/05/07 15:09:44  peter
+    * more fixes
+
+  Revision 1.1  1999/05/07 10:40:22  peter
+    * first things for 1.2
+
+}
+

+ 1707 - 0
packages/gtk/glib/glib.pp

@@ -0,0 +1,1707 @@
+{
+   $Id$
+
+   GLIB - Library of useful routines for C programming
+   Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this library; if not, write to the
+   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.
+}
+unit glib;
+interface
+
+{$mode objfpc}
+
+{$ifdef win32}
+  const
+    glibdll='glib-1.3';
+  {$define gtkwin}
+{$else}
+  const
+    glibdll='glib';
+  {$linklib c}
+{$endif}
+
+{$packrecords C}
+
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+  PLongint  = ^Longint;
+  PByte     = ^Byte;
+  PWord     = ^Word;
+  PINteger  = ^Integer;
+  PCardinal = ^Cardinal;
+  PReal     = ^Real;
+  PDouble   = ^Double;
+  FLoat     = Single;
+
+  const
+     NULL = nil;
+
+     G_DIR_SEPARATOR = '/';
+     G_DIR_SEPARATOR_S = '/';
+     G_SEARCHPATH_SEPARATOR = ':';
+     G_SEARCHPATH_SEPARATOR_S = ':';
+
+type
+   PPgchar = ^Pgchar;
+   Pgchar = ^gchar;
+   gchar = char;
+   Pgshort = ^gshort;
+   gshort = system.integer;
+   Pglong = ^glong;
+   glong = longint;
+   Pgint = ^gint;
+   gint = longint;
+   Pgboolean = ^gboolean;
+   gboolean = longbool;
+   Pguchar = ^guchar;
+   guchar = char;
+   Pgushort = ^gushort;
+   gushort = word;
+   Pgulong = ^gulong;
+   gulong = cardinal;
+   Pguint = ^guint;
+   guint = cardinal;
+   Pgfloat = ^gfloat;
+   gfloat = float;
+   Pgdouble = ^gdouble;
+   gdouble = double;
+   Pgpointer = ^gpointer;
+   gpointer = pointer;
+
+   gint8 = ShortInt;
+   guint8 = byte;
+   gint16 = system.integer;
+   guint16 = word;
+   gint32 = longint;
+   guint32 = cardinal;
+
+   Pgint8 = ^ShortInt;
+   Pguint8 = ^byte;
+   Pgint16 = ^integer;
+   Pguint16 = ^word;
+   Pgint32 = ^longint;
+   Pguint32 = ^cardinal;
+
+   PPgint8 = ^Pgint8;
+   PPguint8 = ^Pguint8;
+   PPgint16 = ^Pgint16;
+   PPguint16 = ^Pguint16;
+   PPgint32 = ^Pgint32;
+   PPguint32 = ^Pguint32;
+
+   gconstpointer = pointer;
+   gssize = gint32;
+   gsize = guint32;
+   TGQuark = guint32;
+   TGTime = gint32;
+
+var
+   glib_major_version : guint;external glibdll name 'glib_major_version';
+   glib_minor_version : guint;external glibdll name 'glib_minor_version';
+   glib_micro_version : guint;external glibdll name 'glib_micro_version';
+   glib_interface_age : guint;external glibdll name 'glib_interface_age';
+   glib_binary_age : guint;external glibdll name 'glib_binary_age';
+
+type
+   PGList = ^TGList;
+   TGList = record
+        data : gpointer;
+        next : PGList;
+        prev : PGList;
+     end;
+   PGSList = ^TGSList;
+   PPGSList = ^PGSList;
+   TGSList = record
+        data : gpointer;
+        next : PGSList;
+     end;
+   PGString = ^TGString;
+   TGString = record
+        str : Pgchar;
+        len : gint;
+     end;
+   PGArray = ^TGArray;
+   TGArray = record
+        data : Pgchar;
+        len : guint;
+     end;
+   PGDebugKey = ^TGDebugKey;
+   TGDebugKey = record
+        key : Pgchar;
+        value : guint;
+     end;
+   PGHashTable = ^TGHashTable;
+   TGHashTable = record
+        dummy : gint;
+     end;
+   PGCache = ^TGCache;
+   TGCache = record
+        dummy : gint;
+     end;
+   PGTree = ^TGTree;
+   TGTree = record
+        dummy : gint;
+     end;
+   PGTimer = ^TGTimer;
+   TGTimer = record
+        dummy : gint;
+     end;
+   PGMemChunk = ^TGMemChunk;
+   TGMemChunk = record
+        dummy : gint;
+     end;
+   PGStringChunk = ^TGStringChunk;
+   TGStringChunk = record
+        dummy : gint;
+     end;
+
+     PGByteArray = ^TGByteArray;
+     TGByteArray = record
+          data : Pguint8;
+          len : guint;
+       end;
+
+     PGPtrArray = ^TGPtrArray;
+     TGPtrArray = record
+          pdata : Pgpointer;
+          len : guint;
+       end;
+
+     PGTuples = ^TGTuples;
+     TGTuples = record
+          len : guint;
+       end;
+
+type
+   PGTraverseType = ^TGTraverseType;
+   TGTraverseType = longint;
+const
+   G_IN_ORDER = 0;
+   G_PRE_ORDER = 1;
+   G_POST_ORDER = 2;
+
+type
+    TGTraverseFlags = longint;
+const
+    G_TRAVERSE_LEAFS = 1 shl 0;
+    G_TRAVERSE_NON_LEAFS = 1 shl 1;
+    G_TRAVERSE_ALL = 1 shl 0 + 1 shl 1;
+    G_TRAVERSE_MASK = 3;
+
+type
+    TGLogLevelFlags = longint;
+const
+    G_LOG_FLAG_RECURSION = 1 shl 0;
+    G_LOG_FLAG_FATAL = 1 shl 1;
+    G_LOG_LEVEL_ERROR = 1 shl 2;
+    G_LOG_LEVEL_CRITICAL = 1 shl 3;
+    G_LOG_LEVEL_WARNING = 1 shl 4;
+    G_LOG_LEVEL_MESSAGE = 1 shl 5;
+    G_LOG_LEVEL_INFO = 1 shl 6;
+    G_LOG_LEVEL_DEBUG = 1 shl 7;
+    G_LOG_LEVEL_MASK = (1 shl 8) - 2;
+
+    type
+       PGNode = ^TGNode;
+       TGNode = record
+            data : gpointer;
+            next : PGNode;
+            prev : PGNode;
+            parent : PGNode;
+            children : PGNode;
+         end;
+
+    const
+       G_HOOK_FLAG_USER_SHIFT = 4;
+
+    type
+       TGHookFlagMask = longint;
+    const
+       G_HOOK_FLAG_ACTIVE = 1 shl 0;
+       G_HOOK_FLAG_IN_CALL = 1 shl 1;
+       G_HOOK_FLAG_MASK = $0f;
+
+    type
+       PGHook = ^TGHook;
+       PGHookList = ^TGHookList;
+
+       TGHookCompareFunc = function (new_hook:PGHook; sibling:PGHook):gint;cdecl;
+       TGHookFindFunc = function (hook:PGHook; data:gpointer):gboolean;cdecl;
+       TGHookMarshaller = procedure (hook:PGHook; data:gpointer);cdecl;
+       TGHookCheckMarshaller = function (hook:PGHook; data:gpointer):gboolean;cdecl;
+       TGHookFunc = procedure (data:gpointer);cdecl;
+       TGHookCheckFunc = function (data:gpointer):gboolean;cdecl;
+       TGHookFreeFunc = procedure (hook_list:PGHookList; hook:PGHook);cdecl;
+
+       TGDestroyNotify = procedure (data:gpointer);cdecl;
+
+       TGHookList = record
+            seq_id : guint;
+            hook_size : guint;
+            flag0 : word;
+            hooks : PGHook;
+            hook_memchunk : PGMemChunk;
+            hook_free : TGHookFreeFunc;
+            hook_destroy : TGHookFreeFunc;
+         end;
+
+       TGHook = record
+            data : gpointer;
+            next : PGHook;
+            prev : PGHook;
+            ref_count : guint;
+            hook_id : guint;
+            flags : guint;
+            func : gpointer;
+            destroy : TGDestroyNotify;
+         end;
+
+    const
+       bm_TGHookList_is_setup = $1;
+       bp_TGHookList_is_setup = 0;
+
+const
+   G_CSET_UA_2_Z = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+   G_CSET_a_2_z = 'abcdefghijklmnopqrstuvwxyz';
+
+type
+   PGErrorType = ^TGErrorType;
+   TGErrorType = longint;
+const
+   G_ERR_UNKNOWN = 0;
+   G_ERR_UNEXP_EOF = 1;
+   G_ERR_UNEXP_EOF_IN_STRING = 2;
+   G_ERR_UNEXP_EOF_IN_COMMENT = 3;
+   G_ERR_NON_DIGIT_IN_CONST = 4;
+   G_ERR_DIGIT_RADIX = 5;
+   G_ERR_FLOAT_RADIX = 6;
+   G_ERR_FLOAT_MALFORMED = 7;
+
+type
+  PGTokenType = ^TGTokenType;
+  TGTokenType = longint;
+const
+    G_TOKEN_EOF                   = 0;
+    G_TOKEN_LEFT_PAREN            = ord('(');
+    G_TOKEN_RIGHT_PAREN           = ord(')');
+    G_TOKEN_LEFT_CURLY            = ord('{');
+    G_TOKEN_RIGHT_CURLY           = ord('}');
+    G_TOKEN_LEFT_BRACE            = ord('[');
+    G_TOKEN_RIGHT_BRACE           = ord(']');
+    G_TOKEN_EQUAL_SIGN            = ord('=');
+    G_TOKEN_COMMA                 = ord(',');
+
+    G_TOKEN_NONE                  = 256;
+
+    G_TOKEN_ERROR = 257;
+
+    G_TOKEN_CHAR = 258;
+    G_TOKEN_BINARY = 259;
+    G_TOKEN_OCTAL = 260;
+    G_TOKEN_INT = 261;
+    G_TOKEN_HEX = 262;
+    G_TOKEN_FLOAT = 263;
+    G_TOKEN_STRING = 264;
+
+    G_TOKEN_SYMBOL = 265;
+    G_TOKEN_IDENTIFIER = 266;
+    G_TOKEN_IDENTIFIER_NULL = 267;
+
+    G_TOKEN_COMMENT_SINGLE = 268;
+    G_TOKEN_COMMENT_MULTI = 269;
+    G_TOKEN_LAST = 270;
+
+type
+   PGTokenValue = ^TGTokenValue;
+   TGTokenValue = record
+       case longint of
+          0 : ( v_symbol:gpointer );
+          1 : ( v_identifier:Pgchar );
+          2 : ( v_binary:gulong );
+          3 : ( v_octal:gulong );
+          4 : ( v_int:gulong );
+          5 : ( v_float:gdouble );
+          6 : ( v_hex:gulong );
+          7 : ( v_string:Pgchar );
+          8 : ( v_comment:Pgchar );
+          9 : ( v_char:guchar );
+          10 : ( v_error:guint );
+     end;
+
+PGScannerConfig = ^TGScannerConfig;
+TGScannerConfig = Record
+         cset_skip_characters,
+         cset_identifier_first,
+         cset_identifier_nth,
+         cpair_comment_single : Pgchar;
+         flag0 : guint;
+end;
+   PGScanner = ^TGScanner;
+
+  TGScannerMsgFunc = procedure (scanner:PGScanner; message:Pgchar; error:gint);cdecl;
+
+   TGScanner = record
+            user_data : gpointer;
+            max_parse_errors : guint;
+            parse_errors : guint;
+            input_name : Pgchar;
+            derived_data : gpointer;
+            config : PGScannerConfig;
+            token :TGTokenType;
+            value : TGTokenValue;
+            line : guint;
+            position : guint;
+            next_token :TGTokenType;
+            next_value : TGTokenValue;
+            next_line : guint;
+            next_position : guint;
+            symbol_table : PGHashTable;
+            input_fd : gint;
+            text : Pgchar;
+            text_end : Pgchar;
+            buffer : Pgchar;
+            scope_id : guint;
+            msg_handler :TGScannerMsgFunc;
+     end;
+
+
+    const
+       bm_TGScannerConfig_case_sensitive = $1;
+       bp_TGScannerConfig_case_sensitive = 0;
+       bm_TGScannerConfig_skip_comment_multi = $2;
+       bp_TGScannerConfig_skip_comment_multi = 1;
+       bm_TGScannerConfig_skip_comment_single = $4;
+       bp_TGScannerConfig_skip_comment_single = 2;
+       bm_TGScannerConfig_scan_comment_multi = $8;
+       bp_TGScannerConfig_scan_comment_multi = 3;
+       bm_TGScannerConfig_scan_identifier = $10;
+       bp_TGScannerConfig_scan_identifier = 4;
+       bm_TGScannerConfig_scan_identifier_1char = $20;
+       bp_TGScannerConfig_scan_identifier_1char = 5;
+       bm_TGScannerConfig_scan_identifier_NULL = $40;
+       bp_TGScannerConfig_scan_identifier_NULL = 6;
+       bm_TGScannerConfig_scan_symbols = $80;
+       bp_TGScannerConfig_scan_symbols = 7;
+       bm_TGScannerConfig_scan_binary = $100;
+       bp_TGScannerConfig_scan_binary = 8;
+       bm_TGScannerConfig_scan_octal = $200;
+       bp_TGScannerConfig_scan_octal = 9;
+       bm_TGScannerConfig_scan_float = $400;
+       bp_TGScannerConfig_scan_float = 10;
+       bm_TGScannerConfig_scan_hex = $800;
+       bp_TGScannerConfig_scan_hex = 11;
+       bm_TGScannerConfig_scan_hex_dollar = $1000;
+       bp_TGScannerConfig_scan_hex_dollar = 12;
+       bm_TGScannerConfig_scan_string_sq = $2000;
+       bp_TGScannerConfig_scan_string_sq = 13;
+       bm_TGScannerConfig_scan_string_dq = $4000;
+       bp_TGScannerConfig_scan_string_dq = 14;
+       bm_TGScannerConfig_numbers_2_int = $8000;
+       bp_TGScannerConfig_numbers_2_int = 15;
+       bm_TGScannerConfig_int_2_float = $10000;
+       bp_TGScannerConfig_int_2_float = 16;
+       bm_TGScannerConfig_identifier_2_string = $20000;
+       bp_TGScannerConfig_identifier_2_string = 17;
+       bm_TGScannerConfig_char_2_token = $40000;
+       bp_TGScannerConfig_char_2_token = 18;
+       bm_TGScannerConfig_symbol_2_token = $80000;
+       bp_TGScannerConfig_symbol_2_token = 19;
+       bm_TGScannerConfig_scope_0_fallback = $100000;
+       bp_TGScannerConfig_scope_0_fallback = 20;
+
+type
+   PGFunc = ^TGFunc;
+   TGFunc = procedure(data:gpointer; user_data:gpointer);cdecl;
+   PGHFunc = ^TGHFunc;
+   TGHFunc = procedure(key:gpointer; value:gpointer; user_data:gpointer);cdecl;
+   PGHRFunc = ^TGHRFunc;
+   TGHRFunc = function (key:gpointer; value:gpointer; user_data:gpointer):gboolean;cdecl;
+   PGHashFunc = ^TGHashFunc;
+   TGHashFunc = function(key:gpointer):guint;cdecl;
+   PGCompareFunc = ^TGCompareFunc;
+   TGCompareFunc = function (a:gpointer; b:gpointer):gint;cdecl;
+   PGCacheNewFunc = ^TGCacheNewFunc;
+   TGCacheNewFunc = function(key:gpointer):gpointer;cdecl;
+   PGCacheDupFunc = ^TGCacheDupFunc;
+   TGCacheDupFunc = function(value:gpointer):gpointer;cdecl;
+   PGCacheDestroyFunc = ^TGCacheDestroyFunc;
+   TGCacheDestroyFunc = procedure(value:gpointer);cdecl;
+   PGTraverseFunc = ^TGTraverseFunc;
+   TGTraverseFunc = function(key:gpointer; value:gpointer; data:gpointer):gint;cdecl;
+   PGSearchFunc = ^TGSearchFunc;
+   TGSearchFunc = function(key:gpointer; data:gpointer):gint;cdecl;
+   PGErrorFunc = ^TGErrorFunc;
+   TGErrorFunc = procedure(str:Pgchar);cdecl;
+   PGWarningFunc = ^TGWarningFunc;
+   TGWarningFunc = procedure(str:Pgchar);cdecl;
+   PGPrintFunc = ^TGPrintFunc;
+   TGPrintFunc = procedure(str:Pgchar);cdecl;
+
+   TGCompletionFunc = function (_para1:gpointer):Pgchar;cdecl;
+   TGDataForeachFunc = procedure (key_id:TGQuark; data:gpointer; user_data:gpointer);cdecl;
+   TGFreeFunc = procedure (data:gpointer);cdecl;
+   TGLogFunc = procedure (log_domain:Pgchar; log_level:TGLogLevelFlags; message:Pgchar; user_data:gpointer);cdecl;
+   TGNodeTraverseFunc = function (node:PGNode; data:gpointer):gboolean;cdecl;
+   TGNodeForeachFunc = procedure (node:PGNode; data:gpointer);cdecl;
+   TGVoidFunc = procedure ;cdecl;
+
+   PGallocator = pointer;
+   PGrelation  = pointer;
+   PGData      = pointer;
+   PPGData     = ^PGData;
+   PTm         = pointer;
+   PGMainloop  = pointer;
+   PGMutex     = pointer;
+
+{$ifndef gtkwin}
+procedure g_list_push_allocator(allocator:PGAllocator);cdecl;external glibdll name 'g_list_push_allocator';
+procedure g_list_pop_allocator;cdecl;external glibdll name 'g_list_pop_allocator';
+{$endif}
+function  g_list_alloc:PGList;cdecl;external glibdll name 'g_list_alloc';
+procedure g_list_free(list:PGList);cdecl;external glibdll name 'g_list_free';
+procedure g_list_free_1(list:PGList);cdecl;external glibdll name 'g_list_free_1';
+function  g_list_append(list:PGList; data:gpointer):PGList;cdecl;external glibdll name 'g_list_append';
+function  g_list_prepend(list:PGList; data:gpointer):PGList;cdecl;external glibdll name 'g_list_prepend';
+function  g_list_insert(list:PGList; data:gpointer; position:gint):PGList;cdecl;external glibdll name 'g_list_insert';
+function  g_list_insert_sorted(list:PGList; data:gpointer; func:TGCompareFunc):PGList;cdecl;external glibdll name 'g_list_insert_sorted';
+function  g_list_concat(list1:PGList; list2:PGList):PGList;cdecl;external glibdll name 'g_list_concat';
+function  g_list_remove(list:PGList; data:gpointer):PGList;cdecl;external glibdll name 'g_list_remove';
+function  g_list_remove_link(list:PGList; link:PGList):PGList;cdecl;external glibdll name 'g_list_remove_link';
+function  g_list_reverse(list:PGList):PGList;cdecl;external glibdll name 'g_list_reverse';
+function  g_list_copy(list:PGList):PGList;cdecl;external glibdll name 'g_list_copy';
+function  g_list_nth(list:PGList; n:guint):PGList;cdecl;external glibdll name 'g_list_nth';
+function  g_list_find(list:PGList; data:gpointer):PGList;cdecl;external glibdll name 'g_list_find';
+function  g_list_find_custom(list:PGList; data:gpointer; func:TGCompareFunc):PGList;cdecl;external glibdll name 'g_list_find_custom';
+function  g_list_index(list:PGList; data:gpointer):gint;cdecl;external glibdll name 'g_list_index';
+function  g_list_position(list:PGList; llink:PGList):gint;cdecl;external glibdll name 'g_list_position';
+function  g_list_last(list:PGList):PGList;cdecl;external glibdll name 'g_list_last';
+function  g_list_first(list:PGList):PGList;cdecl;external glibdll name 'g_list_first';
+function  g_list_length(list:PGList):guint;cdecl;external glibdll name 'g_list_length';
+procedure g_list_foreach(list:PGList; func:TGFunc; user_data:gpointer);cdecl;external glibdll name 'g_list_foreach';
+function  g_list_sort(list:PGList; compare_func:TGCompareFunc):PGList;cdecl;external glibdll name 'g_list_sort';
+function  g_list_nth_data(list:PGList; n:guint):gpointer;cdecl;external glibdll name 'g_list_nth_data';
+function  g_list_previous(list : PGlist) : PGlist;
+function  g_list_next(list : PGlist) : PGlist;
+
+{$ifndef gtkwin}
+procedure g_slist_push_allocator(allocator:PGAllocator);cdecl;external glibdll name 'g_slist_push_allocator';
+procedure g_slist_pop_allocator;cdecl;external glibdll name 'g_slist_pop_allocator';
+{$endif}
+function  g_slist_alloc:PGSList;cdecl;external glibdll name 'g_slist_alloc';
+procedure g_slist_free(list:PGSList);cdecl;external glibdll name 'g_slist_free';
+procedure g_slist_free_1(list:PGSList);cdecl;external glibdll name 'g_slist_free_1';
+function  g_slist_append(list:PGSList; data:gpointer):PGSList;cdecl;external glibdll name 'g_slist_append';
+function  g_slist_prepend(list:PGSList; data:gpointer):PGSList;cdecl;external glibdll name 'g_slist_prepend';
+function  g_slist_insert(list:PGSList; data:gpointer; position:gint):PGSList;cdecl;external glibdll name 'g_slist_insert';
+function  g_slist_insert_sorted(list:PGSList; data:gpointer; func:TGCompareFunc):PGSList;cdecl;external glibdll name 'g_slist_insert_sorted';
+function  g_slist_concat(list1:PGSList; list2:PGSList):PGSList;cdecl;external glibdll name 'g_slist_concat';
+function  g_slist_remove(list:PGSList; data:gpointer):PGSList;cdecl;external glibdll name 'g_slist_remove';
+function  g_slist_remove_link(list:PGSList; link:PGSList):PGSList;cdecl;external glibdll name 'g_slist_remove_link';
+function  g_slist_reverse(list:PGSList):PGSList;cdecl;external glibdll name 'g_slist_reverse';
+function  g_slist_copy(list:PGSList):PGSList;cdecl;external glibdll name 'g_slist_copy';
+function  g_slist_nth(list:PGSList; n:guint):PGSList;cdecl;external glibdll name 'g_slist_nth';
+function  g_slist_find(list:PGSList; data:gpointer):PGSList;cdecl;external glibdll name 'g_slist_find';
+function  g_slist_find_custom(list:PGSList; data:gpointer; func:TGCompareFunc):PGSList;cdecl;external glibdll name 'g_slist_find_custom';
+function  g_slist_position(list:PGSList; llink:PGSList):gint;cdecl;external glibdll name 'g_slist_position';
+function  g_slist_index(list:PGSList; data:gpointer):gint;cdecl;external glibdll name 'g_slist_index';
+function  g_slist_last(list:PGSList):PGSList;cdecl;external glibdll name 'g_slist_last';
+function  g_slist_length(list:PGSList):guint;cdecl;external glibdll name 'g_slist_length';
+procedure g_slist_foreach(list:PGSList; func:TGFunc; user_data:gpointer);cdecl;external glibdll name 'g_slist_foreach';
+function  g_slist_sort(list:PGSList; compare_func:TGCompareFunc):PGSList;cdecl;external glibdll name 'g_slist_sort';
+function  g_slist_nth_data(list:PGSList; n:guint):gpointer;cdecl;external glibdll name 'g_slist_nth_data';
+function  g_slist_next(slist : PGSList) : PGSList;
+
+function  g_hash_table_new(hash_func:TGHashFunc; key_compare_func:TGCompareFunc):PGHashTable;cdecl;external glibdll name 'g_hash_table_new';
+procedure g_hash_table_destroy(hash_table:PGHashTable);cdecl;external glibdll name 'g_hash_table_destroy';
+procedure g_hash_table_insert(hash_table:PGHashTable; key:gpointer; value:gpointer);cdecl;external glibdll name 'g_hash_table_insert';
+procedure g_hash_table_remove(hash_table:PGHashTable; key:gpointer);cdecl;external glibdll name 'g_hash_table_remove';
+function  g_hash_table_lookup(hash_table:PGHashTable; key:gpointer):gpointer;cdecl;external glibdll name 'g_hash_table_lookup';
+function  g_hash_table_lookup_extended(hash_table:PGHashTable; lookup_key:gconstpointer; orig_key:Pgpointer; value:Pgpointer):gboolean;cdecl;external glibdll name 'g_hash_table_lookup_extended';
+procedure g_hash_table_freeze(hash_table:PGHashTable);cdecl;external glibdll name 'g_hash_table_freeze';
+procedure g_hash_table_thaw(hash_table:PGHashTable);cdecl;external glibdll name 'g_hash_table_thaw';
+procedure g_hash_table_foreach(hash_table:PGHashTable; func:TGHFunc; user_data:gpointer);cdecl;external glibdll name 'g_hash_table_foreach';
+function  g_hash_table_foreach_remove(hash_table:PGHashTable; func:TGHRFunc; user_data:gpointer):guint;cdecl;external glibdll name 'g_hash_table_foreach_remove';
+function  g_hash_table_size(hash_table:PGHashTable):guint;cdecl;external glibdll name 'g_hash_table_size';
+
+function  g_cache_new(value_new_func:TGCacheNewFunc; value_destroy_func:TGCacheDestroyFunc; key_dup_func:TGCacheDupFunc; key_destroy_func:TGCacheDestroyFunc; hash_key_func:TGHashFunc; hash_value_func:TGHashFunc; key_compare_func:TGCompareFunc):PGCache;cdecl;external glibdll name 'g_cache_new';
+procedure g_cache_destroy(cache:PGCache);cdecl;external glibdll name 'g_cache_destroy';
+function  g_cache_insert(cache:PGCache; key:gpointer):gpointer;cdecl;external glibdll name 'g_cache_insert';
+procedure g_cache_remove(cache:PGCache; value:gpointer);cdecl;external glibdll name 'g_cache_remove';
+procedure g_cache_key_foreach(cache:PGCache; func:TGHFunc; user_data:gpointer);cdecl;external glibdll name 'g_cache_key_foreach';
+procedure g_cache_value_foreach(cache:PGCache; func:TGHFunc; user_data:gpointer);cdecl;external glibdll name 'g_cache_value_foreach';
+
+function  g_tree_new(key_compare_func:TGCompareFunc):PGTree;cdecl;external glibdll name 'g_tree_new';
+procedure g_tree_destroy(tree:PGTree);cdecl;external glibdll name 'g_tree_destroy';
+procedure g_tree_insert(tree:PGTree; key:gpointer; value:gpointer);cdecl;external glibdll name 'g_tree_insert';
+procedure g_tree_remove(tree:PGTree; key:gpointer);cdecl;external glibdll name 'g_tree_remove';
+function  g_tree_lookup(tree:PGTree; key:gpointer):gpointer;cdecl;external glibdll name 'g_tree_lookup';
+procedure g_tree_traverse(tree:PGTree; traverse_func:TGTraverseFunc; traverse_type:TGTraverseType; data:gpointer);cdecl;external glibdll name 'g_tree_traverse';
+function  g_tree_search(tree:PGTree; search_func:TGSearchFunc; data:gpointer):gpointer;cdecl;external glibdll name 'g_tree_search';
+function  g_tree_height(tree:PGTree):gint;cdecl;external glibdll name 'g_tree_height';
+function  g_tree_nnodes(tree:PGTree):gint;cdecl;external glibdll name 'g_tree_nnodes';
+
+function  G_NODE_IS_ROOT(node : PGNode) : boolean;
+function  G_NODE_IS_LEAF(node : PGNode) : boolean;
+{$ifndef gtkwin}
+procedure g_node_push_allocator(allocator:PGAllocator);cdecl;external glibdll name 'g_node_push_allocator';
+procedure g_node_pop_allocator;cdecl;external glibdll name 'g_node_pop_allocator';
+{$endif}
+function  g_node_new(data:gpointer):PGNode;cdecl;external glibdll name 'g_node_new';
+procedure g_node_destroy(root:PGNode);cdecl;external glibdll name 'g_node_destroy';
+procedure g_node_unlink(node:PGNode);cdecl;external glibdll name 'g_node_unlink';
+function  g_node_insert(parent:PGNode; position:gint; node:PGNode):PGNode;cdecl;external glibdll name 'g_node_insert';
+function  g_node_insert_before(parent:PGNode; sibling:PGNode; node:PGNode):PGNode;cdecl;external glibdll name 'g_node_insert_before';
+function  g_node_prepend(parent:PGNode; node:PGNode):PGNode;cdecl;external glibdll name 'g_node_prepend';
+function  g_node_n_nodes(root:PGNode; flags:TGTraverseFlags):guint;cdecl;external glibdll name 'g_node_n_nodes';
+function  g_node_get_root(node:PGNode):PGNode;cdecl;external glibdll name 'g_node_get_root';
+function  g_node_is_ancestor(node:PGNode; descendant:PGNode):gboolean;cdecl;external glibdll name 'g_node_is_ancestor';
+function  g_node_depth(node:PGNode):guint;cdecl;external glibdll name 'g_node_depth';
+function  g_node_find(root:PGNode; order:TGTraverseType; flags:TGTraverseFlags; data:gpointer):PGNode;cdecl;external glibdll name 'g_node_find';
+function  g_node_append(parent,node : PGNode) : PGNode;
+function  g_node_insert_data(parent:PGNode;position:gint;data : pointer) : PGNode;
+function  g_node_insert_data_before(parent,sibling:PGNode;data : pointer) : PGNode;
+function  g_node_prepend_data(parent:PGNode;data : pointer) : PGNode;
+function  g_node_append_data(parent:PGNode;data : pointer) : PGNode;
+procedure g_node_traverse(root:PGNode; order:TGTraverseType; flags:TGTraverseFlags; max_depth:gint; func:TGNodeTraverseFunc; data:gpointer);cdecl;external glibdll name 'g_node_traverse';
+function  g_node_max_height(root:PGNode):guint;cdecl;external glibdll name 'g_node_max_height';
+procedure g_node_children_foreach(node:PGNode; flags:TGTraverseFlags; func:TGNodeForeachFunc; data:gpointer);cdecl;external glibdll name 'g_node_children_foreach';
+procedure g_node_reverse_children(node:PGNode);cdecl;external glibdll name 'g_node_reverse_children';
+function  g_node_n_children(node:PGNode):guint;cdecl;external glibdll name 'g_node_n_children';
+function  g_node_nth_child(node:PGNode; n:guint):PGNode;cdecl;external glibdll name 'g_node_nth_child';
+function  g_node_last_child(node:PGNode):PGNode;cdecl;external glibdll name 'g_node_last_child';
+function  g_node_find_child(node:PGNode; flags:TGTraverseFlags; data:gpointer):PGNode;cdecl;external glibdll name 'g_node_find_child';
+function  g_node_child_position(node:PGNode; child:PGNode):gint;cdecl;external glibdll name 'g_node_child_position';
+function  g_node_child_index(node:PGNode; data:gpointer):gint;cdecl;external glibdll name 'g_node_child_index';
+function  g_node_first_sibling(node:PGNode):PGNode;cdecl;external glibdll name 'g_node_first_sibling';
+function  g_node_last_sibling(node:PGNode):PGNode;cdecl;external glibdll name 'g_node_last_sibling';
+function  g_node_prev_sibling(node : PGnode) : PGNode;
+function  g_node_next_sibling(node : PGnode) : PGnode;
+function  g_node_first_child(node : PGnode) : PGnode;
+
+function  is_setup(var a : TGHookList) : guint;
+procedure set_is_setup(var a : TGHookList; __is_setup : guint);
+function  G_HOOK_DEFERRED_DESTROY : TGHookFreeFunc;
+function  G_HOOK_ACTIVE(hook : PGHook) : boolean;
+function  G_HOOK_IN_CALL(hook : PGHook) : boolean;
+function  G_HOOK_IS_VALID(hook : PGHook) : boolean;
+function  G_HOOK_IS_UNLINKED(hook : PGHook) : boolean;
+
+procedure g_hook_list_init(hook_list:PGHookList; hook_size:guint);cdecl;external glibdll name 'g_hook_list_init';
+procedure g_hook_list_clear(hook_list:PGHookList);cdecl;external glibdll name 'g_hook_list_clear';
+function  g_hook_alloc(hook_list:PGHookList):PGHook;cdecl;external glibdll name 'g_hook_alloc';
+procedure g_hook_free(hook_list:PGHookList; hook:PGHook);cdecl;external glibdll name 'g_hook_free';
+procedure g_hook_ref(hook_list:PGHookList; hook:PGHook);cdecl;external glibdll name 'g_hook_ref';
+procedure g_hook_unref(hook_list:PGHookList; hook:PGHook);cdecl;external glibdll name 'g_hook_unref';
+function  g_hook_destroy(hook_list:PGHookList; hook_id:guint):gboolean;cdecl;external glibdll name 'g_hook_destroy';
+procedure g_hook_destroy_link(hook_list:PGHookList; hook:PGHook);cdecl;external glibdll name 'g_hook_destroy_link';
+procedure g_hook_prepend(hook_list:PGHookList; hook:PGHook);cdecl;external glibdll name 'g_hook_prepend';
+procedure g_hook_insert_before(hook_list:PGHookList; sibling:PGHook; hook:PGHook);cdecl;external glibdll name 'g_hook_insert_before';
+procedure g_hook_insert_sorted(hook_list:PGHookList; hook:PGHook; func:TGHookCompareFunc);cdecl;external glibdll name 'g_hook_insert_sorted';
+function  g_hook_get(hook_list:PGHookList; hook_id:guint):PGHook;cdecl;external glibdll name 'g_hook_get';
+function  g_hook_find(hook_list:PGHookList; need_valids:gboolean; func:TGHookFindFunc; data:gpointer):PGHook;cdecl;external glibdll name 'g_hook_find';
+function  g_hook_find_data(hook_list:PGHookList; need_valids:gboolean; data:gpointer):PGHook;cdecl;external glibdll name 'g_hook_find_data';
+function  g_hook_find_func(hook_list:PGHookList; need_valids:gboolean; func:gpointer):PGHook;cdecl;external glibdll name 'g_hook_find_func';
+function  g_hook_find_func_data(hook_list:PGHookList; need_valids:gboolean; func:gpointer; data:gpointer):PGHook;cdecl;external glibdll name 'g_hook_find_func_data';
+function  g_hook_first_valid(hook_list:PGHookList; may_be_in_call:gboolean):PGHook;cdecl;external glibdll name 'g_hook_first_valid';
+function  g_hook_next_valid(hook_list:PGHookList; hook:PGHook; may_be_in_call:gboolean):PGHook;cdecl;external glibdll name 'g_hook_next_valid';
+function  g_hook_compare_ids(new_hook:PGHook; sibling:PGHook):gint;cdecl;external glibdll name 'g_hook_compare_ids';
+procedure g_hook_append(hook_list:PGhooklist;hook : PGhook);
+procedure g_hook_list_invoke(hook_list:PGHookList; may_recurse:gboolean);cdecl;external glibdll name 'g_hook_list_invoke';
+procedure g_hook_list_invoke_check(hook_list:PGHookList; may_recurse:gboolean);cdecl;external glibdll name 'g_hook_list_invoke_check';
+procedure g_hook_list_marshal(hook_list:PGHookList; may_recurse:gboolean; marshaller:TGHookMarshaller; data:gpointer);cdecl;external glibdll name 'g_hook_list_marshal';
+procedure g_hook_list_marshal_check(hook_list:PGHookList; may_recurse:gboolean; marshaller:TGHookCheckMarshaller; data:gpointer);cdecl;external glibdll name 'g_hook_list_marshal_check';
+
+procedure g_on_error_query(prg_name:Pgchar);cdecl;external glibdll name 'g_on_error_query';
+procedure g_on_error_stack_trace(prg_name:Pgchar);cdecl;external glibdll name 'g_on_error_stack_trace';
+
+{$ifndef gtkwin}
+var
+  g_log_domain_glib : Pgchar;external glibdll name 'g_log_domain_glib';
+{$endif}
+
+function  g_log_set_handler(log_domain:Pgchar; log_levels:TGLogLevelFlags; log_func:TGLogFunc; user_data:gpointer):guint;cdecl;external glibdll name 'g_log_set_handler';
+procedure g_log_remove_handler(log_domain:Pgchar; handler_id:guint);cdecl;external glibdll name 'g_log_remove_handler';
+procedure g_log_default_handler(log_domain:Pgchar; log_level:TGLogLevelFlags; message:Pgchar; unused_data:gpointer);cdecl;external glibdll name 'g_log_default_handler';
+procedure g_logv(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar; args:array of const);cdecl;external glibdll name 'g_logv';
+function  g_log_set_fatal_mask(log_domain:Pgchar; fatal_mask:TGLogLevelFlags):TGLogLevelFlags;cdecl;external glibdll name 'g_log_set_fatal_mask';
+function  g_log_set_always_fatal(fatal_mask:TGLogLevelFlags):TGLogLevelFlags;cdecl;external glibdll name 'g_log_set_always_fatal';
+
+function  g_set_printerr_handler(func:TGPrintFunc):TGPrintFunc;cdecl;external glibdll name 'g_set_printerr_handler';
+function  g_set_print_handler(func:TGPrintFunc):TGPrintFunc;cdecl;external glibdll name 'g_set_print_handler';
+function  g_set_error_handler(func:TGErrorFunc):TGErrorFunc;cdecl;external glibdll name 'g_set_error_handler';
+function  g_set_warning_handler(func:TGWarningFunc):TGWarningFunc;cdecl;external glibdll name 'g_set_warning_handler';
+function  g_set_message_handler(func:TGPrintFunc):TGPrintFunc;cdecl;external glibdll name 'g_set_message_handler';
+
+function  g_malloc(size:gulong):gpointer;cdecl;external glibdll name 'g_malloc';
+function  g_malloc0(size:gulong):gpointer;cdecl;external glibdll name 'g_malloc0';
+function  g_realloc(mem:gpointer; size:gulong):gpointer;cdecl;external glibdll name 'g_realloc';
+procedure g_free(mem:gpointer);cdecl;external glibdll name 'g_free';
+procedure g_mem_profile;cdecl;external glibdll name 'g_mem_profile';
+procedure g_mem_check(mem:gpointer);cdecl;external glibdll name 'g_mem_check';
+
+{$ifndef gtkwin}
+    const
+       G_ALLOCATOR_LIST = 1;
+       G_ALLOCATOR_SLIST = 2;
+       G_ALLOCATOR_NODE = 3;
+
+function  g_allocator_new(name:Pgchar; n_preallocs:guint):PGAllocator;cdecl;external glibdll name 'g_allocator_new';
+procedure g_allocator_free(allocator:PGAllocator);cdecl;external glibdll name 'g_allocator_free';
+{$endif}
+
+   const
+       G_ALLOC_ONLY = 1;
+       G_ALLOC_AND_FREE = 2;
+
+function  g_mem_chunk_new(name:Pgchar; atom_size:gint; area_size:gulong; thetype:gint):PGMemChunk;cdecl;external glibdll name 'g_mem_chunk_new';
+procedure g_mem_chunk_destroy(mem_chunk:PGMemChunk);cdecl;external glibdll name 'g_mem_chunk_destroy';
+function  g_mem_chunk_alloc(mem_chunk:PGMemChunk):gpointer;cdecl;external glibdll name 'g_mem_chunk_alloc';
+function  g_mem_chunk_alloc0(mem_chunk:PGMemChunk):gpointer;cdecl;external glibdll name 'g_mem_chunk_alloc0';
+procedure g_mem_chunk_free(mem_chunk:PGMemChunk; mem:gpointer);cdecl;external glibdll name 'g_mem_chunk_free';
+procedure g_mem_chunk_clean(mem_chunk:PGMemChunk);cdecl;external glibdll name 'g_mem_chunk_clean';
+procedure g_mem_chunk_reset(mem_chunk:PGMemChunk);cdecl;external glibdll name 'g_mem_chunk_reset';
+procedure g_mem_chunk_print(mem_chunk:PGMemChunk);cdecl;external glibdll name 'g_mem_chunk_print';
+procedure g_mem_chunk_info;cdecl;external glibdll name 'g_mem_chunk_info';
+procedure g_blow_chunks;cdecl;external glibdll name 'g_blow_chunks';
+function  g_timer_new:PGTimer;cdecl;external glibdll name 'g_timer_new';
+procedure g_timer_destroy(timer:PGTimer);cdecl;external glibdll name 'g_timer_destroy';
+procedure g_timer_start(timer:PGTimer);cdecl;external glibdll name 'g_timer_start';
+procedure g_timer_stop(timer:PGTimer);cdecl;external glibdll name 'g_timer_stop';
+procedure g_timer_reset(timer:PGTimer);cdecl;external glibdll name 'g_timer_reset';
+function  g_timer_elapsed(timer:PGTimer; microseconds:Pgulong):gdouble;cdecl;external glibdll name 'g_timer_elapsed';
+
+const
+       G_STR_DELIMITERS = '_-|> <.';
+
+function  g_strdelimit(thestring:Pgchar; delimiters:Pgchar; new_delimiter:gchar):Pgchar;cdecl;external glibdll name 'g_strdelimit';
+function  g_strtod(nptr:Pgchar; endptr:PPgchar):gdouble;cdecl;external glibdll name 'g_strtod';
+function  g_strerror(errnum:gint):Pgchar;cdecl;external glibdll name 'g_strerror';
+function  g_strsignal(signum:gint):Pgchar;cdecl;external glibdll name 'g_strsignal';
+function  g_strcasecmp(s1:Pgchar; s2:Pgchar):gint;cdecl;external glibdll name 'g_strcasecmp';
+{$ifndef gtkwin}
+function  g_strncasecmp(s1:Pgchar; s2:Pgchar; n:guint):gint;cdecl;external glibdll name 'g_strncasecmp';
+{$endif}
+procedure g_strdown(thestring:Pgchar);cdecl;external glibdll name 'g_strdown';
+procedure g_strup(thestring:Pgchar);cdecl;external glibdll name 'g_strup';
+procedure g_strreverse(thestring:Pgchar);cdecl;external glibdll name 'g_strreverse';
+{$ifndef gtkwin}
+function  g_strchug(thestring:Pgchar):Pgchar;cdecl;external glibdll name 'g_strchug';
+function  g_strchomp(thestring:Pgchar):Pgchar;cdecl;external glibdll name 'g_strchomp';
+function  g_strstrip(thestring : Pgchar) : Pgchar;
+{$endif}
+function  g_strdup(str:Pgchar):Pgchar;cdecl;external glibdll name 'g_strdup';
+function  g_strdup_printf(format:Pgchar;args:array of const):Pgchar;cdecl;external glibdll name 'g_strdup_printf';
+function  g_strdup_vprintf(format:Pgchar; args:array of const):Pgchar;cdecl;external glibdll name 'g_strdup_vprintf';
+function  g_strndup(str:Pgchar; n:guint):Pgchar;cdecl;external glibdll name 'g_strndup';
+function  g_strnfill(length:guint; fill_char:gchar):Pgchar;cdecl;external glibdll name 'g_strnfill';
+function  g_strconcat(string1:Pgchar; args:array of const):Pgchar;cdecl;external glibdll name 'g_strconcat';
+{$ifndef gtkwin}
+function  g_strjoin(separator:Pgchar; args:array of const):Pgchar;cdecl;external glibdll name 'g_strjoin';
+{$endif}
+function  g_strescape(thestring:Pgchar):Pgchar;cdecl;external glibdll name 'g_strescape';
+function  g_memdup(mem:gconstpointer; byte_size:guint):gpointer;cdecl;external glibdll name 'g_memdup';
+function  g_strsplit(thestring:Pgchar; delimiter:Pgchar; max_tokens:gint):PPgchar;cdecl;external glibdll name 'g_strsplit';
+function  g_strjoinv(separator:Pgchar; str_array:PPgchar):Pgchar;cdecl;external glibdll name 'g_strjoinv';
+procedure g_strfreev(str_array:PPgchar);cdecl;external glibdll name 'g_strfreev';
+function  g_printf_string_upper_bound(format:Pgchar; args:array of const):guint;cdecl;external glibdll name 'g_printf_string_upper_bound';
+function  g_get_user_name:Pgchar;cdecl;external glibdll name 'g_get_user_name';
+function  g_get_real_name:Pgchar;cdecl;external glibdll name 'g_get_real_name';
+function  g_get_home_dir:Pgchar;cdecl;external glibdll name 'g_get_home_dir';
+function  g_get_tmp_dir:Pgchar;cdecl;external glibdll name 'g_get_tmp_dir';
+function  g_get_prgname:Pgchar;cdecl;external glibdll name 'g_get_prgname';
+procedure g_set_prgname(prgname:Pgchar);cdecl;external glibdll name 'g_set_prgname';
+function  g_parse_debug_string(thestring:Pgchar; keys:PGDebugKey; nkeys:guint):guint;cdecl;external glibdll name 'g_parse_debug_string';
+function  g_vsnprintf(thestring:Pgchar; n:gulong; format:Pgchar; args:array of const):gint;cdecl;external glibdll name 'g_vsnprintf';
+function  g_basename(file_name:Pgchar):Pgchar;cdecl;external glibdll name 'g_basename';
+function  g_path_is_absolute(file_name:Pgchar):gboolean;cdecl;external glibdll name 'g_path_is_absolute';
+function  g_path_skip_root(file_name:Pgchar):Pgchar;cdecl;external glibdll name 'g_path_skip_root';
+function  g_dirname(file_name:Pgchar):Pgchar;cdecl;external glibdll name 'g_dirname';
+function  g_get_current_dir:Pgchar;cdecl;external glibdll name 'g_get_current_dir';
+function  g_getenv(variable:Pgchar):Pgchar;cdecl;external glibdll name 'g_getenv';
+procedure g_atexit(func:TGVoidFunc);cdecl;external glibdll name 'g_atexit';
+
+function  g_string_chunk_new(size:gint):PGStringChunk;cdecl;external glibdll name 'g_string_chunk_new';
+procedure g_string_chunk_free(chunk:PGStringChunk);cdecl;external glibdll name 'g_string_chunk_free';
+function  g_string_chunk_insert(chunk:PGStringChunk; thestring:Pgchar):Pgchar;cdecl;external glibdll name 'g_string_chunk_insert';
+function  g_string_chunk_insert_const(chunk:PGStringChunk; thestring:Pgchar):Pgchar;cdecl;external glibdll name 'g_string_chunk_insert_const';
+function  g_string_new(init:Pgchar):PGString;cdecl;external glibdll name 'g_string_new';
+function  g_string_sized_new(dfl_size:guint):PGString;cdecl;external glibdll name 'g_string_sized_new';
+procedure g_string_free(thestring:PGString; free_segment:gint);cdecl;external glibdll name 'g_string_free';
+function  g_string_assign(lval:PGString; rval:Pgchar):PGString;cdecl;external glibdll name 'g_string_assign';
+function  g_string_truncate(thestring:PGString; len:gint):PGString;cdecl;external glibdll name 'g_string_truncate';
+function  g_string_append(thestring:PGString; val:Pgchar):PGString;cdecl;external glibdll name 'g_string_append';
+function  g_string_append_c(thestring:PGString; c:gchar):PGString;cdecl;external glibdll name 'g_string_append_c';
+function  g_string_prepend(thestring:PGString; val:Pgchar):PGString;cdecl;external glibdll name 'g_string_prepend';
+function  g_string_prepend_c(thestring:PGString; c:gchar):PGString;cdecl;external glibdll name 'g_string_prepend_c';
+function  g_string_insert(thestring:PGString; pos:gint; val:Pgchar):PGString;cdecl;external glibdll name 'g_string_insert';
+function  g_string_insert_c(thestring:PGString; pos:gint; c:gchar):PGString;cdecl;external glibdll name 'g_string_insert_c';
+function  g_string_erase(thestring:PGString; pos:gint; len:gint):PGString;cdecl;external glibdll name 'g_string_erase';
+function  g_string_down(thestring:PGString):PGString;cdecl;external glibdll name 'g_string_down';
+function  g_string_up(thestring:PGString):PGString;cdecl;external glibdll name 'g_string_up';
+procedure g_string_sprintf(thestring:PGString; fmt:Pgchar; args:array of const);cdecl;external glibdll name 'g_string_sprintf';
+procedure g_string_sprintfa(thestring:PGString; fmt:Pgchar; args:array of const);cdecl;external glibdll name 'g_string_sprintfa';
+
+function  g_array_append_val(a:PGarray;v : longint) : PGarray;
+function  g_array_prepend_val(a:PGarray;v : longint) : PGarray;
+function  g_array_insert_val(a:PGarray;i:guint;v : longint) : PGarray;
+function  g_array_new(zero_terminated:gint):PGArray;cdecl;external glibdll name 'g_array_new';
+procedure g_array_free(thearray:PGArray; free_segment:gint);cdecl;external glibdll name 'g_array_free';
+function  g_array_append_vals(thearray:PGArray; data:gconstpointer; len:guint):PGArray;cdecl;external glibdll name 'g_array_append_vals';
+function  g_array_prepend_vals(thearray:PGArray; data:gconstpointer; len:guint):PGArray;cdecl;external glibdll name 'g_array_prepend_vals';
+function  g_array_insert_vals(thearray:PGArray; index:guint; data:gconstpointer; len:guint):PGArray;cdecl;external glibdll name 'g_array_insert_vals';
+function  g_array_set_size(thearray:PGArray; length:guint):PGArray;cdecl;external glibdll name 'g_array_set_size';
+function  g_array_remove_index(thearray:PGArray; index:guint):PGArray;cdecl;external glibdll name 'g_array_remove_index';
+function  g_array_remove_index_fast(thearray:PGArray; index:guint):PGArray;cdecl;external glibdll name 'g_array_remove_index_fast';
+
+function  g_ptr_array_new:PGPtrArray;cdecl;external glibdll name 'g_ptr_array_new';
+procedure g_ptr_array_free(thearray:PGPtrArray; free_seg:gboolean);cdecl;external glibdll name 'g_ptr_array_free';
+procedure g_ptr_array_set_size(thearray:PGPtrArray; length:gint);cdecl;external glibdll name 'g_ptr_array_set_size';
+function  g_ptr_array_remove_index(thearray:PGPtrArray; index:guint):gpointer;cdecl;external glibdll name 'g_ptr_array_remove_index';
+function  g_ptr_array_remove_index_fast(thearray:PGPtrArray; index:guint):gpointer;cdecl;external glibdll name 'g_ptr_array_remove_index_fast';
+function  g_ptr_array_remove(thearray:PGPtrArray; data:gpointer):gboolean;cdecl;external glibdll name 'g_ptr_array_remove';
+function  g_ptr_array_remove_fast(thearray:PGPtrArray; data:gpointer):gboolean;cdecl;external glibdll name 'g_ptr_array_remove_fast';
+procedure g_ptr_array_add(thearray:PGPtrArray; data:gpointer);cdecl;external glibdll name 'g_ptr_array_add';
+
+function  g_byte_array_new:PGByteArray;cdecl;external glibdll name 'g_byte_array_new';
+procedure g_byte_array_free(thearray:PGByteArray; free_segment:gboolean);cdecl;external glibdll name 'g_byte_array_free';
+function  g_byte_array_append(thearray:PGByteArray; data:Pguint8; len:guint):PGByteArray;cdecl;external glibdll name 'g_byte_array_append';
+function  g_byte_array_prepend(thearray:PGByteArray; data:Pguint8; len:guint):PGByteArray;cdecl;external glibdll name 'g_byte_array_prepend';
+function  g_byte_array_set_size(thearray:PGByteArray; length:guint):PGByteArray;cdecl;external glibdll name 'g_byte_array_set_size';
+function  g_byte_array_remove_index(thearray:PGByteArray; index:guint):PGByteArray;cdecl;external glibdll name 'g_byte_array_remove_index';
+function  g_byte_array_remove_index_fast(thearray:PGByteArray; index:guint):PGByteArray;cdecl;external glibdll name 'g_byte_array_remove_index_fast';
+
+function  g_str_equal(v:gconstpointer; v2:gconstpointer):gint;cdecl;external glibdll name 'g_str_equal';
+function  g_str_hash(v:gconstpointer):guint;cdecl;external glibdll name 'g_str_hash';
+
+function  g_int_equal(v:gconstpointer; v2:gconstpointer):gint;cdecl;external glibdll name 'g_int_equal';
+function  g_int_hash(v:gconstpointer):guint;cdecl;external glibdll name 'g_int_hash';
+
+function  g_direct_hash(v:gconstpointer):guint;cdecl;external glibdll name 'g_direct_hash';
+function  g_direct_equal(v:gconstpointer; v2:gconstpointer):gint;cdecl;external glibdll name 'g_direct_equal';
+
+function  g_quark_try_string(thestring:Pgchar):TGQuark;cdecl;external glibdll name 'g_quark_try_string';
+function  g_quark_from_static_string(thestring:Pgchar):TGQuark;cdecl;external glibdll name 'g_quark_from_static_string';
+function  g_quark_from_string(thestring:Pgchar):TGQuark;cdecl;external glibdll name 'g_quark_from_string';
+function  g_quark_to_string(quark:TGQuark):Pgchar;cdecl;external glibdll name 'g_quark_to_string';
+
+procedure g_datalist_init(datalist:PPGData);cdecl;external glibdll name 'g_datalist_init';
+procedure g_datalist_clear(datalist:PPGData);cdecl;external glibdll name 'g_datalist_clear';
+function  g_datalist_id_get_data(datalist:PPGData; key_id:TGQuark):gpointer;cdecl;external glibdll name 'g_datalist_id_get_data';
+procedure g_datalist_id_set_data_full(datalist:PPGData; key_id:TGQuark; data:gpointer; destroy_func:TGDestroyNotify);cdecl;external glibdll name 'g_datalist_id_set_data_full';
+procedure g_datalist_id_remove_no_notify(datalist:PPGData; key_id:TGQuark);cdecl;external glibdll name 'g_datalist_id_remove_no_notify';
+procedure g_datalist_foreach(datalist:PPGData; func:TGDataForeachFunc; user_data:gpointer);cdecl;external glibdll name 'g_datalist_foreach';
+procedure g_datalist_id_set_data(dl:PPGdata;q:TGQuark;d : pointer);
+procedure g_datalist_id_remove_data(dl:PPGData;q:TGQuark);
+function  g_datalist_Get_data(dl:PPGData;k : Pgchar):gpointer;
+procedure g_datalist_set_data_full(dl:PPGData;k:Pgchar;d:gpointer;f : TGDestroyNotify);
+procedure g_datalist_remove_no_notify(dl:PPGdata;k : Pgchar);
+procedure g_datalist_set_data(dl:PPGdata;k:Pgchar;d : pointer);
+procedure g_datalist_remove_data(dl:PPGdata;k : Pgchar);
+
+procedure g_dataset_destroy(dataset_location:gconstpointer);cdecl;external glibdll name 'g_dataset_destroy';
+function  g_dataset_id_get_data(dataset_location:gconstpointer; key_id:TGQuark):gpointer;cdecl;external glibdll name 'g_dataset_id_get_data';
+procedure g_dataset_id_set_data_full(dataset_location:gconstpointer; key_id:TGQuark; data:gpointer; destroy_func:TGDestroyNotify);cdecl;external glibdll name 'g_dataset_id_set_data_full';
+procedure g_dataset_id_remove_no_notify(dataset_location:gconstpointer; key_id:TGQuark);cdecl;external glibdll name 'g_dataset_id_remove_no_notify';
+procedure g_dataset_foreach(dataset_location:gconstpointer; func:TGDataForeachFunc; user_data:gpointer);cdecl;external glibdll name 'g_dataset_foreach';
+procedure g_dataset_id_set_data(l:gconstpointer;k:TGQuark;d : gconstpointer);
+procedure g_dataset_id_remove_data(l : gconstpointer;k:TGQuark);
+function  g_dataset_get_data(l : gconstpointer;k:Pgchar) : gconstpointer;
+procedure g_dataset_set_data_full(l:gconstpointer;k:Pgchar;d:pointer;f : TGDestroynotify);
+procedure g_dataset_remove_no_notify(l : gconstpointer;k:Pgchar);
+procedure g_dataset_set_data(l:gconstpointer;k:Pgchar;d:pointer);
+procedure g_dataset_remove_data(l : gconstpointer;k:Pgchar);
+
+function  case_sensitive(var a : TGScannerConfig) : guint;
+procedure set_case_sensitive(var a : TGScannerConfig; __case_sensitive : guint);
+function  skip_comment_multi(var a : TGScannerConfig) : guint;
+procedure set_skip_comment_multi(var a : TGScannerConfig; __skip_comment_multi : guint);
+function  skip_comment_single(var a : TGScannerConfig) : guint;
+procedure set_skip_comment_single(var a : TGScannerConfig; __skip_comment_single : guint);
+function  scan_comment_multi(var a : TGScannerConfig) : guint;
+procedure set_scan_comment_multi(var a : TGScannerConfig; __scan_comment_multi : guint);
+function  scan_identifier(var a : TGScannerConfig) : guint;
+procedure set_scan_identifier(var a : TGScannerConfig; __scan_identifier : guint);
+function  scan_identifier_1char(var a : TGScannerConfig) : guint;
+procedure set_scan_identifier_1char(var a : TGScannerConfig; __scan_identifier_1char : guint);
+function  scan_identifier_NULL(var a : TGScannerConfig) : guint;
+procedure set_scan_identifier_NULL(var a : TGScannerConfig; __scan_identifier_NULL : guint);
+function  scan_symbols(var a : TGScannerConfig) : guint;
+procedure set_scan_symbols(var a : TGScannerConfig; __scan_symbols : guint);
+function  scan_binary(var a : TGScannerConfig) : guint;
+procedure set_scan_binary(var a : TGScannerConfig; __scan_binary : guint);
+function  scan_octal(var a : TGScannerConfig) : guint;
+procedure set_scan_octal(var a : TGScannerConfig; __scan_octal : guint);
+function  scan_float(var a : TGScannerConfig) : guint;
+procedure set_scan_float(var a : TGScannerConfig; __scan_float : guint);
+function  scan_hex(var a : TGScannerConfig) : guint;
+procedure set_scan_hex(var a : TGScannerConfig; __scan_hex : guint);
+function  scan_hex_dollar(var a : TGScannerConfig) : guint;
+procedure set_scan_hex_dollar(var a : TGScannerConfig; __scan_hex_dollar : guint);
+function  scan_string_sq(var a : TGScannerConfig) : guint;cdecl;
+procedure set_scan_string_sq(var a : TGScannerConfig; __scan_string_sq : guint);cdecl;
+function  scan_string_dq(var a : TGScannerConfig) : guint;cdecl;
+procedure set_scan_string_dq(var a : TGScannerConfig; __scan_string_dq : guint);cdecl;
+function  numbers_2_int(var a : TGScannerConfig) : guint;
+procedure set_numbers_2_int(var a : TGScannerConfig; __numbers_2_int : guint);
+function  int_2_float(var a : TGScannerConfig) : guint;
+procedure set_int_2_float(var a : TGScannerConfig; __int_2_float : guint);
+function  identifier_2_string(var a : TGScannerConfig) : guint;
+procedure set_identifier_2_string(var a : TGScannerConfig; __identifier_2_string : guint);
+function  char_2_token(var a : TGScannerConfig) : guint;
+procedure set_char_2_token(var a : TGScannerConfig; __char_2_token : guint);
+function  symbol_2_token(var a : TGScannerConfig) : guint;
+procedure set_symbol_2_token(var a : TGScannerConfig; __symbol_2_token : guint);
+function  scope_0_fallback(var a : TGScannerConfig) : guint;
+procedure set_scope_0_fallback(var a : TGScannerConfig; __scope_0_fallback : guint);
+
+function  g_scanner_new(config_templ:PGScannerConfig):PGScanner;cdecl;external glibdll name 'g_scanner_new';
+procedure g_scanner_destroy(scanner:PGScanner);cdecl;external glibdll name 'g_scanner_destroy';
+procedure g_scanner_input_file(scanner:PGScanner; input_fd:gint);cdecl;external glibdll name 'g_scanner_input_file';
+procedure g_scanner_sync_file_offset(scanner:PGScanner);cdecl;external glibdll name 'g_scanner_sync_file_offset';
+procedure g_scanner_input_text(scanner:PGScanner; text:Pgchar; text_len:guint);cdecl;external glibdll name 'g_scanner_input_text';
+function  g_scanner_get_next_token(scanner:PGScanner):TGTokenType;cdecl;external glibdll name 'g_scanner_get_next_token';
+function  g_scanner_peek_next_token(scanner:PGScanner):TGTokenType;cdecl;external glibdll name 'g_scanner_peek_next_token';
+function  g_scanner_cur_token(scanner:PGScanner):TGTokenType;cdecl;external glibdll name 'g_scanner_cur_token';
+function  g_scanner_cur_value(scanner:PGScanner):TGTokenValue;cdecl;external glibdll name 'g_scanner_cur_value';
+function  g_scanner_cur_line(scanner:PGScanner):guint;cdecl;external glibdll name 'g_scanner_cur_line';
+function  g_scanner_cur_position(scanner:PGScanner):guint;cdecl;external glibdll name 'g_scanner_cur_position';
+function  g_scanner_eof(scanner:PGScanner):gboolean;cdecl;external glibdll name 'g_scanner_eof';
+function  g_scanner_set_scope(scanner:PGScanner; scope_id:guint):guint;cdecl;external glibdll name 'g_scanner_set_scope';
+procedure g_scanner_scope_add_symbol(scanner:PGScanner; scope_id:guint; symbol:Pgchar; value:gpointer);cdecl;external glibdll name 'g_scanner_scope_add_symbol';
+procedure g_scanner_scope_remove_symbol(scanner:PGScanner; scope_id:guint; symbol:Pgchar);cdecl;external glibdll name 'g_scanner_scope_remove_symbol';
+function  g_scanner_scope_lookup_symbol(scanner:PGScanner; scope_id:guint; symbol:Pgchar):gpointer;cdecl;external glibdll name 'g_scanner_scope_lookup_symbol';
+procedure g_scanner_scope_foreach_symbol(scanner:PGScanner; scope_id:guint; func:TGHFunc; user_data:gpointer);cdecl;external glibdll name 'g_scanner_scope_foreach_symbol';
+function  g_scanner_lookup_symbol(scanner:PGScanner; symbol:Pgchar):gpointer;cdecl;external glibdll name 'g_scanner_lookup_symbol';
+procedure g_scanner_freeze_symbol_table(scanner:PGScanner);cdecl;external glibdll name 'g_scanner_freeze_symbol_table';
+procedure g_scanner_thaw_symbol_table(scanner:PGScanner);cdecl;external glibdll name 'g_scanner_thaw_symbol_table';
+procedure g_scanner_unexp_token(scanner:PGScanner; expected_token:TGTokenType; identifier_spec:Pgchar; symbol_spec:Pgchar; symbol_name:Pgchar; message:Pgchar; is_error:gint);cdecl;external glibdll name 'g_scanner_unexp_token';
+function  g_scanner_stat_mode(filename:Pgchar):gint;cdecl;external glibdll name 'g_scanner_stat_mode';
+
+{$ifndef gtkwin}
+      var
+         func : TGCompletionFunc;external glibdll name 'exportfunc';
+         prefix : Pgchar;external glibdll name 'exportprefix';
+         cache : PGList;external glibdll name 'exportcache';
+{$endif}
+
+type
+     PGCompletion = ^TGCompletion;
+     TGCompletion = record
+          items : PGList;
+          func : TGCompletionFunc;
+          prefix : Pgchar;
+          cache : PGList;
+       end;
+
+function  g_completion_new(func:TGCompletionFunc):PGCompletion;cdecl;external glibdll name 'g_completion_new';
+procedure g_completion_add_items(cmp:PGCompletion; items:PGList);cdecl;external glibdll name 'g_completion_add_items';
+procedure g_completion_remove_items(cmp:PGCompletion; items:PGList);cdecl;external glibdll name 'g_completion_remove_items';
+procedure g_completion_clear_items(cmp:PGCompletion);cdecl;external glibdll name 'g_completion_clear_items';
+function  g_completion_complete(cmp:PGCompletion; prefix:Pgchar; new_prefix:PPgchar):PGList;cdecl;external glibdll name 'g_completion_complete';
+procedure g_completion_free(cmp:PGCompletion);cdecl;external glibdll name 'g_completion_free';
+
+    type
+       TGDateYear = guint16;
+       TGDateDay = guint8;
+
+       TGDateDMY = longint;
+const
+       G_DATEDMY_DAY = 0;
+       G_DATEDMY_MONTH = 1;
+       G_DATEDMY_YEAR = 2;
+
+type
+       TGDateWeekday = longint;
+const
+       G_DATE_BAD_WEEKDAY = 0;
+       G_DATE_MONDAY = 1;
+         G_DATE_TUESDAY = 2;
+         G_DATE_WEDNESDAY = 3;
+         G_DATE_THURSDAY = 4;
+         G_DATE_FRIDAY = 5;
+         G_DATE_SATURDAY = 6;
+         G_DATE_SUNDAY = 7;
+
+type
+       TGDateMonth = longint;
+const
+         G_DATE_BAD_MONTH = 0;
+         G_DATE_JANUARY = 1;
+         G_DATE_FEBRUARY = 2;
+         G_DATE_MARCH = 3;
+         G_DATE_APRIL = 4;
+         G_DATE_MAY = 5;
+         G_DATE_JUNE = 6;
+         G_DATE_JULY = 7;
+         G_DATE_AUGUST = 8;
+         G_DATE_SEPTEMBER = 9;
+         G_DATE_OCTOBER = 10;
+         G_DATE_NOVEMBER = 11;
+         G_DATE_DECEMBER = 12;
+
+    const
+       G_DATE_BAD_JULIAN = 0;
+       G_DATE_BAD_DAY = 0;
+       G_DATE_BAD_YEAR = 0;
+
+    type
+       PGDate = ^TGDate;
+       TGDate = record
+            flag0 : longint;
+            flag1 : longint;
+         end;
+
+    const
+       bm_TGDate_julian_days = $FFFFFFFF;
+       bp_TGDate_julian_days = 0;
+       bm_TGDate_julian = $1;
+       bp_TGDate_julian = 0;
+       bm_TGDate_dmy = $2;
+       bp_TGDate_dmy = 1;
+       bm_TGDate_day = $FC;
+       bp_TGDate_day = 2;
+       bm_TGDate_month = $F00;
+       bp_TGDate_month = 8;
+       bm_TGDate_year = $FFFF000;
+       bp_TGDate_year = 12;
+function  julian_days(var a : TGDate) : guint;
+procedure set_julian_days(var a : TGDate; __julian_days : guint);
+function  julian(var a : TGDate) : guint;
+procedure set_julian(var a : TGDate; __julian : guint);
+function  dmy(var a : TGDate) : guint;
+procedure set_dmy(var a : TGDate; __dmy : guint);
+function  day(var a : TGDate) : guint;
+procedure set_day(var a : TGDate; __day : guint);
+function  month(var a : TGDate) : guint;
+procedure set_month(var a : TGDate; __month : guint);
+function  year(var a : TGDate) : guint;
+procedure set_year(var a : TGDate; __year : guint);
+
+function  g_date_new:PGDate;cdecl;external glibdll name 'g_date_new';
+function  g_date_new_dmy(day:TGDateDay; month:TGDateMonth; year:TGDateYear):PGDate;cdecl;external glibdll name 'g_date_new_dmy';
+function  g_date_new_julian(julian_day:guint32):PGDate;cdecl;external glibdll name 'g_date_new_julian';
+procedure g_date_free(date:PGDate);cdecl;external glibdll name 'g_date_free';
+function  g_date_valid(date:PGDate):gboolean;cdecl;external glibdll name 'g_date_valid';
+function  g_date_valid_day(day:TGDateDay):gboolean;cdecl;external glibdll name 'g_date_valid_day';
+function  g_date_valid_month(month:TGDateMonth):gboolean;cdecl;external glibdll name 'g_date_valid_month';
+function  g_date_valid_year(year:TGDateYear):gboolean;cdecl;external glibdll name 'g_date_valid_year';
+function  g_date_valid_weekday(weekday:TGDateWeekday):gboolean;cdecl;external glibdll name 'g_date_valid_weekday';
+function  g_date_valid_julian(julian_date:guint32):gboolean;cdecl;external glibdll name 'g_date_valid_julian';
+function  g_date_valid_dmy(day:TGDateDay; month:TGDateMonth; year:TGDateYear):gboolean;cdecl;external glibdll name 'g_date_valid_dmy';
+function  g_date_weekday(date:PGDate):TGDateWeekday;cdecl;external glibdll name 'g_date_weekday';
+function  g_date_month(date:PGDate):TGDateMonth;cdecl;external glibdll name 'g_date_month';
+function  g_date_year(date:PGDate):TGDateYear;cdecl;external glibdll name 'g_date_year';
+function  g_date_day(date:PGDate):TGDateDay;cdecl;external glibdll name 'g_date_day';
+function  g_date_julian(date:PGDate):guint32;cdecl;external glibdll name 'g_date_julian';
+function  g_date_day_of_year(date:PGDate):guint;cdecl;external glibdll name 'g_date_day_of_year';
+function  g_date_monday_week_of_year(date:PGDate):guint;cdecl;external glibdll name 'g_date_monday_week_of_year';
+function  g_date_sunday_week_of_year(date:PGDate):guint;cdecl;external glibdll name 'g_date_sunday_week_of_year';
+procedure g_date_clear(date:PGDate; n_dates:guint);cdecl;external glibdll name 'g_date_clear';
+procedure g_date_set_parse(date:PGDate; str:Pgchar);cdecl;external glibdll name 'g_date_set_parse';
+procedure g_date_set_time(date:PGDate; time:TGTime);cdecl;external glibdll name 'g_date_set_time';
+procedure g_date_set_month(date:PGDate; month:TGDateMonth);cdecl;external glibdll name 'g_date_set_month';
+procedure g_date_set_day(date:PGDate; day:TGDateDay);cdecl;external glibdll name 'g_date_set_day';
+procedure g_date_set_year(date:PGDate; year:TGDateYear);cdecl;external glibdll name 'g_date_set_year';
+procedure g_date_set_dmy(date:PGDate; day:TGDateDay; month:TGDateMonth; y:TGDateYear);cdecl;external glibdll name 'g_date_set_dmy';
+procedure g_date_set_julian(date:PGDate; julian_date:guint32);cdecl;external glibdll name 'g_date_set_julian';
+function  g_date_is_first_of_month(date:PGDate):gboolean;cdecl;external glibdll name 'g_date_is_first_of_month';
+function  g_date_is_last_of_month(date:PGDate):gboolean;cdecl;external glibdll name 'g_date_is_last_of_month';
+procedure g_date_add_days(date:PGDate; n_days:guint);cdecl;external glibdll name 'g_date_add_days';
+procedure g_date_subtract_days(date:PGDate; n_days:guint);cdecl;external glibdll name 'g_date_subtract_days';
+procedure g_date_add_months(date:PGDate; n_months:guint);cdecl;external glibdll name 'g_date_add_months';
+procedure g_date_subtract_months(date:PGDate; n_months:guint);cdecl;external glibdll name 'g_date_subtract_months';
+procedure g_date_add_years(date:PGDate; n_years:guint);cdecl;external glibdll name 'g_date_add_years';
+procedure g_date_subtract_years(date:PGDate; n_years:guint);cdecl;external glibdll name 'g_date_subtract_years';
+function  g_date_is_leap_year(year:TGDateYear):gboolean;cdecl;external glibdll name 'g_date_is_leap_year';
+function  g_date_days_in_month(month:TGDateMonth; year:TGDateYear):guint8;cdecl;external glibdll name 'g_date_days_in_month';
+function  g_date_monday_weeks_in_year(year:TGDateYear):guint8;cdecl;external glibdll name 'g_date_monday_weeks_in_year';
+function  g_date_sunday_weeks_in_year(year:TGDateYear):guint8;cdecl;external glibdll name 'g_date_sunday_weeks_in_year';
+function  g_date_compare(lhs:PGDate; rhs:PGDate):gint;cdecl;external glibdll name 'g_date_compare';
+procedure g_date_to_struct_tm(date:PGDate; tm:ptm);cdecl;external glibdll name 'g_date_to_struct_tm';
+function  g_date_strftime(s:Pgchar; slen:gsize; format:Pgchar; date:PGDate):gsize;cdecl;external glibdll name 'g_date_strftime';
+function  g_relation_new(fields:gint):PGRelation;cdecl;external glibdll name 'g_relation_new';
+procedure g_relation_destroy(relation:PGRelation);cdecl;external glibdll name 'g_relation_destroy';
+procedure g_relation_index(relation:PGRelation; field:gint; hash_func:TGHashFunc; key_compare_func:TGCompareFunc);cdecl;external glibdll name 'g_relation_index';
+procedure g_relation_insert(relation:PGRelation; args:array of const);cdecl;external glibdll name 'g_relation_insert';
+function  g_relation_delete(relation:PGRelation; key:gconstpointer; field:gint):gint;cdecl;external glibdll name 'g_relation_delete';
+function  g_relation_select(relation:PGRelation; key:gconstpointer; field:gint):PGTuples;cdecl;external glibdll name 'g_relation_select';
+function  g_relation_count(relation:PGRelation; key:gconstpointer; field:gint):gint;cdecl;external glibdll name 'g_relation_count';
+function  g_relation_exists(relation:PGRelation; args:array of const):gboolean;cdecl;external glibdll name 'g_relation_exists';
+procedure g_relation_print(relation:PGRelation);cdecl;external glibdll name 'g_relation_print';
+procedure g_tuples_destroy(tuples:PGTuples);cdecl;external glibdll name 'g_tuples_destroy';
+function  g_tuples_index(tuples:PGTuples; index:gint; field:gint):gpointer;cdecl;external glibdll name 'g_tuples_index';
+{$ifndef gtkwin}
+function  g_spaced_primes_closest(num:guint):guint;cdecl;external glibdll name 'g_spaced_primes_closest';
+{$endif}
+
+    type
+       TGIOError = longint;
+    const
+       G_IO_ERROR_NONE = 0;
+       G_IO_ERROR_AGAIN = 1;
+       G_IO_ERROR_INVAL = 2;
+       G_IO_ERROR_UNKNOWN = 3;
+
+    type
+       TGSeekType = longint;
+    const
+       G_SEEK_CUR = 0;
+       G_SEEK_SET = 1;
+       G_SEEK_END = 2;
+
+    type
+       TGIOCondition = longint;
+
+       PGIOFuncs = ^TGIOFuncs;
+
+       PGIOChannel = ^TGIOChannel;
+       TGIOChannel = record
+            channel_flags : guint;
+            ref_count : guint;
+            funcs : PGIOFuncs;
+         end;
+
+       TGIOFunc = function (source:PGIOChannel; condition:TGIOCondition; data:gpointer):gboolean;cdecl;
+
+       TGIOFuncs = record
+            io_read : function (channel:PGIOChannel; buf:Pgchar; count:guint; bytes_read:Pguint):TGIOError;cdecl;
+            io_write : function (channel:PGIOChannel; buf:Pgchar; count:guint; bytes_written:Pguint):TGIOError;cdecl;
+            io_seek : function (channel:PGIOChannel; offset:gint; thetype:TGSeekType):TGIOError;cdecl;
+            io_close : procedure (channel:PGIOChannel);cdecl;
+            io_add_watch : function (channel:PGIOChannel; priority:gint; condition:TGIOCondition; func:TGIOFunc; user_data:gpointer; notify:TGDestroyNotify):guint;cdecl;
+            io_free : procedure (channel:PGIOChannel);cdecl;
+         end;
+
+procedure g_io_channel_init(channel:PGIOChannel);cdecl;external glibdll name 'g_io_channel_init';
+procedure g_io_channel_ref(channel:PGIOChannel);cdecl;external glibdll name 'g_io_channel_ref';
+procedure g_io_channel_unref(channel:PGIOChannel);cdecl;external glibdll name 'g_io_channel_unref';
+function  g_io_channel_read(channel:PGIOChannel; buf:Pgchar; count:guint; bytes_read:Pguint):TGIOError;cdecl;external glibdll name 'g_io_channel_read';
+function  g_io_channel_write(channel:PGIOChannel; buf:Pgchar; count:guint; bytes_written:Pguint):TGIOError;cdecl;external glibdll name 'g_io_channel_write';
+function  g_io_channel_seek(channel:PGIOChannel; offset:gint; thetype:TGSeekType):TGIOError;cdecl;external glibdll name 'g_io_channel_seek';
+procedure g_io_channel_close(channel:PGIOChannel);cdecl;external glibdll name 'g_io_channel_close';
+function  g_io_add_watch_full(channel:PGIOChannel; priority:gint; condition:TGIOCondition; func:TGIOFunc; user_data:gpointer; notify:TGDestroyNotify):guint;cdecl;external glibdll name 'g_io_add_watch_full';
+function  g_io_add_watch(channel:PGIOChannel; condition:TGIOCondition; func:TGIOFunc; user_data:gpointer):guint;cdecl;external glibdll name 'g_io_add_watch';
+
+    type
+       PGTimeVal = ^TGTimeVal;
+       TGTimeVal = record
+            tv_sec : glong;
+            tv_usec : glong;
+         end;
+
+       PGSourceFuncs = ^TGSourceFuncs;
+       TGSourceFuncs = record
+            prepare : function (source_data:gpointer; current_time:PGTimeVal; timeout:Pgint; user_data:gpointer):gboolean;cdecl;
+            check : function (source_data:gpointer; current_time:PGTimeVal; user_data:gpointer):gboolean;cdecl;
+            dispatch : function (source_data:gpointer; current_time:PGTimeVal; user_data:gpointer):gboolean;cdecl;
+            destroy : TGDestroyNotify;
+         end;
+
+    const
+       G_PRIORITY_HIGH = -100;
+       G_PRIORITY_DEFAULT = 0;
+       G_PRIORITY_HIGH_IDLE = 100;
+       G_PRIORITY_DEFAULT_IDLE = 200;
+       G_PRIORITY_LOW = 300;
+
+    type
+       TGSourceFunc = function (data:gpointer):gboolean;cdecl;
+
+function  g_source_add(priority:gint; can_recurse:gboolean; funcs:PGSourceFuncs; source_data:gpointer; user_data:gpointer; notify:TGDestroyNotify):guint;cdecl;external glibdll name 'g_source_add';
+function  g_source_remove(tag:guint):gboolean;cdecl;external glibdll name 'g_source_remove';
+function  g_source_remove_by_user_data(user_data:gpointer):gboolean;cdecl;external glibdll name 'g_source_remove_by_user_data';
+function  g_source_remove_by_source_data(source_data:gpointer):gboolean;cdecl;external glibdll name 'g_source_remove_by_source_data';
+{$ifndef gtkwin}
+function  g_source_remove_by_funcs_user_data(funcs:PGSourceFuncs; user_data:gpointer):gboolean;cdecl;external glibdll name 'g_source_remove_by_funcs_user_data';
+{$endif}
+procedure g_get_current_time(result:PGTimeVal);cdecl;external glibdll name 'g_get_current_time';
+function  g_main_new(is_running:gboolean):PGMainLoop;cdecl;external glibdll name 'g_main_new';
+procedure g_main_run(loop:PGMainLoop);cdecl;external glibdll name 'g_main_run';
+procedure g_main_quit(loop:PGMainLoop);cdecl;external glibdll name 'g_main_quit';
+procedure g_main_destroy(loop:PGMainLoop);cdecl;external glibdll name 'g_main_destroy';
+function  g_main_is_running(loop:PGMainLoop):gboolean;cdecl;external glibdll name 'g_main_is_running';
+function  g_main_iteration(may_block:gboolean):gboolean;cdecl;external glibdll name 'g_main_iteration';
+function  g_main_pending:gboolean;cdecl;external glibdll name 'g_main_pending';
+function  g_timeout_add_full(priority:gint; interval:guint; thefunction:TGSourceFunc; data:gpointer; notify:TGDestroyNotify):guint;cdecl;external glibdll name 'g_timeout_add_full';
+function  g_timeout_add(interval:guint; thefunction:TGSourceFunc; data:gpointer):guint;cdecl;external glibdll name 'g_timeout_add';
+function  g_idle_add(thefunction:TGSourceFunc; data:gpointer):guint;cdecl;external glibdll name 'g_idle_add';
+function  g_idle_add_full(priority:gint; thefunction:TGSourceFunc; data:gpointer; destroy:TGDestroyNotify):guint;cdecl;external glibdll name 'g_idle_add_full';
+function  g_idle_remove_by_data(data:gpointer):gboolean;cdecl;external glibdll name 'g_idle_remove_by_data';
+
+    type
+       PGPollFD = ^TGPollFD;
+       TGPollFD = record
+            fd : gint;
+            events : gushort;
+            revents : gushort;
+         end;
+
+       TGPollFunc = function (ufds:PGPollFD; nfsd:guint; timeout:gint):gint;cdecl;
+
+procedure g_main_add_poll(fd:PGPollFD; priority:gint);cdecl;external glibdll name 'g_main_add_poll';
+procedure g_main_remove_poll(fd:PGPollFD);cdecl;external glibdll name 'g_main_remove_poll';
+procedure g_main_set_poll_func(func:TGPollFunc);cdecl;external glibdll name 'g_main_set_poll_func';
+function  g_io_channel_unix_new(fd:longint):PGIOChannel;cdecl;external glibdll name 'g_io_channel_unix_new';
+function  g_io_channel_unix_get_fd(channel:PGIOChannel):gint;cdecl;external glibdll name 'g_io_channel_unix_get_fd';
+
+
+implementation
+
+function  g_list_previous(list : PGlist) : PGlist;
+begin
+  if list<>nil then
+    g_list_previous:=(PGList(list))^.prev
+  else
+    g_list_previous:=NULL;
+end;
+
+function  g_list_next(list : PGlist) : PGlist;
+begin
+  if list<>nil then
+    g_list_next:=(PGList(list))^.next
+  else
+    g_list_next:=NULL;
+end;
+
+function  g_slist_next(slist : PGSList) : PGSList;
+begin
+  if slist<>nil then
+    g_slist_next:=(PGSList(slist))^.next
+  else
+    g_slist_next:=NULL;
+end;
+
+function  G_NODE_IS_ROOT(node : PGNode) : boolean;
+begin
+  G_NODE_IS_ROOT:={((((PGNode(node))^.parent) = (NULL and (@((PGNode(node))^.prev)))) = (NULL and (@((PGNode(node))^.next)))) = NULL; }false;
+end;
+
+function  G_NODE_IS_LEAF(node : PGNode) : boolean;
+begin
+  G_NODE_IS_LEAF:=((PGNode(node))^.children) = NULL;
+end;
+
+function  g_node_append(parent,node : PGNode) : PGNode;
+begin
+  g_node_append:=g_node_insert_before(parent,NULL,node);
+end;
+
+function  g_node_insert_data(parent: PGNode;position:gint;data:pointer) : PGNode;
+begin
+  g_node_insert_data:=g_node_insert(parent,position,g_node_new(data));
+end;
+
+function  g_node_insert_data_before(parent,sibling : PGNode;data:pointer) : PGNode;
+begin
+  g_node_insert_data_before:=g_node_insert_before(parent,sibling,g_node_new(data));
+end;
+
+function  g_node_prepend_data(parent:PGNode;data : pointer) : PGNode;
+begin
+  g_node_prepend_data:=g_node_prepend(parent,g_node_new(data));
+end;
+
+function  g_node_append_data(parent : PGNode;data:pointer) : PGNode;
+begin
+  g_node_append_data:=g_node_insert_before(parent,NULL,g_node_new(data));
+end;
+
+function  g_node_prev_sibling(node : PGnode) : PGNode;
+begin
+  if node<>nil then
+    g_node_prev_sibling:=(PGNode(node))^.prev
+  else
+    g_node_prev_sibling:=NULL;
+end;
+
+function  g_node_next_sibling(node : PGNode) : PGNode;
+begin
+  if node<>nil then
+    g_node_next_sibling:=(PGNode(node))^.next
+  else
+    g_node_next_sibling:=NULL;
+end;
+
+function  g_node_first_child(node : PGNode) : PGNode;
+begin
+  if node<>nil then
+    g_node_first_child:=(PGNode(node))^.children
+  else
+    g_node_first_child:=NULL;
+end;
+
+function G_HOOK_DEFERRED_DESTROY : TGHookFreeFunc;
+begin
+  G_HOOK_DEFERRED_DESTROY:=TGHookFreeFunc($01);
+end;
+
+function  is_setup(var a : TGHookList) : guint;
+      begin
+        is_setup:=(a.flag0 and bm_TGHookList_is_setup) shr bp_TGHookList_is_setup;
+      end;
+
+procedure set_is_setup(var a : TGHookList; __is_setup : guint);
+      begin
+         a.flag0:=a.flag0 or ((__is_setup shl bp_TGHookList_is_setup) and bm_TGHookList_is_setup);
+      end;
+
+function  G_HOOK_ACTIVE(hook : PGHook) : boolean;
+begin
+  G_HOOK_ACTIVE:=(((PGHook(hook))^.flags) and cardinal(G_HOOK_FLAG_ACTIVE)) <> 0;
+end;
+
+function  G_HOOK_IN_CALL(hook : PGHook) : boolean;
+begin
+  G_HOOK_IN_CALL:=(((PGHook(hook))^.flags) and cardinal(G_HOOK_FLAG_IN_CALL)) <> 0;
+end;
+
+function  G_HOOK_IS_VALID(hook : PGHook) : boolean;
+begin
+  G_HOOK_IS_VALID:=(hook^.hook_id<>0) and G_HOOK_ACTIVE(hook);
+end;
+
+function  G_HOOK_IS_UNLINKED(hook : PGHook) : boolean;
+begin
+  G_HOOK_IS_UNLINKED:=(hook^.next=NULL) and (hook^.prev=NULL) and (hook^.hook_id=0) and (hook^.ref_count = 0);
+end;
+
+procedure g_hook_append(hook_list:PGhooklist;hook : PGHook);
+begin
+  g_hook_insert_before(hook_list,nil,hook);
+end;
+
+{$ifndef gtkwin}
+function  g_strstrip(thestring : Pgchar) : Pgchar;
+begin
+  g_strstrip:=g_strchomp(g_strchug(thestring));
+end;
+{$endif}
+
+function  g_array_append_val(a:PGArray;v : longint) : PGarray;
+begin
+  g_array_append_val:=g_array_append_vals(a,@(v),1);
+end;
+
+function  g_array_prepend_val(a:PGArray;v : longint) : PGarray;
+begin
+  g_array_prepend_val:=g_array_prepend_vals(a,@(v),1);
+end;
+
+function  g_array_insert_val(a:PGArray;i:guint;v : longint) : PGarray;
+begin
+  g_array_insert_val:=g_array_insert_vals(a,i,@(v),1);
+end;
+
+procedure g_datalist_id_set_data(dl:PPGdata;q:TGQuark;d : pointer);
+begin
+  g_datalist_id_set_data_full(dl,q,d,NULL);
+end;
+
+procedure g_datalist_id_remove_data(dl:PPGData;q:TGQuark);
+begin
+  g_datalist_id_set_data(dl,q,NULL);
+end;
+
+function  g_datalist_Get_data(dl:PPGData;k : Pgchar):gpointer;
+begin
+  g_datalist_Get_data:=g_datalist_id_get_data(dl,g_quark_try_string(k));
+end;
+
+procedure g_datalist_set_data_full(dl:PPGData;k:Pgchar;d:gpointer;f : TGdestroynotify);
+begin
+  g_datalist_id_set_data_full(dl,g_quark_from_string(k),d,f);
+end;
+
+procedure g_datalist_remove_no_notify(dl:PPGdata;k : Pgchar);
+begin
+  g_datalist_id_remove_no_notify(dl,g_quark_try_string(k));
+end;
+
+procedure g_datalist_set_data(dl:PPGdata;k:Pgchar;d : pointer);
+begin
+  g_datalist_set_data_full(dl,k,d,NULL);
+end;
+
+procedure g_datalist_remove_data(dl:PPGdata;k : Pgchar);
+begin
+  g_datalist_id_set_data(dl,g_quark_try_string(k),NULL);
+end;
+
+procedure g_dataset_id_set_data(l:gconstpointer;k:TGQuark;d : gconstpointer);
+begin
+  g_dataset_id_set_data_full(l,k,d,NULL);
+end;
+
+procedure g_dataset_id_remove_data(l : gconstpointer;k:TGQuark);
+begin
+  g_dataset_id_set_data(l,k,NULL);
+end;
+
+function  g_dataset_get_data(l : gconstpointer;k:Pgchar) : gconstpointer;
+begin
+  g_dataset_get_data:=g_dataset_id_get_data(l,g_quark_try_string(k));
+end;
+
+procedure g_dataset_set_data_full(l:gconstpointer;k:Pgchar;d:pointer;f : TGDestroynotify);
+begin
+  g_dataset_id_set_data_full(l,g_quark_from_string(k),d,f);
+end;
+
+procedure g_dataset_remove_no_notify(l : gconstpointer;k:Pgchar);
+begin
+  g_dataset_id_remove_no_notify(l,g_quark_try_string(k));
+end;
+
+procedure g_dataset_set_data(l:gconstpointer;k:Pgchar;d:pointer);
+begin
+  g_dataset_set_data_full(l,k,d,NULL);
+end;
+
+procedure g_dataset_remove_data(l : gconstpointer;k:Pgchar);
+begin
+  g_dataset_id_set_data(l,g_quark_try_string(k),NULL);
+end;
+
+function  case_sensitive(var a : TGScannerConfig) : guint;
+      begin
+         case_sensitive:=(a.flag0 and bm_TGScannerConfig_case_sensitive) shr bp_TGScannerConfig_case_sensitive;
+      end;
+
+procedure set_case_sensitive(var a : TGScannerConfig; __case_sensitive : guint);
+      begin
+         a.flag0:=a.flag0 or ((__case_sensitive shl bp_TGScannerConfig_case_sensitive) and bm_TGScannerConfig_case_sensitive);
+      end;
+
+function  skip_comment_multi(var a : TGScannerConfig) : guint;
+      begin
+         skip_comment_multi:=(a.flag0 and bm_TGScannerConfig_skip_comment_multi) shr bp_TGScannerConfig_skip_comment_multi;
+      end;
+
+procedure set_skip_comment_multi(var a : TGScannerConfig; __skip_comment_multi : guint);
+      begin
+         a.flag0:=a.flag0 or ((__skip_comment_multi shl bp_TGScannerConfig_skip_comment_multi) and bm_TGScannerConfig_skip_comment_multi);
+      end;
+
+function  skip_comment_single(var a : TGScannerConfig) : guint;
+      begin
+         skip_comment_single:=(a.flag0 and bm_TGScannerConfig_skip_comment_single) shr bp_TGScannerConfig_skip_comment_single;
+      end;
+
+procedure set_skip_comment_single(var a : TGScannerConfig; __skip_comment_single : guint);
+      begin
+         a.flag0:=a.flag0 or ((__skip_comment_single shl bp_TGScannerConfig_skip_comment_single) and bm_TGScannerConfig_skip_comment_single);
+      end;
+
+function  scan_comment_multi(var a : TGScannerConfig) : guint;
+      begin
+         scan_comment_multi:=(a.flag0 and bm_TGScannerConfig_scan_comment_multi) shr bp_TGScannerConfig_scan_comment_multi;
+      end;
+
+procedure set_scan_comment_multi(var a : TGScannerConfig; __scan_comment_multi : guint);
+      begin
+         a.flag0:=a.flag0 or ((__scan_comment_multi shl bp_TGScannerConfig_scan_comment_multi) and bm_TGScannerConfig_scan_comment_multi);
+      end;
+
+function  scan_identifier(var a : TGScannerConfig) : guint;
+      begin
+         scan_identifier:=(a.flag0 and bm_TGScannerConfig_scan_identifier) shr bp_TGScannerConfig_scan_identifier;
+      end;
+
+procedure set_scan_identifier(var a : TGScannerConfig; __scan_identifier : guint);
+      begin
+         a.flag0:=a.flag0 or ((__scan_identifier shl bp_TGScannerConfig_scan_identifier) and bm_TGScannerConfig_scan_identifier);
+      end;
+
+function  scan_identifier_1char(var a : TGScannerConfig) : guint;
+      begin
+         scan_identifier_1char:=(a.flag0 and bm_TGScannerConfig_scan_identifier_1char) shr bp_TGScannerConfig_scan_identifier_1char;
+      end;
+
+procedure set_scan_identifier_1char(var a : TGScannerConfig; __scan_identifier_1char : guint);
+      begin
+         a.flag0:=a.flag0 or ((__scan_identifier_1char shl bp_TGScannerConfig_scan_identifier_1char) and bm_TGScannerConfig_scan_identifier_1char);
+      end;
+
+function  scan_identifier_NULL(var a : TGScannerConfig) : guint;
+      begin
+         scan_identifier_NULL:=(a.flag0 and bm_TGScannerConfig_scan_identifier_NULL) shr bp_TGScannerConfig_scan_identifier_NULL;
+      end;
+
+procedure set_scan_identifier_NULL(var a : TGScannerConfig; __scan_identifier_NULL : guint);
+      begin
+         a.flag0:=a.flag0 or ((__scan_identifier_NULL shl bp_TGScannerConfig_scan_identifier_NULL) and bm_TGScannerConfig_scan_identifier_NULL);
+      end;
+
+function  scan_symbols(var a : TGScannerConfig) : guint;
+      begin
+         scan_symbols:=(a.flag0 and bm_TGScannerConfig_scan_symbols) shr bp_TGScannerConfig_scan_symbols;
+      end;
+
+procedure set_scan_symbols(var a : TGScannerConfig; __scan_symbols : guint);
+      begin
+         a.flag0:=a.flag0 or ((__scan_symbols shl bp_TGScannerConfig_scan_symbols) and bm_TGScannerConfig_scan_symbols);
+      end;
+
+function  scan_binary(var a : TGScannerConfig) : guint;
+      begin
+         scan_binary:=(a.flag0 and bm_TGScannerConfig_scan_binary) shr bp_TGScannerConfig_scan_binary;
+      end;
+
+procedure set_scan_binary(var a : TGScannerConfig; __scan_binary : guint);
+      begin
+         a.flag0:=a.flag0 or ((__scan_binary shl bp_TGScannerConfig_scan_binary) and bm_TGScannerConfig_scan_binary);
+      end;
+
+function  scan_octal(var a : TGScannerConfig) : guint;
+      begin
+         scan_octal:=(a.flag0 and bm_TGScannerConfig_scan_octal) shr bp_TGScannerConfig_scan_octal;
+      end;
+
+procedure set_scan_octal(var a : TGScannerConfig; __scan_octal : guint);
+      begin
+         a.flag0:=a.flag0 or ((__scan_octal shl bp_TGScannerConfig_scan_octal) and bm_TGScannerConfig_scan_octal);
+      end;
+
+function  scan_float(var a : TGScannerConfig) : guint;
+      begin
+         scan_float:=(a.flag0 and bm_TGScannerConfig_scan_float) shr bp_TGScannerConfig_scan_float;
+      end;
+
+procedure set_scan_float(var a : TGScannerConfig; __scan_float : guint);
+      begin
+         a.flag0:=a.flag0 or ((__scan_float shl bp_TGScannerConfig_scan_float) and bm_TGScannerConfig_scan_float);
+      end;
+
+function  scan_hex(var a : TGScannerConfig) : guint;
+      begin
+         scan_hex:=(a.flag0 and bm_TGScannerConfig_scan_hex) shr bp_TGScannerConfig_scan_hex;
+      end;
+
+procedure set_scan_hex(var a : TGScannerConfig; __scan_hex : guint);
+      begin
+         a.flag0:=a.flag0 or ((__scan_hex shl bp_TGScannerConfig_scan_hex) and bm_TGScannerConfig_scan_hex);
+      end;
+
+function  scan_hex_dollar(var a : TGScannerConfig) : guint;
+      begin
+         scan_hex_dollar:=(a.flag0 and bm_TGScannerConfig_scan_hex_dollar) shr bp_TGScannerConfig_scan_hex_dollar;
+      end;
+
+procedure set_scan_hex_dollar(var a : TGScannerConfig; __scan_hex_dollar : guint);
+      begin
+         a.flag0:=a.flag0 or ((__scan_hex_dollar shl bp_TGScannerConfig_scan_hex_dollar) and bm_TGScannerConfig_scan_hex_dollar);
+      end;
+
+function  scan_string_sq(var a : TGScannerConfig) : guint;cdecl;
+      begin
+         scan_string_sq:=(a.flag0 and bm_TGScannerConfig_scan_string_sq) shr bp_TGScannerConfig_scan_string_sq;
+      end;
+
+procedure set_scan_string_sq(var a : TGScannerConfig; __scan_string_sq : guint);cdecl;
+      begin
+         a.flag0:=a.flag0 or ((__scan_string_sq shl bp_TGScannerConfig_scan_string_sq) and bm_TGScannerConfig_scan_string_sq);
+      end;
+
+function  scan_string_dq(var a : TGScannerConfig) : guint;cdecl;
+      begin
+         scan_string_dq:=(a.flag0 and bm_TGScannerConfig_scan_string_dq) shr bp_TGScannerConfig_scan_string_dq;
+      end;
+
+procedure set_scan_string_dq(var a : TGScannerConfig; __scan_string_dq : guint);cdecl;
+      begin
+         a.flag0:=a.flag0 or ((__scan_string_dq shl bp_TGScannerConfig_scan_string_dq) and bm_TGScannerConfig_scan_string_dq);
+      end;
+
+function  numbers_2_int(var a : TGScannerConfig) : guint;
+      begin
+         numbers_2_int:=(a.flag0 and bm_TGScannerConfig_numbers_2_int) shr bp_TGScannerConfig_numbers_2_int;
+      end;
+
+procedure set_numbers_2_int(var a : TGScannerConfig; __numbers_2_int : guint);
+      begin
+         a.flag0:=a.flag0 or ((__numbers_2_int shl bp_TGScannerConfig_numbers_2_int) and bm_TGScannerConfig_numbers_2_int);
+      end;
+
+function  int_2_float(var a : TGScannerConfig) : guint;
+      begin
+         int_2_float:=(a.flag0 and bm_TGScannerConfig_int_2_float) shr bp_TGScannerConfig_int_2_float;
+      end;
+
+procedure set_int_2_float(var a : TGScannerConfig; __int_2_float : guint);
+      begin
+         a.flag0:=a.flag0 or ((__int_2_float shl bp_TGScannerConfig_int_2_float) and bm_TGScannerConfig_int_2_float);
+      end;
+
+function  identifier_2_string(var a : TGScannerConfig) : guint;
+      begin
+         identifier_2_string:=(a.flag0 and bm_TGScannerConfig_identifier_2_string) shr bp_TGScannerConfig_identifier_2_string;
+      end;
+
+procedure set_identifier_2_string(var a : TGScannerConfig; __identifier_2_string : guint);
+      begin
+         a.flag0:=a.flag0 or ((__identifier_2_string shl bp_TGScannerConfig_identifier_2_string) and bm_TGScannerConfig_identifier_2_string);
+      end;
+
+function  char_2_token(var a : TGScannerConfig) : guint;
+      begin
+         char_2_token:=(a.flag0 and bm_TGScannerConfig_char_2_token) shr bp_TGScannerConfig_char_2_token;
+      end;
+
+procedure set_char_2_token(var a : TGScannerConfig; __char_2_token : guint);
+      begin
+         a.flag0:=a.flag0 or ((__char_2_token shl bp_TGScannerConfig_char_2_token) and bm_TGScannerConfig_char_2_token);
+      end;
+
+function  symbol_2_token(var a : TGScannerConfig) : guint;
+      begin
+         symbol_2_token:=(a.flag0 and bm_TGScannerConfig_symbol_2_token) shr bp_TGScannerConfig_symbol_2_token;
+      end;
+
+procedure set_symbol_2_token(var a : TGScannerConfig; __symbol_2_token : guint);
+      begin
+         a.flag0:=a.flag0 or ((__symbol_2_token shl bp_TGScannerConfig_symbol_2_token) and bm_TGScannerConfig_symbol_2_token);
+      end;
+
+function  scope_0_fallback(var a : TGScannerConfig) : guint;
+      begin
+         scope_0_fallback:=(a.flag0 and bm_TGScannerConfig_scope_0_fallback) shr bp_TGScannerConfig_scope_0_fallback;
+      end;
+
+procedure set_scope_0_fallback(var a : TGScannerConfig; __scope_0_fallback : guint);
+      begin
+         a.flag0:=a.flag0 or ((__scope_0_fallback shl bp_TGScannerConfig_scope_0_fallback) and bm_TGScannerConfig_scope_0_fallback);
+      end;
+
+function  julian_days(var a : TGDate) : guint;
+     begin
+        julian_days:=(a.flag0 and bm_TGDate_julian_days) shr bp_TGDate_julian_days;
+     end;
+
+procedure set_julian_days(var a : TGDate; __julian_days : guint);
+      begin
+         a.flag0:=a.flag0 or ((__julian_days shl bp_TGDate_julian_days) and bm_TGDate_julian_days);
+      end;
+
+function  julian(var a : TGDate) : guint;
+      begin
+         julian:=(a.flag0 and bm_TGDate_julian) shr bp_TGDate_julian;
+      end;
+
+procedure set_julian(var a : TGDate; __julian : guint);
+      begin
+         a.flag0:=a.flag0 or ((__julian shl bp_TGDate_julian) and bm_TGDate_julian);
+      end;
+
+function  dmy(var a : TGDate) : guint;
+      begin
+         dmy:=(a.flag0 and bm_TGDate_dmy) shr bp_TGDate_dmy;
+      end;
+
+procedure set_dmy(var a : TGDate; __dmy : guint);
+      begin
+         a.flag0:=a.flag0 or ((__dmy shl bp_TGDate_dmy) and bm_TGDate_dmy);
+      end;
+
+function  day(var a : TGDate) : guint;
+      begin
+         day:=(a.flag0 and bm_TGDate_day) shr bp_TGDate_day;
+      end;
+
+procedure set_day(var a : TGDate; __day : guint);
+      begin
+         a.flag0:=a.flag0 or ((__day shl bp_TGDate_day) and bm_TGDate_day);
+      end;
+
+function  month(var a : TGDate) : guint;
+      begin
+         month:=(a.flag0 and bm_TGDate_month) shr bp_TGDate_month;
+      end;
+
+procedure set_month(var a : TGDate; __month : guint);
+      begin
+         a.flag0:=a.flag0 or ((__month shl bp_TGDate_month) and bm_TGDate_month);
+      end;
+
+function  year(var a : TGDate) : guint;
+      begin
+         year:=(a.flag0 and bm_TGDate_year) shr bp_TGDate_year;
+      end;
+
+procedure set_year(var a : TGDate; __year : guint);
+      begin
+         a.flag0:=a.flag0 or ((__year shl bp_TGDate_year) and bm_TGDate_year);
+      end;
+
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:33  peter
+    * moved to packages dir
+
+  Revision 1.11  1999/10/06 17:42:47  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.10  1999/10/05 09:28:26  peter
+    * patches from Frank Loemker
+
+  Revision 1.9  1999/07/23 16:11:46  peter
+    * use packrecords C
+
+  Revision 1.8  1999/07/03 10:29:21  peter
+    * enum fixes
+    * use version 1.3 instead of 1.2 for win32
+
+  Revision 1.7  1999/06/18 18:27:14  daniel
+  * Now compiles again
+
+  Revision 1.6  1999/05/21 14:32:07  peter
+    * fixed dup id error
+
+  Revision 1.5  1999/05/11 00:37:56  peter
+    * win32 fixes
+
+  Revision 1.4  1999/05/10 15:18:43  peter
+    * cdecl fixes
+
+  Revision 1.3  1999/05/10 09:02:49  peter
+    * gtk 1.2 port working
+
+  Revision 1.2  1999/05/07 15:09:46  peter
+    * more fixes
+
+  Revision 1.1  1999/05/07 10:40:22  peter
+    * first things for 1.2
+
+  Revision 1.6  1999/02/01 09:57:03  michael
+  + Patch from Frank Loemker
+
+  Revision 1.5  1999/01/26 12:42:23  michael
+  *** empty log message ***
+
+  Revision 1.4  1998/11/12 11:35:49  peter
+    + array of const
+
+  Revision 1.3  1998/10/22 11:37:36  peter
+    * fixes for win32
+
+  Revision 1.2  1998/10/21 20:22:03  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}

+ 94 - 0
packages/gtk/glib/gmodule.pp

@@ -0,0 +1,94 @@
+{
+   $Id$
+
+   GMODULE - GLIB wrapper code for dynamic module loading
+   Copyright (C) 1998 Tim Janik
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this library; if not, write to the
+   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.
+}
+unit gmodule;
+interface
+
+{$mode objfpc}
+
+uses
+  glib;
+
+{$ifdef win32}
+  const
+    gmoduledll='gmodule-1.3';
+  {$define gtkwin}
+{$else}
+  const
+    gmoduledll='gmodule';
+{$endif}
+
+{$packrecords C}
+
+    var
+       g_log_domain_gmodule : Pgchar;external gmoduledll name 'g_log_domain_gmodule';
+
+    type
+       PGModule=pointer;
+
+       TGModuleFlags = longint;
+    const
+       G_MODULE_BIND_LAZY = 1 shl 0;
+       G_MODULE_BIND_MASK = 1;
+
+    type
+       TGModuleCheckInit = function (module:PGModule):Pgchar;cdecl;
+       TGModuleUnload = procedure (module:PGModule);cdecl;
+
+function  g_module_supported:gboolean;cdecl;external gmoduledll name 'g_module_supported';
+function  g_module_open(file_name:Pgchar; flags:TGModuleFlags):PGModule;cdecl;external gmoduledll name 'g_module_open';
+function  g_module_close(module:PGModule):gboolean;cdecl;external gmoduledll name 'g_module_close';
+procedure g_module_make_resident(module:PGModule);cdecl;external gmoduledll name 'g_module_make_resident';
+function  g_module_error:Pgchar;cdecl;external gmoduledll name 'g_module_error';
+function  g_module_symbol(module:PGModule; symbol_name:Pgchar; symbol:Pgpointer):gboolean;cdecl;external gmoduledll name 'g_module_symbol';
+function  g_module_name(module:PGModule):Pgchar;cdecl;external gmoduledll name 'g_module_name';
+function  g_module_build_path(directory:Pgchar; module_name:Pgchar):Pgchar;cdecl;external gmoduledll name 'g_module_build_path';
+
+
+implementation
+
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:34  peter
+    * moved to packages dir
+
+  Revision 1.6  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.5  1999/07/23 16:11:48  peter
+    * use packrecords C
+
+  Revision 1.4  1999/07/03 10:29:23  peter
+    * enum fixes
+    * use version 1.3 instead of 1.2 for win32
+
+  Revision 1.3  1999/05/11 00:37:58  peter
+    * win32 fixes
+
+  Revision 1.2  1999/05/10 15:18:46  peter
+    * cdecl fixes
+
+  Revision 1.1  1999/05/07 10:40:22  peter
+    * first things for 1.2
+
+}

+ 107 - 0
packages/gtk/gtk/gtk.pp

@@ -0,0 +1,107 @@
+{
+   $Id$
+
+   GTK - The GIMP Toolkit
+   Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with this library; if not, write to the
+   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.
+
+ **********************************************************************}
+unit gtk;
+interface
+
+{$ifdef VER0_99_12}
+  {$fatal Can't compile GTK with 0.99.12}
+{$endif}
+
+{$mode objfpc} { needed for array of const }
+
+uses
+  glib,gdk;
+
+{$ifdef win32}
+  const
+    gtkdll='gtk-1.3';
+  {$define gtkwin}
+{$else}
+  const
+    gtkdll='gtk';
+  {$linklib c}
+  {$linklib Xi}
+  {$linklib Xext}
+  {$linklib X11}
+  {$linklib m}
+{$endif}
+
+{$packrecords C}
+
+Type
+  PLongint  = ^Longint;
+  PByte     = ^Byte;
+  PWord     = ^Word;
+  PINteger  = ^Integer;
+  PCardinal = ^Cardinal;
+  PReal     = ^Real;
+  PDouble   = ^Double;
+
+{$define gtk_include_files}
+
+{$define read_interface}
+{$undef read_implementation}
+
+{$i gtkincludes.pp}
+
+  implementation
+
+{$undef read_interface}
+{$define read_implementation}
+
+{$i gtkincludes.pp}
+
+end.
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.8  1999/07/23 16:11:49  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:37:59  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 09:02:50  peter
+    * gtk 1.2 port working
+
+  Revision 1.5  1999/05/07 17:40:10  peter
+    * more updates
+
+  Revision 1.4  1999/05/07 10:40:22  peter
+    * first things for 1.2
+
+  Revision 1.3  1998/11/12 11:35:50  peter
+    + array of const
+
+  Revision 1.2  1998/10/22 11:37:37  peter
+    * fixes for win32
+
+  Revision 1.1  1998/10/21 20:22:04  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 86 - 0
packages/gtk/gtk/gtkaccelerator.pp

@@ -0,0 +1,86 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkAcceleratorTable = ^TGtkAcceleratorTable;
+       TGtkAcceleratorTable = record
+            entries : array[0..255] of PGList;
+            ref_count : guint;
+            modifier_mask : guint8;
+         end;
+
+{$ifndef win32}
+function  gtk_accelerator_table_new : PGtkAcceleratorTable;cdecl;external gtkdll name 'gtk_accelerator_table_new';
+function  gtk_accelerator_table_find (obj:PGtkObject; signal_name:Pgchar; accelerator_key:guchar; accelerator_mods:guint8): PGtkAcceleratorTable;cdecl;external gtkdll name 'gtk_accelerator_table_find';
+function  gtk_accelerator_table_ref (table:PGtkAcceleratorTable):PGtkAcceleratorTable;cdecl;external gtkdll name 'gtk_accelerator_table_ref';
+procedure gtk_accelerator_table_unref(table:PGtkAcceleratorTable);cdecl;external gtkdll name 'gtk_accelerator_table_unref';
+procedure gtk_accelerator_table_install(table:PGtkAcceleratorTable; obj:PGtkObject; signal_name:Pgchar; accelerator_key:guchar; accelerator_mods:guint8);cdecl;external gtkdll name 'gtk_accelerator_table_install';
+procedure gtk_accelerator_table_remove(table:PGtkAcceleratorTable; obj:PGtkObject; signal_name:Pgchar);cdecl;external gtkdll name 'gtk_accelerator_table_remove';
+function  gtk_accelerator_table_check(table:PGtkAcceleratorTable; accelerator_key:guchar; accelerator_mods:guint8):gint;cdecl;external gtkdll name 'gtk_accelerator_table_check';
+procedure gtk_accelerator_tables_delete(obj:PGtkObject);cdecl;external gtkdll name 'gtk_accelerator_tables_delete';
+procedure gtk_accelerator_table_set_mod_mask(table:PGtkAcceleratorTable; modifier_mask:guint8);cdecl;external gtkdll name 'gtk_accelerator_table_set_mod_mask';
+{$endif}
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+{$endif read_implementation}
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/05/11 00:38:00  peter
+    * win32 fixes
+
+  Revision 1.7  1999/05/10 19:18:26  peter
+    * more fixes for the examples to work
+
+  Revision 1.6  1999/05/10 15:18:47  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 15:09:49  peter
+    * more fixes
+
+  Revision 1.4  1998/10/21 22:25:14  peter
+    * fixed some wrong cdecls
+
+  Revision 1.3  1998/10/21 20:22:04  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 104 - 0
packages/gtk/gtk/gtkaccelgroup.pp

@@ -0,0 +1,104 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     TGtkAccelFlags = (
+       GTK_ACCEL_VISIBLE := 1 shl 0,
+       GTK_ACCEL_SIGNAL_VISIBLE := 1 shl 1,
+       GTK_ACCEL_LOCKED := 1 shl 2,
+       GTK_ACCEL_MASK := $07
+       );
+
+     PGtkAccelGroup = ^TGtkAccelGroup;
+     TGtkAccelGroup = record
+          ref_count : guint;
+          lock_count : guint;
+          modifier_mask : TGdkModifierType;
+          attach_objects : PGSList;
+       end;
+
+     PGtkAccelEntry = ^TGtkAccelEntry;
+     TGtkAccelEntry = record
+          accel_group : PGtkAccelGroup;
+          accelerator_key : guint;
+          accelerator_mods : TGdkModifierType;
+          accel_flags : TGtkAccelFlags;
+          _object : PGtkObject;
+          signal_id : guint;
+       end;
+
+function  gtk_accel_group_new:PGtkAccelGroup;cdecl;external gtkdll name 'gtk_accel_group_new';
+function  gtk_accel_group_get_default:PGtkAccelGroup;cdecl;external gtkdll name 'gtk_accel_group_get_default';
+function  gtk_accel_group_ref(accel_group:PGtkAccelGroup):PGtkAccelGroup;cdecl;external gtkdll name 'gtk_accel_group_ref';
+procedure gtk_accel_group_unref(accel_group:PGtkAccelGroup);cdecl;external gtkdll name 'gtk_accel_group_unref';
+function  gtk_accel_group_activate(accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType):gboolean;cdecl;external gtkdll name 'gtk_accel_group_activate';
+function  gtk_accel_groups_activate(_object:PGtkObject; accel_key:guint; accel_mods:TGdkModifierType):gboolean;cdecl;external gtkdll name 'gtk_accel_groups_activate';
+procedure gtk_accel_group_attach(accel_group:PGtkAccelGroup; _object:PGtkObject);cdecl;external gtkdll name 'gtk_accel_group_attach';
+procedure gtk_accel_group_detach(accel_group:PGtkAccelGroup; _object:PGtkObject);cdecl;external gtkdll name 'gtk_accel_group_detach';
+procedure gtk_accel_group_lock(accel_group:PGtkAccelGroup);cdecl;external gtkdll name 'gtk_accel_group_lock';
+procedure gtk_accel_group_unlock(accel_group:PGtkAccelGroup);cdecl;external gtkdll name 'gtk_accel_group_unlock';
+function  gtk_accel_group_get_entry(accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType):PGtkAccelEntry;cdecl;external gtkdll name 'gtk_accel_group_get_entry';
+procedure gtk_accel_group_lock_entry(accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType);cdecl;external gtkdll name 'gtk_accel_group_lock_entry';
+procedure gtk_accel_group_unlock_entry(accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType);cdecl;external gtkdll name 'gtk_accel_group_unlock_entry';
+procedure gtk_accel_group_add(accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType; accel_flags:TGtkAccelFlags; _object:PGtkObject; accel_signal:Pgchar);cdecl;external gtkdll name 'gtk_accel_group_add';
+procedure gtk_accel_group_remove(accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType; _object:PGtkObject);cdecl;external gtkdll name 'gtk_accel_group_remove';
+procedure gtk_accel_group_handle_add(_object:PGtkObject; accel_signal_id:guint; accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType; accel_flags:TGtkAccelFlags);cdecl;external gtkdll name 'gtk_accel_group_handle_add';
+procedure gtk_accel_group_handle_remove(_object:PGtkObject; accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType);cdecl;external gtkdll name 'gtk_accel_group_handle_remove';
+function  gtk_accel_group_create_add(class_type:TGtkType; signal_flags:TGtkSignalRunType; handler_offset:guint):guint;cdecl;external gtkdll name 'gtk_accel_group_create_add';
+function  gtk_accel_group_create_remove(class_type:TGtkType; signal_flags:TGtkSignalRunType; handler_offset:guint):guint;cdecl;external gtkdll name 'gtk_accel_group_create_remove';
+{$ifndef gtkwin}
+procedure gtk_accel_group_marshal_add(_object:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_accel_group_marshal_add';
+procedure gtk_accel_group_marshal_remove(_object:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_accel_group_marshal_remove';
+{$endif}
+function  gtk_accel_groups_from_object(_object:PGtkObject):PGSList;cdecl;external gtkdll name 'gtk_accel_groups_from_object';
+function  gtk_accel_group_entries_from_object(_object:PGtkObject):PGSList;cdecl;external gtkdll name 'gtk_accel_group_entries_from_object';
+function  gtk_accelerator_valid(keyval:guint; modifiers:TGdkModifierType):gboolean;cdecl;external gtkdll name 'gtk_accelerator_valid';
+procedure gtk_accelerator_parse(accelerator:Pgchar; accelerator_key:Pguint; accelerator_mods:PGdkModifierType);cdecl;external gtkdll name 'gtk_accelerator_parse';
+function  gtk_accelerator_name(accelerator_key:guint; accelerator_mods:TGdkModifierType):Pgchar;cdecl;external gtkdll name 'gtk_accelerator_name';
+procedure gtk_accelerator_set_default_mod_mask(default_mod_mask:TGdkModifierType);cdecl;external gtkdll name 'gtk_accelerator_set_default_mod_mask';
+function  gtk_accelerator_get_default_mod_mask:guint;cdecl;external gtkdll name 'gtk_accelerator_get_default_mod_mask';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.6  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.5  1999/05/11 00:38:01  peter
+    * win32 fixes
+
+  Revision 1.4  1999/05/10 19:18:27  peter
+    * more fixes for the examples to work
+
+  Revision 1.3  1999/05/10 15:18:48  peter
+    * cdecl fixes
+
+  Revision 1.2  1999/05/10 09:02:52  peter
+    * gtk 1.2 port working
+
+  Revision 1.1  1999/05/07 10:40:23  peter
+    * first things for 1.2
+
+}
+

+ 114 - 0
packages/gtk/gtk/gtkaccellabel.pp

@@ -0,0 +1,114 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkAccelLabel = ^TGtkAccelLabel;
+     TGtkAccelLabel = record
+          _label : TGtkLabel;
+          queue_id : guint;
+          accel_padding : guint;
+          accel_widget : PGtkWidget;
+          accel_string : Pgchar;
+          accel_string_width : guint16;
+       end;
+
+     PGtkAccelLabelClass = ^TGtkAccelLabelClass;
+     TGtkAccelLabelClass = record
+          parent_class : TGtkLabelClass;
+          signal_quote1 : Pgchar;
+          signal_quote2 : Pgchar;
+          mod_name_shift : Pgchar;
+          mod_name_control : Pgchar;
+          mod_name_alt : Pgchar;
+          mod_separator : Pgchar;
+          accel_seperator : Pgchar;
+          flag0 : word;
+       end;
+
+const
+  bm_TGtkAccelLabelClass_latin1_to_char = $1;
+  bp_TGtkAccelLabelClass_latin1_to_char = 0;
+
+type
+  GTK_ACCEL_LABEL=PGtkAccelLabel;
+  GTK_ACCEL_LABEL_CLASS=PGtkAccelLabelClass;
+
+
+function  latin1_to_char(var a : TGtkAccelLabelClass) : guint;
+procedure set_latin1_to_char(var a : TGtkAccelLabelClass; __latin1_to_char : guint);
+
+function  GTK_ACCEL_LABEL_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_accel_label_get_type';
+function  GTK_IS_ACCEL_LABEL(obj:pointer):boolean;
+function  GTK_IS_ACCEL_LABEL_CLASS(klass:pointer):boolean;
+
+function  gtk_accel_label_get_type:TGtkType;cdecl;external gtkdll name 'gtk_accel_label_get_type';
+function  gtk_accel_label_new(thestring:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_accel_label_new';
+function  gtk_accel_label_get_accel_width(accel_label:PGtkAccelLabel):guint;cdecl;external gtkdll name 'gtk_accel_label_get_accel_width';
+procedure gtk_accel_label_set_accel_widget(accel_label:PGtkAccelLabel; accel_widget:PGtkWidget);cdecl;external gtkdll name 'gtk_accel_label_set_accel_widget';
+function  gtk_accel_label_refetch(accel_label:PGtkAccelLabel):gboolean;cdecl;external gtkdll name 'gtk_accel_label_refetch';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  latin1_to_char(var a : TGtkAccelLabelClass) : guint;
+    begin
+       latin1_to_char:=(a.flag0 and bm_TGtkAccelLabelClass_latin1_to_char) shr bp_TGtkAccelLabelClass_latin1_to_char;
+    end;
+
+procedure set_latin1_to_char(var a : TGtkAccelLabelClass; __latin1_to_char : guint);
+    begin
+       a.flag0:=a.flag0 or ((__latin1_to_char shl bp_TGtkAccelLabelClass_latin1_to_char) and bm_TGtkAccelLabelClass_latin1_to_char);
+    end;
+
+function  GTK_IS_ACCEL_LABEL(obj:pointer):boolean;
+begin
+  GTK_IS_ACCEL_LABEL:=(obj<>nil) and GTK_IS_ACCEL_LABEL_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_ACCEL_LABEL_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_ACCEL_LABEL_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_ACCEL_LABEL_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.6  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.5  1999/07/23 16:11:50  peter
+    * use packrecords C
+
+  Revision 1.4  1999/05/11 00:38:02  peter
+    * win32 fixes
+
+  Revision 1.3  1999/05/10 15:18:49  peter
+    * cdecl fixes
+
+  Revision 1.2  1999/05/10 09:02:53  peter
+    * gtk 1.2 port working
+
+  Revision 1.1  1999/05/07 10:40:23  peter
+    * first things for 1.2
+
+}
+

+ 104 - 0
packages/gtk/gtk/gtkadjustment.pp

@@ -0,0 +1,104 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+   type
+     PGtkAdjustment = ^TGtkAdjustment;
+     TGtkAdjustment = record
+          data : TGtkData;
+          lower : gfloat;
+          upper : gfloat;
+          value : gfloat;
+          step_increment : gfloat;
+          page_increment : gfloat;
+          page_size : gfloat;
+       end;
+
+     AdjustProc = procedure (adjustment:PGtkAdjustment);cdecl;
+
+     PGtkAdjustmentClass = ^TGtkAdjustmentClass;
+     TGtkAdjustmentClass = record
+          parent_class : TGtkDataClass;
+          changed : AdjustProc;
+          value_changed : AdjustProc;
+       end;
+
+type
+  GTK_ADJUSTMENT=PGtkAdjustment;
+  GTK_ADJUSTMENT_CLASS=PGtkAdjustmentClass;
+
+function  GTK_ADJUSTMENT_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_adjustment_get_type';
+function  GTK_IS_ADJUSTMENT(obj:pointer):boolean;
+function  GTK_IS_ADJUSTMENT_CLASS(klass:pointer):boolean;
+
+function  gtk_adjustment_get_type:TGtkType;cdecl;external gtkdll name 'gtk_adjustment_get_type';
+function  gtk_adjustment_new(value:gfloat; lower:gfloat; upper:gfloat; step_increment:gfloat; page_increment:gfloat;page_size:gfloat):PGtkObject;cdecl;external gtkdll name 'gtk_adjustment_new';
+procedure gtk_adjustment_changed(adjustment:PGtkAdjustment);cdecl;external gtkdll name 'gtk_adjustment_changed';
+procedure gtk_adjustment_value_changed(adjustment:PGtkAdjustment);cdecl;external gtkdll name 'gtk_adjustment_value_changed';
+procedure gtk_adjustment_clamp_page(adjustment:PGtkAdjustment; lower:gfloat; upper:gfloat);cdecl;external gtkdll name 'gtk_adjustment_clamp_page';
+procedure gtk_adjustment_set_value(adjustment:PGtkAdjustment; value:gfloat);cdecl;external gtkdll name 'gtk_adjustment_set_value';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_ADJUSTMENT(obj:pointer):boolean;
+begin
+  GTK_IS_ADJUSTMENT:=(obj<>nil) and GTK_IS_ADJUSTMENT_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_ADJUSTMENT_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_ADJUSTMENT_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_ADJUSTMENT_TYPE);
+end;
+
+{$endif read_implementation}
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.11  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.10  1999/07/23 16:11:51  peter
+    * use packrecords C
+
+  Revision 1.9  1999/05/11 00:38:03  peter
+    * win32 fixes
+
+  Revision 1.8  1999/05/10 15:18:50  peter
+    * cdecl fixes
+
+  Revision 1.7  1999/05/10 09:02:54  peter
+    * gtk 1.2 port working
+
+  Revision 1.6  1999/05/07 15:09:50  peter
+    * more fixes
+
+  Revision 1.5  1999/05/07 10:40:23  peter
+    * first things for 1.2
+
+  Revision 1.4  1998/10/21 22:25:15  peter
+    * fixed some wrong cdecls
+
+  Revision 1.3  1998/10/21 20:22:05  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 110 - 0
packages/gtk/gtk/gtkalignment.pp

@@ -0,0 +1,110 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkAlignment = ^TGtkAlignment;
+       TGtkAlignment = record
+            bin : TGtkBin;
+            xalign : gfloat;
+            yalign : gfloat;
+            xscale : gfloat;
+            yscale : gfloat;
+         end;
+
+       PGtkAlignmentClass = ^TGtkAlignmentClass;
+       TGtkAlignmentClass = record
+            parent_class : TGtkBinClass;
+         end;
+
+Type
+  GTK_ALIGNMENT=PGtkAlignment;
+  GTK_ALIGNMENT_CLASS=PGtkAlignmentClass;
+
+function  GTK_ALIGNMENT_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_alignment_get_type';
+function  GTK_IS_ALIGNMENT(obj:pointer):boolean;
+function  GTK_IS_ALIGNMENT_CLASS(klass:pointer):boolean;
+
+function  gtk_alignment_get_type:TGtkType;cdecl;external gtkdll name 'gtk_alignment_get_type';
+function  gtk_alignment_new (xalign:gfloat; yalign:gfloat; xscale:gfloat; yscale:gfloat):PGtkWidget;cdecl;external gtkdll name 'gtk_alignment_new';
+procedure gtk_alignment_set(alignment:PGtkAlignment; xalign:gfloat; yalign:gfloat; xscale:gfloat; yscale:gfloat);cdecl;external gtkdll name 'gtk_alignment_set';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_ALIGNMENT(obj:pointer):boolean;
+begin
+  GTK_IS_ALIGNMENT:=(obj<>nil) and GTK_IS_ALIGNMENT_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_ALIGNMENT_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_ALIGNMENT_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_ALIGNMENT_TYPE);
+end;
+
+{$endif read_implementation}
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.12  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.11  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.10  1999/07/23 16:11:52  peter
+    * use packrecords C
+
+  Revision 1.9  1999/05/11 00:38:04  peter
+    * win32 fixes
+
+  Revision 1.8  1999/05/10 15:18:51  peter
+    * cdecl fixes
+
+  Revision 1.7  1999/05/07 15:09:51  peter
+    * more fixes
+
+  Revision 1.6  1999/05/07 10:40:24  peter
+    * first things for 1.2
+
+  Revision 1.5  1998/11/09 10:09:31  peter
+    + C type casts are now correctly handled
+
+  Revision 1.4  1998/10/22 11:37:38  peter
+    * fixes for win32
+
+  Revision 1.3  1998/10/21 20:22:06  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 68 - 0
packages/gtk/gtk/gtkarg.pp

@@ -0,0 +1,68 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+{********************************
+  Types inserted in gtkobjects
+********************************}
+
+{$ifndef gtkwin}
+function  gtk_arg_new(arg_type:TGtkType):PGtkArg;cdecl;external gtkdll name 'gtk_arg_new';
+function  gtk_arg_copy(src_arg:PGtkArg; dest_arg:PGtkArg):PGtkArg;cdecl;external gtkdll name 'gtk_arg_copy';
+procedure gtk_arg_free(arg:PGtkArg; free_contents:gboolean);cdecl;external gtkdll name 'gtk_arg_free';
+procedure gtk_arg_reset(arg:PGtkArg);cdecl;external gtkdll name 'gtk_arg_reset';
+function  gtk_arg_values_equal(arg1:PGtkArg; arg2:PGtkArg):gboolean;cdecl;external gtkdll name 'gtk_arg_values_equal';
+function  gtk_args_collect(object_type:TGtkType; arg_info_hash_table:PGHashTable; arg_list_p:PPGSList; info_list_p:PPGSList; first_arg_name:Pgchar; var_args:array of const):Pgchar;cdecl;external gtkdll name 'gtk_args_collect';
+procedure gtk_args_collect_cleanup(arg_list:PGSList; info_list:PGSList);cdecl;external gtkdll name 'gtk_args_collect_cleanup';
+function  gtk_arg_get_info(object_type:TGtkType; arg_info_hash_table:PGHashTable; arg_name:Pgchar; info_p:PPGtkArgInfo):Pgchar;cdecl;external gtkdll name 'gtk_arg_get_info';
+function  gtk_arg_type_new_static(base_class_type:TGtkType; arg_name:Pgchar; class_n_args_offset:guint; arg_info_hash_table:PGHashTable; arg_type:TGtkType; arg_flags:guint; arg_id:guint):PGtkArgInfo;cdecl;external gtkdll name 'gtk_arg_type_new_static';
+function  gtk_args_query(class_type:TGtkType; arg_info_hash_table:PGHashTable; arg_flags:PPguint32; n_args_p:Pguint):PGtkArg;cdecl;external gtkdll name 'gtk_args_query';
+function  gtk_arg_name_strip_type(arg_name:Pgchar):Pgchar;cdecl;external gtkdll name 'gtk_arg_name_strip_type';
+function  gtk_arg_info_equal(arg_info_1:gconstpointer; arg_info_2:gconstpointer):gint;cdecl;external gtkdll name 'gtk_arg_info_equal';
+function  gtk_arg_info_hash(arg_info:gconstpointer):guint;cdecl;external gtkdll name 'gtk_arg_info_hash';
+procedure gtk_arg_to_valueloc(arg:PGtkArg; value_pointer:gpointer);cdecl;external gtkdll name 'gtk_arg_to_valueloc';
+{$endif}
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.6  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.5  1999/07/23 16:11:53  peter
+    * use packrecords C
+
+  Revision 1.4  1999/05/11 00:38:05  peter
+    * win32 fixes
+
+  Revision 1.3  1999/05/10 15:18:52  peter
+    * cdecl fixes
+
+  Revision 1.2  1999/05/10 09:02:55  peter
+    * gtk 1.2 port working
+
+  Revision 1.1  1999/05/07 10:40:25  peter
+    * first things for 1.2
+
+}
+

+ 106 - 0
packages/gtk/gtk/gtkarrow.pp

@@ -0,0 +1,106 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkArrow = ^TGtkArrow;
+       TGtkArrow = record
+            misc : TGtkMisc;
+            arrow_type : gint16;
+            shadow_type : gint16;
+         end;
+
+       PGtkArrowClass = ^TGtkArrowClass;
+       TGtkArrowClass = record
+            parent_class : TGtkMiscClass;
+         end;
+
+Type
+  GTK_ARROW = PGtkArrow;
+  GTK_ARROW_CLASS = PGtkArrowClass;
+
+function  GTK_ARROW_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_arrow_get_type';
+function  GTK_IS_ARROW(obj:pointer):boolean;
+function  GTK_IS_ARROW_CLASS(klass:pointer):boolean;
+
+function  gtk_arrow_get_type:TGtkType;cdecl;external gtkdll name 'gtk_arrow_get_type';
+function  gtk_arrow_new (arrow_type:TGtkArrowType; shadow_type:TGtkShadowType):PGtkWidget;cdecl;external gtkdll name 'gtk_arrow_new';
+procedure gtk_arrow_set(arrow:PGtkArrow; arrow_type:TGtkArrowType; shadow_type:TGtkShadowType);cdecl;external gtkdll name 'gtk_arrow_set';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_ARROW(obj:pointer):boolean;
+begin
+  GTK_IS_ARROW:=(obj<>nil) and GTK_IS_ARROW_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_ARROW_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_ARROW_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_ARROW_TYPE);
+end;
+
+{$endif read_implementation}
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.11  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.10  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.9  1999/07/23 16:11:54  peter
+    * use packrecords C
+
+  Revision 1.8  1999/05/11 00:38:06  peter
+    * win32 fixes
+
+  Revision 1.7  1999/05/10 15:18:54  peter
+    * cdecl fixes
+
+  Revision 1.6  1999/05/07 15:09:52  peter
+    * more fixes
+
+  Revision 1.5  1999/05/07 10:40:26  peter
+    * first things for 1.2
+
+  Revision 1.4  1998/11/09 10:09:32  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:07  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+
+

+ 109 - 0
packages/gtk/gtk/gtkaspectframe.pp

@@ -0,0 +1,109 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkAspectFrame = ^TGtkAspectFrame;
+       TGtkAspectFrame = record
+            frame : TGtkFrame;
+            xalign : gfloat;
+            yalign : gfloat;
+            ratio : gfloat;
+            obey_child : gint;
+            center_allocation : TGtkAllocation;
+         end;
+
+       PGtkAspectFrameClass = ^TGtkAspectFrameClass;
+       TGtkAspectFrameClass = record
+            parent_class : TGtkBinClass;
+         end;
+
+Type
+  GTK_ASPECT_FRAME=PGtkAspectFrame;
+  GTK_ASPECT_FRAME_CLASS=PGtkAspectFrameClass;
+
+function  GTK_ASPECT_FRAME_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_aspect_frame_get_type';
+function  GTK_IS_ASPECT_FRAME(obj:pointer):boolean;
+function  GTK_IS_ASPECT_FRAME_CLASS(klass:pointer):boolean;
+
+function  gtk_aspect_frame_get_type:TGtkType;cdecl;external gtkdll name 'gtk_aspect_frame_get_type';
+function  gtk_aspect_frame_new (thelabel:Pgchar; xalign:gfloat; yalign:gfloat; ratio:gfloat; obey_child:gint):PGtkWidget;cdecl;external gtkdll name 'gtk_aspect_frame_new';
+procedure gtk_aspect_frame_set(aspect_frame:PGtkAspectFrame; xalign:gfloat; yalign:gfloat; ratio:gfloat; obey_child:gint);cdecl;external gtkdll name 'gtk_aspect_frame_set';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_ASPECT_FRAME(obj:pointer):boolean;
+begin
+  GTK_IS_ASPECT_FRAME:=(obj<>nil) and GTK_IS_ASPECT_FRAME_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_ASPECT_FRAME_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_ASPECT_FRAME_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_ASPECT_FRAME_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.11  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.10  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.9  1999/07/23 16:11:55  peter
+    * use packrecords C
+
+  Revision 1.8  1999/05/11 00:38:08  peter
+    * win32 fixes
+
+  Revision 1.7  1999/05/10 15:18:55  peter
+    * cdecl fixes
+
+  Revision 1.6  1999/05/07 17:40:11  peter
+    * more updates
+
+  Revision 1.5  1999/05/07 10:40:27  peter
+    * first things for 1.2
+
+  Revision 1.4  1998/11/09 10:09:33  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:08  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 114 - 0
packages/gtk/gtk/gtkbbox.pp

@@ -0,0 +1,114 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    const
+       GTK_BUTTONBOX_DEFAULT = -1;
+
+    type
+       PGtkButtonBox = ^TGtkButtonBox;
+       TGtkButtonBox = record
+            box : TGtkBox;
+            spacing : gint;
+            child_min_width : gint;
+            child_min_height : gint;
+            child_ipad_x : gint;
+            child_ipad_y : gint;
+            layout_style : TGtkButtonBoxStyle;
+         end;
+
+       PGtkButtonBoxClass = ^TGtkButtonBoxClass;
+       TGtkButtonBoxClass = record
+            parent_class : TGtkBoxClass;
+         end;
+
+Type
+  GTK_BUTTON_BOX=PGtkButtonBox;
+  GTK_BUTTON_BOX_CLASS=PGtkButtonBoxClass;
+
+function  GTK_BUTTON_BOX_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_button_box_get_type';
+function  GTK_IS_BUTTON_BOX(obj:pointer):boolean;
+function  GTK_IS_BUTTON_BOX_CLASS(klass:pointer):boolean;
+
+function  gtk_button_box_get_type:TGtktype;cdecl;external gtkdll name 'gtk_button_box_get_type';
+procedure gtk_button_box_get_child_size_default(min_width:Pgint; min_height:Pgint);cdecl;external gtkdll name 'gtk_button_box_get_child_size_default';
+procedure gtk_button_box_get_child_ipadding_default(ipad_x:Pgint; ipad_y:Pgint);cdecl;external gtkdll name 'gtk_button_box_get_child_ipadding_default';
+procedure gtk_button_box_set_child_size_default(min_width:gint; min_height:gint);cdecl;external gtkdll name 'gtk_button_box_set_child_size_default';
+procedure gtk_button_box_set_child_ipadding_default(ipad_x:gint; ipad_y:gint);cdecl;external gtkdll name 'gtk_button_box_set_child_ipadding_default';
+function  gtk_button_box_get_spacing(widget:PGtkButtonBox):gint;cdecl;external gtkdll name 'gtk_button_box_get_spacing';
+function  gtk_button_box_get_layout(widget:PGtkButtonBox):TGtkButtonBoxStyle;cdecl;external gtkdll name 'gtk_button_box_get_layout';
+procedure gtk_button_box_get_child_size(widget:PGtkButtonBox; min_width:Pgint; min_height:Pgint);cdecl;external gtkdll name 'gtk_button_box_get_child_size';
+procedure gtk_button_box_get_child_ipadding(widget:PGtkButtonBox; ipad_x:Pgint; ipad_y:Pgint);cdecl;external gtkdll name 'gtk_button_box_get_child_ipadding';
+procedure gtk_button_box_set_spacing(widget:PGtkButtonBox; spacing:gint);cdecl;external gtkdll name 'gtk_button_box_set_spacing';
+procedure gtk_button_box_set_layout(widget:PGtkButtonBox; layout_style:TGtkButtonBoxStyle);cdecl;external gtkdll name 'gtk_button_box_set_layout';
+procedure gtk_button_box_set_child_size(widget:PGtkButtonBox; min_width:gint; min_height:gint);cdecl;external gtkdll name 'gtk_button_box_set_child_size';
+procedure gtk_button_box_set_child_ipadding(widget:PGtkButtonBox; ipad_x:gint; ipad_y:gint);cdecl;external gtkdll name 'gtk_button_box_set_child_ipadding';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_BUTTON_BOX(obj:pointer):boolean;
+begin
+  GTK_IS_BUTTON_BOX:=(obj<>nil) and GTK_IS_BUTTON_BOX_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_BUTTON_BOX_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_BUTTON_BOX_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_BUTTON_BOX_TYPE);
+end;
+
+{$endif read_implementation}
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.12  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.11  1999/07/23 16:11:57  peter
+    * use packrecords C
+
+  Revision 1.10  1999/05/11 00:38:09  peter
+    * win32 fixes
+
+  Revision 1.9  1999/05/10 15:18:56  peter
+    * cdecl fixes
+
+  Revision 1.8  1999/05/07 17:40:12  peter
+    * more updates
+
+  Revision 1.7  1999/05/07 15:09:53  peter
+    * more fixes
+
+  Revision 1.6  1999/05/07 10:40:28  peter
+    * first things for 1.2
+
+  Revision 1.5  1998/11/09 10:09:34  peter
+    + C type casts are now correctly handled
+
+  Revision 1.4  1998/10/22 11:37:39  peter
+    * fixes for win32
+
+  Revision 1.3  1998/10/21 20:22:09  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+
+

+ 92 - 0
packages/gtk/gtk/gtkbin.pp

@@ -0,0 +1,92 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkBin = ^TGtkBin;
+       TGtkBin = record
+            container : TGtkContainer;
+            child : PGtkWidget;
+         end;
+
+       PGtkBinClass = ^TGtkBinClass;
+       TGtkBinClass = record
+            parent_class : TGtkContainerClass;
+         end;
+
+Type
+  GTK_BIN=PGtkBin;
+  GTK_BIN_CLASS=PGtkBinClass;
+
+function  GTK_BIN_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_bin_get_type';
+function  GTK_IS_BIN(obj:pointer):boolean;
+function  GTK_IS_BIN_CLASS(klass:pointer):boolean;
+
+function  gtk_bin_get_type:TGtkType;cdecl;external gtkdll name 'gtk_bin_get_type';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_BIN(obj:pointer):boolean;
+begin
+  GTK_IS_BIN:=(obj<>nil) and GTK_IS_BIN_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_BIN_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_BIN_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_BIN_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.11  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.10  1999/07/23 16:11:58  peter
+    * use packrecords C
+
+  Revision 1.9  1999/05/11 00:38:10  peter
+    * win32 fixes
+
+  Revision 1.8  1999/05/10 15:18:57  peter
+    * cdecl fixes
+
+  Revision 1.7  1999/05/07 15:09:54  peter
+    * more fixes
+
+  Revision 1.6  1999/05/07 10:40:29  peter
+    * first things for 1.2
+
+  Revision 1.5  1998/11/09 10:09:35  peter
+    + C type casts are now correctly handled
+
+  Revision 1.4  1998/10/22 11:37:40  peter
+    * fixes for win32
+
+  Revision 1.3  1998/10/21 20:22:10  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+
+

+ 170 - 0
packages/gtk/gtk/gtkbindings.pp

@@ -0,0 +1,170 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkPatternSpec = ^TGtkPatternSpec;
+     TGtkPatternSpec = record
+          match_type : TGtkMatchType;
+          pattern_length : guint;
+          pattern : Pgchar;
+          pattern_reversed : Pgchar;
+          user_data : gpointer;
+          seq_id : guint;
+       end;
+
+procedure gtk_pattern_spec_init(pspec:PGtkPatternSpec; pattern:Pgchar);cdecl;external gtkdll name 'gtk_pattern_spec_init';
+procedure gtk_pattern_spec_free_segs(pspec:PGtkPatternSpec);cdecl;external gtkdll name 'gtk_pattern_spec_free_segs';
+function  gtk_pattern_match(pspec:PGtkPatternSpec; string_length:guint; thestring:Pgchar; string_reversed:Pgchar):gboolean;cdecl;external gtkdll name 'gtk_pattern_match';
+function  gtk_pattern_match_string(pspec:PGtkPatternSpec; thestring:Pgchar):gboolean;cdecl;external gtkdll name 'gtk_pattern_match_string';
+function  gtk_pattern_match_simple(pattern:Pgchar; thestring:Pgchar):gboolean;cdecl;external gtkdll name 'gtk_pattern_match_simple';
+
+  type
+     PGtkBindingSet = ^TGtkBindingSet;
+     PGtkBindingEntry = ^TGtkBindingEntry;
+     PGtkBindingSignal = ^TGtkBindingSignal;
+     PGtkBindingArg = ^TGtkBindingArg;
+
+     TGtkBindingSet = record
+          set_name : Pgchar;
+          priority : gint;
+          widget_path_pspecs : PGSList;
+          widget_class_pspecs : PGSList;
+          class_branch_pspecs : PGSList;
+          entries : PGtkBindingEntry;
+          current : PGtkBindingEntry;
+       end;
+
+     TGtkBindingEntry = record
+          keyval : guint;
+          modifiers : guint;
+          binding_set : PGtkBindingSet;
+          flag0 : word;
+          set_next : PGtkBindingEntry;
+          hash_next : PGtkBindingEntry;
+          signals : PGtkBindingSignal;
+       end;
+
+     TGtkBindingSignal = record
+          next : PGtkBindingSignal;
+          signal_name : Pgchar;
+          n_args : guint;
+          args : PGtkBindingArg;
+       end;
+
+     TGtkBindingArg = record
+          arg_type : TGtkType;
+          d : record
+              case longint of
+                 0 : ( long_data : glong );
+                 1 : ( double_data : gdouble );
+                 2 : ( string_data : Pgchar );
+              end;
+       end;
+
+  const
+     bm_TGtkBindingEntry_destroyed = $1;
+     bp_TGtkBindingEntry_destroyed = 0;
+     bm_TGtkBindingEntry_in_emission = $2;
+     bp_TGtkBindingEntry_in_emission = 1;
+function  destroyed(var a : TGtkBindingEntry) : guint;
+procedure set_destroyed(var a : TGtkBindingEntry; __destroyed : guint);
+function  in_emission(var a : TGtkBindingEntry) : guint;
+procedure set_in_emission(var a : TGtkBindingEntry; __in_emission : guint);
+
+
+function  gtk_binding_set_new(set_name:Pgchar):PGtkBindingSet;cdecl;external gtkdll name 'gtk_binding_set_new';
+function  gtk_binding_set_by_class(object_class:gpointer):PGtkBindingSet;cdecl;external gtkdll name 'gtk_binding_set_by_class';
+function  gtk_binding_set_find(set_name:Pgchar):PGtkBindingSet;cdecl;external gtkdll name 'gtk_binding_set_find';
+function  gtk_bindings_activate(theobject:PGtkObject; keyval:guint; modifiers:guint):gboolean;cdecl;external gtkdll name 'gtk_bindings_activate';
+function  gtk_binding_set_activate(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint; theobject:PGtkObject):gboolean;cdecl;external gtkdll name 'gtk_binding_set_activate';
+procedure gtk_binding_entry_add(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint);cdecl;external gtkdll name 'gtk_binding_entry_clear';
+procedure gtk_binding_entry_clear(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint);cdecl;external gtkdll name 'gtk_binding_entry_clear';
+procedure gtk_binding_entry_add_signal(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint; signal_name:Pgchar; n_args:guint; args:array of const);cdecl;external gtkdll name 'gtk_binding_entry_add_signal';
+procedure gtk_binding_set_add_path(binding_set:PGtkBindingSet; path_type:TGtkPathType; path_pattern:Pgchar; priority:TGtkPathPriorityType);cdecl;external gtkdll name 'gtk_binding_set_add_path';
+{$ifndef gtkwin}
+procedure gtk_binding_entry_remove(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint);cdecl;external gtkdll name 'gtk_binding_entry_remove';
+procedure gtk_binding_entry_add_signall(binding_set:PGtkBindingSet; keyval:guint; modifiers:guint; signal_name:Pgchar; binding_args:PGSList);cdecl;external gtkdll name 'gtk_binding_entry_add_signall';
+function  gtk_binding_parse_binding(scanner:PGScanner):guint;cdecl;external gtkdll name 'gtk_binding_parse_binding';
+{$endif}
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+
+function  destroyed(var a : TGtkBindingEntry) : guint;
+    begin
+       destroyed:=(a.flag0 and bm_TGtkBindingEntry_destroyed) shr bp_TGtkBindingEntry_destroyed;
+    end;
+
+procedure set_destroyed(var a : TGtkBindingEntry; __destroyed : guint);
+    begin
+       a.flag0:=a.flag0 or ((__destroyed shl bp_TGtkBindingEntry_destroyed) and bm_TGtkBindingEntry_destroyed);
+    end;
+
+function  in_emission(var a : TGtkBindingEntry) : guint;
+    begin
+       in_emission:=(a.flag0 and bm_TGtkBindingEntry_in_emission) shr bp_TGtkBindingEntry_in_emission;
+    end;
+
+procedure set_in_emission(var a : TGtkBindingEntry; __in_emission : guint);
+    begin
+       a.flag0:=a.flag0 or ((__in_emission shl bp_TGtkBindingEntry_in_emission) and bm_TGtkBindingEntry_in_emission);
+    end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.7  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.6  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.5  1999/07/23 16:11:59  peter
+    * use packrecords C
+
+  Revision 1.4  1999/05/11 00:38:11  peter
+    * win32 fixes
+
+  Revision 1.3  1999/05/10 15:18:58  peter
+    * cdecl fixes
+
+  Revision 1.2  1999/05/10 09:02:56  peter
+    * gtk 1.2 port working
+
+  Revision 1.1  1999/05/07 10:40:30  peter
+    * first things for 1.2
+
+}
+

+ 171 - 0
packages/gtk/gtk/gtkbox.pp

@@ -0,0 +1,171 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkBox = ^TGtkBox;
+       TGtkBox = record
+            container : TGtkContainer;
+            children : PGList;
+            spacing : gint16;
+            flag0 : word;
+         end;
+
+    const
+       bm_box_homogeneous = 1;
+       bp_box_homogeneous = 0;
+function  homogeneous(var a : TGtkBox) : guint;
+procedure set_homogeneous(var a : TGtkBox; __homogeneous : guint);
+
+    type
+       PGtkBoxClass = ^TGtkBoxClass;
+       TGtkBoxClass = record
+            parent_class : TGtkContainerClass;
+         end;
+
+       PGtkBoxChild = ^TGtkBoxChild;
+       TGtkBoxChild = record
+            widget : PGtkWidget;
+            padding : guint16;
+            flag0 : word;
+         end;
+
+    const
+       bm_box_expand = 1;
+       bp_box_expand = 0;
+       bm_box_fill = 2;
+       bp_box_fill = 1;
+       bm_box_pack = 4;
+       bp_box_pack = 2;
+
+function  expand(var a : TGtkBoxChild) : guint;
+procedure set_expand(var a : TGtkBoxChild; __expand : guint);
+function  fill(var a : TGtkBoxChild) : guint;
+procedure set_fill(var a : TGtkBoxChild; __fill : guint);
+function  pack(var a : TGtkBoxChild) : guint;
+procedure set_pack(var a : TGtkBoxChild; __pack : guint);
+
+Type
+  GTK_BOX=PGtkBox;
+  GTK_BOX_CLASS=PGtkBoxClass;
+
+function  GTK_BOX_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_box_get_type';
+function  GTK_IS_BOX(obj:pointer):boolean;
+function  GTK_IS_BOX_CLASS(klass:pointer):boolean;
+
+function  gtk_box_get_type:TGtkType;cdecl;external gtkdll name 'gtk_box_get_type';
+procedure gtk_box_pack_start(box:PGtkBox; child:PGtkWidget; expand:gboolean; fill:gboolean; padding:guint);cdecl;external gtkdll name 'gtk_box_pack_start';
+procedure gtk_box_pack_end(box:PGtkBox; child:PGtkWidget; expand:gboolean; fill:gboolean; padding:guint);cdecl;external gtkdll name 'gtk_box_pack_end';
+procedure gtk_box_pack_start_defaults(box:PGtkBox; widget:PGtkWidget);cdecl;external gtkdll name 'gtk_box_pack_start_defaults';
+procedure gtk_box_pack_end_defaults(box:PGtkBox; widget:PGtkWidget);cdecl;external gtkdll name 'gtk_box_pack_end_defaults';
+procedure gtk_box_set_homogeneous(box:PGtkBox; homogeneous:gboolean);cdecl;external gtkdll name 'gtk_box_set_homogeneous';
+procedure gtk_box_set_spacing(box:PGtkBox; spacing:gint);cdecl;external gtkdll name 'gtk_box_set_spacing';
+procedure gtk_box_reorder_child(box:PGtkBox; child:PGtkWidget; position:gint);cdecl;external gtkdll name 'gtk_box_reorder_child';
+procedure gtk_box_query_child_packing(box:PGtkBox; child:PGtkWidget; expand:Pgboolean; fill:Pgboolean; padding:Pguint;pack_type:PGtkPackType);cdecl;external gtkdll name 'gtk_box_query_child_packing';
+procedure gtk_box_set_child_packing(box:PGtkBox; child:PGtkWidget; expand:gboolean; fill:gboolean; padding:guint; pack_type:TGtkPackType);cdecl;external gtkdll name 'gtk_box_set_child_packing';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  homogeneous(var a : TGtkBox) : guint;
+      begin
+         homogeneous:=(a.flag0 and bm_box_homogeneous) shr bp_box_homogeneous;
+      end;
+
+procedure set_homogeneous(var a : TGtkBox; __homogeneous : guint);
+      begin
+         a.flag0:=a.flag0 or ((__homogeneous shl bp_box_homogeneous) and bm_box_homogeneous);
+      end;
+
+function  expand(var a : TGtkBoxChild) : guint;
+      begin
+         expand:=(a.flag0 and bm_box_expand) shr bp_box_expand;
+      end;
+
+procedure set_expand(var a : TGtkBoxChild; __expand : guint);
+      begin
+         a.flag0:=a.flag0 or ((__expand shl bp_box_expand) and bm_box_expand);
+      end;
+
+function  fill(var a : TGtkBoxChild) : guint;
+      begin
+         fill:=(a.flag0 and bm_box_fill) shr bp_box_fill;
+      end;
+
+procedure set_fill(var a : TGtkBoxChild; __fill : guint);
+      begin
+         a.flag0:=a.flag0 or ((__fill shl bp_box_fill) and bm_box_fill);
+      end;
+
+function  pack(var a : TGtkBoxChild) : guint;
+      begin
+         pack:=(a.flag0 and bm_box_pack) shr bp_box_pack;
+      end;
+
+procedure set_pack(var a : TGtkBoxChild; __pack : guint);
+      begin
+         a.flag0:=a.flag0 or ((__pack shl bp_box_pack) and bm_box_pack);
+      end;
+
+function  GTK_IS_BOX(obj:pointer):boolean;
+begin
+  GTK_IS_BOX:=(obj<>nil) and GTK_IS_BOX_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_BOX_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_BOX_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_BOX_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.11  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.10  1999/07/23 16:12:00  peter
+    * use packrecords C
+
+  Revision 1.9  1999/05/11 00:38:12  peter
+    * win32 fixes
+
+  Revision 1.8  1999/05/10 15:18:59  peter
+    * cdecl fixes
+
+  Revision 1.7  1999/05/10 09:02:57  peter
+    * gtk 1.2 port working
+
+  Revision 1.6  1999/05/07 10:40:30  peter
+    * first things for 1.2
+
+  Revision 1.5  1998/11/09 10:09:36  peter
+    + C type casts are now correctly handled
+
+  Revision 1.4  1998/10/21 22:25:16  peter
+    * fixed some wrong cdecls
+
+  Revision 1.3  1998/10/21 20:22:11  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 169 - 0
packages/gtk/gtk/gtkbutton.pp

@@ -0,0 +1,169 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkButton = ^TGtkButton;
+       TGtkButton = record
+            bin : TGtkBin;
+            child : PGtkWidget;
+            flag0 : word;
+         end;
+
+    const
+       bm_in_button = 1;
+       bp_in_button = 0;
+       bm_button_down = 2;
+       bp_button_down = 1;
+       bm_relief = 4;
+       bp_relief = 2;
+function  in_button(var a : TGtkButton) : guint;
+procedure set_in_button(var a : TGtkButton; __in_button : guint);
+function  button_down(var a : TGtkButton) : guint;
+procedure set_button_down(var a : TGtkButton; __button_down : guint);
+function  relief(var a : TGtkButton) : guint;
+procedure set_relief(var a : TGtkButton; __button_down : guint);
+
+    type
+       PGtkButtonClass = ^TGtkButtonClass;
+       TGtkButtonClass = record
+            parent_class : TGtkBinClass;
+            pressed : procedure (button:PGtkButton); cdecl;
+            released : procedure (button:PGtkButton); cdecl;
+            clicked : procedure (button:PGtkButton); cdecl;
+            enter : procedure (button:PGtkButton); cdecl;
+            leave : procedure (button:PGtkButton); cdecl;
+         end;
+
+Type
+  GTK_BUTTON=PGtkButton;
+  GTK_BUTTON_CLASS=PGtkButtonClass;
+
+function  GTK_BUTTON_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_button_get_type';
+function  GTK_IS_BUTTON(obj:pointer):boolean;
+function  GTK_IS_BUTTON_CLASS(klass:pointer):boolean;
+
+function  gtk_button_get_type:TGtkType;cdecl;external gtkdll name 'gtk_button_get_type';
+function  gtk_button_new : PGtkWidget;cdecl;external gtkdll name 'gtk_button_new';
+function  gtk_button_new_with_label (thelabel:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_button_new_with_label';
+procedure gtk_button_pressed(button:PGtkButton);cdecl;external gtkdll name 'gtk_button_pressed';
+procedure gtk_button_released(button:PGtkButton);cdecl;external gtkdll name 'gtk_button_released';
+procedure gtk_button_clicked(button:PGtkButton);cdecl;external gtkdll name 'gtk_button_clicked';
+procedure gtk_button_enter(button:PGtkButton);cdecl;external gtkdll name 'gtk_button_enter';
+procedure gtk_button_leave(button:PGtkButton);cdecl;external gtkdll name 'gtk_button_leave';
+procedure gtk_button_set_relief(button:PGtkButton; newstyle:TGtkReliefStyle);cdecl;external gtkdll name 'gtk_button_set_relief';
+function  gtk_button_get_relief(button:PGtkButton):TGtkReliefStyle;cdecl;external gtkdll name 'gtk_button_get_relief';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  in_button(var a : TGtkButton) : guint;
+      begin
+         in_button:=(a.flag0 and bm_in_button) shr bp_in_button;
+      end;
+
+procedure set_in_button(var a : TGtkButton; __in_button : guint);
+      begin
+         a.flag0:=a.flag0 or ((__in_button shl bp_in_button) and bm_in_button);
+      end;
+
+function  button_down(var a : TGtkButton) : guint;
+      begin
+         button_down:=(a.flag0 and bm_button_down) shr bp_button_down;
+      end;
+
+procedure set_button_down(var a : TGtkButton; __button_down : guint);
+      begin
+         a.flag0:=a.flag0 or ((__button_down shl bp_button_down) and bm_button_down);
+      end;
+
+function  relief(var a : TGtkButton) : guint;
+      begin
+         relief:=(a.flag0 and bm_relief) shr bp_relief;
+      end;
+
+procedure set_relief(var a : TGtkButton; __button_down : guint);
+      begin
+         a.flag0:=a.flag0 or ((__button_down shl bp_relief) and bm_relief);
+      end;
+
+function  GTK_IS_BUTTON(obj:pointer):boolean;
+begin
+  GTK_IS_BUTTON:=(obj<>nil) and GTK_IS_BUTTON_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_BUTTON_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_BUTTON_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_BUTTON_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.13  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.12  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.11  1999/07/23 16:12:01  peter
+    * use packrecords C
+
+  Revision 1.10  1999/05/11 00:38:13  peter
+    * win32 fixes
+
+  Revision 1.9  1999/05/10 15:19:00  peter
+    * cdecl fixes
+
+  Revision 1.8  1999/05/10 09:02:59  peter
+    * gtk 1.2 port working
+
+  Revision 1.7  1999/05/07 17:40:13  peter
+    * more updates
+
+  Revision 1.6  1999/05/07 10:40:31  peter
+    * first things for 1.2
+
+  Revision 1.5  1998/11/09 10:09:37  peter
+    + C type casts are now correctly handled
+
+  Revision 1.4  1998/10/21 22:25:17  peter
+    * fixed some wrong cdecls
+
+  Revision 1.3  1998/10/21 20:22:12  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 123 - 0
packages/gtk/gtk/gtkcalendar.pp

@@ -0,0 +1,123 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     TGtkCalendarDisplayOptions = (
+       GTK_CALENDAR_SHOW_HEADING := 1 shl 0,
+       GTK_CALENDAR_SHOW_DAY_NAMES := 1 shl 1,
+       GTK_CALENDAR_NO_MONTH_CHANGE := 1 shl 2,
+       GTK_CALENDAR_SHOW_WEEK_NUMBERS := 1 shl 3,
+       GTK_CALENDAR_WEEK_START_MONDAY := 1 shl 4
+       );
+
+     PGtkCalendar = ^TGtkCalendar;
+     TGtkCalendar = record
+          widget : TGtkWidget;
+          header_style : PGtkStyle;
+          label_style : PGtkStyle;
+          month : gint;
+          year : gint;
+          selected_day : gint;
+          day_month : array[0..5] of array[0..6] of gint;
+          day : array[0..5] of array[0..6] of gint;
+          num_marked_dates : gint;
+          marked_date : array[0..30] of gint;
+          display_flags : TGtkCalendarDisplayOptions;
+          marked_date_color : array[0..30] of TGdkColor;
+          gc : PGdkGC;
+          xor_gc : PGdkGC;
+          focus_row : gint;
+          focus_col : gint;
+          highlight_row : gint;
+          highlight_col : gint;
+          private_data : gpointer;
+          grow_space : array[0..31] of gchar;
+       end;
+
+     PGtkCalendarClass = ^TGtkCalendarClass;
+     TGtkCalendarClass = record
+          parent_class : TGtkWidgetClass;
+          month_changed : procedure (calendar:PGtkCalendar);cdecl;
+          day_selected : procedure (calendar:PGtkCalendar);cdecl;
+          day_selected_double_click : procedure (calendar:PGtkCalendar);cdecl;
+          prev_month : procedure (calendar:PGtkCalendar);cdecl;
+          next_month : procedure (calendar:PGtkCalendar);cdecl;
+          prev_year : procedure (calendar:PGtkCalendar);cdecl;
+          next_year : procedure (calendar:PGtkCalendar);cdecl;
+       end;
+
+type
+  GTK_CALENDAR=PGtkCalendar;
+  GTK_CALENDAR_CLASS=PGtkCalendarClass;
+
+function  GTK_CALENDAR_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_calendar_get_type';
+function  GTK_IS_CALENDAR(obj:pointer):boolean;
+function  GTK_IS_CALENDAR_CLASS(klass:pointer):boolean;
+
+function  gtk_calendar_get_type:TGtkType;cdecl;external gtkdll name 'gtk_calendar_get_type';
+function  gtk_calendar_new:PGtkWidget;cdecl;external gtkdll name 'gtk_calendar_new';
+function  gtk_calendar_select_month(calendar:PGtkCalendar; month:guint; year:guint):gint;cdecl;external gtkdll name 'gtk_calendar_select_month';
+procedure gtk_calendar_select_day(calendar:PGtkCalendar; day:guint);cdecl;external gtkdll name 'gtk_calendar_select_day';
+function  gtk_calendar_mark_day(calendar:PGtkCalendar; day:guint):gint;cdecl;external gtkdll name 'gtk_calendar_mark_day';
+function  gtk_calendar_unmark_day(calendar:PGtkCalendar; day:guint):gint;cdecl;external gtkdll name 'gtk_calendar_unmark_day';
+procedure gtk_calendar_clear_marks(calendar:PGtkCalendar);cdecl;external gtkdll name 'gtk_calendar_clear_marks';
+procedure gtk_calendar_display_options(calendar:PGtkCalendar; flags:TGtkCalendarDisplayOptions);cdecl;external gtkdll name 'gtk_calendar_display_options';
+procedure gtk_calendar_get_date(calendar:PGtkCalendar; year:Pguint; month:Pguint; day:Pguint);cdecl;external gtkdll name 'gtk_calendar_get_date';
+procedure gtk_calendar_freeze(calendar:PGtkCalendar);cdecl;external gtkdll name 'gtk_calendar_freeze';
+procedure gtk_calendar_thaw(calendar:PGtkCalendar);cdecl;external gtkdll name 'gtk_calendar_thaw';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_CALENDAR(obj:pointer):boolean;
+begin
+  GTK_IS_CALENDAR:=(obj<>nil) and GTK_IS_CALENDAR_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_CALENDAR_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_CALENDAR_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_CALENDAR_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.6  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.5  1999/07/23 16:12:02  peter
+    * use packrecords C
+
+  Revision 1.4  1999/05/11 00:38:14  peter
+    * win32 fixes
+
+  Revision 1.3  1999/05/10 15:19:01  peter
+    * cdecl fixes
+
+  Revision 1.2  1999/05/10 09:03:00  peter
+    * gtk 1.2 port working
+
+  Revision 1.1  1999/05/07 10:40:32  peter
+    * first things for 1.2
+
+}
+

+ 107 - 0
packages/gtk/gtk/gtkcheckbutton.pp

@@ -0,0 +1,107 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkCheckButton = ^TGtkCheckButton;
+       TGtkCheckButton = record
+            toggle_button : TGtkToggleButton;
+         end;
+
+       PGtkCheckButtonClass = ^TGtkCheckButtonClass;
+       TGtkCheckButtonClass = record
+            parent_class : TGtkToggleButtonClass;
+            indicator_size : guint16;
+            indicator_spacing : guint16;
+            draw_indicator : procedure (check_button:PGtkCheckButton; area:PGdkRectangle); cdecl;
+         end;
+
+Type
+  GTK_CHECK_BUTTON=PGtkCheckButton;
+  GTK_CHECK_BUTTON_CLASS=PGtkCheckButtonClass;
+
+function  GTK_CHECK_BUTTON_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_check_button_get_type';
+function  GTK_IS_CHECK_BUTTON(obj:pointer):boolean;
+function  GTK_IS_CHECK_BUTTON_CLASS(klass:pointer):boolean;
+
+function  gtk_check_button_get_type:TGtkType;cdecl;external gtkdll name 'gtk_check_button_get_type';
+function  gtk_check_button_new : PGtkWidget;cdecl;external gtkdll name 'gtk_check_button_new';
+function  gtk_check_button_new_with_label (thelabel:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_check_button_new_with_label';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_CHECK_BUTTON(obj:pointer):boolean;
+begin
+  GTK_IS_CHECK_BUTTON:=(obj<>nil) and GTK_IS_CHECK_BUTTON_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_CHECK_BUTTON_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_CHECK_BUTTON_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_CHECK_BUTTON_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.11  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.10  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.9  1999/07/23 16:12:03  peter
+    * use packrecords C
+
+  Revision 1.8  1999/05/11 00:38:15  peter
+    * win32 fixes
+
+  Revision 1.7  1999/05/10 15:19:02  peter
+    * cdecl fixes
+
+  Revision 1.6  1999/05/07 15:09:55  peter
+    * more fixes
+
+  Revision 1.5  1999/05/07 10:40:32  peter
+    * first things for 1.2
+
+  Revision 1.4  1998/11/09 10:09:38  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:13  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 130 - 0
packages/gtk/gtk/gtkcheckmenuitem.pp

@@ -0,0 +1,130 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkCheckMenuItem = ^TGtkCheckMenuItem;
+       TGtkCheckMenuItem = record
+            menu_item : TGtkMenuItem;
+            flag0 : longint;
+         end;
+
+    const
+       bm_checkmenuitem_active = 1;
+       bp_checkmenuitem_active = 0;
+       bm_checkmenuitem_always_show_toggle = 2;
+       bp_checkmenuitem_always_show_toggle = 1;
+function  active(var a : TGtkCheckMenuItem) : guint;
+procedure set_active(var a : TGtkCheckMenuItem; __active : guint);
+function  always_show_toggle(var a : TGtkCheckMenuItem) : guint;
+procedure set_always_show_toggle(var a : TGtkCheckMenuItem; __always_show_toggle : guint);
+
+    type
+       PGtkCheckMenuItemClass = ^TGtkCheckMenuItemClass;
+       TGtkCheckMenuItemClass = record
+            parent_class : TGtkMenuItemClass;
+            toggled : procedure (check_menu_item:PGtkCheckMenuItem); cdecl;
+            draw_indicator : procedure (check_menu_item:PGtkCheckMenuItem; area:PGdkRectangle); cdecl;
+         end;
+
+Type
+  GTK_CHECK_MENU_ITEM=PGtkCheckMenuItem;
+  GTK_CHECK_MENU_ITEM_CLASS=PGtkCheckMenuItemClass;
+
+function  GTK_CHECK_MENU_ITEM_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_check_menu_item_get_type';
+function  GTK_IS_CHECK_MENU_ITEM(obj:pointer):boolean;
+function  GTK_IS_CHECK_MENU_ITEM_CLASS(klass:pointer):boolean;
+
+function  gtk_check_menu_item_get_type:TGtkType;cdecl;external gtkdll name 'gtk_check_menu_item_get_type';
+procedure gtk_check_menu_item_set_active(check_menu_item:PGtkCheckMenuItem; is_active:gboolean);cdecl;external gtkdll name 'gtk_check_menu_item_set_active';
+procedure gtk_check_menu_item_set_show_toggle(menu_item:PGtkCheckMenuItem; always:gboolean);cdecl;external gtkdll name 'gtk_check_menu_item_set_show_toggle';
+procedure gtk_check_menu_item_toggled(check_menu_item:PGtkCheckMenuItem);cdecl;external gtkdll name 'gtk_check_menu_item_toggled';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  active(var a : TGtkCheckMenuItem) : guint;
+      begin
+         active:=(a.flag0 and bm_checkmenuitem_active) shr bp_checkmenuitem_active;
+      end;
+
+procedure set_active(var a : TGtkCheckMenuItem; __active : guint);
+      begin
+         a.flag0:=a.flag0 or ((__active shl bp_checkmenuitem_active) and bm_checkmenuitem_active);
+      end;
+
+function  always_show_toggle(var a : TGtkCheckMenuItem) : guint;
+      begin
+         always_show_toggle:=(a.flag0 and bm_checkmenuitem_always_show_toggle) shr bp_checkmenuitem_always_show_toggle;
+      end;
+
+procedure set_always_show_toggle(var a : TGtkCheckMenuItem; __always_show_toggle : guint);
+      begin
+         a.flag0:=a.flag0 or ((__always_show_toggle shl bp_checkmenuitem_always_show_toggle) and bm_checkmenuitem_always_show_toggle);
+      end;
+
+function  GTK_IS_CHECK_MENU_ITEM(obj:pointer):boolean;
+begin
+  GTK_IS_CHECK_MENU_ITEM:=(obj<>nil) and GTK_IS_CHECK_MENU_ITEM_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_CHECK_MENU_ITEM_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_CHECK_MENU_ITEM_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_CHECK_MENU_ITEM_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.12  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.11  1999/10/05 09:28:27  peter
+    * patches from Frank Loemker
+
+  Revision 1.10  1999/07/23 16:12:04  peter
+    * use packrecords C
+
+  Revision 1.9  1999/05/11 00:38:16  peter
+    * win32 fixes
+
+  Revision 1.8  1999/05/10 15:19:03  peter
+    * cdecl fixes
+
+  Revision 1.7  1999/05/10 09:03:01  peter
+    * gtk 1.2 port working
+
+  Revision 1.6  1999/05/07 15:09:56  peter
+    * more fixes
+
+  Revision 1.5  1999/05/07 10:40:33  peter
+    * first things for 1.2
+
+  Revision 1.4  1998/11/09 10:09:39  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:14  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 494 - 0
packages/gtk/gtk/gtkclist.pp

@@ -0,0 +1,494 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+
+    type
+       TGtkCellType = (GTK_CELL_EMPTY,GTK_CELL_TEXT,GTK_CELL_PIXMAP,
+         GTK_CELL_PIXTEXT,GTK_CELL_WIDGET);
+
+       TGtkCListDragPos = (GTK_CLIST_DRAG_NONE,GTK_CLIST_DRAG_BEFORE,
+         GTK_CLIST_DRAG_INTO,GTK_CLIST_DRAG_AFTER
+         );
+
+       TGtkButtonAction = (GTK_BUTTON_IGNORED := 0,GTK_BUTTON_SELECTS := 1 shl 0,
+         GTK_BUTTON_DRAGS := 1 shl 1,GTK_BUTTON_EXPANDS := 1 shl 2
+         );
+
+       PGtkCList = ^TGtkCList;
+       PGtkCListClass = ^TGtkCListClass;
+       PGtkCListColumn = ^TGtkCListColumn;
+       PGtkCListRow = ^TGtkCListRow;
+       PGtkCellText = ^TGtkCellText;
+       PGtkCellPixmap = ^TGtkCellPixmap;
+       PGtkCellPixText = ^TGtkCellPixText;
+       PGtkCellWidget = ^TGtkCellWidget;
+       PGtkCell = ^TGtkCell;
+
+       TGtkCListCompareFunc = function (clist:PGtkCList; ptr1:gconstpointer; ptr2:gconstpointer):gint;cdecl;
+
+       PGtkCListCellInfo = ^TGtkCListCellInfo;
+       TGtkCListCellInfo = record
+            row : gint;
+            column : gint;
+         end;
+
+       PGtkCListDestInfo = ^TGtkCListDestInfo;
+       TGtkCListDestInfo = record
+            cell : TGtkCListCellInfo;
+            insert_pos : TGtkCListDragPos;
+         end;
+
+       TGtkCList = record
+            container : TGtkContainer;
+            flags : guint16;
+            row_mem_chunk : PGMemChunk;
+            cell_mem_chunk : PGMemChunk;
+            freeze_count : guint;
+            internal_allocation : TGdkRectangle;
+            rows : gint;
+            row_center_offset : gint;
+            row_height : gint;
+            row_list : PGList;
+            row_list_end : PGList;
+            columns : gint;
+            column_title_area : TGdkRectangle;
+            title_window : PGdkWindow;
+            column : PGtkCListColumn;
+            clist_window : PGdkWindow;
+            clist_window_width : gint;
+            clist_window_height : gint;
+            hoffset : gint;
+            voffset : gint;
+            shadow_type : TGtkShadowType;
+            selection_mode : TGtkSelectionMode;
+            selection : PGList;
+            selection_end : PGList;
+            undo_selection : PGList;
+            undo_unselection : PGList;
+            undo_anchor : gint;
+            button_actions : array[0..4] of guint8;
+            drag_button : guint8;
+            click_cell : TGtkCListCellInfo;
+            hadjustment : PGtkAdjustment;
+            vadjustment : PGtkAdjustment;
+            xor_gc : PGdkGC;
+            fg_gc : PGdkGC;
+            bg_gc : PGdkGC;
+            cursor_drag : PGdkCursor;
+            x_drag : gint;
+            focus_row : gint;
+            anchor : gint;
+            anchor_state : TGtkStateType;
+            drag_pos : gint;
+            htimer : gint;
+            vtimer : gint;
+            sort_type : TGtkSortType;
+            compare : TGtkCListCompareFunc;
+            sort_column : gint;
+         end;
+
+       TGtkCListClass = record
+            parent_class : TGtkContainerClass;
+            set_scroll_adjustments : procedure (clist:PGtkCList; hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment);cdecl;
+            refresh : procedure (clist:PGtkCList);cdecl;
+            select_row : procedure (clist:PGtkCList; row:gint; column:gint; event:PGdkEvent);cdecl;
+            unselect_row : procedure (clist:PGtkCList; row:gint; column:gint; event:PGdkEvent);cdecl;
+            row_move : procedure (clist:PGtkCList; source_row:gint; dest_row:gint);cdecl;
+            click_column : procedure (clist:PGtkCList; column:gint);cdecl;
+            resize_column : procedure (clist:PGtkCList; column:gint; width:gint);cdecl;
+            toggle_focus_row : procedure (clist:PGtkCList);cdecl;
+            select_all : procedure (clist:PGtkCList);cdecl;
+            unselect_all : procedure (clist:PGtkCList);cdecl;
+            undo_selection : procedure (clist:PGtkCList);cdecl;
+            start_selection : procedure (clist:PGtkCList);cdecl;
+            end_selection : procedure (clist:PGtkCList);cdecl;
+            extend_selection : procedure (clist:PGtkCList; scroll_type:TGtkScrollType; position:gfloat; auto_start_selection:gboolean);cdecl;
+            scroll_horizontal : procedure (clist:PGtkCList; scroll_type:TGtkScrollType; position:gfloat);cdecl;
+            scroll_vertical : procedure (clist:PGtkCList; scroll_type:TGtkScrollType; position:gfloat);cdecl;
+            toggle_add_mode : procedure (clist:PGtkCList);cdecl;
+            abort_column_resize : procedure (clist:PGtkCList);cdecl;
+            resync_selection : procedure (clist:PGtkCList; event:PGdkEvent);cdecl;
+            selection_find : function (clist:PGtkCList; row_number:gint; row_list_element:PGList):PGList;cdecl;
+            draw_row : procedure (clist:PGtkCList; area:PGdkRectangle; row:gint; clist_row:PGtkCListRow);cdecl;
+            draw_drag_highlight : procedure (clist:PGtkCList; target_row:PGtkCListRow; target_row_number:gint; drag_pos:TGtkCListDragPos);cdecl;
+            clear : procedure (clist:PGtkCList);cdecl;
+            fake_unselect_all : procedure (clist:PGtkCList; row:gint);cdecl;
+            sort_list : procedure (clist:PGtkCList);cdecl;
+            insert_row : procedure (clist:PGtkCList; row:gint; text:PPgchar);cdecl;
+            remove_row : procedure (clist:PGtkCList; row:gint);cdecl;
+            set_cell_contents : procedure (clist:PGtkCList; clist_row:PGtkCListRow; column:gint; thetype:TGtkCellType; text:Pgchar; spacing:guint8; pixmap:PGdkPixmap; mask:PGdkBitmap);cdecl;
+            cell_size_request : procedure (clist:PGtkCList; clist_row:PGtkCListRow; column:gint; requisition:PGtkRequisition);cdecl;
+         end;
+
+       TGtkCListColumn = record
+            title : Pgchar;
+            area : TGdkRectangle;
+            button : PGtkWidget;
+            window : PGdkWindow;
+            width : gint;
+            min_width : gint;
+            max_width : gint;
+            justification : TGtkJustification;
+            flag0 : word;
+         end;
+
+       TGtkCListRow = record
+            cell : PGtkCell;
+            state : TGtkStateType;
+            foreground : TGdkColor;
+            background : TGdkColor;
+            style : PGtkStyle;
+            data : gpointer;
+            destroy : TGtkDestroyNotify;
+            flag0 : word;
+         end;
+       TGtkCellText = record
+            thetype : TGtkCellType;
+            vertical : gint16;
+            horizontal : gint16;
+            style : PGtkStyle;
+            thetext : Pgchar;
+         end;
+       TGtkCellPixmap = record
+            thetype : TGtkCellType;
+            vertical : gint16;
+            horizontal : gint16;
+            style : PGtkStyle;
+            pixmap : PGdkPixmap;
+            mask : PGdkBitmap;
+         end;
+       TGtkCellPixText = record
+            thetype : TGtkCellType;
+            vertical : gint16;
+            horizontal : gint16;
+            style : PGtkStyle;
+            thetext : Pgchar;
+            spacing : guint8;
+            pixmap : PGdkPixmap;
+            mask : PGdkBitmap;
+         end;
+       TGtkCellWidget = record
+            thetype : TGtkCellType;
+            vertical : gint16;
+            horizontal : gint16;
+            style : PGtkStyle;
+            widget : PGtkWidget;
+         end;
+       TGtkCell = record
+            thetype : TGtkCellType;
+            vertical : gint16;
+            horizontal : gint16;
+            style : PGtkStyle;
+            u : record
+                case longint of
+                   0 : ( text : Pgchar );
+                   1 : ( pm : record
+                        pixmap : PGdkPixmap;
+                        mask : PGdkBitmap;
+                     end );
+                   2 : ( pt : record
+                        text : Pgchar;
+                        spacing : guint8;
+                        pixmap : PGdkPixmap;
+                        mask : PGdkBitmap;
+                     end );
+                   3 : ( widget : PGtkWidget );
+                end;
+         end;
+
+    const
+       bm_TGtkCListColumn_visible = $1;
+       bp_TGtkCListColumn_visible = 0;
+       bm_TGtkCListColumn_width_set = $2;
+       bp_TGtkCListColumn_width_set = 1;
+       bm_TGtkCListColumn_resizeable = $4;
+       bp_TGtkCListColumn_resizeable = 2;
+       bm_TGtkCListColumn_auto_resize = $8;
+       bp_TGtkCListColumn_auto_resize = 3;
+       bm_TGtkCListColumn_button_passive = $10;
+       bp_TGtkCListColumn_button_passive = 4;
+function  visible(var a : TGtkCListColumn) : guint;
+procedure set_visible(var a : TGtkCListColumn; __visible : guint);
+function  width_set(var a : TGtkCListColumn) : guint;
+procedure set_width_set(var a : TGtkCListColumn; __width_set : guint);
+function  resizeable(var a : TGtkCListColumn) : guint;
+procedure set_resizeable(var a : TGtkCListColumn; __resizeable : guint);
+function  auto_resize(var a : TGtkCListColumn) : guint;
+procedure set_auto_resize(var a : TGtkCListColumn; __auto_resize : guint);
+function  button_passive(var a : TGtkCListColumn) : guint;
+procedure set_button_passive(var a : TGtkCListColumn; __button_passive : guint);
+    const
+       bm_TGtkCListRow_fg_set = $1;
+       bp_TGtkCListRow_fg_set = 0;
+       bm_TGtkCListRow_bg_set = $2;
+       bp_TGtkCListRow_bg_set = 1;
+       bm_TGtkCListRow_selectable = $4;
+       bp_TGtkCListRow_selectable = 2;
+function  fg_set(var a : TGtkCListRow) : guint;cdecl;
+procedure set_fg_set(var a : TGtkCListRow; __fg_set : guint);cdecl;
+function  bg_set(var a : TGtkCListRow) : guint;cdecl;
+procedure set_bg_set(var a : TGtkCListRow; __bg_set : guint);cdecl;
+function  selectable(var a : TGtkCListRow) : guint;
+procedure set_selectable(var a : TGtkCListRow; __selectable : guint);
+
+Type
+  GTK_CLIST=PGtkCList;
+  GTK_CLIST_CLASS=PGtkCListClass;
+
+function  GTK_CLIST_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_clist_get_type';
+function  GTK_IS_CLIST(obj:pointer):boolean;
+function  GTK_IS_CLIST_CLASS(klass:pointer):boolean;
+
+function  gtk_clist_get_type:TGtkType;cdecl;external gtkdll name 'gtk_clist_get_type';
+procedure gtk_clist_construct(clist:PGtkCList; columns:gint; titles:PPgchar);cdecl;external gtkdll name 'gtk_clist_construct';
+function  gtk_clist_new (columns:gint):PGtkWidget;cdecl;external gtkdll name 'gtk_clist_new';
+function  gtk_clist_new_with_titles (columns:gint; titles:PPgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_clist_new_with_titles';
+{$ifndef gtkwin}
+procedure gtk_clist_set_hadjustment(clist:PGtkCList; adjustment:PGtkAdjustment);cdecl;external gtkdll name 'gtk_clist_set_hadjustment';
+procedure gtk_clist_set_vadjustment(clist:PGtkCList; adjustment:PGtkAdjustment);cdecl;external gtkdll name 'gtk_clist_set_vadjustment';
+function  gtk_clist_get_hadjustment(clist:PGtkCList):PGtkAdjustment;cdecl;external gtkdll name 'gtk_clist_get_hadjustment';
+function  gtk_clist_get_vadjustment(clist:PGtkCList):PGtkAdjustment;cdecl;external gtkdll name 'gtk_clist_get_vadjustment';
+{$endif}
+procedure gtk_clist_set_shadow_type(clist:PGtkCList; thetype:TGtkShadowType);cdecl;external gtkdll name 'gtk_clist_set_shadow_type';
+procedure gtk_clist_set_selection_mode(clist:PGtkCList; mode:TGtkSelectionMode);cdecl;external gtkdll name 'gtk_clist_set_selection_mode';
+procedure gtk_clist_set_reorderable(clist:PGtkCList; reorderable:gboolean);cdecl;external gtkdll name 'gtk_clist_set_reorderable';
+{$ifndef gtkwin}
+procedure gtk_clist_set_use_drag_icons(clist:PGtkCList; use_icons:gboolean);cdecl;external gtkdll name 'gtk_clist_set_use_drag_icons';
+procedure gtk_clist_set_button_actions(clist:PGtkCList; button:guint; button_actions:guint8);cdecl;external gtkdll name 'gtk_clist_set_button_actions';
+{$endif}
+procedure gtk_clist_freeze(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_freeze';
+procedure gtk_clist_thaw(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_thaw';
+procedure gtk_clist_column_titles_show(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_column_titles_show';
+procedure gtk_clist_column_titles_hide(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_column_titles_hide';
+procedure gtk_clist_column_title_active(clist:PGtkCList; column:gint);cdecl;external gtkdll name 'gtk_clist_column_title_active';
+procedure gtk_clist_column_title_passive(clist:PGtkCList; column:gint);cdecl;external gtkdll name 'gtk_clist_column_title_passive';
+procedure gtk_clist_column_titles_active(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_column_titles_active';
+procedure gtk_clist_column_titles_passive(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_column_titles_passive';
+procedure gtk_clist_set_column_title(clist:PGtkCList; column:gint; title:Pgchar);cdecl;external gtkdll name 'gtk_clist_set_column_title';
+function  gtk_clist_get_column_title(clist:PGtkCList; column:gint):Pgchar;cdecl;external gtkdll name 'gtk_clist_get_column_title';
+procedure gtk_clist_set_column_widget(clist:PGtkCList; column:gint; widget:PGtkWidget);cdecl;external gtkdll name 'gtk_clist_set_column_widget';
+function  gtk_clist_get_column_widget(clist:PGtkCList; column:gint):PGtkWidget;cdecl;external gtkdll name 'gtk_clist_get_column_widget';
+procedure gtk_clist_set_column_justification(clist:PGtkCList; column:gint; justification:TGtkJustification);cdecl;external gtkdll name 'gtk_clist_set_column_justification';
+procedure gtk_clist_set_column_visibility(clist:PGtkCList; column:gint; visible:gboolean);cdecl;external gtkdll name 'gtk_clist_set_column_visibility';
+procedure gtk_clist_set_column_resizeable(clist:PGtkCList; column:gint; resizeable:gboolean);cdecl;external gtkdll name 'gtk_clist_set_column_resizeable';
+procedure gtk_clist_set_column_auto_resize(clist:PGtkCList; column:gint; auto_resize:gboolean);cdecl;external gtkdll name 'gtk_clist_set_column_auto_resize';
+function  gtk_clist_columns_autosize(clist:PGtkCList):gint;cdecl;external gtkdll name 'gtk_clist_columns_autosize';
+{$ifndef gtkwin}
+function  gtk_clist_optimal_column_width(clist:PGtkCList; column:gint):gint;cdecl;external gtkdll name 'gtk_clist_optimal_column_width';
+{$endif}
+procedure gtk_clist_set_column_width(clist:PGtkCList; column:gint; width:gint);cdecl;external gtkdll name 'gtk_clist_set_column_width';
+procedure gtk_clist_set_column_min_width(clist:PGtkCList; column:gint; min_width:gint);cdecl;external gtkdll name 'gtk_clist_set_column_min_width';
+procedure gtk_clist_set_column_max_width(clist:PGtkCList; column:gint; max_width:gint);cdecl;external gtkdll name 'gtk_clist_set_column_max_width';
+procedure gtk_clist_set_row_height(clist:PGtkCList; height:guint);cdecl;external gtkdll name 'gtk_clist_set_row_height';
+procedure gtk_clist_moveto(clist:PGtkCList; row:gint; column:gint; row_align:gfloat; col_align:gfloat);cdecl;external gtkdll name 'gtk_clist_moveto';
+function  gtk_clist_row_is_visible(clist:PGtkCList; row:gint):TGtkVisibility;cdecl;external gtkdll name 'gtk_clist_row_is_visible';
+function  gtk_clist_get_cell_type(clist:PGtkCList; row:gint; column:gint):TGtkCellType;cdecl;external gtkdll name 'gtk_clist_get_cell_type';
+procedure gtk_clist_set_text(clist:PGtkCList; row:gint; column:gint; thetext:Pgchar);cdecl;external gtkdll name 'gtk_clist_set_text';
+function  gtk_clist_get_text(clist:PGtkCList; row:gint; column:gint; thetext:PPgchar):gint;cdecl;external gtkdll name 'gtk_clist_get_text';
+procedure gtk_clist_set_pixmap(clist:PGtkCList; row:gint; column:gint; pixmap:PGdkPixmap; mask:PGdkBitmap);cdecl;external gtkdll name 'gtk_clist_set_pixmap';
+function  gtk_clist_get_pixmap(clist:PGtkCList; row:gint; column:gint; pixmap:PPGdkPixmap; mask:PPGdkBitmap):gint;cdecl;external gtkdll name 'gtk_clist_get_pixmap';
+{$ifndef gtkwin}
+procedure gtk_clist_set_pixtext(clist:PGtkCList; row:gint; column:gint; thetext:Pgchar; spacing:guint8;pixmap:PGdkPixmap; mask:PGdkBitmap);cdecl;external gtkdll name 'gtk_clist_set_pixtext';
+function  gtk_clist_get_pixtext(clist:PGtkCList; row:gint; column:gint; thetext:PPgchar; spacing:Pguint8;pixmap:PPGdkPixmap; mask:PPGdkBitmap):gint;cdecl;external gtkdll name 'gtk_clist_get_pixtext';
+{$endif}
+procedure gtk_clist_set_foreground(clist:PGtkCList; row:gint; color:PGdkColor);cdecl;external gtkdll name 'gtk_clist_set_foreground';
+procedure gtk_clist_set_background(clist:PGtkCList; row:gint; color:PGdkColor);cdecl;external gtkdll name 'gtk_clist_set_background';
+procedure gtk_clist_set_cell_style(clist:PGtkCList; row:gint; column:gint; style:PGtkStyle);cdecl;external gtkdll name 'gtk_clist_set_cell_style';
+function  gtk_clist_get_cell_style(clist:PGtkCList; row:gint; column:gint):PGtkStyle;cdecl;external gtkdll name 'gtk_clist_get_cell_style';
+procedure gtk_clist_set_row_style(clist:PGtkCList; row:gint; style:PGtkStyle);cdecl;external gtkdll name 'gtk_clist_set_row_style';
+function  gtk_clist_get_row_style(clist:PGtkCList; row:gint):PGtkStyle;cdecl;external gtkdll name 'gtk_clist_get_row_style';
+procedure gtk_clist_set_shift(clist:PGtkCList; row:gint; column:gint; vertical:gint; horizontal:gint);cdecl;external gtkdll name 'gtk_clist_set_shift';
+function  gtk_clist_prepend(clist:PGtkCList; thetext:PPgchar):gint;cdecl;external gtkdll name 'gtk_clist_prepend';
+function  gtk_clist_append(clist:PGtkCList; thetext:PPgchar):gint;cdecl;external gtkdll name 'gtk_clist_append';
+procedure gtk_clist_insert(clist:PGtkCList; row:gint; thetext:PPgchar);cdecl;external gtkdll name 'gtk_clist_insert';
+procedure gtk_clist_remove(clist:PGtkCList; row:gint);cdecl;external gtkdll name 'gtk_clist_remove';
+procedure gtk_clist_set_row_data(clist:PGtkCList; row:gint; data:gpointer);cdecl;external gtkdll name 'gtk_clist_set_row_data';
+procedure gtk_clist_set_row_data_full(clist:PGtkCList; row:gint; data:gpointer; destroy:TGtkDestroyNotify);cdecl;external gtkdll name 'gtk_clist_set_row_data_full';
+function  gtk_clist_get_row_data(clist:PGtkCList; row:gint):gpointer;cdecl;external gtkdll name 'gtk_clist_get_row_data';
+function  gtk_clist_find_row_from_data(clist:PGtkCList; data:gpointer):gint;cdecl;external gtkdll name 'gtk_clist_find_row_from_data';
+procedure gtk_clist_select_row(clist:PGtkCList; row:gint; column:gint);cdecl;external gtkdll name 'gtk_clist_select_row';
+procedure gtk_clist_unselect_row(clist:PGtkCList; row:gint; column:gint);cdecl;external gtkdll name 'gtk_clist_unselect_row';
+procedure gtk_clist_clear(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_clear';
+function  gtk_clist_get_selection_info(clist:PGtkCList; x:gint; y:gint; row:Pgint; column:Pgint):gint;cdecl;external gtkdll name 'gtk_clist_get_selection_info';
+procedure gtk_clist_select_all(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_select_all';
+procedure gtk_clist_unselect_all(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_unselect_all';
+procedure gtk_clist_swap_rows(clist:PGtkCList; row1:gint; row2:gint);cdecl;external gtkdll name 'gtk_clist_swap_rows';
+{$ifndef gtkwin}
+procedure gtk_clist_row_move(clist:PGtkCList; source_row:gint; dest_row:gint);cdecl;external gtkdll name 'gtk_clist_row_move';
+{$endif}
+procedure gtk_clist_set_compare_func(clist:PGtkCList; cmp_func:TGtkCListCompareFunc);cdecl;external gtkdll name 'gtk_clist_set_compare_func';
+procedure gtk_clist_set_sort_column(clist:PGtkCList; column:gint);cdecl;external gtkdll name 'gtk_clist_set_sort_column';
+procedure gtk_clist_set_sort_type(clist:PGtkCList; sort_type:TGtkSortType);cdecl;external gtkdll name 'gtk_clist_set_sort_type';
+procedure gtk_clist_sort(clist:PGtkCList);cdecl;external gtkdll name 'gtk_clist_sort';
+procedure gtk_clist_set_auto_sort(clist:PGtkCList; auto_sort:gboolean);cdecl;external gtkdll name 'gtk_clist_set_auto_sort';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  visible(var a : TGtkCListColumn) : guint;
+      begin
+         visible:=(a.flag0 and bm_TGtkCListColumn_visible) shr bp_TGtkCListColumn_visible;
+      end;
+
+procedure set_visible(var a : TGtkCListColumn; __visible : guint);
+      begin
+         a.flag0:=a.flag0 or ((__visible shl bp_TGtkCListColumn_visible) and bm_TGtkCListColumn_visible);
+      end;
+
+function  width_set(var a : TGtkCListColumn) : guint;
+      begin
+         width_set:=(a.flag0 and bm_TGtkCListColumn_width_set) shr bp_TGtkCListColumn_width_set;
+      end;
+
+procedure set_width_set(var a : TGtkCListColumn; __width_set : guint);
+      begin
+         a.flag0:=a.flag0 or ((__width_set shl bp_TGtkCListColumn_width_set) and bm_TGtkCListColumn_width_set);
+      end;
+
+function  resizeable(var a : TGtkCListColumn) : guint;
+      begin
+         resizeable:=(a.flag0 and bm_TGtkCListColumn_resizeable) shr bp_TGtkCListColumn_resizeable;
+      end;
+
+procedure set_resizeable(var a : TGtkCListColumn; __resizeable : guint);
+      begin
+         a.flag0:=a.flag0 or ((__resizeable shl bp_TGtkCListColumn_resizeable) and bm_TGtkCListColumn_resizeable);
+      end;
+
+function  auto_resize(var a : TGtkCListColumn) : guint;
+      begin
+         auto_resize:=(a.flag0 and bm_TGtkCListColumn_auto_resize) shr bp_TGtkCListColumn_auto_resize;
+      end;
+
+procedure set_auto_resize(var a : TGtkCListColumn; __auto_resize : guint);
+      begin
+         a.flag0:=a.flag0 or ((__auto_resize shl bp_TGtkCListColumn_auto_resize) and bm_TGtkCListColumn_auto_resize);
+      end;
+
+function  button_passive(var a : TGtkCListColumn) : guint;
+      begin
+         button_passive:=(a.flag0 and bm_TGtkCListColumn_button_passive) shr bp_TGtkCListColumn_button_passive;
+      end;
+
+procedure set_button_passive(var a : TGtkCListColumn; __button_passive : guint);
+      begin
+         a.flag0:=a.flag0 or ((__button_passive shl bp_TGtkCListColumn_button_passive) and bm_TGtkCListColumn_button_passive);
+      end;
+
+function  fg_set(var a : TGtkCListRow) : guint;cdecl;
+      begin
+         fg_set:=(a.flag0 and bm_TGtkCListRow_fg_set) shr bp_TGtkCListRow_fg_set;
+      end;
+
+procedure set_fg_set(var a : TGtkCListRow; __fg_set : guint);cdecl;
+      begin
+         a.flag0:=a.flag0 or ((__fg_set shl bp_TGtkCListRow_fg_set) and bm_TGtkCListRow_fg_set);
+      end;
+
+function  bg_set(var a : TGtkCListRow) : guint;cdecl;
+      begin
+         bg_set:=(a.flag0 and bm_TGtkCListRow_bg_set) shr bp_TGtkCListRow_bg_set;
+      end;
+
+procedure set_bg_set(var a : TGtkCListRow; __bg_set : guint);cdecl;
+      begin
+         a.flag0:=a.flag0 or ((__bg_set shl bp_TGtkCListRow_bg_set) and bm_TGtkCListRow_bg_set);
+      end;
+
+function  selectable(var a : TGtkCListRow) : guint;
+      begin
+         selectable:=(a.flag0 and bm_TGtkCListRow_selectable) shr bp_TGtkCListRow_selectable;
+      end;
+
+procedure set_selectable(var a : TGtkCListRow; __selectable : guint);
+      begin
+         a.flag0:=a.flag0 or ((__selectable shl bp_TGtkCListRow_selectable) and bm_TGtkCListRow_selectable);
+      end;
+
+function  GTK_IS_CLIST(obj:pointer):boolean;
+begin
+  GTK_IS_CLIST:=(obj<>nil) and GTK_IS_CLIST_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_CLIST_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_CLIST_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_CLIST_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.15  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.14  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.13  1999/10/05 09:45:51  peter
+    * second try
+
+  Revision 1.12  1999/10/05 09:28:27  peter
+    * patches from Frank Loemker
+
+  Revision 1.11  1999/08/17 13:26:28  peter
+    * typo fix, test -> text
+
+  Revision 1.10  1999/07/23 16:12:05  peter
+    * use packrecords C
+
+  Revision 1.9  1999/05/11 00:38:17  peter
+    * win32 fixes
+
+  Revision 1.8  1999/05/10 15:19:04  peter
+    * cdecl fixes
+
+  Revision 1.7  1999/05/10 09:03:02  peter
+    * gtk 1.2 port working
+
+  Revision 1.6  1999/05/07 17:40:14  peter
+    * more updates
+
+  Revision 1.5  1998/11/09 10:09:40  peter
+    + C type casts are now correctly handled
+
+  Revision 1.4  1998/10/22 11:37:41  peter
+    * fixes for win32
+
+  Revision 1.3  1998/10/21 20:22:15  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 148 - 0
packages/gtk/gtk/gtkcolorsel.pp

@@ -0,0 +1,148 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkColorSelection = ^TGtkColorSelection;
+       TGtkColorSelection = record
+            vbox : TGtkVBox;
+            wheel_area : PGtkWidget;
+            value_area : PGtkWidget;
+            sample_area : PGtkWidget;
+            sample_area_eb : PGtkWidget;
+            scales : array[0..7] of PGtkWidget;
+            entries : array[0..7] of PGtkWidget;
+            opacity_label : PGtkWidget;
+            wheel_gc : PGdkGC;
+            value_gc : PGdkGC;
+            sample_gc : PGdkGC;
+            policy : TGtkUpdateType;
+            use_opacity : gint;
+            timer_active : gint;
+            timer_tag : gint;
+            values : array[0..7] of gdouble;
+            old_values : array[0..7] of gdouble;
+            wheel_buf : Pguchar;
+            value_buf : Pguchar;
+            sample_buf : Pguchar;
+         end;
+
+       PGtkColorSelectionClass = ^TGtkColorSelectionClass;
+       TGtkColorSelectionClass = record
+            parent_class : TGtkVBoxClass;
+            color_changed : procedure (colorsel:PGtkColorSelection); cdecl;
+         end;
+
+       PGtkColorSelectionDialog = ^TGtkColorSelectionDialog;
+       TGtkColorSelectionDialog = record
+            window : TGtkWindow;
+            colorsel : PGtkWidget;
+            main_vbox : PGtkWidget;
+            ok_button : PGtkWidget;
+            reset_button : PGtkWidget;
+            cancel_button : PGtkWidget;
+            help_button : PGtkWidget;
+         end;
+
+       PGtkColorSelectionDialogClass = ^TGtkColorSelectionDialogClass;
+       TGtkColorSelectionDialogClass = record
+            parent_class : TGtkWindowClass;
+         end;
+
+Type
+  GTK_COLOR_SELECTION=PGtkColorSelection;
+  GTK_COLOR_SELECTION_CLASS=PGtkColorSelectionClass;
+
+  GTK_COLOR_SELECTION_DIALOG=PGtkColorSelectionDialog;
+  GTK_COLOR_SELECTION_DIALOG_CLASS=PGtkColorSelectionDialogClass;
+
+{ ColorSelection }
+function  GTK_COLOR_SELECTION_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_color_selection_get_type';
+function  GTK_IS_COLOR_SELECTION(obj:pointer):boolean;
+function  GTK_IS_COLOR_SELECTION_CLASS(klass:pointer):boolean;
+
+function  gtk_color_selection_get_type:TGtkType;cdecl;external gtkdll name 'gtk_color_selection_get_type';
+function  gtk_color_selection_new:PGtkWidget;cdecl;external gtkdll name 'gtk_color_selection_new';
+procedure gtk_color_selection_set_update_policy(colorsel:PGtkColorSelection; policy:TGtkUpdateType);cdecl;external gtkdll name 'gtk_color_selection_set_update_policy';
+procedure gtk_color_selection_set_opacity(colorsel:PGtkColorSelection; use_opacity:gint);cdecl;external gtkdll name 'gtk_color_selection_set_opacity';
+procedure gtk_color_selection_set_color(colorsel:PGtkColorSelection; color:Pgdouble);cdecl;external gtkdll name 'gtk_color_selection_set_color';
+procedure gtk_color_selection_get_color(colorsel:PGtkColorSelection; color:Pgdouble);cdecl;external gtkdll name 'gtk_color_selection_get_color';
+
+{ ColorSelectionDialog }
+function  gtk_color_selection_dialog_get_type:guint;cdecl;external gtkdll name 'gtk_color_selection_dialog_get_type';
+function  gtk_color_selection_dialog_new (title:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_color_selection_dialog_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_COLOR_SELECTION(obj:pointer):boolean;
+begin
+  GTK_IS_COLOR_SELECTION:=(obj<>nil) and GTK_IS_COLOR_SELECTION_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_COLOR_SELECTION_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_COLOR_SELECTION_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_COLOR_SELECTION_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:07  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:18  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:06  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 17:40:16  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:09:41  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:16  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 190 - 0
packages/gtk/gtk/gtkcombo.pp

@@ -0,0 +1,190 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkCombo = ^TGtkCombo;
+     TGtkCombo = record
+          hbox : TGtkHBox;
+          entry : PGtkWidget;
+          button : PGtkWidget;
+          popup : PGtkWidget;
+          popwin : PGtkWidget;
+          list : PGtkWidget;
+          entry_change_id : guint;
+          list_change_id : guint;
+          flag0 : word;
+          current_button : guint16;
+          activate_id : guint;
+       end;
+
+  const
+     bm_value_in_list = 1;
+     bp_value_in_list = 0;
+     bm_ok_if_empty = 2;
+     bp_ok_if_empty = 1;
+     bm_case_sensitive = 4;
+     bp_case_sensitive = 2;
+     bm_use_arrows = 8;
+     bp_use_arrows = 3;
+     bm_use_arrows_always = 16;
+     bp_use_arrows_always = 4;
+function  value_in_list(var a : TGtkCombo) : guint;
+procedure set_value_in_list(var a : TGtkCombo; __value_in_list : guint);
+function  ok_if_empty(var a : TGtkCombo) : guint;
+procedure set_ok_if_empty(var a : TGtkCombo; __ok_if_empty : guint);
+function  case_sensitive(var a : TGtkCombo) : guint;
+procedure set_case_sensitive(var a : TGtkCombo; __case_sensitive : guint);
+function  use_arrows(var a : TGtkCombo) : guint;
+procedure set_use_arrows(var a : TGtkCombo; __use_arrows : guint);
+function  use_arrows_always(var a : TGtkCombo) : guint;
+procedure set_use_arrows_always(var a : TGtkCombo; __use_arrows_always : guint);
+
+  type
+     PGtkComboClass = ^TGtkComboClass;
+     TGtkComboClass = record
+          parent_class : TGtkHBoxClass;
+       end;
+
+Type
+  GTK_COMBO=PGtkCombo;
+  GTK_COMBO_CLASS=PGtkComboClass;
+
+function  GTK_COMBO_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_combo_get_type';
+function  GTK_IS_COMBO(obj:pointer):boolean;
+function  GTK_IS_COMBO_CLASS(klass:pointer):boolean;
+
+function  gtk_combo_get_type:TGtkType;cdecl;external gtkdll name 'gtk_combo_get_type';
+function  gtk_combo_new : PGtkWidget;cdecl;external gtkdll name 'gtk_combo_new';
+procedure gtk_combo_set_value_in_list(combo:PGtkCombo; val:gint; ok_if_empty:gint);cdecl;external gtkdll name 'gtk_combo_set_value_in_list';
+procedure gtk_combo_set_use_arrows(combo:PGtkCombo; val:gint);cdecl;external gtkdll name 'gtk_combo_set_use_arrows';
+procedure gtk_combo_set_use_arrows_always(combo:PGtkCombo; val:gint);cdecl;external gtkdll name 'gtk_combo_set_use_arrows_always';
+procedure gtk_combo_set_case_sensitive(combo:PGtkCombo; val:gint);cdecl;external gtkdll name 'gtk_combo_set_case_sensitive';
+procedure gtk_combo_set_item_string(combo:PGtkCombo; item:PGtkItem; item_value:Pgchar);cdecl;external gtkdll name 'gtk_combo_set_item_string';
+procedure gtk_combo_set_popdown_strings(combo:PGtkCombo; strings:PGList);cdecl;external gtkdll name 'gtk_combo_set_popdown_strings';
+procedure gtk_combo_disable_activate(combo:PGtkCombo);cdecl;external gtkdll name 'gtk_combo_disable_activate';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  value_in_list(var a : TGtkCombo) : guint;
+    begin
+       value_in_list:=(a.flag0 and bm_value_in_list) shr bp_value_in_list;
+    end;
+
+procedure set_value_in_list(var a : TGtkCombo; __value_in_list : guint);
+    begin
+       a.flag0:=a.flag0 or ((__value_in_list shl bp_value_in_list) and bm_value_in_list);
+    end;
+
+function  ok_if_empty(var a : TGtkCombo) : guint;
+    begin
+       ok_if_empty:=(a.flag0 and bm_ok_if_empty) shr bp_ok_if_empty;
+    end;
+
+procedure set_ok_if_empty(var a : TGtkCombo; __ok_if_empty : guint);
+    begin
+       a.flag0:=a.flag0 or ((__ok_if_empty shl bp_ok_if_empty) and bm_ok_if_empty);
+    end;
+
+function  case_sensitive(var a : TGtkCombo) : guint;
+    begin
+       case_sensitive:=(a.flag0 and bm_case_sensitive) shr bp_case_sensitive;
+    end;
+
+procedure set_case_sensitive(var a : TGtkCombo; __case_sensitive : guint);
+    begin
+       a.flag0:=a.flag0 or ((__case_sensitive shl bp_case_sensitive) and bm_case_sensitive);
+    end;
+
+function  use_arrows(var a : TGtkCombo) : guint;
+    begin
+       use_arrows:=(a.flag0 and bm_use_arrows) shr bp_use_arrows;
+    end;
+
+procedure set_use_arrows(var a : TGtkCombo; __use_arrows : guint);
+    begin
+       a.flag0:=a.flag0 or ((__use_arrows shl bp_use_arrows) and bm_use_arrows);
+    end;
+
+function  use_arrows_always(var a : TGtkCombo) : guint;
+    begin
+       use_arrows_always:=(a.flag0 and bm_use_arrows_always) shr bp_use_arrows_always;
+    end;
+
+procedure set_use_arrows_always(var a : TGtkCombo; __use_arrows_always : guint);
+    begin
+       a.flag0:=a.flag0 or ((__use_arrows_always shl bp_use_arrows_always) and bm_use_arrows_always);
+    end;
+
+function  GTK_IS_COMBO(obj:pointer):boolean;
+begin
+  GTK_IS_COMBO:=(obj<>nil) and GTK_IS_COMBO_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_COMBO_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_COMBO_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_COMBO_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:08  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:19  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:07  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 17:40:17  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:09:42  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:17  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 204 - 0
packages/gtk/gtk/gtkcontainer.pp

@@ -0,0 +1,204 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkContainer = ^TGtkContainer;
+       TGtkContainer = record
+            widget : TGtkWidget;
+            focus_child : PGtkWidget;
+            flag0 : longint;
+            resize_widgets : PGSList;
+         end;
+  const
+     bm_TGtkContainer_border_width = $FFFF;
+     bp_TGtkContainer_border_width = 0;
+     bm_TGtkContainer_need_resize = $10000;
+     bp_TGtkContainer_need_resize = 16;
+     bm_TGtkContainer_resize_mode = $60000;
+     bp_TGtkContainer_resize_mode = 17;
+function  border_width(var a : TGtkContainer) : guint;
+procedure set_border_width(var a : TGtkContainer; __border_width : guint);
+function  need_resize(var a : TGtkContainer) : guint;
+procedure set_need_resize(var a : TGtkContainer; __need_resize : guint);
+function  resize_mode(var a : TGtkContainer) : guint;
+procedure set_resize_mode(var a : TGtkContainer; __resize_mode : guint);
+
+    type
+       PGtkContainerClass = ^TGtkContainerClass;
+       TGtkContainerClass = record
+          parent_class : TGtkWidgetClass;
+          n_child_args : guint;
+          add : procedure (container:PGtkContainer; widget:PGtkWidget); cdecl;
+          remove : procedure (container:PGtkContainer; widget:PGtkWidget); cdecl;
+          check_resize : procedure (container:PGtkContainer);cdecl;
+          forall : procedure (container:PGtkContainer; include_internals:gboolean; callback:TGtkCallback; callbabck_data:gpointer);cdecl;
+          focus : function (container:PGtkContainer; direction:TGtkDirectionType):gint; cdecl;
+          set_focus_child : procedure (container:PGtkContainer; widget:PGtkWidget);cdecl;
+          child_type : function (container:PGtkContainer):TGtkType;cdecl;
+          set_child_arg : procedure (container:PGtkContainer; child:PGtkWidget; arg:PGtkArg; arg_id:guint);cdecl;
+          get_child_arg : procedure (container:PGtkContainer; child:PGtkWidget; arg:PGtkArg; arg_id:guint);cdecl;
+          composite_name : function (container:PGtkContainer; child:PGtkWidget):Pgchar;cdecl;
+          pad1 : TGtkfunction;
+          pad2 : TGtkfunction;
+        end;
+
+Type
+  GTK_CONTAINER = PGtkContainer;
+  GTK_CONTAINER_CLASS = PGtkContainerClass;
+
+function  GTK_CONTAINER_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_container_get_type';
+function  GTK_IS_CONTAINER(obj:pointer):boolean;
+function  GTK_IS_CONTAINER_CLASS(klass:pointer):boolean;
+
+function  gtk_container_get_type:TGtkType;cdecl;external gtkdll name 'gtk_container_get_type';
+procedure gtk_container_set_border_width(container:PGtkContainer; border_width:guint);cdecl;external gtkdll name 'gtk_container_set_border_width';
+procedure gtk_container_add(container:PGtkContainer; widget:PGtkWidget);cdecl;external gtkdll name 'gtk_container_add';
+procedure gtk_container_remove(container:PGtkContainer; widget:PGtkWidget);cdecl;external gtkdll name 'gtk_container_remove';
+procedure gtk_container_set_resize_mode(container:PGtkContainer; resize_mode:TGtkResizeMode);cdecl;external gtkdll name 'gtk_container_set_resize_mode';
+procedure gtk_container_check_resize(container:PGtkContainer);cdecl;external gtkdll name 'gtk_container_check_resize';
+procedure gtk_container_foreach(container:PGtkContainer; callback:TGtkCallback; callback_data:gpointer);cdecl;external gtkdll name 'gtk_container_foreach';
+procedure gtk_container_foreach_full(container:PGtkContainer; callback:TGtkCallback; marshal:TGtkCallbackMarshal; callback_data:gpointer; notify:TGtkDestroyNotify);cdecl;external gtkdll name 'gtk_container_foreach_full';
+function  gtk_container_children (container:PGtkContainer):PGList;cdecl;external gtkdll name 'gtk_container_children';
+function  gtk_container_focus(container:PGtkContainer; direction:TGtkDirectionType):gint;cdecl;external gtkdll name 'gtk_container_focus';
+procedure gtk_container_set_focus_child(container:PGtkContainer; child:PGtkWidget);cdecl;external gtkdll name 'gtk_container_set_focus_child';
+procedure gtk_container_set_focus_vadjustment(container:PGtkContainer; adjustment:PGtkAdjustment);cdecl;external gtkdll name 'gtk_container_set_focus_vadjustment';
+procedure gtk_container_set_focus_hadjustment(container:PGtkContainer; adjustment:PGtkAdjustment);cdecl;external gtkdll name 'gtk_container_set_focus_hadjustment';
+procedure gtk_container_register_toplevel(container:PGtkContainer);cdecl;external gtkdll name 'gtk_container_register_toplevel';
+procedure gtk_container_unregister_toplevel(container:PGtkContainer);cdecl;external gtkdll name 'gtk_container_unregister_toplevel';
+{$ifndef gtkwin}
+function  gtk_container_get_toplevels:PGList;cdecl;external gtkdll name 'gtk_container_get_toplevels';
+{$endif}
+procedure gtk_container_resize_children(container:PGtkContainer);cdecl;external gtkdll name 'gtk_container_resize_children';
+function  gtk_container_child_type(container:PGtkContainer):TGtkType;cdecl;external gtkdll name 'gtk_container_child_type';
+procedure gtk_container_add_child_arg_type(arg_name:Pgchar; arg_type:TGtkType; arg_flags:guint; arg_id:guint);cdecl;external gtkdll name 'gtk_container_add_child_arg_type';
+function  gtk_container_query_child_args(class_type:TGtkType; arg_flags:PPguint32; nargs:Pguint):PGtkArg;cdecl;external gtkdll name 'gtk_container_query_child_args';
+procedure gtk_container_child_getv(container:PGtkContainer; child:PGtkWidget; n_args:guint; args:PGtkArg);cdecl;external gtkdll name 'gtk_container_child_getv';
+procedure gtk_container_child_setv(container:PGtkContainer; child:PGtkWidget; n_args:guint; args:PGtkArg);cdecl;external gtkdll name 'gtk_container_child_setv';
+procedure gtk_container_add_with_args(container:PGtkContainer; widget:PGtkWidget; first_arg_name:Pgchar; args:array of const);cdecl;external gtkdll name 'gtk_container_add_with_args';
+procedure gtk_container_addv(container:PGtkContainer; widget:PGtkWidget; n_args:guint; args:PGtkArg);cdecl;external gtkdll name 'gtk_container_addv';
+procedure gtk_container_child_set(container:PGtkContainer; child:PGtkWidget; first_arg_name:Pgchar; args:array of const);cdecl;external gtkdll name 'gtk_container_child_set';
+procedure gtk_container_queue_resize(container:PGtkContainer);cdecl;external gtkdll name 'gtk_container_queue_resize';
+{$ifndef gtkwin}
+procedure gtk_container_clear_resize_widgets(container:PGtkContainer);cdecl;external gtkdll name 'gtk_container_clear_resize_widgets';
+procedure gtk_container_arg_set(container:PGtkContainer; child:PGtkWidget; arg:PGtkArg; info:PGtkArgInfo);cdecl;external gtkdll name 'gtk_container_arg_set';
+procedure gtk_container_arg_get(container:PGtkContainer; child:PGtkWidget; arg:PGtkArg; info:PGtkArgInfo);cdecl;external gtkdll name 'gtk_container_arg_get';
+function  gtk_container_child_args_collect(object_type:TGtkType; arg_list_p:PPGSList; info_list_p:PPGSList; first_arg_name:Pgchar; args:array of const):Pgchar;cdecl;external gtkdll name 'gtk_container_child_args_collect';
+function  gtk_container_child_arg_get_info(object_type:TGtkType; arg_name:Pgchar; info_p:PPGtkArgInfo):Pgchar;cdecl;external gtkdll name 'gtk_container_child_arg_get_info';
+procedure gtk_container_forall(container:PGtkContainer; callback:TGtkCallback; callback_data:gpointer);cdecl;external gtkdll name 'gtk_container_forall';
+function  gtk_container_child_composite_name(container:PGtkContainer; child:PGtkWidget):Pgchar;cdecl;external gtkdll name 'gtk_container_child_composite_name';
+{$endif}
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  border_width(var a : TGtkContainer) : guint;
+    begin
+       border_width:=(a.flag0 and bm_TGtkContainer_border_width) shr bp_TGtkContainer_border_width;
+    end;
+
+procedure set_border_width(var a : TGtkContainer; __border_width : guint);
+    begin
+       a.flag0:=a.flag0 or ((__border_width shl bp_TGtkContainer_border_width) and bm_TGtkContainer_border_width);
+    end;
+
+function  need_resize(var a : TGtkContainer) : guint;
+    begin
+       need_resize:=(a.flag0 and bm_TGtkContainer_need_resize) shr bp_TGtkContainer_need_resize;
+    end;
+
+procedure set_need_resize(var a : TGtkContainer; __need_resize : guint);
+    begin
+       a.flag0:=a.flag0 or ((__need_resize shl bp_TGtkContainer_need_resize) and bm_TGtkContainer_need_resize);
+    end;
+
+function  resize_mode(var a : TGtkContainer) : guint;
+    begin
+       resize_mode:=(a.flag0 and bm_TGtkContainer_resize_mode) shr bp_TGtkContainer_resize_mode;
+    end;
+
+procedure set_resize_mode(var a : TGtkContainer; __resize_mode : guint);
+    begin
+       a.flag0:=a.flag0 or ((__resize_mode shl bp_TGtkContainer_resize_mode) and bm_TGtkContainer_resize_mode);
+    end;
+
+function  GTK_IS_CONTAINER(obj:pointer):boolean;
+begin
+  GTK_IS_CONTAINER:=(obj<>nil) and GTK_IS_CONTAINER_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_CONTAINER_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_CONTAINER_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_CONTAINER_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.13  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.12  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.11  1999/07/23 16:12:09  peter
+    * use packrecords C
+
+  Revision 1.10  1999/05/11 00:38:20  peter
+    * win32 fixes
+
+  Revision 1.9  1999/05/10 19:18:28  peter
+    * more fixes for the examples to work
+
+  Revision 1.8  1999/05/10 15:19:08  peter
+    * cdecl fixes
+
+  Revision 1.7  1999/05/10 09:03:03  peter
+    * gtk 1.2 port working
+
+  Revision 1.6  1999/05/07 15:09:57  peter
+    * more fixes
+
+  Revision 1.5  1999/05/07 10:40:34  peter
+    * first things for 1.2
+
+  Revision 1.4  1998/11/09 10:09:43  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:18  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 293 - 0
packages/gtk/gtk/gtkctree.pp

@@ -0,0 +1,293 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     TGtkCTreePos = (GTK_CTREE_POS_BEFORE,GTK_CTREE_POS_AS_CHILD,
+       GTK_CTREE_POS_AFTER);
+
+     TGtkCTreeLineStyle = (GTK_CTREE_LINES_NONE,GTK_CTREE_LINES_SOLID,
+       GTK_CTREE_LINES_DOTTED,GTK_CTREE_LINES_TABBED
+       );
+
+     TGtkCTreeExpanderStyle = (GTK_CTREE_EXPANDER_NONE,GTK_CTREE_EXPANDER_SQUARE,
+       GTK_CTREE_EXPANDER_TRIANGLE,GTK_CTREE_EXPANDER_CIRCULAR
+       );
+
+     TGtkCTreeExpansionType = (GTK_CTREE_EXPANSION_EXPAND,GTK_CTREE_EXPANSION_EXPAND_RECURSIVE,
+       GTK_CTREE_EXPANSION_COLLAPSE,GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE,
+       GTK_CTREE_EXPANSION_TOGGLE,GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE
+       );
+
+     PGtkCTree = ^TGtkCTree;
+     PGtkCTreeNode = ^TGtkCTreeNode;
+     PGtkCTreeRow = ^TGtkCTreeRow;
+     PGtkCTreeClass = ^TGtkCTreeClass;
+
+     TGtkCTreeFunc = procedure (ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer);cdecl;
+
+     TGtkCTreeGNodeFunc = function (ctree:PGtkCTree; depth:guint; gnode:PGNode; cnode:PGtkCTreeNode; data:gpointer):gboolean;cdecl;
+
+     TGtkCTreeCompareDragFunc = function (ctree:PGtkCTree; source_node:PGtkCTreeNode; new_parent:PGtkCTreeNode; new_sibling:PGtkCTreeNode):gboolean;cdecl;
+
+     TGtkCTree = record
+          clist : TGtkCList;
+          lines_gc : PGdkGC;
+          tree_indent : gint;
+          tree_spacing : gint;
+          tree_column : gint;
+          flag0 : word;
+          drag_compare : TGtkCTreeCompareDragFunc;
+       end;
+
+     TGtkCTreeNode = record
+          list : TGList;
+       end;
+
+     TGtkCTreeRow = record
+          row : TGtkCListRow;
+          parent : PGtkCTreeNode;
+          sibling : PGtkCTreeNode;
+          children : PGtkCTreeNode;
+          pixmap_closed : PGdkPixmap;
+          mask_closed : PGdkBitmap;
+          pixmap_opened : PGdkPixmap;
+          mask_opened : PGdkBitmap;
+          level : guint16;
+          flag0 : word;
+       end;
+
+     TGtkCTreeClass = record
+          parent_class : TGtkCListClass;
+          tree_select_row : procedure (ctree:PGtkCTree; row:PGtkCTreeNode; column:gint);cdecl;
+          tree_unselect_row : procedure (ctree:PGtkCTree; row:PGtkCTreeNode; column:gint);cdecl;
+          tree_expand : procedure (ctree:PGtkCTree; node:PGtkCTreeNode);cdecl;
+          tree_collapse : procedure (ctree:PGtkCTree; node:PGtkCTreeNode);cdecl;
+          tree_move : procedure (ctree:PGtkCTree; node:PGtkCTreeNode; new_parent:PGtkCTreeNode; new_sibling:PGtkCTreeNode);cdecl;
+          change_focus_row_expansion : procedure (ctree:PGtkCTree; action:TGtkCTreeExpansionType);cdecl;
+       end;
+
+  const
+     bm_TGtkCTree_line_style = $3;
+     bp_TGtkCTree_line_style = 0;
+     bm_TGtkCTree_expander_style = $C;
+     bp_TGtkCTree_expander_style = 2;
+     bm_TGtkCTree_show_stub = $10;
+     bp_TGtkCTree_show_stub = 4;
+function  line_style(var a : TGtkCTree) : guint;
+procedure set_line_style(var a : TGtkCTree; __line_style : guint);
+function  expander_style(var a : TGtkCTree) : guint;
+procedure set_expander_style(var a : TGtkCTree; __expander_style : guint);
+function  show_stub(var a : TGtkCTree) : guint;
+procedure set_show_stub(var a : TGtkCTree; __show_stub : guint);
+
+  const
+     bm_TGtkCTreeRow_is_leaf = $1;
+     bp_TGtkCTreeRow_is_leaf = 0;
+     bm_TGtkCTreeRow_expanded = $2;
+     bp_TGtkCTreeRow_expanded = 1;
+function  is_leaf(var a : TGtkCTreeRow) : guint;
+procedure set_is_leaf(var a : TGtkCTreeRow; __is_leaf : guint);
+function  expanded(var a : TGtkCTreeRow) : guint;
+procedure set_expanded(var a : TGtkCTreeRow; __expanded : guint);
+
+function  GTK_CTREE_ROW(_node_ : PGList) : PGtkCTreeRow;
+function  GTK_CTREE_NODE(_node_ : PGList) : PGtkCTreeNode;
+function  GTK_CTREE_NODE_NEXT(_nnode_ : PGList) : PGtkCTreeNode;
+function  GTK_CTREE_NODE_PREV(_pnode_ : PGList) : PGtkCTreeNode;
+function  GTK_CTREE_FUNC(_func_ : pointer) : TGtkCTreeFunc;
+
+type
+  GTK_CTREE=PGtkCTree;
+  GTK_CTREE_CLASS=PGtkCTreeClass;
+
+function  GTK_CTREE_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_ctree_get_type';
+function  GTK_IS_CTREE(obj:pointer):boolean;
+function  GTK_IS_CTREE_CLASS(klass:pointer):boolean;
+
+function  gtk_ctree_get_type:TGtkType;cdecl;external gtkdll name 'gtk_ctree_get_type';
+procedure gtk_ctree_construct(ctree:PGtkCTree; columns:gint; tree_column:gint; titles:Pgchar);cdecl;external gtkdll name 'gtk_ctree_construct';
+function  gtk_ctree_new_with_titles(columns:gint; tree_column:gint; titles:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_ctree_new_with_titles';
+function  gtk_ctree_new(columns:gint; tree_column:gint):PGtkWidget;cdecl;external gtkdll name 'gtk_ctree_new';
+function  gtk_ctree_insert_node(ctree:PGtkCTree; parent:PGtkCTreeNode; sibling:PGtkCTreeNode; text:Pgchar; spacing:guint8; pixmap_closed:PGdkPixmap; mask_closed:PGdkBitmap; pixmap_opened:PGdkPixmap; mask_opened:PGdkBitmap; is_leaf:gboolean; expanded:gboolean):PGtkCTreeNode;cdecl;external gtkdll name 'gtk_ctree_insert_node';
+procedure gtk_ctree_remove_node(ctree:PGtkCTree; node:PGtkCTreeNode);cdecl;external gtkdll name 'gtk_ctree_remove_node';
+function  gtk_ctree_insert_gnode(ctree:PGtkCTree; parent:PGtkCTreeNode; sibling:PGtkCTreeNode; gnode:PGNode; func:TGtkCTreeGNodeFunc; data:gpointer):PGtkCTreeNode;cdecl;external gtkdll name 'gtk_ctree_insert_gnode';
+function  gtk_ctree_export_to_gnode(ctree:PGtkCTree; parent:PGNode; sibling:PGNode; node:PGtkCTreeNode; func:TGtkCTreeGNodeFunc; data:gpointer):PGNode;cdecl;external gtkdll name 'gtk_ctree_export_to_gnode';
+procedure gtk_ctree_post_recursive(ctree:PGtkCTree; node:PGtkCTreeNode; func:TGtkCTreeFunc; data:gpointer);cdecl;external gtkdll name 'gtk_ctree_post_recursive';
+procedure gtk_ctree_post_recursive_to_depth(ctree:PGtkCTree; node:PGtkCTreeNode; depth:gint; func:TGtkCTreeFunc; data:gpointer);cdecl;external gtkdll name 'gtk_ctree_post_recursive_to_depth';
+procedure gtk_ctree_pre_recursive(ctree:PGtkCTree; node:PGtkCTreeNode; func:TGtkCTreeFunc; data:gpointer);cdecl;external gtkdll name 'gtk_ctree_pre_recursive';
+procedure gtk_ctree_pre_recursive_to_depth(ctree:PGtkCTree; node:PGtkCTreeNode; depth:gint; func:TGtkCTreeFunc; data:gpointer);cdecl;external gtkdll name 'gtk_ctree_pre_recursive_to_depth';
+function  gtk_ctree_is_viewable(ctree:PGtkCTree; node:PGtkCTreeNode):gboolean;cdecl;external gtkdll name 'gtk_ctree_is_viewable';
+function  gtk_ctree_last(ctree:PGtkCTree; node:PGtkCTreeNode):PGtkCTreeNode;cdecl;external gtkdll name 'gtk_ctree_last';
+function  gtk_ctree_find_node_ptr(ctree:PGtkCTree; ctree_row:PGtkCTreeRow):PGtkCTreeNode;cdecl;external gtkdll name 'gtk_ctree_find_node_ptr';
+function  gtk_ctree_node_nth(ctree:PGtkCTree; row:guint):PGtkCTreeNode;cdecl;external gtkdll name 'gtk_ctree_node_nth';
+function  gtk_ctree_find(ctree:PGtkCTree; node:PGtkCTreeNode; child:PGtkCTreeNode):gboolean;cdecl;external gtkdll name 'gtk_ctree_find';
+function  gtk_ctree_is_ancestor(ctree:PGtkCTree; node:PGtkCTreeNode; child:PGtkCTreeNode):gboolean;cdecl;external gtkdll name 'gtk_ctree_is_ancestor';
+function  gtk_ctree_find_by_row_data(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer):PGtkCTreeNode;cdecl;external gtkdll name 'gtk_ctree_find_by_row_data';
+{$ifndef gtkwin}
+function  gtk_ctree_find_all_by_row_data(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer):PGList;cdecl;external gtkdll name 'gtk_ctree_find_all_by_row_data';
+function  gtk_ctree_find_by_row_data_custom(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer; func:TGCompareFunc):PGtkCTreeNode;cdecl;external gtkdll name 'gtk_ctree_find_by_row_data_custom';
+function  gtk_ctree_find_all_by_row_data_custom(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer; func:TGCompareFunc):PGList;cdecl;external gtkdll name 'gtk_ctree_find_all_by_row_data_custom';
+{$endif}
+function  gtk_ctree_is_hot_spot(ctree:PGtkCTree; x:gint; y:gint):gboolean;cdecl;external gtkdll name 'gtk_ctree_is_hot_spot';
+procedure gtk_ctree_node_set_text(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; text:Pgchar);cdecl;external gtkdll name 'gtk_ctree_node_set_text';
+procedure gtk_ctree_node_set_pixmap(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; pixmap:PGdkPixmap; mask:PGdkBitmap);cdecl;external gtkdll name 'gtk_ctree_node_set_pixmap';
+procedure gtk_ctree_node_set_pixtext(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; text:Pgchar; spacing:guint8; pixmap:PGdkPixmap; mask:PGdkBitmap);cdecl;external gtkdll name 'gtk_ctree_node_set_pixtext';
+procedure gtk_ctree_set_node_info(ctree:PGtkCTree; node:PGtkCTreeNode; text:Pgchar; spacing:guint8; pixmap_closed:PGdkPixmap; mask_closed:PGdkBitmap; pixmap_opened:PGdkPixmap; mask_opened:PGdkBitmap; is_leaf:gboolean; expanded:gboolean);cdecl;external gtkdll name 'gtk_ctree_set_node_info';
+procedure gtk_ctree_node_set_shift(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; vertical:gint; horizontal:gint);cdecl;external gtkdll name 'gtk_ctree_node_set_shift';
+function  gtk_ctree_node_get_selectable(ctree:PGtkCTree; node:PGtkCTreeNode):gboolean;cdecl;external gtkdll name 'gtk_ctree_node_get_selectable';
+function  gtk_ctree_node_get_cell_type(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint):TGtkCellType;cdecl;external gtkdll name 'gtk_ctree_node_get_cell_type';
+function  gtk_ctree_node_get_text(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; text:PPgchar):gint;cdecl;external gtkdll name 'gtk_ctree_node_get_text';
+function  gtk_ctree_node_get_pixmap(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; pixmap:PPGdkPixmap; mask:PPGdkBitmap):gint;cdecl;external gtkdll name 'gtk_ctree_node_get_pixmap';
+function  gtk_ctree_node_get_pixtext(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; text:PPgchar; spacing:Pguint8; pixmap:PPGdkPixmap; mask:PPGdkBitmap):gint;cdecl;external gtkdll name 'gtk_ctree_node_get_pixtext';
+function  gtk_ctree_get_node_info(ctree:PGtkCTree; node:PGtkCTreeNode; text:PPgchar; spacing:Pguint8; pixmap_closed:PPGdkPixmap; mask_closed:PPGdkBitmap; pixmap_opened:PPGdkPixmap; mask_opened:PPGdkBitmap; is_leaf:Pgboolean; expanded:Pgboolean):gint;cdecl;external gtkdll name 'gtk_ctree_get_node_info';
+procedure gtk_ctree_node_set_row_style(ctree:PGtkCTree; node:PGtkCTreeNode; style:PGtkStyle);cdecl;external gtkdll name 'gtk_ctree_node_set_row_style';
+function  gtk_ctree_node_get_row_style(ctree:PGtkCTree; node:PGtkCTreeNode):PGtkStyle;cdecl;external gtkdll name 'gtk_ctree_node_get_row_style';
+procedure gtk_ctree_node_set_cell_style(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; style:PGtkStyle);cdecl;external gtkdll name 'gtk_ctree_node_set_cell_style';
+function  gtk_ctree_node_get_cell_style(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint):PGtkStyle;cdecl;external gtkdll name 'gtk_ctree_node_get_cell_style';
+procedure gtk_ctree_node_set_foreground(ctree:PGtkCTree; node:PGtkCTreeNode; color:PGdkColor);cdecl;external gtkdll name 'gtk_ctree_node_set_foreground';
+procedure gtk_ctree_node_set_background(ctree:PGtkCTree; node:PGtkCTreeNode; color:PGdkColor);cdecl;external gtkdll name 'gtk_ctree_node_set_background';
+procedure gtk_ctree_node_set_row_data(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer);cdecl;external gtkdll name 'gtk_ctree_node_set_row_data';
+procedure gtk_ctree_node_set_row_data_full(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer; destroy:TGtkDestroyNotify);cdecl;external gtkdll name 'gtk_ctree_node_set_row_data_full';
+function  gtk_ctree_node_get_row_data(ctree:PGtkCTree; node:PGtkCTreeNode):gpointer;cdecl;external gtkdll name 'gtk_ctree_node_get_row_data';
+procedure gtk_ctree_node_moveto(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; row_align:gfloat; col_align:gfloat);cdecl;external gtkdll name 'gtk_ctree_node_moveto';
+function  gtk_ctree_node_is_visible(ctree:PGtkCTree; node:PGtkCTreeNode):TGtkVisibility;cdecl;external gtkdll name 'gtk_ctree_node_is_visible';
+procedure gtk_ctree_set_indent(ctree:PGtkCTree; indent:gint);cdecl;external gtkdll name 'gtk_ctree_set_indent';
+procedure gtk_ctree_set_spacing(ctree:PGtkCTree; spacing:gint);cdecl;external gtkdll name 'gtk_ctree_set_spacing';
+{$ifndef gtkwin}
+procedure gtk_ctree_set_show_stub(ctree:PGtkCTree; show_stub:gboolean);cdecl;external gtkdll name 'gtk_ctree_set_show_stub';
+{$endif}
+procedure gtk_ctree_set_line_style(ctree:PGtkCTree; line_style:TGtkCTreeLineStyle);cdecl;external gtkdll name 'gtk_ctree_set_line_style';
+procedure gtk_ctree_set_expander_style(ctree:PGtkCTree; expander_style:TGtkCTreeExpanderStyle);cdecl;external gtkdll name 'gtk_ctree_set_expander_style';
+procedure gtk_ctree_set_drag_compare_func(ctree:PGtkCTree; cmp_func:TGtkCTreeCompareDragFunc);cdecl;external gtkdll name 'gtk_ctree_set_drag_compare_func';
+procedure gtk_ctree_sort_node(ctree:PGtkCTree; node:PGtkCTreeNode);cdecl;external gtkdll name 'gtk_ctree_sort_node';
+procedure gtk_ctree_sort_recursive(ctree:PGtkCTree; node:PGtkCTreeNode);cdecl;external gtkdll name 'gtk_ctree_sort_recursive';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_CTREE_ROW(_node_ : PGList) : PGtkCTreeRow;
+    begin
+       GTK_CTREE_ROW:=PGtkCTreeRow((PGList(_node_))^.data);
+    end;
+
+function  GTK_CTREE_NODE(_node_ : PGList) : PGtkCTreeNode;
+    begin
+       GTK_CTREE_NODE:=PGtkCTreeNode(_node_);
+    end;
+
+function  GTK_CTREE_NODE_NEXT(_nnode_ : PGList) : PGtkCTreeNode;
+    begin
+       GTK_CTREE_NODE_NEXT:=PGtkCTreeNode((PGList(_nnode_))^.next);
+    end;
+
+function  GTK_CTREE_NODE_PREV(_pnode_ : PGList) : PGtkCTreeNode;
+    begin
+       GTK_CTREE_NODE_PREV:=PGtkCTreeNode((PGList(_pnode_))^.prev);
+    end;
+
+function  GTK_CTREE_FUNC(_func_ : pointer) : TGtkCTreeFunc;
+    begin
+       GTK_CTREE_FUNC:=TGtkCTreeFunc(_func_);
+    end;
+
+function  line_style(var a : TGtkCTree) : guint;
+    begin
+       line_style:=(a.flag0 and bm_TGtkCTree_line_style) shr bp_TGtkCTree_line_style;
+    end;
+
+procedure set_line_style(var a : TGtkCTree; __line_style : guint);
+    begin
+       a.flag0:=a.flag0 or ((__line_style shl bp_TGtkCTree_line_style) and bm_TGtkCTree_line_style);
+    end;
+
+function  expander_style(var a : TGtkCTree) : guint;
+    begin
+       expander_style:=(a.flag0 and bm_TGtkCTree_expander_style) shr bp_TGtkCTree_expander_style;
+    end;
+
+procedure set_expander_style(var a : TGtkCTree; __expander_style : guint);
+    begin
+       a.flag0:=a.flag0 or ((__expander_style shl bp_TGtkCTree_expander_style) and bm_TGtkCTree_expander_style);
+    end;
+
+function  show_stub(var a : TGtkCTree) : guint;
+    begin
+       show_stub:=(a.flag0 and bm_TGtkCTree_show_stub) shr bp_TGtkCTree_show_stub;
+    end;
+
+procedure set_show_stub(var a : TGtkCTree; __show_stub : guint);
+    begin
+       a.flag0:=a.flag0 or ((__show_stub shl bp_TGtkCTree_show_stub) and bm_TGtkCTree_show_stub);
+    end;
+
+function  is_leaf(var a : TGtkCTreeRow) : guint;
+    begin
+       is_leaf:=(a.flag0 and bm_TGtkCTreeRow_is_leaf) shr bp_TGtkCTreeRow_is_leaf;
+    end;
+
+procedure set_is_leaf(var a : TGtkCTreeRow; __is_leaf : guint);
+    begin
+       a.flag0:=a.flag0 or ((__is_leaf shl bp_TGtkCTreeRow_is_leaf) and bm_TGtkCTreeRow_is_leaf);
+    end;
+
+function  expanded(var a : TGtkCTreeRow) : guint;
+    begin
+       expanded:=(a.flag0 and bm_TGtkCTreeRow_expanded) shr bp_TGtkCTreeRow_expanded;
+    end;
+
+procedure set_expanded(var a : TGtkCTreeRow; __expanded : guint);
+    begin
+       a.flag0:=a.flag0 or ((__expanded shl bp_TGtkCTreeRow_expanded) and bm_TGtkCTreeRow_expanded);
+    end;
+
+function  GTK_IS_CTREE(obj:pointer):boolean;
+begin
+  GTK_IS_CTREE:=(obj<>nil) and GTK_IS_CTREE_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_CTREE_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_CTREE_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_CTREE_TYPE);
+end;
+
+{$endif read_implementation}
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.6  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.5  1999/07/23 16:12:10  peter
+    * use packrecords C
+
+  Revision 1.4  1999/05/11 00:38:22  peter
+    * win32 fixes
+
+  Revision 1.3  1999/05/10 15:19:09  peter
+    * cdecl fixes
+
+  Revision 1.2  1999/05/10 09:03:05  peter
+    * gtk 1.2 port working
+
+  Revision 1.1  1999/05/07 17:40:18  peter
+    * more updates
+
+}
+

+ 127 - 0
packages/gtk/gtk/gtkcurve.pp

@@ -0,0 +1,127 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     Tgfloatarray = Array[0..1] of gfloat;
+     PgfloatArray = ^TgfloatArray;
+
+     PGtkCurve = ^TGtkCurve;
+     TGtkCurve = record
+          graph : TGtkDrawingArea;
+          cursor_type : gint;
+          min_x : gfloat;
+          max_x : gfloat;
+          min_y : gfloat;
+          max_y : gfloat;
+          pixmap : PGdkPixmap;
+          curve_type : TGtkCurveType;
+          height : gint;
+          grab_point : gint;
+          last : gint;
+          num_points : gint;
+          point : PGdkPoint;
+          num_ctlpoints : gint;
+          ctlpoint : PgfloatArray;
+       end;
+
+     PGtkCurveClass = ^TGtkCurveClass;
+     TGtkCurveClass = record
+          parent_class : TGtkDrawingAreaClass;
+          curve_type_changed : procedure (curve:PGtkCurve); cdecl;
+       end;
+
+Type
+  GTK_CURVE=PGtkCurve;
+  GTK_CURVE_CLASS=PGtkCurveClass;
+
+function  GTK_CURVE_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_curve_get_type';
+function  GTK_IS_CURVE(obj:pointer):boolean;
+function  GTK_IS_CURVE_CLASS(klass:pointer):boolean;
+
+function  gtk_curve_get_type:TGtkType;cdecl;external gtkdll name 'gtk_curve_get_type';
+function  gtk_curve_new : PGtkWidget;cdecl;external gtkdll name 'gtk_curve_new';
+procedure gtk_curve_reset(curve:PGtkCurve);cdecl;external gtkdll name 'gtk_curve_reset';
+procedure gtk_curve_set_gamma(curve:PGtkCurve; gamma:gfloat);cdecl;external gtkdll name 'gtk_curve_set_gamma';
+procedure gtk_curve_set_range(curve:PGtkCurve; min_x:gfloat; max_x:gfloat; min_y:gfloat; max_y:gfloat);cdecl;external gtkdll name 'gtk_curve_set_range';
+procedure gtk_curve_get_vector(curve:PGtkCurve; veclen:longint; vector:Pgfloat);cdecl;external gtkdll name 'gtk_curve_get_vector';
+procedure gtk_curve_set_vector(curve:PGtkCurve; veclen:longint; vector:Pgfloat);cdecl;external gtkdll name 'gtk_curve_set_vector';
+procedure gtk_curve_set_curve_type(curve:PGtkCurve; thetype:TGtkCurveType);cdecl;external gtkdll name 'gtk_curve_set_curve_type';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_CURVE(obj:pointer):boolean;
+begin
+  GTK_IS_CURVE:=(obj<>nil) and GTK_IS_CURVE_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_CURVE_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_CURVE_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_CURVE_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.11  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.10  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.9  1999/07/23 16:12:11  peter
+    * use packrecords C
+
+  Revision 1.8  1999/05/11 00:38:23  peter
+    * win32 fixes
+
+  Revision 1.7  1999/05/10 15:19:10  peter
+    * cdecl fixes
+
+  Revision 1.6  1999/05/10 09:03:06  peter
+    * gtk 1.2 port working
+
+  Revision 1.5  1999/05/07 17:40:18  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:09:44  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:19  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 87 - 0
packages/gtk/gtk/gtkdata.pp

@@ -0,0 +1,87 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkData = ^TGtkData;
+       TGtkData = record
+            theobject : TGtkObject;
+         end;
+
+       DisconnectProc  = procedure (data : PGtkdata);cdecl;
+
+       PGtkDataClass = ^TGtkDataClass;
+       TGtkDataClass = record
+            parent_class : TGtkObjectClass;
+            disconnect : disconnectproc;
+         end;
+
+Type
+  GTK_DATA=PGtkData;
+  GTK_DATA_CLASS=PGtkDataClass;
+
+function  GTK_DATA_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_data_get_type';
+function  GTK_IS_DATA(obj:pointer):boolean;
+function  GTK_IS_DATA_CLASS(klass:pointer):boolean;
+
+function  gtk_data_get_type:TGtkType;cdecl;external gtkdll name 'gtk_data_get_type';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_DATA(obj:pointer):boolean;
+begin
+  GTK_IS_DATA:=(obj<>nil) and GTK_IS_DATA_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_DATA_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_DATA_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_DATA_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:12  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:24  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:11  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 15:09:59  peter
+    * more fixes
+
+  Revision 1.4  1998/11/09 10:09:45  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:20  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 102 - 0
packages/gtk/gtk/gtkdialog.pp

@@ -0,0 +1,102 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkDialog = ^TGtkDialog;
+     TGtkDialog = record
+          window : TGtkWindow;
+          vbox : PGtkWidget;
+          action_area : PGtkWidget;
+       end;
+
+     PGtkDialogClass = ^TGtkDialogClass;
+     TGtkDialogClass = record
+          parent_class : TGtkWindowClass;
+       end;
+
+Type
+  GTK_DIALOG=PGtkDialog;
+  GTK_DIALOG_CLASS=PGtkDialogClass;
+
+function  GTK_DIALOG_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_dialog_get_type';
+function  GTK_IS_DIALOG(obj:pointer):boolean;
+function  GTK_IS_DIALOG_CLASS(klass:pointer):boolean;
+
+function  gtk_dialog_get_type:TGtkType;cdecl;external gtkdll name 'gtk_dialog_get_type';
+function  gtk_dialog_new : PGtkWidget;cdecl;external gtkdll name 'gtk_dialog_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_DIALOG(obj:pointer):boolean;
+begin
+  GTK_IS_DIALOG:=(obj<>nil) and GTK_IS_DIALOG_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_DIALOG_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_DIALOG_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_DIALOG_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:13  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:25  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:12  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 17:40:19  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:09:46  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:21  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 88 - 0
packages/gtk/gtk/gtkdnd.pp

@@ -0,0 +1,88 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     TGtkDestDefaults = (GTK_DEST_DEFAULT_MOTION := 1 shl 0,GTK_DEST_DEFAULT_HIGHLIGHT := 1 shl 1,
+       GTK_DEST_DEFAULT_DROP := 1 shl 2,GTK_DEST_DEFAULT_ALL := $07
+       );
+
+     TGtkTargetFlags = (GTK_TARGET_SAME_APP := 1 shl 0,GTK_TARGET_SAME_WIDGET := 1 shl 1
+       );
+
+procedure gtk_drag_get_data(widget:PGtkWidget; context:PGdkDragContext; target:TGdkAtom; time:guint32);cdecl;external gtkdll name 'gtk_drag_get_data';
+procedure gtk_drag_finish(context:PGdkDragContext; success:gboolean; del:gboolean; time:guint32);cdecl;external gtkdll name 'gtk_drag_finish';
+function  gtk_drag_get_source_widget(context:PGdkDragContext):PGtkWidget;cdecl;external gtkdll name 'gtk_drag_get_source_widget';
+procedure gtk_drag_highlight(widget:PGtkWidget);cdecl;external gtkdll name 'gtk_drag_highlight';
+procedure gtk_drag_unhighlight(widget:PGtkWidget);cdecl;external gtkdll name 'gtk_drag_unhighlight';
+procedure gtk_drag_dest_set(widget:PGtkWidget; flags:TGtkDestDefaults; targets:PGtkTargetEntry; n_targets:gint; actions:TGdkDragAction);cdecl;external gtkdll name 'gtk_drag_dest_set';
+procedure gtk_drag_dest_set_proxy(widget:PGtkWidget; proxy_window:PGdkWindow; protocol:TGdkDragProtocol; use_coordinates:gboolean);cdecl;external gtkdll name 'gtk_drag_dest_set_proxy';
+procedure gtk_drag_dest_unset(widget:PGtkWidget);cdecl;external gtkdll name 'gtk_drag_dest_unset';
+procedure gtk_drag_source_set(widget:PGtkWidget; start_button_mask:TGdkModifierType; targets:PGtkTargetEntry; n_targets:gint; actions:TGdkDragAction);cdecl;external gtkdll name 'gtk_drag_source_set';
+{$ifndef win32}
+procedure gtk_drag_source_unset(widget:PGtkWidget);cdecl;external gtkdll name 'gtk_drag_source_unset';
+{$endif}
+procedure gtk_drag_source_set_icon(widget:PGtkWidget; colormap:PGdkColormap; pixmap:PGdkPixmap; mask:PGdkBitmap);cdecl;external gtkdll name 'gtk_drag_source_set_icon';
+function  gtk_drag_begin(widget:PGtkWidget; targets:PGtkTargetList; actions:TGdkDragAction; button:gint; event:PGdkEvent):PGdkDragContext;cdecl;external gtkdll name 'gtk_drag_begin';
+procedure gtk_drag_set_icon_widget(context:PGdkDragContext; widget:PGtkWidget; hot_x:gint; hot_y:gint);cdecl;external gtkdll name 'gtk_drag_set_icon_widget';
+procedure gtk_drag_set_icon_pixmap(context:PGdkDragContext; colormap:PGdkColormap; pixmap:PGdkPixmap; mask:PGdkBitmap; hot_x:gint; hot_y:gint);cdecl;external gtkdll name 'gtk_drag_set_icon_pixmap';
+procedure gtk_drag_set_icon_default(context:PGdkDragContext);cdecl;external gtkdll name 'gtk_drag_set_icon_default';
+procedure gtk_drag_set_default_icon(colormap:PGdkColormap; pixmap:PGdkPixmap; mask:PGdkBitmap; hot_x:gint; hot_y:gint);cdecl;external gtkdll name 'gtk_drag_set_default_icon';
+procedure gtk_drag_source_handle_event(widget:PGtkWidget; event:PGdkEvent);cdecl;external gtkdll name 'gtk_drag_source_handle_event';
+procedure gtk_drag_dest_handle_event(toplevel:PGtkWidget; event:PGdkEvent);cdecl;external gtkdll name 'gtk_drag_dest_handle_event';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.6  1999/10/21 14:31:21  peter
+    * made clear_unset ifndef win32
+
+  Revision 1.5  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.4  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.3  1999/05/11 00:38:26  peter
+    * win32 fixes
+
+  Revision 1.2  1999/05/10 15:19:14  peter
+    * cdecl fixes
+
+  Revision 1.1  1999/05/10 09:13:59  peter
+    + new gtk 1.2 files
+
+}
+

+ 102 - 0
packages/gtk/gtk/gtkdrawingarea.pp

@@ -0,0 +1,102 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkDrawingArea = ^TGtkDrawingArea;
+     TGtkDrawingArea = record
+          widget : TGtkWidget;
+          draw_data : gpointer;
+       end;
+
+     PGtkDrawingAreaClass = ^TGtkDrawingAreaClass;
+     TGtkDrawingAreaClass = record
+          parent_class : TGtkWidgetClass;
+       end;
+
+Type
+  GTK_DRAWING_AREA=PGtkDrawingArea;
+  GTK_DRAWING_AREA_CLASS=PGtkDrawingAreaClass;
+
+function  GTK_DRAWING_AREA_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_drawing_area_get_type';
+function  GTK_IS_DRAWING_AREA(obj:pointer):boolean;
+function  GTK_IS_DRAWING_AREA_CLASS(klass:pointer):boolean;
+
+function  gtk_drawing_area_get_type:TGtkType;cdecl;external gtkdll name 'gtk_drawing_area_get_type';
+function  gtk_drawing_area_new : PGtkWidget;cdecl;external gtkdll name 'gtk_drawing_area_new';
+procedure gtk_drawing_area_size(darea:PGtkDrawingArea; width:gint; height:gint);cdecl;external gtkdll name 'gtk_drawing_area_size';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_DRAWING_AREA(obj:pointer):boolean;
+begin
+  GTK_IS_DRAWING_AREA:=(obj<>nil) and GTK_IS_DRAWING_AREA_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_DRAWING_AREA_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_DRAWING_AREA_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_DRAWING_AREA_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:14  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:27  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:15  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 17:40:20  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:09:47  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:22  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 186 - 0
packages/gtk/gtk/gtkeditable.pp

@@ -0,0 +1,186 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+
+     PGtkEditable = ^TGtkEditable;
+     TGtkEditable = record
+          widget : TGtkWidget;
+          current_pos : guint;
+          selection_start_pos : guint;
+          selection_end_pos : guint;
+          flag0 : word;
+          ic : PGdkIC;
+          ic_attr : PGdkICAttr;
+          clipboard_text : Pgchar;
+       end;
+     TGtkTextfunction = procedure (editable:PGtkEditable; time:guint32); cdecl; cdecl;
+
+  const
+     bm_TGtkEditable_has_selection = $1;
+     bp_TGtkEditable_has_selection = 0;
+     bm_TGtkEditable_editable = $2;
+     bp_TGtkEditable_editable = 1;
+     bm_TGtkEditable_visible = $4;
+     bp_TGtkEditable_visible = 2;
+function  has_selection(var a : TGtkEditable) : guint;
+procedure set_has_selection(var a : TGtkEditable; __has_selection : guint);
+function  editable(var a : TGtkEditable) : guint;
+procedure set_editable(var a : TGtkEditable; __editable : guint);
+function  visible(var a : TGtkEditable) : guint;
+procedure set_visible(var a : TGtkEditable; __visible : guint);
+
+  type
+     PGtkEditableClass = ^TGtkEditableClass;
+     TGtkEditableClass = record
+          parent_class : TGtkWidgetClass;
+          changed : procedure (editable:PGtkEditable);cdecl;
+          insert_text : procedure (editable:PGtkEditable; thetext:Pgchar; length:gint; position:Pgint); cdecl;
+          delete_text : procedure (editable:PGtkEditable; start_pos:gint; end_pos:gint); cdecl;
+          activate : procedure (editable:PGtkEditable);cdecl;
+          set_editable : procedure (editable:PGtkEditable; is_editable:gboolean);cdecl;
+          move_cursor : procedure (editable:PGtkEditable; x:gint; y:gint);cdecl;
+          move_word : procedure (editable:PGtkEditable; n:gint);cdecl;
+          move_page : procedure (editable:PGtkEditable; x:gint; y:gint);cdecl;
+          move_to_row : procedure (editable:PGtkEditable; row:gint);cdecl;
+          move_to_column : procedure (editable:PGtkEditable; row:gint);cdecl;
+          kill_char : procedure (editable:PGtkEditable; direction:gint);cdecl;
+          kill_word : procedure (editable:PGtkEditable; direction:gint);cdecl;
+          kill_line : procedure (editable:PGtkEditable; direction:gint);cdecl;
+          cut_clipboard : procedure (editable:PGtkEditable);cdecl;
+          copy_clipboard : procedure (editable:PGtkEditable);cdecl;
+          paste_clipboard : procedure (editable:PGtkEditable);cdecl;
+          update_text : procedure (editable:PGtkEditable; start_pos:gint; end_pos:gint); cdecl;
+          get_chars : function (editable:PGtkEditable; start_pos:gint; end_pos:gint):Pgchar; cdecl;
+          set_selection : procedure (editable:PGtkEditable; start_pos:gint; end_pos:gint); cdecl;
+          set_position : procedure (editable:PGtkEditable; position:gint);cdecl;
+       end;
+
+Type
+  GTK_EDITABLE=PGtkEditable;
+  GTK_EDITABLE_CLASS=PGtkEditableClass;
+
+function  GTK_EDITABLE_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_editable_get_type';
+function  GTK_IS_EDITABLE(obj:pointer):boolean;
+function  GTK_IS_EDITABLE_CLASS(klass:pointer):boolean;
+
+function  gtk_editable_get_type:TGtkType;cdecl;external gtkdll name 'gtk_editable_get_type';
+procedure gtk_editable_select_region(editable:PGtkEditable; start:gint; theend:gint);cdecl;external gtkdll name 'gtk_editable_select_region';
+procedure gtk_editable_insert_text(editable:PGtkEditable; new_text:Pgchar; new_text_length:gint; position:Pgint);cdecl;external gtkdll name 'gtk_editable_insert_text';
+procedure gtk_editable_delete_text(editable:PGtkEditable; start_pos:gint; end_pos:gint);cdecl;external gtkdll name 'gtk_editable_delete_text';
+function  gtk_editable_get_chars (editable:PGtkEditable; start_pos:gint; end_pos:gint):Pgchar;cdecl;external gtkdll name 'gtk_editable_get_chars';
+procedure gtk_editable_cut_clipboard(editable:PGtkEditable);cdecl;external gtkdll name 'gtk_editable_cut_clipboard';
+procedure gtk_editable_copy_clipboard(editable:PGtkEditable);cdecl;external gtkdll name 'gtk_editable_copy_clipboard';
+procedure gtk_editable_paste_clipboard(editable:PGtkEditable);cdecl;external gtkdll name 'gtk_editable_paste_clipboard';
+procedure gtk_editable_claim_selection(editable:PGtkEditable; claim:gboolean; time:guint32);cdecl;external gtkdll name 'gtk_editable_claim_selection';
+procedure gtk_editable_delete_selection(editable:PGtkEditable);cdecl;external gtkdll name 'gtk_editable_delete_selection';
+procedure gtk_editable_changed(editable:PGtkEditable);cdecl;external gtkdll name 'gtk_editable_changed';
+procedure gtk_editable_set_position(editable:PGtkEditable; position:gint);cdecl;external gtkdll name 'gtk_editable_set_position';
+function  gtk_editable_get_position(editable:PGtkEditable):gint;cdecl;external gtkdll name 'gtk_editable_get_position';
+procedure gtk_editable_set_editable(editable:PGtkEditable; is_editable:gboolean);cdecl;external gtkdll name 'gtk_editable_set_editable';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  has_selection(var a : TGtkEditable) : guint;
+    begin
+       has_selection:=(a.flag0 and bm_TGtkEditable_has_selection) shr bp_TGtkEditable_has_selection;
+    end;
+
+procedure set_has_selection(var a : TGtkEditable; __has_selection : guint);
+    begin
+       a.flag0:=a.flag0 or ((__has_selection shl bp_TGtkEditable_has_selection) and bm_TGtkEditable_has_selection);
+    end;
+
+function  editable(var a : TGtkEditable) : guint;
+    begin
+       editable:=(a.flag0 and bm_TGtkEditable_editable) shr bp_TGtkEditable_editable;
+    end;
+
+procedure set_editable(var a : TGtkEditable; __editable : guint);
+    begin
+       a.flag0:=a.flag0 or ((__editable shl bp_TGtkEditable_editable) and bm_TGtkEditable_editable);
+    end;
+
+function  visible(var a : TGtkEditable) : guint;
+    begin
+       visible:=(a.flag0 and bm_TGtkEditable_visible) shr bp_TGtkEditable_visible;
+    end;
+
+procedure set_visible(var a : TGtkEditable; __visible : guint);
+    begin
+       a.flag0:=a.flag0 or ((__visible shl bp_TGtkEditable_visible) and bm_TGtkEditable_visible);
+    end;
+
+function  GTK_IS_EDITABLE(obj:pointer):boolean;
+begin
+  GTK_IS_EDITABLE:=(obj<>nil) and GTK_IS_EDITABLE_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_EDITABLE_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_EDITABLE_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_EDITABLE_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:15  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:28  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:16  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/10 09:03:07  peter
+    * gtk 1.2 port working
+
+  Revision 1.4  1998/11/09 10:09:48  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:24  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 169 - 0
packages/gtk/gtk/gtkentry.pp

@@ -0,0 +1,169 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkEntry = ^TGtkEntry;
+     TGtkEntry = record
+          editable : TGtkEditable;
+          text_area : PGdkWindow;
+          backing_pixmap : PGdkPixmap;
+          cursor : PGdkCursor;
+          text : PGdkWChar;
+          text_size : guint16;
+          text_length : guint16;
+          text_max_length : guint16;
+          scroll_offset : gint;
+          flag0 : word;
+          timer : guint32;
+          button : guint;
+          char_offset : Pgint;
+          text_mb : Pgchar;
+          flag1 : word;
+       end;
+
+  const
+     bm_TGtkEntry_visible = $1;
+     bp_TGtkEntry_visible = 0;
+     bm_TGtkEntry_text_mb_dirty = $1;
+     bp_TGtkEntry_text_mb_dirty = 0;
+     bm_TGtkEntry_use_wchar = $2;
+     bp_TGtkEntry_use_wchar = 1;
+function  visible(var a : TGtkEntry) : guint;
+procedure set_visible(var a : TGtkEntry; __visible : guint);
+function  text_mb_dirty(var a : TGtkEntry) : guint;
+procedure set_text_mb_dirty(var a : TGtkEntry; __text_mb_dirty : guint);
+function  use_wchar(var a : TGtkEntry) : guint;
+procedure set_use_wchar(var a : TGtkEntry; __use_wchar : guint);
+
+  type
+     PGtkEntryClass = ^TGtkEntryClass;
+     TGtkEntryClass = record
+          parent_class : TGtkEditableClass;
+       end;
+
+Type
+  GTK_ENTRY=PGtkEntry;
+  GTK_ENTRY_CLASS=PGtkEntryClass;
+
+function  GTK_ENTRY_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_entry_get_type';
+function  GTK_IS_ENTRY(obj:pointer):boolean;
+function  GTK_IS_ENTRY_CLASS(klass:pointer):boolean;
+
+function  gtk_entry_get_type:TGtkType;cdecl;external gtkdll name 'gtk_entry_get_type';
+function  gtk_entry_new :PGtkWidget;cdecl;external gtkdll name 'gtk_entry_new';
+function  gtk_entry_new_with_max_length (max:guint16):PGtkWidget;cdecl;external gtkdll name 'gtk_entry_new_with_max_length';
+procedure gtk_entry_set_text(entry:PGtkEntry; text:Pgchar);cdecl;external gtkdll name 'gtk_entry_set_text';
+procedure gtk_entry_append_text(entry:PGtkEntry; text:Pgchar);cdecl;external gtkdll name 'gtk_entry_append_text';
+procedure gtk_entry_prepend_text(entry:PGtkEntry; text:Pgchar);cdecl;external gtkdll name 'gtk_entry_prepend_text';
+procedure gtk_entry_set_position(entry:PGtkEntry; position:gint);cdecl;external gtkdll name 'gtk_entry_set_position';
+function  gtk_entry_get_text (entry:PGtkEntry):Pgchar;cdecl;external gtkdll name 'gtk_entry_get_text';
+procedure gtk_entry_select_region(entry:PGtkEntry; start:gint; theend:gint);cdecl;external gtkdll name 'gtk_entry_select_region';
+procedure gtk_entry_set_visibility(entry:PGtkEntry; visible:gboolean);cdecl;external gtkdll name 'gtk_entry_set_visibility';
+procedure gtk_entry_set_editable(entry:PGtkEntry; editable:gboolean);cdecl;external gtkdll name 'gtk_entry_set_editable';
+procedure gtk_entry_set_max_length(entry:PGtkEntry; max:guint16);cdecl;external gtkdll name 'gtk_entry_set_max_length';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  visible(var a : TGtkEntry) : guint;
+    begin
+       visible:=(a.flag0 and bm_TGtkEntry_visible) shr bp_TGtkEntry_visible;
+    end;
+
+procedure set_visible(var a : TGtkEntry; __visible : guint);
+    begin
+       a.flag0:=a.flag0 or ((__visible shl bp_TGtkEntry_visible) and bm_TGtkEntry_visible);
+    end;
+
+function  text_mb_dirty(var a : TGtkEntry) : guint;
+    begin
+       text_mb_dirty:=(a.flag1 and bm_TGtkEntry_text_mb_dirty) shr bp_TGtkEntry_text_mb_dirty;
+    end;
+
+procedure set_text_mb_dirty(var a : TGtkEntry; __text_mb_dirty : guint);
+    begin
+       a.flag1:=a.flag1 or ((__text_mb_dirty shl bp_TGtkEntry_text_mb_dirty) and bm_TGtkEntry_text_mb_dirty);
+    end;
+
+function  use_wchar(var a : TGtkEntry) : guint;
+    begin
+       use_wchar:=(a.flag1 and bm_TGtkEntry_use_wchar) shr bp_TGtkEntry_use_wchar;
+    end;
+
+procedure set_use_wchar(var a : TGtkEntry; __use_wchar : guint);
+    begin
+       a.flag1:=a.flag1 or ((__use_wchar shl bp_TGtkEntry_use_wchar) and bm_TGtkEntry_use_wchar);
+    end;
+
+function  GTK_IS_ENTRY(obj:pointer):boolean;
+begin
+  GTK_IS_ENTRY:=(obj<>nil) and GTK_IS_ENTRY_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_ENTRY_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_ENTRY_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_ENTRY_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:16  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:29  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:17  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/10 09:03:08  peter
+    * gtk 1.2 port working
+
+  Revision 1.4  1998/11/09 10:09:49  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:25  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 338 - 0
packages/gtk/gtk/gtkenums.pp

@@ -0,0 +1,338 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+type
+     PGtkArrowType = ^TGtkArrowType;
+     TGtkArrowType = longint;
+const
+     GTK_ARROW_UP = 0;
+     GTK_ARROW_DOWN = 1;
+     GTK_ARROW_LEFT = 2;
+     GTK_ARROW_RIGHT = 3;
+
+type
+     PGtkAttachOptions = ^TGtkAttachOptions;
+     TGtkAttachOptions = longint;
+const
+     GTK_EXPAND = 1 shl 0;
+     GTK_SHRINK = 1 shl 1;
+     GTK_FILL = 1 shl 2;
+
+type
+     PGtkButtonBoxStyle = ^TGtkButtonBoxStyle;
+     TGtkButtonBoxStyle = longint;
+const
+     GTK_BUTTONBOX_DEFAULT_STYLE = 0;
+     GTK_BUTTONBOX_SPREAD = 1;
+     GTK_BUTTONBOX_EDGE = 2;
+     GTK_BUTTONBOX_START = 3;
+     GTK_BUTTONBOX_END =4;
+
+type
+     PGtkCurveType = ^TGtkCurveType;
+     TGtkCurveType = longint;
+const
+     GTK_CURVE_TYPE_LINEAR = 0;
+     GTK_CURVE_TYPE_SPLINE = 1;
+     GTK_CURVE_TYPE_FREE = 2;
+
+type
+     PGtkDirectionType = ^TGtkDirectionType;
+     TGtkDirectionType = longint;
+const
+     GTK_DIR_TAB_FORWARD = 0;
+     GTK_DIR_TAB_BACKWARD = 1;
+     GTK_DIR_UP = 2;
+     GTK_DIR_DOWN = 3;
+     GTK_DIR_LEFT = 4;
+     GTK_DIR_RIGHT = 5;
+
+type
+     PGtkJustification = ^TGtkJustification;
+     TGtkJustification = longint;
+const
+     GTK_JUSTIFY_LEFT = 0;
+     GTK_JUSTIFY_RIGHT = 1;
+     GTK_JUSTIFY_CENTER = 2;
+     GTK_JUSTIFY_FILL = 3;
+
+type
+     PGtkMatchType = ^TGtkMatchType;
+     TGtkMatchType = longint;
+const
+     GTK_MATCH_ALL = 0;
+     GTK_MATCH_ALL_TAIL = 1;
+     GTK_MATCH_HEAD = 2;
+     GTK_MATCH_TAIL = 3;
+     GTK_MATCH_EXACT = 4;
+     GTK_MATCH_LAST = 5;
+
+type
+     PGtkMenuDirectionType = ^TGtkMenuDirectionType;
+     TGtkMenuDirectionType = longint;
+const
+     GTK_MENU_DIR_PARENT = 0;
+     GTK_MENU_DIR_CHILD = 1;
+     GTK_MENU_DIR_NEXT = 2;
+     GTK_MENU_DIR_PREV = 3;
+
+type
+     PGtkMenuFactoryType = ^TGtkMenuFactoryType;
+     TGtkMenuFactoryType = longint;
+const
+     GTK_MENU_FACTORY_MENU = 0;
+     GTK_MENU_FACTORY_MENU_BAR = 1;
+     GTK_MENU_FACTORY_OPTION_MENU = 2;
+
+type
+     PGtkMetricType = ^TGtkMetricType;
+     TGtkMetricType = longint;
+const
+     GTK_PIXELS = 0;
+     GTK_INCHES = 1;
+     GTK_CENTIMETERS = 2;
+
+type
+     PGtkOrientation = ^TGtkOrientation;
+     TGtkOrientation = longint;
+const
+     GTK_ORIENTATION_HORIZONTAL = 0;
+     GTK_ORIENTATION_VERTICAL = 1;
+
+type
+     PGtkCornerType = ^TGtkCornerType;
+     TGtkCornerType = longint;
+const
+     GTK_CORNER_TOP_LEFT = 0;
+     GTK_CORNER_BOTTOM_LEFT = 1;
+     GTK_CORNER_TOP_RIGHT = 2;
+     GTK_CORNER_BOTTOM_RIGHT =3;
+
+type
+     PGtkPackType = ^TGtkPackType;
+     TGtkPackType = longint;
+const
+     GTK_PACK_START = 0;
+     GTK_PACK_END = 1;
+
+type
+     PGtkPathPriorityType = ^TGtkPathPriorityType;
+     TGtkPathPriorityType = longint;
+const
+     GTK_PATH_PRIO_LOWEST = 0;
+     GTK_PATH_PRIO_GTK = 4;
+     GTK_PATH_PRIO_APPLICATION = 8;
+     GTK_PATH_PRIO_RC = 12;
+     GTK_PATH_PRIO_HIGHEST = 15;
+     GTK_PATH_PRIO_MASK = GTK_PATH_PRIO_HIGHEST;
+
+type
+     PGtkPathType = ^TGtkPathType;
+     TGtkPathType = longint;
+const
+     GTK_PATH_WIDGET = 0;
+     GTK_PATH_WIDGET_CLASS = 1;
+     GTK_PATH_CLASS = 2;
+
+type
+     PGtkPolicyType = ^TGtkPolicyType;
+     TGtkPolicyType = longint;
+const
+     GTK_POLICY_ALWAYS = 0;
+     GTK_POLICY_AUTOMATIC = 1;
+     GTK_POLICY_NEVER = 2;
+
+type
+     PGtkPositionType = ^TGtkPositionType;
+     TGtkPositionType = longint;
+const
+     GTK_POS_LEFT = 0;
+     GTK_POS_RIGHT = 1;
+     GTK_POS_TOP = 2;
+     GTK_POS_BOTTOM = 3;
+
+type
+     PGtkPreviewType = ^TGtkPreviewType;
+     TGtkPreviewType = longint;
+const
+     GTK_PREVIEW_COLOR = 0;
+     GTK_PREVIEW_GRAYSCALE = 1;
+
+type
+     PGtkReliefStyle = ^TGtkReliefStyle;
+     TGtkReliefStyle = longint;
+const
+     GTK_RELIEF_NORMAL = 0;
+     GTK_RELIEF_HALF = 1;
+     GTK_RELIEF_NONE = 2;
+
+type
+     PGtkResizeMode = ^TGtkResizeMode;
+     TGtkResizeMode = longint;
+const
+     GTK_RESIZE_PARENT = 0;
+     GTK_RESIZE_QUEUE = 1;
+     GTK_RESIZE_IMMEDIATE = 2;
+
+type
+     PGtkSignalRunType = ^TGtkSignalRunType;
+     TGtkSignalRunType = longint;
+const
+     GTK_RUN_FIRST = 1 shl 0;
+     GTK_RUN_LAST = 1 shl 1;
+     GTK_RUN_BOTH = 3;
+     GTK_RUN_NO_RECURSE = 1 shl 2;
+     GTK_RUN_ACTION = 1 shl 3;
+     GTK_RUN_NO_HOOKS = 1 shl 4;
+
+type
+     PGtkScrollType = ^TGtkScrollType;
+     TGtkScrollType = longint;
+const
+     GTK_SCROLL_NONE = 0;
+     GTK_SCROLL_STEP_BACKWARD = 1;
+     GTK_SCROLL_STEP_FORWARD = 2;
+     GTK_SCROLL_PAGE_BACKWARD = 3;
+     GTK_SCROLL_PAGE_FORWARD = 4;
+     GTK_SCROLL_JUMP = 5;
+
+type
+     PGtkSelectionMode = ^TGtkSelectionMode;
+     TGtkSelectionMode = longint;
+const
+     GTK_SELECTION_SINGLE = 0;
+     GTK_SELECTION_BROWSE = 1;
+     GTK_SELECTION_MULTIPLE = 2;
+     GTK_SELECTION_EXTENDED = 3;
+
+type
+     PGtkShadowType = ^TGtkShadowType;
+     TGtkShadowType = longint;
+const
+     GTK_SHADOW_NONE = 0;
+     GTK_SHADOW_IN = 1;
+     GTK_SHADOW_OUT = 2;
+     GTK_SHADOW_ETCHED_IN = 3;
+     GTK_SHADOW_ETCHED_OUT = 4;
+
+type
+     PGtkStateType = ^TGtkStateType;
+     TGtkStateType = longint;
+const
+     GTK_STATE_NORMAL = 0;
+     GTK_STATE_ACTIVE = 1;
+     GTK_STATE_PRELIGHT = 2;
+     GTK_STATE_SELECTED = 3;
+     GTK_STATE_INSENSITIVE = 4;
+
+type
+     PGtkSubmenuDirection = ^TGtkSubmenuDirection;
+     TGtkSubmenuDirection = longint;
+const
+     GTK_DIRECTION_LEFT = 0;
+     GTK_DIRECTION_RIGHT = 1;
+
+type
+     PGtkSubmenuPlacement = ^TGtkSubmenuPlacement;
+     TGtkSubmenuPlacement = longint;
+const
+     GTK_TOP_BOTTOM = 0;
+     GTK_LEFT_RIGHT = 1;
+
+type
+     PGtkToolbarStyle = ^TGtkToolbarStyle;
+     TGtkToolbarStyle = longint;
+const
+     GTK_TOOLBAR_ICONS = 0;
+     GTK_TOOLBAR_TEXT = 1;
+     GTK_TOOLBAR_BOTH = 2;
+
+type
+     PGtkTroughType = ^TGtkTroughType;
+     TGtkTroughType = longint;
+const
+     GTK_TROUGH_NONE = 0;
+     GTK_TROUGH_START = 1;
+     GTK_TROUGH_END = 2;
+     GTK_TROUGH_JUMP = 3;
+
+type
+     PGtkUpdateType = ^TGtkUpdateType;
+     TGtkUpdateType = longint;
+const
+     GTK_UPDATE_CONTINUOUS = 0;
+     GTK_UPDATE_DISCONTINUOUS = 1;
+     GTK_UPDATE_DELAYED = 2;
+
+type
+     PGtkVisibility = ^TGtkVisibility;
+     TGtkVisibility = longint;
+const
+     GTK_VISIBILITY_NONE = 0;
+     GTK_VISIBILITY_PARTIAL = 1;
+     GTK_VISIBILITY_FULL = 2;
+
+type
+     PGtkWindowPosition = ^TGtkWindowPosition;
+     TGtkWindowPosition = longint;
+const
+     GTK_WIN_POS_NONE = 0;
+     GTK_WIN_POS_CENTER = 1;
+     GTK_WIN_POS_MOUSE = 2;
+
+type
+     PGtkWindowType = ^TGtkWindowType;
+     TGtkWindowType = longint;
+const
+     GTK_WINDOW_TOPLEVEL = 0;
+     GTK_WINDOW_DIALOG = 1;
+     GTK_WINDOW_POPUP = 2;
+
+type
+     PGtkSortType = ^TGtkSortType;
+     TGtkSortType = longint;
+const
+     GTK_SORT_ASCENDING = 0;
+     GTK_SORT_DESCENDING = 1;
+
+{$endif read_interface}
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/06/29 23:46:52  peter
+    * changed enums to constants
+
+  Revision 1.7  1999/05/10 15:19:19  peter
+    * cdecl fixes
+
+  Revision 1.6  1999/05/10 09:03:09  peter
+    * gtk 1.2 port working
+
+  Revision 1.5  1999/05/07 15:10:00  peter
+    * more fixes
+
+  Revision 1.4  1999/05/07 10:40:35  peter
+    * first things for 1.2
+
+  Revision 1.3  1998/10/21 20:22:26  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+
+

+ 100 - 0
packages/gtk/gtk/gtkeventbox.pp

@@ -0,0 +1,100 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkEventBox = ^TGtkEventBox;
+     TGtkEventBox = record
+          bin : TGtkBin;
+       end;
+
+     PGtkEventBoxClass = ^TGtkEventBoxClass;
+     TGtkEventBoxClass = record
+          parent_class : TGtkBinClass;
+       end;
+
+Type
+  GTK_EVENT_BOX=PGtkEventBox;
+  GTK_EVENT_BOX_CLASS=PGtkEventBoxClass;
+
+function  GTK_EVENT_BOX_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_event_box_get_type';
+function  GTK_IS_EVENT_BOX(obj:pointer):boolean;
+function  GTK_IS_EVENT_BOX_CLASS(klass:pointer):boolean;
+
+function  gtk_event_box_get_type:TGtkType;cdecl;external gtkdll name 'gtk_event_box_get_type';
+function  gtk_event_box_new : PGtkWidget;cdecl;external gtkdll name 'gtk_event_box_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_EVENT_BOX(obj:pointer):boolean;
+begin
+  GTK_IS_EVENT_BOX:=(obj<>nil) and GTK_IS_EVENT_BOX_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_EVENT_BOX_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_EVENT_BOX_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_EVENT_BOX_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:17  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:31  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:20  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 17:40:21  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:09:50  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:27  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 58 - 0
packages/gtk/gtk/gtkfeatures.pp

@@ -0,0 +1,58 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  const
+     GTK_MAJOR_VERSION_CONST = 1;
+     GTK_MINOR_VERSION_CONST = 2;
+     GTK_MICRO_VERSION_CONST = 5;
+     GTK_BINARY_AGE_CONST = 2;
+     GTK_INTERFACE_AGE_CONST = 0;
+
+function  GTK_CHECK_VERSION(major,minor,micro:longint):boolean;
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_CHECK_VERSION(major,minor,micro:longint):boolean;
+begin
+  GTK_CHECK_VERSION:=(GTK_MAJOR_VERSION_CONST>major) or
+     ((GTK_MAJOR_VERSION_CONST=major) and (GTK_MINOR_VERSION_CONST>minor)) or
+     ((GTK_MAJOR_VERSION_CONST=major) and (GTK_MINOR_VERSION_CONST=minor) and (GTK_MICRO_VERSION_CONST>=micro));
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.4  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.3  1999/05/10 15:19:21  peter
+    * cdecl fixes
+
+  Revision 1.2  1999/05/10 09:03:11  peter
+    * gtk 1.2 port working
+
+  Revision 1.1  1999/05/07 10:40:36  peter
+    * first things for 1.2
+
+}
+

+ 127 - 0
packages/gtk/gtk/gtkfilesel.pp

@@ -0,0 +1,127 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkFileSelection = ^TGtkFileSelection;
+     TGtkFileSelection = record
+          window : TGtkWindow;
+          dir_list : PGtkWidget;
+          file_list : PGtkWidget;
+          selection_entry : PGtkWidget;
+          selection_text : PGtkWidget;
+          main_vbox : PGtkWidget;
+          ok_button : PGtkWidget;
+          cancel_button : PGtkWidget;
+          help_button : PGtkWidget;
+          history_pulldown : PGtkWidget;
+          history_menu : PGtkWidget;
+          history_list : PGList;
+          fileop_dialog : PGtkWidget;
+          fileop_entry : PGtkWidget;
+          fileop_file : ^gchar;
+          cmpl_state : gpointer;
+          fileop_c_dir : PGtkWidget;
+          fileop_del_file : PGtkWidget;
+          fileop_ren_file : PGtkWidget;
+          button_area : PGtkWidget;
+          action_area : PGtkWidget;
+       end;
+
+     PGtkFileSelectionClass = ^TGtkFileSelectionClass;
+     TGtkFileSelectionClass = record
+          parent_class : TGtkWindowClass;
+       end;
+
+Type
+  GTK_FILE_SELECTION=PGtkFileSelection;
+  GTK_FILE_SELECTION_CLASS=PGtkFileSelectionClass;
+
+function  GTK_FILE_SELECTION_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_file_selection_get_type';
+function  GTK_IS_FILE_SELECTION(obj:pointer):boolean;
+function  GTK_IS_FILE_SELECTION_CLASS(klass:pointer):boolean;
+
+function  gtk_file_selection_get_type:TGtkType;cdecl;external gtkdll name 'gtk_file_selection_get_type';
+function  gtk_file_selection_new (title:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_file_selection_new';
+procedure gtk_file_selection_set_filename(filesel:PGtkFileSelection; filename:Pgchar);cdecl;external gtkdll name 'gtk_file_selection_set_filename';
+function  gtk_file_selection_get_filename (filesel:PGtkFileSelection):Pgchar;cdecl;external gtkdll name 'gtk_file_selection_get_filename';
+{$ifndef gtkwin}
+procedure gtk_file_selection_complete(filesel:PGtkFileSelection; pattern:Pgchar);cdecl;external gtkdll name 'gtk_file_selection_complete';
+{$endif}
+procedure gtk_file_selection_show_fileop_buttons(filesel:PGtkFileSelection);cdecl;external gtkdll name 'gtk_file_selection_show_fileop_buttons';
+procedure gtk_file_selection_hide_fileop_buttons(filesel:PGtkFileSelection);cdecl;external gtkdll name 'gtk_file_selection_hide_fileop_buttons';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_FILE_SELECTION(obj:pointer):boolean;
+begin
+  GTK_IS_FILE_SELECTION:=(obj<>nil) and GTK_IS_FILE_SELECTION_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_FILE_SELECTION_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_FILE_SELECTION_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_FILE_SELECTION_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:18  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:32  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:22  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/10 09:03:12  peter
+    * gtk 1.2 port working
+
+  Revision 1.4  1998/11/09 10:09:51  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:28  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 110 - 0
packages/gtk/gtk/gtkfixed.pp

@@ -0,0 +1,110 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkFixed = ^TGtkFixed;
+     TGtkFixed = record
+          container : TGtkContainer;
+          children : PGList;
+       end;
+
+     PGtkFixedClass = ^TGtkFixedClass;
+     TGtkFixedClass = record
+          parent_class : TGtkContainerClass;
+       end;
+
+     PGtkFixedChild = ^TGtkFixedChild;
+     TGtkFixedChild = record
+          widget : PGtkWidget;
+          x : gint16;
+          y : gint16;
+       end;
+
+Type
+  GTK_FIXED=PGtkFixed;
+  GTK_FIXED_CLASS=PGtkFixedClass;
+
+function  GTK_FIXED_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_fixed_get_type';
+function  GTK_IS_FIXED(obj:pointer):boolean;
+function  GTK_IS_FIXED_CLASS(klass:pointer):boolean;
+
+function  gtk_fixed_get_type:TGtkType;cdecl;external gtkdll name 'gtk_fixed_get_type';
+function  gtk_fixed_new : PGtkWidget;cdecl;external gtkdll name 'gtk_fixed_new';
+procedure gtk_fixed_put(fixed:PGtkFixed; widget:PGtkWidget; x:gint16; y:gint16);cdecl;external gtkdll name 'gtk_fixed_put';
+procedure gtk_fixed_move(fixed:PGtkFixed; widget:PGtkWidget; x:gint16; y:gint16);cdecl;external gtkdll name 'gtk_fixed_move';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_FIXED(obj:pointer):boolean;
+begin
+  GTK_IS_FIXED:=(obj<>nil) and GTK_IS_FIXED_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_FIXED_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_FIXED_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_FIXED_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:19  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:33  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:23  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 17:40:22  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:09:52  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:29  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 177 - 0
packages/gtk/gtk/gtkfontsel.pp

@@ -0,0 +1,177 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  const
+     GTK_NUM_FONT_PROPERTIES = 6;
+     GTK_NUM_STYLE_PROPERTIES = 5;
+     GTK_NUM_FONT_FILTERS = 2;
+
+  type
+     TGtkFontMetricType = (GTK_FONT_METRIC_PIXELS,GTK_FONT_METRIC_POINTS);
+
+     TGtkFontType = (GTK_FONT_BITMAP := 1 shl 0,GTK_FONT_SCALABLE := 1 shl 1,
+       GTK_FONT_SCALABLE_BITMAP := 1 shl 2,GTK_FONT_ALL := $07);
+
+     TGtkFontFilterType = (GTK_FONT_FILTER_BASE,GTK_FONT_FILTER_USER);
+
+     PGtkFontFilter = ^TGtkFontFilter;
+     TGtkFontFilter = record
+          font_type : gint;
+          property_filters : array[0..(GTK_NUM_FONT_PROPERTIES)-1] of Pguint16;
+          property_nfilters : array[0..(GTK_NUM_FONT_PROPERTIES)-1] of guint16;
+       end;
+
+     PGtkFontSelection = ^TGtkFontSelection;
+     TGtkFontSelection = record
+          notebook : TGtkNotebook;
+          main_vbox : PGtkWidget;
+          font_label : PGtkWidget;
+          font_entry : PGtkWidget;
+          font_clist : PGtkWidget;
+          font_style_entry : PGtkWidget;
+          font_style_clist : PGtkWidget;
+          size_entry : PGtkWidget;
+          size_clist : PGtkWidget;
+          pixels_button : PGtkWidget;
+          points_button : PGtkWidget;
+          filter_button : PGtkWidget;
+          preview_entry : PGtkWidget;
+          message_label : PGtkWidget;
+          info_vbox : PGtkWidget;
+          info_clist : PGtkWidget;
+          requested_font_name : PGtkWidget;
+          actual_font_name : PGtkWidget;
+          filter_vbox : PGtkWidget;
+          type_bitmaps_button : PGtkWidget;
+          type_scalable_button : PGtkWidget;
+          type_scaled_bitmaps_button : PGtkWidget;
+          filter_clists : array[0..(GTK_NUM_FONT_PROPERTIES)-1] of PGtkWidget;
+          font : PGdkFont;
+          font_index : gint;
+          style : gint;
+          metric : TGtkFontMetricType;
+          size : gint;
+          selected_size : gint;
+          property_values : array[0..(GTK_NUM_STYLE_PROPERTIES)-1] of guint16;
+          filters : array[0..(GTK_NUM_FONT_FILTERS)-1] of TGtkFontFilter;
+       end;
+
+     PGtkFontSelectionClass = ^TGtkFontSelectionClass;
+     TGtkFontSelectionClass = record
+          parent_class : TGtkNotebookClass;
+       end;
+
+     PGtkFontSelectionDialog = ^TGtkFontSelectionDialog;
+     TGtkFontSelectionDialog = record
+          window : TGtkWindow;
+          fontsel : PGtkWidget;
+          main_vbox : PGtkWidget;
+          action_area : PGtkWidget;
+          ok_button : PGtkWidget;
+          apply_button : PGtkWidget;
+          cancel_button : PGtkWidget;
+          dialog_width : gint;
+          auto_resize : gboolean;
+       end;
+
+     PGtkFontSelectionDialogClass = ^TGtkFontSelectionDialogClass;
+     TGtkFontSelectionDialogClass = record
+          parent_class : TGtkWindowClass;
+       end;
+
+type
+  GTK_FONT_SELECTION=PGtkFontSelection;
+  GTK_FONT_SELECTION_CLASS=PGtkFontSelectionClass;
+
+function  GTK_FONT_SELECTION_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_font_selection_get_type';
+function  GTK_IS_FONT_SELECTION(obj:pointer):boolean;
+function  GTK_IS_FONT_SELECTION_CLASS(klass:pointer):boolean;
+
+function  gtk_font_selection_get_type:TGtkType;cdecl;external gtkdll name 'gtk_font_selection_get_type';
+function  gtk_font_selection_new:PGtkWidget;cdecl;external gtkdll name 'gtk_font_selection_new';
+function  gtk_font_selection_get_font_name(fontsel:PGtkFontSelection):Pgchar;cdecl;external gtkdll name 'gtk_font_selection_get_font_name';
+function  gtk_font_selection_get_font(fontsel:PGtkFontSelection):PGdkFont;cdecl;external gtkdll name 'gtk_font_selection_get_font';
+function  gtk_font_selection_set_font_name(fontsel:PGtkFontSelection; fontname:Pgchar):gboolean;cdecl;external gtkdll name 'gtk_font_selection_set_font_name';
+procedure gtk_font_selection_set_filter(fontsel:PGtkFontSelection; filter_type:TGtkFontFilterType; font_type:TGtkFontType; foundries:PPgchar; weights:PPgchar; slants:PPgchar; setwidths:PPgchar; spacings:PPgchar; charsets:PPgchar);cdecl;external gtkdll name 'gtk_font_selection_set_filter';
+function  gtk_font_selection_get_preview_text(fontsel:PGtkFontSelection):Pgchar;cdecl;external gtkdll name 'gtk_font_selection_get_preview_text';
+procedure gtk_font_selection_set_preview_text(fontsel:PGtkFontSelection; text:Pgchar);cdecl;external gtkdll name 'gtk_font_selection_set_preview_text';
+
+type
+  GTK_FONT_SELECTION_DIALOG=PGtkFontSelectionDialog;
+  GTK_FONT_SELECTION_DIALOG_CLASS=PGtkFontSelectionDialogClass;
+
+function  GTK_FONT_SELECTION_DIALOG_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_font_selection_dialog_get_type';
+function  GTK_IS_FONT_SELECTION_DIALOG(obj:pointer):boolean;
+function  GTK_IS_FONT_SELECTION_DIALOG_CLASS(klass:pointer):boolean;
+
+function  gtk_font_selection_dialog_get_type:TGtkType;cdecl;external gtkdll name 'gtk_font_selection_dialog_get_type';
+function  gtk_font_selection_dialog_new(title:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_font_selection_dialog_new';
+function  gtk_font_selection_dialog_get_font_name(fsd:PGtkFontSelectionDialog):Pgchar;cdecl;external gtkdll name 'gtk_font_selection_dialog_get_font_name';
+function  gtk_font_selection_dialog_get_font(fsd:PGtkFontSelectionDialog):PGdkFont;cdecl;external gtkdll name 'gtk_font_selection_dialog_get_font';
+function  gtk_font_selection_dialog_set_font_name(fsd:PGtkFontSelectionDialog; fontname:Pgchar):gboolean;cdecl;external gtkdll name 'gtk_font_selection_dialog_set_font_name';
+procedure gtk_font_selection_dialog_set_filter(fsd:PGtkFontSelectionDialog; filter_type:TGtkFontFilterType; font_type:TGtkFontType; foundries:PPgchar; weights:PPgchar; slants:PPgchar; setwidths:PPgchar; spacings:PPgchar; charsets:PPgchar);cdecl;external gtkdll name 'gtk_font_selection_dialog_set_filter';
+function  gtk_font_selection_dialog_get_preview_text(fsd:PGtkFontSelectionDialog):Pgchar;cdecl;external gtkdll name 'gtk_font_selection_dialog_get_preview_text';
+procedure gtk_font_selection_dialog_set_preview_text(fsd:PGtkFontSelectionDialog; text:Pgchar);cdecl;external gtkdll name 'gtk_font_selection_dialog_set_preview_text';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_FONT_SELECTION(obj:pointer):boolean;
+begin
+  GTK_IS_FONT_SELECTION:=(obj<>nil) and GTK_IS_FONT_SELECTION_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_FONT_SELECTION_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_FONT_SELECTION_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_FONT_SELECTION_TYPE);
+end;
+
+function  GTK_IS_FONT_SELECTION_DIALOG(obj:pointer):boolean;
+begin
+  GTK_IS_FONT_SELECTION_DIALOG:=(obj<>nil) and GTK_IS_FONT_SELECTION_DIALOG_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_FONT_SELECTION_DIALOG_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_FONT_SELECTION_DIALOG_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_FONT_SELECTION_DIALOG_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.5  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.4  1999/07/23 16:12:20  peter
+    * use packrecords C
+
+  Revision 1.3  1999/05/11 00:38:34  peter
+    * win32 fixes
+
+  Revision 1.2  1999/05/10 15:19:24  peter
+    * cdecl fixes
+
+  Revision 1.1  1999/05/10 09:13:59  peter
+    + new gtk 1.2 files
+
+}
+

+ 109 - 0
packages/gtk/gtk/gtkframe.pp

@@ -0,0 +1,109 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkFrame = ^TGtkFrame;
+       TGtkFrame = record
+            bin : TGtkBin;
+            thelabel : Pgchar;
+            shadow_type : gint16;
+            label_width : gint16;
+            label_height : gint16;
+            label_xalign : gfloat;
+            label_yalign : gfloat;
+         end;
+
+       PGtkFrameClass = ^TGtkFrameClass;
+       TGtkFrameClass = record
+            parent_class : TGtkBinClass;
+         end;
+
+Type
+  GTK_FRAME=PGtkFrame;
+  GTK_FRAME_CLASS=PGtkFrameClass;
+
+function  GTK_FRAME_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_frame_get_type';
+function  GTK_IS_FRAME(obj:pointer):boolean;
+function  GTK_IS_FRAME_CLASS(klass:pointer):boolean;
+
+function  gtk_frame_get_type:TGtkType;cdecl;external gtkdll name 'gtk_frame_get_type';
+function  gtk_frame_new (thelabel:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_frame_new';
+procedure gtk_frame_set_label(frame:PGtkFrame; thelabel:Pgchar);cdecl;external gtkdll name 'gtk_frame_set_label';
+procedure gtk_frame_set_label_align(frame:PGtkFrame; xalign:gfloat; yalign:gfloat);cdecl;external gtkdll name 'gtk_frame_set_label_align';
+procedure gtk_frame_set_shadow_type(frame:PGtkFrame; thetype:TGtkShadowType);cdecl;external gtkdll name 'gtk_frame_set_shadow_type';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_FRAME(obj:pointer):boolean;
+begin
+  GTK_IS_FRAME:=(obj<>nil) and GTK_IS_FRAME_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_FRAME_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_FRAME_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_FRAME_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:21  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:35  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:25  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 17:40:23  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:09:53  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:30  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 106 - 0
packages/gtk/gtk/gtkgamma.pp

@@ -0,0 +1,106 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkGammaCurve = ^TGtkGammaCurve;
+     TGtkGammaCurve = record
+          vbox : TGtkVBox;
+          table : PGtkWidget;
+          curve : PGtkWidget;
+          button : array[0..4] of PGtkWidget;
+          gamma : gfloat;
+          gamma_dialog : PGtkWidget;
+          gamma_text : PGtkWidget;
+       end;
+
+     PGtkGammaCurveClass = ^TGtkGammaCurveClass;
+     TGtkGammaCurveClass = record
+          parent_class : TGtkVBoxClass;
+       end;
+
+type
+  GTK_GAMMA_CURVE=PGtkGammaCurve;
+  GTK_GAMMA_CURVE_CLASS=PGtkGammaCurveClass;
+
+function  GTK_GAMMA_CURVE_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_gamma_curve_get_type';
+function  GTK_IS_GAMMA_CURVE(obj:pointer):boolean;
+function  GTK_IS_GAMMA_CURVE_CLASS(klass:pointer):boolean;
+
+function  gtk_gamma_curve_get_type:TGtkType;cdecl;external gtkdll name 'gtk_gamma_curve_get_type';
+function  gtk_gamma_curve_new :PGtkWidget;cdecl;external gtkdll name 'gtk_gamma_curve_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_GAMMA_CURVE(obj:pointer):boolean;
+begin
+  GTK_IS_GAMMA_CURVE:=(obj<>nil) and GTK_IS_GAMMA_CURVE_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_GAMMA_CURVE_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_GAMMA_CURVE_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_GAMMA_CURVE_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:22  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:36  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:26  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 17:40:24  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:09:54  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:31  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 64 - 0
packages/gtk/gtk/gtkgc.pp

@@ -0,0 +1,64 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+function  gtk_gc_get (depth:gint; colormap:PGdkColormap; values:PGdkGCValues; values_mask:TGdkGCValuesMask): PGdkGC;cdecl;external gtkdll name 'gtk_gc_get';
+procedure gtk_gc_release(gc:PGdkGC);cdecl;external gtkdll name 'gtk_gc_release';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.8  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.7  1999/10/06 17:42:48  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.6  1999/05/11 00:38:37  peter
+    * win32 fixes
+
+  Revision 1.5  1999/05/10 15:19:27  peter
+    * cdecl fixes
+
+  Revision 1.4  1999/05/10 09:03:14  peter
+    * gtk 1.2 port working
+
+  Revision 1.3  1998/10/21 20:22:32  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 202 - 0
packages/gtk/gtk/gtkhandlebox.pp

@@ -0,0 +1,202 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkHandleBox = ^TGtkHandleBox;
+     TGtkHandleBox = record
+          bin : TGtkBin;
+          bin_window : PGdkWindow;
+          float_window : PGdkWindow;
+          shadow_type : TGtkShadowType;
+          flag0 : word;
+          deskoff_x : gint;
+          deskoff_y : gint;
+          attach_allocation : TGtkAllocation;
+          float_allocation : TGtkAllocation;
+       end;
+
+  const
+     bm_TGtkHandleBox_handle_position = $3;
+     bp_TGtkHandleBox_handle_position = 0;
+     bm_TGtkHandleBox_float_window_mapped = $4;
+     bp_TGtkHandleBox_float_window_mapped = 2;
+     bm_TGtkHandleBox_child_detached = $8;
+     bp_TGtkHandleBox_child_detached = 3;
+     bm_TGtkHandleBox_in_drag = $10;
+     bp_TGtkHandleBox_in_drag = 4;
+     bm_TGtkHandleBox_shrink_on_detach = $20;
+     bp_TGtkHandleBox_shrink_on_detach = 5;
+     bm_TGtkHandleBox_snap_edge = $1C0;
+     bp_TGtkHandleBox_snap_edge = 6;
+function  handle_position(var a : TGtkHandleBox) : guint;
+procedure set_handle_position(var a : TGtkHandleBox; __handle_position : guint);
+function  float_window_mapped(var a : TGtkHandleBox) : guint;
+procedure set_float_window_mapped(var a : TGtkHandleBox; __float_window_mapped : guint);
+function  child_detached(var a : TGtkHandleBox) : guint;
+procedure set_child_detached(var a : TGtkHandleBox; __child_detached : guint);
+function  in_drag(var a : TGtkHandleBox) : guint;
+procedure set_in_drag(var a : TGtkHandleBox; __in_drag : guint);
+function  shrink_on_detach(var a : TGtkHandleBox) : guint;
+procedure set_shrink_on_detach(var a : TGtkHandleBox; __shrink_on_detach : guint);
+function  snap_edge(var a : TGtkHandleBox) : gint;
+procedure set_snap_edge(var a : TGtkHandleBox; __snap_edge : gint);
+
+  type
+     PGtkHandleBoxClass = ^TGtkHandleBoxClass;
+     TGtkHandleBoxClass = record
+          parent_class : TGtkBinClass;
+          child_attached : procedure (handle_box:PGtkHandleBox; child:PGtkWidget); cdecl;
+          child_detached : procedure (handle_box:PGtkHandleBox; child:PGtkWidget); cdecl;
+       end;
+
+Type
+  GTK_HANDLE_BOX=PGtkHandleBox;
+  GTK_HANDLE_BOX_CLASS=PGtkHandleBoxClass;
+
+function  GTK_HANDLE_BOX_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_handle_box_get_type';
+function  GTK_IS_HANDLE_BOX(obj:pointer):boolean;
+function  GTK_IS_HANDLE_BOX_CLASS(klass:pointer):boolean;
+
+function  gtk_handle_box_get_type:TGtkType;cdecl;external gtkdll name 'gtk_handle_box_get_type';
+function  gtk_handle_box_new : PGtkWidget;cdecl;external gtkdll name 'gtk_handle_box_new';
+{$ifndef gtkwin}
+procedure gtk_handle_box_set_shadow_type(handle_box:PGtkHandleBox; thetype:TGtkShadowType);cdecl;external gtkdll name 'gtk_handle_box_set_shadow_type';
+procedure gtk_handle_box_set_handle_position(handle_box:PGtkHandleBox; position:TGtkPositionType);cdecl;external gtkdll name 'gtk_handle_box_set_handle_position';
+procedure gtk_handle_box_set_snap_edge(handle_box:PGtkHandleBox; edge:TGtkPositionType);cdecl;external gtkdll name 'gtk_handle_box_set_snap_edge';
+{$endif}
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  handle_position(var a : TGtkHandleBox) : guint;
+    begin
+       handle_position:=(a.flag0 and bm_TGtkHandleBox_handle_position) shr bp_TGtkHandleBox_handle_position;
+    end;
+
+procedure set_handle_position(var a : TGtkHandleBox; __handle_position : guint);
+    begin
+       a.flag0:=a.flag0 or ((__handle_position shl bp_TGtkHandleBox_handle_position) and bm_TGtkHandleBox_handle_position);
+    end;
+
+function  float_window_mapped(var a : TGtkHandleBox) : guint;
+    begin
+       float_window_mapped:=(a.flag0 and bm_TGtkHandleBox_float_window_mapped) shr bp_TGtkHandleBox_float_window_mapped;
+    end;
+
+procedure set_float_window_mapped(var a : TGtkHandleBox; __float_window_mapped : guint);
+    begin
+       a.flag0:=a.flag0 or ((__float_window_mapped shl bp_TGtkHandleBox_float_window_mapped) and bm_TGtkHandleBox_float_window_mapped);
+    end;
+
+function  child_detached(var a : TGtkHandleBox) : guint;
+    begin
+       child_detached:=(a.flag0 and bm_TGtkHandleBox_child_detached) shr bp_TGtkHandleBox_child_detached;
+    end;
+
+procedure set_child_detached(var a : TGtkHandleBox; __child_detached : guint);
+    begin
+       a.flag0:=a.flag0 or ((__child_detached shl bp_TGtkHandleBox_child_detached) and bm_TGtkHandleBox_child_detached);
+    end;
+
+function  in_drag(var a : TGtkHandleBox) : guint;
+    begin
+       in_drag:=(a.flag0 and bm_TGtkHandleBox_in_drag) shr bp_TGtkHandleBox_in_drag;
+    end;
+
+procedure set_in_drag(var a : TGtkHandleBox; __in_drag : guint);
+    begin
+       a.flag0:=a.flag0 or ((__in_drag shl bp_TGtkHandleBox_in_drag) and bm_TGtkHandleBox_in_drag);
+    end;
+
+function  shrink_on_detach(var a : TGtkHandleBox) : guint;
+    begin
+       shrink_on_detach:=(a.flag0 and bm_TGtkHandleBox_shrink_on_detach) shr bp_TGtkHandleBox_shrink_on_detach;
+    end;
+
+procedure set_shrink_on_detach(var a : TGtkHandleBox; __shrink_on_detach : guint);
+    begin
+       a.flag0:=a.flag0 or ((__shrink_on_detach shl bp_TGtkHandleBox_shrink_on_detach) and bm_TGtkHandleBox_shrink_on_detach);
+    end;
+
+function  snap_edge(var a : TGtkHandleBox) : gint;
+    begin
+       snap_edge:=(a.flag0 and bm_TGtkHandleBox_snap_edge) shr bp_TGtkHandleBox_snap_edge;
+    end;
+
+procedure set_snap_edge(var a : TGtkHandleBox; __snap_edge : gint);
+    begin
+       a.flag0:=a.flag0 or ((__snap_edge shl bp_TGtkHandleBox_snap_edge) and bm_TGtkHandleBox_snap_edge);
+    end;
+
+function  GTK_IS_HANDLE_BOX(obj:pointer):boolean;
+begin
+  GTK_IS_HANDLE_BOX:=(obj<>nil) and GTK_IS_HANDLE_BOX_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_HANDLE_BOX_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_HANDLE_BOX_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_HANDLE_BOX_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:23  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:38  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:28  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/10 09:03:15  peter
+    * gtk 1.2 port working
+
+  Revision 1.4  1998/11/09 10:09:55  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:33  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 104 - 0
packages/gtk/gtk/gtkhbbox.pp

@@ -0,0 +1,104 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkHButtonBox = ^TGtkHButtonBox;
+     TGtkHButtonBox = record
+          button_box : TGtkButtonBox;
+       end;
+
+     PGtkHButtonBoxClass = ^TGtkHButtonBoxClass;
+     TGtkHButtonBoxClass = record
+          parent_class : TGtkButtonBoxClass;
+       end;
+
+Type
+  GTK_HBUTTON_BOX=PGtkHButtonBox;
+  GTK_HBUTTON_BOX_CLASS=PGtkHButtonBoxClass;
+
+function  GTK_HBUTTON_BOX_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_hbutton_box_get_type';
+function  GTK_IS_HBUTTON_BOX(obj:pointer):boolean;
+function  GTK_IS_HBUTTON_BOX_CLASS(klass:pointer):boolean;
+
+function  gtk_hbutton_box_get_type:TGtkType;cdecl;external gtkdll name 'gtk_hbutton_box_get_type';
+function  gtk_hbutton_box_new :PGtkWidget;cdecl;external gtkdll name 'gtk_hbutton_box_new';
+function  gtk_hbutton_box_get_spacing_default:gint;cdecl;external gtkdll name 'gtk_hbutton_box_get_spacing_default';
+function  gtk_hbutton_box_get_layout_default:TGtkButtonBoxStyle;cdecl;external gtkdll name 'gtk_hbutton_box_get_layout_default';
+procedure gtk_hbutton_box_set_spacing_default(spacing:gint);cdecl;external gtkdll name 'gtk_hbutton_box_set_spacing_default';
+procedure gtk_hbutton_box_set_layout_default(layout:TGtkButtonBoxStyle);cdecl;external gtkdll name 'gtk_hbutton_box_set_layout_default';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_HBUTTON_BOX(obj:pointer):boolean;
+begin
+  GTK_IS_HBUTTON_BOX:=(obj<>nil) and GTK_IS_HBUTTON_BOX_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_HBUTTON_BOX_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_HBUTTON_BOX_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_HBUTTON_BOX_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:24  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:39  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:29  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 15:10:01  peter
+    * more fixes
+
+  Revision 1.4  1998/11/09 10:09:56  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:34  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 85 - 0
packages/gtk/gtk/gtkhbox.pp

@@ -0,0 +1,85 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkHBox = ^TGtkHBox;
+     TGtkHBox = record
+          box : TGtkBox;
+       end;
+
+     PGtkHBoxClass = ^TGtkHBoxClass;
+     TGtkHBoxClass = record
+          parent_class : TGtkBoxClass;
+       end;
+
+Type
+  GTK_HBOX=PGtkHBox;
+  GTK_HBOX_CLASS=PGtkHBoxClass;
+
+function  GTK_HBOX_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_hbox_get_type';
+function  GTK_IS_HBOX(obj:pointer):boolean;
+function  GTK_IS_HBOX_CLASS(klass:pointer):boolean;
+
+function  gtk_hbox_get_type:TGtkType;cdecl;external gtkdll name 'gtk_hbox_get_type';
+function  gtk_hbox_new(homogeneous:gboolean; spacing:gint):PGtkWidget;cdecl;external gtkdll name 'gtk_hbox_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_HBOX(obj:pointer):boolean;
+begin
+  GTK_IS_HBOX:=(obj<>nil) and GTK_IS_HBOX_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_HBOX_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_HBOX_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_HBOX_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:25  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:40  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:31  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 15:10:03  peter
+    * more fixes
+
+  Revision 1.4  1998/11/09 10:09:57  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:35  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 100 - 0
packages/gtk/gtk/gtkhpaned.pp

@@ -0,0 +1,100 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkHPaned = ^TGtkHPaned;
+     TGtkHPaned = record
+          paned : TGtkPaned;
+       end;
+
+     PGtkHPanedClass = ^TGtkHPanedClass;
+     TGtkHPanedClass = record
+          parent_class : TGtkPanedClass;
+       end;
+
+Type
+  GTK_HPANED=PGtkHPaned;
+  GTK_HPANED_CLASS=PGtkHPanedClass;
+
+function  GTK_HPANED_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_hpaned_get_type';
+function  GTK_IS_HPANED(obj:pointer):boolean;
+function  GTK_IS_HPANED_CLASS(klass:pointer):boolean;
+
+function  gtk_hpaned_get_type:TGtkType;cdecl;external gtkdll name 'gtk_hpaned_get_type';
+function  gtk_hpaned_new : PGtkWidget;cdecl;external gtkdll name 'gtk_hpaned_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_HPANED(obj:pointer):boolean;
+begin
+  GTK_IS_HPANED:=(obj<>nil) and GTK_IS_HPANED_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_HPANED_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_HPANED_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_HPANED_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:26  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:41  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:32  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 15:10:04  peter
+    * more fixes
+
+  Revision 1.4  1998/11/09 10:09:58  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:36  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 85 - 0
packages/gtk/gtk/gtkhruler.pp

@@ -0,0 +1,85 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkHRuler = ^TGtkHRuler;
+     TGtkHRuler = record
+          ruler : TGtkRuler;
+       end;
+
+     PGtkHRulerClass = ^TGtkHRulerClass;
+     TGtkHRulerClass = record
+          parent_class : TGtkRulerClass;
+       end;
+
+Type
+  GTK_HRULER=PGtkHRuler;
+  GTK_HRULER_CLASS=PGtkHRulerClass;
+
+function  GTK_HRULER_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_hruler_get_type';
+function  GTK_IS_HRULER(obj:pointer):boolean;
+function  GTK_IS_HRULER_CLASS(klass:pointer):boolean;
+
+function  gtk_hruler_get_type:TGtkType;cdecl;external gtkdll name 'gtk_hruler_get_type';
+function  gtk_hruler_new:PGtkWidget;cdecl;external gtkdll name 'gtk_hruler_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_HRULER(obj:pointer):boolean;
+begin
+  GTK_IS_HRULER:=(obj<>nil) and GTK_IS_HRULER_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_HRULER_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_HRULER_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_HRULER_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:27  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:42  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:33  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 15:10:05  peter
+    * more fixes
+
+  Revision 1.4  1998/11/09 10:09:59  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:37  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 85 - 0
packages/gtk/gtk/gtkhscale.pp

@@ -0,0 +1,85 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkHScale = ^TGtkHScale;
+     TGtkHScale = record
+          scale : TGtkScale;
+       end;
+
+     PGtkHScaleClass = ^TGtkHScaleClass;
+     TGtkHScaleClass = record
+          parent_class : TGtkScaleClass;
+       end;
+
+Type
+  GTK_HSCALE=PGtkHScale;
+  GTK_HSCALE_CLASS=PGtkHScaleClass;
+
+function  GTK_HSCALE_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_hscale_get_type';
+function  GTK_IS_HSCALE(obj:pointer):boolean;
+function  GTK_IS_HSCALE_CLASS(klass:pointer):boolean;
+
+function  gtk_hscale_get_type:TGtkType;cdecl;external gtkdll name 'gtk_hscale_get_type';
+function  gtk_hscale_new(adjustment:PGtkAdjustment):PGtkWidget;cdecl;external gtkdll name 'gtk_hscale_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_HSCALE(obj:pointer):boolean;
+begin
+  GTK_IS_HSCALE:=(obj<>nil) and GTK_IS_HSCALE_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_HSCALE_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_HSCALE_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_HSCALE_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:28  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:43  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:34  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 15:10:06  peter
+    * more fixes
+
+  Revision 1.4  1998/11/09 10:10:00  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:38  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 100 - 0
packages/gtk/gtk/gtkhscrollbar.pp

@@ -0,0 +1,100 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkHScrollbar = ^TGtkHScrollbar;
+       TGtkHScrollbar = record
+            scrollbar : TGtkScrollbar;
+         end;
+
+       PGtkHScrollbarClass = ^TGtkHScrollbarClass;
+       TGtkHScrollbarClass = record
+            parent_class : TGtkScrollbarClass;
+         end;
+
+Type
+  GTK_HSCROLLBAR=PGtkHScrollbar;
+  GTK_HSCROLLBAR_CLASS=PGtkHScrollbarClass;
+
+function  GTK_HSCROLLBAR_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_hscrollbar_get_type';
+function  GTK_IS_HSCROLLBAR(obj:pointer):boolean;
+function  GTK_IS_HSCROLLBAR_CLASS(klass:pointer):boolean;
+
+function  gtk_hscrollbar_get_type:TGtkType;cdecl;external gtkdll name 'gtk_hscrollbar_get_type';
+function  gtk_hscrollbar_new (adjustment:PGtkAdjustment):PGtkWidget;cdecl;external gtkdll name 'gtk_hscrollbar_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_HSCROLLBAR(obj:pointer):boolean;
+begin
+  GTK_IS_HSCROLLBAR:=(obj<>nil) and GTK_IS_HSCROLLBAR_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_HSCROLLBAR_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_HSCROLLBAR_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_HSCROLLBAR_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.10  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:29  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:44  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:35  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 15:10:07  peter
+    * more fixes
+
+  Revision 1.4  1998/11/09 10:10:01  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:39  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 85 - 0
packages/gtk/gtk/gtkhseparator.pp

@@ -0,0 +1,85 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkHSeparator = ^TGtkHSeparator;
+     TGtkHSeparator = record
+          separator : TGtkSeparator;
+       end;
+
+     PGtkHSeparatorClass = ^TGtkHSeparatorClass;
+     TGtkHSeparatorClass = record
+          parent_class : TGtkSeparatorClass;
+       end;
+
+Type
+  GTK_HSEPARATOR=PGtkHSeparator;
+  GTK_HSEPARATOR_CLASS=PGtkHSeparatorClass;
+
+function  GTK_HSEPARATOR_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_hseparator_get_type';
+function  GTK_IS_HSEPARATOR(obj:pointer):boolean;
+function  GTK_IS_HSEPARATOR_CLASS(klass:pointer):boolean;
+
+function  gtk_hseparator_get_type:TGtkType;cdecl;external gtkdll name 'gtk_hseparator_get_type';
+function  gtk_hseparator_new:PGtkWidget;cdecl;external gtkdll name 'gtk_hseparator_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_HSEPARATOR(obj:pointer):boolean;
+begin
+  GTK_IS_HSEPARATOR:=(obj<>nil) and GTK_IS_HSEPARATOR_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_HSEPARATOR_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_HSEPARATOR_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_HSEPARATOR_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:30  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:45  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:36  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 15:10:08  peter
+    * more fixes
+
+  Revision 1.4  1998/11/09 10:10:02  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:40  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 89 - 0
packages/gtk/gtk/gtkimage.pp

@@ -0,0 +1,89 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkImage = ^TGtkImage;
+     TGtkImage = record
+          misc : TGtkMisc;
+          image : PGdkImage;
+          mask : PGdkBitmap;
+       end;
+
+     PGtkImageClass = ^TGtkImageClass;
+     TGtkImageClass = record
+          parent_class : TGtkMiscClass;
+       end;
+
+Type
+  GTK_IMAGE=PGtkImage;
+  GTK_IMAGE_CLASS=PGtkImageClass;
+
+function  GTK_IMAGE_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_image_get_type';
+function  GTK_IS_IMAGE(obj:pointer):boolean;
+function  GTK_IS_IMAGE_CLASS(klass:pointer):boolean;
+
+function  gtk_image_get_type:TGtkType;cdecl;external gtkdll name 'gtk_image_get_type';
+function  gtk_image_new(val:PGdkImage; mask:PGdkBitmap):PGtkWidget;cdecl;external gtkdll name 'gtk_image_new';
+procedure gtk_image_set(image:PGtkImage; val:PGdkImage; mask:PGdkBitmap);cdecl;external gtkdll name 'gtk_image_set';
+procedure gtk_image_get(image:PGtkImage; val:PPGdkImage; mask:PPGdkBitmap);cdecl;external gtkdll name 'gtk_image_get';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_IMAGE(obj:pointer):boolean;
+begin
+  GTK_IS_IMAGE:=(obj<>nil) and GTK_IS_IMAGE_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_IMAGE_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_IMAGE_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_IMAGE_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:35  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:31  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:46  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:37  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 17:40:25  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:10:03  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:41  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 133 - 0
packages/gtk/gtk/gtkincludes.pp

@@ -0,0 +1,133 @@
+{
+   $Id$
+
+   This file contains all includes needed by gtk.pp
+
+   Note: The order of the files is important !!
+}
+
+{$i gtkfeatures.pp}
+{$i gtkenums.pp}
+{$i gtkobjects.pp}
+{$i gtktypeutils.pp}
+{$i gtkdata.pp}
+{$i gtkadjustment.pp}
+{$i gtkaccelgroup.pp}
+{$i gtkwidget.pp}
+{$i gtkstyle.pp}
+{$i gtkmisc.pp}
+{$i gtklabel.pp}
+{$i gtkprivate.pp}
+{$i gtkaccellabel.pp}
+{$i gtkthemes.pp}
+{$i gtkmain.pp}
+{$i gtkdrawingarea.pp}
+{$i gtkcontainer.pp}
+{$i gtkbin.pp}
+{$i gtksignal.pp}
+{$i gtkitem.pp}
+{$i gtkarg.pp}
+{$i gtkmarshal.pp}
+{$i gtkbindings.pp}
+{$i gtkinvisible.pp}
+{$i gtkalignment.pp}
+{$i gtkwindow.pp}
+{$i gtkplug.pp}
+{$i gtksocket.pp}
+{$i gtkpacker.pp}
+{$i gtklayout.pp}
+{$i gtkframe.pp}
+{$i gtkaspectframe.pp}
+{$i gtkviewport.pp}
+{$i gtkrange.pp}
+{$i gtkrc.pp}
+{$i gtkeditable.pp}
+{$i gtktext.pp}
+{$i gtkarrow.pp}
+{$i gtkpixmap.pp}
+{$i gtkbutton.pp}
+{$i gtktogglebutton.pp}
+{$i gtkcheckbutton.pp}
+{$i gtkmenuitem.pp}
+{$i gtkcheckmenuitem.pp}
+{$i gtktearoffmenuitem.pp}
+{$i gtkcurve.pp}
+{$i gtkdialog.pp}
+{$i gtkentry.pp}
+{$i gtkeventbox.pp}
+{$i gtkfilesel.pp}
+{$i gtkfixed.pp}
+{$i gtkgc.pp}
+{$i gtkhandlebox.pp}
+{$i gtkimage.pp}
+{$i gtkinputdialog.pp}
+{$i gtklist.pp}
+{$i gtklistitem.pp}
+{$i gtkmenushell.pp}
+{$i gtkmenufactory.pp}
+{$i gtkmenu.pp}
+{$i gtkmenubar.pp}
+{$i gtkoptionmenu.pp}
+{$i gtkpreview.pp}
+{$i gtkitemfactory.pp}
+{$i gtkprogress.pp}
+{$i gtkprogressbar.pp}
+{$i gtkradiobutton.pp}
+{$i gtkradiomenuitem.pp}
+{$i gtkscrolledwindow.pp}
+{$i gtkselection.pp}
+{$i gtkdnd.pp}
+{$i gtkspinbutton.pp}
+{$i gtktable.pp}
+{$i gtktipsquery.pp}
+{$i gtktooltips.pp}
+{$i gtktoolbar.pp}
+{$i gtktreeitem.pp}
+{$i gtktree.pp}
+{$i gtkbox.pp}
+{$i gtkhbox.pp}
+{$i gtkvbox.pp}
+{$i gtkbbox.pp}
+{$i gtkhbbox.pp}
+{$i gtkvbbox.pp}
+{$i gtkpaned.pp}
+{$i gtkhpaned.pp}
+{$i gtkvpaned.pp}
+{$i gtkruler.pp}
+{$i gtkhruler.pp}
+{$i gtkvruler.pp}
+{$i gtkscale.pp}
+{$i gtkhscale.pp}
+{$i gtkvscale.pp}
+{$i gtkscrollbar.pp}
+{$i gtkhscrollbar.pp}
+{$i gtkvscrollbar.pp}
+{$i gtkseparator.pp}
+{$i gtkhseparator.pp}
+{$i gtkvseparator.pp}
+{$i gtkcombo.pp}
+{$i gtkstatusbar.pp}
+{$i gtkcolorsel.pp}
+{$i gtkgamma.pp}
+{$i gtkclist.pp}
+{$i gtknotebook.pp}
+{$i gtkctree.pp}
+{$i gtkcalendar.pp}
+{$i gtkfontsel.pp}
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:36  peter
+    * moved to packages dir
+
+  Revision 1.3  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.2  1999/05/10 19:18:29  peter
+    * more fixes for the examples to work
+
+  Revision 1.1  1999/05/10 09:13:59  peter
+    + new gtk 1.2 files
+
+}

+ 96 - 0
packages/gtk/gtk/gtkinputdialog.pp

@@ -0,0 +1,96 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkInputDialog = ^TGtkInputDialog;
+     TGtkInputDialog = record
+          dialog : TGtkDialog;
+          axis_list : PGtkWidget;
+          axis_listbox : PGtkWidget;
+          mode_optionmenu : PGtkWidget;
+          close_button : PGtkWidget;
+          save_button : PGtkWidget;
+          axis_items : array[0..ord(GDK_AXIS_LAST)-1] of PGtkWidget;
+          current_device : guint32;
+          keys_list : PGtkWidget;
+          keys_listbox : PGtkWidget;
+       end;
+
+     PGtkInputDialogClass = ^TGtkInputDialogClass;
+     TGtkInputDialogClass = record
+          parent_class : TGtkWindowClass;
+          enable_device : procedure (inputd:PGtkInputDialog; devid:guint32);cdecl;
+          disable_device : procedure (inputd:PGtkInputDialog; devid:guint32);cdecl;
+       end;
+
+Type
+  GTK_INPUT_DIALOG=PGtkInputDialog;
+  GTK_INPUT_DIALOG_CLASS=PGtkInputDialogClass;
+
+function  GTK_INPUT_DIALOG_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_input_dialog_get_type';
+function  GTK_IS_INPUT_DIALOG(obj:pointer):boolean;
+function  GTK_IS_INPUT_DIALOG_CLASS(klass:pointer):boolean;
+
+function  gtk_input_dialog_get_type:TGtkType;cdecl;external gtkdll name 'gtk_input_dialog_get_type';
+function  gtk_input_dialog_new:PGtkWidget;cdecl;external gtkdll name 'gtk_input_dialog_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_INPUT_DIALOG(obj:pointer):boolean;
+begin
+  GTK_IS_INPUT_DIALOG:=(obj<>nil) and GTK_IS_INPUT_DIALOG_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_INPUT_DIALOG_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_INPUT_DIALOG_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_INPUT_DIALOG_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:36  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:32  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:47  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:38  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/10 09:03:17  peter
+    * gtk 1.2 port working
+
+  Revision 1.4  1998/11/09 10:10:04  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:42  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 77 - 0
packages/gtk/gtk/gtkinvisible.pp

@@ -0,0 +1,77 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkInvisible = ^TGtkInvisible;
+     TGtkInvisible = record
+          bin : TGtkBin;
+       end;
+
+     PGtkInvisibleClass = ^TGtkInvisibleClass;
+     TGtkInvisibleClass = record
+          parent_class : TGtkBinClass;
+       end;
+
+type
+  GTK_INVISIBLE=PGtkInvisible;
+  GTK_INVISIBLE_CLASS=PGtkInvisibleClass;
+
+function  GTK_INVISIBLE_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_invisible_get_type';
+function  GTK_IS_INVISIBLE(obj:pointer):boolean;
+function  GTK_IS_INVISIBLE_CLASS(klass:pointer):boolean;
+
+function  gtk_invisible_get_type:TGtkType;cdecl;external gtkdll name 'gtk_invisible_get_type';
+function  gtk_invisible_new:PGtkWidget;cdecl;external gtkdll name 'gtk_invisible_new';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_INVISIBLE(obj:pointer):boolean;
+begin
+  GTK_IS_INVISIBLE:=(obj<>nil) and GTK_IS_INVISIBLE_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_INVISIBLE_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_INVISIBLE_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_INVISIBLE_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:36  peter
+    * moved to packages dir
+
+  Revision 1.5  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.4  1999/07/23 16:12:33  peter
+    * use packrecords C
+
+  Revision 1.3  1999/05/11 00:38:48  peter
+    * win32 fixes
+
+  Revision 1.2  1999/05/10 15:19:39  peter
+    * cdecl fixes
+
+  Revision 1.1  1999/05/07 17:40:26  peter
+    * more updates
+
+}
+

+ 90 - 0
packages/gtk/gtk/gtkitem.pp

@@ -0,0 +1,90 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkItem = ^TGtkItem;
+       TGtkItem = record
+            bin : TGtkBin;
+         end;
+
+       PGtkItemClass = ^TGtkItemClass;
+       TGtkItemClass = record
+            parent_class : TGtkBinClass;
+            select : procedure (item:PGtkItem); cdecl;
+            deselect : procedure (item:PGtkItem); cdecl;
+            toggle : procedure (item:PGtkItem); cdecl;
+         end;
+
+Type
+  GTK_ITEM=PGtkItem;
+  GTK_ITEM_CLASS=PGtkItemClass;
+
+function  GTK_ITEM_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_item_get_type';
+function  GTK_IS_ITEM(obj:pointer):boolean;
+function  GTK_IS_ITEM_CLASS(klass:pointer):boolean;
+
+function  gtk_item_get_type:TGtkType;cdecl;external gtkdll name 'gtk_item_get_type';
+procedure gtk_item_select(item:PGtkItem);cdecl;external gtkdll name 'gtk_item_select';
+procedure gtk_item_deselect(item:PGtkItem);cdecl;external gtkdll name 'gtk_item_deselect';
+procedure gtk_item_toggle(item:PGtkItem);cdecl;external gtkdll name 'gtk_item_toggle';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_ITEM(obj:pointer):boolean;
+begin
+  GTK_IS_ITEM:=(obj<>nil) and GTK_IS_ITEM_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_ITEM_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_ITEM_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_ITEM_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:36  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:34  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:49  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:40  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 17:40:26  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:10:05  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:43  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 180 - 0
packages/gtk/gtk/gtkitemfactory.pp

@@ -0,0 +1,180 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     TGtkPrintFunc = procedure (func_data:gpointer; str:Pgchar);cdecl;
+
+     TGtkTranslateFunc = function (path:Pgchar; func_data:gpointer):Pgchar;cdecl;
+
+     TGtkItemFactoryCallback = procedure ;cdecl;
+
+     TGtkItemFactoryCallback1 = procedure (callback_data:gpointer; callback_action:guint; widget:PGtkWidget);cdecl;
+
+     TGtkItemFactoryCallback2 = procedure (widget:PGtkWidget; callback_data:gpointer; callback_action:guint);cdecl;
+
+     PGtkItemFactory = ^TGtkItemFactory;
+     TGtkItemFactory = record
+          theobject : TGtkObject;
+          path : Pgchar;
+          accel_group : PGtkAccelGroup;
+          widget : PGtkWidget;
+          items : PGSList;
+          translate_func : TGtkTranslateFunc;
+          translate_data : gpointer;
+          translate_notify : TGtkDestroyNotify;
+       end;
+
+     PGtkItemFactoryClass = ^TGtkItemFactoryClass;
+     TGtkItemFactoryClass = record
+          object_class : TGtkObjectClass;
+          cpair_comment_single : Pgchar;
+          item_ht : PGHashTable;
+          dummy : gpointer;
+       end;
+
+     PGtkItemFactoryEntry = ^TGtkItemFactoryEntry;
+     TGtkItemFactoryEntry = record
+          path : Pgchar;
+          accelerator : Pgchar;
+          callback : TGtkItemFactoryCallback;
+          callback_action : guint;
+          item_type : Pgchar;
+       end;
+
+     PGtkItemFactoryItem = ^TGtkItemFactoryItem;
+     TGtkItemFactoryItem = record
+          path : Pgchar;
+          accelerator_key : guint;
+          accelerator_mods : guint;
+          flag0 : word;
+          dummy : Pgchar;
+          widgets : PGSList;
+       end;
+
+  const
+     bm_TGtkItemFactoryItem_modified = $1;
+     bp_TGtkItemFactoryItem_modified = 0;
+     bm_TGtkItemFactoryItem_in_propagation = $2;
+     bp_TGtkItemFactoryItem_in_propagation = 1;
+function  modified(var a : TGtkItemFactoryItem) : guint;
+procedure set_modified(var a : TGtkItemFactoryItem; __modified : guint);
+function  in_propagation(var a : TGtkItemFactoryItem) : guint;
+procedure set_in_propagation(var a : TGtkItemFactoryItem; __in_propagation : guint);
+
+type
+  GTK_ITEM_FACTORY=TGtkItemFactory;
+  GTK_ITEM_FACTORY_CLASS=TGtkItemFactoryClass;
+
+{$ifndef gtkwin}
+function  GTK_ITEM_FACTORY_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_item_factory_get_type';
+function  GTK_IS_ITEM_FACTORY(obj:pointer):boolean;
+function  GTK_IS_ITEM_FACTORY_CLASS(klass:pointer):boolean;
+
+function  gtk_item_factory_get_type:TGtkType;cdecl;external gtkdll name 'gtk_item_factory_get_type';
+function  gtk_item_factory_new(container_type:TGtkType; path:Pgchar; accel_group:PGtkAccelGroup):PGtkItemFactory;cdecl;external gtkdll name 'gtk_item_factory_new';
+procedure gtk_item_factory_construct(ifactory:PGtkItemFactory; container_type:TGtkType; path:Pgchar; accel_group:PGtkAccelGroup);cdecl;external gtkdll name 'gtk_item_factory_construct';
+procedure gtk_item_factory_parse_rc(file_name:Pgchar);cdecl;external gtkdll name 'gtk_item_factory_parse_rc';
+procedure gtk_item_factory_parse_rc_string(rc_string:Pgchar);cdecl;external gtkdll name 'gtk_item_factory_parse_rc_string';
+procedure gtk_item_factory_parse_rc_scanner(scanner:PGScanner);cdecl;external gtkdll name 'gtk_item_factory_parse_rc_scanner';
+procedure gtk_item_factory_add_foreign(accel_widget:PGtkWidget; full_path:Pgchar; accel_group:PGtkAccelGroup; keyval:guint; modifiers:TGdkModifierType);cdecl;external gtkdll name 'gtk_item_factory_add_foreign';
+function  gtk_item_factory_from_widget(widget:PGtkWidget):PGtkItemFactory;cdecl;external gtkdll name 'gtk_item_factory_from_widget';
+function  gtk_item_factory_path_from_widget(widget:PGtkWidget):Pgchar;cdecl;external gtkdll name 'gtk_item_factory_path_from_widget';
+function  gtk_item_factory_get_item(ifactory:PGtkItemFactory; path:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_item_factory_get_item';
+function  gtk_item_factory_get_widget(ifactory:PGtkItemFactory; path:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_item_factory_get_widget';
+function  gtk_item_factory_get_widget_by_action(ifactory:PGtkItemFactory; action:guint):PGtkWidget;cdecl;external gtkdll name 'gtk_item_factory_get_widget_by_action';
+function  gtk_item_factory_get_item_by_action(ifactory:PGtkItemFactory; action:guint):PGtkWidget;cdecl;external gtkdll name 'gtk_item_factory_get_item_by_action';
+procedure gtk_item_factory_dump_items(path_pspec:PGtkPatternSpec; modified_only:gboolean; print_func:TGtkPrintFunc; func_data:gpointer);cdecl;external gtkdll name 'gtk_item_factory_dump_items';
+procedure gtk_item_factory_dump_rc(file_name:Pgchar; path_pspec:PGtkPatternSpec; modified_only:gboolean);cdecl;external gtkdll name 'gtk_item_factory_dump_rc';
+procedure gtk_item_factory_print_func(FILE_pointer:gpointer; thestring:Pgchar);cdecl;external gtkdll name 'gtk_item_factory_print_func';
+procedure gtk_item_factory_create_item(ifactory:PGtkItemFactory; entry:PGtkItemFactoryEntry; callback_data:gpointer; callback_type:guint);cdecl;external gtkdll name 'gtk_item_factory_create_item';
+procedure gtk_item_factory_create_items(ifactory:PGtkItemFactory; n_entries:guint; entries:PGtkItemFactoryEntry; callback_data:gpointer);cdecl;external gtkdll name 'gtk_item_factory_create_items';
+procedure gtk_item_factory_delete_item(ifactory:PGtkItemFactory; path:Pgchar);cdecl;external gtkdll name 'gtk_item_factory_delete_item';
+procedure gtk_item_factory_delete_entry(ifactory:PGtkItemFactory; entry:PGtkItemFactoryEntry);cdecl;external gtkdll name 'gtk_item_factory_delete_entry';
+procedure gtk_item_factory_delete_entries(ifactory:PGtkItemFactory; n_entries:guint; entries:PGtkItemFactoryEntry);cdecl;external gtkdll name 'gtk_item_factory_delete_entries';
+procedure gtk_item_factory_popup(ifactory:PGtkItemFactory; x:guint; y:guint; mouse_button:guint; time:guint32);cdecl;external gtkdll name 'gtk_item_factory_popup';
+procedure gtk_item_factory_popup_with_data(ifactory:PGtkItemFactory; popup_data:gpointer; destroy:TGtkDestroyNotify; x:guint; y:guint; mouse_button:guint; time:guint32);cdecl;external gtkdll name 'gtk_item_factory_popup_with_data';
+function  gtk_item_factory_popup_data(ifactory:PGtkItemFactory):gpointer;cdecl;external gtkdll name 'gtk_item_factory_popup_data';
+function  gtk_item_factory_popup_data_from_widget(widget:PGtkWidget):gpointer;cdecl;external gtkdll name 'gtk_item_factory_popup_data_from_widget';
+procedure gtk_item_factory_set_translate_func(ifactory:PGtkItemFactory; func:TGtkTranslateFunc; data:gpointer; notify:TGtkDestroyNotify);cdecl;external gtkdll name 'gtk_item_factory_set_translate_func';
+function  gtk_item_factory_from_path(path:Pgchar):PGtkItemFactory;cdecl;external gtkdll name 'gtk_item_factory_from_path';
+procedure gtk_item_factory_create_menu_entries(n_entries:guint; entries:PGtkMenuEntry);cdecl;external gtkdll name 'gtk_item_factory_create_menu_entries';
+procedure gtk_item_factories_path_delete(ifactory_path:Pgchar; path:Pgchar);cdecl;external gtkdll name 'gtk_item_factories_path_delete';
+procedure gtk_item_factory_create_items_ac(ifactory:PGtkItemFactory; n_entries:guint; entries:PGtkItemFactoryEntry; callback_data:gpointer; callback_type:guint);cdecl;external gtkdll name 'gtk_item_factory_create_items_ac';
+{$endif}
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  modified(var a : TGtkItemFactoryItem) : guint;
+    begin
+       modified:=(a.flag0 and bm_TGtkItemFactoryItem_modified) shr bp_TGtkItemFactoryItem_modified;
+    end;
+
+procedure set_modified(var a : TGtkItemFactoryItem; __modified : guint);
+    begin
+       a.flag0:=a.flag0 or ((__modified shl bp_TGtkItemFactoryItem_modified) and bm_TGtkItemFactoryItem_modified);
+    end;
+
+function  in_propagation(var a : TGtkItemFactoryItem) : guint;
+    begin
+       in_propagation:=(a.flag0 and bm_TGtkItemFactoryItem_in_propagation) shr bp_TGtkItemFactoryItem_in_propagation;
+    end;
+
+procedure set_in_propagation(var a : TGtkItemFactoryItem; __in_propagation : guint);
+    begin
+       a.flag0:=a.flag0 or ((__in_propagation shl bp_TGtkItemFactoryItem_in_propagation) and bm_TGtkItemFactoryItem_in_propagation);
+    end;
+
+{$ifndef gtkwin}
+
+function  GTK_IS_ITEM_FACTORY(obj:pointer):boolean;
+begin
+  GTK_IS_ITEM_FACTORY:=(obj<>nil) and GTK_IS_ITEM_FACTORY_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_ITEM_FACTORY_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_ITEM_FACTORY_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_ITEM_FACTORY_TYPE);
+end;
+
+{$endif}
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:36  peter
+    * moved to packages dir
+
+  Revision 1.5  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.4  1999/07/23 16:12:35  peter
+    * use packrecords C
+
+  Revision 1.3  1999/05/11 00:38:50  peter
+    * win32 fixes
+
+  Revision 1.2  1999/05/10 15:19:41  peter
+    * cdecl fixes
+
+  Revision 1.1  1999/05/10 09:13:59  peter
+    + new gtk 1.2 files
+
+}
+

+ 154 - 0
packages/gtk/gtk/gtklabel.pp

@@ -0,0 +1,154 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+    type
+       PGtkLabelWord = pointer;
+
+       PGtkLabel = ^TGtkLabel;
+       TGtkLabel = record
+          misc : TGtkMisc;
+          thelabel : Pgchar;
+          label_wc : PGdkWChar;
+          pattern : Pgchar;
+          words : PGtkLabelWord;
+          flag0 : longint;
+          wrap : gboolean;
+        end;
+
+  const
+     bm_TGtkLabel_max_width = $FFFF;
+     bp_TGtkLabel_max_width = 0;
+     bm_TGtkLabel_jtype = $30000;
+     bp_TGtkLabel_jtype = 16;
+function  max_width(var a : TGtkLabel) : guint;
+procedure set_max_width(var a : TGtkLabel; __max_width : guint);
+function  jtype(var a : TGtkLabel) : guint;
+procedure set_jtype(var a : TGtkLabel; __jtype : guint);
+
+    type
+       PGtkLabelClass = ^TGtkLabelClass;
+       TGtkLabelClass = record
+            parent_class : TGtkMiscClass;
+         end;
+
+Type
+  GTK_LABEL=PGtkLabel;
+  GTK_LABEL_CLASS=PGtkLabelClass;
+
+function  GTK_LABEL_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_label_get_type';
+function  GTK_IS_LABEL(obj:pointer):boolean;
+function  GTK_IS_LABEL_CLASS(klass:pointer):boolean;
+
+function  gtk_label_get_type:TGtkType;cdecl;external gtkdll name 'gtk_label_get_type';
+function  gtk_label_new (str:pchar):PGtkWidget;cdecl;external gtkdll name 'gtk_label_new';
+procedure gtk_label_set_text(theLabel: PGtkLabel; str:pchar);cdecl;external gtkdll name 'gtk_label_set_text';
+procedure gtk_label_set_justify(thelabel:PGtkLabel; jtype:TGtkJustification);cdecl;external gtkdll name 'gtk_label_set_justify';
+procedure gtk_label_set_pattern(thelabel:PGtkLabel; pattern:Pgchar);cdecl;external gtkdll name 'gtk_label_set_pattern';
+procedure gtk_label_set_line_wrap(thelabel:PGtkLabel; wrap:gboolean);cdecl;external gtkdll name 'gtk_label_set_line_wrap';
+procedure gtk_label_get(thelabel:PGtkLabel; str:ppchar);cdecl;external gtkdll name 'gtk_label_get';
+function  gtk_label_parse_uline(thelabel:PGtkLabel;thestring:Pgchar):guint;cdecl;external gtkdll name 'gtk_label_parse_uline';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  max_width(var a : TGtkLabel) : guint;
+    begin
+       max_width:=(a.flag0 and bm_TGtkLabel_max_width) shr bp_TGtkLabel_max_width;
+    end;
+
+procedure set_max_width(var a : TGtkLabel; __max_width : guint);
+    begin
+       a.flag0:=a.flag0 or ((__max_width shl bp_TGtkLabel_max_width) and bm_TGtkLabel_max_width);
+    end;
+
+function  jtype(var a : TGtkLabel) : guint;
+    begin
+       jtype:=(a.flag0 and bm_TGtkLabel_jtype) shr bp_TGtkLabel_jtype;
+    end;
+
+procedure set_jtype(var a : TGtkLabel; __jtype : guint);
+    begin
+       a.flag0:=a.flag0 or ((__jtype shl bp_TGtkLabel_jtype) and bm_TGtkLabel_jtype);
+    end;
+
+function  GTK_IS_LABEL(obj:pointer):boolean;
+begin
+  GTK_IS_LABEL:=(obj<>nil) and GTK_IS_LABEL_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_LABEL_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_LABEL_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_LABEL_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:36  peter
+    * moved to packages dir
+
+  Revision 1.13  1999/10/21 08:42:01  florian
+    * some changes to get it work with gtk 1.3 under Windows 98:
+      - removed some trailing space after the import name
+      - In gtkbindings.h is
+        #define  gtk_binding_entry_add          gtk_binding_entry_clear
+        so in the pascal headers the import name of gtk_bindings_entry_add should be
+        gtk_binding_entry_clear!
+      - removed the declaration of
+        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
+      - in gdk.pp glibdll must be set to gdk-1.3:
+        const
+           gdkdll='gdk-1.3';
+           glibdll='gdk-1.3';
+        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!
+
+  Revision 1.12  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.11  1999/07/23 16:12:37  peter
+    * use packrecords C
+
+  Revision 1.10  1999/05/16 17:07:32  peter
+    * removed gtk_label_set which has been changed to gtk_label_set_text
+
+  Revision 1.9  1999/05/15 21:34:20  peter
+    + gtk_label_set_text
+
+  Revision 1.8  1999/05/11 00:38:51  peter
+    * win32 fixes
+
+  Revision 1.7  1999/05/10 15:19:42  peter
+    * cdecl fixes
+
+  Revision 1.6  1999/05/10 09:03:18  peter
+    * gtk 1.2 port working
+
+  Revision 1.5  1999/05/07 17:40:27  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:10:06  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:44  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 100 - 0
packages/gtk/gtk/gtklayout.pp

@@ -0,0 +1,100 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkLayout = ^TGtkLayout;
+     TGtkLayout = record
+          container : TGtkContainer;
+          children : PGList;
+          width : guint;
+          height : guint;
+          xoffset : guint;
+          yoffset : guint;
+          hadjustment : PGtkAdjustment;
+          vadjustment : PGtkAdjustment;
+          bin_window : PGdkWindow;
+          visibility : TGdkVisibilityState;
+          configure_serial : gulong;
+          scroll_x : gint;
+          scroll_y : gint;
+          freeze_count : guint;
+       end;
+
+     PGtkLayoutClass = ^TGtkLayoutClass;
+     TGtkLayoutClass = record
+          parent_class : TGtkContainerClass;
+          set_scroll_adjustments : procedure (layout:PGtkLayout; hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment);cdecl;
+       end;
+
+type
+  GTK_LAYOUT=PGtkLayout;
+  GTK_LAYOUT_CLASS=PGtkLayoutClass;
+
+function  GTK_LAYOUT_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_layout_get_type';
+function  GTK_IS_LAYOUT(obj:pointer):boolean;
+function  GTK_IS_LAYOUT_CLASS(klass:pointer):boolean;
+
+function  gtk_layout_get_type:TGtkType;cdecl;external gtkdll name 'gtk_layout_get_type';
+function  gtk_layout_new(hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment):PGtkWidget;cdecl;external gtkdll name 'gtk_layout_new';
+procedure gtk_layout_put(layout:PGtkLayout; widget:PGtkWidget; x:gint; y:gint);cdecl;external gtkdll name 'gtk_layout_put';
+procedure gtk_layout_move(layout:PGtkLayout; widget:PGtkWidget; x:gint; y:gint);cdecl;external gtkdll name 'gtk_layout_move';
+procedure gtk_layout_set_size(layout:PGtkLayout; width:guint; height:guint);cdecl;external gtkdll name 'gtk_layout_set_size';
+function  gtk_layout_get_hadjustment(layout:PGtkLayout):PGtkAdjustment;cdecl;external gtkdll name 'gtk_layout_get_hadjustment';
+function  gtk_layout_get_vadjustment(layout:PGtkLayout):PGtkAdjustment;cdecl;external gtkdll name 'gtk_layout_get_vadjustment';
+procedure gtk_layout_set_hadjustment(layout:PGtkLayout; adjustment:PGtkAdjustment);cdecl;external gtkdll name 'gtk_layout_set_hadjustment';
+procedure gtk_layout_set_vadjustment(layout:PGtkLayout; adjustment:PGtkAdjustment);cdecl;external gtkdll name 'gtk_layout_set_vadjustment';
+procedure gtk_layout_freeze(layout:PGtkLayout);cdecl;external gtkdll name 'gtk_layout_freeze';
+procedure gtk_layout_thaw(layout:PGtkLayout);cdecl;external gtkdll name 'gtk_layout_thaw';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_LAYOUT(obj:pointer):boolean;
+begin
+  GTK_IS_LAYOUT:=(obj<>nil) and GTK_IS_LAYOUT_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_LAYOUT_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_LAYOUT_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_LAYOUT_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:36  peter
+    * moved to packages dir
+
+  Revision 1.5  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.4  1999/07/23 16:12:38  peter
+    * use packrecords C
+
+  Revision 1.3  1999/05/11 00:38:52  peter
+    * win32 fixes
+
+  Revision 1.2  1999/05/10 15:19:44  peter
+    * cdecl fixes
+
+  Revision 1.1  1999/05/10 09:13:59  peter
+    + new gtk 1.2 files
+
+}
+

+ 173 - 0
packages/gtk/gtk/gtklist.pp

@@ -0,0 +1,173 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkList = ^TGtkList;
+     TGtkList = record
+          container : TGtkContainer;
+          children : PGList;
+          selection : PGList;
+          undo_selection : PGList;
+          undo_unselection : PGList;
+          last_focus_child : PGtkWidget;
+          undo_focus_child : PGtkWidget;
+          htimer : guint;
+          vtimer : guint;
+          anchor : gint;
+          drag_pos : gint;
+          anchor_state : TGtkStateType;
+          flag0 : word;
+       end;
+
+  const
+     bm_TGtkList_selection_mode = $3;
+     bp_TGtkList_selection_mode = 0;
+     bm_TGtkList_drag_selection = $4;
+     bp_TGtkList_drag_selection = 2;
+     bm_TGtkList_add_mode = $8;
+     bp_TGtkList_add_mode = 3;
+function  selection_mode(var a : TGtkList) : guint;
+procedure set_selection_mode(var a : TGtkList; __selection_mode : guint);
+function  drag_selection(var a : TGtkList) : guint;cdecl;
+procedure set_drag_selection(var a : TGtkList; __drag_selection : guint);cdecl;
+function  add_mode(var a : TGtkList) : guint;
+procedure set_add_mode(var a : TGtkList; __add_mode : guint);
+
+  type
+     PGtkListClass = ^TGtkListClass;
+     TGtkListClass = record
+          parent_class : TGtkContainerClass;
+          selection_changed : procedure (list:PGtkList); cdecl;
+          select_child : procedure (list:PGtkList; child:PGtkWidget); cdecl;
+          unselect_child : procedure (list:PGtkList; child:PGtkWidget); cdecl;
+       end;
+
+Type
+  GTK_LIST=PGtkList;
+  GTK_LIST_CLASS=PGtkListClass;
+
+function  GTK_LIST_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_list_get_type';
+function  GTK_IS_LIST(obj:pointer):boolean;
+function  GTK_IS_LIST_CLASS(klass:pointer):boolean;
+
+function  gtk_list_get_type:TGtkType;cdecl;external gtkdll name 'gtk_list_get_type';
+function  gtk_list_new:PGtkWidget;cdecl;external gtkdll name 'gtk_list_new';
+procedure gtk_list_insert_items(list:PGtkList; items:PGList; position:gint);cdecl;external gtkdll name 'gtk_list_insert_items';
+procedure gtk_list_append_items(list:PGtkList; items:PGList);cdecl;external gtkdll name 'gtk_list_append_items';
+procedure gtk_list_prepend_items(list:PGtkList; items:PGList);cdecl;external gtkdll name 'gtk_list_prepend_items';
+procedure gtk_list_remove_items(list:PGtkList; items:PGList);cdecl;external gtkdll name 'gtk_list_remove_items';
+procedure gtk_list_remove_items_no_unref(list:PGtkList; items:PGList);cdecl;external gtkdll name 'gtk_list_remove_items_no_unref';
+procedure gtk_list_clear_items(list:PGtkList; start:gint; theend:gint);cdecl;external gtkdll name 'gtk_list_clear_items';
+procedure gtk_list_select_item(list:PGtkList; item:gint);cdecl;external gtkdll name 'gtk_list_select_item';
+procedure gtk_list_unselect_item(list:PGtkList; item:gint);cdecl;external gtkdll name 'gtk_list_unselect_item';
+procedure gtk_list_select_child(list:PGtkList; child:PGtkWidget);cdecl;external gtkdll name 'gtk_list_select_child';
+procedure gtk_list_unselect_child(list:PGtkList; child:PGtkWidget);cdecl;external gtkdll name 'gtk_list_unselect_child';
+function  gtk_list_child_position(list:PGtkList; child:PGtkWidget):gint;cdecl;external gtkdll name 'gtk_list_child_position';
+procedure gtk_list_set_selection_mode(list:PGtkList; mode:TGtkSelectionMode);cdecl;external gtkdll name 'gtk_list_set_selection_mode';
+procedure gtk_list_extend_selection(list:PGtkList; scroll_type:TGtkScrollType; position:gfloat; auto_start_selection:gboolean);cdecl;external gtkdll name 'gtk_list_extend_selection';
+{$ifndef gtkwin}
+procedure gtk_list_start_selection(list:PGtkList);cdecl;external gtkdll name 'gtk_list_start_selection';
+{$endif}
+procedure gtk_list_end_selection(list:PGtkList);cdecl;external gtkdll name 'gtk_list_end_selection';
+procedure gtk_list_select_all(list:PGtkList);cdecl;external gtkdll name 'gtk_list_select_all';
+procedure gtk_list_unselect_all(list:PGtkList);cdecl;external gtkdll name 'gtk_list_unselect_all';
+procedure gtk_list_scroll_horizontal(list:PGtkList; scroll_type:TGtkScrollType; position:gfloat);cdecl;external gtkdll name 'gtk_list_scroll_horizontal';
+procedure gtk_list_scroll_vertical(list:PGtkList; scroll_type:TGtkScrollType; position:gfloat);cdecl;external gtkdll name 'gtk_list_scroll_vertical';
+{$ifndef gtkwin}
+procedure gtk_list_toggle_add_mode(list:PGtkList);cdecl;external gtkdll name 'gtk_list_toggle_add_mode';
+{$endif}
+procedure gtk_list_toggle_focus_row(list:PGtkList);cdecl;external gtkdll name 'gtk_list_toggle_focus_row';
+procedure gtk_list_toggle_row(list:PGtkList; item:PGtkWidget);cdecl;external gtkdll name 'gtk_list_toggle_row';
+procedure gtk_list_undo_selection(list:PGtkList);cdecl;external gtkdll name 'gtk_list_undo_selection';
+procedure gtk_list_end_drag_selection(list:PGtkList);cdecl;external gtkdll name 'gtk_list_end_drag_selection';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  selection_mode(var a : TGtkList) : guint;
+    begin
+       selection_mode:=(a.flag0 and bm_TGtkList_selection_mode) shr bp_TGtkList_selection_mode;
+    end;
+
+procedure set_selection_mode(var a : TGtkList; __selection_mode : guint);
+    begin
+       a.flag0:=a.flag0 or ((__selection_mode shl bp_TGtkList_selection_mode) and bm_TGtkList_selection_mode);
+    end;
+
+function  drag_selection(var a : TGtkList) : guint;cdecl;
+    begin
+       drag_selection:=(a.flag0 and bm_TGtkList_drag_selection) shr bp_TGtkList_drag_selection;
+    end;
+
+procedure set_drag_selection(var a : TGtkList; __drag_selection : guint);cdecl;
+    begin
+       a.flag0:=a.flag0 or ((__drag_selection shl bp_TGtkList_drag_selection) and bm_TGtkList_drag_selection);
+    end;
+
+function  add_mode(var a : TGtkList) : guint;
+    begin
+       add_mode:=(a.flag0 and bm_TGtkList_add_mode) shr bp_TGtkList_add_mode;
+    end;
+
+procedure set_add_mode(var a : TGtkList; __add_mode : guint);
+    begin
+       a.flag0:=a.flag0 or ((__add_mode shl bp_TGtkList_add_mode) and bm_TGtkList_add_mode);
+    end;
+
+function  GTK_IS_LIST(obj:pointer):boolean;
+begin
+  GTK_IS_LIST:=(obj<>nil) and GTK_IS_LIST_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_LIST_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_LIST_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_LIST_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:36  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:39  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:53  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:45  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/07 17:40:28  peter
+    * more updates
+
+  Revision 1.4  1998/11/09 10:10:07  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:45  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 98 - 0
packages/gtk/gtk/gtklistitem.pp

@@ -0,0 +1,98 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  type
+     PGtkListItem = ^TGtkListItem;
+     TGtkListItem = record
+          item : TGtkItem;
+       end;
+
+     PGtkListItemClass = ^TGtkListItemClass;
+     TGtkListItemClass = record
+          parent_class : TGtkItemClass;
+          toggle_focus_row : procedure (list_item:PGtkListItem);cdecl;
+          select_all : procedure (list_item:PGtkListItem);cdecl;
+          unselect_all : procedure (list_item:PGtkListItem);cdecl;
+          undo_selection : procedure (list_item:PGtkListItem);cdecl;
+          start_selection : procedure (list_item:PGtkListItem);cdecl;
+          end_selection : procedure (list_item:PGtkListItem);cdecl;
+          extend_selection : procedure (list_item:PGtkListItem; scroll_type:TGtkScrollType; position:gfloat; auto_start_selection:gboolean);cdecl;
+          scroll_horizontal : procedure (list_item:PGtkListItem; scroll_type:TGtkScrollType; position:gfloat);cdecl;
+          scroll_vertical : procedure (list_item:PGtkListItem; scroll_type:TGtkScrollType; position:gfloat);cdecl;
+          toggle_add_mode : procedure (list_item:PGtkListItem);cdecl;
+       end;
+
+Type
+  GTK_LIST_ITEM=PGtkListItem;
+  GTK_LIST_ITEM_CLASS=PGtkListItemClass;
+
+function  GTK_LIST_ITEM_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_list_item_get_type';
+function  GTK_IS_LIST_ITEM(obj:pointer):boolean;
+function  GTK_IS_LIST_ITEM_CLASS(klass:pointer):boolean;
+
+function  gtk_list_item_get_type:TGtkType;cdecl;external gtkdll name 'gtk_list_item_get_type';
+function  gtk_list_item_new:PGtkWidget;cdecl;external gtkdll name 'gtk_list_item_new';
+function  gtk_list_item_new_with_label(thelabel:Pgchar):PGtkWidget;cdecl;external gtkdll name 'gtk_list_item_new_with_label';
+procedure gtk_list_item_select(list_item:PGtkListItem);cdecl;external gtkdll name 'gtk_list_item_select';
+procedure gtk_list_item_deselect(list_item:PGtkListItem);cdecl;external gtkdll name 'gtk_list_item_deselect';
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+
+function  GTK_IS_LIST_ITEM(obj:pointer):boolean;
+begin
+  GTK_IS_LIST_ITEM:=(obj<>nil) and GTK_IS_LIST_ITEM_CLASS(PGtkTypeObject(obj)^.klass);
+end;
+
+function  GTK_IS_LIST_ITEM_CLASS(klass:pointer):boolean;
+begin
+  GTK_IS_LIST_ITEM_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_LIST_ITEM_TYPE);
+end;
+
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:36  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/07/23 16:12:40  peter
+    * use packrecords C
+
+  Revision 1.7  1999/05/11 00:38:54  peter
+    * win32 fixes
+
+  Revision 1.6  1999/05/10 15:19:46  peter
+    * cdecl fixes
+
+  Revision 1.5  1999/05/10 09:03:19  peter
+    * gtk 1.2 port working
+
+  Revision 1.4  1998/11/09 10:10:08  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:46  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 115 - 0
packages/gtk/gtk/gtkmain.pp

@@ -0,0 +1,115 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+  const
+     GTK_PRIORITY_REDRAW = G_PRIORITY_HIGH_IDLE + 20;
+     GTK_PRIORITY_RESIZE = G_PRIORITY_HIGH_IDLE + 10;
+     GTK_PRIORITY_HIGH = G_PRIORITY_HIGH;
+     GTK_PRIORITY_INTERNAL = GTK_PRIORITY_REDRAW;
+     GTK_PRIORITY_DEFAULT = G_PRIORITY_DEFAULT_IDLE;
+     GTK_PRIORITY_LOW = G_PRIORITY_LOW;
+
+  type
+
+     TGtkModuleInitFunc = procedure (argc:Pgint; argv:pPPgchar);cdecl;
+     TGtkKeySnoopFunc = function (grab_widget:PGtkWidget;event:PGdkEventKey;func_data:gpointer):gint;cdecl;
+
+    var
+       gtk_major_version : guint;external gtkdll name 'gtk_major_version';
+       gtk_minor_version : guint;external gtkdll name 'gtk_minor_version';
+       gtk_micro_version : guint;external gtkdll name 'gtk_micro_version';
+       gtk_binary_age : guint;external gtkdll name 'gtk_binary_age';
+       gtk_interface_age : guint;external gtkdll name 'gtk_interface_age';
+
+function  gtk_check_gtkversion(required_major:guint; required_minor:guint; required_micro:guint):Pgchar;cdecl;external gtkdll name 'gtk_check_version';
+procedure gtk_init(argc:plongint; argv:pppchar);cdecl;external gtkdll name 'gtk_init';
+function  gtk_init_check(argc:plongint; argv:pppchar):gboolean;cdecl;external gtkdll name 'gtk_init_check';
+procedure gtk_exit(error_code:gint);cdecl;external gtkdll name 'gtk_exit';
+function  gtk_set_locale:Pgchar;cdecl;external gtkdll name 'gtk_set_locale';
+function  gtk_events_pending:gint;cdecl;external gtkdll name 'gtk_events_pending';
+{$ifndef gtkwin}
+procedure gtk_main_do_event(event:PGdkEvent);cdecl;external gtkdll name 'gtk_main_do_event';
+{$endif}
+procedure gtk_main;cdecl;external gtkdll name 'gtk_main';
+function  gtk_main_level:guint;cdecl;external gtkdll name 'gtk_main_level';
+procedure gtk_main_quit;cdecl;external gtkdll name 'gtk_main_quit';
+function  gtk_main_iteration:gint;cdecl;external gtkdll name 'gtk_main_iteration';
+function  gtk_main_iteration_do(blocking:gboolean):gint;cdecl;external gtkdll name 'gtk_main_iteration_do';
+function  gtk_true:gint;cdecl;external gtkdll name 'gtk_true';
+function  gtk_false:gint;cdecl;external gtkdll name 'gtk_false';
+procedure gtk_grab_add(widget:PGtkWidget);cdecl;external gtkdll name 'gtk_grab_add';
+function  gtk_grab_get_current:PGtkWidget;cdecl;external gtkdll name 'gtk_grab_get_current';
+procedure gtk_grab_remove(widget:PGtkWidget);cdecl;external gtkdll name 'gtk_grab_remove';
+procedure gtk_init_add(thefunction :TGtkfunction; data:gpointer);cdecl;external gtkdll name 'gtk_init_add';
+procedure gtk_quit_add_destroy(main_level:guint; theobject:PGtkObject);cdecl;external gtkdll name 'gtk_quit_add_destroy';
+function  gtk_quit_add(main_level:guint; thefunction:TGtkfunction; data:gpointer):guint;cdecl;external gtkdll name 'gtk_quit_add';
+function  gtk_quit_add_full(main_level:guint; thefunction:TGtkfunction; marshal:TGtkCallbackMarshal; data:gpointer; destroy:TGtkDestroyNotify):guint;cdecl;external gtkdll name 'gtk_quit_add_full';
+procedure gtk_quit_remove(quit_handler_id:guint);cdecl;external gtkdll name 'gtk_quit_remove';
+procedure gtk_quit_remove_by_data(data:gpointer);cdecl;external gtkdll name 'gtk_quit_remove_by_data';
+function  gtk_timeout_add(interval:guint32; thefunction:TGtkfunction; data:gpointer):guint;cdecl;external gtkdll name 'gtk_timeout_add';
+function  gtk_timeout_add_full(interval:guint32; thefunction:TGtkfunction; marshal:TGtkCallbackMarshal; data:gpointer; destroy:TGtkDestroyNotify):guint;cdecl;external gtkdll name 'gtk_timeout_add_full';
+procedure gtk_timeout_remove(timeout_handler_id:guint);cdecl;external gtkdll name 'gtk_timeout_remove';
+function  gtk_idle_add(thefunction:TGtkfunction; data:gpointer):guint;cdecl;external gtkdll name 'gtk_idle_add';
+function  gtk_idle_add_priority(priority:gint; thefunction:TGtkfunction; data:gpointer):guint;cdecl;external gtkdll name 'gtk_idle_add_priority';
+function  gtk_idle_add_full(priority:gint; thefunction:TGtkfunction; marshal:TGtkCallbackMarshal; data:gpointer; destroy:TGtkDestroyNotify):guint;cdecl;external gtkdll name 'gtk_idle_add_full';
+procedure gtk_idle_remove(idle_handler_id:guint);cdecl;external gtkdll name 'gtk_idle_remove';
+procedure gtk_idle_remove_by_data(data:gpointer);cdecl;external gtkdll name 'gtk_idle_remove_by_data';
+function  gtk_input_add_full(source:gint; condition:TGdkInputCondition; thefunction:TGdkInputfunction; marshal:TGtkCallbackMarshal; data:gpointer; destroy:TGtkDestroyNotify):guint;cdecl;external gtkdll name 'gtk_input_add_full';
+procedure gtk_input_remove(input_handler_id:guint);cdecl;external gtkdll name 'gtk_input_remove';
+function  gtk_key_snooper_install(snooper:TGtkKeySnoopFunc; func_data:gpointer):guint;cdecl;external gtkdll name 'gtk_key_snooper_install';
+procedure gtk_key_snooper_remove(snooper_handler_id:guint);cdecl;external gtkdll name 'gtk_key_snooper_remove';
+function  gtk_get_current_event:PGdkEvent;cdecl;external gtkdll name 'gtk_get_current_event';
+function  gtk_get_event_widget(event:PGdkEvent):PGtkWidget;cdecl;external gtkdll name 'gtk_get_event_widget';
+{$ifndef gtkwin}
+procedure gtk_propagate_event(widget:PGtkWidget; event:PGdkEvent);cdecl;external gtkdll name 'gtk_propagate_event';
+{$endif}
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:36  peter
+    * moved to packages dir
+
+  Revision 1.9  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.8  1999/05/11 00:38:55  peter
+    * win32 fixes
+
+  Revision 1.7  1999/05/10 15:19:47  peter
+    * cdecl fixes
+
+  Revision 1.6  1999/05/10 09:03:21  peter
+    * gtk 1.2 port working
+
+  Revision 1.5  1999/05/07 15:10:09  peter
+    * more fixes
+
+  Revision 1.4  1998/11/09 10:10:09  peter
+    + C type casts are now correctly handled
+
+  Revision 1.3  1998/10/21 20:22:47  peter
+    * cdecl, packrecord fixes (from the gtk.tar.gz)
+    * win32 support
+    * gtk.pp,gdk.pp for an all in one unit
+
+}
+

+ 93 - 0
packages/gtk/gtk/gtkmarshal.pp

@@ -0,0 +1,93 @@
+{
+   $Id$
+}
+
+{****************************************************************************
+                                 Interface
+****************************************************************************}
+
+{$ifdef read_interface}
+
+{$ifndef gtkwin}
+procedure gtk_marshal_BOOL__NONE(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_BOOL__NONE';
+procedure gtk_marshal_BOOL__POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_BOOL__POINTER';
+procedure gtk_marshal_BOOL__POINTER_POINTER_INT_INT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_BOOL__POINTER_POINTER_INT_INT';
+procedure gtk_marshal_BOOL__POINTER_INT_INT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_BOOL__POINTER_INT_INT';
+procedure gtk_marshal_BOOL__POINTER_INT_INT_UINT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_BOOL__POINTER_INT_INT_UINT';
+procedure gtk_marshal_BOOL__POINTER_INT_INT_INT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_BOOL__POINTER_INT_INT_INT';
+procedure gtk_marshal_BOOL__POINTER_STRING_STRING_POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_BOOL__POINTER_STRING_STRING_POINTER';
+procedure gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER';
+procedure gtk_marshal_ENUM__ENUM(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_ENUM__ENUM';
+procedure gtk_marshal_INT__INT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_INT__INT';
+procedure gtk_marshal_INT__POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_INT__POINTER';
+procedure gtk_marshal_INT__POINTER_CHAR_CHAR(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_INT__POINTER_CHAR_CHAR';
+procedure gtk_marshal_NONE__BOOL(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__BOOL';
+procedure gtk_marshal_NONE__BOXED(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__BOXED';
+procedure gtk_marshal_NONE__POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER';
+procedure gtk_marshal_NONE__C_CALLBACK(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__C_CALLBACK';
+procedure gtk_marshal_NONE__C_CALLBACK_C_CALLBACK(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__C_CALLBACK_C_CALLBACK';
+procedure gtk_marshal_NONE__ENUM(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__ENUM';
+procedure gtk_marshal_NONE__INT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__INT';
+procedure gtk_marshal_NONE__ENUM_FLOAT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__ENUM_FLOAT';
+procedure gtk_marshal_NONE__INT_FLOAT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__INT_FLOAT';
+procedure gtk_marshal_NONE__ENUM_FLOAT_BOOL(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__ENUM_FLOAT_BOOL';
+procedure gtk_marshal_NONE__INT_FLOAT_BOOL(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__INT_FLOAT_BOOL';
+procedure gtk_marshal_NONE__INT_INT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__INT_INT';
+procedure gtk_marshal_NONE__INT_INT_POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__INT_INT_POINTER';
+procedure gtk_marshal_NONE__NONE(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__NONE';
+procedure gtk_marshal_NONE__OBJECT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__OBJECT';
+procedure gtk_marshal_NONE__POINTER_INT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_INT';
+procedure gtk_marshal_NONE__POINTER_POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_POINTER';
+procedure gtk_marshal_NONE__POINTER_POINTER_POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_POINTER_POINTER';
+procedure gtk_marshal_NONE__POINTER_STRING_STRING(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_STRING_STRING';
+procedure gtk_marshal_NONE__POINTER_UINT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_UINT';
+procedure gtk_marshal_NONE__POINTER_UINT_ENUM(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_UINT_ENUM';
+procedure gtk_marshal_NONE__POINTER_INT_INT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_INT_INT';
+procedure gtk_marshal_NONE__POINTER_POINTER_UINT_UINT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_POINTER_UINT_UINT';
+procedure gtk_marshal_NONE__POINTER_POINTER_INT_INT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_POINTER_INT_INT';
+procedure gtk_marshal_NONE__POINTER_INT_INT_POINTER_UINT_UINT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_INT_INT_POINTER_UINT_UINT';
+procedure gtk_marshal_NONE__POINTER_INT_INT_POINTER_INT_INT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_INT_INT_POINTER_INT_INT';
+procedure gtk_marshal_NONE__POINTER_UINT_UINT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_UINT_UINT';
+procedure gtk_marshal_NONE__STRING(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__STRING';
+procedure gtk_marshal_NONE__STRING_INT_POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__STRING_INT_POINTER';
+procedure gtk_marshal_NONE__POINTER_INT_POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__POINTER_INT_POINTER';
+procedure gtk_marshal_NONE__UINT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__UINT';
+procedure gtk_marshal_NONE__UINT_POINTER_UINT_ENUM_ENUM_POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__UINT_POINTER_UINT_ENUM_ENUM_POINTER';
+procedure gtk_marshal_NONE__INT_POINTER_INT_INT_INT_POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__INT_POINTER_INT_INT_INT_POINTER';
+procedure gtk_marshal_NONE__UINT_POINTER_UINT_UINT_ENUM(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__UINT_POINTER_UINT_UINT_ENUM';
+procedure gtk_marshal_NONE__INT_POINTER_INT_INT_INT(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__INT_POINTER_INT_INT_INT';
+procedure gtk_marshal_NONE__UINT_STRING(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__UINT_STRING';
+procedure gtk_marshal_NONE__INT_POINTER(theobject:PGtkObject; func:TGtkSignalFunc; func_data:gpointer; args:PGtkArg);cdecl;external gtkdll name 'gtk_marshal_NONE__INT_POINTER';
+{$endif}
+
+{$endif read_interface}
+
+
+{****************************************************************************
+                              Implementation
+****************************************************************************}
+
+{$ifdef read_implementation}
+{$endif read_implementation}
+
+
+{
+  $Log$
+  Revision 1.1  1999-11-24 23:36:36  peter
+    * moved to packages dir
+
+  Revision 1.4  1999/10/06 17:42:49  peter
+    * external is now only in the interface
+    * removed gtk 1.0 support
+
+  Revision 1.3  1999/05/11 00:38:56  peter
+    * win32 fixes
+
+  Revision 1.2  1999/05/10 15:19:48  peter
+    * cdecl fixes
+
+  Revision 1.1  1999/05/10 09:13:59  peter
+    + new gtk 1.2 files
+
+}
+

Some files were not shown because too many files changed in this diff