summaryrefslogtreecommitdiff
path: root/packages/gtk2
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-01-26 22:20:45 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-01-26 22:20:45 +0000
commita4a45f9244cfa499ee0d85e19181b940e020a9ce (patch)
treece3b71f701ac62ca09f420505fe7c39ea7a8672e /packages/gtk2
parentb41ec4b42e7d46bab019850c5e52d690d0e4b631 (diff)
downloadfpc-a4a45f9244cfa499ee0d85e19181b940e020a9ce.tar.gz
* gtk2 first pass
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@9985 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/gtk2')
-rw-r--r--packages/gtk2/Makefile2882
-rw-r--r--packages/gtk2/Makefile.fpc45
-rw-r--r--packages/gtk2/examples/Makefile2646
-rw-r--r--packages/gtk2/examples/Makefile.fpc19
-rw-r--r--packages/gtk2/examples/filechooser/Makefile2015
-rw-r--r--packages/gtk2/examples/filechooser/Makefile.fpc18
-rw-r--r--packages/gtk2/examples/filechooser/beipiel.glade106
-rw-r--r--packages/gtk2/examples/filechooser/glade.pas164
-rw-r--r--packages/gtk2/examples/filechooser/simple.pas166
-rw-r--r--packages/gtk2/examples/gettingstarted/Makefile2015
-rw-r--r--packages/gtk2/examples/gettingstarted/Makefile.fpc18
-rw-r--r--packages/gtk2/examples/gettingstarted/gettingstarted.pas18
-rw-r--r--packages/gtk2/examples/gtk_demo/Makefile2015
-rw-r--r--packages/gtk2/examples/gtk_demo/Makefile.fpc18
-rw-r--r--packages/gtk2/examples/gtk_demo/appwindow.inc399
-rw-r--r--packages/gtk2/examples/gtk_demo/button_box.inc124
-rw-r--r--packages/gtk2/examples/gtk_demo/colorsel.inc108
-rw-r--r--packages/gtk2/examples/gtk_demo/data/alphatest.pngbin0 -> 26529 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/data/apple-red.pngbin0 -> 3545 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/data/background.jpgbin0 -> 22219 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/data/floppybuddy.gifbin0 -> 5216 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/data/gnome-applets.pngbin0 -> 3090 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/data/gnome-calendar.pngbin0 -> 2755 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/data/gnome-foot.pngbin0 -> 2916 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/data/gnome-gimp.pngbin0 -> 3410 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/data/gnome-gmush.pngbin0 -> 3244 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/data/gnome-gsame.pngbin0 -> 4263 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/data/gnu-keys.pngbin0 -> 3852 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/data/gtk-logo-rgb.gifbin0 -> 6427 bytes
-rw-r--r--packages/gtk2/examples/gtk_demo/dialog.inc189
-rw-r--r--packages/gtk2/examples/gtk_demo/drawingarea.inc320
-rw-r--r--packages/gtk2/examples/gtk_demo/editable_cells.inc314
-rw-r--r--packages/gtk2/examples/gtk_demo/gtk_demo.pas1090
-rw-r--r--packages/gtk2/examples/gtk_demo/images.inc438
-rw-r--r--packages/gtk2/examples/gtk_demo/init.inc52
-rw-r--r--packages/gtk2/examples/gtk_demo/item_factory.inc169
-rw-r--r--packages/gtk2/examples/gtk_demo/list_store.inc232
-rw-r--r--packages/gtk2/examples/gtk_demo/menus.inc220
-rw-r--r--packages/gtk2/examples/gtk_demo/panes.inc212
-rw-r--r--packages/gtk2/examples/gtk_demo/pixbufs.inc293
-rw-r--r--packages/gtk2/examples/gtk_demo/sizegroup.inc182
-rw-r--r--packages/gtk2/examples/gtk_demo/stock_browser.inc551
-rw-r--r--packages/gtk2/examples/gtk_demo/textview.inc643
-rw-r--r--packages/gtk2/examples/gtk_demo/tree_store.inc461
-rw-r--r--packages/gtk2/examples/gtkglext/Makefile2094
-rw-r--r--packages/gtk2/examples/gtkglext/Makefile.fpc18
-rw-r--r--packages/gtk2/examples/gtkglext/gears.pas549
-rw-r--r--packages/gtk2/examples/helloworld/Makefile2015
-rw-r--r--packages/gtk2/examples/helloworld/Makefile.fpc18
-rw-r--r--packages/gtk2/examples/helloworld/helloworld.pas95
-rw-r--r--packages/gtk2/examples/helloworld2/Makefile2015
-rw-r--r--packages/gtk2/examples/helloworld2/Makefile.fpc18
-rw-r--r--packages/gtk2/examples/helloworld2/helloworld2.pas99
-rw-r--r--packages/gtk2/examples/plugins/Makefile2015
-rw-r--r--packages/gtk2/examples/plugins/Makefile.fpc18
-rw-r--r--packages/gtk2/examples/plugins/main.pas46
-rw-r--r--packages/gtk2/examples/plugins/plugin.pas12
-rw-r--r--packages/gtk2/examples/scribble_simple/Makefile2015
-rw-r--r--packages/gtk2/examples/scribble_simple/Makefile.fpc18
-rw-r--r--packages/gtk2/examples/scribble_simple/scribble_simple.pas170
-rw-r--r--packages/gtk2/fpmake.pp1212
-rw-r--r--packages/gtk2/src/atk/atk.inc55
-rw-r--r--packages/gtk2/src/atk/atk.pas91
-rw-r--r--packages/gtk2/src/atk/atkaction.inc89
-rw-r--r--packages/gtk2/src/atk/atkcomponent.inc92
-rw-r--r--packages/gtk2/src/atk/atkdocument.inc71
-rw-r--r--packages/gtk2/src/atk/atkeditabletext.inc73
-rw-r--r--packages/gtk2/src/atk/atkgobjectaccessible.inc79
-rw-r--r--packages/gtk2/src/atk/atkhyperlink.inc101
-rw-r--r--packages/gtk2/src/atk/atkhypertext.inc68
-rw-r--r--packages/gtk2/src/atk/atkimage.inc68
-rw-r--r--packages/gtk2/src/atk/atkincludes.inc23
-rw-r--r--packages/gtk2/src/atk/atkobject.inc510
-rw-r--r--packages/gtk2/src/atk/atkobjectfactory.inc77
-rw-r--r--packages/gtk2/src/atk/atkregistry.inc75
-rw-r--r--packages/gtk2/src/atk/atkrelation.inc113
-rw-r--r--packages/gtk2/src/atk/atkrelationset.inc79
-rw-r--r--packages/gtk2/src/atk/atkselection.inc77
-rw-r--r--packages/gtk2/src/atk/atkstate.inc96
-rw-r--r--packages/gtk2/src/atk/atkstateset.inc80
-rw-r--r--packages/gtk2/src/atk/atkstreamablecontent.inc78
-rw-r--r--packages/gtk2/src/atk/atktable.inc129
-rw-r--r--packages/gtk2/src/atk/atktext.inc230
-rw-r--r--packages/gtk2/src/atk/atkutil.inc175
-rw-r--r--packages/gtk2/src/atk/atkvalue.inc76
-rw-r--r--packages/gtk2/src/buildgtk2.pp36
-rw-r--r--packages/gtk2/src/glib/galloca.inc10
-rw-r--r--packages/gtk2/src/glib/garray.inc126
-rw-r--r--packages/gtk2/src/glib/gasyncqueue.inc66
-rw-r--r--packages/gtk2/src/glib/gbacktrace.inc28
-rw-r--r--packages/gtk2/src/glib/gboxed.inc67
-rw-r--r--packages/gtk2/src/glib/gcache.inc25
-rw-r--r--packages/gtk2/src/glib/gclosure.inc149
-rw-r--r--packages/gtk2/src/glib/gcompletion.inc33
-rw-r--r--packages/gtk2/src/glib/gconvert.inc56
-rw-r--r--packages/gtk2/src/glib/gdataset.inc76
-rw-r--r--packages/gtk2/src/glib/gdate.inc256
-rw-r--r--packages/gtk2/src/glib/gdir.inc13
-rw-r--r--packages/gtk2/src/glib/genums.inc87
-rw-r--r--packages/gtk2/src/glib/gerror.inc48
-rw-r--r--packages/gtk2/src/glib/gfileutils.inc76
-rw-r--r--packages/gtk2/src/glib/ghash.inc57
-rw-r--r--packages/gtk2/src/glib/ghook.inc147
-rw-r--r--packages/gtk2/src/glib/giochannel.inc294
-rw-r--r--packages/gtk2/src/glib/glib2.pas1898
-rw-r--r--packages/gtk2/src/glib/glibconfig.inc115
-rw-r--r--packages/gtk2/src/glib/glist.inc86
-rw-r--r--packages/gtk2/src/glib/gmacros.inc17
-rw-r--r--packages/gtk2/src/glib/gmain.inc268
-rw-r--r--packages/gtk2/src/glib/gmarkup.inc111
-rw-r--r--packages/gtk2/src/glib/gmarshal.inc73
-rw-r--r--packages/gtk2/src/glib/gmem.inc125
-rw-r--r--packages/gtk2/src/glib/gmessages.inc140
-rw-r--r--packages/gtk2/src/glib/gmodule.inc41
-rw-r--r--packages/gtk2/src/glib/gnode.inc134
-rw-r--r--packages/gtk2/src/glib/gobject.inc136
-rw-r--r--packages/gtk2/src/glib/gparam.inc160
-rw-r--r--packages/gtk2/src/glib/gparamspecs.inc979
-rw-r--r--packages/gtk2/src/glib/gpattern.inc26
-rw-r--r--packages/gtk2/src/glib/gprimes.inc19
-rw-r--r--packages/gtk2/src/glib/gqsort.inc15
-rw-r--r--packages/gtk2/src/glib/gquark.inc22
-rw-r--r--packages/gtk2/src/glib/gqueue.inc44
-rw-r--r--packages/gtk2/src/glib/grand.inc50
-rw-r--r--packages/gtk2/src/glib/grel.inc69
-rw-r--r--packages/gtk2/src/glib/gscanner.inc334
-rw-r--r--packages/gtk2/src/glib/gshell.inc28
-rw-r--r--packages/gtk2/src/glib/gsignal.inc150
-rw-r--r--packages/gtk2/src/glib/gslist.inc80
-rw-r--r--packages/gtk2/src/glib/gsourceclosure.inc56
-rw-r--r--packages/gtk2/src/glib/gspawn.inc75
-rw-r--r--packages/gtk2/src/glib/gstrfuncs.inc157
-rw-r--r--packages/gtk2/src/glib/gstring.inc105
-rw-r--r--packages/gtk2/src/glib/gthread.inc278
-rw-r--r--packages/gtk2/src/glib/gthreadpool.inc57
-rw-r--r--packages/gtk2/src/glib/gtimer.inc23
-rw-r--r--packages/gtk2/src/glib/gtree.inc30
-rw-r--r--packages/gtk2/src/glib/gtype.inc281
-rw-r--r--packages/gtk2/src/glib/gtypemodule.inc145
-rw-r--r--packages/gtk2/src/glib/gtypeplugin.inc45
-rw-r--r--packages/gtk2/src/glib/gtypes.inc136
-rw-r--r--packages/gtk2/src/glib/gunicode.inc241
-rw-r--r--packages/gtk2/src/glib/gutils.inc162
-rw-r--r--packages/gtk2/src/glib/gvalue.inc63
-rw-r--r--packages/gtk2/src/glib/gvaluearray.inc49
-rw-r--r--packages/gtk2/src/glib/gvaluecollector.inc142
-rw-r--r--packages/gtk2/src/glib/gvaluetypes.inc111
-rw-r--r--packages/gtk2/src/glib/gwin32.inc48
-rw-r--r--packages/gtk2/src/gtk+/gdk-pixbuf/gdk-pixbuf-loader.inc77
-rw-r--r--packages/gtk2/src/gtk+/gdk-pixbuf/gdk2pixbuf.pas346
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdk2.pas240
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkcolor.inc141
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkcursor.inc138
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkdisplay.inc107
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkdnd.inc140
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkdrawable.inc225
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkevents.inc478
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkfont.inc85
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkgc.inc272
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdki18n.inc112
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkimage.inc128
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkincludes.inc29
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkinput.inc154
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkkeys.inc105
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkkeysyms.inc1342
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkpango.inc49
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkpixbuf.inc38
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkpixmap.inc125
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkpoly-generic.inc338
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkprivate.inc89
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkproperty.inc47
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkregion-generic.inc155
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkregion.inc58
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkrgb.inc84
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkscreen.inc106
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkselection.inc150
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdktypes.inc168
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkvisual.inc136
-rw-r--r--packages/gtk2/src/gtk+/gdk/gdkwindow.inc610
-rw-r--r--packages/gtk2/src/gtk+/gtk/fnmatch.inc51
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtk2.pas162
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkaccelgroup.inc167
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkaccellabel.inc124
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkaccelmap.inc36
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkaccessible.inc87
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkaction.inc115
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkactiongroup.inc141
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkadjustment.inc90
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkalignment.inc76
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkarrow.inc74
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkaspectframe.inc77
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkbbox.inc104
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkbin.inc72
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkbindings.inc143
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkbox.inc168
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkbutton.inc230
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcalendar.inc129
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcelleditable.inc68
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcelllayout.inc78
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcellrenderer.inc193
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcellrenderercombo.inc80
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcellrendererpixbuf.inc79
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcellrenderertext.inc233
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcellrenderertoggle.inc129
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcheckbutton.inc80
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcheckmenuitem.inc142
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkclipboard.inc50
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkclist.inc726
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcolorbutton.inc92
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcolorsel.inc113
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcolorseldialog.inc80
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcombo.inc175
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcombobox.inc108
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcomboboxentry.inc78
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcontainer.inc265
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkctree.inc363
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkcurve.inc121
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkdebug.inc24
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkdialog.inc155
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkdnd.inc78
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkdrawingarea.inc83
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkeditable.inc93
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkentry.inc350
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkentrycompletion.inc107
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkenums.inc463
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkeventbox.inc71
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkexpander.inc97
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfilechooser.inc150
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfilechooserdefault.inc51
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfilechooserdialog.inc81
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfilechooserembed.inc68
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfilechooserentry.inc54
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfilechooserprivate.inc75
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfilechooserutils.inc38
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfilechooserwidget.inc78
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfilefilter.inc71
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfilesel.inc112
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfilesystem.inc341
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfixed.inc83
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfontbutton.inc98
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkfontsel.inc206
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkframe.inc85
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkgamma.inc93
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkgc.inc17
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkhandlebox.inc186
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkhbbox.inc81
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkhbox.inc71
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkhpaned.inc71
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkhruler.inc81
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkhscale.inc72
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkhscrollbar.inc71
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkhseparator.inc71
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkhsv.inc114
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkiconfactory.inc147
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkicontheme.inc165
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkiconview.inc124
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkimage.inc166
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkimagemenuitem.inc78
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkimcontext.inc106
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkimcontextsimple.inc94
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkimmodule.inc73
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkimmulticontext.inc80
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkincludes.inc211
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkinputdialog.inc97
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkintl.inc88
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkinvisible.inc81
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkitem.inc81
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkitemfactory.inc180
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkkeyhash.inc45
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtklabel.inc203
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtklayout.inc112
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtklist.inc157
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtklistitem.inc89
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkliststore.inc129
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkmain.inc142
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkmenu.inc290
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkmenubar.inc102
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkmenuitem.inc210
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkmenushell.inc206
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkmessagedialog.inc109
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkmisc.inc77
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtknotebook.inc348
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkobject.inc247
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkoldeditable.inc148
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkoptionmenu.inc86
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkpaned.inc255
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkpixmap.inc95
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkplug.inc107
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkpreview.inc147
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkprogress.inc152
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkprogressbar.inc167
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkradioaction.inc86
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkradiobutton.inc95
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkradiomenuitem.inc93
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkradiotoolbutton.inc79
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkrange.inc268
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkrbtree.inc198
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkrc.inc231
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkruler.inc124
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkscale.inc120
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkscrollbar.inc75
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkscrolledwindow.inc189
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkselection.inc103
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkseparator.inc70
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkseparatormenuitem.inc71
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtksettings.inc115
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtksignal.inc212
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtksizegroup.inc137
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtksocket.inc172
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkspinbutton.inc273
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkstatusbar.inc112
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkstock.inc118
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkstyle.inc393
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktable.inc289
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktearoffmenuitem.inc94
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktext.inc277
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextbtree.inc205
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextbuffer.inc226
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextchild.inc84
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextchildprivate.inc37
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextdisplay.inc112
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextiter.inc187
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextiterprivate.inc40
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextlayout.inc318
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextmark.inc81
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextmarkprivate.inc66
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextsegment.inc149
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktexttag.inc770
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktexttagprivate.inc30
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktexttagtable.inc94
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktexttypes.inc49
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextutil.inc53
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktextview.inc370
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkthemes.inc71
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktipsquery.inc123
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktoggleaction.inc81
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktogglebutton.inc144
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktoggletoolbutton.inc78
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktoolbar.inc193
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktoolbutton.inc98
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktoolitem.inc118
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktooltips.inc164
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktree.inc170
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreedatalist.inc73
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreednd.inc117
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreeitem.inc110
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreemodel.inc196
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreemodelfilter.inc105
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreemodelsort.inc103
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreeprivate.inc370
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreeselection.inc106
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreesortable.inc82
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreestore.inc146
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreeview.inc198
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktreeviewcolumn.inc306
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtktypeutils.inc478
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkuimanager.inc123
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkvbbox.inc80
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkvbox.inc71
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkviewport.inc83
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkvpaned.inc71
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkvruler.inc81
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkvscale.inc72
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkvscrollbar.inc70
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkvseparator.inc71
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkwidget.inc764
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkwindow-decorate.inc39
-rw-r--r--packages/gtk2/src/gtk+/gtk/gtkwindow.inc551
-rw-r--r--packages/gtk2/src/gtk+/gtk/paste.pas25
-rw-r--r--packages/gtk2/src/gtk+/gtk/xembed.inc36
-rw-r--r--packages/gtk2/src/gtk2x11/gdk2x.pas64
-rw-r--r--packages/gtk2/src/gtk2x11/include/gdk2x11includes.inc14
-rw-r--r--packages/gtk2/src/gtk2x11/include/gdkdisplay-x11.inc121
-rw-r--r--packages/gtk2/src/gtk2x11/include/gdkdrawable-x11.inc75
-rw-r--r--packages/gtk2/src/gtk2x11/include/gdkinputprivate.inc148
-rw-r--r--packages/gtk2/src/gtk2x11/include/gdkpixmap-x11.inc90
-rw-r--r--packages/gtk2/src/gtk2x11/include/gdkprivate-x11.inc243
-rw-r--r--packages/gtk2/src/gtk2x11/include/gdkscreen-x11.inc95
-rw-r--r--packages/gtk2/src/gtk2x11/include/gdkwindow-x11.inc177
-rw-r--r--packages/gtk2/src/gtk2x11/include/gdkx.inc284
-rw-r--r--packages/gtk2/src/gtk2x11/include/gxid_proto.inc52
-rw-r--r--packages/gtk2/src/gtk2x11/include/mwmutil.inc109
-rw-r--r--packages/gtk2/src/gtk2x11/include/xsettings-client.inc27
-rw-r--r--packages/gtk2/src/gtk2x11/include/xsettings-common.inc111
-rwxr-xr-xpackages/gtk2/src/gtk2x11/scripts/gdkx11_h2pas.sh48
-rw-r--r--packages/gtk2/src/gtkglext/gdkglconfig.inc181
-rw-r--r--packages/gtk2/src/gtkglext/gdkglcontext.inc100
-rw-r--r--packages/gtk2/src/gtkglext/gdkgldefs.inc3
-rw-r--r--packages/gtk2/src/gtkglext/gdkgldrawable.inc154
-rw-r--r--packages/gtk2/src/gtkglext/gdkglenumtypes.inc85
-rw-r--r--packages/gtk2/src/gtkglext/gdkglext.pas58
-rw-r--r--packages/gtk2/src/gtkglext/gdkglext_includes.inc14
-rw-r--r--packages/gtk2/src/gtkglext/gdkglfont.inc22
-rw-r--r--packages/gtk2/src/gtkglext/gdkglinit.inc16
-rw-r--r--packages/gtk2/src/gtkglext/gdkglpixmap.inc110
-rw-r--r--packages/gtk2/src/gtkglext/gdkglquery.inc34
-rw-r--r--packages/gtk2/src/gtkglext/gdkglshapes.inc50
-rw-r--r--packages/gtk2/src/gtkglext/gdkgltokens.inc270
-rw-r--r--packages/gtk2/src/gtkglext/gdkgltypes.inc31
-rw-r--r--packages/gtk2/src/gtkglext/gdkglversion.inc50
-rw-r--r--packages/gtk2/src/gtkglext/gdkglwindow.inc110
-rw-r--r--packages/gtk2/src/gtkglext/gtkgldefs.inc3
-rw-r--r--packages/gtk2/src/gtkglext/gtkglext.pas60
-rw-r--r--packages/gtk2/src/gtkglext/gtkglext_includes.inc4
-rw-r--r--packages/gtk2/src/gtkglext/gtkglinit.inc16
-rw-r--r--packages/gtk2/src/gtkglext/gtkglversion.inc50
-rw-r--r--packages/gtk2/src/gtkglext/gtkglwidget.inc44
-rw-r--r--packages/gtk2/src/gtkhtml/dom-document.inc78
-rw-r--r--packages/gtk2/src/gtkhtml/dom-node.inc99
-rw-r--r--packages/gtk2/src/gtkhtml/dom-types.inc31
-rw-r--r--packages/gtk2/src/gtkhtml/gtkhtml.pas121
-rw-r--r--packages/gtk2/src/gtkhtml/gtkhtmlcontext.inc71
-rw-r--r--packages/gtk2/src/gtkhtml/gtkhtmlincludes.inc16
-rw-r--r--packages/gtk2/src/gtkhtml/htmldocument.inc96
-rw-r--r--packages/gtk2/src/gtkhtml/htmlevent.inc32
-rw-r--r--packages/gtk2/src/gtkhtml/htmlfocusiterator.inc75
-rw-r--r--packages/gtk2/src/gtkhtml/htmlfontspecification.inc122
-rw-r--r--packages/gtk2/src/gtkhtml/htmlparser.inc74
-rw-r--r--packages/gtk2/src/gtkhtml/htmlselection.inc29
-rw-r--r--packages/gtk2/src/gtkhtml/htmlstream.inc96
-rw-r--r--packages/gtk2/src/gtkhtml/htmlstreambuffer.inc27
-rw-r--r--packages/gtk2/src/gtkhtml/htmlview.inc98
-rw-r--r--packages/gtk2/src/libglade/glade-init.inc18
-rw-r--r--packages/gtk2/src/libglade/glade-xml.inc73
-rw-r--r--packages/gtk2/src/libglade/libglade2.pas130
-rw-r--r--packages/gtk2/src/pango/pango-attributes.inc167
-rw-r--r--packages/gtk2/src/pango/pango-break.inc203
-rw-r--r--packages/gtk2/src/pango/pango-context.inc89
-rw-r--r--packages/gtk2/src/pango/pango-coverage.inc41
-rw-r--r--packages/gtk2/src/pango/pango-engine.inc75
-rw-r--r--packages/gtk2/src/pango/pango-font.inc400
-rw-r--r--packages/gtk2/src/pango/pango-fontmap.inc94
-rw-r--r--packages/gtk2/src/pango/pango-fontset.inc114
-rw-r--r--packages/gtk2/src/pango/pango-glyph.inc105
-rw-r--r--packages/gtk2/src/pango/pango-item.inc34
-rw-r--r--packages/gtk2/src/pango/pango-layout.inc152
-rw-r--r--packages/gtk2/src/pango/pango-tabs.inc47
-rw-r--r--packages/gtk2/src/pango/pango-types.inc96
-rw-r--r--packages/gtk2/src/pango/pango.pas114
-rw-r--r--packages/gtk2/src/pango/pangoincludes.inc17
-rw-r--r--packages/gtk2/src/pango/pangoutils.pas108
441 files changed, 82050 insertions, 0 deletions
diff --git a/packages/gtk2/Makefile b/packages/gtk2/Makefile
new file mode 100644
index 0000000000..a5f68e90e6
--- /dev/null
+++ b/packages/gtk2/Makefile
@@ -0,0 +1,2882 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/01/26]
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
+BSDs = freebsd netbsd openbsd darwin
+UNIXs = linux $(BSDs) solaris qnx
+LIMIT83fs = go32v2 os2 emx watcom
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifneq ($(words $(FPC_COMPILERINFO)),5)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+override PACKAGE_NAME=gtk2
+override PACKAGE_VERSION=2.0.0
+ifneq ($(findstring $(OS_TARGET),linux freebsd netbsd openbsd solaris darwin ),)
+GDK2X=gdk2x
+GTK2X11=gtk2x11
+GTK2X11INCLUDE=src/gtk2x11/include
+endif
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_UNITS+=src/buildgtk2
+endif
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_IMPLICITUNITS+=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+endif
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_EXAMPLEDIRS+=examples
+endif
+override INSTALL_BUILDUNIT=buildgtk2
+override INSTALL_FPCPACKAGE=y
+ifeq ($(FULL_TARGET),i386-linux)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override COMPILER_INCLUDEDIR+=$(GTK2X11INCLUDE)
+endif
+ifeq ($(FULL_TARGET),i386-linux)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override COMPILER_UNITDIR+=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+endif
+override SHARED_BUILD=n
+override SHARED_BUILD=n
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+ifeq ($(OS_TARGET),darwin)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+else
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+AOUTEXT=.out
+SMARTEXT=.sl2
+STATICLIBPREFIX=
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),atari)
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),win32)
+ifeq ($(CROSSBINDIR),)
+ASNAME=asw
+LDNAME=ldw
+ARNAME=arw
+endif
+endif
+endif
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+PPAS=ppas$(SRCBATCHEXT)
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+export UPXPROG
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=rtl
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_RTL),)
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_RTL)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+endif
+ifdef REQUIRE_PACKAGES_X11
+PACKAGEDIR_X11:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /x11/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_X11),)
+ifneq ($(wildcard $(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)),)
+UNITDIR_X11=$(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)
+else
+UNITDIR_X11=$(PACKAGEDIR_X11)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_X11)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_X11) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_X11)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_X11=
+UNITDIR_X11:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /x11/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_X11),)
+UNITDIR_X11:=$(firstword $(UNITDIR_X11))
+else
+UNITDIR_X11=
+endif
+endif
+ifdef UNITDIR_X11
+override COMPILER_UNITDIR+=$(UNITDIR_X11)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(CPU_TARGET)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(CPU_TARGET)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+endif
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+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
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(CPU_TARGET),i386)
+FPCCPUOPT:=-OG2p3
+endif
+ifeq ($(CPU_TARGET),powerpc)
+FPCCPUOPT:=-O1r
+endif
+else
+FPCCPUOPT:=-O2
+endif
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
+endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(FPC) $(FPCOPT)
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+endif
+.PHONY: fpc_units
+ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)
+override ALLTARGET+=fpc_units
+override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
+override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
+override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
+override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
+endif
+fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_examples
+ifneq ($(TARGET_EXAMPLES),)
+HASEXAMPLES=1
+override EXAMPLESOURCEFILES:=$(wildcard $(addsuffix .pp,$(TARGET_EXAMPLES)) $(addsuffix .pas,$(TARGET_EXAMPLES)) $(addsuffix .lpr,$(TARGET_EXAMPLES)) $(addsuffix .dpr,$(TARGET_EXAMPLES)))
+override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES))
+override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPLES)))
+override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
+ifeq ($(OS_TARGET),os2)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))
+endif
+ifeq ($(OS_TARGET),emx)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))
+endif
+endif
+ifneq ($(TARGET_EXAMPLEDIRS),)
+HASEXAMPLES=1
+endif
+fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIRS))
+.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
+$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
+ @$(ECHOREDIR) Compiled > $(FPCMADE)
+fpc_all: $(FPCMADE)
+fpc_smart:
+ $(MAKE) all LINKSMART=1 CREATESMART=1
+fpc_debug:
+ $(MAKE) all DEBUG=1
+fpc_release:
+ $(MAKE) all RELEASE=1
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
+$(COMPILER_UNITTARGETDIR):
+ $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+$(COMPILER_TARGETDIR):
+ $(MKDIRTREE) $(COMPILER_TARGETDIR)
+%$(PPUEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(PPUEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.lpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.dpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%.res: %.rc
+ windres -i $< -o $@
+vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.inc $(COMPILER_INCLUDEDIR)
+vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
+vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
+.PHONY: fpc_shared
+override INSTALLTARGET+=fpc_shared_install
+ifndef SHARED_LIBVERSION
+SHARED_LIBVERSION=$(FPC_VERSION)
+endif
+ifndef SHARED_LIBNAME
+SHARED_LIBNAME=$(PACKAGE_NAME)
+endif
+ifndef SHARED_FULLNAME
+SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
+endif
+ifndef SHARED_LIBUNITS
+SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
+override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
+endif
+fpc_shared:
+ifdef HASSHAREDLIB
+ $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
+ifneq ($(SHARED_BUILD),n)
+ $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
+endif
+else
+ @$(ECHO) Shared Libraries not supported
+endif
+fpc_shared_install:
+ifneq ($(SHARED_BUILD),n)
+ifneq ($(SHARED_LIBUNITS),)
+ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
+ $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
+endif
+endif
+endif
+.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
+ifdef INSTALL_UNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
+endif
+ifdef INSTALL_BUILDUNIT
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
+endif
+ifdef INSTALLPPUFILES
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+ifneq ($(UNITTARGETDIRPREFIX),)
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
+override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
+endif
+override INSTALL_CREATEPACKAGEFPC=1
+endif
+ifdef INSTALLEXEFILES
+ifneq ($(TARGETDIRPREFIX),)
+override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
+endif
+endif
+fpc_install: all $(INSTALLTARGET)
+ifdef INSTALLEXEFILES
+ $(MKDIR) $(INSTALL_BINDIR)
+ifdef UPXPROG
+ -$(UPXPROG) $(INSTALLEXEFILES)
+endif
+ $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
+endif
+ifdef INSTALL_CREATEPACKAGEFPC
+ifdef FPCMAKE
+ifdef PACKAGE_VERSION
+ifneq ($(wildcard Makefile.fpc),)
+ $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
+endif
+endif
+endif
+ifdef INSTALLPPUFILES
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+ $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
+endif
+ifneq ($(wildcard $(LIB_FULLNAME)),)
+ $(MKDIR) $(INSTALL_LIBDIR)
+ $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
+ifdef inUnix
+ ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
+endif
+endif
+endif
+ifdef INSTALL_FILES
+ $(MKDIR) $(INSTALL_DATADIR)
+ $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
+endif
+fpc_sourceinstall: distclean
+ $(MKDIR) $(INSTALL_SOURCEDIR)
+ $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
+fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
+ifdef HASEXAMPLES
+ $(MKDIR) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef EXAMPLESOURCEFILES
+ $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
+endif
+.PHONY: fpc_distinstall
+fpc_distinstall: install exampleinstall
+.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall
+ifndef PACKDIR
+ifndef inUnix
+PACKDIR=$(BASEDIR)/../fpc-pack
+else
+PACKDIR=/tmp/fpc-pack
+endif
+endif
+ifndef ZIPNAME
+ifdef DIST_ZIPNAME
+ZIPNAME=$(DIST_ZIPNAME)
+else
+ZIPNAME=$(PACKAGE_NAME)
+endif
+endif
+ifndef FULLZIPNAME
+FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX)
+endif
+ifndef ZIPTARGET
+ifdef DIST_ZIPTARGET
+ZIPTARGET=DIST_ZIPTARGET
+else
+ZIPTARGET=install
+endif
+endif
+ifndef USEZIP
+ifdef inUnix
+USETAR=1
+endif
+endif
+ifndef inUnix
+USEZIPWRAPPER=1
+endif
+ifdef USEZIPWRAPPER
+ZIPPATHSEP=$(PATHSEP)
+ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT))
+else
+ZIPPATHSEP=/
+endif
+ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
+ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
+ifdef USETAR
+ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)
+ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
+else
+ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)
+ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
+endif
+fpc_zipinstall:
+ $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1
+ $(MKDIR) $(DIST_DESTDIR)
+ $(DEL) $(ZIPDESTFILE)
+ifdef USEZIPWRAPPER
+ifneq ($(ECHOREDIR),echo)
+ $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER)
+ $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)
+ $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER)
+else
+ echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
+ echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
+ echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
+endif
+ifdef inUnix
+ /bin/sh $(ZIPWRAPPER)
+else
+ifdef RUNBATCH
+ $(RUNBATCH) (ZIPWRAPPER)
+else
+ $(ZIPWRAPPER)
+endif
+endif
+ $(DEL) $(ZIPWRAPPER)
+else
+ $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
+endif
+ $(DELTREE) $(PACKDIR)
+fpc_zipsourceinstall:
+ $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIPSOURCESUFFIX)
+fpc_zipexampleinstall:
+ifdef HASEXAMPLES
+ $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZIPEXAMPLESUFFIX)
+endif
+fpc_zipdistinstall:
+ $(MAKE) fpc_zipinstall ZIPTARGET=distinstall
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
+override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+ -$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+ -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+ -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ -$(DELTREE) units
+ -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+ -$(DEL) *.o *.ppu *.a
+endif
+ -$(DELTREE) *$(SMARTEXT)
+ -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *_ppas$(BATCHEXT)
+ifdef AOUTEXT
+ -$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+ -$(DEL) *$(DEBUGSYMEXT)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+ @$(ECHO)
+ @$(ECHO) == Package info ==
+ @$(ECHO) Package Name..... $(PACKAGE_NAME)
+ @$(ECHO) Package Version.. $(PACKAGE_VERSION)
+ @$(ECHO)
+ @$(ECHO) == Configuration info ==
+ @$(ECHO)
+ @$(ECHO) FPC.......... $(FPC)
+ @$(ECHO) FPC Version.. $(FPC_VERSION)
+ @$(ECHO) Source CPU... $(CPU_SOURCE)
+ @$(ECHO) Target CPU... $(CPU_TARGET)
+ @$(ECHO) Source OS.... $(OS_SOURCE)
+ @$(ECHO) Target OS.... $(OS_TARGET)
+ @$(ECHO) Full Source.. $(FULL_SOURCE)
+ @$(ECHO) Full Target.. $(FULL_TARGET)
+ @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
+ @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
+ @$(ECHO)
+ @$(ECHO) == Directory info ==
+ @$(ECHO)
+ @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
+ @$(ECHO)
+ @$(ECHO) Basedir......... $(BASEDIR)
+ @$(ECHO) FPCDir.......... $(FPCDIR)
+ @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
+ @$(ECHO) UnitsDir........ $(UNITSDIR)
+ @$(ECHO) PackagesDir..... $(PACKAGESDIR)
+ @$(ECHO)
+ @$(ECHO) GCC library..... $(GCCLIBDIR)
+ @$(ECHO) Other library... $(OTHERLIBDIR)
+ @$(ECHO)
+ @$(ECHO) == Tools info ==
+ @$(ECHO)
+ @$(ECHO) As........ $(AS)
+ @$(ECHO) Ld........ $(LD)
+ @$(ECHO) Ar........ $(AR)
+ @$(ECHO) Rc........ $(RC)
+ @$(ECHO)
+ @$(ECHO) Mv........ $(MVPROG)
+ @$(ECHO) Cp........ $(CPPROG)
+ @$(ECHO) Rm........ $(RMPROG)
+ @$(ECHO) GInstall.. $(GINSTALL)
+ @$(ECHO) Echo...... $(ECHO)
+ @$(ECHO) Shell..... $(SHELL)
+ @$(ECHO) Date...... $(DATE)
+ @$(ECHO) FPCMake... $(FPCMAKE)
+ @$(ECHO) PPUMove... $(PPUMOVE)
+ @$(ECHO) Upx....... $(UPXPROG)
+ @$(ECHO) Zip....... $(ZIPPROG)
+ @$(ECHO)
+ @$(ECHO) == Object info ==
+ @$(ECHO)
+ @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
+ @$(ECHO) Target Units.......... $(TARGET_UNITS)
+ @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
+ @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
+ @$(ECHO) Target Dirs........... $(TARGET_DIRS)
+ @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
+ @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+ @$(ECHO)
+ @$(ECHO) Clean Units......... $(CLEAN_UNITS)
+ @$(ECHO) Clean Files......... $(CLEAN_FILES)
+ @$(ECHO)
+ @$(ECHO) Install Units....... $(INSTALL_UNITS)
+ @$(ECHO) Install Files....... $(INSTALL_FILES)
+ @$(ECHO)
+ @$(ECHO) == Install info ==
+ @$(ECHO)
+ @$(ECHO) DateStr.............. $(DATESTR)
+ @$(ECHO) ZipName.............. $(ZIPNAME)
+ @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
+ @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+ @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
+ @$(ECHO) FullZipName.......... $(FULLZIPNAME)
+ @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
+ @$(ECHO)
+ @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
+ @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
+ @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
+ @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
+ @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
+ @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
+ @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
+ @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
+ @$(ECHO)
+ @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
+ @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
+ @$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+ fpc_makefile_dirs
+fpc_makefile:
+ $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+ifeq ($(FULL_TARGET),i386-linux)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
+ifdef TARGET_EXAMPLEDIRS_EXAMPLES
+examples_all:
+ $(MAKE) -C examples all
+examples_debug:
+ $(MAKE) -C examples debug
+examples_smart:
+ $(MAKE) -C examples smart
+examples_release:
+ $(MAKE) -C examples release
+examples_units:
+ $(MAKE) -C examples units
+examples_examples:
+ $(MAKE) -C examples examples
+examples_shared:
+ $(MAKE) -C examples shared
+examples_install:
+ $(MAKE) -C examples install
+examples_sourceinstall:
+ $(MAKE) -C examples sourceinstall
+examples_exampleinstall:
+ $(MAKE) -C examples exampleinstall
+examples_distinstall:
+ $(MAKE) -C examples distinstall
+examples_zipinstall:
+ $(MAKE) -C examples zipinstall
+examples_zipsourceinstall:
+ $(MAKE) -C examples zipsourceinstall
+examples_zipexampleinstall:
+ $(MAKE) -C examples zipexampleinstall
+examples_zipdistinstall:
+ $(MAKE) -C examples zipdistinstall
+examples_clean:
+ $(MAKE) -C examples clean
+examples_distclean:
+ $(MAKE) -C examples distclean
+examples_cleanall:
+ $(MAKE) -C examples cleanall
+examples_info:
+ $(MAKE) -C examples info
+examples_makefiles:
+ $(MAKE) -C examples makefiles
+examples:
+ $(MAKE) -C examples all
+.PHONY: examples_all examples_debug examples_smart examples_release examples_units examples_examples examples_shared examples_install examples_sourceinstall examples_exampleinstall examples_distinstall examples_zipinstall examples_zipsourceinstall examples_zipexampleinstall examples_zipdistinstall examples_clean examples_distclean examples_cleanall examples_info examples_makefiles examples
+endif
+all: fpc_all
+debug: fpc_debug
+smart: fpc_smart
+release: fpc_release
+units: fpc_units
+examples: fpc_examples
+shared: fpc_shared
+install: fpc_install
+sourceinstall: fpc_sourceinstall
+exampleinstall: fpc_exampleinstall
+distinstall: fpc_distinstall
+zipinstall: fpc_zipinstall
+zipsourceinstall: fpc_zipsourceinstall
+zipexampleinstall: fpc_zipexampleinstall
+zipdistinstall: fpc_zipdistinstall
+clean: fpc_clean $(addsuffix _clean,$(TARGET_EXAMPLEDIRS))
+distclean: fpc_distclean
+cleanall: fpc_cleanall
+info: fpc_info
+makefiles: fpc_makefiles
+.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+.NOTPARALLEL:
diff --git a/packages/gtk2/Makefile.fpc b/packages/gtk2/Makefile.fpc
new file mode 100644
index 0000000000..5db715ae5c
--- /dev/null
+++ b/packages/gtk2/Makefile.fpc
@@ -0,0 +1,45 @@
+#
+# Makefile.fpc for Free Pascal GTK 2.x.y Bindings
+#
+
+[package]
+name=gtk2
+version=2.0.0
+
+[require]
+libc=y
+packages_linux=x11
+packages_freebsd=x11
+packages_solaris=x11
+packages_openbsd=x11
+packages_netbsd=x11
+packages_darwin=x11
+
+[target]
+units=src/buildgtk2
+exampledirs=examples
+implicitunits=glib2 atk pango gdk2pixbuf gdk2 gtk2 libglade2 gtkglext gdkglext $(GDK2X)
+
+[compiler]
+unitdir=src src/glib src/atk src/pango src/gtk+/gdk-pixbuf src/gtk+/gdk src/gtk+/gtk src/libglade src/gtkglext src/$(GTK2X11)
+includedir=$(GTK2X11INCLUDE)
+
+[install]
+buildunit=buildgtk2
+fpcpackage=y
+
+[shared]
+build=n
+
+[default]
+fpcdir=../..
+
+[prerules]
+ifneq ($(findstring $(OS_TARGET),linux freebsd netbsd openbsd solaris darwin ),)
+GDK2X=gdk2x
+GTK2X11=gtk2x11
+GTK2X11INCLUDE=src/gtk2x11/include
+endif
+
+[rules]
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/Makefile b/packages/gtk2/examples/Makefile
new file mode 100644
index 0000000000..eb356ab765
--- /dev/null
+++ b/packages/gtk2/examples/Makefile
@@ -0,0 +1,2646 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/01/26]
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
+BSDs = freebsd netbsd openbsd darwin
+UNIXs = linux $(BSDs) solaris qnx
+LIMIT83fs = go32v2 os2 emx watcom
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifneq ($(words $(FPC_COMPILERINFO)),5)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_DIRS+=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+endif
+override INSTALL_FPCPACKAGE=y
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+ifeq ($(OS_TARGET),darwin)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+else
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+AOUTEXT=.out
+SMARTEXT=.sl2
+STATICLIBPREFIX=
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),atari)
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),win32)
+ifeq ($(CROSSBINDIR),)
+ASNAME=asw
+LDNAME=ldw
+ARNAME=arw
+endif
+endif
+endif
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+PPAS=ppas$(SRCBATCHEXT)
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+export UPXPROG
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=gtk2
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifdef REQUIRE_PACKAGES_X11
+PACKAGEDIR_X11:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /x11/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_X11),)
+ifneq ($(wildcard $(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)),)
+UNITDIR_X11=$(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)
+else
+UNITDIR_X11=$(PACKAGEDIR_X11)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_X11)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_X11) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_X11)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_X11=
+UNITDIR_X11:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /x11/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_X11),)
+UNITDIR_X11:=$(firstword $(UNITDIR_X11))
+else
+UNITDIR_X11=
+endif
+endif
+ifdef UNITDIR_X11
+override COMPILER_UNITDIR+=$(UNITDIR_X11)
+endif
+endif
+ifdef REQUIRE_PACKAGES_GTK2
+PACKAGEDIR_GTK2:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_GTK2),)
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)),)
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)
+else
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_GTK2)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_GTK2) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_GTK2)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_GTK2=
+UNITDIR_GTK2:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_GTK2),)
+UNITDIR_GTK2:=$(firstword $(UNITDIR_GTK2))
+else
+UNITDIR_GTK2=
+endif
+endif
+ifdef UNITDIR_GTK2
+override COMPILER_UNITDIR+=$(UNITDIR_GTK2)
+endif
+endif
+ifdef REQUIRE_PACKAGES_OPENGL
+PACKAGEDIR_OPENGL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /opengl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_OPENGL),)
+ifneq ($(wildcard $(PACKAGEDIR_OPENGL)/units/$(TARGETSUFFIX)),)
+UNITDIR_OPENGL=$(PACKAGEDIR_OPENGL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_OPENGL=$(PACKAGEDIR_OPENGL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_OPENGL)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_OPENGL) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_OPENGL)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_OPENGL=
+UNITDIR_OPENGL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /opengl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_OPENGL),)
+UNITDIR_OPENGL:=$(firstword $(UNITDIR_OPENGL))
+else
+UNITDIR_OPENGL=
+endif
+endif
+ifdef UNITDIR_OPENGL
+override COMPILER_UNITDIR+=$(UNITDIR_OPENGL)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(CPU_TARGET)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(CPU_TARGET)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+endif
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+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
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(CPU_TARGET),i386)
+FPCCPUOPT:=-OG2p3
+endif
+ifeq ($(CPU_TARGET),powerpc)
+FPCCPUOPT:=-O1r
+endif
+else
+FPCCPUOPT:=-O2
+endif
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
+endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(FPC) $(FPCOPT)
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+endif
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
+override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+ -$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+ -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+ -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ -$(DELTREE) units
+ -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+ -$(DEL) *.o *.ppu *.a
+endif
+ -$(DELTREE) *$(SMARTEXT)
+ -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *_ppas$(BATCHEXT)
+ifdef AOUTEXT
+ -$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+ -$(DEL) *$(DEBUGSYMEXT)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+ @$(ECHO)
+ @$(ECHO) == Package info ==
+ @$(ECHO) Package Name..... $(PACKAGE_NAME)
+ @$(ECHO) Package Version.. $(PACKAGE_VERSION)
+ @$(ECHO)
+ @$(ECHO) == Configuration info ==
+ @$(ECHO)
+ @$(ECHO) FPC.......... $(FPC)
+ @$(ECHO) FPC Version.. $(FPC_VERSION)
+ @$(ECHO) Source CPU... $(CPU_SOURCE)
+ @$(ECHO) Target CPU... $(CPU_TARGET)
+ @$(ECHO) Source OS.... $(OS_SOURCE)
+ @$(ECHO) Target OS.... $(OS_TARGET)
+ @$(ECHO) Full Source.. $(FULL_SOURCE)
+ @$(ECHO) Full Target.. $(FULL_TARGET)
+ @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
+ @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
+ @$(ECHO)
+ @$(ECHO) == Directory info ==
+ @$(ECHO)
+ @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
+ @$(ECHO)
+ @$(ECHO) Basedir......... $(BASEDIR)
+ @$(ECHO) FPCDir.......... $(FPCDIR)
+ @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
+ @$(ECHO) UnitsDir........ $(UNITSDIR)
+ @$(ECHO) PackagesDir..... $(PACKAGESDIR)
+ @$(ECHO)
+ @$(ECHO) GCC library..... $(GCCLIBDIR)
+ @$(ECHO) Other library... $(OTHERLIBDIR)
+ @$(ECHO)
+ @$(ECHO) == Tools info ==
+ @$(ECHO)
+ @$(ECHO) As........ $(AS)
+ @$(ECHO) Ld........ $(LD)
+ @$(ECHO) Ar........ $(AR)
+ @$(ECHO) Rc........ $(RC)
+ @$(ECHO)
+ @$(ECHO) Mv........ $(MVPROG)
+ @$(ECHO) Cp........ $(CPPROG)
+ @$(ECHO) Rm........ $(RMPROG)
+ @$(ECHO) GInstall.. $(GINSTALL)
+ @$(ECHO) Echo...... $(ECHO)
+ @$(ECHO) Shell..... $(SHELL)
+ @$(ECHO) Date...... $(DATE)
+ @$(ECHO) FPCMake... $(FPCMAKE)
+ @$(ECHO) PPUMove... $(PPUMOVE)
+ @$(ECHO) Upx....... $(UPXPROG)
+ @$(ECHO) Zip....... $(ZIPPROG)
+ @$(ECHO)
+ @$(ECHO) == Object info ==
+ @$(ECHO)
+ @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
+ @$(ECHO) Target Units.......... $(TARGET_UNITS)
+ @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
+ @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
+ @$(ECHO) Target Dirs........... $(TARGET_DIRS)
+ @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
+ @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+ @$(ECHO)
+ @$(ECHO) Clean Units......... $(CLEAN_UNITS)
+ @$(ECHO) Clean Files......... $(CLEAN_FILES)
+ @$(ECHO)
+ @$(ECHO) Install Units....... $(INSTALL_UNITS)
+ @$(ECHO) Install Files....... $(INSTALL_FILES)
+ @$(ECHO)
+ @$(ECHO) == Install info ==
+ @$(ECHO)
+ @$(ECHO) DateStr.............. $(DATESTR)
+ @$(ECHO) ZipName.............. $(ZIPNAME)
+ @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
+ @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+ @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
+ @$(ECHO) FullZipName.......... $(FULLZIPNAME)
+ @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
+ @$(ECHO)
+ @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
+ @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
+ @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
+ @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
+ @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
+ @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
+ @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
+ @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
+ @$(ECHO)
+ @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
+ @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
+ @$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+ fpc_makefile_dirs
+fpc_makefile:
+ $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+ifeq ($(FULL_TARGET),i386-linux)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+TARGET_DIRS_HELLOWORLD=1
+TARGET_DIRS_HELLOWORLD2=1
+TARGET_DIRS_GTK_DEMO=1
+TARGET_DIRS_GETTINGSTARTED=1
+TARGET_DIRS_PLUGINS=1
+TARGET_DIRS_SCRIBBLE_SIMPLE=1
+TARGET_DIRS_GTKGLEXT=1
+endif
+ifdef TARGET_DIRS_HELLOWORLD
+helloworld_all:
+ $(MAKE) -C helloworld all
+helloworld_debug:
+ $(MAKE) -C helloworld debug
+helloworld_smart:
+ $(MAKE) -C helloworld smart
+helloworld_release:
+ $(MAKE) -C helloworld release
+helloworld_units:
+ $(MAKE) -C helloworld units
+helloworld_examples:
+ $(MAKE) -C helloworld examples
+helloworld_shared:
+ $(MAKE) -C helloworld shared
+helloworld_install:
+ $(MAKE) -C helloworld install
+helloworld_sourceinstall:
+ $(MAKE) -C helloworld sourceinstall
+helloworld_exampleinstall:
+ $(MAKE) -C helloworld exampleinstall
+helloworld_distinstall:
+ $(MAKE) -C helloworld distinstall
+helloworld_zipinstall:
+ $(MAKE) -C helloworld zipinstall
+helloworld_zipsourceinstall:
+ $(MAKE) -C helloworld zipsourceinstall
+helloworld_zipexampleinstall:
+ $(MAKE) -C helloworld zipexampleinstall
+helloworld_zipdistinstall:
+ $(MAKE) -C helloworld zipdistinstall
+helloworld_clean:
+ $(MAKE) -C helloworld clean
+helloworld_distclean:
+ $(MAKE) -C helloworld distclean
+helloworld_cleanall:
+ $(MAKE) -C helloworld cleanall
+helloworld_info:
+ $(MAKE) -C helloworld info
+helloworld_makefiles:
+ $(MAKE) -C helloworld makefiles
+helloworld:
+ $(MAKE) -C helloworld all
+.PHONY: helloworld_all helloworld_debug helloworld_smart helloworld_release helloworld_units helloworld_examples helloworld_shared helloworld_install helloworld_sourceinstall helloworld_exampleinstall helloworld_distinstall helloworld_zipinstall helloworld_zipsourceinstall helloworld_zipexampleinstall helloworld_zipdistinstall helloworld_clean helloworld_distclean helloworld_cleanall helloworld_info helloworld_makefiles helloworld
+endif
+ifdef TARGET_DIRS_HELLOWORLD2
+helloworld2_all:
+ $(MAKE) -C helloworld2 all
+helloworld2_debug:
+ $(MAKE) -C helloworld2 debug
+helloworld2_smart:
+ $(MAKE) -C helloworld2 smart
+helloworld2_release:
+ $(MAKE) -C helloworld2 release
+helloworld2_units:
+ $(MAKE) -C helloworld2 units
+helloworld2_examples:
+ $(MAKE) -C helloworld2 examples
+helloworld2_shared:
+ $(MAKE) -C helloworld2 shared
+helloworld2_install:
+ $(MAKE) -C helloworld2 install
+helloworld2_sourceinstall:
+ $(MAKE) -C helloworld2 sourceinstall
+helloworld2_exampleinstall:
+ $(MAKE) -C helloworld2 exampleinstall
+helloworld2_distinstall:
+ $(MAKE) -C helloworld2 distinstall
+helloworld2_zipinstall:
+ $(MAKE) -C helloworld2 zipinstall
+helloworld2_zipsourceinstall:
+ $(MAKE) -C helloworld2 zipsourceinstall
+helloworld2_zipexampleinstall:
+ $(MAKE) -C helloworld2 zipexampleinstall
+helloworld2_zipdistinstall:
+ $(MAKE) -C helloworld2 zipdistinstall
+helloworld2_clean:
+ $(MAKE) -C helloworld2 clean
+helloworld2_distclean:
+ $(MAKE) -C helloworld2 distclean
+helloworld2_cleanall:
+ $(MAKE) -C helloworld2 cleanall
+helloworld2_info:
+ $(MAKE) -C helloworld2 info
+helloworld2_makefiles:
+ $(MAKE) -C helloworld2 makefiles
+helloworld2:
+ $(MAKE) -C helloworld2 all
+.PHONY: helloworld2_all helloworld2_debug helloworld2_smart helloworld2_release helloworld2_units helloworld2_examples helloworld2_shared helloworld2_install helloworld2_sourceinstall helloworld2_exampleinstall helloworld2_distinstall helloworld2_zipinstall helloworld2_zipsourceinstall helloworld2_zipexampleinstall helloworld2_zipdistinstall helloworld2_clean helloworld2_distclean helloworld2_cleanall helloworld2_info helloworld2_makefiles helloworld2
+endif
+ifdef TARGET_DIRS_GTK_DEMO
+gtk_demo_all:
+ $(MAKE) -C gtk_demo all
+gtk_demo_debug:
+ $(MAKE) -C gtk_demo debug
+gtk_demo_smart:
+ $(MAKE) -C gtk_demo smart
+gtk_demo_release:
+ $(MAKE) -C gtk_demo release
+gtk_demo_units:
+ $(MAKE) -C gtk_demo units
+gtk_demo_examples:
+ $(MAKE) -C gtk_demo examples
+gtk_demo_shared:
+ $(MAKE) -C gtk_demo shared
+gtk_demo_install:
+ $(MAKE) -C gtk_demo install
+gtk_demo_sourceinstall:
+ $(MAKE) -C gtk_demo sourceinstall
+gtk_demo_exampleinstall:
+ $(MAKE) -C gtk_demo exampleinstall
+gtk_demo_distinstall:
+ $(MAKE) -C gtk_demo distinstall
+gtk_demo_zipinstall:
+ $(MAKE) -C gtk_demo zipinstall
+gtk_demo_zipsourceinstall:
+ $(MAKE) -C gtk_demo zipsourceinstall
+gtk_demo_zipexampleinstall:
+ $(MAKE) -C gtk_demo zipexampleinstall
+gtk_demo_zipdistinstall:
+ $(MAKE) -C gtk_demo zipdistinstall
+gtk_demo_clean:
+ $(MAKE) -C gtk_demo clean
+gtk_demo_distclean:
+ $(MAKE) -C gtk_demo distclean
+gtk_demo_cleanall:
+ $(MAKE) -C gtk_demo cleanall
+gtk_demo_info:
+ $(MAKE) -C gtk_demo info
+gtk_demo_makefiles:
+ $(MAKE) -C gtk_demo makefiles
+gtk_demo:
+ $(MAKE) -C gtk_demo all
+.PHONY: gtk_demo_all gtk_demo_debug gtk_demo_smart gtk_demo_release gtk_demo_units gtk_demo_examples gtk_demo_shared gtk_demo_install gtk_demo_sourceinstall gtk_demo_exampleinstall gtk_demo_distinstall gtk_demo_zipinstall gtk_demo_zipsourceinstall gtk_demo_zipexampleinstall gtk_demo_zipdistinstall gtk_demo_clean gtk_demo_distclean gtk_demo_cleanall gtk_demo_info gtk_demo_makefiles gtk_demo
+endif
+ifdef TARGET_DIRS_GETTINGSTARTED
+gettingstarted_all:
+ $(MAKE) -C gettingstarted all
+gettingstarted_debug:
+ $(MAKE) -C gettingstarted debug
+gettingstarted_smart:
+ $(MAKE) -C gettingstarted smart
+gettingstarted_release:
+ $(MAKE) -C gettingstarted release
+gettingstarted_units:
+ $(MAKE) -C gettingstarted units
+gettingstarted_examples:
+ $(MAKE) -C gettingstarted examples
+gettingstarted_shared:
+ $(MAKE) -C gettingstarted shared
+gettingstarted_install:
+ $(MAKE) -C gettingstarted install
+gettingstarted_sourceinstall:
+ $(MAKE) -C gettingstarted sourceinstall
+gettingstarted_exampleinstall:
+ $(MAKE) -C gettingstarted exampleinstall
+gettingstarted_distinstall:
+ $(MAKE) -C gettingstarted distinstall
+gettingstarted_zipinstall:
+ $(MAKE) -C gettingstarted zipinstall
+gettingstarted_zipsourceinstall:
+ $(MAKE) -C gettingstarted zipsourceinstall
+gettingstarted_zipexampleinstall:
+ $(MAKE) -C gettingstarted zipexampleinstall
+gettingstarted_zipdistinstall:
+ $(MAKE) -C gettingstarted zipdistinstall
+gettingstarted_clean:
+ $(MAKE) -C gettingstarted clean
+gettingstarted_distclean:
+ $(MAKE) -C gettingstarted distclean
+gettingstarted_cleanall:
+ $(MAKE) -C gettingstarted cleanall
+gettingstarted_info:
+ $(MAKE) -C gettingstarted info
+gettingstarted_makefiles:
+ $(MAKE) -C gettingstarted makefiles
+gettingstarted:
+ $(MAKE) -C gettingstarted all
+.PHONY: gettingstarted_all gettingstarted_debug gettingstarted_smart gettingstarted_release gettingstarted_units gettingstarted_examples gettingstarted_shared gettingstarted_install gettingstarted_sourceinstall gettingstarted_exampleinstall gettingstarted_distinstall gettingstarted_zipinstall gettingstarted_zipsourceinstall gettingstarted_zipexampleinstall gettingstarted_zipdistinstall gettingstarted_clean gettingstarted_distclean gettingstarted_cleanall gettingstarted_info gettingstarted_makefiles gettingstarted
+endif
+ifdef TARGET_DIRS_PLUGINS
+plugins_all:
+ $(MAKE) -C plugins all
+plugins_debug:
+ $(MAKE) -C plugins debug
+plugins_smart:
+ $(MAKE) -C plugins smart
+plugins_release:
+ $(MAKE) -C plugins release
+plugins_units:
+ $(MAKE) -C plugins units
+plugins_examples:
+ $(MAKE) -C plugins examples
+plugins_shared:
+ $(MAKE) -C plugins shared
+plugins_install:
+ $(MAKE) -C plugins install
+plugins_sourceinstall:
+ $(MAKE) -C plugins sourceinstall
+plugins_exampleinstall:
+ $(MAKE) -C plugins exampleinstall
+plugins_distinstall:
+ $(MAKE) -C plugins distinstall
+plugins_zipinstall:
+ $(MAKE) -C plugins zipinstall
+plugins_zipsourceinstall:
+ $(MAKE) -C plugins zipsourceinstall
+plugins_zipexampleinstall:
+ $(MAKE) -C plugins zipexampleinstall
+plugins_zipdistinstall:
+ $(MAKE) -C plugins zipdistinstall
+plugins_clean:
+ $(MAKE) -C plugins clean
+plugins_distclean:
+ $(MAKE) -C plugins distclean
+plugins_cleanall:
+ $(MAKE) -C plugins cleanall
+plugins_info:
+ $(MAKE) -C plugins info
+plugins_makefiles:
+ $(MAKE) -C plugins makefiles
+plugins:
+ $(MAKE) -C plugins all
+.PHONY: plugins_all plugins_debug plugins_smart plugins_release plugins_units plugins_examples plugins_shared plugins_install plugins_sourceinstall plugins_exampleinstall plugins_distinstall plugins_zipinstall plugins_zipsourceinstall plugins_zipexampleinstall plugins_zipdistinstall plugins_clean plugins_distclean plugins_cleanall plugins_info plugins_makefiles plugins
+endif
+ifdef TARGET_DIRS_SCRIBBLE_SIMPLE
+scribble_simple_all:
+ $(MAKE) -C scribble_simple all
+scribble_simple_debug:
+ $(MAKE) -C scribble_simple debug
+scribble_simple_smart:
+ $(MAKE) -C scribble_simple smart
+scribble_simple_release:
+ $(MAKE) -C scribble_simple release
+scribble_simple_units:
+ $(MAKE) -C scribble_simple units
+scribble_simple_examples:
+ $(MAKE) -C scribble_simple examples
+scribble_simple_shared:
+ $(MAKE) -C scribble_simple shared
+scribble_simple_install:
+ $(MAKE) -C scribble_simple install
+scribble_simple_sourceinstall:
+ $(MAKE) -C scribble_simple sourceinstall
+scribble_simple_exampleinstall:
+ $(MAKE) -C scribble_simple exampleinstall
+scribble_simple_distinstall:
+ $(MAKE) -C scribble_simple distinstall
+scribble_simple_zipinstall:
+ $(MAKE) -C scribble_simple zipinstall
+scribble_simple_zipsourceinstall:
+ $(MAKE) -C scribble_simple zipsourceinstall
+scribble_simple_zipexampleinstall:
+ $(MAKE) -C scribble_simple zipexampleinstall
+scribble_simple_zipdistinstall:
+ $(MAKE) -C scribble_simple zipdistinstall
+scribble_simple_clean:
+ $(MAKE) -C scribble_simple clean
+scribble_simple_distclean:
+ $(MAKE) -C scribble_simple distclean
+scribble_simple_cleanall:
+ $(MAKE) -C scribble_simple cleanall
+scribble_simple_info:
+ $(MAKE) -C scribble_simple info
+scribble_simple_makefiles:
+ $(MAKE) -C scribble_simple makefiles
+scribble_simple:
+ $(MAKE) -C scribble_simple all
+.PHONY: scribble_simple_all scribble_simple_debug scribble_simple_smart scribble_simple_release scribble_simple_units scribble_simple_examples scribble_simple_shared scribble_simple_install scribble_simple_sourceinstall scribble_simple_exampleinstall scribble_simple_distinstall scribble_simple_zipinstall scribble_simple_zipsourceinstall scribble_simple_zipexampleinstall scribble_simple_zipdistinstall scribble_simple_clean scribble_simple_distclean scribble_simple_cleanall scribble_simple_info scribble_simple_makefiles scribble_simple
+endif
+ifdef TARGET_DIRS_GTKGLEXT
+gtkglext_all:
+ $(MAKE) -C gtkglext all
+gtkglext_debug:
+ $(MAKE) -C gtkglext debug
+gtkglext_smart:
+ $(MAKE) -C gtkglext smart
+gtkglext_release:
+ $(MAKE) -C gtkglext release
+gtkglext_units:
+ $(MAKE) -C gtkglext units
+gtkglext_examples:
+ $(MAKE) -C gtkglext examples
+gtkglext_shared:
+ $(MAKE) -C gtkglext shared
+gtkglext_install:
+ $(MAKE) -C gtkglext install
+gtkglext_sourceinstall:
+ $(MAKE) -C gtkglext sourceinstall
+gtkglext_exampleinstall:
+ $(MAKE) -C gtkglext exampleinstall
+gtkglext_distinstall:
+ $(MAKE) -C gtkglext distinstall
+gtkglext_zipinstall:
+ $(MAKE) -C gtkglext zipinstall
+gtkglext_zipsourceinstall:
+ $(MAKE) -C gtkglext zipsourceinstall
+gtkglext_zipexampleinstall:
+ $(MAKE) -C gtkglext zipexampleinstall
+gtkglext_zipdistinstall:
+ $(MAKE) -C gtkglext zipdistinstall
+gtkglext_clean:
+ $(MAKE) -C gtkglext clean
+gtkglext_distclean:
+ $(MAKE) -C gtkglext distclean
+gtkglext_cleanall:
+ $(MAKE) -C gtkglext cleanall
+gtkglext_info:
+ $(MAKE) -C gtkglext info
+gtkglext_makefiles:
+ $(MAKE) -C gtkglext makefiles
+gtkglext:
+ $(MAKE) -C gtkglext all
+.PHONY: gtkglext_all gtkglext_debug gtkglext_smart gtkglext_release gtkglext_units gtkglext_examples gtkglext_shared gtkglext_install gtkglext_sourceinstall gtkglext_exampleinstall gtkglext_distinstall gtkglext_zipinstall gtkglext_zipsourceinstall gtkglext_zipexampleinstall gtkglext_zipdistinstall gtkglext_clean gtkglext_distclean gtkglext_cleanall gtkglext_info gtkglext_makefiles gtkglext
+endif
+all: $(addsuffix _all,$(TARGET_DIRS))
+debug: $(addsuffix _debug,$(TARGET_DIRS))
+smart: $(addsuffix _smart,$(TARGET_DIRS))
+release: $(addsuffix _release,$(TARGET_DIRS))
+units: $(addsuffix _units,$(TARGET_DIRS))
+examples: $(addsuffix _examples,$(TARGET_DIRS))
+shared: $(addsuffix _shared,$(TARGET_DIRS))
+install: $(addsuffix _install,$(TARGET_DIRS))
+sourceinstall: $(addsuffix _sourceinstall,$(TARGET_DIRS))
+exampleinstall: $(addsuffix _exampleinstall,$(TARGET_DIRS))
+distinstall: $(addsuffix _distinstall,$(TARGET_DIRS))
+zipinstall: $(addsuffix _zipinstall,$(TARGET_DIRS))
+zipsourceinstall: $(addsuffix _zipsourceinstall,$(TARGET_DIRS))
+zipexampleinstall: $(addsuffix _zipexampleinstall,$(TARGET_DIRS))
+zipdistinstall: $(addsuffix _zipdistinstall,$(TARGET_DIRS))
+clean: $(addsuffix _clean,$(TARGET_DIRS))
+distclean: $(addsuffix _distclean,$(TARGET_DIRS))
+cleanall: $(addsuffix _cleanall,$(TARGET_DIRS))
+info: fpc_info
+makefiles: fpc_makefiles $(addsuffix _makefiles,$(TARGET_DIRS))
+.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/Makefile.fpc b/packages/gtk2/examples/Makefile.fpc
new file mode 100644
index 0000000000..d914d46184
--- /dev/null
+++ b/packages/gtk2/examples/Makefile.fpc
@@ -0,0 +1,19 @@
+#
+# Makefile.fpc for Free Pascal GTK 2.x.y Examples
+#
+
+[target]
+dirs=helloworld helloworld2 gtk_demo gettingstarted plugins scribble_simple gtkglext
+#filechooser - doesn't work yet
+
+[require]
+packages=gtk2
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../../..
+
+[rules]
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/filechooser/Makefile b/packages/gtk2/examples/filechooser/Makefile
new file mode 100644
index 0000000000..f3eb484bc8
--- /dev/null
+++ b/packages/gtk2/examples/filechooser/Makefile
@@ -0,0 +1,2015 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/01/26]
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
+BSDs = freebsd netbsd openbsd darwin
+UNIXs = linux $(BSDs) solaris qnx
+LIMIT83fs = go32v2 os2 emx watcom
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../../../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifneq ($(words $(FPC_COMPILERINFO)),5)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=simple glade
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_PROGRAMS+=simple glade
+endif
+override INSTALL_FPCPACKAGE=y
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+ifeq ($(OS_TARGET),darwin)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+else
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+AOUTEXT=.out
+SMARTEXT=.sl2
+STATICLIBPREFIX=
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),atari)
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),win32)
+ifeq ($(CROSSBINDIR),)
+ASNAME=asw
+LDNAME=ldw
+ARNAME=arw
+endif
+endif
+endif
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+PPAS=ppas$(SRCBATCHEXT)
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+export UPXPROG
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=rtl gtk2
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_RTL),)
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_RTL)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+endif
+ifdef REQUIRE_PACKAGES_X11
+PACKAGEDIR_X11:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /x11/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_X11),)
+ifneq ($(wildcard $(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)),)
+UNITDIR_X11=$(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)
+else
+UNITDIR_X11=$(PACKAGEDIR_X11)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_X11)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_X11) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_X11)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_X11=
+UNITDIR_X11:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /x11/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_X11),)
+UNITDIR_X11:=$(firstword $(UNITDIR_X11))
+else
+UNITDIR_X11=
+endif
+endif
+ifdef UNITDIR_X11
+override COMPILER_UNITDIR+=$(UNITDIR_X11)
+endif
+endif
+ifdef REQUIRE_PACKAGES_GTK2
+PACKAGEDIR_GTK2:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_GTK2),)
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)),)
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)
+else
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_GTK2)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_GTK2) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_GTK2)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_GTK2=
+UNITDIR_GTK2:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_GTK2),)
+UNITDIR_GTK2:=$(firstword $(UNITDIR_GTK2))
+else
+UNITDIR_GTK2=
+endif
+endif
+ifdef UNITDIR_GTK2
+override COMPILER_UNITDIR+=$(UNITDIR_GTK2)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(CPU_TARGET)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(CPU_TARGET)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+endif
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+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
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(CPU_TARGET),i386)
+FPCCPUOPT:=-OG2p3
+endif
+ifeq ($(CPU_TARGET),powerpc)
+FPCCPUOPT:=-O1r
+endif
+else
+FPCCPUOPT:=-O2
+endif
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
+endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(FPC) $(FPCOPT)
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+endif
+.PHONY: fpc_exes
+ifndef CROSSINSTALL
+ifneq ($(TARGET_PROGRAMS),)
+override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
+override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
+override ALLTARGET+=fpc_exes
+override INSTALLEXEFILES+=$(EXEFILES)
+override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+ifeq ($(OS_TARGET),os2)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+ifeq ($(OS_TARGET),emx)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+endif
+endif
+fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
+$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
+ @$(ECHOREDIR) Compiled > $(FPCMADE)
+fpc_all: $(FPCMADE)
+fpc_smart:
+ $(MAKE) all LINKSMART=1 CREATESMART=1
+fpc_debug:
+ $(MAKE) all DEBUG=1
+fpc_release:
+ $(MAKE) all RELEASE=1
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
+$(COMPILER_UNITTARGETDIR):
+ $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+$(COMPILER_TARGETDIR):
+ $(MKDIRTREE) $(COMPILER_TARGETDIR)
+%$(PPUEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(PPUEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.lpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.dpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%.res: %.rc
+ windres -i $< -o $@
+vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.inc $(COMPILER_INCLUDEDIR)
+vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
+vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
+.PHONY: fpc_shared
+override INSTALLTARGET+=fpc_shared_install
+ifndef SHARED_LIBVERSION
+SHARED_LIBVERSION=$(FPC_VERSION)
+endif
+ifndef SHARED_LIBNAME
+SHARED_LIBNAME=$(PACKAGE_NAME)
+endif
+ifndef SHARED_FULLNAME
+SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
+endif
+ifndef SHARED_LIBUNITS
+SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
+override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
+endif
+fpc_shared:
+ifdef HASSHAREDLIB
+ $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
+ifneq ($(SHARED_BUILD),n)
+ $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
+endif
+else
+ @$(ECHO) Shared Libraries not supported
+endif
+fpc_shared_install:
+ifneq ($(SHARED_BUILD),n)
+ifneq ($(SHARED_LIBUNITS),)
+ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
+ $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
+endif
+endif
+endif
+.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
+ifdef INSTALL_UNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
+endif
+ifdef INSTALL_BUILDUNIT
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
+endif
+ifdef INSTALLPPUFILES
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+ifneq ($(UNITTARGETDIRPREFIX),)
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
+override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
+endif
+override INSTALL_CREATEPACKAGEFPC=1
+endif
+ifdef INSTALLEXEFILES
+ifneq ($(TARGETDIRPREFIX),)
+override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
+endif
+endif
+fpc_install: all $(INSTALLTARGET)
+ifdef INSTALLEXEFILES
+ $(MKDIR) $(INSTALL_BINDIR)
+ifdef UPXPROG
+ -$(UPXPROG) $(INSTALLEXEFILES)
+endif
+ $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
+endif
+ifdef INSTALL_CREATEPACKAGEFPC
+ifdef FPCMAKE
+ifdef PACKAGE_VERSION
+ifneq ($(wildcard Makefile.fpc),)
+ $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
+endif
+endif
+endif
+ifdef INSTALLPPUFILES
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+ $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
+endif
+ifneq ($(wildcard $(LIB_FULLNAME)),)
+ $(MKDIR) $(INSTALL_LIBDIR)
+ $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
+ifdef inUnix
+ ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
+endif
+endif
+endif
+ifdef INSTALL_FILES
+ $(MKDIR) $(INSTALL_DATADIR)
+ $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
+endif
+fpc_sourceinstall: distclean
+ $(MKDIR) $(INSTALL_SOURCEDIR)
+ $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
+fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
+ifdef HASEXAMPLES
+ $(MKDIR) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef EXAMPLESOURCEFILES
+ $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
+endif
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
+override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+ -$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+ -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+ -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ -$(DELTREE) units
+ -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+ -$(DEL) *.o *.ppu *.a
+endif
+ -$(DELTREE) *$(SMARTEXT)
+ -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *_ppas$(BATCHEXT)
+ifdef AOUTEXT
+ -$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+ -$(DEL) *$(DEBUGSYMEXT)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+ @$(ECHO)
+ @$(ECHO) == Package info ==
+ @$(ECHO) Package Name..... $(PACKAGE_NAME)
+ @$(ECHO) Package Version.. $(PACKAGE_VERSION)
+ @$(ECHO)
+ @$(ECHO) == Configuration info ==
+ @$(ECHO)
+ @$(ECHO) FPC.......... $(FPC)
+ @$(ECHO) FPC Version.. $(FPC_VERSION)
+ @$(ECHO) Source CPU... $(CPU_SOURCE)
+ @$(ECHO) Target CPU... $(CPU_TARGET)
+ @$(ECHO) Source OS.... $(OS_SOURCE)
+ @$(ECHO) Target OS.... $(OS_TARGET)
+ @$(ECHO) Full Source.. $(FULL_SOURCE)
+ @$(ECHO) Full Target.. $(FULL_TARGET)
+ @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
+ @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
+ @$(ECHO)
+ @$(ECHO) == Directory info ==
+ @$(ECHO)
+ @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
+ @$(ECHO)
+ @$(ECHO) Basedir......... $(BASEDIR)
+ @$(ECHO) FPCDir.......... $(FPCDIR)
+ @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
+ @$(ECHO) UnitsDir........ $(UNITSDIR)
+ @$(ECHO) PackagesDir..... $(PACKAGESDIR)
+ @$(ECHO)
+ @$(ECHO) GCC library..... $(GCCLIBDIR)
+ @$(ECHO) Other library... $(OTHERLIBDIR)
+ @$(ECHO)
+ @$(ECHO) == Tools info ==
+ @$(ECHO)
+ @$(ECHO) As........ $(AS)
+ @$(ECHO) Ld........ $(LD)
+ @$(ECHO) Ar........ $(AR)
+ @$(ECHO) Rc........ $(RC)
+ @$(ECHO)
+ @$(ECHO) Mv........ $(MVPROG)
+ @$(ECHO) Cp........ $(CPPROG)
+ @$(ECHO) Rm........ $(RMPROG)
+ @$(ECHO) GInstall.. $(GINSTALL)
+ @$(ECHO) Echo...... $(ECHO)
+ @$(ECHO) Shell..... $(SHELL)
+ @$(ECHO) Date...... $(DATE)
+ @$(ECHO) FPCMake... $(FPCMAKE)
+ @$(ECHO) PPUMove... $(PPUMOVE)
+ @$(ECHO) Upx....... $(UPXPROG)
+ @$(ECHO) Zip....... $(ZIPPROG)
+ @$(ECHO)
+ @$(ECHO) == Object info ==
+ @$(ECHO)
+ @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
+ @$(ECHO) Target Units.......... $(TARGET_UNITS)
+ @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
+ @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
+ @$(ECHO) Target Dirs........... $(TARGET_DIRS)
+ @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
+ @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+ @$(ECHO)
+ @$(ECHO) Clean Units......... $(CLEAN_UNITS)
+ @$(ECHO) Clean Files......... $(CLEAN_FILES)
+ @$(ECHO)
+ @$(ECHO) Install Units....... $(INSTALL_UNITS)
+ @$(ECHO) Install Files....... $(INSTALL_FILES)
+ @$(ECHO)
+ @$(ECHO) == Install info ==
+ @$(ECHO)
+ @$(ECHO) DateStr.............. $(DATESTR)
+ @$(ECHO) ZipName.............. $(ZIPNAME)
+ @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
+ @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+ @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
+ @$(ECHO) FullZipName.......... $(FULLZIPNAME)
+ @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
+ @$(ECHO)
+ @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
+ @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
+ @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
+ @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
+ @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
+ @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
+ @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
+ @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
+ @$(ECHO)
+ @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
+ @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
+ @$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+ fpc_makefile_dirs
+fpc_makefile:
+ $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+all: fpc_all
+debug: fpc_debug
+smart: fpc_smart
+release: fpc_release
+units: fpc_units
+examples:
+shared: fpc_shared
+install: fpc_install
+sourceinstall: fpc_sourceinstall
+exampleinstall: fpc_exampleinstall
+distinstall:
+zipinstall:
+zipsourceinstall:
+zipexampleinstall:
+zipdistinstall:
+clean: fpc_clean
+distclean: fpc_distclean
+cleanall: fpc_cleanall
+info: fpc_info
+makefiles: fpc_makefiles
+.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/filechooser/Makefile.fpc b/packages/gtk2/examples/filechooser/Makefile.fpc
new file mode 100644
index 0000000000..9c4f701645
--- /dev/null
+++ b/packages/gtk2/examples/filechooser/Makefile.fpc
@@ -0,0 +1,18 @@
+#
+# Makefile.fpc for Free Pascal GTK 2.x.y Examples
+#
+
+[target]
+programs=simple glade
+
+[require]
+packages=gtk2
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../../../..
+
+[rules]
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/filechooser/beipiel.glade b/packages/gtk2/examples/filechooser/beipiel.glade
new file mode 100644
index 0000000000..bf400bf93d
--- /dev/null
+++ b/packages/gtk2/examples/filechooser/beipiel.glade
@@ -0,0 +1,106 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkWindow" id="MainWindow">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">FileChooser and Glade2 example</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Hello! What do you want to do today?</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">10</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCalendar" id="calendar1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="display_options">GTK_CALENDAR_SHOW_HEADING|GTK_CALENDAR_SHOW_DAY_NAMES</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkButton" id="exit">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-quit</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="open">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-open</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkStatusbar" id="statusbar1">
+ <property name="visible">True</property>
+ <property name="has_resize_grip">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/packages/gtk2/examples/filechooser/glade.pas b/packages/gtk2/examples/filechooser/glade.pas
new file mode 100644
index 0000000000..77258b7d5c
--- /dev/null
+++ b/packages/gtk2/examples/filechooser/glade.pas
@@ -0,0 +1,164 @@
+program glade_test;
+{$mode objfpc} {$H+}
+
+{$IFDEF GTK2_0}{$FATAL this demo needs gtk 2.4}{$ENDIF}
+{$IFDEF GTK2_2}{$FATAL this demo needs gtk 2.4}{$ENDIF}
+
+uses
+ cmem, { because of: ... ld.so: dl-minimal.c: 134: realloc: Assertion `ptr == alloc_last_block' failed! }
+ Glib2, Gdk2, Gtk2, LibGlade2;
+
+procedure open_callback (widget : PGtkWidget;
+ data : gpointer); cdecl; forward;
+
+
+function delete_event (widget: PGtkWidget;
+ event : PGdkEvent;
+ data : gpointer): gboolean;cdecl; forward;
+
+
+procedure show_glade_file (filename : Pgchar);
+var
+ xml : PGladeXML;
+ fatal_mask : TGLogLevelFlags;
+ toplevel : PGtkWidget;
+ open : PGtkWidget;
+ exit : PGtkWidget;
+
+begin
+ fatal_mask := g_log_set_always_fatal (G_LOG_FATAL_MASK);
+
+ g_log_set_always_fatal (fatal_mask or G_LOG_LEVEL_WARNING or G_LOG_LEVEL_CRITICAL);
+
+ if filename <> NULL then begin
+ { read the glade xml file }
+ xml := glade_xml_new (filename, NULL, NULL);
+
+ { get the pointers to the widgets }
+
+ toplevel := glade_xml_get_widget (xml, 'MainWindow');
+
+ exit := glade_xml_get_widget (xml, 'exit');
+ open := glade_xml_get_widget (xml, 'open');
+
+ { If the widgets where found in the xml code... }
+
+ { ... connect the signals to the buttons }
+ if open <> NULL then
+ g_signal_connect (G_OBJECT (open), 'clicked',
+ G_CALLBACK (@open_callback), toplevel);
+
+ if exit <> NULL then
+ g_signal_connect (G_OBJECT (exit), 'clicked',
+ G_CALLBACK (@delete_event), NULL);
+
+ { and show them all }
+
+ if toplevel <> NULL then
+ gtk_widget_show_all (toplevel);
+
+ g_object_unref (G_OBJECT (xml));
+
+ end; { filename }
+end;
+
+
+procedure open_callback (widget : PGtkWidget;
+ data : gpointer); cdecl;
+var
+ dialog : PGtkWidget;
+ window : PGtkWindow;
+ action : gint;
+ filename : Pgchar;
+ filter : PGtkFileFilter;
+
+begin
+ { Get a pointer to the main window }
+ window := GTK_WINDOW (data);
+
+ { create the filechooser dialog }
+ dialog := gtk_file_chooser_dialog_new ('Open Glade XML',
+ window,
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ GTK_STOCK_OPEN, [GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NULL]);
+
+ filter := gtk_file_filter_new; { creates a new GtkFileFilter }
+
+ gtk_file_filter_add_pattern (filter, '*.glade'); { and allow only *.glade files }
+
+ { We now use this filter to display only *.glade files in the filechooser }
+
+ gtk_file_chooser_add_filter ( GTK_FILE_CHOOSER(dialog), filter);
+
+ if gtk_dialog_run (GTK_DIALOG (dialog)) = GTK_RESPONSE_ACCEPT then
+ begin
+ { get selected file }
+ filename := gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+
+ { and do something with it }
+ show_glade_file (filename);
+
+ g_free (filename);
+ end;
+
+ gtk_widget_destroy (dialog);
+end;
+
+
+
+
+function delete_event (widget: PGtkWidget;
+ event : PGdkEvent;
+ data : gpointer): gboolean;cdecl;
+begin
+ gtk_main_quit;
+ delete_event := FALSE;
+end;
+
+
+var
+ window,
+ button,
+ box1 : PGtkWidget; (* GtkWidget is the storage type for widgets *)
+
+begin
+
+ gtk_init (@argc, @argv);
+
+ window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ gtk_window_set_title (GTK_WINDOW (window), 'GtkFileChooser and LibGlade Demo');
+
+ g_signal_connect (G_OBJECT (window), 'delete_event',
+ G_CALLBACK (@delete_event), NULL);
+
+
+ gtk_container_set_border_width (GTK_CONTAINER (window), 10);
+
+ box1 := gtk_hbox_new (FALSE, 0);
+
+ (* Put the box into the main window. *)
+ gtk_container_add (GTK_CONTAINER (window), box1);
+
+ button := gtk_button_new_from_stock (GTK_STOCK_OPEN);
+
+
+ g_signal_connect (G_OBJECT (button), 'clicked',
+ G_CALLBACK (@open_callback), window);
+
+ gtk_box_pack_start (GTK_BOX(box1), button, TRUE, TRUE, 10);
+
+ (* Always remember this step, this tells GTK that our preparation for
+ * this button is complete, and it can now be displayed. *)
+ gtk_widget_show (button);
+
+
+ gtk_widget_show (box1);
+
+ gtk_widget_show (window);
+
+
+ gtk_main ();
+end.
diff --git a/packages/gtk2/examples/filechooser/simple.pas b/packages/gtk2/examples/filechooser/simple.pas
new file mode 100644
index 0000000000..8a6c770109
--- /dev/null
+++ b/packages/gtk2/examples/filechooser/simple.pas
@@ -0,0 +1,166 @@
+program simple_filechooser;
+
+(* basing upon helloworld2 example*)
+{$mode objfpc} {$H+}
+
+{$IFDEF GTK2_0}{$FATAL this demo needs gtk 2.4}{$ENDIF}
+{$IFDEF GTK2_2}{$FATAL this demo needs gtk 2.4}{$ENDIF}
+
+uses
+ Glib2, Gdk2, Gtk2;
+
+const
+ ACTION_OPEN = 1;
+ ACTION_SAVE = 2;
+
+ MAIN_WINDOW_KEY = 'main_window'; { uses with g_object_(get/set)_data as key }
+
+
+(* File dialog-callback. *)
+procedure dialog_callback (widget : PGtkWidget;
+ data : gpointer); cdecl;
+var
+ dialog : PGtkWidget;
+ window : PGtkWindow;
+ action : gint;
+ filename : Pgchar;
+
+begin
+ { Get a pointer to the main window }
+ window := g_object_get_data (G_OBJECT(widget), MAIN_WINDOW_KEY);
+
+ action := gint (data);
+
+ case action of
+ ACTION_OPEN:
+ begin
+ dialog := gtk_file_chooser_dialog_new ('Open File',
+ window,
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ GTK_STOCK_OPEN, [GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NULL]);
+
+ end; { ACTION_OPEN}
+ ACTION_SAVE:
+ begin
+ dialog := gtk_file_chooser_dialog_new ('Save File',
+ window,
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ GTK_STOCK_SAVE, [GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NULL]);
+
+ end; { ACTION_SAVE }
+ else begin
+ { This should never happen }
+ g_print ('Something is wrong here!!!.'#13#10);
+ g_print ('No dialog created.'#13#10);
+ {writeln crashes on my system running linux --- check why }
+ exit;
+ end;
+ end; { case }
+
+
+ if gtk_dialog_run (GTK_DIALOG (dialog)) = GTK_RESPONSE_ACCEPT then
+ begin
+ filename := gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+ g_print ('Filename %s selected.'#13#10, [filename]);
+ // writeln ('File ', filename, ' selected.');
+ // ToDO:
+ // writeln crashes... check why
+
+ g_free (filename);
+ end;
+
+ gtk_widget_destroy (dialog);
+end;
+
+
+
+
+(* another callback *)
+function delete_event (widget: PGtkWidget;
+ event : PGdkEvent;
+ data : gpointer): gboolean;cdecl;
+begin
+ gtk_main_quit;
+ delete_event := FALSE;
+end;
+
+
+var
+ window,
+ button,
+ box1 : PGtkWidget; (* GtkWidget is the storage type for widgets *)
+
+begin
+
+ (* This is called in all GTK applications. Arguments are parsed
+ * from the command line and are returned to the application. *)
+
+ gtk_init (@argc, @argv);
+
+ (* Create a new window *)
+ window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ (* This is a new call, which just sets the title of our
+ * new window to "Hello Buttons!" *)
+ gtk_window_set_title (GTK_WINDOW (window), 'GtkFileChooser Demo');
+
+ (* Here we just set a handler for delete_event that immediately
+ * exits GTK. *)
+ g_signal_connect (G_OBJECT (window), 'delete_event',
+ G_CALLBACK (@delete_event), NULL);
+
+ (* Sets the border width of the window. *)
+ gtk_container_set_border_width (GTK_CONTAINER (window), 10);
+
+ (* We create a box to pack widgets into. This is described in detail
+ * in the "packing" section. The box is not really visible, it
+ * is just used as a tool to arrange widgets. *)
+ box1 := gtk_hbox_new (FALSE, 0);
+
+ (* Put the box into the main window. *)
+ gtk_container_add (GTK_CONTAINER (window), box1);
+
+
+ button := gtk_button_new_with_label ('Open');
+
+ (* Now when the button is clicked, we call the "callback" function
+ * with a pointer to the main window as its argument *)
+ g_object_set_data (G_OBJECT(button), MAIN_WINDOW_KEY, window);
+
+ g_signal_connect (G_OBJECT (button), 'clicked',
+ G_CALLBACK (@dialog_callback), pointer(ACTION_OPEN));
+
+ (* Instead of gtk_container_add, we pack this button into the invisible
+ * box, which has been packed into the window. *)
+ gtk_box_pack_start (GTK_BOX(box1), button, TRUE, TRUE, 0);
+
+ (* Always remember this step, this tells GTK that our preparation for
+ * this button is complete, and it can now be displayed. *)
+ gtk_widget_show (button);
+
+ (* Do these same steps again to create a second button *)
+ button := gtk_button_new_with_label ('Save');
+
+ g_object_set_data (G_OBJECT(button), MAIN_WINDOW_KEY, window);
+
+ g_signal_connect (G_OBJECT (button), 'clicked',
+ G_CALLBACK (@dialog_callback), pointer(ACTION_SAVE));
+
+ gtk_box_pack_start(GTK_BOX (box1), button, TRUE, TRUE, 0);
+
+ (* The order in which we show the buttons is not really important, but I
+ * recommend showing the window last, so it all pops up at once. *)
+ gtk_widget_show (button);
+
+ gtk_widget_show (box1);
+
+ gtk_widget_show (window);
+
+
+ (* Rest in gtk_main and wait for the fun to begin! *)
+ gtk_main ();
+end.
diff --git a/packages/gtk2/examples/gettingstarted/Makefile b/packages/gtk2/examples/gettingstarted/Makefile
new file mode 100644
index 0000000000..8cc8c45c60
--- /dev/null
+++ b/packages/gtk2/examples/gettingstarted/Makefile
@@ -0,0 +1,2015 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/01/26]
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
+BSDs = freebsd netbsd openbsd darwin
+UNIXs = linux $(BSDs) solaris qnx
+LIMIT83fs = go32v2 os2 emx watcom
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../../../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifneq ($(words $(FPC_COMPILERINFO)),5)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_PROGRAMS+=gettingstarted
+endif
+override INSTALL_FPCPACKAGE=y
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+ifeq ($(OS_TARGET),darwin)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+else
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+AOUTEXT=.out
+SMARTEXT=.sl2
+STATICLIBPREFIX=
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),atari)
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),win32)
+ifeq ($(CROSSBINDIR),)
+ASNAME=asw
+LDNAME=ldw
+ARNAME=arw
+endif
+endif
+endif
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+PPAS=ppas$(SRCBATCHEXT)
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+export UPXPROG
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=rtl gtk2
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_RTL),)
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_RTL)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+endif
+ifdef REQUIRE_PACKAGES_X11
+PACKAGEDIR_X11:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /x11/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_X11),)
+ifneq ($(wildcard $(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)),)
+UNITDIR_X11=$(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)
+else
+UNITDIR_X11=$(PACKAGEDIR_X11)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_X11)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_X11) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_X11)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_X11=
+UNITDIR_X11:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /x11/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_X11),)
+UNITDIR_X11:=$(firstword $(UNITDIR_X11))
+else
+UNITDIR_X11=
+endif
+endif
+ifdef UNITDIR_X11
+override COMPILER_UNITDIR+=$(UNITDIR_X11)
+endif
+endif
+ifdef REQUIRE_PACKAGES_GTK2
+PACKAGEDIR_GTK2:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_GTK2),)
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)),)
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)
+else
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_GTK2)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_GTK2) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_GTK2)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_GTK2=
+UNITDIR_GTK2:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_GTK2),)
+UNITDIR_GTK2:=$(firstword $(UNITDIR_GTK2))
+else
+UNITDIR_GTK2=
+endif
+endif
+ifdef UNITDIR_GTK2
+override COMPILER_UNITDIR+=$(UNITDIR_GTK2)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(CPU_TARGET)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(CPU_TARGET)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+endif
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+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
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(CPU_TARGET),i386)
+FPCCPUOPT:=-OG2p3
+endif
+ifeq ($(CPU_TARGET),powerpc)
+FPCCPUOPT:=-O1r
+endif
+else
+FPCCPUOPT:=-O2
+endif
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
+endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(FPC) $(FPCOPT)
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+endif
+.PHONY: fpc_exes
+ifndef CROSSINSTALL
+ifneq ($(TARGET_PROGRAMS),)
+override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
+override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
+override ALLTARGET+=fpc_exes
+override INSTALLEXEFILES+=$(EXEFILES)
+override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+ifeq ($(OS_TARGET),os2)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+ifeq ($(OS_TARGET),emx)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+endif
+endif
+fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
+$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
+ @$(ECHOREDIR) Compiled > $(FPCMADE)
+fpc_all: $(FPCMADE)
+fpc_smart:
+ $(MAKE) all LINKSMART=1 CREATESMART=1
+fpc_debug:
+ $(MAKE) all DEBUG=1
+fpc_release:
+ $(MAKE) all RELEASE=1
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
+$(COMPILER_UNITTARGETDIR):
+ $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+$(COMPILER_TARGETDIR):
+ $(MKDIRTREE) $(COMPILER_TARGETDIR)
+%$(PPUEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(PPUEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.lpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.dpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%.res: %.rc
+ windres -i $< -o $@
+vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.inc $(COMPILER_INCLUDEDIR)
+vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
+vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
+.PHONY: fpc_shared
+override INSTALLTARGET+=fpc_shared_install
+ifndef SHARED_LIBVERSION
+SHARED_LIBVERSION=$(FPC_VERSION)
+endif
+ifndef SHARED_LIBNAME
+SHARED_LIBNAME=$(PACKAGE_NAME)
+endif
+ifndef SHARED_FULLNAME
+SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
+endif
+ifndef SHARED_LIBUNITS
+SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
+override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
+endif
+fpc_shared:
+ifdef HASSHAREDLIB
+ $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
+ifneq ($(SHARED_BUILD),n)
+ $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
+endif
+else
+ @$(ECHO) Shared Libraries not supported
+endif
+fpc_shared_install:
+ifneq ($(SHARED_BUILD),n)
+ifneq ($(SHARED_LIBUNITS),)
+ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
+ $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
+endif
+endif
+endif
+.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
+ifdef INSTALL_UNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
+endif
+ifdef INSTALL_BUILDUNIT
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
+endif
+ifdef INSTALLPPUFILES
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+ifneq ($(UNITTARGETDIRPREFIX),)
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
+override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
+endif
+override INSTALL_CREATEPACKAGEFPC=1
+endif
+ifdef INSTALLEXEFILES
+ifneq ($(TARGETDIRPREFIX),)
+override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
+endif
+endif
+fpc_install: all $(INSTALLTARGET)
+ifdef INSTALLEXEFILES
+ $(MKDIR) $(INSTALL_BINDIR)
+ifdef UPXPROG
+ -$(UPXPROG) $(INSTALLEXEFILES)
+endif
+ $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
+endif
+ifdef INSTALL_CREATEPACKAGEFPC
+ifdef FPCMAKE
+ifdef PACKAGE_VERSION
+ifneq ($(wildcard Makefile.fpc),)
+ $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
+endif
+endif
+endif
+ifdef INSTALLPPUFILES
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+ $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
+endif
+ifneq ($(wildcard $(LIB_FULLNAME)),)
+ $(MKDIR) $(INSTALL_LIBDIR)
+ $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
+ifdef inUnix
+ ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
+endif
+endif
+endif
+ifdef INSTALL_FILES
+ $(MKDIR) $(INSTALL_DATADIR)
+ $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
+endif
+fpc_sourceinstall: distclean
+ $(MKDIR) $(INSTALL_SOURCEDIR)
+ $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
+fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
+ifdef HASEXAMPLES
+ $(MKDIR) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef EXAMPLESOURCEFILES
+ $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
+endif
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
+override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+ -$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+ -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+ -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ -$(DELTREE) units
+ -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+ -$(DEL) *.o *.ppu *.a
+endif
+ -$(DELTREE) *$(SMARTEXT)
+ -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *_ppas$(BATCHEXT)
+ifdef AOUTEXT
+ -$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+ -$(DEL) *$(DEBUGSYMEXT)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+ @$(ECHO)
+ @$(ECHO) == Package info ==
+ @$(ECHO) Package Name..... $(PACKAGE_NAME)
+ @$(ECHO) Package Version.. $(PACKAGE_VERSION)
+ @$(ECHO)
+ @$(ECHO) == Configuration info ==
+ @$(ECHO)
+ @$(ECHO) FPC.......... $(FPC)
+ @$(ECHO) FPC Version.. $(FPC_VERSION)
+ @$(ECHO) Source CPU... $(CPU_SOURCE)
+ @$(ECHO) Target CPU... $(CPU_TARGET)
+ @$(ECHO) Source OS.... $(OS_SOURCE)
+ @$(ECHO) Target OS.... $(OS_TARGET)
+ @$(ECHO) Full Source.. $(FULL_SOURCE)
+ @$(ECHO) Full Target.. $(FULL_TARGET)
+ @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
+ @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
+ @$(ECHO)
+ @$(ECHO) == Directory info ==
+ @$(ECHO)
+ @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
+ @$(ECHO)
+ @$(ECHO) Basedir......... $(BASEDIR)
+ @$(ECHO) FPCDir.......... $(FPCDIR)
+ @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
+ @$(ECHO) UnitsDir........ $(UNITSDIR)
+ @$(ECHO) PackagesDir..... $(PACKAGESDIR)
+ @$(ECHO)
+ @$(ECHO) GCC library..... $(GCCLIBDIR)
+ @$(ECHO) Other library... $(OTHERLIBDIR)
+ @$(ECHO)
+ @$(ECHO) == Tools info ==
+ @$(ECHO)
+ @$(ECHO) As........ $(AS)
+ @$(ECHO) Ld........ $(LD)
+ @$(ECHO) Ar........ $(AR)
+ @$(ECHO) Rc........ $(RC)
+ @$(ECHO)
+ @$(ECHO) Mv........ $(MVPROG)
+ @$(ECHO) Cp........ $(CPPROG)
+ @$(ECHO) Rm........ $(RMPROG)
+ @$(ECHO) GInstall.. $(GINSTALL)
+ @$(ECHO) Echo...... $(ECHO)
+ @$(ECHO) Shell..... $(SHELL)
+ @$(ECHO) Date...... $(DATE)
+ @$(ECHO) FPCMake... $(FPCMAKE)
+ @$(ECHO) PPUMove... $(PPUMOVE)
+ @$(ECHO) Upx....... $(UPXPROG)
+ @$(ECHO) Zip....... $(ZIPPROG)
+ @$(ECHO)
+ @$(ECHO) == Object info ==
+ @$(ECHO)
+ @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
+ @$(ECHO) Target Units.......... $(TARGET_UNITS)
+ @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
+ @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
+ @$(ECHO) Target Dirs........... $(TARGET_DIRS)
+ @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
+ @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+ @$(ECHO)
+ @$(ECHO) Clean Units......... $(CLEAN_UNITS)
+ @$(ECHO) Clean Files......... $(CLEAN_FILES)
+ @$(ECHO)
+ @$(ECHO) Install Units....... $(INSTALL_UNITS)
+ @$(ECHO) Install Files....... $(INSTALL_FILES)
+ @$(ECHO)
+ @$(ECHO) == Install info ==
+ @$(ECHO)
+ @$(ECHO) DateStr.............. $(DATESTR)
+ @$(ECHO) ZipName.............. $(ZIPNAME)
+ @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
+ @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+ @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
+ @$(ECHO) FullZipName.......... $(FULLZIPNAME)
+ @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
+ @$(ECHO)
+ @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
+ @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
+ @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
+ @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
+ @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
+ @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
+ @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
+ @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
+ @$(ECHO)
+ @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
+ @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
+ @$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+ fpc_makefile_dirs
+fpc_makefile:
+ $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+all: fpc_all
+debug: fpc_debug
+smart: fpc_smart
+release: fpc_release
+units: fpc_units
+examples:
+shared: fpc_shared
+install: fpc_install
+sourceinstall: fpc_sourceinstall
+exampleinstall: fpc_exampleinstall
+distinstall:
+zipinstall:
+zipsourceinstall:
+zipexampleinstall:
+zipdistinstall:
+clean: fpc_clean
+distclean: fpc_distclean
+cleanall: fpc_cleanall
+info: fpc_info
+makefiles: fpc_makefiles
+.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/gettingstarted/Makefile.fpc b/packages/gtk2/examples/gettingstarted/Makefile.fpc
new file mode 100644
index 0000000000..99d18a9004
--- /dev/null
+++ b/packages/gtk2/examples/gettingstarted/Makefile.fpc
@@ -0,0 +1,18 @@
+#
+# Makefile.fpc for Free Pascal GTK 2.x.y Examples
+#
+
+[target]
+programs=gettingstarted
+
+[require]
+packages=gtk2
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../../../..
+
+[rules]
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/gettingstarted/gettingstarted.pas b/packages/gtk2/examples/gettingstarted/gettingstarted.pas
new file mode 100644
index 0000000000..4c4aac1c15
--- /dev/null
+++ b/packages/gtk2/examples/gettingstarted/gettingstarted.pas
@@ -0,0 +1,18 @@
+program GettingStarted;
+
+{$mode objfpc}{$H+}
+
+uses
+ GTK2;
+
+var
+ MainWindow: PGtkWidget;
+
+begin
+ gtk_init (@argc, @argv);
+
+ MainWindow := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_show (MainWindow);
+
+ gtk_main;
+end.
diff --git a/packages/gtk2/examples/gtk_demo/Makefile b/packages/gtk2/examples/gtk_demo/Makefile
new file mode 100644
index 0000000000..bf63b8e5b8
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/Makefile
@@ -0,0 +1,2015 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/01/26]
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
+BSDs = freebsd netbsd openbsd darwin
+UNIXs = linux $(BSDs) solaris qnx
+LIMIT83fs = go32v2 os2 emx watcom
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../../../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifneq ($(words $(FPC_COMPILERINFO)),5)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_PROGRAMS+=gtk_demo
+endif
+override INSTALL_FPCPACKAGE=y
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+ifeq ($(OS_TARGET),darwin)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+else
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+AOUTEXT=.out
+SMARTEXT=.sl2
+STATICLIBPREFIX=
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),atari)
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),win32)
+ifeq ($(CROSSBINDIR),)
+ASNAME=asw
+LDNAME=ldw
+ARNAME=arw
+endif
+endif
+endif
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+PPAS=ppas$(SRCBATCHEXT)
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+export UPXPROG
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=rtl gtk2
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_RTL),)
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_RTL)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+endif
+ifdef REQUIRE_PACKAGES_X11
+PACKAGEDIR_X11:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /x11/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_X11),)
+ifneq ($(wildcard $(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)),)
+UNITDIR_X11=$(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)
+else
+UNITDIR_X11=$(PACKAGEDIR_X11)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_X11)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_X11) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_X11)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_X11=
+UNITDIR_X11:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /x11/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_X11),)
+UNITDIR_X11:=$(firstword $(UNITDIR_X11))
+else
+UNITDIR_X11=
+endif
+endif
+ifdef UNITDIR_X11
+override COMPILER_UNITDIR+=$(UNITDIR_X11)
+endif
+endif
+ifdef REQUIRE_PACKAGES_GTK2
+PACKAGEDIR_GTK2:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_GTK2),)
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)),)
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)
+else
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_GTK2)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_GTK2) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_GTK2)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_GTK2=
+UNITDIR_GTK2:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_GTK2),)
+UNITDIR_GTK2:=$(firstword $(UNITDIR_GTK2))
+else
+UNITDIR_GTK2=
+endif
+endif
+ifdef UNITDIR_GTK2
+override COMPILER_UNITDIR+=$(UNITDIR_GTK2)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(CPU_TARGET)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(CPU_TARGET)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+endif
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+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
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(CPU_TARGET),i386)
+FPCCPUOPT:=-OG2p3
+endif
+ifeq ($(CPU_TARGET),powerpc)
+FPCCPUOPT:=-O1r
+endif
+else
+FPCCPUOPT:=-O2
+endif
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
+endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(FPC) $(FPCOPT)
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+endif
+.PHONY: fpc_exes
+ifndef CROSSINSTALL
+ifneq ($(TARGET_PROGRAMS),)
+override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
+override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
+override ALLTARGET+=fpc_exes
+override INSTALLEXEFILES+=$(EXEFILES)
+override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+ifeq ($(OS_TARGET),os2)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+ifeq ($(OS_TARGET),emx)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+endif
+endif
+fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
+$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
+ @$(ECHOREDIR) Compiled > $(FPCMADE)
+fpc_all: $(FPCMADE)
+fpc_smart:
+ $(MAKE) all LINKSMART=1 CREATESMART=1
+fpc_debug:
+ $(MAKE) all DEBUG=1
+fpc_release:
+ $(MAKE) all RELEASE=1
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
+$(COMPILER_UNITTARGETDIR):
+ $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+$(COMPILER_TARGETDIR):
+ $(MKDIRTREE) $(COMPILER_TARGETDIR)
+%$(PPUEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(PPUEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.lpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.dpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%.res: %.rc
+ windres -i $< -o $@
+vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.inc $(COMPILER_INCLUDEDIR)
+vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
+vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
+.PHONY: fpc_shared
+override INSTALLTARGET+=fpc_shared_install
+ifndef SHARED_LIBVERSION
+SHARED_LIBVERSION=$(FPC_VERSION)
+endif
+ifndef SHARED_LIBNAME
+SHARED_LIBNAME=$(PACKAGE_NAME)
+endif
+ifndef SHARED_FULLNAME
+SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
+endif
+ifndef SHARED_LIBUNITS
+SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
+override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
+endif
+fpc_shared:
+ifdef HASSHAREDLIB
+ $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
+ifneq ($(SHARED_BUILD),n)
+ $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
+endif
+else
+ @$(ECHO) Shared Libraries not supported
+endif
+fpc_shared_install:
+ifneq ($(SHARED_BUILD),n)
+ifneq ($(SHARED_LIBUNITS),)
+ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
+ $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
+endif
+endif
+endif
+.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
+ifdef INSTALL_UNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
+endif
+ifdef INSTALL_BUILDUNIT
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
+endif
+ifdef INSTALLPPUFILES
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+ifneq ($(UNITTARGETDIRPREFIX),)
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
+override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
+endif
+override INSTALL_CREATEPACKAGEFPC=1
+endif
+ifdef INSTALLEXEFILES
+ifneq ($(TARGETDIRPREFIX),)
+override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
+endif
+endif
+fpc_install: all $(INSTALLTARGET)
+ifdef INSTALLEXEFILES
+ $(MKDIR) $(INSTALL_BINDIR)
+ifdef UPXPROG
+ -$(UPXPROG) $(INSTALLEXEFILES)
+endif
+ $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
+endif
+ifdef INSTALL_CREATEPACKAGEFPC
+ifdef FPCMAKE
+ifdef PACKAGE_VERSION
+ifneq ($(wildcard Makefile.fpc),)
+ $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
+endif
+endif
+endif
+ifdef INSTALLPPUFILES
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+ $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
+endif
+ifneq ($(wildcard $(LIB_FULLNAME)),)
+ $(MKDIR) $(INSTALL_LIBDIR)
+ $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
+ifdef inUnix
+ ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
+endif
+endif
+endif
+ifdef INSTALL_FILES
+ $(MKDIR) $(INSTALL_DATADIR)
+ $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
+endif
+fpc_sourceinstall: distclean
+ $(MKDIR) $(INSTALL_SOURCEDIR)
+ $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
+fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
+ifdef HASEXAMPLES
+ $(MKDIR) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef EXAMPLESOURCEFILES
+ $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
+endif
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
+override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+ -$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+ -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+ -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ -$(DELTREE) units
+ -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+ -$(DEL) *.o *.ppu *.a
+endif
+ -$(DELTREE) *$(SMARTEXT)
+ -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *_ppas$(BATCHEXT)
+ifdef AOUTEXT
+ -$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+ -$(DEL) *$(DEBUGSYMEXT)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+ @$(ECHO)
+ @$(ECHO) == Package info ==
+ @$(ECHO) Package Name..... $(PACKAGE_NAME)
+ @$(ECHO) Package Version.. $(PACKAGE_VERSION)
+ @$(ECHO)
+ @$(ECHO) == Configuration info ==
+ @$(ECHO)
+ @$(ECHO) FPC.......... $(FPC)
+ @$(ECHO) FPC Version.. $(FPC_VERSION)
+ @$(ECHO) Source CPU... $(CPU_SOURCE)
+ @$(ECHO) Target CPU... $(CPU_TARGET)
+ @$(ECHO) Source OS.... $(OS_SOURCE)
+ @$(ECHO) Target OS.... $(OS_TARGET)
+ @$(ECHO) Full Source.. $(FULL_SOURCE)
+ @$(ECHO) Full Target.. $(FULL_TARGET)
+ @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
+ @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
+ @$(ECHO)
+ @$(ECHO) == Directory info ==
+ @$(ECHO)
+ @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
+ @$(ECHO)
+ @$(ECHO) Basedir......... $(BASEDIR)
+ @$(ECHO) FPCDir.......... $(FPCDIR)
+ @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
+ @$(ECHO) UnitsDir........ $(UNITSDIR)
+ @$(ECHO) PackagesDir..... $(PACKAGESDIR)
+ @$(ECHO)
+ @$(ECHO) GCC library..... $(GCCLIBDIR)
+ @$(ECHO) Other library... $(OTHERLIBDIR)
+ @$(ECHO)
+ @$(ECHO) == Tools info ==
+ @$(ECHO)
+ @$(ECHO) As........ $(AS)
+ @$(ECHO) Ld........ $(LD)
+ @$(ECHO) Ar........ $(AR)
+ @$(ECHO) Rc........ $(RC)
+ @$(ECHO)
+ @$(ECHO) Mv........ $(MVPROG)
+ @$(ECHO) Cp........ $(CPPROG)
+ @$(ECHO) Rm........ $(RMPROG)
+ @$(ECHO) GInstall.. $(GINSTALL)
+ @$(ECHO) Echo...... $(ECHO)
+ @$(ECHO) Shell..... $(SHELL)
+ @$(ECHO) Date...... $(DATE)
+ @$(ECHO) FPCMake... $(FPCMAKE)
+ @$(ECHO) PPUMove... $(PPUMOVE)
+ @$(ECHO) Upx....... $(UPXPROG)
+ @$(ECHO) Zip....... $(ZIPPROG)
+ @$(ECHO)
+ @$(ECHO) == Object info ==
+ @$(ECHO)
+ @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
+ @$(ECHO) Target Units.......... $(TARGET_UNITS)
+ @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
+ @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
+ @$(ECHO) Target Dirs........... $(TARGET_DIRS)
+ @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
+ @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+ @$(ECHO)
+ @$(ECHO) Clean Units......... $(CLEAN_UNITS)
+ @$(ECHO) Clean Files......... $(CLEAN_FILES)
+ @$(ECHO)
+ @$(ECHO) Install Units....... $(INSTALL_UNITS)
+ @$(ECHO) Install Files....... $(INSTALL_FILES)
+ @$(ECHO)
+ @$(ECHO) == Install info ==
+ @$(ECHO)
+ @$(ECHO) DateStr.............. $(DATESTR)
+ @$(ECHO) ZipName.............. $(ZIPNAME)
+ @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
+ @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+ @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
+ @$(ECHO) FullZipName.......... $(FULLZIPNAME)
+ @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
+ @$(ECHO)
+ @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
+ @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
+ @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
+ @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
+ @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
+ @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
+ @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
+ @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
+ @$(ECHO)
+ @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
+ @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
+ @$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+ fpc_makefile_dirs
+fpc_makefile:
+ $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+all: fpc_all
+debug: fpc_debug
+smart: fpc_smart
+release: fpc_release
+units: fpc_units
+examples:
+shared: fpc_shared
+install: fpc_install
+sourceinstall: fpc_sourceinstall
+exampleinstall: fpc_exampleinstall
+distinstall:
+zipinstall:
+zipsourceinstall:
+zipexampleinstall:
+zipdistinstall:
+clean: fpc_clean
+distclean: fpc_distclean
+cleanall: fpc_cleanall
+info: fpc_info
+makefiles: fpc_makefiles
+.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/gtk_demo/Makefile.fpc b/packages/gtk2/examples/gtk_demo/Makefile.fpc
new file mode 100644
index 0000000000..73aad79b12
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/Makefile.fpc
@@ -0,0 +1,18 @@
+#
+# Makefile.fpc for Free Pascal GTK 2.x.y Examples
+#
+
+[target]
+programs=gtk_demo
+
+[require]
+packages=gtk2
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../../../..
+
+[rules]
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/gtk_demo/appwindow.inc b/packages/gtk2/examples/gtk_demo/appwindow.inc
new file mode 100644
index 0000000000..e8fcc72758
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/appwindow.inc
@@ -0,0 +1,399 @@
+(* Application main window
+ *
+ * Demonstrates a typical application window, with menubar, toolbar, statusbar.
+ *)
+
+var
+ appwindow_registered : gboolean;
+
+procedure menuitem_cb (callback_data : gpointer;
+ callback_action : guint;
+ widget : PGtkWidget);cdecl;
+var
+ dialog : PGtkWidget;
+
+
+begin
+ dialog := gtk_message_dialog_new (GTK_WINDOW (callback_data),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_INFO,
+ GTK_BUTTONS_CLOSE,
+ 'You selected or toggled the menu item: "%s"',
+ [gtk_item_factory_path_from_widget (widget)]);
+
+ // Close dialog on user response
+ g_signal_connect (G_OBJECT (dialog),
+ 'response',
+ G_CALLBACK (@gtk_widget_destroy),
+ NULL);
+
+ gtk_widget_show (dialog);
+end;
+
+
+
+procedure toolbar_cb (button : PGtkWidget;
+ data : gpointer); cdecl;
+var
+ dialog: PGtkWidget;
+begin
+
+ dialog := gtk_message_dialog_new (GTK_WINDOW (data),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_INFO,
+ GTK_BUTTONS_CLOSE,
+ 'You selected a toolbar button');
+
+ (* Close dialog on user response *)
+ g_signal_connect (G_OBJECT (dialog),
+ 'response',
+ G_CALLBACK (@gtk_widget_destroy),
+ NULL);
+
+ gtk_widget_show (dialog);
+end;
+
+const
+
+ menu_items : array [1..18] of TGtkItemFactoryEntry = (
+ ( path: '/_File'; accelerator: NULL; callback: nil;
+ callback_action: 0; item_type : '<Branch>'; extra_data: NULL),
+
+ ( path: '/File/_New'; accelerator: '<control>N' ; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '<StockItem>'; extra_data: NULL{GTK_STOCK_NEW}),
+
+ ( path: '/File/_Open'; accelerator: '<control>O' ; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '<StockItem>'; extra_data: NULL {GTK_STOCK_OPEN}),
+
+ ( path: '/File/_Save'; accelerator: '<control>S' ; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '<StockItem>'; extra_data: NULL {GTK_STOCK_SAVE}),
+
+ ( path: '/File/Save _As'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '<StockItem>'; extra_data: NULL {GTK_STOCK_SAVE_AS}),
+
+ ( path: '/File/sep1'; accelerator: NULL; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '<Separator>'; extra_data: NULL),
+
+ ( path: '/File/_Quit'; accelerator: '<control>Q' ; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '<StockItem>'; extra_data: NULL),
+
+ ( path: '/Preferences'; accelerator: NULL ; callback: nil;
+ callback_action: 0; item_type : '<Branch>'; extra_data: NULL),
+
+ ( path: '/Preferences/_Color'; accelerator: NULL ; callback: nil;
+ callback_action: 0; item_type : '<Branch>'; extra_data: NULL),
+
+ ( path: '/Preferences/Color/_Red'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '<RadioItem>'; extra_data: NULL),
+
+ ( path: '/Preferences/Color/_Green'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '/Preferences/Color/Red'; extra_data: NULL),
+
+ ( path: '/Preferences/Color/_Blue'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '/Preferences/Color/Red'; extra_data: NULL),
+
+ ( path: '/Preferences/_Shape'; accelerator: NULL ; callback: nil;
+ callback_action: 0; item_type : '<Branch>'; extra_data: NULL),
+
+ ( path: '/Preferences/Shape/_Square'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '<RadioItem>'; extra_data: NULL),
+
+ ( path: '/Preferences/Shape/_Rectangle'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '/Preferences/Shape/Square'; extra_data: NULL),
+
+ ( path: '/Preferences/Shape/_Oval'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@menuitem_cb);
+ callback_action: 0; item_type : '/Preferences/Shape/Rectangle'; extra_data: NULL),
+
+
+ (* If you wanted this to be right justified you would use "<LastBranch>", not "<Branch>".
+ * Right justified help menu items are generally considered a bad idea now days.
+ *)
+
+ ( path: '/_Help'; accelerator: NULL ; callback: nil;
+ callback_action: 0; item_type : '<Branch>'; extra_data: NULL),
+
+ ( path: '/Help/_About'; accelerator: NULL ; callback: nil;
+ callback_action: 0; item_type : NULL; extra_data: NULL)
+
+ );
+
+
+var
+ application_window : PGtkWidget; // global variable (originally called window)
+
+
+
+(* This function registers our custom toolbar icons, so they can be themed.
+ *
+ * It's totally optional to do this, you could just manually insert icons
+ * and have them not be themeable, especially if you never expect people
+ * to theme your app.
+ *)
+
+const
+ items :array [1..1] of TGtkStockItem = (
+ ( stock_id: 'demo-gtk-logo'; _label: '_GTK!';
+ modifier: 0; keyval: 0; translation_domain : NULL)
+ );
+
+procedure register_stock_icons;
+
+var
+ pixbuf : PGdkPixbuf;
+ factory : PGtkIconFactory;
+ filename : pgchar;
+
+ icon_set : PGtkIconSet;
+ transparent : PGdkPixbuf;
+
+begin
+ if not appwindow_registered then
+ begin
+ appwindow_registered := TRUE;
+
+ (* Register our stock items *)
+ gtk_stock_add (@items[1], high(items));
+
+ (* Add our custom icon factory to the list of defaults *)
+ factory := gtk_icon_factory_new ();
+ gtk_icon_factory_add_default (factory);
+
+ (* demo_find_file() looks in the the current directory first,
+ * so you can run gtk-demo without installing GTK, then looks
+ * in the location where the file is installed.
+ *)
+ pixbuf := NULL;
+ filename := demo_find_file ('gtk-logo-rgb.gif', NULL);
+
+ if filename <> NULL then begin
+ pixbuf := gdk_pixbuf_new_from_file (filename, NULL);
+ g_free (filename);
+ end;
+
+ (* Register icon to accompany stock item *)
+ if pixbuf <> NULL then
+ begin
+ (* The gtk-logo-rgb icon has a white background, make it transparent *)
+ transparent := gdk_pixbuf_add_alpha (pixbuf, TRUE, $ff, $ff, $ff);
+
+ icon_set := gtk_icon_set_new_from_pixbuf (transparent);
+ gtk_icon_factory_add (factory, 'demo-gtk-logo', icon_set);
+ gtk_icon_set_unref (icon_set);
+ g_object_unref (G_OBJECT (pixbuf));
+ g_object_unref (G_OBJECT (transparent));
+ end
+ else
+ g_warning ('failed to load GTK logo for toolbar');
+
+ (* Drop our reference to the factory, GTK will hold a reference. *)
+ g_object_unref (G_OBJECT (factory));
+ end;
+end;
+
+procedure update_statusbar ( buffer : PGtkTextBuffer;
+ statusbar : PGtkStatusbar);
+var
+ msg : pgchar;
+ row,
+ col : gint;
+ count : gint;
+ iter : TGtkTextIter;
+
+begin
+
+ gtk_statusbar_pop (statusbar, 0); (* clear any previous message, underflow is allowed *)
+
+ count := gtk_text_buffer_get_char_count (buffer);
+
+ gtk_text_buffer_get_iter_at_mark (buffer,
+ @iter,
+ gtk_text_buffer_get_insert (buffer));
+
+ row := gtk_text_iter_get_line (@iter);
+ col := gtk_text_iter_get_line_offset (@iter);
+
+ msg := g_strdup_printf ('Cursor at row %d column %d - %d chars in document',
+ [row, col, count]);
+
+ gtk_statusbar_push (statusbar, 0, msg);
+
+ g_free (msg);
+end;
+
+procedure mark_set_callback (buffer : PGtkTextBuffer;
+ new_location : PGtkTextIter;
+ mark : PGtkTextMark;
+ data : gpointer); cdecl;
+begin
+ update_statusbar (buffer, GTK_STATUSBAR (data));
+end;
+
+function do_appwindow : PGtkWidget;
+var
+ table,
+ toolbar,
+ statusbar,
+ contents,
+ sw : PGtkWidget;
+
+ buffer : PGtkTextBuffer;
+ accel_group : PGtkAccelGroup;
+ item_factory : PGtkItemFactory;
+
+begin
+ if application_window = NULL then
+ begin
+ register_stock_icons ();
+
+ (* Create the toplevel window
+ *)
+
+ application_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (application_window ), 'Application Window');
+
+
+ (* NULL window variable when window is closed *)
+ g_signal_connect (G_OBJECT (application_window ), 'destroy',
+ G_CALLBACK (@gtk_widget_destroyed),
+ @application_window );
+
+ table := gtk_table_new (1, 4, FALSE);
+
+ gtk_container_add (GTK_CONTAINER (application_window ), table);
+
+ (* Create the menubar
+ *)
+
+ accel_group := gtk_accel_group_new ();
+ gtk_window_add_accel_group (GTK_WINDOW (application_window), accel_group);
+ g_object_unref (accel_group);
+
+ item_factory := gtk_item_factory_new (GTK_TYPE_MENU_BAR, '<main>', accel_group);
+
+ (* Set up item factory to go away with the window *)
+ g_object_ref (item_factory);
+ gtk_object_sink (GTK_OBJECT (item_factory));
+ g_object_set_data_full (G_OBJECT (application_window ),
+ '<main>',
+ item_factory,
+ TGDestroyNotify (@g_object_unref));
+
+ (* create menu items *)
+ menu_items[2].extra_data:=PChar(GTK_STOCK_NEW);
+ menu_items[3].extra_data:=PChar(GTK_STOCK_OPEN);
+ menu_items[4].extra_data:=PChar(GTK_STOCK_SAVE);
+ menu_items[5].extra_data:=PChar(GTK_STOCK_SAVE_AS);
+ menu_items[7].extra_data:=PChar(GTK_STOCK_QUIT);
+
+ gtk_item_factory_create_items (item_factory, high (menu_items),
+ @menu_items[1], application_window );
+
+ gtk_table_attach (GTK_TABLE (table),
+ gtk_item_factory_get_widget (item_factory, '<main>'),
+ (* X direction *) (* Y direction *)
+ 0, 1, 0, 1,
+ GTK_EXPAND or GTK_FILL, 0,
+ 0, 0);
+
+ (* Create the toolbar
+ *)
+ toolbar := gtk_toolbar_new ();
+
+ gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
+ GTK_STOCK_OPEN,
+ 'This is a demo button with an ''open'' icon',
+ NULL,
+ G_CALLBACK (@toolbar_cb),
+ application_window , (* user data for callback *)
+ -1); (* -1 means "append" *)
+
+ gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
+ GTK_STOCK_QUIT,
+ 'This is a demo button with a ''quit'' icon',
+ NULL,
+ G_CALLBACK (@toolbar_cb),
+ application_window , (* user data for callback *)
+ -1); (* -1 means "append" *)
+
+ gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
+ gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
+ 'demo-gtk-logo',
+ 'This is a demo button with a ''gtk'' icon',
+ NULL,
+ G_CALLBACK (@toolbar_cb),
+ application_window , (* user data for callback *)
+ -1); (* -1 means "append" *)
+
+ gtk_table_attach (GTK_TABLE (table),
+ toolbar,
+ (* X direction *) (* Y direction *)
+ 0, 1, 1, 2,
+ GTK_EXPAND or GTK_FILL, 0,
+ 0, 0);
+
+ (* Create document
+ *)
+
+ sw := gtk_scrolled_window_new (NULL, NULL);
+
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
+ GTK_SHADOW_IN);
+
+ gtk_table_attach (GTK_TABLE (table),
+ sw,
+ (* X direction *) (* Y direction *)
+ 0, 1, 2, 3,
+ GTK_EXPAND or GTK_FILL, GTK_EXPAND or GTK_FILL,
+ 0, 0);
+
+ gtk_window_set_default_size (GTK_WINDOW (application_window ),
+ 200, 200);
+
+ contents := gtk_text_view_new ();
+
+ gtk_container_add (GTK_CONTAINER (sw),
+ contents);
+
+ (* Create statusbar *)
+
+ statusbar := gtk_statusbar_new ();
+ gtk_table_attach (GTK_TABLE (table),
+ statusbar,
+ (* X direction *) (* Y direction *)
+ 0, 1, 3, 4,
+ GTK_EXPAND or GTK_FILL, 0,
+ 0, 0);
+
+ (* Show text widget info in the statusbar *)
+ buffer := gtk_text_view_get_buffer (GTK_TEXT_VIEW (contents));
+
+ g_signal_connect_object (buffer,
+ 'changed',
+ G_CALLBACK (@update_statusbar),
+ statusbar,
+ 0);
+
+ g_signal_connect_object (buffer,
+ 'mark_set', (* cursor moved *)
+ G_CALLBACK (@mark_set_callback),
+ statusbar,
+ 0);
+
+ update_statusbar (buffer, GTK_STATUSBAR (statusbar));
+ end;
+
+ if not (GTK_WIDGET_VISIBLE (application_window )) then
+ gtk_widget_show_all (application_window )
+ else begin
+ gtk_widget_destroy (application_window);
+ application_window := NULL;
+ end;
+
+ do_appwindow := application_window ;
+end;
+
+
diff --git a/packages/gtk2/examples/gtk_demo/button_box.inc b/packages/gtk2/examples/gtk_demo/button_box.inc
new file mode 100644
index 0000000000..77a33910ab
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/button_box.inc
@@ -0,0 +1,124 @@
+(* Button Boxes
+ *
+ * The Button Box widgets are used to arrange buttons with padding.
+ *)
+
+function create_bbox (horizontal : gboolean;
+ title : pgchar;
+ spacing : gint;
+ layout : TGtkButtonBoxStyle): PGtkWidget;
+var
+ frame,
+ bbox,
+ button : PGtkWidget;
+
+begin
+ frame := gtk_frame_new (title);
+
+ if horizontal then
+ bbox := gtk_hbutton_box_new ()
+ else
+ bbox := gtk_vbutton_box_new ();
+
+ gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
+ gtk_container_add (GTK_CONTAINER (frame), bbox);
+
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
+ gtk_box_set_spacing (GTK_BOX (bbox), spacing);
+
+ button := gtk_button_new_from_stock (GTK_STOCK_OK);
+ gtk_container_add (GTK_CONTAINER (bbox), button);
+
+ button := gtk_button_new_from_stock (GTK_STOCK_CANCEL);
+ gtk_container_add (GTK_CONTAINER (bbox), button);
+
+ button := gtk_button_new_from_stock (GTK_STOCK_HELP);
+ gtk_container_add (GTK_CONTAINER (bbox), button);
+
+ create_bbox := frame;
+end;
+
+var bbox_window : PGtkWidget;
+
+
+function do_button_box : PGtkWidget;
+var
+ main_vbox,
+ vbox,
+ hbox,
+ frame_horz,
+ frame_vert : PGtkWidget;
+
+begin
+
+ if bbox_window = NULL then
+ begin
+ bbox_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (bbox_window), 'Button Boxes');
+
+ g_signal_connect (bbox_window, 'destroy',
+ G_CALLBACK (@gtk_widget_destroyed),
+ @bbox_window);
+
+ gtk_container_set_border_width (GTK_CONTAINER (bbox_window), 10);
+
+ main_vbox := gtk_vbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (bbox_window), main_vbox);
+
+ frame_horz := gtk_frame_new ('Horizontal Button Boxes');
+ gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, 10);
+
+ vbox := gtk_vbox_new (FALSE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
+ gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
+
+ gtk_box_pack_start (GTK_BOX (vbox),
+ create_bbox (TRUE, 'Spread', 40, GTK_BUTTONBOX_SPREAD),
+ TRUE, TRUE, 0);
+
+ gtk_box_pack_start (GTK_BOX (vbox),
+ create_bbox (TRUE, 'Edge', 40, GTK_BUTTONBOX_EDGE),
+ TRUE, TRUE, 5);
+
+ gtk_box_pack_start (GTK_BOX (vbox),
+ create_bbox (TRUE, 'Start', 40, GTK_BUTTONBOX_START),
+ TRUE, TRUE, 5);
+
+ gtk_box_pack_start (GTK_BOX (vbox),
+ create_bbox (TRUE, 'End', 40, GTK_BUTTONBOX_END),
+ TRUE, TRUE, 5);
+
+ frame_vert := gtk_frame_new ('Vertical Button Boxes');
+ gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
+
+ hbox := gtk_hbox_new (FALSE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
+ gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
+
+ gtk_box_pack_start (GTK_BOX (hbox),
+ create_bbox (FALSE, 'Spread', 30, GTK_BUTTONBOX_SPREAD),
+ TRUE, TRUE, 0);
+
+ gtk_box_pack_start (GTK_BOX (hbox),
+ create_bbox (FALSE, 'Edge', 30, GTK_BUTTONBOX_EDGE),
+ TRUE, TRUE, 5);
+
+ gtk_box_pack_start (GTK_BOX (hbox),
+ create_bbox (FALSE, 'Start', 30, GTK_BUTTONBOX_START),
+ TRUE, TRUE, 5);
+
+ gtk_box_pack_start (GTK_BOX (hbox),
+ create_bbox (FALSE, 'End', 30, GTK_BUTTONBOX_END),
+ TRUE, TRUE, 5);
+ end;
+
+ if not GTK_WIDGET_VISIBLE (bbox_window) then
+ gtk_widget_show_all (bbox_window)
+ else
+ begin
+ gtk_widget_destroy (bbox_window);
+ bbox_window := NULL;
+ end;
+
+ do_button_box := bbox_window;
+end;
diff --git a/packages/gtk2/examples/gtk_demo/colorsel.inc b/packages/gtk2/examples/gtk_demo/colorsel.inc
new file mode 100644
index 0000000000..b9d4331314
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/colorsel.inc
@@ -0,0 +1,108 @@
+(* Color Selector
+ *
+ * GtkColorSelection lets the user choose a color. GtkColorSelectionDialog is
+ * a prebuilt dialog containing a GtkColorSelection.
+ *
+ *)
+
+var
+ colorsel_window,
+ colorsel_da,
+ colorsel_frame : PGtkWidget;
+ colorsel_color : TGdkColor;
+
+
+procedure change_color_callback (button : PGtkWidget;
+ data : gpointer); cdecl;
+var
+ dialog : PGtkWidget;
+ colorsel : PGtkColorSelection;
+ response : gint;
+
+begin
+ dialog := gtk_color_selection_dialog_new ('Changing color');
+
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (colorsel_window));
+
+ colorsel := PGtkColorSelection ( PGtkColorSelectionDialog(dialog)^.colorsel );
+
+ gtk_color_selection_set_previous_color (colorsel, @colorsel_color);
+ gtk_color_selection_set_current_color (colorsel, @colorsel_color);
+ gtk_color_selection_set_has_palette (colorsel, TRUE);
+
+ response := gtk_dialog_run (GTK_DIALOG (dialog));
+
+ if response = GTK_RESPONSE_OK then
+ begin
+ gtk_color_selection_get_current_color (colorsel, @colorsel_color);
+
+ gtk_widget_modify_bg (colorsel_da, GTK_STATE_NORMAL, @colorsel_color);
+ end;
+
+ gtk_widget_destroy (dialog);
+end;
+
+
+function do_colorsel : PGtkWidget;
+var
+ vbox,
+ button,
+ alignment : PGtkWidget;
+
+
+ begin
+ if colorsel_window = NULL then
+ begin
+ colorsel_color.red := $0;
+ colorsel_color.blue := $ffff;
+ colorsel_color.green := $0;
+
+ colorsel_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (colorsel_window), 'Color Selection');
+
+ g_signal_connect (colorsel_window, 'destroy',
+ G_CALLBACK (@gtk_widget_destroyed), @colorsel_window);
+
+ gtk_container_set_border_width (GTK_CONTAINER (colorsel_window), 8);
+
+ vbox := gtk_vbox_new (FALSE, 8);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+ gtk_container_add (GTK_CONTAINER (colorsel_window), vbox);
+
+ (*
+ * Create the color swatch area
+ *)
+
+
+ colorsel_frame := gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (colorsel_frame), GTK_SHADOW_IN);
+ gtk_box_pack_start (GTK_BOX (vbox), colorsel_frame, TRUE, TRUE, 0);
+
+ colorsel_da := gtk_drawing_area_new ();
+ (* set a minimum size *)
+ gtk_widget_set_size_request (colorsel_da, 200, 200);
+ (* set the color *)
+ gtk_widget_modify_bg (colorsel_da, GTK_STATE_NORMAL, @colorsel_color);
+
+ gtk_container_add (GTK_CONTAINER (colorsel_frame), colorsel_da);
+
+ alignment := gtk_alignment_new (1.0, 0.5, 0.0, 0.0);
+
+ button := gtk_button_new_with_mnemonic ('_Change the above color');
+ gtk_container_add (GTK_CONTAINER (alignment), button);
+
+ gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
+
+ g_signal_connect (button, 'clicked',
+ G_CALLBACK (@change_color_callback), NULL);
+ end;
+
+ if not GTK_WIDGET_VISIBLE (colorsel_window) then
+ gtk_widget_show_all (colorsel_window)
+ else begin
+ gtk_widget_destroy (colorsel_window);
+ colorsel_window := NULL;
+ end;
+
+ do_colorsel := colorsel_window;
+end;
diff --git a/packages/gtk2/examples/gtk_demo/data/alphatest.png b/packages/gtk2/examples/gtk_demo/data/alphatest.png
new file mode 100644
index 0000000000..eb5885f89c
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/alphatest.png
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/data/apple-red.png b/packages/gtk2/examples/gtk_demo/data/apple-red.png
new file mode 100644
index 0000000000..b0a24e9418
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/apple-red.png
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/data/background.jpg b/packages/gtk2/examples/gtk_demo/data/background.jpg
new file mode 100644
index 0000000000..86c006aa46
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/background.jpg
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/data/floppybuddy.gif b/packages/gtk2/examples/gtk_demo/data/floppybuddy.gif
new file mode 100644
index 0000000000..ac986c8ed3
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/floppybuddy.gif
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/data/gnome-applets.png b/packages/gtk2/examples/gtk_demo/data/gnome-applets.png
new file mode 100644
index 0000000000..8d3549e97c
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/gnome-applets.png
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/data/gnome-calendar.png b/packages/gtk2/examples/gtk_demo/data/gnome-calendar.png
new file mode 100644
index 0000000000..889f329ae5
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/gnome-calendar.png
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/data/gnome-foot.png b/packages/gtk2/examples/gtk_demo/data/gnome-foot.png
new file mode 100644
index 0000000000..0476658517
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/gnome-foot.png
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/data/gnome-gimp.png b/packages/gtk2/examples/gtk_demo/data/gnome-gimp.png
new file mode 100644
index 0000000000..f6bbc6d36c
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/gnome-gimp.png
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/data/gnome-gmush.png b/packages/gtk2/examples/gtk_demo/data/gnome-gmush.png
new file mode 100644
index 0000000000..0a4b0d04e6
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/gnome-gmush.png
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/data/gnome-gsame.png b/packages/gtk2/examples/gtk_demo/data/gnome-gsame.png
new file mode 100644
index 0000000000..01c061151f
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/gnome-gsame.png
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/data/gnu-keys.png b/packages/gtk2/examples/gtk_demo/data/gnu-keys.png
new file mode 100644
index 0000000000..58a33770e6
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/gnu-keys.png
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/data/gtk-logo-rgb.gif b/packages/gtk2/examples/gtk_demo/data/gtk-logo-rgb.gif
new file mode 100644
index 0000000000..63c622b93c
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/data/gtk-logo-rgb.gif
Binary files differ
diff --git a/packages/gtk2/examples/gtk_demo/dialog.inc b/packages/gtk2/examples/gtk_demo/dialog.inc
new file mode 100644
index 0000000000..9ae17b0779
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/dialog.inc
@@ -0,0 +1,189 @@
+(* Dialog and Message Boxes
+ *
+ * Dialog widgets are used to pop up a transient window for user feedback.
+ *)
+
+
+
+
+var
+ dialog_entry1,
+ dialog_entry2,
+ dialog_window : PGtkWidget;
+ dialog_i : gint;
+
+procedure message_dialog_clicked (button : PGtkButton;
+ user_data : gpointer);
+var
+ dialog : PGtkWidget;
+
+begin
+ dialog := gtk_message_dialog_new (GTK_WINDOW (dialog_window),
+ GTK_DIALOG_MODAL or GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_INFO,
+ GTK_BUTTONS_OK,
+ 'This message box has been popped up the following'#13#10+
+ 'number of times:'#13#10#13#10+
+ '%d', [dialog_i]);
+
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+ inc(dialog_i);
+end;
+
+procedure interactive_dialog_clicked ( button : PGtkButton;
+ user_data : gpointer);
+var
+ dialog,
+ hbox,
+ stock,
+ table,
+ local_entry1,
+ local_entry2,
+ thelabel : PGtkWidget;
+ response : gint;
+
+begin
+
+ dialog := gtk_dialog_new_with_buttons ('Interactive Dialog',
+ GTK_WINDOW (dialog_window),
+ GTK_DIALOG_MODAL or
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_STOCK_OK,
+ [ GTK_RESPONSE_OK,
+ '_Non-stock Button',
+ GTK_RESPONSE_CANCEL,
+ NULL]);
+
+ hbox := gtk_hbox_new (FALSE, 8);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)^.vbox), hbox, FALSE, FALSE, 0);
+
+ stock := gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG);
+ gtk_box_pack_start (GTK_BOX (hbox), stock, FALSE, FALSE, 0);
+
+ table := gtk_table_new (2, 2, FALSE);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 4);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 4);
+ gtk_box_pack_start (GTK_BOX (hbox), table, TRUE, TRUE, 0);
+ thelabel := gtk_label_new_with_mnemonic ('_Entry 1');
+ gtk_table_attach_defaults (GTK_TABLE (table),
+ thelabel,
+ 0, 1, 0, 1);
+ local_entry1 := gtk_entry_new ();
+ gtk_entry_set_text (GTK_ENTRY (local_entry1), gtk_entry_get_text (GTK_ENTRY (dialog_entry1)));
+ gtk_table_attach_defaults (GTK_TABLE (table), local_entry1, 1, 2, 0, 1);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (thelabel), local_entry1);
+
+ thelabel := gtk_label_new_with_mnemonic ('E_ntry 2');
+ gtk_table_attach_defaults (GTK_TABLE (table),
+ thelabel,
+ 0, 1, 1, 2);
+
+ local_entry2 := gtk_entry_new ();
+ gtk_entry_set_text (GTK_ENTRY (local_entry2), gtk_entry_get_text (GTK_ENTRY (dialog_entry2)));
+ gtk_table_attach_defaults (GTK_TABLE (table), local_entry2, 1, 2, 1, 2);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (thelabel), local_entry2);
+
+ gtk_widget_show_all (hbox);
+ response := gtk_dialog_run (GTK_DIALOG (dialog));
+
+ if response = GTK_RESPONSE_OK then
+ begin
+ gtk_entry_set_text (GTK_ENTRY (dialog_entry1), gtk_entry_get_text (GTK_ENTRY (local_entry1)));
+ gtk_entry_set_text (GTK_ENTRY (dialog_entry2), gtk_entry_get_text (GTK_ENTRY (local_entry2)));
+ end;
+
+ gtk_widget_destroy (dialog);
+end;
+
+
+function do_dialog : PGtkWidget;
+
+var
+ frame,
+ vbox,
+ vbox2,
+ hbox,
+ button,
+ table,
+ thelabel : PGtkWidget;
+
+begin
+ dialog_i := 1;
+
+ if dialog_window = NULL then
+ begin
+ dialog_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (dialog_window), 'Dialogs');
+
+ g_signal_connect (dialog_window, 'destroy', G_CALLBACK (@gtk_widget_destroyed), @dialog_window);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog_window), 8);
+
+ frame := gtk_frame_new ('Dialogs');
+ gtk_container_add (GTK_CONTAINER (dialog_window), frame);
+
+ vbox := gtk_vbox_new (FALSE, 8);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+ gtk_container_add (GTK_CONTAINER (frame), vbox);
+
+ (* Standard message dialog *)
+ hbox := gtk_hbox_new (FALSE, 8);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+
+ button := gtk_button_new_with_mnemonic ('_Message Dialog');
+ g_signal_connect (button, 'clicked',
+ G_CALLBACK (@message_dialog_clicked), @dialog_window);
+
+ gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+
+ gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
+
+ (* Interactive dialog*)
+ hbox := gtk_hbox_new (FALSE, 8);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ vbox2 := gtk_vbox_new (FALSE, 0);
+
+ button := gtk_button_new_with_mnemonic ('_Interactive Dialog');
+ g_signal_connect (button, 'clicked',
+ G_CALLBACK (@interactive_dialog_clicked), @dialog_window);
+ gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
+
+ table := gtk_table_new (2, 2, FALSE);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 4);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 4);
+ gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
+
+ thelabel := gtk_label_new_with_mnemonic ('_Entry 1');
+ gtk_table_attach_defaults (GTK_TABLE (table),
+ thelabel,
+ 0, 1, 0, 1);
+
+ dialog_entry1 := gtk_entry_new ();
+ gtk_table_attach_defaults (GTK_TABLE (table), dialog_entry1, 1, 2, 0, 1);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (thelabel), dialog_entry1);
+
+ thelabel := gtk_label_new_with_mnemonic ('E_ntry 2');
+
+ gtk_table_attach_defaults (GTK_TABLE (table),
+ thelabel,
+ 0, 1, 1, 2);
+
+ dialog_entry2 := gtk_entry_new ();
+ gtk_table_attach_defaults (GTK_TABLE (table), dialog_entry2, 1, 2, 1, 2);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (thelabel), dialog_entry2);
+ end;
+
+ if not GTK_WIDGET_VISIBLE (dialog_window) then
+ gtk_widget_show_all (dialog_window)
+
+ else begin
+ gtk_widget_destroy (dialog_window);
+ dialog_window := NULL;
+ end;
+
+ do_dialog := dialog_window;
+end;
+
+
diff --git a/packages/gtk2/examples/gtk_demo/drawingarea.inc b/packages/gtk2/examples/gtk_demo/drawingarea.inc
new file mode 100644
index 0000000000..8fc06b14d4
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/drawingarea.inc
@@ -0,0 +1,320 @@
+(* Drawing Area
+ *
+ * GtkDrawingArea is a blank area where you can draw custom displays
+ * of various kinds.
+ *
+ * This demo has two drawing areas. The checkerboard area shows
+ * how you can just draw something; all you have to do is write
+ * a signal handler for expose_event, as shown here.
+ *
+ * The "scribble" area is a bit more advanced, and shows how to handle
+ * events such as button presses and mouse motion. Click the mouse
+ * and drag in the scribble area to draw squiggles. Resize the window
+ * to clear the area.
+ *)
+
+
+var
+ da_window : PGtkWidget;
+
+(* Pixmap for scribble area, to store current scribbles *)
+ da_pixmap : PGdkPixmap;
+
+(* Create a new pixmap of the appropriate size to store our scribbles *)
+
+function scribble_configure_event (widget : PGtkWidget;
+ event : PGdkEventConfigure;
+ data : gpointer): gboolean; cdecl;
+
+begin
+ if da_pixmap <> NULL then
+ g_object_unref (G_OBJECT (da_pixmap));
+
+ da_pixmap := gdk_pixmap_new (widget^.window,
+ widget^.allocation.width,
+ widget^.allocation.height,
+ -1);
+
+ (* Initialize the pixmap to white *)
+ gdk_draw_rectangle (da_pixmap,
+ widget^.style^.white_gc,
+ gTRUE,
+ 0, 0,
+ widget^.allocation.width,
+ widget^.allocation.height);
+
+ (* We've handled the configure event, no need for further processing. *)
+ scribble_configure_event := TRUE;
+
+end;
+
+(* Redraw the screen from the pixmap *)
+function scribble_expose_event (widget : PGtkWidget;
+ event : PGdkEventExpose;
+ data : gpointer): gboolean; cdecl;
+
+begin
+ (* We use the "foreground GC" for the widget since it already exists,
+ * but honestly any GC would work. The only thing to worry about
+ * is whether the GC has an inappropriate clip region set.
+ *)
+
+ gdk_draw_drawable (widget^.window,
+ widget^.style^.fg_gc[GTK_WIDGET_STATE (widget)],
+ da_pixmap,
+ (* Only copy the area that was exposed. *)
+ event^.area.x, event^.area.y,
+ event^.area.x, event^.area.y,
+ event^.area.width, event^.area.height);
+
+ scribble_expose_event := FALSE;
+end;
+
+(* Draw a rectangle on the screen *)
+procedure draw_brush (widget : PGtkWidget;
+ x, y : gdouble);
+var
+ update_rect : TGdkRectangle;
+
+begin
+ update_rect.x := round (x - 3);
+ update_rect.y := round (y - 3);
+ update_rect.width := 6;
+ update_rect.height := 6;
+
+ (* Paint to the pixmap, where we store our state *)
+ gdk_draw_rectangle (da_pixmap,
+ widget^.style^.black_gc,
+ gTRUE,
+ update_rect.x, update_rect.y,
+ update_rect.width, update_rect.height);
+
+ (* Now invalidate the affected region of the drawing area. *)
+ gdk_window_invalidate_rect (widget^.window,
+ @update_rect,
+ FALSE);
+end;
+
+function scribble_button_press_event (widget : PGtkWidget;
+ event : PGdkEventButton;
+ data : gpointer): gboolean; cdecl;
+begin
+ if da_pixmap = NULL then
+ exit (FALSE); (* paranoia check, in case we haven't gotten a configure event *)
+
+ if event^.button = 1 then
+ draw_brush (widget, event^.x, event^.y);
+
+ (* We've handled the event, stop processing *)
+ exit (TRUE);
+end;
+
+function scribble_motion_notify_event (widget : PGtkWidget;
+ event : PGdkEventButton;
+ data : gpointer): gboolean; cdecl;
+var
+ x, y : gint;
+ state : TGdkModifierType;
+
+begin
+ if da_pixmap = NULL then
+ exit (FALSE); (* paranoia check, in case we haven't gotten a configure event *)
+
+ (* This call is very important; it requests the next motion event.
+ * If you don't call gdk_window_get_pointer() you'll only get
+ * a single motion event. The reason is that we specified
+ * GDK_POINTER_MOTION_HINT_MASK to gtk_widget_set_events().
+ * If we hadn't specified that, we could just use event->x, event->y
+ * as the pointer location. But we'd also get deluged in events.
+ * By requesting the next event as we handle the current one,
+ * we avoid getting a huge number of events faster than we
+ * can cope.
+ *)
+
+ gdk_window_get_pointer (event^.window, @x, @y, @state);
+
+ if (state and GDK_BUTTON1_MASK) <> 0 then
+ draw_brush (widget, x, y);
+
+ (* We've handled it, stop processing *)
+ exit (TRUE);
+end;
+
+
+const
+ CHECK_SIZE = 10;
+ SPACING = 2;
+
+function checkerboard_expose (da : PGtkWidget;
+ event : PGdkEventButton;
+ data : gpointer): gboolean; cdecl;
+var
+ i, j,
+ xcount, ycount : gint;
+ gc1, gc2, gc : PGdkGc;
+ color : TGdkColor;
+
+begin
+ (* At the start of an expose handler, a clip region of event->area
+ * is set on the window, and event->area has been cleared to the
+ * widget's background color. The docs for
+ * gdk_window_begin_paint_region() give more details on how this
+ * works.
+ *)
+
+ (* It would be a bit more efficient to keep these
+ * GC's around instead of recreating on each expose, but
+ * this is the lazy/slow way.
+ *)
+ gc1 := gdk_gc_new (da^.window);
+ color.red := $7530;
+ color.green := $0;
+ color.blue := $7530;
+
+ gdk_gc_set_rgb_fg_color (gc1, @color);
+
+ gc2 := gdk_gc_new (da^.window);
+ color.red := $ffff;
+ color.green := $ffff;
+ color.blue := $ffff;
+
+ gdk_gc_set_rgb_fg_color (gc2, @color);
+
+ xcount := 0;
+ i := SPACING;
+ while i < da^.allocation.width do
+ begin
+ j := SPACING;
+ ycount := xcount mod 2; (* start with even/odd depending on row *)
+ while j < da^.allocation.height do
+ begin
+ if (ycount mod 2) <> 0 then
+ gc := gc1
+ else
+ gc := gc2;
+
+ (* If we're outside event->area, this will do nothing.
+ * It might be mildly more efficient if we handled
+ * the clipping ourselves, but again we're feeling lazy.
+ *)
+ gdk_draw_rectangle (da^.window,
+ gc,
+ gTRUE,
+ i, j,
+ CHECK_SIZE,
+ CHECK_SIZE);
+
+ j := j + CHECK_SIZE + SPACING;
+ inc (ycount);
+ end;
+
+ i := i + CHECK_SIZE + SPACING;
+ inc (xcount);
+ end;
+
+ g_object_unref (G_OBJECT (gc1));
+ g_object_unref (G_OBJECT (gc2));
+
+ (* return TRUE because we've handled this event, so no
+ * further processing is required.
+ *)
+ checkerboard_expose := TRUE;
+end;
+
+function do_drawingarea : PGtkWidget;
+var
+ frame,
+ vbox,
+ da,
+ thelabel : PGtkWidget;
+
+begin
+ if da_window = NULL then
+ begin
+ da_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (da_window), 'Drawing Area');
+
+ g_signal_connect (da_window, 'destroy', G_CALLBACK (@gtk_widget_destroyed), @da_window);
+
+ gtk_container_set_border_width (GTK_CONTAINER (da_window), 8);
+
+ vbox := gtk_vbox_new (FALSE, 8);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+ gtk_container_add (GTK_CONTAINER (da_window), vbox);
+
+ (*
+ * Create the checkerboard area
+ *)
+
+ thelabel := gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (thelabel),
+ '<u>Checkerboard pattern</u>');
+ gtk_box_pack_start (GTK_BOX (vbox), thelabel, FALSE, FALSE, 0);
+
+ frame := gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
+ gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
+
+ da := gtk_drawing_area_new ();
+ (* set a minimum size *)
+ gtk_widget_set_size_request (da, 100, 100);
+
+ gtk_container_add (GTK_CONTAINER (frame), da);
+
+ g_signal_connect (da, 'expose_event',
+ G_CALLBACK (@checkerboard_expose), NULL);
+
+ (*
+ * Create the scribble area
+ *)
+
+ thelabel := gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (thelabel),
+ '<u>Scribble area</u>');
+ gtk_box_pack_start (GTK_BOX (vbox), thelabel, FALSE, FALSE, 0);
+
+ frame := gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
+ gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
+
+ da := gtk_drawing_area_new ();
+ (* set a minimum size *)
+ gtk_widget_set_size_request (da, 100, 100);
+
+ gtk_container_add (GTK_CONTAINER (frame), da);
+
+ (* Signals used to handle backing pixmap *)
+
+ g_signal_connect (da, 'expose_event',
+ G_CALLBACK (@scribble_expose_event), NULL);
+ g_signal_connect (da,'configure_event',
+ G_CALLBACK (@scribble_configure_event), NULL);
+
+ (* Event signals *)
+
+ g_signal_connect (da, 'motion_notify_event',
+ G_CALLBACK (@scribble_motion_notify_event), NULL);
+ g_signal_connect (da, 'button_press_event',
+ G_CALLBACK (@scribble_button_press_event), NULL);
+
+
+ (* Ask to receive events the drawing area doesn't normally
+ * subscribe to
+ *)
+ gtk_widget_set_events (da, gtk_widget_get_events (da)
+ or GDK_LEAVE_NOTIFY_MASK
+ or GDK_BUTTON_PRESS_MASK
+ or GDK_POINTER_MOTION_MASK
+ or GDK_POINTER_MOTION_HINT_MASK);
+
+ end;
+
+ if not GTK_WIDGET_VISIBLE (da_window) then
+ gtk_widget_show_all (da_window)
+ else begin
+ gtk_widget_destroy (da_window);
+ da_window := NULL;
+ end;
+
+ do_drawingarea := da_window;
+end;
diff --git a/packages/gtk2/examples/gtk_demo/editable_cells.inc b/packages/gtk2/examples/gtk_demo/editable_cells.inc
new file mode 100644
index 0000000000..9ef26258e4
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/editable_cells.inc
@@ -0,0 +1,314 @@
+(* Tree View/Editable Cells
+ *
+ * This demo demonstrates the use of editable cells in a GtkTreeView. If
+ * you're new to the GtkTreeView widgets and associates, look into
+ * the GtkListStore example first.
+ *
+ *)
+
+ (*
+ * todo: translate to pascal
+ *)
+
+function do_editable_cells : PGtkWidget;
+begin
+ do_dummy ('Tree View / Editable Cells - Demo');
+ do_editable_cells := NULL;
+end;
+
+
+(*
+#include <gtk/gtk.h>
+#include <string.h>
+#include <stdlib.h>
+
+static GtkWidget *window = NULL;
+
+typedef struct
+{
+ gint number;
+ gchar *product;
+ gboolean editable;
+}
+Item;
+
+enum
+{
+ COLUMN_NUMBER,
+ COLUMN_PRODUCT,
+ COLUMN_EDITABLE,
+ NUM_COLUMNS
+};
+
+static GArray *articles = NULL;
+
+static void
+add_items (void)
+{
+ Item foo;
+
+ g_return_if_fail (articles != NULL);
+
+ foo.number = 3;
+ foo.product = g_strdup ("bottles of coke");
+ foo.editable = TRUE;
+ g_array_append_vals (articles, &foo, 1);
+
+ foo.number = 5;
+ foo.product = g_strdup ("packages of noodles");
+ foo.editable = TRUE;
+ g_array_append_vals (articles, &foo, 1);
+
+ foo.number = 2;
+ foo.product = g_strdup ("packages of chocolate chip cookies");
+ foo.editable = TRUE;
+ g_array_append_vals (articles, &foo, 1);
+
+ foo.number = 1;
+ foo.product = g_strdup ("can vanilla ice cream");
+ foo.editable = TRUE;
+ g_array_append_vals (articles, &foo, 1);
+
+ foo.number = 6;
+ foo.product = g_strdup ("eggs");
+ foo.editable = TRUE;
+ g_array_append_vals (articles, &foo, 1);
+}
+
+static GtkTreeModel *
+create_model (void)
+{
+ gint i = 0;
+ GtkListStore *model;
+ GtkTreeIter iter;
+
+ /* create array */
+ articles = g_array_sized_new (FALSE, FALSE, sizeof (Item), 1);
+
+ add_items ();
+
+ /* create list store */
+ model = gtk_list_store_new (NUM_COLUMNS, G_TYPE_INT, G_TYPE_STRING,
+ G_TYPE_BOOLEAN);
+
+ /* add items */
+ for (i = 0; i < articles->len; i++)
+ {
+ gtk_list_store_append (model, &iter);
+
+ gtk_list_store_set (model, &iter,
+ COLUMN_NUMBER,
+ g_array_index (articles, Item, i).number,
+ COLUMN_PRODUCT,
+ g_array_index (articles, Item, i).product,
+ COLUMN_EDITABLE,
+ g_array_index (articles, Item, i).editable,
+ -1);
+ }
+
+ return GTK_TREE_MODEL (model);
+}
+
+static void
+add_item (GtkWidget *button, gpointer data)
+{
+ Item foo;
+ GtkTreeIter iter;
+ GtkTreeModel *model = (GtkTreeModel * )data;
+
+ g_return_if_fail (articles != NULL);
+
+ foo.number = 0;
+ foo.product = g_strdup ("Description here");
+ foo.editable = TRUE;
+ g_array_append_vals (articles, &foo, 1);
+
+ gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+ COLUMN_NUMBER, foo.number,
+ COLUMN_PRODUCT, foo.product,
+ COLUMN_EDITABLE, foo.editable,
+ -1);
+}
+
+static void
+remove_item (GtkWidget *widget, gpointer data)
+{
+ GtkTreeIter iter;
+ GtkTreeView *treeview = (GtkTreeView * )data;
+ GtkTreeModel *model = gtk_tree_view_get_model (treeview);
+ GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview);
+
+ if (gtk_tree_selection_get_selected (selection, NULL, &iter))
+ {
+ gint i;
+ GtkTreePath *path;
+
+ path = gtk_tree_model_get_path (model, &iter);
+ i = gtk_tree_path_get_indices (path)[0];
+ gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+
+ g_array_remove_index (articles, i);
+
+ gtk_tree_path_free (path);
+ }
+}
+
+static void
+cell_edited (GtkCellRendererText *cell,
+ const gchar *path_string,
+ const gchar *new_text,
+ gpointer data)
+{
+ GtkTreeModel *model = (GtkTreeModel * )data;
+ GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
+ GtkTreeIter iter;
+
+ gint *column;
+
+ column = g_object_get_data (G_OBJECT (cell), "column");
+
+ gtk_tree_model_get_iter (model, &iter, path);
+
+ switch (GPOINTER_TO_INT (column))
+ {
+ case COLUMN_NUMBER:
+ {
+ gint i;
+
+ i = gtk_tree_path_get_indices (path)[0];
+ g_array_index (articles, Item, i).number = atoi (new_text);
+
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, column,
+ g_array_index (articles, Item, i).number, -1);
+ }
+ break;
+
+ case COLUMN_PRODUCT:
+ {
+ gint i;
+ gchar *old_text;
+
+ gtk_tree_model_get (model, &iter, column, &old_text, -1);
+ g_free (old_text);
+
+ i = gtk_tree_path_get_indices (path)[0];
+ g_free (g_array_index (articles, Item, i).product);
+ g_array_index (articles, Item, i).product = g_strdup (new_text);
+
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, column,
+ g_array_index (articles, Item, i).product, -1);
+ }
+ break;
+ }
+
+ gtk_tree_path_free (path);
+}
+
+static void
+add_columns (GtkTreeView *treeview)
+{
+ GtkCellRenderer *renderer;
+ GtkTreeModel *model = gtk_tree_view_get_model (treeview);
+
+ /* number column */
+ renderer = gtk_cell_renderer_text_new ();
+ g_signal_connect (G_OBJECT (renderer), "edited",
+ G_CALLBACK (cell_edited), model);
+ g_object_set_data (G_OBJECT (renderer), "column", (gint * )COLUMN_NUMBER);
+
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ -1, "Number", renderer,
+ "text", COLUMN_NUMBER,
+ "editable", COLUMN_EDITABLE,
+ NULL);
+
+ /* product column */
+ renderer = gtk_cell_renderer_text_new ();
+ g_signal_connect (G_OBJECT (renderer), "edited",
+ G_CALLBACK (cell_edited), model);
+ g_object_set_data (G_OBJECT (renderer), "column", (gint * )COLUMN_PRODUCT);
+
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ -1, "Product", renderer,
+ "text", COLUMN_PRODUCT,
+ "editable", COLUMN_EDITABLE,
+ NULL);
+}
+
+GtkWidget *
+do_editable_cells (void)
+{
+ if (!window)
+ {
+ GtkWidget *vbox;
+ GtkWidget *hbox;
+ GtkWidget *sw;
+ GtkWidget *treeview;
+ GtkWidget *button;
+ GtkTreeModel *model;
+
+ /* create window, etc */
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), "Shopping list");
+ gtk_container_set_border_width (GTK_CONTAINER (window), 5);
+ g_signal_connect (G_OBJECT (window), "destroy",
+ G_CALLBACK (gtk_widget_destroyed), &window);
+
+ vbox = gtk_vbox_new (FALSE, 5);
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+
+ gtk_box_pack_start (GTK_BOX (vbox),
+ gtk_label_new ("Shopping list (you can edit the cells!)"),
+ FALSE, FALSE, 0);
+
+ sw = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
+ GTK_SHADOW_ETCHED_IN);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+ gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
+
+ /* create model */
+ model = create_model ();
+
+ /* create tree view */
+ treeview = gtk_tree_view_new_with_model (model);
+ g_object_unref (G_OBJECT (model));
+ gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
+ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)),
+ GTK_SELECTION_SINGLE);
+
+ add_columns (GTK_TREE_VIEW (treeview));
+
+ gtk_container_add (GTK_CONTAINER (sw), treeview);
+
+ /* some buttons */
+ hbox = gtk_hbox_new (TRUE, 4);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+
+ button = gtk_button_new_with_label ("Add item");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (add_item), model);
+ gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+
+ button = gtk_button_new_with_label ("Remove item");
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (remove_item), treeview);
+ gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+
+ gtk_window_set_default_size (GTK_WINDOW (window), 320, 200);
+ }
+
+ if (!GTK_WIDGET_VISIBLE (window))
+ gtk_widget_show_all (window);
+ else
+ {
+ gtk_widget_destroy (window);
+ window = NULL;
+ }
+
+ return window;
+}
+*)
diff --git a/packages/gtk2/examples/gtk_demo/gtk_demo.pas b/packages/gtk2/examples/gtk_demo/gtk_demo.pas
new file mode 100644
index 0000000000..d956180b57
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/gtk_demo.pas
@@ -0,0 +1,1090 @@
+(* GTK Demo for Pascal
+ *
+ * Welcome to GTK Demo for Pascal.
+ *
+ *
+ * This demo is an adaption of the GTK Demo included in the GTK+-2.0 source.
+ * A new feature is syntax highligting for pascal.
+ *)
+
+program gtk_demo;
+
+{$mode objfpc} {$H+}
+uses glib2, pango, gdk2, gtk2, gdk2pixbuf, strings, math;
+
+var
+ info_buffer : PGtkTextBuffer;
+ source_buffer : PGtkTextBuffer;
+ current_file : pgchar;
+
+
+
+type
+ TFileOfChar = file of char;
+
+ TGDoDemoFunc = function : PGtkWidget;
+
+ PDemo = ^TDemo;
+ TDemo = record
+ title : pgchar;
+ filename : pgchar;
+ func : TGDoDemoFunc;
+ children : PDemo;
+ end;
+
+ PCallbackData = ^TCallbackData;
+ TCallbackData = record
+ model : PGtkTreeModel;
+ path : PGtkTreePath;
+ end;
+
+const
+
+ DEMO_DATA_DIR = 'data';
+
+ TITLE_COLUMN = 0;
+ FILENAME_COLUMN = 1;
+ FUNC_COLUMN = 2;
+ ITALIC_COLUMN = 3;
+ NUM_COLUMNS = 4;
+
+ STATE_NORMAL = 0;
+ STATE_IN_COMMENT = 1;
+
+ function demo_find_file ( base : pchar; err : PPGError): pgchar; forward;
+
+ (* file_is_valid
+ * a dirty little hack to find out if a file variable is assigned and the
+ * file is opened.
+ *)
+ function file_is_valid (var f: file): boolean;
+ begin
+ {$I-}
+ if eof(f) then
+ exit (TRUE);
+ {$I+}
+ if IOResult <> 0 then
+ file_is_valid := FALSE
+ else
+ file_is_valid := TRUE;
+ end;
+
+ (* min, max
+ * these two functions of the math unit are overloaded to understand double
+ * values.
+ *)
+ function min (d1, d2: double): double;
+ begin
+ if d1 > d2 then min := d2
+ else min := d1;
+ end;
+
+ function max (d1, d2: double): double;
+ begin
+ if d1 < d2 then max := d2
+ else max := d1;
+ end;
+
+ (* do_dummy
+ * creates a widget informing the user that the demo isn't implemented, yet
+ *)
+
+ procedure do_dummy (demo : pgchar);
+ var
+ dialog : PGtkWidget;
+ begin
+ dialog := gtk_message_dialog_new (NULL, 0,
+ GTK_MESSAGE_INFO,
+ GTK_BUTTONS_CLOSE,
+ 'Sorry, "%s" is''t implemented, yet.',
+ [demo]);
+
+ gtk_widget_show (dialog);
+
+ g_signal_connect (dialog, 'response',
+ G_CALLBACK (@gtk_widget_destroy), NULL);
+ end;
+
+ (* include the modules here;
+ * if you'd like to add one add the include command and
+ * create a new entry in the testgtk_demos array
+ *)
+
+ {$include appwindow.inc}
+ {$include button_box.inc}
+ {$include colorsel.inc}
+ {$include dialog.inc}
+ {$include drawingarea.inc}
+ {$include editable_cells.inc}
+ {$include images.inc}
+ {$include item_factory.inc}
+ {$include list_store.inc}
+ {$include menus.inc}
+ {$include panes.inc}
+ {$include pixbufs.inc}
+ {$include sizegroup.inc}
+ {$include stock_browser.inc}
+ {$include textview.inc}
+ {$include tree_store.inc}
+
+
+const
+ child0 : array [1..4] of TDemo = (
+ (title: 'Editable Cells'; filename: 'editable_cells.inc'; func: @do_editable_cells; children: nil),
+ (title: 'List Store'; filename: 'list_store.inc'; func: @do_list_store; children: nil),
+ (title: 'Tree Store'; filename: 'tree_store.inc'; func: @do_tree_store; children: nil),
+ (title: nil; filename: nil; func: nil; children: nil));
+
+ testgtk_demos: array [1..16] of TDemo = (
+ (title: '* This Application *'; filename: 'gtk_demo.pas'; func: nil; children: nil),
+ (title: 'Application main window'; filename: 'appwindow.inc'; func: @do_appwindow; children: nil),
+ (title: 'Button Boxes'; filename: 'button_box.inc'; func: @do_button_box; children: nil),
+ (title: 'Color Selector'; filename: 'colorsel.inc'; func: @do_colorsel; children: nil),
+ (title: 'Dialog and Message Boxes'; filename: 'dialog.inc'; func: @do_dialog; children: nil),
+ (title: 'Drawing Area'; filename: 'drawingarea.inc'; func: @do_drawingarea; children: nil),
+ (title: 'Images'; filename: 'images.inc'; func: @do_images; children: nil),
+ (title: 'Item Factory'; filename: 'item_factory.inc'; func: @do_item_factory; children: nil),
+ (title: 'Menus'; filename: 'menus.inc'; func: @do_menus; children: nil),
+ (title: 'Paned Widgets'; filename: 'panes.inc'; func: @do_panes; children: nil),
+ (title: 'Pixbufs'; filename: 'pixbufs.inc'; func: @do_pixbufs; children: nil),
+ (title: 'Size Groups'; filename: 'sizegroup.inc'; func: @do_sizegroup; children: nil),
+ (title: 'Stock Item and Icon Browser'; filename: 'stock_browser.inc'; func: @do_stock_browser; children: nil),
+ (title: 'Text Widget'; filename: 'textview.inc'; func: @do_textview; children: nil),
+ (title: 'Tree View'; filename: nil; func: nil; children: @child0),
+ (title: nil; filename: nil; func: nil; children: nil));
+
+
+function demo_find_file ( base : pchar;
+ err : PPGError): pgchar;
+var
+ filename : pchar;
+
+begin
+
+ if g_file_test (base, G_FILE_TEST_EXISTS) then begin
+ demo_find_file := g_strdup (base);
+ exit;
+ end else
+ begin
+ filename := g_build_filename (DEMO_DATA_DIR, [ base, NULL ]);
+
+ if not (g_file_test (filename, G_FILE_TEST_EXISTS)) then
+ begin
+ g_set_error (err, G_FILE_ERROR, G_FILE_ERROR_NOENT,
+ 'Cannot find demo data file "%s"', [base]);
+ g_free (filename);
+ demo_find_file := NULL;
+ end else
+ demo_find_file := filename;
+ end;
+end;
+
+
+function create_text (var buffer : PGtkTextBuffer;
+ is_source : gboolean): PGtkWidget;
+var
+ scrolled_window,
+ text_view : PGtkWidget;
+
+ font_desc : PPangoFontDescription;
+
+begin
+ scrolled_window := gtk_scrolled_window_new (NULL, NULL);
+
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
+ GTK_SHADOW_IN);
+
+ text_view := gtk_text_view_new;
+
+ buffer := gtk_text_buffer_new (NULL);
+
+ gtk_text_view_set_buffer (GTK_TEXT_VIEW (text_view), buffer);
+ gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), FALSE);
+ gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (text_view), FALSE);
+
+ gtk_container_add (GTK_CONTAINER (scrolled_window), text_view);
+
+ if is_source then
+ begin
+ font_desc := pango_font_description_from_string ('Courier 12');
+ gtk_widget_modify_font (text_view, font_desc);
+ pango_font_description_free (font_desc);
+
+ gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view),
+ GTK_WRAP_NONE);
+ end else
+ begin
+ (* Make it a bit nicer for text. *)
+ gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view),
+ GTK_WRAP_WORD);
+ gtk_text_view_set_pixels_above_lines (GTK_TEXT_VIEW (text_view), 2);
+ gtk_text_view_set_pixels_below_lines (GTK_TEXT_VIEW (text_view), 2);
+ end;
+
+ create_text := scrolled_window;
+end;
+
+
+const
+ tokens: array [1..4] of pgchar =
+ ('(*',
+ '''',
+ '{',
+ '//');
+
+ types: array [1..57] of pgchar =
+ ('integer',
+ 'gchar',
+ 'pgchar',
+ 'char',
+ 'gfloat',
+ 'real',
+ 'gint8',
+ 'gint16',
+ 'gint32',
+ 'gint',
+ 'guint',
+ 'guint8',
+ 'guint16',
+ 'guint32',
+ 'guchar',
+ 'glong',
+ 'longint',
+ 'gboolean' ,
+ 'gshort',
+ 'gushort',
+ 'gulong',
+ 'gdouble',
+ 'double',
+ 'gldouble',
+ 'gpointer',
+ 'pointer',
+ 'NULL',
+ 'nil',
+ 'PGList',
+ 'TGList',
+ 'TGSList',
+ 'PGSList',
+ 'FALSE',
+ 'TRUE',
+ 'PGtkObject',
+ 'TGtkObject',
+ 'TGtkColorSelection',
+ 'PGtkColorSelection',
+ 'PGtkWidget',
+ 'TGtkWidget',
+ 'PGtkButton',
+ 'TGtkButton',
+ 'TGdkColor',
+ 'PGdkColor',
+ 'TGdkRectangle',
+ 'PGdkRectangle',
+ 'TGdkEventExpose',
+ 'PGdkEventExpose',
+ 'TGdkGC',
+ 'PGdkGC',
+ 'TGdkPixbufLoader',
+ 'PGdkPixbufLoader',
+ 'TGdkPixbuf',
+ 'PGdkPixbuf',
+ 'PPGError',
+ 'PGError',
+ 'array');
+
+ control: array [1..23] of pgchar = (
+ 'if',
+ 'then',
+ 'case',
+ 'while',
+ 'else',
+ 'do',
+ 'for',
+ 'begin',
+ 'end',
+ 'exit',
+ 'goto',
+ 'program',
+ 'unit',
+ 'library',
+ 'procedure',
+ 'function',
+ 'type',
+ 'var',
+ 'const',
+ 'record',
+ 'uses',
+ 'of',
+ 'in');
+
+procedure parse_chars ( text : pgchar;
+ var end_ptr : pgchar;
+ var state : gint;
+ var tag : pgchar;
+ start : gboolean);
+var
+ i : gint;
+ next_token : pgchar;
+
+ maybe_escape : boolean;
+begin
+ (* leave out leading spaces *)
+ while (text^ <> #0) and (g_ascii_isspace (text^)) do
+ inc (text);
+
+ (* Handle comments first *)
+
+ if state = STATE_IN_COMMENT then
+ begin
+ end_ptr := StrPos (text, '*)');
+ next_token := StrPos (text, '}');
+
+ if next_token > end_ptr then begin
+ end_ptr := next_token + 1; // '}' comment type
+ state := STATE_NORMAL;
+ tag := 'comment';
+ end else
+ if end_ptr <> NULL then
+ begin
+ end_ptr := end_ptr + 2; // '* )' comment type
+ state := STATE_NORMAL;
+ tag := 'comment';
+ end;
+
+ exit;
+ end;
+
+ tag := NULL;
+ end_ptr := NULL;
+
+ if text^ = #0 then
+ exit;
+
+ (* check for preprocessor defines *)
+
+ if (((StrLComp (text, '(*', 2)) = 0) and (text[2] = '$') ) or
+ (((StrLComp (text, '{', 1)) = 0) and (text[1] = '$') ) then
+ begin
+ end_ptr := StrPos (text, '*)');
+ next_token := StrPos (text, '}');
+
+ if next_token > end_ptr then
+ end_ptr := next_token + 1
+ else
+ if end_ptr <> NULL then
+ end_ptr := end_ptr + 2;
+
+ tag := 'preprocessor';
+ exit;
+ end;
+
+
+
+ (* check for comment *)
+
+ if ((StrLComp (text, '(*', 2)) = 0) or
+ ((StrLComp (text, '{', 1)) = 0) then
+ begin
+ end_ptr := StrPos (text, '*)');
+ next_token := StrPos (text, '}');
+
+ if next_token > end_ptr then
+ end_ptr := next_token+1
+ else begin
+ if end_ptr <> NULL then
+ end_ptr := end_ptr + 2
+ else
+ state := STATE_IN_COMMENT;
+ end;
+ tag := 'comment';
+ exit;
+ end;
+
+ if (StrLComp (text, '//', 2)) = 0 then
+ begin
+ end_ptr := NULL;
+ tag := 'comment';
+ exit;
+ end;
+
+ (* check for types *)
+
+ for i := 1 to high (types) do
+ if ((StrLComp (text, types[i], strlen (types[i]))) = 0 ) and
+ ((text+strlen(types[i]))^ in [#8, #32, #0, ';', #13, #10, ')', ']', ':']) then
+ begin
+ end_ptr := text + strlen (types[i]);
+ tag := 'type';
+ exit;
+ end;
+
+ (* check for control *)
+ for i := 1 to high (control) do begin
+ if ((StrLComp (text, control[i], strlen (control[i]))) = 0) and
+ ((text+strlen(control[i]))^ in [#8, #32, #0, ';', #13, #10, ')', ']', ':']) then
+ begin
+ end_ptr := text + strlen (control[i]);
+ tag := 'control';
+ exit;
+ end;
+ end;
+
+ (* check for string *)
+ if text^= '''' then
+ begin
+ maybe_escape := FALSE;
+
+ end_ptr := text + 1;
+ tag := 'string';
+
+ while end_ptr^ <> #0 do
+ begin
+ if (end_ptr^ = '''') and (maybe_escape = FALSE) then
+ begin
+ inc (end_ptr);
+ exit;
+ end;
+
+ if end_ptr^ = '\' then
+ maybe_escape := TRUE
+ else
+ maybe_escape := FALSE;
+
+ inc (end_ptr);
+ end;
+ exit;
+ end;
+
+
+ (* not at the start of a tag. Find the next one. *)
+ for i := 1 to high(tokens) do
+ begin
+ next_token := StrPos (text, tokens[i]);
+ if next_token <> NULL then
+ begin
+ if end_ptr <> NULL then
+ begin
+ if end_ptr > next_token then
+ end_ptr := next_token;
+ end else
+ end_ptr := next_token;
+ end;
+ end;
+
+ for i := 1 to high(types) do
+ begin
+ next_token := StrPos (text, types[i]);
+ if next_token <> NULL then
+ if ( (next_token+strlen(types[i]))^
+ in [#8, #32, #0, ';', #13, #10, ')', ']', ':']) and
+ g_ascii_isspace ((next_token-1)^) then
+ begin
+ if end_ptr <> NULL then
+ begin
+ if end_ptr > next_token then
+ end_ptr := next_token;
+ end else
+ end_ptr := next_token;
+ end;
+ end;
+
+
+ for i := 1 to high(control) do
+ begin
+ next_token := StrPos (text, control[i]);
+ if next_token <> NULL then
+ if ( (next_token+strlen(control[i]))^
+ in [#8, #32, #0, ';', #13, #10, ')', ']', ':']) and
+ g_ascii_isspace ((next_token-1)^) then
+ begin
+ if end_ptr <> NULL then
+ begin
+ if end_ptr > next_token then
+ end_ptr := next_token;
+ end else
+ end_ptr := next_token;
+ end;
+ end;
+end;
+
+
+(* While not as cool as c-mode, this will do as a quick attempt at highlighting *)
+
+procedure fontify;
+
+var
+ start_iter,
+ next_iter,
+ tmp_iter : TGtkTextIter;
+
+ state : gint;
+ text : pgchar;
+ start_ptr,
+
+ end_ptr : pgchar;
+ tag : pgchar;
+ start : gboolean;
+
+begin
+ state := STATE_NORMAL;
+
+ gtk_text_buffer_get_iter_at_offset (source_buffer, @start_iter, 0);
+
+ next_iter := start_iter;
+
+ while (gtk_text_iter_forward_line (@next_iter)) do
+ begin
+ start := TRUE;
+ text := gtk_text_iter_get_text ( @start_iter, @next_iter);
+ start_ptr := text;
+
+ repeat
+ parse_chars (start_ptr, end_ptr, state, tag, start);
+
+ start := FALSE;
+ if end_ptr <> NULL then begin
+ tmp_iter := start_iter;
+ gtk_text_iter_forward_chars (@tmp_iter, end_ptr - start_ptr);
+ end else
+ tmp_iter := next_iter;
+
+ if tag <> NULL then
+ gtk_text_buffer_apply_tag_by_name (source_buffer, tag, @start_iter, @tmp_iter);
+
+ start_iter := tmp_iter;
+ start_ptr := end_ptr;
+ until end_ptr = NULL;
+
+ g_free (text);
+ start_iter := next_iter;
+ end;
+end;
+
+function read_line (var f: TFileOfChar; str: PGString): boolean;
+var
+ n_read : integer;
+ c,
+ next_c : char;
+
+begin
+ n_read := 0;
+
+ g_string_truncate (str, 0);
+
+ while not eof(f) do begin
+ read (f, c);
+
+ inc (n_read);
+
+ if (c = #10) or (c = #13) then
+ begin
+ if not eof(f) then
+ begin
+ read (f, next_c);
+
+ if not ((next_c in [#13, #10]) and (c <> next_c)) then
+ seek(f, filepos(f)-1);
+ break;
+ end;
+ end else
+ g_string_append_c (str, c);
+ end;
+
+ read_line := n_read > 0;
+end;
+
+
+
+(* opens a textfile and reads it into the TGtkTextBuffer *)
+procedure load_file (filename : pgchar);
+
+var
+ text_start,
+ text_end : TGtkTextIter;
+
+ err : PGError;
+ buffer : PGString;
+ state,
+ len_chars,
+ len : integer;
+
+ in_para : gboolean;
+ f : TFileOfChar;
+ full_name : pchar;
+ p, q, r : pgchar;
+
+begin
+
+ err := NULL;
+ buffer := g_string_new (NULL);
+ state := 0;
+ in_para := FALSE;
+
+ if (current_file <> NULL) and (StrComp (current_file, filename) = 0) then begin
+ g_string_free (buffer, TRUE);
+ exit;
+ end;
+
+ g_free (current_file);
+ current_file := g_strdup (filename);
+
+ gtk_text_buffer_get_bounds (info_buffer, @text_start, @text_end);
+ gtk_text_buffer_delete (info_buffer, @text_start, @text_end);
+
+ gtk_text_buffer_get_bounds (source_buffer, @text_start, @text_end);
+ gtk_text_buffer_delete (source_buffer, @text_start, @text_end);
+
+ full_name := demo_find_file (filename, @err);
+
+ if full_name = NULL then begin
+ g_warning ('%s', [err^.message]);
+ g_error_free (err);
+ exit;
+ end;
+
+ {$I-}
+ assign (f, full_name);
+ reset (f);
+ {$I+}
+
+ if IOResult <> 0 then
+ g_print ('Cannot open %s: file not found'#13#10, [full_name]);
+
+ g_free (full_name);
+
+ if IOResult <> 0 then
+ exit;
+
+ gtk_text_buffer_get_iter_at_offset (info_buffer, @text_start, 0);
+
+ while read_line (f, buffer) do
+ begin
+ p := buffer^.str;
+
+ case state of
+ 0 : begin (* Reading title *)
+
+ while (((p^ = '(') or (p^ = '*')) or (p^ = '{')) or g_ascii_isspace (p^) do
+ inc (p);
+ r := p;
+
+ while (r^ <> ')') and (strlen (r) > 0) do
+ inc (r);
+
+ if strlen (r) > 0 then
+ p := r + 1;
+
+ q := p + strlen (p);
+
+ while (q > p) and g_ascii_isspace ((q - 1)^) do
+ dec(q);
+
+ if q > p then
+ begin
+ len_chars := g_utf8_pointer_to_offset (p, q);
+
+ text_end := text_start;
+
+// g_assert (strlen (p) >= (q - p));
+
+ gtk_text_buffer_insert (info_buffer, @text_end, p, q - p);
+ text_start := text_end;
+
+ gtk_text_iter_backward_chars (@text_start, len_chars);
+ gtk_text_buffer_apply_tag_by_name (info_buffer, 'title', @text_start, @text_end);
+
+ text_start := text_end;
+
+ inc (state);
+ end; {of q > p }
+ end; {of state = 0}
+
+
+ 1: begin (* Reading body of info section *)
+ while g_ascii_isspace (p^) do
+ inc(p);
+
+ if (p^ = '*') and ((p + 1)^ = ')') then
+ begin
+ gtk_text_buffer_get_iter_at_offset (source_buffer, @text_start, 0);
+ inc(state);
+ end else
+ begin
+ while (p^ = '*') or g_ascii_isspace (p^) do
+ inc(p);
+
+ len := strlen (p);
+
+ while g_ascii_isspace ( (p + len - 1)^) do
+ dec (len);
+
+ if len > 0 then
+ begin
+
+ if in_para then
+ gtk_text_buffer_insert (info_buffer, @text_start, ' ', 1);
+
+// g_assert (strlen (p) >= len);
+
+ gtk_text_buffer_insert (info_buffer, @text_start, p, len);
+
+ in_para := TRUE;
+ end else
+ begin
+ gtk_text_buffer_insert (info_buffer, @text_start, #10, 1);
+ in_para := FALSE;
+ end; {else len <= 0}
+ end;
+ end;
+ 2: begin (* Skipping blank lines *)
+ while g_ascii_isspace (p^) do
+ inc(p);
+
+ if p^ <> #0 then
+ begin
+ p := buffer^.str;
+ inc (state); (* Fall through *)
+
+ (* Reading program body *)
+ gtk_text_buffer_insert (source_buffer, @text_start, p, -1);
+ gtk_text_buffer_insert (source_buffer, @text_start, #10, 1);
+ end;
+ end;
+
+ 3: begin (* Reading program body *)
+ gtk_text_buffer_insert (source_buffer, @text_start, p, -1);
+ gtk_text_buffer_insert (source_buffer, @text_start, #10, 1);
+ end;
+ end;
+ end;
+
+ close (f);
+ fontify ();
+
+ g_string_free (buffer, TRUE);
+end;
+
+(* some callbacks *)
+
+procedure window_closed_cb (window : PGtkWidget;
+ data : gpointer); cdecl;
+var
+ cbdata : PCallbackData;
+ iter : TGtkTreeIter;
+ italic,
+ nitalic : gboolean;
+
+begin
+ cbdata := data;
+
+ gtk_tree_model_get_iter (cbdata^.model, @iter, cbdata^.path);
+ gtk_tree_model_get (GTK_TREE_MODEL (cbdata^.model), @iter,
+ [ ITALIC_COLUMN, @italic, -1] );
+ nitalic := not italic;
+
+ if italic then
+ gtk_tree_store_set (GTK_TREE_STORE (cbdata^.model), @iter,
+ [ ITALIC_COLUMN, nitalic, -1] );
+
+ gtk_tree_path_free (cbdata^.path);
+ dispose (cbdata);
+
+end;
+
+
+
+procedure row_activated_cb (tree_view : PGtkTreeView;
+ path : PGtkTreePath;
+ column : PGtkTreeViewColumn); cdecl;
+var
+ iter : TGtkTreeIter;
+ italic,
+ nitalic : gboolean;
+ func : TGDoDemoFunc;
+ window : PGtkWidget;
+ model : PGtkTreeModel;
+ cbdata : PCallbackData;
+
+begin
+ model := gtk_tree_view_get_model (tree_view);
+
+ gtk_tree_model_get_iter (model, @iter, path);
+ gtk_tree_model_get (GTK_TREE_MODEL (model),
+ @iter,
+ [ FUNC_COLUMN, @func,
+ ITALIC_COLUMN, @italic, -1 ]);
+
+ if func <> NULL then
+ begin
+ nitalic := not italic;
+ gtk_tree_store_set (GTK_TREE_STORE (model),
+ @iter,
+ [ ITALIC_COLUMN, nitalic, -1 ] );
+
+ window := func();
+
+ if window <> NULL then
+ begin
+ new (cbdata);
+ cbdata^.model := model;
+
+ cbdata^.path := gtk_tree_path_copy (path);
+
+ g_signal_connect (window, 'destroy',
+ G_CALLBACK (@window_closed_cb), cbdata );
+ end;
+ end;
+end;
+
+
+procedure selection_cb ( selection : PGtkTreeSelection;
+ model : PGtkTreeModel); cdecl;
+var
+ iter : TGtkTreeIter;
+// value : TGValue;
+ str : pgchar;
+
+begin
+
+(* g_value_init(@value, G_TYPE_STRING); // added to test if TGValue works
+ // -- its seems not as if it does *)
+
+ if not gtk_tree_selection_get_selected (selection, NULL, @iter) then
+ exit;
+
+(* The original code used TGValue but it seems not to work; check why *)
+
+(*
+ gtk_tree_model_get_value (model, @iter, FILENAME_COLUMN, @value);
+
+ if (g_value_get_string (@value)) <> NULL then
+ load_file (g_value_get_string (@value));
+
+ g_value_unset (@value);
+*)
+
+ gtk_tree_model_get (model, @iter, [FILENAME_COLUMN, @str, -1]);
+
+ if str <> NULL then
+ load_file (str);
+
+end;
+
+
+function create_tree: PGtkWidget;
+
+var
+ selection : PGtkTreeSelection;
+ cell : PGtkCellRenderer;
+ tree_view : PGtkWidget;
+ column : PGtkTreeViewColumn;
+ model : PGtkTreeStore;
+
+ iter,
+ child_iter : TGtkTreeIter;
+
+ d,
+ children : PDemo;
+
+begin
+ d := @testgtk_demos;
+
+ model := gtk_tree_store_new (NUM_COLUMNS, [G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN]);
+
+ tree_view := gtk_tree_view_new ();
+
+ gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), GTK_TREE_MODEL (model));
+ selection := gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
+
+ gtk_tree_selection_set_mode (GTK_TREE_SELECTION (selection),
+ GTK_SELECTION_BROWSE);
+
+ gtk_widget_set_size_request (tree_view, 200, -1);
+
+ (* this code only supports 1 level of children. If we
+ * want more we probably have to use a recursing function.
+ *)
+
+
+ while d^.title <> NULL do begin
+ children := d^.children;
+
+ gtk_tree_store_append (GTK_TREE_STORE (model), @iter, NULL);
+
+ gtk_tree_store_set (GTK_TREE_STORE (model),
+ @iter,
+ [ TITLE_COLUMN, d^.title,
+ FILENAME_COLUMN, d^.filename,
+ FUNC_COLUMN, d^.func,
+ ITALIC_COLUMN, FALSE, -1 ] );
+
+ inc(d);
+
+ if children = NULL then
+ continue;
+
+ while children^.title <> NULL do begin
+
+ gtk_tree_store_append (GTK_TREE_STORE (model), @child_iter, @iter);
+
+ gtk_tree_store_set (GTK_TREE_STORE (model),
+ @child_iter,
+ [TITLE_COLUMN, children^.title,
+ FILENAME_COLUMN, children^.filename,
+ FUNC_COLUMN, children^.func,
+ ITALIC_COLUMN, FALSE, -1]);
+ inc (children);
+ end;
+ end;
+
+ cell := gtk_cell_renderer_text_new ();
+
+ g_object_set (G_OBJECT (cell),
+ 'style', [ PANGO_STYLE_ITALIC, NULL ]);
+
+
+ column := gtk_tree_view_column_new_with_attributes ('Widget (double click for demo)',
+ cell,
+ [ 'text', TITLE_COLUMN,
+ 'style_set', ITALIC_COLUMN, NULL ] );
+
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view),
+ GTK_TREE_VIEW_COLUMN (column));
+
+ g_signal_connect (selection, 'changed', G_CALLBACK (@selection_cb), model);
+ g_signal_connect (tree_view, 'row_activated', G_CALLBACK (@row_activated_cb), model);
+
+ gtk_tree_view_expand_all (GTK_TREE_VIEW (tree_view));
+
+ create_tree := tree_view;
+end;
+
+
+procedure setup_default_icon;
+var
+ pixbuf : PGdkPixbuf;
+ filename : pchar;
+ err : PGError;
+
+ dialog : PGtkWidget;
+
+ list : PGList;
+ transparent : PGdkPixbuf;
+
+begin
+ err := NULL;
+ pixbuf := NULL;
+ dialog := NULL;
+
+ filename := demo_find_file ('gtk-logo-rgb.gif', @err);
+
+ if filename <> NULL then
+ begin
+ pixbuf := gdk_pixbuf_new_from_file (filename, @err);
+ g_free (filename);
+ end;
+
+ (* Ignoring this error (passing NULL instead of &err above)
+ * would probably be reasonable for most apps. We're just
+ * showing off.
+ *)
+
+ if err <> NULL then
+ begin
+ dialog := gtk_message_dialog_new (NULL, 0,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ 'Failed to read icon file: %s',
+ [err^.message]);
+ gtk_widget_show (dialog);
+ g_error_free (err);
+
+ g_signal_connect (dialog, 'response',
+ G_CALLBACK (@gtk_widget_destroy), NULL);
+ end;
+
+ if pixbuf <> NULL then
+ begin
+ (* The gtk-logo-rgb icon has a white background, make it transparent *)
+
+ transparent := gdk_pixbuf_add_alpha (pixbuf, TRUE, $ff, $ff, $ff);
+
+ list := NULL;
+ list := g_list_append (list, transparent);
+
+ gtk_window_set_default_icon_list (list);
+
+ g_list_free (list);
+ g_object_unref (G_OBJECT (pixbuf));
+ g_object_unref (G_OBJECT (transparent));
+ end;
+end;
+
+
+
+var
+ window,
+ notebook,
+ hbox,
+ tree : PGtkWidget;
+
+begin
+ current_file := NULL;
+
+ {$include init.inc} (* contains all variable inits of the demos *)
+
+ gtk_init (@argc, @argv);
+
+ setup_default_icon ();
+
+ window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ gtk_window_set_title (GTK_WINDOW (window), 'GTK+ Code Demos');
+
+ g_signal_connect (window, 'destroy',
+ G_CALLBACK (@gtk_main_quit), NULL);
+
+ hbox := gtk_hbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (window), hbox);
+
+ tree := create_tree;
+
+ gtk_box_pack_start (GTK_BOX (hbox), tree, FALSE, FALSE, 0);
+
+ notebook := gtk_notebook_new;
+ gtk_box_pack_start (GTK_BOX (hbox), notebook, TRUE, TRUE, 0);
+
+ gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
+ create_text (info_buffer, FALSE),
+ gtk_label_new_with_mnemonic ('_Info'));
+
+
+ gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
+ create_text (source_buffer, TRUE),
+ gtk_label_new_with_mnemonic ('_Source'));
+
+ gtk_text_buffer_create_tag (info_buffer, 'title', 'font', ['Sans 18', NULL ]);
+
+ gtk_text_buffer_create_tag (source_buffer, 'comment', 'foreground', ['red', NULL]);
+
+ gtk_text_buffer_create_tag (source_buffer, 'type', 'foreground', ['ForestGreen', NULL]);
+
+ gtk_text_buffer_create_tag (source_buffer, 'string', 'foreground',
+ ['RosyBrown', 'weight', PANGO_WEIGHT_BOLD, NULL]);
+
+ gtk_text_buffer_create_tag (source_buffer, 'control', 'foreground', ['purple', NULL]);
+
+ gtk_text_buffer_create_tag (source_buffer, 'preprocessor', 'style',
+ [ PANGO_STYLE_OBLIQUE, 'foreground', 'blue', NULL] );
+
+ gtk_text_buffer_create_tag (source_buffer, 'function', 'weight',
+ [ PANGO_WEIGHT_BOLD, 'foreground', 'DarkGoldenrod4', NULL]);
+
+ gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
+ gtk_widget_show_all (window);
+
+ gtk_main;
+end.
diff --git a/packages/gtk2/examples/gtk_demo/images.inc b/packages/gtk2/examples/gtk_demo/images.inc
new file mode 100644
index 0000000000..bc89affcbb
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/images.inc
@@ -0,0 +1,438 @@
+(* Images
+ *
+ * GtkImage is used to display an image; the image can be in a number of formats.
+ * Typically, you load an image into a GdkPixbuf, then display the pixbuf.
+ *
+ * This demo code shows some of the more obscure cases, in the simple
+ * case a call to gtk_image_new_from_file() is all you need.
+ *
+ * If you want to put image data in your program as a C variable,
+ * use the make-inline-pixbuf program that comes with GTK+.
+ * This way you won't need to depend on loading external files, your
+ * application binary can be self-contained.
+ *)
+
+
+var
+ image_window : PGtkWidget;
+ image_pixbuf_loader : PGdkPixbufLoader;
+ image_load_timeout : guint;
+ image_stream : file;
+
+type
+ TBuffer256 = array [0..255] of byte;
+
+procedure progressive_prepared_callback (loader : PGdkPixbufLoader;
+ data : gpointer); cdecl;
+var
+ pixbuf : PGdkPixbuf;
+ image : PGtkWidget;
+
+begin
+ image := PGtkWidget (data);
+
+ pixbuf := gdk_pixbuf_loader_get_pixbuf (loader);
+
+ (* Avoid displaying random memory contents, since the pixbuf
+ * isn't filled in yet.
+ *)
+ gdk_pixbuf_fill (pixbuf, $aaaaaaff);
+
+ gtk_image_set_from_pixbuf (pGtkImage (image), pixbuf);
+end;
+
+procedure progressive_updated_callback (loader : PGdkPixbufLoader;
+ x, y,
+ width,
+ height : gint;
+ data : gpointer); cdecl;
+var
+ image : PGtkWidget;
+
+begin
+ image := PGtkWidget (data);
+
+ (* We know the pixbuf inside the GtkImage has changed, but the image
+ * itself doesn't know this; so queue a redraw. If we wanted to be
+ * really efficient, we could use a drawing area or something
+ * instead of a GtkImage, so we could control the exact position of
+ * the pixbuf on the display, then we could queue a draw for only
+ * the updated area of the image.
+ *)
+
+ gtk_widget_queue_draw (image);
+end;
+
+function progressive_timeout (data : gpointer): gboolean; cdecl;
+var
+ image : PGtkWidget;
+ buf : TBuffer256;
+ bytes_read : integer;
+ error : PGError;
+ dialog : PGtkWidget;
+ error_msg,
+ filename : pgchar;
+
+begin
+ image := PGtkWidget (data);
+
+ (* This shows off fully-paranoid error handling, so looks scary.
+ * You could factor out the error handling code into a nice separate
+ * function to make things nicer.
+ *)
+
+ if file_is_valid (image_stream) then // is there a better way???
+ begin
+ error := NULL;
+
+ blockread (image_stream, buf, sizeof(buf), bytes_read);
+
+ if not gdk_pixbuf_loader_write (image_pixbuf_loader,
+ @buf[0], bytes_read, @error) then
+ begin
+ dialog := gtk_message_dialog_new (GTK_WINDOW (image_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ 'Failed to load image: %s',
+ [error^.message]);
+
+ g_error_free (error);
+
+ g_signal_connect (dialog, 'response',
+ G_CALLBACK (@gtk_widget_destroy), NULL);
+
+ close (image_stream);
+
+ gtk_widget_show (dialog);
+
+ image_load_timeout := 0;
+
+ exit (FALSE); (* uninstall the timeout *)
+ end; {of not gdk_pixbuf_loader_write}
+
+ if eof (image_stream) then
+ begin
+ close (image_stream);
+
+ (* Errors can happen on close, e.g. if the image
+ * file was truncated we'll know on close that
+ * it was incomplete.
+ *)
+ error := NULL;
+ if not gdk_pixbuf_loader_close (image_pixbuf_loader, @error) then
+ begin
+ dialog := gtk_message_dialog_new (GTK_WINDOW (image_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ 'Failed to load image: %s',
+ [error^.message]);
+
+ g_error_free (error);
+
+ g_signal_connect (dialog, 'response',
+ G_CALLBACK (@gtk_widget_destroy), NULL);
+
+ gtk_widget_show (dialog);
+
+ g_object_unref (G_OBJECT (image_pixbuf_loader));
+ image_pixbuf_loader := NULL;
+
+ image_load_timeout := 0;
+
+ exit(FALSE); (* uninstall the timeout *)
+ end; {of not gdk_pixbuf_loader_close}
+
+ g_object_unref (G_OBJECT (image_pixbuf_loader));
+ image_pixbuf_loader := NULL;
+ end; {of eof}
+ end {of image_stream}
+ else begin
+ error_msg := NULL;
+
+ (* demo_find_file() looks in the the current directory first,
+ * so you can run gtk-demo without installing GTK, then looks
+ * in the location where the file is installed.
+ *)
+
+ filename := demo_find_file ('alphatest.png', @error);
+ if error <> NULL then
+ begin
+ error_msg := g_strdup (error^.message);
+ g_error_free (error);
+ end else
+ begin
+ {$I-}
+ assign (image_stream, filename);
+ reset (image_stream, 1);
+ {$I+}
+
+ if IOResult <> 0 then
+ error_msg := g_strdup_printf ('Error while opening file "%s"',
+ [filename]);
+ g_free (filename);
+ end;
+
+ if not file_is_valid (image_stream) then
+ begin
+ dialog := gtk_message_dialog_new (GTK_WINDOW (image_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ '%s', [error_msg]);
+ g_free (error_msg);
+
+ g_signal_connect (dialog, 'response',
+ G_CALLBACK (@gtk_widget_destroy), NULL);
+
+ gtk_widget_show (dialog);
+
+ image_load_timeout := 0;
+
+ exit (FALSE); (* uninstall the timeout *)
+ end;
+
+ if image_pixbuf_loader <> NULL then
+ begin
+ gdk_pixbuf_loader_close (image_pixbuf_loader, NULL);
+ g_object_unref (G_OBJECT (image_pixbuf_loader));
+ image_pixbuf_loader := NULL;
+ end;
+
+ image_pixbuf_loader := gdk_pixbuf_loader_new ();
+
+ g_signal_connect (G_OBJECT (image_pixbuf_loader), 'area_prepared',
+ G_CALLBACK (@progressive_prepared_callback), image);
+
+ g_signal_connect (G_OBJECT (image_pixbuf_loader), 'area_updated',
+ G_CALLBACK (@progressive_updated_callback), image);
+ end; {of else image_stream}
+
+ (* leave timeout installed *)
+ exit (TRUE);
+end;
+
+procedure start_progressive_loading (image : PGtkWidget); cdecl;
+begin
+ (* This is obviously totally contrived (we slow down loading
+ * on purpose to show how incremental loading works).
+ * The real purpose of incremental loading is the case where
+ * you are reading data from a slow source such as the network.
+ * The timeout simply simulates a slow data source by inserting
+ * pauses in the reading process.
+ *)
+ image_load_timeout := g_timeout_add (150,
+ @progressive_timeout,
+ image);
+end;
+
+procedure images_cleanup_callback (theobject : PGtkObject;
+ data : gpointer); cdecl;
+begin
+ if image_load_timeout <> 0 then
+ begin
+ g_source_remove (image_load_timeout);
+ image_load_timeout := 0;
+ end;
+
+ if image_pixbuf_loader <> NULL then
+ begin
+ gdk_pixbuf_loader_close (image_pixbuf_loader, NULL);
+ g_object_unref (G_OBJECT (image_pixbuf_loader));
+ image_pixbuf_loader := NULL;
+ end;
+
+ if file_is_valid (image_stream) then
+ close (image_stream);
+end;
+
+procedure toggle_sensitivity_callback (togglebutton : PGtkWidget;
+ user_data : gpointer);cdecl;
+var
+ container : PGtkContainer;
+ list,
+ tmp : PGList;
+
+begin
+ container := PGtkContainer (user_data);
+
+ list := gtk_container_get_children (container);
+
+ tmp := list;
+
+ while tmp <> NULL do
+ begin
+ (* don't disable our toggle *)
+ if pGtkWidget (tmp^.data) <> togglebutton then
+ gtk_widget_set_sensitive (pGtkWidget (tmp^.data),
+ not gtk_toggle_button_get_active (pGtkToggleButton (togglebutton)));
+
+ tmp := tmp^.next;
+ end;
+
+ g_list_free (list);
+end;
+
+
+function do_images : PGtkWidget;
+var
+ frame,
+ vbox,
+ image,
+ thelabel,
+ align,
+ dialog,
+ button : PGtkWidget;
+
+ pixbuf : PGdkPixbuf;
+ error : PGError;
+ filename : pgchar;
+
+begin
+ error := NULL;
+
+ if image_window = NULL then
+ begin
+ image_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (image_window), 'Images');
+
+ g_signal_connect (image_window, 'destroy',
+ G_CALLBACK (@gtk_widget_destroyed), @image_window);
+ g_signal_connect (image_window, 'destroy',
+ G_CALLBACK (@images_cleanup_callback), NULL);
+
+ gtk_container_set_border_width (GTK_CONTAINER (image_window), 8);
+
+ vbox := gtk_vbox_new (FALSE, 8);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+ gtk_container_add (GTK_CONTAINER (image_window), vbox);
+
+ thelabel := gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (thelabel),
+ '<u>Image loaded from a file</u>');
+
+ gtk_box_pack_start (GTK_BOX (vbox), thelabel, FALSE, FALSE, 0);
+
+ frame := gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
+
+ (* The alignment keeps the frame from growing when users resize
+ * the window
+ *)
+ align := gtk_alignment_new (0.5, 0.5, 0, 0);
+ gtk_container_add (GTK_CONTAINER (align), frame);
+ gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
+
+ (* demo_find_file() looks in the the current directory first,
+ * so you can run gtk-demo without installing GTK, then looks
+ * in the location where the file is installed.
+ *)
+
+ pixbuf := NULL;
+ filename := demo_find_file ('gtk-logo-rgb.gif', @error);
+ if filename <> NULL then
+ begin
+ pixbuf := gdk_pixbuf_new_from_file (filename, @error);
+ g_free (filename);
+ end;
+
+ if error <> NULL then
+ begin
+ (* This code shows off error handling. You can just use
+ * gtk_image_new_from_file() instead if you don't want to report
+ * errors to the user. If the file doesn't load when using
+ * gtk_image_new_from_file(), a "missing image" icon will
+ * be displayed instead.
+ *)
+
+ dialog := gtk_message_dialog_new (GTK_WINDOW (image_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ 'Unable to open image file "gtk-logo-rgb.gif": %s',
+ [error^.message]);
+ g_error_free (error);
+
+ g_signal_connect (dialog, 'response',
+ G_CALLBACK (@gtk_widget_destroy), NULL);
+
+ gtk_widget_show (dialog);
+ end;
+
+ image := gtk_image_new_from_pixbuf (pixbuf);
+
+ gtk_container_add (GTK_CONTAINER (frame), image);
+
+
+ (* Animation *)
+
+ thelabel := gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (thelabel),
+ '<u>Animation loaded from a file</u>');
+ gtk_box_pack_start (GTK_BOX (vbox), thelabel, FALSE, FALSE, 0);
+
+ frame := gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
+
+ (* The alignment keeps the frame from growing when users resize
+ * the window
+ *)
+ align := gtk_alignment_new (0.5, 0.5, 0, 0);
+ gtk_container_add (GTK_CONTAINER (align), frame);
+ gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
+
+ filename := demo_find_file ('floppybuddy.gif', NULL);
+ image := gtk_image_new_from_file (filename);
+ g_free (filename);
+
+ gtk_container_add (GTK_CONTAINER (frame), image);
+
+
+ (* Progressive *)
+
+
+ thelabel := gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (thelabel),
+ '<u>Progressive image loading</u>');
+ gtk_box_pack_start (GTK_BOX (vbox), thelabel, FALSE, FALSE, 0);
+
+ frame := gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
+
+ (* The alignment keeps the frame from growing when users resize
+ * the window
+ *)
+ align := gtk_alignment_new (0.5, 0.5, 0, 0);
+ gtk_container_add (GTK_CONTAINER (align), frame);
+ gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
+
+ (* Create an empty image for now; the progressive loader
+ * will create the pixbuf and fill it in.
+ *)
+
+ image := gtk_image_new_from_pixbuf (NULL);
+ gtk_container_add (GTK_CONTAINER (frame), image);
+
+ start_progressive_loading (image);
+
+ (* Sensitivity control *)
+ button := gtk_toggle_button_new_with_mnemonic ('_Insensitive');
+ gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+
+ g_signal_connect (G_OBJECT (button), 'toggled',
+ G_CALLBACK (@toggle_sensitivity_callback),
+ vbox);
+ end;
+
+ if not GTK_WIDGET_VISIBLE (image_window) then
+ gtk_widget_show_all (image_window)
+ else
+ begin
+ gtk_widget_destroy (image_window);
+ image_window := NULL;
+ end;
+
+ do_images := image_window;
+end;
+
diff --git a/packages/gtk2/examples/gtk_demo/init.inc b/packages/gtk2/examples/gtk_demo/init.inc
new file mode 100644
index 0000000000..c77d58f717
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/init.inc
@@ -0,0 +1,52 @@
+(* this file contains all inits of variables used in the demo *)
+
+(* appwindow.inc *)
+ appwindow_registered := FALSE;
+ application_window := NULL;
+
+
+(* button_box.inc *)
+ bbox_window := NULL;
+
+(* colorsel.inc *)
+ colorsel_window := NULL;
+ colorsel_da := NULL;
+ colorsel_frame := NULL;
+
+(* drawingarea.inc *)
+ da_window := NULL;
+
+(* images.inc *)
+ image_window := NULL;
+ image_pixbuf_loader := NULL;
+ image_load_timeout := 0;
+
+(* item_factory *)
+ if_window := NULL;
+
+(* menus.inc *)
+ menu_window := NULL;
+
+(* panes.inc *)
+ panes_window := NULL;
+
+(* pixbufs.inc *)
+ pixbufs_window := NULL;
+ pixbufs_frame := NULL;
+ pixbufs_background := NULL;
+ pixbufs_back_width := 0;
+ pixbufs_back_height := 0;
+ pixbufs_da := NULL;
+
+(* sizegroup.inc *)
+ sg_window := NULL;
+
+(* stock_browser.inc *)
+ stock_window := NULL;
+
+(* textview.inc *)
+ text_window := NULL;
+ text_egg_window := NULL;
+
+
+
diff --git a/packages/gtk2/examples/gtk_demo/item_factory.inc b/packages/gtk2/examples/gtk_demo/item_factory.inc
new file mode 100644
index 0000000000..d5c8f00f68
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/item_factory.inc
@@ -0,0 +1,169 @@
+(* Item Factory
+ *
+ * The GtkItemFactory object allows the easy creation of menus
+ * from an array of descriptions of menu items.
+ *)
+
+var
+ if_window : PGtkWidget;
+
+procedure gtk_ifactory_cb (callback_data : gpointer;
+ callback_action : guint;
+ widget : PGTkWidget); cdecl;
+begin
+ g_message ('ItemFactory: activated "%s"',
+ [gtk_item_factory_path_from_widget (widget) ]);
+end;
+
+
+const
+ if_menu_items : array [1..19] of TGtkItemFactoryEntry = (
+ ( path: '/_File'; accelerator: NULL; callback: nil;
+ callback_action: 0; item_type : '<Branch>'; extra_data: NULL),
+
+ ( path: '/File/tearoff1'; accelerator: NULL; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : '<Tearoff>'; extra_data: NULL),
+
+ ( path: '/File/_New'; accelerator: '<control>N'; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : NULL; extra_data: NULL),
+
+ ( path: '/File/_Open'; accelerator: '<control>O'; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : NULL; extra_data: NULL),
+
+ ( path: '/File/_Save'; accelerator: '<control>S'; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : NULL; extra_data: NULL),
+
+ ( path: '/File/Save _As'; accelerator: NULL; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : NULL; extra_data: NULL),
+
+ ( path: '/File/sep1'; accelerator: NULL; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : '<Separator>'; extra_data: NULL),
+
+ ( path: '/File/_Quit'; accelerator: '<control>Q'; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : NULL; extra_data: NULL),
+
+ ( path: '/_Preferences'; accelerator: NULL ; callback: nil;
+ callback_action: 0; item_type : '<Branch>'; extra_data: NULL),
+
+ ( path: '/Preferences/_Color'; accelerator: NULL ; callback: nil;
+ callback_action: 0; item_type : '<Branch>'; extra_data: NULL),
+
+ ( path: '/Preferences/Color/_Red'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : '<RadioItem>'; extra_data: NULL),
+
+ ( path: '/Preferences/Color/_Green'; accelerator: NULL ; callback:TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : '/Preferences/Color/Red'; extra_data: NULL),
+
+ ( path: '/Preferences/Color/_Blue'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : '/Preferences/Color/Red'; extra_data: NULL),
+
+ ( path: '/Preferences/_Shape'; accelerator: NULL ; callback: nil;
+ callback_action: 0; item_type : '<Branch>'; extra_data: NULL),
+
+ ( path: '/Preferences/Shape/_Square'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : '<RadioItem>'; extra_data: NULL),
+
+ ( path: '/Preferences/Shape/_Rectangle'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : '/Preferences/Shape/Square'; extra_data: NULL),
+
+ ( path: '/Preferences/Shape/_Oval'; accelerator: NULL ; callback: TGtkItemfactoryCallback(@gtk_ifactory_cb);
+ callback_action: 0; item_type : '/Preferences/Shape/Rectangle'; extra_data: NULL),
+
+
+ (* If you wanted this to be right justified you would use "<LastBranch>", not "<Branch>".
+ * Right justified help menu items are generally considered a bad idea now days.
+ *)
+
+ ( path: '/_Help'; accelerator: NULL ; callback: nil;
+ callback_action: 0; item_type : '<Branch>'; extra_data: NULL),
+
+ ( path: '/Help/_About'; accelerator: NULL ; callback: nil;
+ callback_action: 0; item_type : NULL; extra_data: NULL)
+ );
+
+const
+ nmenu_items = sizeof (if_menu_items) div sizeof (if_menu_items[1]);
+
+
+function do_item_factory : PGtkWidget;
+var
+ box1,
+ box2,
+ separator,
+ thelabel,
+ button : PGtkWidget;
+
+ accel_group : PGtkAccelGroup;
+ item_factory : PGtkItemFactory;
+
+begin
+
+ if if_window = NULL then
+ begin
+ if_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ g_signal_connect (if_window, 'destroy',
+ G_CALLBACK (@gtk_widget_destroyed), @if_window);
+
+ g_signal_connect (if_window, 'delete-event',
+ G_CALLBACK (@gtk_true), NULL);
+
+ accel_group := gtk_accel_group_new ();
+
+ item_factory := gtk_item_factory_new (GTK_TYPE_MENU_BAR, '<main>', accel_group);
+
+ g_object_set_data_full (G_OBJECT (if_window), '<main>',
+ item_factory, @g_object_unref);
+ gtk_window_add_accel_group (GTK_WINDOW (if_window), accel_group);
+
+ gtk_window_set_title (GTK_WINDOW (if_window), 'Item Factory');
+ gtk_container_set_border_width (GTK_CONTAINER (if_window), 0);
+ gtk_item_factory_create_items (item_factory, nmenu_items, @if_menu_items[1], NULL);
+
+ (* preselect /Preferences/Shape/Oval over the other radios
+ *)
+ gtk_check_menu_item_set_active
+ (GTK_CHECK_MENU_ITEM (gtk_item_factory_get_item (item_factory,
+ '/Preferences/Shape/Oval')),
+ TRUE);
+
+ box1 := gtk_vbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (if_window), box1);
+
+ gtk_box_pack_start (GTK_BOX (box1),
+ gtk_item_factory_get_widget (item_factory, '<main>'),
+ FALSE, FALSE, 0);
+
+ thelabel := gtk_label_new ('Type'#13#10'<alt>'#13#10'to start');
+ gtk_widget_set_size_request (thelabel, 200, 200);
+ gtk_misc_set_alignment (GTK_MISC (thelabel), 0.5, 0.5);
+ gtk_box_pack_start (GTK_BOX (box1), thelabel, TRUE, TRUE, 0);
+
+
+ separator := gtk_hseparator_new ();
+ gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
+
+ box2 := gtk_vbox_new (FALSE, 10);
+ gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
+ gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
+
+ button := gtk_button_new_with_label ('close');
+ g_signal_connect_swapped (button, 'clicked',
+ G_CALLBACK (@gtk_widget_destroy), if_window);
+
+
+ gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
+
+ GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+
+ gtk_widget_grab_default (button);
+
+ gtk_widget_show_all (if_window);
+ end else
+ begin
+ gtk_widget_destroy (if_window);
+ if_window := NULL;
+ end;
+
+ do_item_factory := if_window;
+end;
diff --git a/packages/gtk2/examples/gtk_demo/list_store.inc b/packages/gtk2/examples/gtk_demo/list_store.inc
new file mode 100644
index 0000000000..30f803e315
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/list_store.inc
@@ -0,0 +1,232 @@
+(* Tree View/List Store
+ *
+ * The GtkListStore is used to store data in list form, to be used
+ * later on by a GtkTreeView to display it. This demo builds a
+ * simple GtkListStore and displays it. See the Stock Browser
+ * demo for a more advanced example.
+ *
+ *)
+
+ (*
+ * todo: translate to pascal
+ *)
+
+function do_list_store : PGtkWidget;
+begin
+ do_dummy ('Tree View / List Store - Demo');
+ do_list_store := NULL;
+end;
+
+(*
+#include <gtk/gtk.h>
+
+static GtkWidget *window = NULL;
+
+typedef struct
+{
+ const gboolean fixed;
+ const guint number;
+ const gchar *severity;
+ const gchar *description;
+}
+Bug;
+
+enum
+{
+ COLUMN_FIXED,
+ COLUMN_NUMBER,
+ COLUMN_SEVERITY,
+ COLUMN_DESCRIPTION,
+ NUM_COLUMNS
+};
+
+static Bug data[] =
+{
+ { FALSE, 60482, "Normal", "scrollable notebooks and hidden tabs" },
+ { FALSE, 60620, "Critical", "gdk_window_clear_area (gdkwindow-win32.c) is not thread-safe" },
+ { FALSE, 50214, "Major", "Xft support does not clean up correctly" },
+ { TRUE, 52877, "Major", "GtkFileSelection needs a refresh method. " },
+ { FALSE, 56070, "Normal", "Can't click button after setting in sensitive" },
+ { TRUE, 56355, "Normal", "GtkLabel - Not all changes propagate correctly" },
+ { FALSE, 50055, "Normal", "Rework width/height computations for TreeView" },
+ { FALSE, 58278, "Normal", "gtk_dialog_set_response_sensitive () doesn't work" },
+ { FALSE, 55767, "Normal", "Getters for all setters" },
+ { FALSE, 56925, "Normal", "Gtkcalender size" },
+ { FALSE, 56221, "Normal", "Selectable label needs right-click copy menu" },
+ { TRUE, 50939, "Normal", "Add shift clicking to GtkTextView" },
+ { FALSE, 6112, "Enhancement","netscape-like collapsable toolbars" },
+ { FALSE, 1, "Normal", "First bug :=)" },
+};
+
+static GtkTreeModel *
+create_model (void)
+{
+ gint i = 0;
+ GtkListStore *store;
+ GtkTreeIter iter;
+
+ /* create list store */
+ store = gtk_list_store_new (NUM_COLUMNS,
+ G_TYPE_BOOLEAN,
+ G_TYPE_UINT,
+ G_TYPE_STRING,
+ G_TYPE_STRING);
+
+ /* add data to the list store */
+ for (i = 0; i < G_N_ELEMENTS (data); i++)
+ {
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ COLUMN_FIXED, data[i].fixed,
+ COLUMN_NUMBER, data[i].number,
+ COLUMN_SEVERITY, data[i].severity,
+ COLUMN_DESCRIPTION, data[i].description,
+ -1);
+ }
+
+ return GTK_TREE_MODEL (store);
+}
+
+static void
+fixed_toggled (GtkCellRendererToggle *cell,
+ gchar *path_str,
+ gpointer data)
+{
+ GtkTreeModel *model = (GtkTreeModel * )data;
+ GtkTreeIter iter;
+ GtkTreePath *path = gtk_tree_path_new_from_string (path_str);
+ gboolean fixed;
+
+ /* get toggled iter */
+ gtk_tree_model_get_iter (model, &iter, path);
+ gtk_tree_model_get (model, &iter, COLUMN_FIXED, &fixed, -1);
+
+ /* do something with the value */
+ fixed ^= 1;
+
+ /* set new value */
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter, COLUMN_FIXED, fixed, -1);
+
+ /* clean up */
+ gtk_tree_path_free (path);
+}
+
+static void
+add_columns (GtkTreeView *treeview)
+{
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *column;
+ GtkTreeModel *model = gtk_tree_view_get_model (treeview);
+
+ /* column for fixed toggles */
+ renderer = gtk_cell_renderer_toggle_new ();
+ g_signal_connect (G_OBJECT (renderer), "toggled",
+ G_CALLBACK (fixed_toggled), model);
+
+ column = gtk_tree_view_column_new_with_attributes ("Fixed?",
+ renderer,
+ "active", COLUMN_FIXED,
+ NULL);
+
+ /* set this column to a fixed sizing (of 50 pixels) */
+ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
+ GTK_TREE_VIEW_COLUMN_FIXED);
+ gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
+ gtk_tree_view_append_column (treeview, column);
+
+ /* column for bug numbers */
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Bug number",
+ renderer,
+ "text",
+ COLUMN_NUMBER,
+ NULL);
+ gtk_tree_view_column_set_sort_column_id (column, COLUMN_NUMBER);
+ gtk_tree_view_append_column (treeview, column);
+
+ /* column for severities */
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Severity",
+ renderer,
+ "text",
+ COLUMN_SEVERITY,
+ NULL);
+ gtk_tree_view_column_set_sort_column_id (column, COLUMN_SEVERITY);
+ gtk_tree_view_append_column (treeview, column);
+
+ /* column for description */
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Description",
+ renderer,
+ "text",
+ COLUMN_DESCRIPTION,
+ NULL);
+ gtk_tree_view_column_set_sort_column_id (column, COLUMN_DESCRIPTION);
+ gtk_tree_view_append_column (treeview, column);
+}
+
+GtkWidget *
+do_list_store (void)
+{
+ if (!window)
+ {
+ GtkWidget *vbox;
+ GtkWidget *label;
+ GtkWidget *sw;
+ GtkTreeModel *model;
+ GtkWidget *treeview;
+
+ /* create window, etc */
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), "GtkListStore demo");
+
+ g_signal_connect (G_OBJECT (window), "destroy",
+ G_CALLBACK (gtk_widget_destroyed), &window);
+ gtk_container_set_border_width (GTK_CONTAINER (window), 8);
+
+ vbox = gtk_vbox_new (FALSE, 8);
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+
+ label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+
+ sw = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
+ GTK_SHADOW_ETCHED_IN);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
+ GTK_POLICY_NEVER,
+ GTK_POLICY_AUTOMATIC);
+ gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
+
+ /* create tree model */
+ model = create_model ();
+
+ /* create tree view */
+ treeview = gtk_tree_view_new_with_model (model);
+ gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
+ gtk_tree_view_set_search_column (GTK_TREE_VIEW (treeview),
+ COLUMN_DESCRIPTION);
+
+ g_object_unref (G_OBJECT (model));
+
+ gtk_container_add (GTK_CONTAINER (sw), treeview);
+
+ /* add columns to the tree view */
+ add_columns (GTK_TREE_VIEW (treeview));
+
+ /* finish & show */
+ gtk_window_set_default_size (GTK_WINDOW (window), 280, 250);
+ }
+
+ if (!GTK_WIDGET_VISIBLE (window))
+ gtk_widget_show_all (window);
+ else
+ {
+ gtk_widget_destroy (window);
+ window = NULL;
+ }
+
+ return window;
+}
+
+*)
diff --git a/packages/gtk2/examples/gtk_demo/menus.inc b/packages/gtk2/examples/gtk_demo/menus.inc
new file mode 100644
index 0000000000..56e23a5c99
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/menus.inc
@@ -0,0 +1,220 @@
+(* Menus
+ *
+ * There are several widgets involved in displaying menus. The
+ * GtkMenuBar widget is a horizontal menu bar, which normally appears
+ * at the top of an application. The GtkMenu widget is the actual menu
+ * that pops up. Both GtkMenuBar and GtkMenu are subclasses of
+ * GtkMenuShell; a GtkMenuShell contains menu items
+ * (GtkMenuItem). Each menu item contains text and/or images and can
+ * be selected by the user.
+ *
+ * There are several kinds of menu item, including plain GtkMenuItem,
+ * GtkCheckMenuItem which can be checked/unchecked, GtkRadioMenuItem
+ * which is a check menu item that's in a mutually exclusive group,
+ * GtkSeparatorMenuItem which is a separator bar, GtkTearoffMenuItem
+ * which allows a GtkMenu to be torn off, and GtkImageMenuItem which
+ * can place a GtkImage or other widget next to the menu text.
+ *
+ * A GtkMenuItem can have a submenu, which is simply a GtkMenu to pop
+ * up when the menu item is selected. Typically, all menu items in a menu bar
+ * have submenus.
+ *
+ * The GtkOptionMenu widget is a button that pops up a GtkMenu when clicked.
+ * It's used inside dialogs and such.
+ *
+ * GtkItemFactory provides a higher-level interface for creating menu bars
+ * and menus; while you can construct menus manually, most people don't
+ * do that. There's a separate demo for GtkItemFactory.
+ *
+ *)
+
+
+var
+ menu_window : PGtkWidget;
+
+function create_menu (depth : gint;
+ tearoff : gboolean): PGtkWidget;
+var
+ menu,
+ menuitem : PGtkWidget;
+
+ group : PGSList;
+ buf : pgchar;
+ i, j : gint;
+
+begin
+
+ if depth < 1 then
+ exit (NULL);
+
+ menu := gtk_menu_new ();
+ group := NULL;
+
+ if tearoff then
+ begin
+ menuitem := gtk_tearoff_menu_item_new ();
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+ gtk_widget_show (menuitem);
+ end;
+
+ j:=1;
+ for i:=0 to 4 do
+ begin
+ buf := g_strdup_printf ('item %2d - %d', [depth, j]);
+ menuitem := gtk_radio_menu_item_new_with_label (group, buf);
+ group := gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem));
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+ gtk_widget_show (menuitem);
+
+ if i = 3 then
+ gtk_widget_set_sensitive (menuitem, FALSE);
+
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (depth - 1, TRUE));
+
+ g_free (buf);
+ inc (j);
+ end;
+
+ create_menu := menu;
+end;
+
+function do_menus : PGtkWidget;
+var
+ box1,
+ box2,
+ button,
+ optionmenu,
+ separator,
+ menubar,
+ menu,
+ menuitem : PGtkWidget;
+
+ accel_group : PGtkAccelGroup;
+
+begin
+ if menu_window = NULL then
+ begin
+ menu_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ g_signal_connect (menu_window, 'destroy',
+ G_CALLBACK(@gtk_widget_destroyed), @menu_window);
+ g_signal_connect (menu_window, 'delete-event',
+ G_CALLBACK (@gtk_true), NULL);
+
+ accel_group := gtk_accel_group_new ();
+ gtk_window_add_accel_group (GTK_WINDOW (menu_window), accel_group);
+
+ gtk_window_set_title (GTK_WINDOW (menu_window), 'Menus');
+ gtk_container_set_border_width (GTK_CONTAINER (menu_window), 0);
+
+
+ box1 := gtk_vbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (menu_window), box1);
+ gtk_widget_show (box1);
+
+ menubar := gtk_menu_bar_new ();
+ gtk_box_pack_start (GTK_BOX (box1), menubar, FALSE, TRUE, 0);
+ gtk_widget_show (menubar);
+
+ menu := create_menu (2, TRUE);
+
+ menuitem := gtk_menu_item_new_with_label ('test'#13#10'line2');
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
+ gtk_widget_show (menuitem);
+
+ menuitem := gtk_menu_item_new_with_label ('foo');
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (3, TRUE));
+ gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
+ gtk_widget_show (menuitem);
+
+ menuitem := gtk_menu_item_new_with_label ('bar');
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (4, TRUE));
+ gtk_menu_item_set_right_justified (GTK_MENU_ITEM (menuitem), TRUE);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
+ gtk_widget_show (menuitem);
+
+ box2 := gtk_vbox_new (FALSE, 10);
+ gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
+ gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
+ gtk_widget_show (box2);
+
+ menu := create_menu (1, FALSE);
+ gtk_menu_set_accel_group (GTK_MENU (menu), accel_group);
+
+ menuitem := gtk_separator_menu_item_new ();
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+ gtk_widget_show (menuitem);
+
+ menuitem := gtk_check_menu_item_new_with_label ('Accelerate Me');
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+ gtk_widget_show (menuitem);
+ gtk_widget_add_accelerator (menuitem,
+ 'activate',
+ accel_group,
+ GDK_KEY_F1,
+ 0,
+ GTK_ACCEL_VISIBLE);
+
+ menuitem := gtk_check_menu_item_new_with_label ('Accelerator Locked');
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+ gtk_widget_show (menuitem);
+ gtk_widget_add_accelerator (menuitem,
+ 'activate',
+ accel_group,
+ GDK_KEY_F2,
+ 0,
+ GTK_ACCEL_VISIBLE or GTK_ACCEL_LOCKED);
+
+ menuitem := gtk_check_menu_item_new_with_label ('Accelerators Frozen');
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+ gtk_widget_show (menuitem);
+ gtk_widget_add_accelerator (menuitem,
+ 'activate',
+ accel_group,
+ GDK_KEY_F2,
+ 0,
+ GTK_ACCEL_VISIBLE);
+
+ gtk_widget_add_accelerator (menuitem,
+ 'activate',
+ accel_group,
+ GDK_KEY_F3,
+ 0,
+ GTK_ACCEL_VISIBLE);
+
+ optionmenu := gtk_option_menu_new ();
+ gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
+ gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), 3);
+ gtk_box_pack_start (GTK_BOX (box2), optionmenu, TRUE, TRUE, 0);
+ gtk_widget_show (optionmenu);
+
+ separator := gtk_hseparator_new ();
+ gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
+ gtk_widget_show (separator);
+
+ box2 := gtk_vbox_new (FALSE, 10);
+ gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
+ gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
+ gtk_widget_show (box2);
+
+ button := gtk_button_new_with_label ('close');
+ g_signal_connect_swapped (button, 'clicked',
+ G_CALLBACK(@gtk_widget_destroy), menu_window);
+
+ gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
+ GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_grab_default (button);
+ gtk_widget_show (button);
+ end;
+
+ if not GTK_WIDGET_VISIBLE (menu_window) then
+ gtk_widget_show (menu_window)
+ else begin
+ gtk_widget_destroy (menu_window);
+ menu_window := NULL;
+ end;
+
+ do_menus := menu_window;
+end;
diff --git a/packages/gtk2/examples/gtk_demo/panes.inc b/packages/gtk2/examples/gtk_demo/panes.inc
new file mode 100644
index 0000000000..5fb1080c41
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/panes.inc
@@ -0,0 +1,212 @@
+(* Paned Widgets
+ *
+ * The GtkHPaned and GtkVPaned Widgets divide their content
+ * area into two panes with a divider in between that the
+ * user can adjust. A separate child is placed into each
+ * pane.
+ *
+ * There are a number of options that can be set for each pane.
+ * This test contains both a horizontal (HPaned) and a vertical
+ * (VPaned) widget, and allows you to adjust the options for
+ * each side of each widget.
+ *)
+
+var
+ panes_window : PGtkWidget;
+
+
+procedure toggle_resize (widget : PGtkWidget;
+ child : PGtkWidget); cdecl;
+var
+ paned : PGtkPaned;
+ is_child1,
+ resize,
+ shrink : gboolean;
+
+begin
+ paned := PGtkPaned (child^.parent);
+ is_child1 := (child = paned^.child1);
+
+ if is_child1 then
+ begin
+ resize := child1_resize (paned^) <> 0;
+ shrink := child1_shrink (paned^) <> 0;
+ end else
+ begin
+ resize := child2_resize (paned^) <> 0;
+ shrink := child2_shrink (paned^) <> 0;
+ end;
+
+ gtk_widget_ref (child);
+ gtk_container_remove (pGtkContainer (child^.parent), child);
+
+ if is_child1 then
+ gtk_paned_pack1 (paned, child, not resize, shrink)
+ else
+ gtk_paned_pack2 (paned, child, not resize, shrink);
+
+ gtk_widget_unref (child);
+end;
+
+
+
+procedure toggle_shrink (widget : PGtkWidget;
+ child : PGtkWidget); cdecl;
+var
+ paned : PGtkPaned;
+ is_child1,
+ resize,
+ shrink : gboolean;
+
+begin
+ paned := PGtkPaned (child^.parent);
+ is_child1 := (child = paned^.child1);
+
+ if is_child1 then
+ begin
+ resize := child1_resize (paned^) <> 0;
+ shrink := child1_shrink (paned^) <> 0;
+ end else
+ begin
+ resize := child2_resize (paned^) <> 0;
+ shrink := child2_shrink (paned^) <> 0;
+ end;
+
+ gtk_widget_ref (child);
+ gtk_container_remove (pGtkContainer (child^.parent), child);
+ if is_child1 then
+ gtk_paned_pack1 (paned, child, resize, not shrink)
+ else
+ gtk_paned_pack2 (paned, child, resize, not shrink);
+
+ gtk_widget_unref (child);
+end;
+
+function create_pane_options (paned : PGtkPaned;
+ frame_label : pgchar;
+ label1 : pgchar;
+ label2 : pgchar): PGtkWidget; cdecl;
+var
+ frame,
+ table,
+ thelabel,
+ check_button : PGtkWidget;
+
+begin
+ frame := gtk_frame_new (frame_label);
+ gtk_container_set_border_width (pGtkContainer(frame), 4);
+
+ table := gtk_table_new (3, 2, TRUE);
+ gtk_container_add (pGtkContainer(frame), table);
+
+ thelabel := gtk_label_new (label1);
+ gtk_table_attach_defaults (pGtkTable(table), thelabel, 0, 1, 0, 1);
+
+ check_button := gtk_check_button_new_with_mnemonic ('_Resize');
+ gtk_table_attach_defaults (pGtkTable(table), check_button, 0, 1, 1, 2);
+
+ g_signal_connect (check_button, 'toggled',
+ TGCallback (@toggle_resize), paned^.child1);
+
+ check_button := gtk_check_button_new_with_mnemonic ('_Shrink');
+ gtk_table_attach_defaults (pGtkTable(table), check_button, 0, 1, 2, 3);
+
+ gtk_toggle_button_set_active (pGtkToggleButton(check_button), TRUE);
+
+ g_signal_connect (check_button, 'toggled', TGCallback(@toggle_shrink), paned^.child1);
+
+ thelabel := gtk_label_new (label2);
+ gtk_table_attach_defaults (pGtkTable(table), thelabel, 1, 2, 0, 1);
+
+ check_button := gtk_check_button_new_with_mnemonic ('_Resize');
+ gtk_table_attach_defaults (pGtkTable(table), check_button, 1, 2, 1, 2);
+
+ gtk_toggle_button_set_active (pGtkToggleButton(check_button), TRUE);
+
+ g_signal_connect (check_button, 'toggled', TGCallback(@toggle_resize), paned^.child2);
+
+ check_button := gtk_check_button_new_with_mnemonic ('_Shrink');
+ gtk_table_attach_defaults (pGtkTable(table), check_button, 1, 2, 2, 3);
+
+ gtk_toggle_button_set_active (pGtkToggleButton(check_button), TRUE);
+ g_signal_connect (check_button, 'toggled', TGCallback(@toggle_shrink), paned^.child2);
+
+ create_pane_options := frame;
+end;
+
+function do_panes : PGtkWidget;
+var
+ frame,
+ hpaned,
+ vpaned,
+ button,
+ vbox : PGtkWidget;
+
+begin
+ if panes_window = NULL then
+ begin
+ panes_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ g_signal_connect (panes_window, 'destroy',
+ TGCallback(@gtk_widget_destroyed), @panes_window);
+
+ gtk_window_set_title (pGtkWindow(panes_window), 'Panes');
+ gtk_container_set_border_width (pGtkContainer(panes_window), 0);
+
+ vbox := gtk_vbox_new (FALSE, 0);
+ gtk_container_add (pGtkContainer(panes_window), vbox);
+
+ vpaned := gtk_vpaned_new ();
+ gtk_box_pack_start (pGtkBox(vbox), vpaned, TRUE, TRUE, 0);
+ gtk_container_set_border_width (pGtkContainer(vpaned), 5);
+
+ hpaned := gtk_hpaned_new ();
+ gtk_paned_add1 (pGtkPaned(vpaned), hpaned);
+
+ frame := gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (pGtkFrame(frame), GTK_SHADOW_IN);
+ gtk_widget_set_size_request (frame, 60, 60);
+ gtk_paned_add1 (pGtkPaned(hpaned), frame);
+
+ button := gtk_button_new_with_mnemonic ('_Hi there');
+ gtk_container_add (pGtkContainer(frame), button);
+
+ frame := gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (pGtkFrame(frame), GTK_SHADOW_IN);
+ gtk_widget_set_size_request (frame, 80, 60);
+ gtk_paned_add2 (pGtkPaned(hpaned), frame);
+
+ frame := gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (pGtkFrame(frame), GTK_SHADOW_IN);
+ gtk_widget_set_size_request (frame, 60, 80);
+ gtk_paned_add2 (pGtkPaned(vpaned), frame);
+
+ (* Now create toggle buttons to control sizing *)
+
+ gtk_box_pack_start (pGtkBox(vbox),
+ create_pane_options (pGtkPaned(hpaned),
+ 'Horizontal',
+ 'Left',
+ 'Right'),
+ FALSE, FALSE, 0);
+
+ gtk_box_pack_start (pGtkBox(vbox),
+ create_pane_options (pGtkPaned(vpaned),
+ 'Vertical',
+ 'Top',
+ 'Bottom'),
+ FALSE, FALSE, 0);
+
+ gtk_widget_show_all (vbox);
+ end;
+
+ if not GTK_WIDGET_VISIBLE (panes_window) then
+ gtk_widget_show (panes_window)
+ else begin
+ gtk_widget_destroy (panes_window);
+ panes_window := NULL;
+ end;
+
+ do_panes := panes_window;
+end;
+
diff --git a/packages/gtk2/examples/gtk_demo/pixbufs.inc b/packages/gtk2/examples/gtk_demo/pixbufs.inc
new file mode 100644
index 0000000000..dadac90334
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/pixbufs.inc
@@ -0,0 +1,293 @@
+(* Pixbufs
+ *
+ * A GdkPixbuf represents an image, normally in RGB or RGBA format.
+ * Pixbufs are normally used to load files from disk and perform
+ * image scaling.
+ *
+ * This demo is not all that educational, but looks cool. It was written
+ * by Extreme Pixbuf Hacker Federico Mena Quintero. It also shows
+ * off how to use GtkDrawingArea to do a simple animation.
+ *
+ * Look at the Image demo for additional pixbuf usage examples.
+ *
+ *)
+
+
+const
+ FRAME_DELAY = 50;
+
+ BACKGROUND_NAME = 'background.jpg';
+
+ image_names : array [1..8] of pchar = (
+ 'apple-red.png',
+ 'gnome-applets.png',
+ 'gnome-calendar.png',
+ 'gnome-foot.png',
+ 'gnome-gmush.png',
+ 'gnome-gimp.png',
+ 'gnome-gsame.png',
+ 'gnu-keys.png');
+
+ N_IMAGES = high(image_names);
+
+(* demo window *)
+var
+ pixbufs_window : PGtkWidget;
+
+(* Current frame *)
+ pixbufs_frame : PGdkPixbuf;
+
+(* Background image *)
+ pixbufs_background : PGdkPixbuf;
+
+ pixbufs_back_width,
+ pixbufs_back_height : gint;
+
+
+(* Images *)
+ images : array [1..N_IMAGES] of PGdkPixbuf;
+
+(* Widgets *)
+ pixbufs_da : PGtkWidget;
+
+(* Loads the images for the demo and returns whether the operation succeeded *)
+function load_pixbufs (error : PPGError): gboolean;
+var
+ i : gint;
+ filename : pgchar;
+
+begin
+
+ if pixbufs_background <> NULL then begin
+ load_pixbufs := TRUE; (* already loaded earlier *)
+ exit;
+ end;
+
+ (* demo_find_file() looks in the the current directory first,
+ * so you can run gtk-demo without installing GTK, then looks
+ * in the location where the file is installed.
+ *)
+
+ filename := demo_find_file (BACKGROUND_NAME, error);
+ if filename = NULL then begin
+ load_pixbufs := FALSE; (* note that "error" was filled in and returned *)
+ exit;
+ end;
+
+ pixbufs_background := gdk_pixbuf_new_from_file (filename, error);
+ g_free (filename);
+
+ if pixbufs_background = NULL then begin
+ load_pixbufs := FALSE; (* Note that "error" was filled with a GError *)
+ exit;
+ end;
+
+ pixbufs_back_width := gdk_pixbuf_get_width (pixbufs_background);
+ pixbufs_back_height := gdk_pixbuf_get_height (pixbufs_background);
+
+ for i := 1 to N_IMAGES do
+ begin
+ filename := demo_find_file (image_names[i], error);
+
+ if filename = NULL then begin
+ load_pixbufs := FALSE; (* Note that "error" was filled with a GError *)
+ exit
+ end;
+
+ images[i] := gdk_pixbuf_new_from_file (filename, error);
+ g_free (filename);
+
+ if images[i] = NULL then begin
+ load_pixbufs := FALSE; (* Note that "error" was filled with a GError *)
+ exit;
+ end;
+
+ end;
+
+ load_pixbufs := TRUE;
+end;
+
+(* Expose callback for the drawing area *)
+function expose_cb (widget : PGtkWidget;
+ event : PGdkEventExpose;
+ data : gpointer): gint; cdecl;
+var
+ pixels : pguchar;
+ rowstride : gint;
+
+begin
+ rowstride := gdk_pixbuf_get_rowstride (pixbufs_frame);
+
+ pixels := gdk_pixbuf_get_pixels (pixbufs_frame) + rowstride * event^.area.y + event^.area.x * 3;
+
+ gdk_draw_rgb_image_dithalign (widget^.window,
+ widget^.style^.black_gc,
+ event^.area.x, event^.area.y,
+ event^.area.width, event^.area.height,
+ GDK_RGB_DITHER_NORMAL,
+ pixels, rowstride,
+ event^.area.x, event^.area.y);
+
+ expose_cb := 1;
+end;
+
+const
+ CYCLE_LEN = 60;
+
+var
+ pixbufs_frame_num : integer;
+
+
+(* Timeout handler to regenerate the frame *)
+function timeout (data : gpointer): gboolean; cdecl;
+var
+ f : double;
+ i : integer;
+ xmid,
+ ymid,
+ radius : double;
+
+ ang, r, k : double;
+
+ alpha,
+ xpos, ypos,
+ iw, ih : integer;
+
+ r1, r2,
+ dest : TGdkRectangle;
+
+
+begin
+ gdk_pixbuf_copy_area (pixbufs_background, 0, 0, pixbufs_back_width,
+ pixbufs_back_height, pixbufs_frame, 0, 0);
+
+ f := double(pixbufs_frame_num mod CYCLE_LEN) / CYCLE_LEN;
+
+ xmid := pixbufs_back_width / 2.0;
+ ymid := pixbufs_back_height / 2.0;
+
+
+ radius := min (ymid, xmid) / 2.0;
+
+ for i := 1 to N_IMAGES do
+ begin
+ ang := 2.0 * G_PI * double (i / N_IMAGES) - f * 2.0 * G_PI;
+
+ iw := gdk_pixbuf_get_width (images[i]);
+ ih := gdk_pixbuf_get_height (images[i]);
+
+ r := radius + (radius / 3.0) * sin (f * 2.0 * G_PI);
+
+ xpos := floor (xmid + r * cos (ang) - iw / 2.0 + 0.5);
+ ypos := floor (ymid + r * sin (ang) - ih / 2.0 + 0.5);
+
+ if (i and 1) <> 0 then k:= sin (f * 2.0 * G_PI)
+ else k:= cos (f * 2.0 * G_PI);
+
+ k := 2.0 * k * k;
+ k := MAX (0.25, k);
+
+ r1.x := xpos;
+ r1.y := ypos;
+ r1.width := round(iw * k);
+ r1.height := round(ih * k);
+
+ r2.x := 0;
+ r2.y := 0;
+ r2.width := pixbufs_back_width;
+ r2.height := pixbufs_back_height;
+
+ if gdk_rectangle_intersect (@r1, @r2, @dest) then begin
+ if (i and 1) <> 0 then
+ alpha := round (MAX (127, abs (255 * sin (f * 2.0 * G_PI))))
+ else
+ alpha := round (MAX (127, abs (255 * cos (f * 2.0 * G_PI))));
+
+ gdk_pixbuf_composite (images[i],
+ pixbufs_frame,
+ dest.x, dest.y,
+ dest.width, dest.height,
+ xpos, ypos,
+ k, k,
+ GDK_INTERP_NEAREST,
+ alpha);
+ end;
+ end;
+
+ gtk_widget_queue_draw (pixbufs_da);
+
+ inc(pixbufs_frame_num);
+ exit (TRUE);
+end;
+
+var
+ pixbufs_timeout_id : guint;
+
+procedure pixbufs_cleanup_callback (_object : PGtkObject;
+ data : gpointer); cdecl;
+begin
+ g_source_remove (pixbufs_timeout_id);
+ pixbufs_timeout_id := 0;
+end;
+
+
+
+function do_pixbufs : PGtkWidget;
+var
+ error : PGError;
+ dialog : PGtkWidget;
+
+begin
+ if pixbufs_window = NULL then
+ begin
+
+ pixbufs_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (pixbufs_window), 'Pixbufs');
+ gtk_window_set_resizable (GTK_WINDOW (pixbufs_window), FALSE);
+
+ g_signal_connect (pixbufs_window, 'destroy', G_CALLBACK (@gtk_widget_destroyed), @pixbufs_window);
+ g_signal_connect (pixbufs_window, 'destroy', G_CALLBACK (@pixbufs_cleanup_callback), NULL);
+
+
+ error := NULL;
+ if not load_pixbufs (@error) then
+ begin
+ dialog := gtk_message_dialog_new (GTK_WINDOW (pixbufs_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ 'Failed to load an image: %s',
+ [error^.message]);
+
+ g_error_free (error);
+
+ g_signal_connect (dialog, 'response',
+ G_CALLBACK (@gtk_widget_destroy), NULL);
+
+ gtk_widget_show (dialog);
+ end else
+ begin
+ gtk_widget_set_size_request (pixbufs_window, pixbufs_back_width, pixbufs_back_height);
+
+ pixbufs_frame := gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, pixbufs_back_width, pixbufs_back_height);
+
+ pixbufs_da := gtk_drawing_area_new ();
+
+ g_signal_connect (pixbufs_da, 'expose_event',
+ G_CALLBACK (@expose_cb), NULL);
+
+ gtk_container_add (GTK_CONTAINER (pixbufs_window), pixbufs_da);
+
+ pixbufs_timeout_id := gtk_timeout_add (FRAME_DELAY, @timeout, NULL);
+ end;
+ end;
+
+ if not GTK_WIDGET_VISIBLE (pixbufs_window) then
+ gtk_widget_show_all (pixbufs_window)
+ else begin
+ gtk_widget_destroy (pixbufs_window);
+ pixbufs_window := NULL;
+ end;
+
+ do_pixbufs := pixbufs_window;
+end;
diff --git a/packages/gtk2/examples/gtk_demo/sizegroup.inc b/packages/gtk2/examples/gtk_demo/sizegroup.inc
new file mode 100644
index 0000000000..63357c5865
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/sizegroup.inc
@@ -0,0 +1,182 @@
+(* Size Groups
+ *
+ * GtkSizeGroup provides a mechanism for grouping a number of
+ * widgets together so they all request the same amount of space.
+ * This is typically useful when you want a column of widgets to
+ * have the same size, but you can't use a GtkTable widget.
+ *
+ * Note that size groups only affect the amount of space requested,
+ * not the size that the widgets finally receive. If you want the
+ * widgets in a GtkSizeGroup to actually be the same size, you need
+ * to pack them in such a way that they get the size they request
+ * and not more. For example, if you are packing your widgets
+ * into a table, you would not include the GTK_FILL flag.
+ *)
+
+var
+ sg_window : PGtkWidget;
+
+
+const
+ color_options : array [0..3] of pchar = ('Red', 'Green', 'Blue', NULL);
+
+ dash_options : array [0..3] of pchar = ('Solid', 'Dashed', 'Dotted', NULL);
+
+ end_options : array [0..3] of pchar = ('Square', 'Round', 'Arrow', NULL);
+
+
+(* Convenience function to create an option menu holding a number of strings
+ *)
+
+function create_option_menu (strings : ppchar): PGtkWidget;
+var
+ menu,
+ menu_item,
+ option_menu : PGtkWidget;
+
+ str : ppchar;
+
+begin
+ menu := gtk_menu_new ();
+
+ str := strings;
+ while str^ <> NULL do
+ begin
+ menu_item := gtk_menu_item_new_with_label ( str[0]);
+ gtk_widget_show (menu_item);
+
+ gtk_menu_shell_append (pGtkMenuShell(menu), menu_item);
+ inc(str);
+ end;
+
+ option_menu := gtk_option_menu_new ();
+ gtk_option_menu_set_menu (pGtkOptionMenu(option_menu), menu);
+
+ create_option_menu := option_menu;
+end;
+
+procedure add_row (table : PGtkTable;
+ row : integer;
+ size_group : PGtkSizeGroup;
+ label_text : pchar;
+ options : ppchar);
+var
+ option_menu : PGtkWidget;
+ thelabel : PGtkWidget;
+
+begin
+ thelabel := gtk_label_new_with_mnemonic (label_text);
+ gtk_misc_set_alignment (pGtkMisc(thelabel), 0, 1);
+ gtk_table_attach (pGtkTable(table), thelabel,
+ 0, 1, row, row + 1,
+ GTK_EXPAND or GTK_FILL, 0,
+ 0, 0);
+
+ option_menu := create_option_menu (options);
+ gtk_label_set_mnemonic_widget (pGtkLabel(thelabel), option_menu);
+ gtk_size_group_add_widget (size_group, option_menu);
+ gtk_table_attach (pGtkTable(table), option_menu,
+ 1, 2, row, row + 1,
+ 0, 0,
+ 0, 0);
+end;
+
+procedure toggle_grouping (check_button : PGtkToggleButton;
+ size_group : PGtkSizeGroup); cdecl;
+var
+ new_mode : TGtkSizeGroupMode;
+
+begin
+ (* GTK_SIZE_GROUP_NONE is not generally useful, but is useful
+ * here to show the effect of GTK_SIZE_GROUP_HORIZONTAL by
+ * contrast.
+ *)
+
+ if gtk_toggle_button_get_active (check_button) then
+ new_mode := GTK_SIZE_GROUP_HORIZONTAL
+ else
+ new_mode := GTK_SIZE_GROUP_NONE;
+
+ gtk_size_group_set_mode (size_group, new_mode);
+end;
+
+
+
+
+function do_sizegroup : PGtkWidget;
+var
+ table,
+ frame,
+ vbox,
+ check_button : PGtkWidget;
+
+ size_group : PGtkSizeGroup;
+
+begin
+ if sg_window = NULL then
+ begin
+ sg_window := gtk_dialog_new_with_buttons ('Size Groups',
+ NULL, 0,
+ GTK_STOCK_CLOSE,
+ [ GTK_RESPONSE_NONE,
+ NULL]);
+
+ gtk_window_set_resizable (pGtkWindow(sg_window), FALSE);
+
+ g_signal_connect (sg_window, 'response',
+ TGCallback(@gtk_widget_destroy), NULL);
+ g_signal_connect (sg_window, 'destroy',
+ TGCallback(@gtk_widget_destroyed), @sg_window);
+
+ vbox := gtk_vbox_new (FALSE, 5);
+ gtk_box_pack_start (pGtkBox(pGtkDialog (sg_window)^.vbox), vbox, TRUE, TRUE, 0);
+ gtk_container_set_border_width (pGtkContainer(vbox), 5);
+
+ size_group := gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+
+ (* Create one frame holding color options
+ *)
+ frame := gtk_frame_new ('Color Options');
+ gtk_box_pack_start (pGtkBox(vbox), frame, TRUE, TRUE, 0);
+
+ table := gtk_table_new (2, 2, FALSE);
+ gtk_container_set_border_width (pGtkContainer(table), 5);
+ gtk_table_set_row_spacings (pGtkTable(table), 5);
+ gtk_table_set_col_spacings (pGtkTable(table), 10);
+ gtk_container_add (pGtkContainer(frame), table);
+
+ add_row (pGtkTable(table), 0, size_group, '_Foreground', @color_options[0]);
+ add_row (pGtkTable(table), 1, size_group, '_Background', @color_options[0]);
+
+ (* And another frame holding line style options
+ *)
+ frame := gtk_frame_new ('Line Options');
+ gtk_box_pack_start (pGtkBox(vbox), frame, FALSE, FALSE, 0);
+
+ table := gtk_table_new (2, 2, FALSE);
+ gtk_container_set_border_width (pGtkContainer(table), 5);
+ gtk_table_set_row_spacings (pGtkTable(table), 5);
+ gtk_table_set_col_spacings (pGtkTable(table), 10);
+ gtk_container_add (pGtkContainer(frame), table);
+
+ add_row (pGtkTable(table), 0, size_group, '_Dashing', @dash_options[0]);
+ add_row (pGtkTable(table), 1, size_group, '_Line ends', @end_options[0]);
+
+ (* And a check button to turn grouping on and off *)
+ check_button := gtk_check_button_new_with_mnemonic ('_Enable grouping');
+ gtk_box_pack_start (pGtkBox(vbox), check_button, FALSE, FALSE, 0);
+
+ gtk_toggle_button_set_active (pGtkToggleButton(check_button), TRUE);
+ g_signal_connect (check_button, 'toggled',
+ TGCallback (@toggle_grouping), size_group);
+ end;
+
+ if not GTK_WIDGET_VISIBLE (sg_window) then
+ gtk_widget_show_all (sg_window)
+ else begin
+ gtk_widget_destroy (sg_window);
+ sg_window := NULL;
+ end;
+
+ do_sizegroup := sg_window;
+end;
diff --git a/packages/gtk2/examples/gtk_demo/stock_browser.inc b/packages/gtk2/examples/gtk_demo/stock_browser.inc
new file mode 100644
index 0000000000..7db3908968
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/stock_browser.inc
@@ -0,0 +1,551 @@
+(* Stock Item and Icon Browser
+ *
+ * This source code for this demo doesn't demonstrate anything
+ * particularly useful in applications. The purpose of the "demo" is
+ * just to provide a handy place to browse the available stock icons
+ * and stock items.
+ *)
+
+var
+ stock_window : PGtkWidget;
+
+type
+ PStockItemInfo = ^TStockItemInfo;
+ TStockItemInfo = record
+ id : pgchar;
+ item : TGtkStockItem;
+ small_icon : PGdkPixbuf;
+ macro : pgchar;
+ accel_str : pgchar;
+ end;
+
+
+(* Make StockItemInfo a boxed type so we can automatically
+ * manage memory
+ *)
+
+procedure stock_item_info_free (info : PStockItemInfo); cdecl;
+begin
+ g_free (info^.id);
+ g_free (info^.macro);
+ g_free (info^.accel_str);
+ if info^.small_icon <> NULL then
+ g_object_unref (pGObject(info^.small_icon));
+
+ g_free (info);
+end;
+
+function stock_item_info_copy (src : PStockItemInfo): PStockItemInfo; cdecl;
+var
+ info : PStockItemInfo;
+
+begin
+ info := g_malloc0 (sizeof(TStockItemInfo));
+ info^.id := g_strdup (src^.id);
+ info^.macro := g_strdup (src^.macro);
+ info^.accel_str := g_strdup (src^.accel_str);
+
+ info^.item := src^.item;
+
+ info^.small_icon := src^.small_icon;
+ if info^.small_icon <> NULL then
+ g_object_ref (pGObject(info^.small_icon));
+
+ stock_item_info_copy := info;
+end;
+
+var
+ StockItemInfoType : GType;
+
+function stock_item_info_get_type: GType;
+begin
+
+ if StockItemInfoType = 0 then
+ StockItemInfoType := g_boxed_type_register_static ('StockItemInfo',
+ TGBoxedCopyFunc(@stock_item_info_copy),
+ TGBoxedFreeFunc (@stock_item_info_free));
+
+ stock_item_info_get_type := StockItemInfoType;
+end;
+
+function STOCK_ITEM_INFO_TYPE: GType;
+begin
+ STOCK_ITEM_INFO_TYPE := stock_item_info_get_type;
+end;
+
+
+type
+ PStockItemDisplay = ^TStockItemDisplay;
+ TStockItemDisplay = record
+ type_label : PGtkWidget;
+ macro_label : PGtkWidget;
+ id_label : PGtkWidget;
+ label_accel_label : PGtkWidget;
+ icon_image : PGtkWidget;
+ end;
+
+
+function id_to_macro (id : pgchar): pgchar;
+var
+ macro : PGString;
+ cp : pgchar;
+
+begin
+ (* gtk-foo-bar -> GTK_STOCK_FOO_BAR *)
+
+ macro := g_string_new (NULL);
+ cp := id;
+
+ if StrLComp (cp, 'gtk-', 4) = 0 then
+ begin
+ g_string_append (macro, 'GTK_STOCK_');
+ cp := cp + 4;
+ end;
+
+ while cp[0] <> #0 do
+ begin
+ if cp[0] = '-' then
+ g_string_append_c (macro, '_')
+ else if g_ascii_islower (cp[0]) then
+ g_string_append_c (macro, g_ascii_toupper (cp[0]))
+ else
+ g_string_append_c (macro, cp[0]);
+
+ inc(cp);
+ end;
+
+ id_to_macro := g_string_free (macro, FALSE);
+end;
+
+function CompareString (string1 : pgchar;
+ string2 : pgchar): gint; cdecl;
+begin
+ CompareString := StrComp (string1, string2); // maped to strcomp
+end;
+
+
+function create_model : PGtkTreeModel;
+var
+ store : PGtkListStore;
+ ids,
+ tmp_list : PGSList;
+
+ info : TStockItemInfo;
+ item : TGtkStockItem;
+ iter : TGtkTreeIter;
+ icon_set : PGtkIconSet;
+
+ sizes : PGtkIconSize;
+ i, n_sizes : gint;
+ size : TGtkIconSize;
+
+ w, h : gint;
+ scaled : PGdkPixbuf;
+
+begin
+ store := gtk_list_store_new (1, [STOCK_ITEM_INFO_TYPE]);
+
+ ids := gtk_stock_list_ids ();
+ ids := g_slist_sort (ids, TGCompareFunc (@CompareString));
+ tmp_list := ids;
+
+ while tmp_list <> NULL do
+ begin
+ info.id := tmp_list^.data;
+
+ if gtk_stock_lookup (info.id, @item) then
+ info.item := item
+ else begin
+ info.item._label := NULL;
+ info.item.stock_id := NULL;
+ info.item.modifier := 0;
+ info.item.keyval := 0;
+ info.item.translation_domain := NULL;
+ end;
+
+ (* only show icons for stock IDs that have default icons *)
+ icon_set := gtk_icon_factory_lookup_default (info.id);
+ if icon_set <> NULL then
+ begin
+ sizes := NULL;
+ n_sizes := 0;
+
+ (* See what sizes this stock icon really exists at *)
+ gtk_icon_set_get_sizes (icon_set, @sizes, @n_sizes);
+
+ (* Use menu size if it exists, otherwise first size found *)
+ size := sizes[0];
+ i := 0;
+ while i < n_sizes do
+ begin
+ if sizes[i] = GTK_ICON_SIZE_MENU then
+ begin
+ size := GTK_ICON_SIZE_MENU;
+ break;
+ end; {of size[i] = GTK_ICON_SIZE_MENU}
+ inc(i);
+ end; {of while}
+
+ g_free (sizes);
+
+ info.small_icon := gtk_widget_render_icon (stock_window, info.id, size, NULL);
+
+ if size <> GTK_ICON_SIZE_MENU then
+ begin
+ (* Make the result the proper size for our thumbnail *)
+ gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, @w, @h);
+
+ scaled := gdk_pixbuf_scale_simple (info.small_icon,
+ w, h,
+ GDK_INTERP_BILINEAR);
+
+ g_object_unref (pGObject(info.small_icon));
+ info.small_icon := scaled;
+ end; {of size <> GTK_ICON_SIZE_MENU}
+ end else {icon_set = NULL}
+ info.small_icon := NULL;
+
+ if info.item.keyval <> 0 then
+
+ info.accel_str := gtk_accelerator_name (info.item.keyval,
+ info.item.modifier)
+
+ else
+ info.accel_str := g_strdup ('');
+
+
+ info.macro := id_to_macro (info.id);
+
+ gtk_list_store_append (store, @iter);
+ gtk_list_store_set (store, @iter, [0, @info, -1]);
+
+ g_free (info.macro);
+ g_free (info.accel_str);
+
+ if info.small_icon <> NULL then
+ g_object_unref (pGObject(info.small_icon));
+
+ tmp_list := g_slist_next (tmp_list);
+ end; {of while tmp_list <> NULL}
+
+ g_slist_foreach (ids, TGFunc(@g_free), NULL);
+ g_slist_free (ids);
+
+ create_model := pGtkTreeModel(store);
+end;
+
+(* Finds the largest size at which the given image stock id is
+ * available. This would not be useful for a normal application
+ *)
+
+function get_largest_size (id : pgchar): TGtkIconSize;
+var
+ theset : PGtkIconSet;
+ sizes : PGtkIconSize;
+ n_sizes,
+ i : gint;
+ best_size : TGtkIconsize;
+ best_pixels : gint;
+
+ width,
+ height : gint;
+
+begin
+ theset := gtk_icon_factory_lookup_default (id);
+ best_size := GTK_ICON_SIZE_INVALID;
+ best_pixels := 0;
+
+ gtk_icon_set_get_sizes (theset, @sizes, @n_sizes);
+
+ for i:=0 to n_sizes-1 do
+ begin
+ gtk_icon_size_lookup (sizes[i], @width, @height);
+
+ if (width * height) > best_pixels then
+ begin
+ best_size := sizes[i];
+ best_pixels := width * height;
+ end; {of if}
+ end; {of for}
+
+ g_free (sizes);
+
+ get_largest_size := best_size;
+end;
+
+procedure selection_changed (selection : PGtkTreeSelection); cdecl;
+var
+ treeview : PGtkTreeView;
+ display : PStockItemDisplay;
+ model : PGtkTreeModel;
+ iter : TGtkTreeIter;
+
+ info : PStockItemInfo;
+ str : pgchar;
+
+begin
+
+ treeview := gtk_tree_selection_get_tree_view (selection);
+ display := g_object_get_data (pGObject(treeview), 'stock-display');
+
+ if gtk_tree_selection_get_selected (selection, @model, @iter) then
+ begin
+ gtk_tree_model_get (model, @iter, [0, @info, -1]);
+
+ if (info^.small_icon <> NULL) and (info^.item._label <> NULL) then
+ gtk_label_set_text (pGtkLabel(display^.type_label), 'Icon and Item')
+ else if info^.small_icon <> NULL then
+ gtk_label_set_text (pGtkLabel(display^.type_label), 'Icon Only')
+ else if info^.item._label <> NULL then
+ gtk_label_set_text (pGtkLabel(display^.type_label), 'Item Only')
+ else
+ gtk_label_set_text (pGtkLabel(display^.type_label), '???????');
+
+ gtk_label_set_text (pGtkLabel(display^.macro_label), info^.macro);
+ gtk_label_set_text (pGtkLabel(display^.id_label), info^.id);
+
+ if info^.item._label <> NULL then
+ begin
+ str := g_strdup_printf ('%s %s', [info^.item._label, info^.accel_str] );
+ gtk_label_set_text_with_mnemonic (pGtkLabel(display^.label_accel_label), str);
+ g_free (str);
+ end else
+ gtk_label_set_text (pGtkLabel(display^.label_accel_label), '');
+
+ if info^.small_icon <> NULL then
+ gtk_image_set_from_stock (pGtkImage(display^.icon_image), info^.id,
+ get_largest_size (info^.id))
+ else
+ gtk_image_set_from_pixbuf (pGtkImage(display^.icon_image), NULL);
+
+ stock_item_info_free (info);
+ end { of if gtk_tree_selection_get_selected }
+ else
+ begin
+ gtk_label_set_text (pGtkLabel(display^.type_label), 'No selected item');
+ gtk_label_set_text (pGtkLabel(display^.macro_label), '');
+ gtk_label_set_text (pGtkLabel(display^.id_label), '');
+ gtk_label_set_text (pGtkLabel(display^.label_accel_label), '');
+ gtk_image_set_from_pixbuf (pGtkImage(display^.icon_image), NULL);
+ end;
+end;
+
+procedure macro_set_func_text (tree_column : PGtkTreeViewColumn;
+ cell : PGtkCellRenderer;
+ model : PGtkTreeModel;
+ iter : PGtkTreeIter;
+ data : gpointer); cdecl;
+var
+ info : PStockItemInfo;
+
+begin
+ gtk_tree_model_get (model, iter, [0, @info, -1]);
+
+ g_object_set (pGtkCellRenderer(cell), 'text', [info^.macro, NULL]);
+
+ stock_item_info_free (info);
+end;
+
+procedure macro_set_func_pixbuf (tree_column : PGtkTreeViewColumn;
+ cell : PGtkCellRenderer;
+ model : PGtkTreeModel;
+ iter : PGtkTreeIter;
+ data : gpointer); cdecl;
+var
+ info : PStockItemInfo;
+
+begin
+ gtk_tree_model_get (model, iter, [0, @info, -1]);
+
+ g_object_set (pGtkCellRenderer(cell), 'pixbuf', [info^.small_icon, NULL]);
+
+ stock_item_info_free (info);
+end;
+
+procedure id_set_func (tree_column : PGtkTreeViewColumn;
+ cell : PGtkCellRenderer;
+ model : PGtkTreeModel;
+ iter : PGtkTreeIter;
+ data : gpointer); cdecl;
+var
+ info : PStockItemInfo;
+
+begin
+ gtk_tree_model_get (model, iter, [0, @info, -1]);
+
+ g_object_set (pGtkCellRenderer(cell), 'text', [info^.id, NULL]);
+
+ stock_item_info_free (info);
+end;
+
+procedure accel_set_func (tree_column : PGtkTreeViewColumn;
+ cell : PGtkCellRenderer;
+ model : PGtkTreeModel;
+ iter : PGtkTreeIter;
+ data : gpointer); cdecl;
+var
+ info : PStockItemInfo;
+
+begin
+ gtk_tree_model_get (model, iter, [0, @info, -1]);
+
+ g_object_set (pGtkCellRenderer(cell),'text', [info^.accel_str, NULL]);
+
+ stock_item_info_free (info);
+end;
+
+procedure label_set_func (tree_column : PGtkTreeViewColumn;
+ cell : PGtkCellRenderer;
+ model : PGtkTreeModel;
+ iter : PGtkTreeIter;
+ data : gpointer); cdecl;
+var
+ info : PStockItemInfo;
+
+begin
+ gtk_tree_model_get (model, iter, [0, @info, -1]);
+
+ g_object_set (pGtkCellRenderer(cell), 'text', [info^.item._label, NULL]);
+
+ stock_item_info_free (info);
+end;
+
+function do_stock_browser : PGtkWidget;
+var
+ frame,
+ vbox,
+ hbox,
+ sw,
+ treeview,
+ align : PGtkWidget;
+ model : PGtkTreeModel;
+ cell_renderer : PGtkCellRenderer;
+ display : PStockItemDisplay;
+ selection : PGtkTreeSelection;
+ column : PGtkTreeViewColumn;
+
+begin
+ if stock_window = NULL then
+ begin
+ stock_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (pGtkWindow(stock_window), 'Stock Icons and Items');
+ gtk_window_set_default_size (pGtkWindow(stock_window), -1, 500);
+
+ g_signal_connect (stock_window, 'destroy', TGCallback(@gtk_widget_destroyed), @stock_window);
+ gtk_container_set_border_width (pGtkContainer(stock_window), 8);
+
+ hbox := gtk_hbox_new (FALSE, 8);
+ gtk_container_add (pGtkContainer(stock_window), hbox);
+
+ sw := gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (pGtkScrolledWindow(sw),
+ GTK_POLICY_NEVER,
+ GTK_POLICY_AUTOMATIC);
+ gtk_box_pack_start (pGtkBox(hbox), sw, FALSE, FALSE, 0);
+
+ model := create_model ();
+
+ treeview := gtk_tree_view_new_with_model (model);
+
+ g_object_unref (pGObject(model));
+
+ gtk_container_add (pGtkContainer(sw), treeview);
+
+ column := gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title (column, 'Macro');
+
+ cell_renderer := gtk_cell_renderer_pixbuf_new ();
+ gtk_tree_view_column_pack_start (column,
+ cell_renderer,
+ FALSE);
+ gtk_tree_view_column_set_cell_data_func (column, cell_renderer,
+ @macro_set_func_pixbuf, NULL, NULL);
+ cell_renderer := gtk_cell_renderer_text_new ();
+ gtk_tree_view_column_pack_start (column,
+ cell_renderer,
+ TRUE);
+ gtk_tree_view_column_set_cell_data_func (column, cell_renderer,
+ @macro_set_func_text, NULL, NULL);
+
+ gtk_tree_view_append_column (pGtkTreeView(treeview), column);
+
+ cell_renderer := gtk_cell_renderer_text_new ();
+
+ gtk_tree_view_insert_column_with_data_func (pGtkTreeView(treeview),
+ -1,
+ 'Label',
+ cell_renderer,
+ @label_set_func,
+ NULL,
+ NULL);
+
+ gtk_tree_view_insert_column_with_data_func (pGtkTreeView(treeview),
+ -1,
+ 'Accel',
+ cell_renderer,
+ @accel_set_func,
+ NULL,
+ NULL);
+
+ gtk_tree_view_insert_column_with_data_func (pGtkTreeView(treeview),
+ -1,
+ 'ID',
+ cell_renderer,
+ @id_set_func,
+ NULL,
+ NULL);
+
+ align := gtk_alignment_new (0.5, 0.0, 0.0, 0.0);
+ gtk_box_pack_end (pGtkBox(hbox), align, FALSE, FALSE, 0);
+
+ frame := gtk_frame_new ('Selected Item');
+ gtk_container_add (pGtkContainer(align), frame);
+
+ vbox := gtk_vbox_new (FALSE, 8);
+ gtk_container_set_border_width (pGtkContainer(vbox), 4);
+ gtk_container_add (pGtkContainer(frame), vbox);
+
+ display := g_malloc0 (sizeof(TStockItemDisplay));
+ g_object_set_data_full (pGObject(treeview),
+ 'stock-display',
+ display,
+ @g_free); (* free display with treeview *)
+
+ display^.type_label := gtk_label_new (NULL);
+ display^.macro_label := gtk_label_new (NULL);
+ display^.id_label := gtk_label_new (NULL);
+ display^.label_accel_label := gtk_label_new (NULL);
+ display^.icon_image := gtk_image_new_from_pixbuf (NULL); (* empty image *)
+
+ gtk_box_pack_start (pGtkBox(vbox), display^.type_label,
+ FALSE, FALSE, 0);
+
+ gtk_box_pack_start (pGtkBox(vbox), display^.icon_image,
+ FALSE, FALSE, 0);
+
+ gtk_box_pack_start (pGtkBox(vbox), display^.label_accel_label,
+ FALSE, FALSE, 0);
+ gtk_box_pack_start (pGtkBox(vbox), display^.macro_label,
+ FALSE, FALSE, 0);
+ gtk_box_pack_start (pGtkBox(vbox), display^.id_label,
+ FALSE, FALSE, 0);
+
+ selection := gtk_tree_view_get_selection (pGtkTreeView(treeview));
+ gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
+
+ g_signal_connect (pGObject(selection),
+ 'changed',
+ TGCallback(@selection_changed),
+ NULL);
+ end;
+
+ if not GTK_WIDGET_VISIBLE (stock_window) then
+ gtk_widget_show_all (stock_window)
+ else begin
+ gtk_widget_destroy (stock_window);
+ stock_window := NULL;
+ end;
+
+ do_stock_browser := stock_window;
+end;
+
diff --git a/packages/gtk2/examples/gtk_demo/textview.inc b/packages/gtk2/examples/gtk_demo/textview.inc
new file mode 100644
index 0000000000..0ffc316f75
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/textview.inc
@@ -0,0 +1,643 @@
+// included by gt_demo.pas
+
+(* Text Widget
+ *
+ * The GtkTextView widget displays a GtkTextBuffer. One GtkTextBuffer
+ * can be displayed by multiple GtkTextViews. This demo has two views
+ * displaying a single buffer, and shows off the widget's text
+ * formatting features.
+ *
+ *)
+
+var
+ text_window,
+ text_egg_window : PGtkWidget;
+
+procedure easter_egg_callback (button : PGtkWidget;
+ data : gpointer); forward; cdecl;
+
+const
+ gray50_width = 2;
+ gray50_height = 2;
+
+ gray50_bits: array [0..1] of char = (#2, #1);
+
+procedure create_tags (buffer : PGtkTextBuffer);
+var
+ stipple : PGdkBitmap;
+
+begin
+ (* Create a bunch of tags. Note that it's also possible to
+ * create tags with gtk_text_tag_new() then add them to the
+ * tag table for the buffer, gtk_text_buffer_create_tag() is
+ * just a convenience function. Also note that you don't have
+ * to give tags a name; pass NULL for the name to create an
+ * anonymous tag.
+ *
+ * In any real app, another useful optimization would be to create
+ * a GtkTextTagTable in advance, and reuse the same tag table for
+ * all the buffers with the same tag set, instead of creating
+ * new copies of the same tags for every buffer.
+ *
+ * Tags are assigned default priorities in order of addition to the
+ * tag table. That is, tags created later that affect the same text
+ * property affected by an earlier tag will override the earlier
+ * tag. You can modify tag priorities with
+ * gtk_text_tag_set_priority().
+ *)
+
+ gtk_text_buffer_create_tag (buffer, 'heading',
+ 'weight', [ PANGO_WEIGHT_BOLD,
+ 'size', 15 * PANGO_SCALE,
+ NULL] );
+
+ gtk_text_buffer_create_tag (buffer, 'italic',
+ 'style', [PANGO_STYLE_ITALIC, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'bold',
+ 'weight', [ PANGO_WEIGHT_BOLD, NULL] );
+
+ gtk_text_buffer_create_tag (buffer, 'big',
+ (* points times the PANGO_SCALE factor *)
+ 'size', [ 20 * PANGO_SCALE, NULL] );
+
+ gtk_text_buffer_create_tag (buffer, 'xx-small',
+ 'scale',[ PANGO_SCALE_XX_SMALL, NULL] );
+
+ gtk_text_buffer_create_tag (buffer, 'x-large',
+ 'scale', [ PANGO_SCALE_X_LARGE, NULL] );
+
+ gtk_text_buffer_create_tag (buffer, 'monospace',
+ 'family', [ 'monospace', NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'blue_foreground',
+ 'foreground', [ 'blue', NULL] );
+
+ gtk_text_buffer_create_tag (buffer, 'red_background',
+ 'background', [ 'red', NULL] );
+
+ stipple := gdk_bitmap_create_from_data (NULL,
+ gray50_bits, gray50_width,
+ gray50_height);
+
+ gtk_text_buffer_create_tag (buffer, 'background_stipple',
+ 'background_stipple',[ stipple, NULL] );
+
+ gtk_text_buffer_create_tag (buffer, 'foreground_stipple',
+ 'foreground_stipple', [stipple, NULL]);
+
+ g_object_unref (pGObject(stipple));
+
+ gtk_text_buffer_create_tag (buffer, 'big_gap_before_line',
+ 'pixels_above_lines', [30, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'big_gap_after_line',
+ 'pixels_below_lines', [30, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'double_spaced_line',
+ 'pixels_inside_wrap', [10, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'not_editable',
+ 'editable', [FALSE, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'word_wrap',
+ 'wrap_mode', [GTK_WRAP_WORD, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'char_wrap',
+ 'wrap_mode', [GTK_WRAP_CHAR, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'no_wrap',
+ 'wrap_mode', [GTK_WRAP_NONE, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'center',
+ 'justification', [GTK_JUSTIFY_CENTER, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'right_justify',
+ 'justification', [GTK_JUSTIFY_RIGHT, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'wide_margins',
+ 'left_margin', [50, 'right_margin', 50,
+ NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'strikethrough',
+ 'strikethrough', [TRUE, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'underline',
+ 'underline', [PANGO_UNDERLINE_SINGLE, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'double_underline',
+ 'underline', [PANGO_UNDERLINE_DOUBLE, NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'superscript',
+ 'rise', [10 * PANGO_SCALE, (* 10 pixels *)
+ 'size', 8 * PANGO_SCALE, (* 8 points *)
+ NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'subscript',
+ 'rise', [-10 * PANGO_SCALE, (* 10 pixels *)
+ 'size', 8 * PANGO_SCALE, (* 8 points *)
+ NULL]);
+
+ gtk_text_buffer_create_tag (buffer, 'rtl_quote',
+ 'wrap_mode', [ GTK_WRAP_WORD,
+ 'direction', GTK_TEXT_DIR_RTL,
+ 'indent', 30,
+ 'left_margin', 20,
+ 'right_margin', 20,
+ NULL]);
+end;
+
+procedure insert_text (buffer : PGtkTextBuffer);
+var
+ iter,
+ text_start,
+ text_end : TGtkTextIter;
+ pixbuf,
+ scaled : PGdkPixbuf;
+ filename : pchar;
+
+begin
+ (* demo_find_file() looks in the the current directory first,
+ * so you can run gtk-demo without installing GTK, then looks
+ * in the location where the file is installed.
+ *)
+ pixbuf := NULL;
+ filename := demo_find_file ('gtk-logo-rgb.gif', NULL);
+
+ if filename <> NULL then
+ begin
+ pixbuf := gdk_pixbuf_new_from_file (filename, NULL);
+ g_free (filename);
+ end;
+
+ if pixbuf = NULL then
+ begin
+ g_error ('Failed to load image file gtk-logo-rgb.gif'#13#10);
+ exit;
+ end;
+
+ scaled := gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
+ g_object_unref (pGObject(pixbuf));
+ pixbuf := scaled;
+
+ (* get start of buffer; each insertion will revalidate the
+ * iterator to point to just after the inserted text.
+ *)
+ gtk_text_buffer_get_iter_at_offset (buffer, @iter, 0);
+
+ gtk_text_buffer_insert (buffer, @iter,
+ 'The text widget can display text with all kinds of nifty attributes. '
+ + 'It also supports multiple views of the same buffer; '
+ + 'this demo is showing the same buffer in two places.'#13#10#13#10, -1);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, 'Font styles. ', -1,
+ 'heading');
+
+ gtk_text_buffer_insert (buffer, @iter, 'For example, you can have ', -1);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'italic', -1,
+ 'italic'); // test: left out last argument " NULL "
+ gtk_text_buffer_insert (buffer, @iter, ', ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'bold', -1,
+ 'bold');
+ gtk_text_buffer_insert (buffer, @iter, ', or ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'monospace (typewriter)', -1,
+ 'monospace');
+ gtk_text_buffer_insert (buffer, @iter, ', or ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'big', -1,
+ 'big');
+ gtk_text_buffer_insert (buffer, @iter, ' text. ', -1);
+ gtk_text_buffer_insert (buffer, @iter,
+ 'It''s best not to hardcode specific text sizes; '
+ + 'you can use relative sizes as with CSS, such as ', -1);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'xx-small', -1,
+ 'xx-small');
+ gtk_text_buffer_insert (buffer, @iter, ' or ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'x-large', -1,
+ 'x-large');
+ gtk_text_buffer_insert (buffer, @iter,
+ ' to ensure that your program properly adapts if the user '
+ + ' changes the default font size.'#13#10#13#10, -1);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, 'Colors. ', -1,
+ 'heading');
+
+ gtk_text_buffer_insert (buffer, @iter, 'Colors such as ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'a blue foreground', -1,
+ 'blue_foreground');
+ gtk_text_buffer_insert (buffer, @iter, ' or ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'a red background', -1,
+ 'red_background');
+ gtk_text_buffer_insert (buffer, @iter, ' or even ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'a stippled red background', -1,
+ 'red_background',
+ ['background_stipple',
+ NULL]);
+
+ gtk_text_buffer_insert (buffer, @iter, ' or ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'a stippled blue foreground on solid red background', -1,
+ 'blue_foreground',
+ ['red_background',
+ 'foreground_stipple',
+ NULL]);
+ gtk_text_buffer_insert (buffer, @iter, ' (select that to read it) can be used.'#13#10#13#10, -1);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, 'Underline, strikethrough, and rise. ', -1,
+ 'heading');
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'Strikethrough', -1,
+ 'strikethrough');
+ gtk_text_buffer_insert (buffer, @iter, ', ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'underline', -1,
+ 'underline');
+ gtk_text_buffer_insert (buffer, @iter, ', ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'double underline', -1,
+ 'double_underline');
+ gtk_text_buffer_insert (buffer, @iter, ', ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'superscript', -1,
+ 'superscript');
+ gtk_text_buffer_insert (buffer, @iter, ', and ', -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'subscript', -1,
+ 'subscript');
+ gtk_text_buffer_insert (buffer, @iter, ' are all supported.'#13#10#13#10, -1);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, 'Images. ', -1,
+ 'heading');
+
+ gtk_text_buffer_insert (buffer, @iter, 'The buffer can have images in it: ', -1);
+ gtk_text_buffer_insert_pixbuf (buffer, @iter, pixbuf);
+ gtk_text_buffer_insert_pixbuf (buffer, @iter, pixbuf);
+ gtk_text_buffer_insert_pixbuf (buffer, @iter, pixbuf);
+ gtk_text_buffer_insert (buffer, @iter, ' for example.'#13#10, -1);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, 'Spacing. ', -1,
+ 'heading', [NULL]);
+
+ gtk_text_buffer_insert (buffer, @iter, 'You can adjust the amount of space before each line.'#13#10, -1);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'This line has a whole lot of space before it.'#13#10, -1,
+ 'big_gap_before_line', ['wide_margins', NULL]);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'You can also adjust the amount of space after each line; '
+ + 'this line has a whole lot of space after it.'#13#10, -1,
+ 'big_gap_after_line', ['wide_margins', NULL]);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'You can also adjust the amount of space between wrapped lines; '
+ + 'this line has extra space between each wrapped line in the same paragraph. '
+ + 'To show off wrapping, some filler text: the quick brown fox jumped over '
+ + 'the lazy dog. Blah blah blah blah blah blah blah blah blah.'#13#10, -1,
+ 'double_spaced_line', ['wide_margins', NULL]);
+
+ gtk_text_buffer_insert (buffer, @iter, 'Also note that those lines have extra-wide margins.'#13#10#13#10, -1);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, 'Editability. ', -1,
+ 'heading', [NULL]);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'This line is ''locked down'' and can''t be edited by the user - '
+ + 'just try it! You can''t delete this line.'#13#10#13#10, -1,
+ 'not_editable', [NULL]);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, 'Wrapping. ', -1,
+ 'heading', [NULL]);
+
+ gtk_text_buffer_insert (buffer, @iter,
+ 'This line (and most of the others in this buffer) is word-wrapped, '
+ + 'using the proper Unicode algorithm. Word wrap should work in all '
+ + 'scripts and languages that GTK+ supports. Let''s make this a long '
+ + 'paragraph to demonstrate: blah blah blah blah blah blah blah blah '
+ + 'blah blah blah blah blah blah blah blah blah blah blah'#13#10#13#10, -1);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'This line has character-based wrapping, and can wrap between '
+ + 'any two character glyphs. Let''s make this a long paragraph to '
+ + 'demonstrate: blah blah blah blah blah blah blah blah blah blah '
+ + 'blah blah blah blah blah blah blah blah blah'#13#10#13#10, -1,
+ 'char_wrap', [NULL]);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, PChar(
+ 'This line has all wrapping turned off, so it makes the horizontal '
+ + 'scrollbar appear.'#13#10#13#10#13#10), -1,
+ 'no_wrap', [NULL]);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, 'Justification. ', -1,
+ 'heading', [NULL]);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ #13#10'This line has center justification.'#13#10, -1,
+ 'center', [NULL]);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'This line has right justification.'#13#10, -1,
+ 'right_justify', [NULL]);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ #13#10'This line has big wide margins. Text text text text text text '
+ + 'text text text text text text text text text text text text text text '
+ + 'text text text text text text text text text text text text text text '
+ + 'text text.'#13#10, -1,'wide_margins', [NULL]);
+
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter, 'Internationalization. ', -1,
+ 'heading', [NULL]);
+
+ gtk_text_buffer_insert (buffer, @iter,
+ 'You can put all sorts of Unicode text in the buffer.'#13#10#13#10
+ + 'German (Deutsch Süd) Grüß Gott'#13#10
+ + 'Greek (Ελληνικά) Γειά σας'#13#10
+ + 'Hebrew שלו×'#13#10
+ + 'Japanese (日本語)'#13#10#13#10
+ + 'The widget properly handles bidirectional text, word wrapping, '
+ + 'DOS/UNIX/Unicode paragraph separators, grapheme boundaries, '
+ + 'and so on using the Pango internationalization framework.'#13#10, -1);
+
+ gtk_text_buffer_insert (buffer, @iter, 'Here''s a word-wrapped quote in a right-to-left language:'#13#10, -1);
+ gtk_text_buffer_insert_with_tags_by_name (buffer, @iter,
+ 'وقد بدأ ثلاث من أكثر المؤسسات تقدما ÙÙŠ '
+ + 'شبكة اكسيون برامجها كمنظمات لا تسعى للربح، '
+ + 'ثم تحولت ÙÙŠ السنوات الخمس الماضية إلى مؤسسات '
+ + 'مالية منظمة، وباتت جزءا من النظام المالي ÙÙŠ '
+ + 'بلدانها، ولكنها تتخصص ÙÙŠ خدمة قطاع المشروعات الصغيرة. '
+ + 'وأحد أكثر هذه المؤسسات نجاحا هو »بانكوسول« '
+ + 'ÙÙŠ بوليÙيا.'#13#10#13#10, -1,
+ 'rtl_quote', [NULL]);
+
+ gtk_text_buffer_insert (buffer, @iter, 'You can put widgets in the buffer: Here''s a button: ', -1);
+ gtk_text_buffer_create_child_anchor (buffer, @iter);
+ gtk_text_buffer_insert (buffer, @iter, ' and a menu: ', -1);
+ gtk_text_buffer_create_child_anchor (buffer, @iter);
+ gtk_text_buffer_insert (buffer, @iter, ' and a scale: ', -1);
+ gtk_text_buffer_create_child_anchor (buffer, @iter);
+ gtk_text_buffer_insert (buffer, @iter, ' and an animation: ', -1);
+ gtk_text_buffer_create_child_anchor (buffer, @iter);
+ gtk_text_buffer_insert (buffer, @iter, ' finally a text entry: ', -1);
+ gtk_text_buffer_create_child_anchor (buffer, @iter);
+ gtk_text_buffer_insert (buffer, @iter, '.'#13#10, -1);
+
+ gtk_text_buffer_insert (buffer, @iter,
+ #13#10#13#10'This demo doesn''t demonstrate all the GtkTextBuffer features; '
+ + 'it leaves out, for example: invisible/hidden text (doesn''t work in GTK 2, but planned), '
+ + 'tab stops, application-drawn areas on the sides of the widget for displaying breakpoints and such...', -1);
+
+ (* Apply word_wrap tag to whole buffer *)
+ gtk_text_buffer_get_bounds (buffer, @text_start, @text_end);
+ gtk_text_buffer_apply_tag_by_name (buffer, 'word_wrap', @text_start, @text_end);
+
+ g_object_unref (pGObject(pixbuf));
+end;
+
+function find_anchor (iter : PGtkTextIter): gboolean; cdecl;
+
+begin
+ while gtk_text_iter_forward_char (iter) do
+ begin
+ if gtk_text_iter_get_child_anchor (iter)<> NULL then
+ exit (TRUE);
+ end;
+end;
+
+procedure attach_widgets (text_view : PGtkWidget);
+var
+ iter : TGtkTextIter;
+ buffer : PGtkTextBuffer;
+ i : integer;
+
+ anchor : PGtkTextChildAnchor;
+ widget,
+ menu,
+ menu_item : PGtkWidget;
+
+ filename : pgchar;
+
+begin
+ buffer := gtk_text_view_get_buffer (pGtkTextView(text_view));
+
+ gtk_text_buffer_get_start_iter (buffer, @iter);
+
+ i := 0;
+ while find_anchor (@iter) do
+ begin
+ anchor := gtk_text_iter_get_child_anchor (@iter);
+
+ case i of
+ 0: begin
+ widget := gtk_button_new_with_label ('Click Me');
+
+ g_signal_connect (pGObject(widget), 'clicked',
+ TGCallback(@easter_egg_callback),
+ NULL);
+ end;
+ 1: begin
+ menu := gtk_menu_new ();
+
+ widget := gtk_option_menu_new ();
+
+ menu_item := gtk_menu_item_new_with_label ('Option 1');
+ gtk_menu_shell_append (pGtkMenuShell(menu), menu_item);
+
+ menu_item := gtk_menu_item_new_with_label ('Option 2');
+ gtk_menu_shell_append (pGtkMenuShell(menu), menu_item);
+
+ menu_item := gtk_menu_item_new_with_label ('Option 3');
+ gtk_menu_shell_append (pGtkMenuShell(menu), menu_item);
+
+ gtk_option_menu_set_menu (pGtkOptionMenu(widget), menu);
+ end;
+ 2: begin
+ widget := gtk_hscale_new (NULL);
+ gtk_range_set_range (pGtkRange(widget), 0, 100);
+ gtk_widget_set_size_request (widget, 70, -1);
+ end;
+ 3: begin
+ filename := demo_find_file ('floppybuddy.gif', NULL);
+ widget := gtk_image_new_from_file (filename);
+ g_free (filename);
+ end;
+ 4: begin
+ widget := gtk_entry_new ();
+ end;
+ else begin
+ widget := NULL; (* avoids a compiler warning *)
+ exit;
+ end;
+ end; {of case}
+
+ if widget <> NULL then
+ begin
+ gtk_text_view_add_child_at_anchor (pGtkTextView(text_view), widget, anchor);
+ gtk_widget_show_all (widget);
+ end;
+
+ inc(i);
+ end; {of while}
+end;
+
+
+function do_textview : PGtkWidget;
+var
+ vpaned,
+ view1,
+ view2,
+ sw : PGtkWidget;
+ buffer : PGtkTextBuffer;
+
+begin
+ if text_window = NULL then
+ begin
+ text_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_default_size (pGtkWindow(text_window), 450, 450);
+
+ g_signal_connect (text_window, 'destroy',
+ TGCallback(@gtk_widget_destroyed), @text_window);
+
+ gtk_window_set_title (pGtkWindow(text_window), 'TextView');
+ gtk_container_set_border_width (pGtkContainer(text_window), 0);
+
+ vpaned := gtk_vpaned_new ();
+ gtk_container_set_border_width (pGtkContainer(vpaned), 5);
+ gtk_container_add (pGtkContainer(text_window), vpaned);
+
+ (* For convenience, we just use the autocreated buffer from
+ * the first text view; you could also create the buffer
+ * by itself with gtk_text_buffer_new(), then later create
+ * a view widget.
+ *)
+ view1 := gtk_text_view_new ();
+ buffer := gtk_text_view_get_buffer (pGtkTextView(view1));
+ view2 := gtk_text_view_new_with_buffer (buffer);
+
+ sw := gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (pGtkScrolledWindow(sw),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ gtk_paned_add1 (pGtkPaned(vpaned), sw);
+
+ gtk_container_add (pGtkContainer(sw), view1);
+
+ sw := gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (pGtkScrolledWindow(sw),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+ gtk_paned_add2 (pGtkPaned(vpaned), sw);
+
+ gtk_container_add (pGtkContainer(sw), view2);
+
+ create_tags (buffer);
+ insert_text (buffer);
+
+ attach_widgets (view1);
+ attach_widgets (view2);
+
+ gtk_widget_show_all (vpaned);
+ end;
+
+ if not GTK_WIDGET_VISIBLE (text_window) then
+ gtk_widget_show (text_window)
+ else begin
+ gtk_widget_destroy (text_window);
+ text_window := NULL;
+ end;
+
+ do_textview := text_window;
+end;
+
+procedure recursive_attach_view (depth : integer;
+ view : PGtkTextView;
+ anchor : PGtkTextChildAnchor);
+var
+ child_view,
+ event_box,
+ align : PGtkWidget;
+ color : TGdkColor;
+
+begin
+ if depth > 4 then
+ exit;
+
+ child_view := gtk_text_view_new_with_buffer (gtk_text_view_get_buffer (view));
+
+ (* Event box is to add a black border around each child view *)
+ event_box := gtk_event_box_new ();
+ gdk_color_parse ('black', @color);
+ gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, @color);
+
+ align := gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
+ gtk_container_set_border_width (pGtkContainer(align), 1);
+
+ gtk_container_add (pGtkContainer(event_box), align);
+ gtk_container_add (pGtkContainer(align), child_view);
+
+ gtk_text_view_add_child_at_anchor (view, event_box, anchor);
+
+ recursive_attach_view (depth + 1, pGtkTextView(child_view), anchor);
+end;
+
+procedure easter_egg_callback(button : PGtkWidget;
+ data : gpointer); cdecl;
+var
+ sw,
+ view : PGtkWidget;
+ buffer : PGtkTextBuffer;
+ iter : TGtkTextIter;
+ anchor : PGtkTextChildAnchor;
+
+begin
+ if text_egg_window <> NULL then
+ begin
+ gtk_window_present (pGtkWindow(text_egg_window));
+ exit;
+ end;
+
+ buffer := gtk_text_buffer_new (NULL);
+
+ gtk_text_buffer_get_start_iter (buffer, @iter);
+
+ gtk_text_buffer_insert (buffer, @iter,
+ 'This buffer is shared by a set of nested text views.'#13#10'Nested view:'#13#10, -1);
+ anchor := gtk_text_buffer_create_child_anchor (buffer, @iter);
+ gtk_text_buffer_insert (buffer, @iter,
+ #13#10'Don''t do this in real applications, please.'#13#10, -1);
+
+ view := gtk_text_view_new_with_buffer (buffer);
+
+ recursive_attach_view (0, pGtkTextView(view), anchor);
+
+ g_object_unref (pGObject(buffer));
+
+ text_egg_window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ sw := gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (pGtkScrolledWindow(sw),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ gtk_container_add (pGtkContainer(text_egg_window), sw);
+ gtk_container_add (pGtkContainer(sw), view);
+
+ g_object_add_weak_pointer (pGObject(text_egg_window),
+ gpointer (@text_egg_window));
+
+ gtk_window_set_default_size (pGtkWindow(text_egg_window), 300, 400);
+
+ gtk_widget_show_all (text_egg_window);
+end;
+
+// included by gt_demo.pas
+
diff --git a/packages/gtk2/examples/gtk_demo/tree_store.inc b/packages/gtk2/examples/gtk_demo/tree_store.inc
new file mode 100644
index 0000000000..dc9731c80f
--- /dev/null
+++ b/packages/gtk2/examples/gtk_demo/tree_store.inc
@@ -0,0 +1,461 @@
+(* Tree View/Tree Store
+ *
+ * The GtkTreeStore is used to store data in tree form, to be
+ * used later on by a GtkTreeView to display it. This demo builds
+ * a simple GtkTreeStore and displays it. If you're new to the
+ * GtkTreeView widgets and associates, look into the GtkListStore
+ * example first.
+ *
+ *)
+ (*
+ * todo: translate to pascal
+ *)
+
+function do_tree_store : PGtkWidget;
+begin
+ do_dummy ('Tree View / Tree Store - Demo');
+ do_tree_store := NULL;
+end;
+
+
+(*
+#include <gtk/gtk.h>
+
+static GtkWidget *window = NULL;
+
+/* TreeItem structure */
+typedef struct _TreeItem TreeItem;
+struct _TreeItem
+{
+ const gchar *label;
+ gboolean alex;
+ gboolean havoc;
+ gboolean tim;
+ gboolean owen;
+ gboolean dave;
+ gboolean world_holiday; /* shared by the European hackers */
+ TreeItem *children;
+};
+
+/* columns */
+enum
+{
+ HOLIDAY_NAME_COLUMN = 0,
+ ALEX_COLUMN,
+ HAVOC_COLUMN,
+ TIM_COLUMN,
+ OWEN_COLUMN,
+ DAVE_COLUMN,
+
+ VISIBLE_COLUMN,
+ WORLD_COLUMN,
+ NUM_COLUMNS
+};
+
+/* tree data */
+static TreeItem january[] =
+{
+ {"New Years Day", TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, NULL },
+ {"Presidential Inauguration", FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, NULL },
+ {"Martin Luther King Jr. day", FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, NULL },
+ { NULL }
+};
+
+static TreeItem february[] =
+{
+ { "Presidents' Day", FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, NULL },
+ { "Groundhog Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Valentine's Day", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, NULL },
+ { NULL }
+};
+
+static TreeItem march[] =
+{
+ { "National Tree Planting Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "St Patrick's Day", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, NULL },
+ { NULL }
+};
+static TreeItem april[] =
+{
+ { "April Fools' Day", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, NULL },
+ { "Army Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Earth Day", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, NULL },
+ { "Administrative Professionals' Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { NULL }
+};
+
+static TreeItem may[] =
+{
+ { "Nurses' Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "National Day of Prayer", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Mothers' Day", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, NULL },
+ { "Armed Forces Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Memorial Day", TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, NULL },
+ { NULL }
+};
+
+static TreeItem june[] =
+{
+ { "June Fathers' Day", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, NULL },
+ { "Juneteenth (Liberation of Slaves)", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Flag Day", FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, NULL },
+ { NULL }
+};
+
+static TreeItem july[] =
+{
+ { "Parents' Day", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, NULL },
+ { "Independence Day", FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, NULL },
+ { NULL }
+};
+
+static TreeItem august[] =
+{
+ { "Air Force Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Coast Guard Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Friendship Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { NULL }
+};
+
+static TreeItem september[] =
+{
+ { "Grandparents' Day", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, NULL },
+ { "Citizenship Day or Constitution Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Labor Day", TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, NULL },
+ { NULL }
+};
+
+static TreeItem october[] =
+{
+ { "National Children's Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Bosses' Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Sweetest Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Mother-in-Law's Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Navy Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Columbus Day", FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, NULL },
+ { "Halloween", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, NULL },
+ { NULL }
+};
+
+static TreeItem november[] =
+{
+ { "Marine Corps Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Veterans' Day", TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, NULL },
+ { "Thanksgiving", FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, NULL },
+ { NULL }
+};
+
+static TreeItem december[] =
+{
+ { "Pearl Harbor Remembrance Day", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { "Christmas", TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, NULL },
+ { "Kwanzaa", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, NULL },
+ { NULL }
+};
+
+
+static TreeItem toplevel[] =
+{
+ {"January", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, january},
+ {"February", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, february},
+ {"March", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, march},
+ {"April", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, april},
+ {"May", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, may},
+ {"June", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, june},
+ {"July", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, july},
+ {"August", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, august},
+ {"September", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, september},
+ {"October", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, october},
+ {"November", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, november},
+ {"December", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, december},
+ {NULL}
+};
+
+
+static GtkTreeModel *
+create_model (void)
+{
+ GtkTreeStore *model;
+ GtkTreeIter iter;
+ TreeItem *month = toplevel;
+
+ /* create tree store */
+ model = gtk_tree_store_new (NUM_COLUMNS,
+ G_TYPE_STRING,
+ G_TYPE_BOOLEAN,
+ G_TYPE_BOOLEAN,
+ G_TYPE_BOOLEAN,
+ G_TYPE_BOOLEAN,
+ G_TYPE_BOOLEAN,
+ G_TYPE_BOOLEAN,
+ G_TYPE_BOOLEAN);
+
+ /* add data to the tree store */
+ while (month->label)
+ {
+ TreeItem *holiday = month->children;
+
+ gtk_tree_store_append (model, &iter, NULL);
+ gtk_tree_store_set (model, &iter,
+ HOLIDAY_NAME_COLUMN, month->label,
+ ALEX_COLUMN, FALSE,
+ HAVOC_COLUMN, FALSE,
+ TIM_COLUMN, FALSE,
+ OWEN_COLUMN, FALSE,
+ DAVE_COLUMN, FALSE,
+ VISIBLE_COLUMN, FALSE,
+ WORLD_COLUMN, FALSE,
+ -1);
+
+ /* add children */
+ while (holiday->label)
+ {
+ GtkTreeIter child_iter;
+
+ gtk_tree_store_append (model, &child_iter, &iter);
+ gtk_tree_store_set (model, &child_iter,
+ HOLIDAY_NAME_COLUMN, holiday->label,
+ ALEX_COLUMN, holiday->alex,
+ HAVOC_COLUMN, holiday->havoc,
+ TIM_COLUMN, holiday->tim,
+ OWEN_COLUMN, holiday->owen,
+ DAVE_COLUMN, holiday->dave,
+ VISIBLE_COLUMN, TRUE,
+ WORLD_COLUMN, holiday->world_holiday,
+ -1);
+
+ holiday++;
+ }
+
+ month++;
+ }
+
+ return GTK_TREE_MODEL (model);
+}
+
+static void
+item_toggled (GtkCellRendererToggle *cell,
+ gchar *path_str,
+ gpointer data)
+{
+ GtkTreeModel *model = (GtkTreeModel * )data;
+ GtkTreePath *path = gtk_tree_path_new_from_string (path_str);
+ GtkTreeIter iter;
+ gboolean toggle_item;
+
+ gint *column;
+
+ column = g_object_get_data (G_OBJECT (cell), "column");
+
+ /* get toggled iter */
+ gtk_tree_model_get_iter (model, &iter, path);
+ gtk_tree_model_get (model, &iter, column, &toggle_item, -1);
+
+ /* do something with the value */
+ toggle_item ^= 1;
+
+ /* set new value */
+ gtk_tree_store_set (GTK_TREE_STORE (model), &iter, column,
+ toggle_item, -1);
+
+ /* clean up */
+ gtk_tree_path_free (path);
+}
+
+static void
+add_columns (GtkTreeView *treeview)
+{
+ gint col_offset;
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *column;
+ GtkTreeModel *model = gtk_tree_view_get_model (treeview);
+
+ /* column for holiday names */
+ renderer = gtk_cell_renderer_text_new ();
+ g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
+
+ col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ -1, "Holiday",
+ renderer, "text",
+ HOLIDAY_NAME_COLUMN,
+ NULL);
+ column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
+ gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
+
+ /* alex column */
+ renderer = gtk_cell_renderer_toggle_new ();
+ g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
+ g_object_set_data (G_OBJECT (renderer), "column", (gint * )ALEX_COLUMN);
+
+ g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (item_toggled),
+ model);
+ col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ -1, "Alex",
+ renderer,
+ "active",
+ ALEX_COLUMN,
+ "visible",
+ VISIBLE_COLUMN,
+ "activatable",
+ WORLD_COLUMN, NULL);
+
+ column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
+ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
+ GTK_TREE_VIEW_COLUMN_FIXED);
+ gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
+ gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
+
+ /* havoc column */
+ renderer = gtk_cell_renderer_toggle_new ();
+ g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
+ g_object_set_data (G_OBJECT (renderer), "column", (gint * )HAVOC_COLUMN);
+
+ g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (item_toggled),
+ model);
+ col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ -1, "Havoc",
+ renderer,
+ "active",
+ HAVOC_COLUMN,
+ "visible",
+ VISIBLE_COLUMN,
+ NULL);
+
+ column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
+ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
+ GTK_TREE_VIEW_COLUMN_FIXED);
+ gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
+ gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
+
+ /* tim column */
+ renderer = gtk_cell_renderer_toggle_new ();
+ g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
+ g_object_set_data (G_OBJECT (renderer), "column", (gint * )TIM_COLUMN);
+
+ g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (item_toggled),
+ model);
+ col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ -1, "Tim",
+ renderer,
+ "active",
+ TIM_COLUMN,
+ "visible",
+ VISIBLE_COLUMN,
+ "activatable",
+ WORLD_COLUMN, NULL);
+
+ column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
+ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
+ GTK_TREE_VIEW_COLUMN_FIXED);
+ gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
+ gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
+
+ /* owen column */
+ renderer = gtk_cell_renderer_toggle_new ();
+ g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
+ g_object_set_data (G_OBJECT (renderer), "column", (gint * )OWEN_COLUMN);
+
+ g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (item_toggled),
+ model);
+ col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ -1, "Owen",
+ renderer,
+ "active",
+ OWEN_COLUMN,
+ "visible",
+ VISIBLE_COLUMN,
+ NULL);
+
+ column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
+ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
+ GTK_TREE_VIEW_COLUMN_FIXED);
+ gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
+ gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
+
+ /* dave column */
+ renderer = gtk_cell_renderer_toggle_new ();
+ g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
+ g_object_set_data (G_OBJECT (renderer), "column", (gint * )DAVE_COLUMN);
+
+ g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (item_toggled),
+ model);
+ col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
+ -1, "Dave",
+ renderer,
+ "active",
+ DAVE_COLUMN,
+ "visible",
+ VISIBLE_COLUMN,
+ NULL);
+
+ column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
+ gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
+ GTK_TREE_VIEW_COLUMN_FIXED);
+ gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
+ gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
+}
+
+GtkWidget *
+do_tree_store (void)
+{
+ if (!window)
+ {
+ GtkWidget *vbox;
+ GtkWidget *sw;
+ GtkWidget *treeview;
+ GtkTreeModel *model;
+
+ /* create window, etc */
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), "Card planning sheet");
+ g_signal_connect (G_OBJECT (window), "destroy",
+ G_CALLBACK (gtk_widget_destroyed), &window);
+
+ vbox = gtk_vbox_new (FALSE, 8);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+
+ gtk_box_pack_start (GTK_BOX (vbox),
+ gtk_label_new ("Jonathan's Holiday Card Planning Sheet"),
+ FALSE, FALSE, 0);
+
+ sw = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
+ GTK_SHADOW_ETCHED_IN);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+ gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
+
+ /* create model */
+ model = create_model ();
+
+ /* create tree view */
+ treeview = gtk_tree_view_new_with_model (model);
+ g_object_unref (G_OBJECT (model));
+ gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
+ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)),
+ GTK_SELECTION_MULTIPLE);
+
+ add_columns (GTK_TREE_VIEW (treeview));
+
+ gtk_container_add (GTK_CONTAINER (sw), treeview);
+
+ /* expand all rows after the treeview widget has been realized */
+ g_signal_connect (G_OBJECT (treeview), "realize",
+ G_CALLBACK (gtk_tree_view_expand_all), NULL);
+ gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
+ }
+
+ if (!GTK_WIDGET_VISIBLE (window))
+ gtk_widget_show_all (window);
+ else
+ {
+ gtk_widget_destroy (window);
+ window = NULL;
+ }
+
+ return window;
+}
+
+*)
diff --git a/packages/gtk2/examples/gtkglext/Makefile b/packages/gtk2/examples/gtkglext/Makefile
new file mode 100644
index 0000000000..67d07ac332
--- /dev/null
+++ b/packages/gtk2/examples/gtkglext/Makefile
@@ -0,0 +1,2094 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/01/26]
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
+BSDs = freebsd netbsd openbsd darwin
+UNIXs = linux $(BSDs) solaris qnx
+LIMIT83fs = go32v2 os2 emx watcom
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../../../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifneq ($(words $(FPC_COMPILERINFO)),5)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=gears
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_PROGRAMS+=gears
+endif
+override INSTALL_FPCPACKAGE=y
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+ifeq ($(OS_TARGET),darwin)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+else
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+AOUTEXT=.out
+SMARTEXT=.sl2
+STATICLIBPREFIX=
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),atari)
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),win32)
+ifeq ($(CROSSBINDIR),)
+ASNAME=asw
+LDNAME=ldw
+ARNAME=arw
+endif
+endif
+endif
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+PPAS=ppas$(SRCBATCHEXT)
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+export UPXPROG
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=rtl gtk2 opengl
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+REQUIRE_PACKAGES_OPENGL=1
+endif
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_RTL),)
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_RTL)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+endif
+ifdef REQUIRE_PACKAGES_X11
+PACKAGEDIR_X11:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /x11/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_X11),)
+ifneq ($(wildcard $(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)),)
+UNITDIR_X11=$(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)
+else
+UNITDIR_X11=$(PACKAGEDIR_X11)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_X11)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_X11) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_X11)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_X11=
+UNITDIR_X11:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /x11/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_X11),)
+UNITDIR_X11:=$(firstword $(UNITDIR_X11))
+else
+UNITDIR_X11=
+endif
+endif
+ifdef UNITDIR_X11
+override COMPILER_UNITDIR+=$(UNITDIR_X11)
+endif
+endif
+ifdef REQUIRE_PACKAGES_GTK2
+PACKAGEDIR_GTK2:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_GTK2),)
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)),)
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)
+else
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_GTK2)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_GTK2) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_GTK2)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_GTK2=
+UNITDIR_GTK2:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_GTK2),)
+UNITDIR_GTK2:=$(firstword $(UNITDIR_GTK2))
+else
+UNITDIR_GTK2=
+endif
+endif
+ifdef UNITDIR_GTK2
+override COMPILER_UNITDIR+=$(UNITDIR_GTK2)
+endif
+endif
+ifdef REQUIRE_PACKAGES_OPENGL
+PACKAGEDIR_OPENGL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /opengl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_OPENGL),)
+ifneq ($(wildcard $(PACKAGEDIR_OPENGL)/units/$(TARGETSUFFIX)),)
+UNITDIR_OPENGL=$(PACKAGEDIR_OPENGL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_OPENGL=$(PACKAGEDIR_OPENGL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_OPENGL)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_OPENGL) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_OPENGL)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_OPENGL=
+UNITDIR_OPENGL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /opengl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_OPENGL),)
+UNITDIR_OPENGL:=$(firstword $(UNITDIR_OPENGL))
+else
+UNITDIR_OPENGL=
+endif
+endif
+ifdef UNITDIR_OPENGL
+override COMPILER_UNITDIR+=$(UNITDIR_OPENGL)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(CPU_TARGET)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(CPU_TARGET)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+endif
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+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
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(CPU_TARGET),i386)
+FPCCPUOPT:=-OG2p3
+endif
+ifeq ($(CPU_TARGET),powerpc)
+FPCCPUOPT:=-O1r
+endif
+else
+FPCCPUOPT:=-O2
+endif
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
+endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(FPC) $(FPCOPT)
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+endif
+.PHONY: fpc_exes
+ifndef CROSSINSTALL
+ifneq ($(TARGET_PROGRAMS),)
+override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
+override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
+override ALLTARGET+=fpc_exes
+override INSTALLEXEFILES+=$(EXEFILES)
+override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+ifeq ($(OS_TARGET),os2)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+ifeq ($(OS_TARGET),emx)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+endif
+endif
+fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
+$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
+ @$(ECHOREDIR) Compiled > $(FPCMADE)
+fpc_all: $(FPCMADE)
+fpc_smart:
+ $(MAKE) all LINKSMART=1 CREATESMART=1
+fpc_debug:
+ $(MAKE) all DEBUG=1
+fpc_release:
+ $(MAKE) all RELEASE=1
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
+$(COMPILER_UNITTARGETDIR):
+ $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+$(COMPILER_TARGETDIR):
+ $(MKDIRTREE) $(COMPILER_TARGETDIR)
+%$(PPUEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(PPUEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.lpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.dpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%.res: %.rc
+ windres -i $< -o $@
+vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.inc $(COMPILER_INCLUDEDIR)
+vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
+vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
+.PHONY: fpc_shared
+override INSTALLTARGET+=fpc_shared_install
+ifndef SHARED_LIBVERSION
+SHARED_LIBVERSION=$(FPC_VERSION)
+endif
+ifndef SHARED_LIBNAME
+SHARED_LIBNAME=$(PACKAGE_NAME)
+endif
+ifndef SHARED_FULLNAME
+SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
+endif
+ifndef SHARED_LIBUNITS
+SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
+override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
+endif
+fpc_shared:
+ifdef HASSHAREDLIB
+ $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
+ifneq ($(SHARED_BUILD),n)
+ $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
+endif
+else
+ @$(ECHO) Shared Libraries not supported
+endif
+fpc_shared_install:
+ifneq ($(SHARED_BUILD),n)
+ifneq ($(SHARED_LIBUNITS),)
+ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
+ $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
+endif
+endif
+endif
+.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
+ifdef INSTALL_UNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
+endif
+ifdef INSTALL_BUILDUNIT
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
+endif
+ifdef INSTALLPPUFILES
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+ifneq ($(UNITTARGETDIRPREFIX),)
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
+override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
+endif
+override INSTALL_CREATEPACKAGEFPC=1
+endif
+ifdef INSTALLEXEFILES
+ifneq ($(TARGETDIRPREFIX),)
+override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
+endif
+endif
+fpc_install: all $(INSTALLTARGET)
+ifdef INSTALLEXEFILES
+ $(MKDIR) $(INSTALL_BINDIR)
+ifdef UPXPROG
+ -$(UPXPROG) $(INSTALLEXEFILES)
+endif
+ $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
+endif
+ifdef INSTALL_CREATEPACKAGEFPC
+ifdef FPCMAKE
+ifdef PACKAGE_VERSION
+ifneq ($(wildcard Makefile.fpc),)
+ $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
+endif
+endif
+endif
+ifdef INSTALLPPUFILES
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+ $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
+endif
+ifneq ($(wildcard $(LIB_FULLNAME)),)
+ $(MKDIR) $(INSTALL_LIBDIR)
+ $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
+ifdef inUnix
+ ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
+endif
+endif
+endif
+ifdef INSTALL_FILES
+ $(MKDIR) $(INSTALL_DATADIR)
+ $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
+endif
+fpc_sourceinstall: distclean
+ $(MKDIR) $(INSTALL_SOURCEDIR)
+ $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
+fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
+ifdef HASEXAMPLES
+ $(MKDIR) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef EXAMPLESOURCEFILES
+ $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
+endif
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
+override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+ -$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+ -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+ -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ -$(DELTREE) units
+ -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+ -$(DEL) *.o *.ppu *.a
+endif
+ -$(DELTREE) *$(SMARTEXT)
+ -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *_ppas$(BATCHEXT)
+ifdef AOUTEXT
+ -$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+ -$(DEL) *$(DEBUGSYMEXT)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+ @$(ECHO)
+ @$(ECHO) == Package info ==
+ @$(ECHO) Package Name..... $(PACKAGE_NAME)
+ @$(ECHO) Package Version.. $(PACKAGE_VERSION)
+ @$(ECHO)
+ @$(ECHO) == Configuration info ==
+ @$(ECHO)
+ @$(ECHO) FPC.......... $(FPC)
+ @$(ECHO) FPC Version.. $(FPC_VERSION)
+ @$(ECHO) Source CPU... $(CPU_SOURCE)
+ @$(ECHO) Target CPU... $(CPU_TARGET)
+ @$(ECHO) Source OS.... $(OS_SOURCE)
+ @$(ECHO) Target OS.... $(OS_TARGET)
+ @$(ECHO) Full Source.. $(FULL_SOURCE)
+ @$(ECHO) Full Target.. $(FULL_TARGET)
+ @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
+ @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
+ @$(ECHO)
+ @$(ECHO) == Directory info ==
+ @$(ECHO)
+ @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
+ @$(ECHO)
+ @$(ECHO) Basedir......... $(BASEDIR)
+ @$(ECHO) FPCDir.......... $(FPCDIR)
+ @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
+ @$(ECHO) UnitsDir........ $(UNITSDIR)
+ @$(ECHO) PackagesDir..... $(PACKAGESDIR)
+ @$(ECHO)
+ @$(ECHO) GCC library..... $(GCCLIBDIR)
+ @$(ECHO) Other library... $(OTHERLIBDIR)
+ @$(ECHO)
+ @$(ECHO) == Tools info ==
+ @$(ECHO)
+ @$(ECHO) As........ $(AS)
+ @$(ECHO) Ld........ $(LD)
+ @$(ECHO) Ar........ $(AR)
+ @$(ECHO) Rc........ $(RC)
+ @$(ECHO)
+ @$(ECHO) Mv........ $(MVPROG)
+ @$(ECHO) Cp........ $(CPPROG)
+ @$(ECHO) Rm........ $(RMPROG)
+ @$(ECHO) GInstall.. $(GINSTALL)
+ @$(ECHO) Echo...... $(ECHO)
+ @$(ECHO) Shell..... $(SHELL)
+ @$(ECHO) Date...... $(DATE)
+ @$(ECHO) FPCMake... $(FPCMAKE)
+ @$(ECHO) PPUMove... $(PPUMOVE)
+ @$(ECHO) Upx....... $(UPXPROG)
+ @$(ECHO) Zip....... $(ZIPPROG)
+ @$(ECHO)
+ @$(ECHO) == Object info ==
+ @$(ECHO)
+ @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
+ @$(ECHO) Target Units.......... $(TARGET_UNITS)
+ @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
+ @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
+ @$(ECHO) Target Dirs........... $(TARGET_DIRS)
+ @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
+ @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+ @$(ECHO)
+ @$(ECHO) Clean Units......... $(CLEAN_UNITS)
+ @$(ECHO) Clean Files......... $(CLEAN_FILES)
+ @$(ECHO)
+ @$(ECHO) Install Units....... $(INSTALL_UNITS)
+ @$(ECHO) Install Files....... $(INSTALL_FILES)
+ @$(ECHO)
+ @$(ECHO) == Install info ==
+ @$(ECHO)
+ @$(ECHO) DateStr.............. $(DATESTR)
+ @$(ECHO) ZipName.............. $(ZIPNAME)
+ @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
+ @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+ @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
+ @$(ECHO) FullZipName.......... $(FULLZIPNAME)
+ @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
+ @$(ECHO)
+ @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
+ @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
+ @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
+ @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
+ @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
+ @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
+ @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
+ @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
+ @$(ECHO)
+ @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
+ @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
+ @$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+ fpc_makefile_dirs
+fpc_makefile:
+ $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+all: fpc_all
+debug: fpc_debug
+smart: fpc_smart
+release: fpc_release
+units: fpc_units
+examples:
+shared: fpc_shared
+install: fpc_install
+sourceinstall: fpc_sourceinstall
+exampleinstall: fpc_exampleinstall
+distinstall:
+zipinstall:
+zipsourceinstall:
+zipexampleinstall:
+zipdistinstall:
+clean: fpc_clean
+distclean: fpc_distclean
+cleanall: fpc_cleanall
+info: fpc_info
+makefiles: fpc_makefiles
+.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/gtkglext/Makefile.fpc b/packages/gtk2/examples/gtkglext/Makefile.fpc
new file mode 100644
index 0000000000..ce3de27709
--- /dev/null
+++ b/packages/gtk2/examples/gtkglext/Makefile.fpc
@@ -0,0 +1,18 @@
+#
+# Makefile.fpc for Free Pascal GTK 2.x.y Examples
+#
+
+[target]
+programs=gears
+
+[require]
+packages=gtk2 opengl
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../../../..
+
+[rules]
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/gtkglext/gears.pas b/packages/gtk2/examples/gtkglext/gears.pas
new file mode 100644
index 0000000000..7381c599fc
--- /dev/null
+++ b/packages/gtk2/examples/gtkglext/gears.pas
@@ -0,0 +1,549 @@
+{ 3-D gear wheels. This program is in the public domain.
+ Brian Paul
+ Conversion to GLUT by Mark J. Kilgard
+ Conversion to GtkGLExt by Naofumi Yasufuku
+ Conversion to Pascal binding of GtkGLExt by Michalis Kamburelis
+}
+
+{$mode delphi}
+
+uses Glib2, Gtk2, Gdk2, GdkGLExt, GtkGLExt, gl;
+
+{*
+ * Draw a gear wheel. You'll probably want to call this function when
+ * building a display list since we do a lot of trig here.
+ *
+ * Input: inner_radius - radius of hole at center
+ * outer_radius - radius at center of teeth
+ * width - width of gear
+ * teeth - number of teeth
+ * tooth_depth - depth of tooth
+ *}
+
+procedure gear(
+ inner_radius, outer_radius, width: GLfloat;
+ teeth: GLint;
+ tooth_depth: GLfloat);
+var
+ i: GLint;
+ r0, r1, r2: GLfloat;
+ angle, da: GLfloat;
+ u, v, len: GLfloat;
+begin
+ r0 := inner_radius;
+ r1 := outer_radius - tooth_depth / 2.0;
+ r2 := outer_radius + tooth_depth / 2.0;
+
+ da := 2.0 * Pi / teeth / 4.0;
+
+ glShadeModel(GL_FLAT);
+
+ glNormal3f(0.0, 0.0, 1.0);
+
+ {* draw front face *}
+ glBegin(GL_QUAD_STRIP);
+ for i := 0 to teeth do
+ begin
+ angle := i * 2.0 * Pi / teeth;
+ glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
+ glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
+ if i < teeth then
+ begin
+ glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
+ glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5);
+ end;
+ end;
+ glEnd();
+
+ {* draw front sides of teeth *}
+ glBegin(GL_QUADS);
+ da := 2.0 * Pi / teeth / 4.0;
+ for i := 0 to teeth - 1 do
+ begin
+ angle := i * 2.0 * Pi / teeth;
+
+ glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
+ glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5);
+ glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5);
+ glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5);
+ end;
+ glEnd();
+
+ glNormal3f(0.0, 0.0, -1.0);
+
+ {* draw back face *}
+ glBegin(GL_QUAD_STRIP);
+ for i := 0 to teeth do
+ begin
+ angle := i * 2.0 * Pi / teeth;
+ glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
+ glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
+ if i < teeth then
+ begin
+ glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5);
+ glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
+ end;
+ end;
+ glEnd();
+
+ {* draw back sides of teeth *}
+ glBegin(GL_QUADS);
+ da := 2.0 * Pi / teeth / 4.0;
+ for i := 0 to teeth - 1 do
+ begin
+ angle := i * 2.0 * Pi / teeth;
+
+ glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5);
+ glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5);
+ glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5);
+ glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
+ end;
+ glEnd();
+
+ {* draw outward faces of teeth *}
+ glBegin(GL_QUAD_STRIP);
+ for i := 0 to teeth - 1 do
+ begin
+ angle := i * 2.0 * Pi / teeth;
+
+ glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
+ glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
+ u := r2 * cos(angle + da) - r1 * cos(angle);
+ v := r2 * sin(angle + da) - r1 * sin(angle);
+ len := sqrt(u * u + v * v);
+ u := u / len;
+ v := v / len;
+ glNormal3f(v, -u, 0.0);
+ glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5);
+ glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5);
+ glNormal3f(cos(angle), sin(angle), 0.0);
+ glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5);
+ glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5);
+ u := r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da);
+ v := r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da);
+ glNormal3f(v, -u, 0.0);
+ glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5);
+ glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5);
+ glNormal3f(cos(angle), sin(angle), 0.0);
+ end;
+
+ glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5);
+ glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5);
+
+ glEnd();
+
+ glShadeModel(GL_SMOOTH);
+
+ {* draw inside radius cylinder *}
+ glBegin(GL_QUAD_STRIP);
+ for i := 0 to teeth do
+ begin
+ angle := i * 2.0 * Pi / teeth;
+ glNormal3f(-cos(angle), -sin(angle), 0.0);
+ glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
+ glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
+ end;
+ glEnd();
+
+end;
+
+var
+ view_rotx: GLfloat = 20.0;
+ view_roty: GLfloat = 30.0;
+ view_rotz: GLfloat = 0.0;
+ gear1, gear2, gear3: GLint;
+ angle: GLfloat = 0.0;
+
+ timer: PGTimer = nil;
+ frames: gint = 0;
+
+ is_sync: boolean = true;
+
+function draw(
+ widget: PGtkWidget;
+ event: PGdkEventExpose;
+ data: gpointer): gboolean; cdecl;
+var
+ seconds: gdouble;
+ fps: gdouble;
+ glcontext: PGdkGLContext;
+ gldrawable: PGdkGLDrawable;
+begin
+ glcontext := gtk_widget_get_gl_context (widget);
+ gldrawable := gtk_widget_get_gl_drawable (widget);
+
+ {*** OpenGL BEGIN ***}
+ if not gdk_gl_drawable_gl_begin (gldrawable, glcontext) then
+ Exit(false);
+
+ glClear (GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
+
+ glPushMatrix ();
+ glRotatef (view_rotx, 1.0, 0.0, 0.0);
+ glRotatef (view_roty, 0.0, 1.0, 0.0);
+ glRotatef (view_rotz, 0.0, 0.0, 1.0);
+
+ glPushMatrix ();
+ glTranslatef (-3.0, -2.0, 0.0);
+ glRotatef (angle, 0.0, 0.0, 1.0);
+ glCallList (gear1);
+ glPopMatrix ();
+
+ glPushMatrix ();
+ glTranslatef (3.1, -2.0, 0.0);
+ glRotatef (-2.0 * angle - 9.0, 0.0, 0.0, 1.0);
+ glCallList (gear2);
+ glPopMatrix ();
+
+ glPushMatrix ();
+ glTranslatef (-3.1, 4.2, 0.0);
+ glRotatef (-2.0 * angle - 25.0, 0.0, 0.0, 1.0);
+ glCallList (gear3);
+ glPopMatrix ();
+
+ glPopMatrix ();
+
+ if gdk_gl_drawable_is_double_buffered (gldrawable) then
+ gdk_gl_drawable_swap_buffers (gldrawable) else
+ glFlush ();
+
+ gdk_gl_drawable_gl_end (gldrawable);
+ {*** OpenGL END ***}
+
+ Inc(frames);
+
+ seconds := g_timer_elapsed (timer, NULL);
+ if seconds >= 5.0 then
+ begin
+ fps := frames / seconds;
+ g_print ('%d frames in %6.3f seconds = %6.3f FPS' + LineEnding, [frames, seconds, fps]);
+ g_timer_reset (timer);
+ frames := 0;
+ end;
+
+ Result := true;
+end;
+
+{* new window size or exposure *}
+function reshape (
+ widget: PGtkWidget;
+ event: PGdkEventConfigure;
+ data: gpointer): gboolean; cdecl;
+var
+ glcontext: PGdkGLContext;
+ gldrawable: PGdkGLDrawable;
+ h: GLfloat;
+begin
+ glcontext := gtk_widget_get_gl_context (widget);
+ gldrawable := gtk_widget_get_gl_drawable (widget);
+
+ h := widget.allocation.height / widget.allocation.width;
+
+ {*** OpenGL BEGIN ***}
+ if not gdk_gl_drawable_gl_begin (gldrawable, glcontext) then
+ Exit(false);
+
+ glViewport (0, 0, widget.allocation.width, widget.allocation.height);
+ glMatrixMode (GL_PROJECTION);
+ glLoadIdentity ();
+ glFrustum (-1.0, 1.0, -h, h, 5.0, 60.0);
+ glMatrixMode (GL_MODELVIEW);
+ glLoadIdentity ();
+ glTranslatef (0.0, 0.0, -40.0);
+
+ gdk_gl_drawable_gl_end (gldrawable);
+ {*** OpenGL END ***}
+
+ Result := true;
+end;
+
+procedure init(
+ widget: PGtkWidget;
+ data: gpointer); cdecl;
+const
+ pos: array[0..3] of GLfloat = (5.0, 5.0, 10.0, 0.0);
+ red: array[0..3] of GLfloat = (0.8, 0.1, 0.0, 1.0);
+ green: array[0..3] of GLfloat = (0.0, 0.8, 0.2, 1.0);
+ blue: array[0..3] of GLfloat = (0.2, 0.2, 1.0, 1.0);
+var
+ glcontext: PGdkGLContext;
+ gldrawable: PGdkGLDrawable;
+begin
+ glcontext := gtk_widget_get_gl_context (widget);
+ gldrawable := gtk_widget_get_gl_drawable (widget);
+
+ {*** OpenGL BEGIN ***}
+ if not gdk_gl_drawable_gl_begin (gldrawable, glcontext) then
+ Exit;
+
+ glLightfv (GL_LIGHT0, GL_POSITION, pos);
+ glEnable (GL_CULL_FACE);
+ glEnable (GL_LIGHTING);
+ glEnable (GL_LIGHT0);
+ glEnable (GL_DEPTH_TEST);
+
+ {* make the gears *}
+ gear1 := glGenLists (1);
+ glNewList (gear1, GL_COMPILE);
+ glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
+ gear (1.0, 4.0, 1.0, 20, 0.7);
+ glEndList ();
+
+ gear2 := glGenLists (1);
+ glNewList (gear2, GL_COMPILE);
+ glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);
+ gear (0.5, 2.0, 2.0, 10, 0.7);
+ glEndList ();
+
+ gear3 := glGenLists (1);
+ glNewList (gear3, GL_COMPILE);
+ glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);
+ gear (1.3, 2.0, 0.5, 10, 0.7);
+ glEndList ();
+
+ glEnable (GL_NORMALIZE);
+
+ g_print (LineEnding);
+ g_print ('GL_RENDERER = %s' + LineEnding, [glGetString (GL_RENDERER)]);
+ g_print ('GL_VERSION = %s' + LineEnding, [glGetString (GL_VERSION)]);
+ g_print ('GL_VENDOR = %s' + LineEnding, [glGetString (GL_VENDOR)]);
+ g_print ('GL_EXTENSIONS = %s' + LineEnding, [glGetString (GL_EXTENSIONS)]);
+ g_print (LineEnding);
+
+ gdk_gl_drawable_gl_end (gldrawable);
+ {*** OpenGL END ***}
+
+ {* create timer *}
+ if timer = nil then
+ timer := g_timer_new ();
+
+ g_timer_start (timer);
+end;
+
+function idle (widget: PGtkWidget): gboolean; cdecl;
+begin
+ angle := angle + 2.0;
+
+ {* Invalidate the whole window. *}
+ gdk_window_invalidate_rect (widget.window, @widget.allocation, false);
+
+ {* Update synchronously (fast). *}
+ if is_sync then
+ gdk_window_process_updates (widget.window, false);
+
+ Result := true;
+end;
+
+var
+ idle_id: guint = 0;
+
+procedure idle_add (widget: PGtkWidget); cdecl;
+begin
+ if idle_id = 0 then
+ begin
+ idle_id := g_idle_add_full (GDK_PRIORITY_REDRAW,
+ TGSourceFunc(@idle),
+ widget,
+ NULL);
+ end;
+end;
+
+procedure idle_remove (widget: PGtkWidget); cdecl;
+begin
+ if idle_id <> 0 then
+ begin
+ g_source_remove (idle_id);
+ idle_id := 0;
+ end;
+end;
+
+function map (
+ widget: PGtkWidget;
+ event: PGdkEventAny;
+ data: gpointer): gboolean; cdecl;
+begin
+ idle_add (widget);
+
+ Result := true;
+end;
+
+function unmap (
+ widget: PGtkWidget;
+ event: PGdkEventAny;
+ data: gpointer): gboolean; cdecl;
+begin
+ idle_remove (widget);
+
+ Result := true;
+end;
+
+function visible (
+ widget: PGtkWidget;
+ event: PGdkEventVisibility;
+ data: gpointer): gboolean; cdecl;
+begin
+ if event.state = GDK_VISIBILITY_FULLY_OBSCURED then
+ idle_remove (widget) else
+ idle_add (widget);
+
+ Result := true;
+end;
+
+{* change view angle, exit upon ESC *}
+function key (
+ widget: PGtkWidget;
+ event: PGdkEventKey;
+ data: gpointer): gboolean; cdecl;
+begin
+ case event.keyval of
+ GDK_KEY_z : view_rotz := view_rotz + 5.0;
+ GDK_KEY_Capital_Z : view_rotz := view_rotz - 5.0;
+ GDK_KEY_Up : view_roty := view_roty + 5.0;
+ GDK_KEY_Down : view_roty := view_roty - 5.0;
+ GDK_KEY_Left : view_rotx := view_rotx + 5.0;
+ GDK_KEY_Right : view_rotx := view_rotx - 5.0;
+ GDK_KEY_Escape : gtk_main_quit ();
+ else Exit(false);
+ end;
+
+ gdk_window_invalidate_rect (widget.window, @widget.allocation, FALSE);
+
+ Result := true;
+end;
+
+var
+ glconfig: PGdkGLConfig;
+ window: PGtkWidget;
+ vbox: PGtkWidget;
+ drawing_area: PGtkWidget;
+ button: PGtkWidget;
+ i: Integer;
+begin
+
+ {*
+ * Init GTK.
+ *}
+
+ gtk_init (@argc, @argv);
+
+ {*
+ * Init GtkGLExt.
+ *}
+
+ gtk_gl_init (@argc, @argv);
+
+ {*
+ * Command line options.
+ *}
+
+ for i := 1 to ParamCount do
+ if ParamStr(i) = '--async' then
+ is_sync := FALSE;
+
+ {*
+ * Configure OpenGL-capable visual.
+ *}
+
+ {* Try double-buffered visual *}
+ glconfig := gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB or
+ GDK_GL_MODE_DEPTH or
+ GDK_GL_MODE_DOUBLE);
+ if glconfig = nil then
+ begin
+ g_print ('*** Cannot find the double-buffered visual.' +LineEnding);
+ g_print ('*** Trying single-buffered visual.' +LineEnding);
+
+ {* Try single-buffered visual *}
+ glconfig := gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB or
+ GDK_GL_MODE_DEPTH);
+ if glconfig = nil then
+ begin
+ g_print ('*** No appropriate OpenGL-capable visual found.' +LineEnding);
+ Halt(1);
+ end;
+ end;
+
+ {*
+ * Top-level window.
+ *}
+
+ window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), 'gears');
+
+ {* Get automatically redrawn if any of their children changed allocation. *}
+ gtk_container_set_reallocate_redraws (GTK_CONTAINER (window), TRUE);
+
+ g_signal_connect (G_OBJECT (window), 'delete_event',
+ G_CALLBACK (@gtk_main_quit), NULL);
+
+ {*
+ * VBox.
+ *}
+
+ vbox := gtk_vbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_widget_show (vbox);
+
+ {*
+ * Drawing area for drawing OpenGL scene.
+ *}
+
+ drawing_area := gtk_drawing_area_new ();
+ gtk_widget_set_size_request (drawing_area, 300, 300);
+
+ {* Set OpenGL-capability to the widget. *}
+ gtk_widget_set_gl_capability (drawing_area,
+ glconfig,
+ NULL,
+ TRUE,
+ GDK_GL_RGBA_TYPE);
+
+ gtk_widget_add_events (drawing_area,
+ GDK_VISIBILITY_NOTIFY_MASK);
+
+ g_signal_connect_after (G_OBJECT (drawing_area), 'realize',
+ G_CALLBACK (@init), NULL);
+ g_signal_connect (G_OBJECT (drawing_area), 'configure_event',
+ G_CALLBACK (@reshape), NULL);
+ g_signal_connect (G_OBJECT (drawing_area), 'expose_event',
+ G_CALLBACK (@draw), NULL);
+ g_signal_connect (G_OBJECT (drawing_area), 'map_event',
+ G_CALLBACK (@map), NULL);
+ g_signal_connect (G_OBJECT (drawing_area), 'unmap_event',
+ G_CALLBACK (@unmap), NULL);
+ g_signal_connect (G_OBJECT (drawing_area), 'visibility_notify_event',
+ G_CALLBACK (@visible), NULL);
+
+ g_signal_connect_swapped (G_OBJECT (window), 'key_press_event',
+ G_CALLBACK (@key), drawing_area);
+
+ gtk_box_pack_start (GTK_BOX (vbox), drawing_area, TRUE, TRUE, 0);
+
+ gtk_widget_show (drawing_area);
+
+ {*
+ * Simple quit button.
+ *}
+
+ button := gtk_button_new_with_label ('Quit');
+
+ g_signal_connect (G_OBJECT (button), 'clicked',
+ G_CALLBACK (@gtk_main_quit), NULL);
+
+ gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+
+ gtk_widget_show (button);
+
+ {*
+ * Show window.
+ *}
+
+ gtk_widget_show (window);
+
+ {*
+ * Main loop.
+ *}
+
+ gtk_main ();
+
+end.
diff --git a/packages/gtk2/examples/helloworld/Makefile b/packages/gtk2/examples/helloworld/Makefile
new file mode 100644
index 0000000000..ea43297126
--- /dev/null
+++ b/packages/gtk2/examples/helloworld/Makefile
@@ -0,0 +1,2015 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/01/26]
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
+BSDs = freebsd netbsd openbsd darwin
+UNIXs = linux $(BSDs) solaris qnx
+LIMIT83fs = go32v2 os2 emx watcom
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../../../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifneq ($(words $(FPC_COMPILERINFO)),5)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=helloworld
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_PROGRAMS+=helloworld
+endif
+override INSTALL_FPCPACKAGE=y
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+ifeq ($(OS_TARGET),darwin)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+else
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+AOUTEXT=.out
+SMARTEXT=.sl2
+STATICLIBPREFIX=
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),atari)
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),win32)
+ifeq ($(CROSSBINDIR),)
+ASNAME=asw
+LDNAME=ldw
+ARNAME=arw
+endif
+endif
+endif
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+PPAS=ppas$(SRCBATCHEXT)
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+export UPXPROG
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=rtl gtk2
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_RTL),)
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_RTL)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+endif
+ifdef REQUIRE_PACKAGES_X11
+PACKAGEDIR_X11:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /x11/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_X11),)
+ifneq ($(wildcard $(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)),)
+UNITDIR_X11=$(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)
+else
+UNITDIR_X11=$(PACKAGEDIR_X11)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_X11)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_X11) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_X11)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_X11=
+UNITDIR_X11:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /x11/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_X11),)
+UNITDIR_X11:=$(firstword $(UNITDIR_X11))
+else
+UNITDIR_X11=
+endif
+endif
+ifdef UNITDIR_X11
+override COMPILER_UNITDIR+=$(UNITDIR_X11)
+endif
+endif
+ifdef REQUIRE_PACKAGES_GTK2
+PACKAGEDIR_GTK2:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_GTK2),)
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)),)
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)
+else
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_GTK2)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_GTK2) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_GTK2)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_GTK2=
+UNITDIR_GTK2:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_GTK2),)
+UNITDIR_GTK2:=$(firstword $(UNITDIR_GTK2))
+else
+UNITDIR_GTK2=
+endif
+endif
+ifdef UNITDIR_GTK2
+override COMPILER_UNITDIR+=$(UNITDIR_GTK2)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(CPU_TARGET)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(CPU_TARGET)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+endif
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+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
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(CPU_TARGET),i386)
+FPCCPUOPT:=-OG2p3
+endif
+ifeq ($(CPU_TARGET),powerpc)
+FPCCPUOPT:=-O1r
+endif
+else
+FPCCPUOPT:=-O2
+endif
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
+endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(FPC) $(FPCOPT)
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+endif
+.PHONY: fpc_exes
+ifndef CROSSINSTALL
+ifneq ($(TARGET_PROGRAMS),)
+override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
+override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
+override ALLTARGET+=fpc_exes
+override INSTALLEXEFILES+=$(EXEFILES)
+override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+ifeq ($(OS_TARGET),os2)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+ifeq ($(OS_TARGET),emx)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+endif
+endif
+fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
+$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
+ @$(ECHOREDIR) Compiled > $(FPCMADE)
+fpc_all: $(FPCMADE)
+fpc_smart:
+ $(MAKE) all LINKSMART=1 CREATESMART=1
+fpc_debug:
+ $(MAKE) all DEBUG=1
+fpc_release:
+ $(MAKE) all RELEASE=1
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
+$(COMPILER_UNITTARGETDIR):
+ $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+$(COMPILER_TARGETDIR):
+ $(MKDIRTREE) $(COMPILER_TARGETDIR)
+%$(PPUEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(PPUEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.lpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.dpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%.res: %.rc
+ windres -i $< -o $@
+vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.inc $(COMPILER_INCLUDEDIR)
+vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
+vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
+.PHONY: fpc_shared
+override INSTALLTARGET+=fpc_shared_install
+ifndef SHARED_LIBVERSION
+SHARED_LIBVERSION=$(FPC_VERSION)
+endif
+ifndef SHARED_LIBNAME
+SHARED_LIBNAME=$(PACKAGE_NAME)
+endif
+ifndef SHARED_FULLNAME
+SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
+endif
+ifndef SHARED_LIBUNITS
+SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
+override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
+endif
+fpc_shared:
+ifdef HASSHAREDLIB
+ $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
+ifneq ($(SHARED_BUILD),n)
+ $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
+endif
+else
+ @$(ECHO) Shared Libraries not supported
+endif
+fpc_shared_install:
+ifneq ($(SHARED_BUILD),n)
+ifneq ($(SHARED_LIBUNITS),)
+ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
+ $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
+endif
+endif
+endif
+.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
+ifdef INSTALL_UNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
+endif
+ifdef INSTALL_BUILDUNIT
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
+endif
+ifdef INSTALLPPUFILES
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+ifneq ($(UNITTARGETDIRPREFIX),)
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
+override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
+endif
+override INSTALL_CREATEPACKAGEFPC=1
+endif
+ifdef INSTALLEXEFILES
+ifneq ($(TARGETDIRPREFIX),)
+override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
+endif
+endif
+fpc_install: all $(INSTALLTARGET)
+ifdef INSTALLEXEFILES
+ $(MKDIR) $(INSTALL_BINDIR)
+ifdef UPXPROG
+ -$(UPXPROG) $(INSTALLEXEFILES)
+endif
+ $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
+endif
+ifdef INSTALL_CREATEPACKAGEFPC
+ifdef FPCMAKE
+ifdef PACKAGE_VERSION
+ifneq ($(wildcard Makefile.fpc),)
+ $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
+endif
+endif
+endif
+ifdef INSTALLPPUFILES
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+ $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
+endif
+ifneq ($(wildcard $(LIB_FULLNAME)),)
+ $(MKDIR) $(INSTALL_LIBDIR)
+ $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
+ifdef inUnix
+ ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
+endif
+endif
+endif
+ifdef INSTALL_FILES
+ $(MKDIR) $(INSTALL_DATADIR)
+ $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
+endif
+fpc_sourceinstall: distclean
+ $(MKDIR) $(INSTALL_SOURCEDIR)
+ $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
+fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
+ifdef HASEXAMPLES
+ $(MKDIR) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef EXAMPLESOURCEFILES
+ $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
+endif
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
+override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+ -$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+ -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+ -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ -$(DELTREE) units
+ -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+ -$(DEL) *.o *.ppu *.a
+endif
+ -$(DELTREE) *$(SMARTEXT)
+ -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *_ppas$(BATCHEXT)
+ifdef AOUTEXT
+ -$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+ -$(DEL) *$(DEBUGSYMEXT)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+ @$(ECHO)
+ @$(ECHO) == Package info ==
+ @$(ECHO) Package Name..... $(PACKAGE_NAME)
+ @$(ECHO) Package Version.. $(PACKAGE_VERSION)
+ @$(ECHO)
+ @$(ECHO) == Configuration info ==
+ @$(ECHO)
+ @$(ECHO) FPC.......... $(FPC)
+ @$(ECHO) FPC Version.. $(FPC_VERSION)
+ @$(ECHO) Source CPU... $(CPU_SOURCE)
+ @$(ECHO) Target CPU... $(CPU_TARGET)
+ @$(ECHO) Source OS.... $(OS_SOURCE)
+ @$(ECHO) Target OS.... $(OS_TARGET)
+ @$(ECHO) Full Source.. $(FULL_SOURCE)
+ @$(ECHO) Full Target.. $(FULL_TARGET)
+ @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
+ @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
+ @$(ECHO)
+ @$(ECHO) == Directory info ==
+ @$(ECHO)
+ @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
+ @$(ECHO)
+ @$(ECHO) Basedir......... $(BASEDIR)
+ @$(ECHO) FPCDir.......... $(FPCDIR)
+ @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
+ @$(ECHO) UnitsDir........ $(UNITSDIR)
+ @$(ECHO) PackagesDir..... $(PACKAGESDIR)
+ @$(ECHO)
+ @$(ECHO) GCC library..... $(GCCLIBDIR)
+ @$(ECHO) Other library... $(OTHERLIBDIR)
+ @$(ECHO)
+ @$(ECHO) == Tools info ==
+ @$(ECHO)
+ @$(ECHO) As........ $(AS)
+ @$(ECHO) Ld........ $(LD)
+ @$(ECHO) Ar........ $(AR)
+ @$(ECHO) Rc........ $(RC)
+ @$(ECHO)
+ @$(ECHO) Mv........ $(MVPROG)
+ @$(ECHO) Cp........ $(CPPROG)
+ @$(ECHO) Rm........ $(RMPROG)
+ @$(ECHO) GInstall.. $(GINSTALL)
+ @$(ECHO) Echo...... $(ECHO)
+ @$(ECHO) Shell..... $(SHELL)
+ @$(ECHO) Date...... $(DATE)
+ @$(ECHO) FPCMake... $(FPCMAKE)
+ @$(ECHO) PPUMove... $(PPUMOVE)
+ @$(ECHO) Upx....... $(UPXPROG)
+ @$(ECHO) Zip....... $(ZIPPROG)
+ @$(ECHO)
+ @$(ECHO) == Object info ==
+ @$(ECHO)
+ @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
+ @$(ECHO) Target Units.......... $(TARGET_UNITS)
+ @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
+ @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
+ @$(ECHO) Target Dirs........... $(TARGET_DIRS)
+ @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
+ @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+ @$(ECHO)
+ @$(ECHO) Clean Units......... $(CLEAN_UNITS)
+ @$(ECHO) Clean Files......... $(CLEAN_FILES)
+ @$(ECHO)
+ @$(ECHO) Install Units....... $(INSTALL_UNITS)
+ @$(ECHO) Install Files....... $(INSTALL_FILES)
+ @$(ECHO)
+ @$(ECHO) == Install info ==
+ @$(ECHO)
+ @$(ECHO) DateStr.............. $(DATESTR)
+ @$(ECHO) ZipName.............. $(ZIPNAME)
+ @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
+ @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+ @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
+ @$(ECHO) FullZipName.......... $(FULLZIPNAME)
+ @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
+ @$(ECHO)
+ @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
+ @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
+ @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
+ @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
+ @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
+ @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
+ @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
+ @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
+ @$(ECHO)
+ @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
+ @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
+ @$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+ fpc_makefile_dirs
+fpc_makefile:
+ $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+all: fpc_all
+debug: fpc_debug
+smart: fpc_smart
+release: fpc_release
+units: fpc_units
+examples:
+shared: fpc_shared
+install: fpc_install
+sourceinstall: fpc_sourceinstall
+exampleinstall: fpc_exampleinstall
+distinstall:
+zipinstall:
+zipsourceinstall:
+zipexampleinstall:
+zipdistinstall:
+clean: fpc_clean
+distclean: fpc_distclean
+cleanall: fpc_cleanall
+info: fpc_info
+makefiles: fpc_makefiles
+.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/helloworld/Makefile.fpc b/packages/gtk2/examples/helloworld/Makefile.fpc
new file mode 100644
index 0000000000..2a960a8a39
--- /dev/null
+++ b/packages/gtk2/examples/helloworld/Makefile.fpc
@@ -0,0 +1,18 @@
+#
+# Makefile.fpc for Free Pascal GTK 2.x.y Examples
+#
+
+[target]
+programs=helloworld
+
+[require]
+packages=gtk2
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../../../..
+
+[rules]
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/helloworld/helloworld.pas b/packages/gtk2/examples/helloworld/helloworld.pas
new file mode 100644
index 0000000000..b929707fa1
--- /dev/null
+++ b/packages/gtk2/examples/helloworld/helloworld.pas
@@ -0,0 +1,95 @@
+program HelloWorld;
+
+{$mode objfpc}{$H+}
+
+uses
+ Glib2, Gdk2, Gtk2;
+
+(* This is a callback function. The data arguments are ignored
+ * in this example. More on callbacks below. *)
+procedure hello(Widget: PGtkWidget; Data: gpointer); cdecl;
+begin
+ g_print ('Hello World'#13#10);
+end;
+
+function delete_event( Widget: PGtkWidget; Event: PGdkEvent; Data: gpointer):gint; cdecl;
+begin
+ (* If you return FALSE in the "delete_event" signal handler,
+ * GTK will emit the "destroy" signal. Returning TRUE means
+ * you don't want the window to be destroyed.
+ * This is useful for popping up 'are you sure you want to quit?'
+ * type dialogs. *)
+
+ g_print ('delete event occurred'#13#10);
+
+ (* Change TRUE to FALSE and the main window will be destroyed with
+ * a "delete_event". *)
+
+ Result:=gTRUE;
+end;
+
+(* Another callback *)
+procedure destroy(Widget: PGtkWidget; Data: gpointer); cdecl;
+begin
+ gtk_main_quit;
+end;
+
+var
+ (* GtkWidget is the storage type for widgets *)
+ Window: PGtkWidget;
+ Button: PGtkWidget;
+begin
+
+ (* This is called in all GTK applications. Arguments are parsed
+ * from the command line and are returned to the application. *)
+ gtk_init (@argc, @argv);
+
+ (* create a new window *)
+ window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ (* When the window is given the "delete_event" signal (this is given
+ * by the window manager, usually by the "close" option, or on the
+ * titlebar), we ask it to call the delete_event () function
+ * as defined above. The data passed to the callback
+ * function is NULL and is ignored in the callback function. *)
+ g_signal_connect (G_OBJECT (window), 'delete_event',
+ G_CALLBACK (@delete_event), NULL);
+
+ (* Here we connect the "destroy" event to a signal handler.
+ * This event occurs when we call gtk_widget_destroy() on the window,
+ * or if we return FALSE in the "delete_event" callback. *)
+ g_signal_connect (G_OBJECT (window), 'destroy',
+ G_CALLBACK (@destroy), NULL);
+
+ (* Sets the border width of the window. *)
+ gtk_container_set_border_width (GTK_CONTAINER (window), 10);
+
+ (* Creates a new button with the label "Hello World". *)
+ button := gtk_button_new_with_label ('Hello World');
+
+ (* When the button receives the "clicked" signal, it will call the
+ * function hello() passing it NULL as its argument. The hello()
+ * function is defined above. *)
+ g_signal_connect (G_OBJECT (button), 'clicked',
+ G_CALLBACK (@hello), NULL);
+
+ (* This will cause the window to be destroyed by calling
+ * gtk_widget_destroy(window) when "clicked". Again, the destroy
+ * signal could come from here, or the window manager. *)
+ g_signal_connect_swapped (G_OBJECT (button), 'clicked',
+ G_CALLBACK (@gtk_widget_destroy), window);
+
+ (* This packs the button into the window (a gtk container). *)
+ gtk_container_add (GTK_CONTAINER (window), button);
+
+ (* The final step is to display this newly created widget. *)
+ gtk_widget_show (button);
+
+ (* and the window *)
+ gtk_widget_show (window);
+
+ (* All GTK applications must have a gtk_main(). Control ends here
+ * and waits for an event to occur (like a key press or
+ * mouse event). *)
+ gtk_main ();
+end.
diff --git a/packages/gtk2/examples/helloworld2/Makefile b/packages/gtk2/examples/helloworld2/Makefile
new file mode 100644
index 0000000000..816deacaf0
--- /dev/null
+++ b/packages/gtk2/examples/helloworld2/Makefile
@@ -0,0 +1,2015 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/01/26]
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
+BSDs = freebsd netbsd openbsd darwin
+UNIXs = linux $(BSDs) solaris qnx
+LIMIT83fs = go32v2 os2 emx watcom
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../../../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifneq ($(words $(FPC_COMPILERINFO)),5)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=helloworld2
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_PROGRAMS+=helloworld2
+endif
+override INSTALL_FPCPACKAGE=y
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+ifeq ($(OS_TARGET),darwin)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+else
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+AOUTEXT=.out
+SMARTEXT=.sl2
+STATICLIBPREFIX=
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),atari)
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),win32)
+ifeq ($(CROSSBINDIR),)
+ASNAME=asw
+LDNAME=ldw
+ARNAME=arw
+endif
+endif
+endif
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+PPAS=ppas$(SRCBATCHEXT)
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+export UPXPROG
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=rtl gtk2
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_RTL),)
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_RTL)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+endif
+ifdef REQUIRE_PACKAGES_X11
+PACKAGEDIR_X11:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /x11/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_X11),)
+ifneq ($(wildcard $(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)),)
+UNITDIR_X11=$(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)
+else
+UNITDIR_X11=$(PACKAGEDIR_X11)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_X11)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_X11) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_X11)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_X11=
+UNITDIR_X11:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /x11/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_X11),)
+UNITDIR_X11:=$(firstword $(UNITDIR_X11))
+else
+UNITDIR_X11=
+endif
+endif
+ifdef UNITDIR_X11
+override COMPILER_UNITDIR+=$(UNITDIR_X11)
+endif
+endif
+ifdef REQUIRE_PACKAGES_GTK2
+PACKAGEDIR_GTK2:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_GTK2),)
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)),)
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)
+else
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_GTK2)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_GTK2) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_GTK2)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_GTK2=
+UNITDIR_GTK2:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_GTK2),)
+UNITDIR_GTK2:=$(firstword $(UNITDIR_GTK2))
+else
+UNITDIR_GTK2=
+endif
+endif
+ifdef UNITDIR_GTK2
+override COMPILER_UNITDIR+=$(UNITDIR_GTK2)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(CPU_TARGET)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(CPU_TARGET)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+endif
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+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
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(CPU_TARGET),i386)
+FPCCPUOPT:=-OG2p3
+endif
+ifeq ($(CPU_TARGET),powerpc)
+FPCCPUOPT:=-O1r
+endif
+else
+FPCCPUOPT:=-O2
+endif
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
+endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(FPC) $(FPCOPT)
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+endif
+.PHONY: fpc_exes
+ifndef CROSSINSTALL
+ifneq ($(TARGET_PROGRAMS),)
+override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
+override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
+override ALLTARGET+=fpc_exes
+override INSTALLEXEFILES+=$(EXEFILES)
+override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+ifeq ($(OS_TARGET),os2)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+ifeq ($(OS_TARGET),emx)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+endif
+endif
+fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
+$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
+ @$(ECHOREDIR) Compiled > $(FPCMADE)
+fpc_all: $(FPCMADE)
+fpc_smart:
+ $(MAKE) all LINKSMART=1 CREATESMART=1
+fpc_debug:
+ $(MAKE) all DEBUG=1
+fpc_release:
+ $(MAKE) all RELEASE=1
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
+$(COMPILER_UNITTARGETDIR):
+ $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+$(COMPILER_TARGETDIR):
+ $(MKDIRTREE) $(COMPILER_TARGETDIR)
+%$(PPUEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(PPUEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.lpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.dpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%.res: %.rc
+ windres -i $< -o $@
+vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.inc $(COMPILER_INCLUDEDIR)
+vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
+vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
+.PHONY: fpc_shared
+override INSTALLTARGET+=fpc_shared_install
+ifndef SHARED_LIBVERSION
+SHARED_LIBVERSION=$(FPC_VERSION)
+endif
+ifndef SHARED_LIBNAME
+SHARED_LIBNAME=$(PACKAGE_NAME)
+endif
+ifndef SHARED_FULLNAME
+SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
+endif
+ifndef SHARED_LIBUNITS
+SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
+override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
+endif
+fpc_shared:
+ifdef HASSHAREDLIB
+ $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
+ifneq ($(SHARED_BUILD),n)
+ $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
+endif
+else
+ @$(ECHO) Shared Libraries not supported
+endif
+fpc_shared_install:
+ifneq ($(SHARED_BUILD),n)
+ifneq ($(SHARED_LIBUNITS),)
+ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
+ $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
+endif
+endif
+endif
+.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
+ifdef INSTALL_UNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
+endif
+ifdef INSTALL_BUILDUNIT
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
+endif
+ifdef INSTALLPPUFILES
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+ifneq ($(UNITTARGETDIRPREFIX),)
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
+override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
+endif
+override INSTALL_CREATEPACKAGEFPC=1
+endif
+ifdef INSTALLEXEFILES
+ifneq ($(TARGETDIRPREFIX),)
+override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
+endif
+endif
+fpc_install: all $(INSTALLTARGET)
+ifdef INSTALLEXEFILES
+ $(MKDIR) $(INSTALL_BINDIR)
+ifdef UPXPROG
+ -$(UPXPROG) $(INSTALLEXEFILES)
+endif
+ $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
+endif
+ifdef INSTALL_CREATEPACKAGEFPC
+ifdef FPCMAKE
+ifdef PACKAGE_VERSION
+ifneq ($(wildcard Makefile.fpc),)
+ $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
+endif
+endif
+endif
+ifdef INSTALLPPUFILES
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+ $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
+endif
+ifneq ($(wildcard $(LIB_FULLNAME)),)
+ $(MKDIR) $(INSTALL_LIBDIR)
+ $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
+ifdef inUnix
+ ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
+endif
+endif
+endif
+ifdef INSTALL_FILES
+ $(MKDIR) $(INSTALL_DATADIR)
+ $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
+endif
+fpc_sourceinstall: distclean
+ $(MKDIR) $(INSTALL_SOURCEDIR)
+ $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
+fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
+ifdef HASEXAMPLES
+ $(MKDIR) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef EXAMPLESOURCEFILES
+ $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
+endif
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
+override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+ -$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+ -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+ -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ -$(DELTREE) units
+ -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+ -$(DEL) *.o *.ppu *.a
+endif
+ -$(DELTREE) *$(SMARTEXT)
+ -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *_ppas$(BATCHEXT)
+ifdef AOUTEXT
+ -$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+ -$(DEL) *$(DEBUGSYMEXT)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+ @$(ECHO)
+ @$(ECHO) == Package info ==
+ @$(ECHO) Package Name..... $(PACKAGE_NAME)
+ @$(ECHO) Package Version.. $(PACKAGE_VERSION)
+ @$(ECHO)
+ @$(ECHO) == Configuration info ==
+ @$(ECHO)
+ @$(ECHO) FPC.......... $(FPC)
+ @$(ECHO) FPC Version.. $(FPC_VERSION)
+ @$(ECHO) Source CPU... $(CPU_SOURCE)
+ @$(ECHO) Target CPU... $(CPU_TARGET)
+ @$(ECHO) Source OS.... $(OS_SOURCE)
+ @$(ECHO) Target OS.... $(OS_TARGET)
+ @$(ECHO) Full Source.. $(FULL_SOURCE)
+ @$(ECHO) Full Target.. $(FULL_TARGET)
+ @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
+ @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
+ @$(ECHO)
+ @$(ECHO) == Directory info ==
+ @$(ECHO)
+ @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
+ @$(ECHO)
+ @$(ECHO) Basedir......... $(BASEDIR)
+ @$(ECHO) FPCDir.......... $(FPCDIR)
+ @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
+ @$(ECHO) UnitsDir........ $(UNITSDIR)
+ @$(ECHO) PackagesDir..... $(PACKAGESDIR)
+ @$(ECHO)
+ @$(ECHO) GCC library..... $(GCCLIBDIR)
+ @$(ECHO) Other library... $(OTHERLIBDIR)
+ @$(ECHO)
+ @$(ECHO) == Tools info ==
+ @$(ECHO)
+ @$(ECHO) As........ $(AS)
+ @$(ECHO) Ld........ $(LD)
+ @$(ECHO) Ar........ $(AR)
+ @$(ECHO) Rc........ $(RC)
+ @$(ECHO)
+ @$(ECHO) Mv........ $(MVPROG)
+ @$(ECHO) Cp........ $(CPPROG)
+ @$(ECHO) Rm........ $(RMPROG)
+ @$(ECHO) GInstall.. $(GINSTALL)
+ @$(ECHO) Echo...... $(ECHO)
+ @$(ECHO) Shell..... $(SHELL)
+ @$(ECHO) Date...... $(DATE)
+ @$(ECHO) FPCMake... $(FPCMAKE)
+ @$(ECHO) PPUMove... $(PPUMOVE)
+ @$(ECHO) Upx....... $(UPXPROG)
+ @$(ECHO) Zip....... $(ZIPPROG)
+ @$(ECHO)
+ @$(ECHO) == Object info ==
+ @$(ECHO)
+ @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
+ @$(ECHO) Target Units.......... $(TARGET_UNITS)
+ @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
+ @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
+ @$(ECHO) Target Dirs........... $(TARGET_DIRS)
+ @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
+ @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+ @$(ECHO)
+ @$(ECHO) Clean Units......... $(CLEAN_UNITS)
+ @$(ECHO) Clean Files......... $(CLEAN_FILES)
+ @$(ECHO)
+ @$(ECHO) Install Units....... $(INSTALL_UNITS)
+ @$(ECHO) Install Files....... $(INSTALL_FILES)
+ @$(ECHO)
+ @$(ECHO) == Install info ==
+ @$(ECHO)
+ @$(ECHO) DateStr.............. $(DATESTR)
+ @$(ECHO) ZipName.............. $(ZIPNAME)
+ @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
+ @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+ @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
+ @$(ECHO) FullZipName.......... $(FULLZIPNAME)
+ @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
+ @$(ECHO)
+ @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
+ @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
+ @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
+ @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
+ @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
+ @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
+ @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
+ @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
+ @$(ECHO)
+ @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
+ @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
+ @$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+ fpc_makefile_dirs
+fpc_makefile:
+ $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+all: fpc_all
+debug: fpc_debug
+smart: fpc_smart
+release: fpc_release
+units: fpc_units
+examples:
+shared: fpc_shared
+install: fpc_install
+sourceinstall: fpc_sourceinstall
+exampleinstall: fpc_exampleinstall
+distinstall:
+zipinstall:
+zipsourceinstall:
+zipexampleinstall:
+zipdistinstall:
+clean: fpc_clean
+distclean: fpc_distclean
+cleanall: fpc_cleanall
+info: fpc_info
+makefiles: fpc_makefiles
+.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/helloworld2/Makefile.fpc b/packages/gtk2/examples/helloworld2/Makefile.fpc
new file mode 100644
index 0000000000..631e14c8af
--- /dev/null
+++ b/packages/gtk2/examples/helloworld2/Makefile.fpc
@@ -0,0 +1,18 @@
+#
+# Makefile.fpc for Free Pascal GTK 2.x.y Examples
+#
+
+[target]
+programs=helloworld2
+
+[require]
+packages=gtk2
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../../../..
+
+[rules]
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/helloworld2/helloworld2.pas b/packages/gtk2/examples/helloworld2/helloworld2.pas
new file mode 100644
index 0000000000..efff9c4d04
--- /dev/null
+++ b/packages/gtk2/examples/helloworld2/helloworld2.pas
@@ -0,0 +1,99 @@
+program helloworld2;
+
+{$mode objfpc} {$H+}
+
+uses
+ Glib2, Gdk2, Gtk2;
+
+
+(* Our new improved callback. The data passed to this function
+ * is printed to stdout. *)
+procedure callback (widget : PGtkWidget;
+ data : gpointer); cdecl;
+begin
+ writeln ('Hello again - ', Pgchar (data), ' was pressed');
+end;
+
+
+(* another callback *)
+function delete_event (widget: PGtkWidget;
+ event : PGdkEvent;
+ data : gpointer): gboolean; cdecl;
+begin
+ gtk_main_quit;
+ delete_event := FALSE;
+end;
+
+
+var
+ window,
+ button,
+ box1 : PGtkWidget; (* GtkWidget is the storage type for widgets *)
+
+begin
+
+ (* This is called in all GTK applications. Arguments are parsed
+ * from the command line and are returned to the application. *)
+
+ gtk_init (@argc, @argv);
+
+ (* Create a new window *)
+ window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ (* This is a new call, which just sets the title of our
+ * new window to "Hello Buttons!" *)
+ gtk_window_set_title (GTK_WINDOW (window), 'Hello Buttons!');
+
+ (* Here we just set a handler for delete_event that immediately
+ * exits GTK. *)
+ g_signal_connect (G_OBJECT (window), 'delete_event',
+ G_CALLBACK (@delete_event), NULL);
+
+ (* Sets the border width of the window. *)
+ gtk_container_set_border_width (GTK_CONTAINER (window), 10);
+
+ (* We create a box to pack widgets into. This is described in detail
+ * in the "packing" section. The box is not really visible, it
+ * is just used as a tool to arrange widgets. *)
+ box1 := gtk_hbox_new (FALSE, 0);
+
+ (* Put the box into the main window. *)
+ gtk_container_add (GTK_CONTAINER (window), box1);
+
+ (* Creates a new button with the label "Button 1". *)
+ button := gtk_button_new_with_label ('Button 1');
+
+ (* Now when the button is clicked, we call the "callback" function
+ * with a pointer to "button 1" as its argument *)
+ g_signal_connect (G_OBJECT (button), 'clicked',
+ G_CALLBACK (@callback), PChar('button 1'));
+
+ (* Instead of gtk_container_add, we pack this button into the invisible
+ * box, which has been packed into the window. *)
+ gtk_box_pack_start (GTK_BOX(box1), button, TRUE, TRUE, 0);
+
+ (* Always remember this step, this tells GTK that our preparation for
+ * this button is complete, and it can now be displayed. *)
+ gtk_widget_show (button);
+
+ (* Do these same steps again to create a second button *)
+ button := gtk_button_new_with_label ('Button 2');
+
+ (* Call the same callback function with a different argument,
+ * passing a pointer to "button 2" instead. *)
+ g_signal_connect (G_OBJECT (button), 'clicked',
+ G_CALLBACK (@callback), PChar('button 2'));
+
+ gtk_box_pack_start(GTK_BOX (box1), button, TRUE, TRUE, 0);
+
+ (* The order in which we show the buttons is not really important, but I
+ * recommend showing the window last, so it all pops up at once. *)
+ gtk_widget_show (button);
+
+ gtk_widget_show (box1);
+
+ gtk_widget_show (window);
+
+ (* Rest in gtk_main and wait for the fun to begin! *)
+ gtk_main ();
+end.
diff --git a/packages/gtk2/examples/plugins/Makefile b/packages/gtk2/examples/plugins/Makefile
new file mode 100644
index 0000000000..ea2b4cadd8
--- /dev/null
+++ b/packages/gtk2/examples/plugins/Makefile
@@ -0,0 +1,2015 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/01/26]
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
+BSDs = freebsd netbsd openbsd darwin
+UNIXs = linux $(BSDs) solaris qnx
+LIMIT83fs = go32v2 os2 emx watcom
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../../../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifneq ($(words $(FPC_COMPILERINFO)),5)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=plugin main
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_PROGRAMS+=plugin main
+endif
+override INSTALL_FPCPACKAGE=y
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+ifeq ($(OS_TARGET),darwin)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+else
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+AOUTEXT=.out
+SMARTEXT=.sl2
+STATICLIBPREFIX=
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),atari)
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),win32)
+ifeq ($(CROSSBINDIR),)
+ASNAME=asw
+LDNAME=ldw
+ARNAME=arw
+endif
+endif
+endif
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+PPAS=ppas$(SRCBATCHEXT)
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+export UPXPROG
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=rtl gtk2
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_RTL),)
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_RTL)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+endif
+ifdef REQUIRE_PACKAGES_X11
+PACKAGEDIR_X11:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /x11/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_X11),)
+ifneq ($(wildcard $(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)),)
+UNITDIR_X11=$(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)
+else
+UNITDIR_X11=$(PACKAGEDIR_X11)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_X11)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_X11) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_X11)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_X11=
+UNITDIR_X11:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /x11/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_X11),)
+UNITDIR_X11:=$(firstword $(UNITDIR_X11))
+else
+UNITDIR_X11=
+endif
+endif
+ifdef UNITDIR_X11
+override COMPILER_UNITDIR+=$(UNITDIR_X11)
+endif
+endif
+ifdef REQUIRE_PACKAGES_GTK2
+PACKAGEDIR_GTK2:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_GTK2),)
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)),)
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)
+else
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_GTK2)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_GTK2) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_GTK2)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_GTK2=
+UNITDIR_GTK2:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_GTK2),)
+UNITDIR_GTK2:=$(firstword $(UNITDIR_GTK2))
+else
+UNITDIR_GTK2=
+endif
+endif
+ifdef UNITDIR_GTK2
+override COMPILER_UNITDIR+=$(UNITDIR_GTK2)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(CPU_TARGET)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(CPU_TARGET)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+endif
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+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
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(CPU_TARGET),i386)
+FPCCPUOPT:=-OG2p3
+endif
+ifeq ($(CPU_TARGET),powerpc)
+FPCCPUOPT:=-O1r
+endif
+else
+FPCCPUOPT:=-O2
+endif
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
+endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(FPC) $(FPCOPT)
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+endif
+.PHONY: fpc_exes
+ifndef CROSSINSTALL
+ifneq ($(TARGET_PROGRAMS),)
+override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
+override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
+override ALLTARGET+=fpc_exes
+override INSTALLEXEFILES+=$(EXEFILES)
+override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+ifeq ($(OS_TARGET),os2)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+ifeq ($(OS_TARGET),emx)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+endif
+endif
+fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
+$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
+ @$(ECHOREDIR) Compiled > $(FPCMADE)
+fpc_all: $(FPCMADE)
+fpc_smart:
+ $(MAKE) all LINKSMART=1 CREATESMART=1
+fpc_debug:
+ $(MAKE) all DEBUG=1
+fpc_release:
+ $(MAKE) all RELEASE=1
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
+$(COMPILER_UNITTARGETDIR):
+ $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+$(COMPILER_TARGETDIR):
+ $(MKDIRTREE) $(COMPILER_TARGETDIR)
+%$(PPUEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(PPUEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.lpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.dpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%.res: %.rc
+ windres -i $< -o $@
+vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.inc $(COMPILER_INCLUDEDIR)
+vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
+vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
+.PHONY: fpc_shared
+override INSTALLTARGET+=fpc_shared_install
+ifndef SHARED_LIBVERSION
+SHARED_LIBVERSION=$(FPC_VERSION)
+endif
+ifndef SHARED_LIBNAME
+SHARED_LIBNAME=$(PACKAGE_NAME)
+endif
+ifndef SHARED_FULLNAME
+SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
+endif
+ifndef SHARED_LIBUNITS
+SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
+override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
+endif
+fpc_shared:
+ifdef HASSHAREDLIB
+ $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
+ifneq ($(SHARED_BUILD),n)
+ $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
+endif
+else
+ @$(ECHO) Shared Libraries not supported
+endif
+fpc_shared_install:
+ifneq ($(SHARED_BUILD),n)
+ifneq ($(SHARED_LIBUNITS),)
+ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
+ $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
+endif
+endif
+endif
+.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
+ifdef INSTALL_UNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
+endif
+ifdef INSTALL_BUILDUNIT
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
+endif
+ifdef INSTALLPPUFILES
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+ifneq ($(UNITTARGETDIRPREFIX),)
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
+override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
+endif
+override INSTALL_CREATEPACKAGEFPC=1
+endif
+ifdef INSTALLEXEFILES
+ifneq ($(TARGETDIRPREFIX),)
+override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
+endif
+endif
+fpc_install: all $(INSTALLTARGET)
+ifdef INSTALLEXEFILES
+ $(MKDIR) $(INSTALL_BINDIR)
+ifdef UPXPROG
+ -$(UPXPROG) $(INSTALLEXEFILES)
+endif
+ $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
+endif
+ifdef INSTALL_CREATEPACKAGEFPC
+ifdef FPCMAKE
+ifdef PACKAGE_VERSION
+ifneq ($(wildcard Makefile.fpc),)
+ $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
+endif
+endif
+endif
+ifdef INSTALLPPUFILES
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+ $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
+endif
+ifneq ($(wildcard $(LIB_FULLNAME)),)
+ $(MKDIR) $(INSTALL_LIBDIR)
+ $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
+ifdef inUnix
+ ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
+endif
+endif
+endif
+ifdef INSTALL_FILES
+ $(MKDIR) $(INSTALL_DATADIR)
+ $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
+endif
+fpc_sourceinstall: distclean
+ $(MKDIR) $(INSTALL_SOURCEDIR)
+ $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
+fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
+ifdef HASEXAMPLES
+ $(MKDIR) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef EXAMPLESOURCEFILES
+ $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
+endif
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
+override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+ -$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+ -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+ -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ -$(DELTREE) units
+ -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+ -$(DEL) *.o *.ppu *.a
+endif
+ -$(DELTREE) *$(SMARTEXT)
+ -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *_ppas$(BATCHEXT)
+ifdef AOUTEXT
+ -$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+ -$(DEL) *$(DEBUGSYMEXT)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+ @$(ECHO)
+ @$(ECHO) == Package info ==
+ @$(ECHO) Package Name..... $(PACKAGE_NAME)
+ @$(ECHO) Package Version.. $(PACKAGE_VERSION)
+ @$(ECHO)
+ @$(ECHO) == Configuration info ==
+ @$(ECHO)
+ @$(ECHO) FPC.......... $(FPC)
+ @$(ECHO) FPC Version.. $(FPC_VERSION)
+ @$(ECHO) Source CPU... $(CPU_SOURCE)
+ @$(ECHO) Target CPU... $(CPU_TARGET)
+ @$(ECHO) Source OS.... $(OS_SOURCE)
+ @$(ECHO) Target OS.... $(OS_TARGET)
+ @$(ECHO) Full Source.. $(FULL_SOURCE)
+ @$(ECHO) Full Target.. $(FULL_TARGET)
+ @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
+ @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
+ @$(ECHO)
+ @$(ECHO) == Directory info ==
+ @$(ECHO)
+ @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
+ @$(ECHO)
+ @$(ECHO) Basedir......... $(BASEDIR)
+ @$(ECHO) FPCDir.......... $(FPCDIR)
+ @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
+ @$(ECHO) UnitsDir........ $(UNITSDIR)
+ @$(ECHO) PackagesDir..... $(PACKAGESDIR)
+ @$(ECHO)
+ @$(ECHO) GCC library..... $(GCCLIBDIR)
+ @$(ECHO) Other library... $(OTHERLIBDIR)
+ @$(ECHO)
+ @$(ECHO) == Tools info ==
+ @$(ECHO)
+ @$(ECHO) As........ $(AS)
+ @$(ECHO) Ld........ $(LD)
+ @$(ECHO) Ar........ $(AR)
+ @$(ECHO) Rc........ $(RC)
+ @$(ECHO)
+ @$(ECHO) Mv........ $(MVPROG)
+ @$(ECHO) Cp........ $(CPPROG)
+ @$(ECHO) Rm........ $(RMPROG)
+ @$(ECHO) GInstall.. $(GINSTALL)
+ @$(ECHO) Echo...... $(ECHO)
+ @$(ECHO) Shell..... $(SHELL)
+ @$(ECHO) Date...... $(DATE)
+ @$(ECHO) FPCMake... $(FPCMAKE)
+ @$(ECHO) PPUMove... $(PPUMOVE)
+ @$(ECHO) Upx....... $(UPXPROG)
+ @$(ECHO) Zip....... $(ZIPPROG)
+ @$(ECHO)
+ @$(ECHO) == Object info ==
+ @$(ECHO)
+ @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
+ @$(ECHO) Target Units.......... $(TARGET_UNITS)
+ @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
+ @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
+ @$(ECHO) Target Dirs........... $(TARGET_DIRS)
+ @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
+ @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+ @$(ECHO)
+ @$(ECHO) Clean Units......... $(CLEAN_UNITS)
+ @$(ECHO) Clean Files......... $(CLEAN_FILES)
+ @$(ECHO)
+ @$(ECHO) Install Units....... $(INSTALL_UNITS)
+ @$(ECHO) Install Files....... $(INSTALL_FILES)
+ @$(ECHO)
+ @$(ECHO) == Install info ==
+ @$(ECHO)
+ @$(ECHO) DateStr.............. $(DATESTR)
+ @$(ECHO) ZipName.............. $(ZIPNAME)
+ @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
+ @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+ @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
+ @$(ECHO) FullZipName.......... $(FULLZIPNAME)
+ @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
+ @$(ECHO)
+ @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
+ @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
+ @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
+ @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
+ @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
+ @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
+ @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
+ @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
+ @$(ECHO)
+ @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
+ @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
+ @$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+ fpc_makefile_dirs
+fpc_makefile:
+ $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+all: fpc_all
+debug: fpc_debug
+smart: fpc_smart
+release: fpc_release
+units: fpc_units
+examples:
+shared: fpc_shared
+install: fpc_install
+sourceinstall: fpc_sourceinstall
+exampleinstall: fpc_exampleinstall
+distinstall:
+zipinstall:
+zipsourceinstall:
+zipexampleinstall:
+zipdistinstall:
+clean: fpc_clean
+distclean: fpc_distclean
+cleanall: fpc_cleanall
+info: fpc_info
+makefiles: fpc_makefiles
+.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/plugins/Makefile.fpc b/packages/gtk2/examples/plugins/Makefile.fpc
new file mode 100644
index 0000000000..7c4cb5f152
--- /dev/null
+++ b/packages/gtk2/examples/plugins/Makefile.fpc
@@ -0,0 +1,18 @@
+#
+# Makefile.fpc for Free Pascal GTK 2.x.y Examples
+#
+
+[target]
+programs=plugin main
+
+[require]
+packages=gtk2
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../../../..
+
+[rules]
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/plugins/main.pas b/packages/gtk2/examples/plugins/main.pas
new file mode 100644
index 0000000000..f4f94e0f23
--- /dev/null
+++ b/packages/gtk2/examples/plugins/main.pas
@@ -0,0 +1,46 @@
+program plugin_test;
+
+uses
+ glib2;
+
+const
+ PLUGIN_NAME = 'plugin';
+ SYMBOL_NAME = 'get_plugin_info';
+
+var
+ module : PGModule;
+ func : function : pgchar;
+ id : pgchar;
+ filename : pgchar;
+
+begin
+ if not g_module_supported then
+ begin
+ g_error ('No GModule support on this platform.'#13#10);
+ exit;
+ end;
+ filename := g_module_build_path ('.',PLUGIN_NAME);
+ g_print ('Trying to locate module; using %s as filename'#13#10,
+ [filename]);
+
+ module := g_module_open (filename, G_MODULE_BIND_MASK);
+
+ if module = NULL then
+ begin
+ g_error ('Couldn''t find Module %s!'#13#10, [PLUGIN_NAME]);
+ exit;
+ end;
+
+ if not g_module_symbol (module, SYMBOL_NAME, @func) then
+ begin
+ g_error ('No symbol %s in %s found!'#13#10, [SYMBOL_NAME, PLUGIN_NAME]);
+ g_module_close (module);
+ exit;
+ end;
+
+ id := func();
+
+ g_print ('Plugin defined itself as "%s"'#13#10, [id]);
+
+ g_module_close (module);
+end.
diff --git a/packages/gtk2/examples/plugins/plugin.pas b/packages/gtk2/examples/plugins/plugin.pas
new file mode 100644
index 0000000000..ff519a3dfc
--- /dev/null
+++ b/packages/gtk2/examples/plugins/plugin.pas
@@ -0,0 +1,12 @@
+library some_plugin;
+
+function get_plugin_info: pchar; export; cdecl;
+begin
+ get_plugin_info:= 'GLib2 Plugin-Test Plugin';
+end;
+
+exports
+ get_plugin_info;
+
+begin
+end.
diff --git a/packages/gtk2/examples/scribble_simple/Makefile b/packages/gtk2/examples/scribble_simple/Makefile
new file mode 100644
index 0000000000..52e49f67ef
--- /dev/null
+++ b/packages/gtk2/examples/scribble_simple/Makefile
@@ -0,0 +1,2015 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/01/26]
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
+BSDs = freebsd netbsd openbsd darwin
+UNIXs = linux $(BSDs) solaris qnx
+LIMIT83fs = go32v2 os2 emx watcom
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../../../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifneq ($(words $(FPC_COMPILERINFO)),5)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_PROGRAMS+=scribble_simple
+endif
+override INSTALL_FPCPACKAGE=y
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+ifeq ($(OS_SOURCE),linux)
+ifndef GCCLIBDIR
+ifeq ($(CPU_TARGET),i386)
+ifneq ($(findstring x86_64,$(shell uname -a)),)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
+endif
+ifndef GCCLIBDIR
+CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(CROSSGCC),)
+GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
+endif
+endif
+ifndef OTHERLIBDIR
+OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
+endif
+endif
+ifdef inUnix
+ifeq ($(OS_SOURCE),netbsd)
+OTHERLIBDIR+=/usr/pkg/lib
+endif
+export GCCLIBDIR OTHERLIB
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+ifeq ($(OS_TARGET),darwin)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+else
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+SHORTSUFFIX=wat
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+AOUTEXT=.out
+SMARTEXT=.sl2
+STATICLIBPREFIX=
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),atari)
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nw
+endif
+ifeq ($(OS_TARGET),netwlibc)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nwl
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),win32)
+ifeq ($(CROSSBINDIR),)
+ASNAME=asw
+LDNAME=ldw
+ARNAME=arw
+endif
+endif
+endif
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+PPAS=ppas$(SRCBATCHEXT)
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+export UPXPROG
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=rtl gtk2
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_X11=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_GTK2=1
+endif
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_RTL),)
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_RTL)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+endif
+ifdef REQUIRE_PACKAGES_X11
+PACKAGEDIR_X11:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /x11/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_X11),)
+ifneq ($(wildcard $(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)),)
+UNITDIR_X11=$(PACKAGEDIR_X11)/units/$(TARGETSUFFIX)
+else
+UNITDIR_X11=$(PACKAGEDIR_X11)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_X11)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_X11) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_X11)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_X11=
+UNITDIR_X11:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /x11/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_X11),)
+UNITDIR_X11:=$(firstword $(UNITDIR_X11))
+else
+UNITDIR_X11=
+endif
+endif
+ifdef UNITDIR_X11
+override COMPILER_UNITDIR+=$(UNITDIR_X11)
+endif
+endif
+ifdef REQUIRE_PACKAGES_GTK2
+PACKAGEDIR_GTK2:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_GTK2),)
+ifneq ($(wildcard $(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)),)
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)/units/$(TARGETSUFFIX)
+else
+UNITDIR_GTK2=$(PACKAGEDIR_GTK2)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_GTK2)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_GTK2) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_GTK2)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_GTK2=
+UNITDIR_GTK2:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /gtk2/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_GTK2),)
+UNITDIR_GTK2:=$(firstword $(UNITDIR_GTK2))
+else
+UNITDIR_GTK2=
+endif
+endif
+ifdef UNITDIR_GTK2
+override COMPILER_UNITDIR+=$(UNITDIR_GTK2)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(CPU_TARGET)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(CPU_TARGET)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+endif
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+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
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(CPU_TARGET),i386)
+FPCCPUOPT:=-OG2p3
+endif
+ifeq ($(CPU_TARGET),powerpc)
+FPCCPUOPT:=-O1r
+endif
+else
+FPCCPUOPT:=-O2
+endif
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
+endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
+endif
+ifdef OTHERLIBDIR
+override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(FPC) $(FPCOPT)
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+endif
+.PHONY: fpc_exes
+ifndef CROSSINSTALL
+ifneq ($(TARGET_PROGRAMS),)
+override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
+override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
+override ALLTARGET+=fpc_exes
+override INSTALLEXEFILES+=$(EXEFILES)
+override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+ifeq ($(OS_TARGET),os2)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+ifeq ($(OS_TARGET),emx)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+endif
+endif
+fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
+$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
+ @$(ECHOREDIR) Compiled > $(FPCMADE)
+fpc_all: $(FPCMADE)
+fpc_smart:
+ $(MAKE) all LINKSMART=1 CREATESMART=1
+fpc_debug:
+ $(MAKE) all DEBUG=1
+fpc_release:
+ $(MAKE) all RELEASE=1
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
+$(COMPILER_UNITTARGETDIR):
+ $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+$(COMPILER_TARGETDIR):
+ $(MKDIRTREE) $(COMPILER_TARGETDIR)
+%$(PPUEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(PPUEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pp
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.pas
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.lpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%$(EXEEXT): %.dpr
+ $(COMPILER) $<
+ $(EXECPPAS)
+%.res: %.rc
+ windres -i $< -o $@
+vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.inc $(COMPILER_INCLUDEDIR)
+vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
+vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
+.PHONY: fpc_shared
+override INSTALLTARGET+=fpc_shared_install
+ifndef SHARED_LIBVERSION
+SHARED_LIBVERSION=$(FPC_VERSION)
+endif
+ifndef SHARED_LIBNAME
+SHARED_LIBNAME=$(PACKAGE_NAME)
+endif
+ifndef SHARED_FULLNAME
+SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
+endif
+ifndef SHARED_LIBUNITS
+SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
+override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
+endif
+fpc_shared:
+ifdef HASSHAREDLIB
+ $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
+ifneq ($(SHARED_BUILD),n)
+ $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
+endif
+else
+ @$(ECHO) Shared Libraries not supported
+endif
+fpc_shared_install:
+ifneq ($(SHARED_BUILD),n)
+ifneq ($(SHARED_LIBUNITS),)
+ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
+ $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
+endif
+endif
+endif
+.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
+ifdef INSTALL_UNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
+endif
+ifdef INSTALL_BUILDUNIT
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
+endif
+ifdef INSTALLPPUFILES
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+ifneq ($(UNITTARGETDIRPREFIX),)
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
+override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
+endif
+override INSTALL_CREATEPACKAGEFPC=1
+endif
+ifdef INSTALLEXEFILES
+ifneq ($(TARGETDIRPREFIX),)
+override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
+endif
+endif
+fpc_install: all $(INSTALLTARGET)
+ifdef INSTALLEXEFILES
+ $(MKDIR) $(INSTALL_BINDIR)
+ifdef UPXPROG
+ -$(UPXPROG) $(INSTALLEXEFILES)
+endif
+ $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
+endif
+ifdef INSTALL_CREATEPACKAGEFPC
+ifdef FPCMAKE
+ifdef PACKAGE_VERSION
+ifneq ($(wildcard Makefile.fpc),)
+ $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
+endif
+endif
+endif
+ifdef INSTALLPPUFILES
+ $(MKDIR) $(INSTALL_UNITDIR)
+ $(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+ $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
+endif
+ifneq ($(wildcard $(LIB_FULLNAME)),)
+ $(MKDIR) $(INSTALL_LIBDIR)
+ $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
+ifdef inUnix
+ ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
+endif
+endif
+endif
+ifdef INSTALL_FILES
+ $(MKDIR) $(INSTALL_DATADIR)
+ $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
+endif
+fpc_sourceinstall: distclean
+ $(MKDIR) $(INSTALL_SOURCEDIR)
+ $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
+fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
+ifdef HASEXAMPLES
+ $(MKDIR) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef EXAMPLESOURCEFILES
+ $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
+endif
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
+override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+ -$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+ -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+ -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+ -$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+ -$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+ -$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+ -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ -$(DELTREE) units
+ -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+ -$(DEL) *.o *.ppu *.a
+endif
+ -$(DELTREE) *$(SMARTEXT)
+ -$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+ -$(DEL) *_ppas$(BATCHEXT)
+ifdef AOUTEXT
+ -$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+ -$(DEL) *$(DEBUGSYMEXT)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+ @$(ECHO)
+ @$(ECHO) == Package info ==
+ @$(ECHO) Package Name..... $(PACKAGE_NAME)
+ @$(ECHO) Package Version.. $(PACKAGE_VERSION)
+ @$(ECHO)
+ @$(ECHO) == Configuration info ==
+ @$(ECHO)
+ @$(ECHO) FPC.......... $(FPC)
+ @$(ECHO) FPC Version.. $(FPC_VERSION)
+ @$(ECHO) Source CPU... $(CPU_SOURCE)
+ @$(ECHO) Target CPU... $(CPU_TARGET)
+ @$(ECHO) Source OS.... $(OS_SOURCE)
+ @$(ECHO) Target OS.... $(OS_TARGET)
+ @$(ECHO) Full Source.. $(FULL_SOURCE)
+ @$(ECHO) Full Target.. $(FULL_TARGET)
+ @$(ECHO) SourceSuffix. $(SOURCESUFFIX)
+ @$(ECHO) TargetSuffix. $(TARGETSUFFIX)
+ @$(ECHO)
+ @$(ECHO) == Directory info ==
+ @$(ECHO)
+ @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)
+ @$(ECHO)
+ @$(ECHO) Basedir......... $(BASEDIR)
+ @$(ECHO) FPCDir.......... $(FPCDIR)
+ @$(ECHO) CrossBinDir..... $(CROSSBINDIR)
+ @$(ECHO) UnitsDir........ $(UNITSDIR)
+ @$(ECHO) PackagesDir..... $(PACKAGESDIR)
+ @$(ECHO)
+ @$(ECHO) GCC library..... $(GCCLIBDIR)
+ @$(ECHO) Other library... $(OTHERLIBDIR)
+ @$(ECHO)
+ @$(ECHO) == Tools info ==
+ @$(ECHO)
+ @$(ECHO) As........ $(AS)
+ @$(ECHO) Ld........ $(LD)
+ @$(ECHO) Ar........ $(AR)
+ @$(ECHO) Rc........ $(RC)
+ @$(ECHO)
+ @$(ECHO) Mv........ $(MVPROG)
+ @$(ECHO) Cp........ $(CPPROG)
+ @$(ECHO) Rm........ $(RMPROG)
+ @$(ECHO) GInstall.. $(GINSTALL)
+ @$(ECHO) Echo...... $(ECHO)
+ @$(ECHO) Shell..... $(SHELL)
+ @$(ECHO) Date...... $(DATE)
+ @$(ECHO) FPCMake... $(FPCMAKE)
+ @$(ECHO) PPUMove... $(PPUMOVE)
+ @$(ECHO) Upx....... $(UPXPROG)
+ @$(ECHO) Zip....... $(ZIPPROG)
+ @$(ECHO)
+ @$(ECHO) == Object info ==
+ @$(ECHO)
+ @$(ECHO) Target Loaders........ $(TARGET_LOADERS)
+ @$(ECHO) Target Units.......... $(TARGET_UNITS)
+ @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)
+ @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)
+ @$(ECHO) Target Dirs........... $(TARGET_DIRS)
+ @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)
+ @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+ @$(ECHO)
+ @$(ECHO) Clean Units......... $(CLEAN_UNITS)
+ @$(ECHO) Clean Files......... $(CLEAN_FILES)
+ @$(ECHO)
+ @$(ECHO) Install Units....... $(INSTALL_UNITS)
+ @$(ECHO) Install Files....... $(INSTALL_FILES)
+ @$(ECHO)
+ @$(ECHO) == Install info ==
+ @$(ECHO)
+ @$(ECHO) DateStr.............. $(DATESTR)
+ @$(ECHO) ZipName.............. $(ZIPNAME)
+ @$(ECHO) ZipPrefix............ $(ZIPPREFIX)
+ @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+ @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)
+ @$(ECHO) FullZipName.......... $(FULLZIPNAME)
+ @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)
+ @$(ECHO)
+ @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)
+ @$(ECHO) Install binary dir... $(INSTALL_BINDIR)
+ @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)
+ @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)
+ @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)
+ @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)
+ @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)
+ @$(ECHO) Install data dir..... $(INSTALL_DATADIR)
+ @$(ECHO)
+ @$(ECHO) Dist destination dir. $(DIST_DESTDIR)
+ @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)
+ @$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+ fpc_makefile_dirs
+fpc_makefile:
+ $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+ $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+all: fpc_all
+debug: fpc_debug
+smart: fpc_smart
+release: fpc_release
+units: fpc_units
+examples:
+shared: fpc_shared
+install: fpc_install
+sourceinstall: fpc_sourceinstall
+exampleinstall: fpc_exampleinstall
+distinstall:
+zipinstall:
+zipsourceinstall:
+zipexampleinstall:
+zipdistinstall:
+clean: fpc_clean
+distclean: fpc_distclean
+cleanall: fpc_cleanall
+info: fpc_info
+makefiles: fpc_makefiles
+.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/scribble_simple/Makefile.fpc b/packages/gtk2/examples/scribble_simple/Makefile.fpc
new file mode 100644
index 0000000000..cbfe93a334
--- /dev/null
+++ b/packages/gtk2/examples/scribble_simple/Makefile.fpc
@@ -0,0 +1,18 @@
+#
+# Makefile.fpc for Free Pascal GTK 2.x.y Examples
+#
+
+[target]
+programs=scribble_simple
+
+[require]
+packages=gtk2
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../../../..
+
+[rules]
+.NOTPARALLEL:
diff --git a/packages/gtk2/examples/scribble_simple/scribble_simple.pas b/packages/gtk2/examples/scribble_simple/scribble_simple.pas
new file mode 100644
index 0000000000..7f43717689
--- /dev/null
+++ b/packages/gtk2/examples/scribble_simple/scribble_simple.pas
@@ -0,0 +1,170 @@
+program scribble_simple;
+
+{$mode objfpc} {$H+}
+
+uses glib2, gtk2, gdk2;
+
+var
+ pixmap : PGdkPixmap; (* Backing pixmap for drawing area *)
+
+
+
+(* Create a new backing pixmap of the appropriate size *)
+
+function configure_event ( widget : PGtkWidget;
+ event : PGdkEventConfigure): gboolean; cdecl;
+begin
+
+ if pixmap <> nil then
+ g_object_unref (pixmap);
+
+ pixmap := gdk_pixmap_new (widget^.window,
+ widget^.allocation.width,
+ widget^.allocation.height,
+ -1);
+ gdk_draw_rectangle (pixmap,
+ widget^.style^.white_gc,
+ gTRUE,
+ 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) : gboolean; cdecl;
+begin
+ gdk_draw_drawable (widget^.window,
+ widget^.style^.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 : gdouble); cdecl;
+var
+ update_rect : TGdkRectangle;
+
+begin
+ update_rect.x := round (x - 5.0);
+ update_rect.y := round (y - 5.0);
+ update_rect.width := 10;
+ update_rect.height := 10;
+
+ gdk_draw_rectangle (pixmap,
+ widget^.style^.black_gc,
+ gTRUE,
+ update_rect.x, update_rect.y,
+ update_rect.width, update_rect.height);
+
+ gtk_widget_queue_draw_area (widget,
+ update_rect.x, update_rect.y,
+ update_rect.width, update_rect.height);
+end;
+
+function button_press_event ( widget : PGtkWidget;
+ event : PGdkEventbutton): gboolean; cdecl;
+begin
+ if (event^.button = 1) and (pixmap <> NULL) then
+ draw_brush (widget, event^.x, event^.y);
+
+ button_press_event := TRUE;
+end;
+
+function motion_notify_event ( widget: PGtkWidget;
+ event : PGdkEventMotion): gboolean; cdecl;
+var
+ x, y : gint;
+ state : TGdkModifierType;
+
+begin
+ if event^.is_hint = gTRUE then
+ gdk_window_get_pointer (event^.window, @x, @y, @state)
+ else begin
+ x := round (event^.x);
+ y := round (event^.y);
+ state := event^.state;
+ end;
+
+ if ((state and GDK_BUTTON1_MASK) <> 0) and (pixmap <> NULL) then
+ draw_brush (widget, x, y);
+
+ motion_notify_event := TRUE;
+end;
+
+procedure quit;
+begin
+ halt;
+end;
+
+var
+ window,
+ drawing_area,
+ vbox : PGtkWidget;
+
+ button : PGtkWidget;
+
+begin
+ gtk_init (@argc, @argv);
+
+ window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_name (window, 'Test Input');
+
+ vbox := gtk_vbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_widget_show (vbox);
+
+ g_signal_connect (G_OBJECT (window), 'destroy',
+ G_CALLBACK (@quit), NULL);
+
+ (* Create the drawing area *)
+
+ drawing_area := gtk_drawing_area_new ();
+ gtk_widget_set_size_request (GTK_WIDGET (drawing_area), 200, 200);
+ gtk_box_pack_start (GTK_BOX (vbox), drawing_area, TRUE, TRUE, 0);
+
+ gtk_widget_show (drawing_area);
+
+ (* Signals used to handle backing pixmap *)
+
+ g_signal_connect (G_OBJECT (drawing_area), 'expose_event',
+ G_CALLBACK (@expose_event), NULL);
+
+ g_signal_connect (G_OBJECT (drawing_area),'configure_event',
+ G_CALLBACK (@configure_event), NULL);
+
+ (* Event signals *)
+
+ g_signal_connect (G_OBJECT (drawing_area), 'motion_notify_event',
+ G_CALLBACK (@motion_notify_event), NULL);
+
+ g_signal_connect (G_OBJECT (drawing_area), 'button_press_event',
+ G_CALLBACK (@button_press_event), NULL);
+
+ 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 (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+
+ g_signal_connect_swapped (G_OBJECT (button), 'clicked',
+ G_CALLBACK (@gtk_widget_destroy),
+ window);
+ gtk_widget_show (button);
+
+ gtk_widget_show (window);
+
+ gtk_main ();
+end.
diff --git a/packages/gtk2/fpmake.pp b/packages/gtk2/fpmake.pp
new file mode 100644
index 0000000000..c780dce901
--- /dev/null
+++ b/packages/gtk2/fpmake.pp
@@ -0,0 +1,1212 @@
+{$ifndef ALLPACKAGES}
+{$mode objfpc}{$H+}
+program fpmake;
+
+uses fpmkunit;
+
+Var
+ P : TPackage;
+ T : TTarget;
+begin
+ With Installer do
+ begin
+{$endif ALLPACKAGES}
+
+ P:=AddPackage('gtk2');
+{$ifdef ALLPACKAGES}
+ P.Directory:='gtk2';
+{$endif ALLPACKAGES}
+ P.Version:='2.0.0';
+ P.SourcePath.Add('src/glib');
+ P.SourcePath.Add('src/gtk+');
+ P.SourcePath.Add('src/atk');
+ P.SourcePath.Add('src/gtk2x11');
+ P.SourcePath.Add('src/gtkglext');
+ P.SourcePath.Add('src/gtkhtml');
+ P.SourcePath.Add('src/libglade');
+ P.SourcePath.Add('src/pango');
+ P.SourcePath.Add('src/');
+
+ T:=P.Targets.AddUnit('atk.pas');
+ with T.Dependencies do
+ begin
+ AddInclude('atkincludes.inc');
+ AddInclude('atkobject.inc');
+ AddInclude('atkaction.inc');
+ AddInclude('atkcomponent.inc');
+ AddInclude('atkdocument.inc');
+ AddInclude('atkeditabletext.inc');
+ AddInclude('atkgobjectaccessible.inc');
+ AddInclude('atkhyperlink.inc');
+ AddInclude('atkhypertext.inc');
+ AddInclude('atkimage.inc');
+ AddInclude('atkobjectfactory.inc');
+ AddInclude('atkregistry.inc');
+ AddInclude('atkrelation.inc');
+ AddInclude('atkrelationset.inc');
+ AddInclude('atkselection.inc');
+ AddInclude('atkstate.inc');
+ AddInclude('atkstateset.inc');
+ AddInclude('atkstreamablecontent.inc');
+ AddInclude('atktable.inc');
+ AddInclude('atktext.inc');
+ AddInclude('atkutil.inc');
+ AddInclude('atkvalue.inc');
+ AddInclude('atkincludes.inc');
+ AddInclude('atkobject.inc');
+ AddInclude('atkaction.inc');
+ AddInclude('atkcomponent.inc');
+ AddInclude('atkdocument.inc');
+ AddInclude('atkeditabletext.inc');
+ AddInclude('atkgobjectaccessible.inc');
+ AddInclude('atkhyperlink.inc');
+ AddInclude('atkhypertext.inc');
+ AddInclude('atkimage.inc');
+ AddInclude('atkobjectfactory.inc');
+ AddInclude('atkregistry.inc');
+ AddInclude('atkrelation.inc');
+ AddInclude('atkrelationset.inc');
+ AddInclude('atkselection.inc');
+ AddInclude('atkstate.inc');
+ AddInclude('atkstateset.inc');
+ AddInclude('atkstreamablecontent.inc');
+ AddInclude('atktable.inc');
+ AddInclude('atktext.inc');
+ AddInclude('atkutil.inc');
+ AddInclude('atkvalue.inc');
+ AddInclude('atkincludes.inc');
+ AddInclude('atkobject.inc');
+ AddInclude('atkaction.inc');
+ AddInclude('atkcomponent.inc');
+ AddInclude('atkdocument.inc');
+ AddInclude('atkeditabletext.inc');
+ AddInclude('atkgobjectaccessible.inc');
+ AddInclude('atkhyperlink.inc');
+ AddInclude('atkhypertext.inc');
+ AddInclude('atkimage.inc');
+ AddInclude('atkobjectfactory.inc');
+ AddInclude('atkregistry.inc');
+ AddInclude('atkrelation.inc');
+ AddInclude('atkrelationset.inc');
+ AddInclude('atkselection.inc');
+ AddInclude('atkstate.inc');
+ AddInclude('atkstateset.inc');
+ AddInclude('atkstreamablecontent.inc');
+ AddInclude('atktable.inc');
+ AddInclude('atktext.inc');
+ AddInclude('atkutil.inc');
+ AddInclude('atkvalue.inc');
+ AddInclude('atkincludes.inc');
+ AddInclude('atkobject.inc');
+ AddInclude('atkaction.inc');
+ AddInclude('atkcomponent.inc');
+ AddInclude('atkdocument.inc');
+ AddInclude('atkeditabletext.inc');
+ AddInclude('atkgobjectaccessible.inc');
+ AddInclude('atkhyperlink.inc');
+ AddInclude('atkhypertext.inc');
+ AddInclude('atkimage.inc');
+ AddInclude('atkobjectfactory.inc');
+ AddInclude('atkregistry.inc');
+ AddInclude('atkrelation.inc');
+ AddInclude('atkrelationset.inc');
+ AddInclude('atkselection.inc');
+ AddInclude('atkstate.inc');
+ AddInclude('atkstateset.inc');
+ AddInclude('atkstreamablecontent.inc');
+ AddInclude('atktable.inc');
+ AddInclude('atktext.inc');
+ AddInclude('atkutil.inc');
+ AddInclude('atkvalue.inc');
+ AddUnit('glib2');
+ end;
+ T:=P.Targets.AddUnit('buildgtk2.pp');
+ with T.Dependencies do
+ begin
+ AddUnit('gtk2');
+ AddUnit('libglade2');
+ AddUnit('gdkglext');
+ AddUnit('gtkglext');
+ AddUnit('gdk2x');
+ end;
+ T:=P.Targets.AddUnit('gdk2pixbuf.pas');
+ with T.Dependencies do
+ begin
+ AddInclude('gdk-pixbuf-loader.inc');
+ AddInclude('gdk-pixbuf-loader.inc');
+ AddUnit('glib2');
+ end;
+ T:=P.Targets.AddUnit('gdk2.pas');
+ with T.Dependencies do
+ begin
+ AddInclude('gdkincludes.inc');
+ AddInclude('gdkcolor.inc');
+ AddInclude('gdkcursor.inc');
+ AddInclude('gdkdnd.inc');
+ AddInclude('gdkregion-generic.inc');
+ AddInclude('gdkdrawable.inc');
+ AddInclude('gdkevents.inc');
+ AddInclude('gdkfont.inc');
+ AddInclude('gdkgc.inc');
+ AddInclude('gdkimage.inc');
+ AddInclude('gdkinput.inc');
+ AddInclude('gdkkeys.inc');
+ AddInclude('gdkkeysyms.inc');
+ AddInclude('gdkpango.inc');
+ AddInclude('gdkpixbuf.inc');
+ AddInclude('gdkpixmap.inc');
+ AddInclude('gdkproperty.inc');
+ AddInclude('gdkregion.inc');
+ AddInclude('gdkrgb.inc');
+ AddInclude('gdkdisplay.inc');
+ AddInclude('gdkscreen.inc');
+ AddInclude('gdkselection.inc');
+ AddInclude('gdktypes.inc');
+ AddInclude('gdkvisual.inc');
+ AddInclude('gdkwindow.inc');
+ AddInclude('gdkincludes.inc');
+ AddInclude('gdkcolor.inc');
+ AddInclude('gdkcursor.inc');
+ AddInclude('gdkdnd.inc');
+ AddInclude('gdkregion-generic.inc');
+ AddInclude('gdkdrawable.inc');
+ AddInclude('gdkevents.inc');
+ AddInclude('gdkfont.inc');
+ AddInclude('gdkgc.inc');
+ AddInclude('gdkimage.inc');
+ AddInclude('gdkinput.inc');
+ AddInclude('gdkkeys.inc');
+ AddInclude('gdkkeysyms.inc');
+ AddInclude('gdkpango.inc');
+ AddInclude('gdkpixbuf.inc');
+ AddInclude('gdkpixmap.inc');
+ AddInclude('gdkproperty.inc');
+ AddInclude('gdkregion.inc');
+ AddInclude('gdkrgb.inc');
+ AddInclude('gdkdisplay.inc');
+ AddInclude('gdkscreen.inc');
+ AddInclude('gdkselection.inc');
+ AddInclude('gdktypes.inc');
+ AddInclude('gdkvisual.inc');
+ AddInclude('gdkwindow.inc');
+ AddInclude('gdkincludes.inc');
+ AddInclude('gdkcolor.inc');
+ AddInclude('gdkcursor.inc');
+ AddInclude('gdkdnd.inc');
+ AddInclude('gdkregion-generic.inc');
+ AddInclude('gdkdrawable.inc');
+ AddInclude('gdkevents.inc');
+ AddInclude('gdkfont.inc');
+ AddInclude('gdkgc.inc');
+ AddInclude('gdkimage.inc');
+ AddInclude('gdkinput.inc');
+ AddInclude('gdkkeys.inc');
+ AddInclude('gdkkeysyms.inc');
+ AddInclude('gdkpango.inc');
+ AddInclude('gdkpixbuf.inc');
+ AddInclude('gdkpixmap.inc');
+ AddInclude('gdkproperty.inc');
+ AddInclude('gdkregion.inc');
+ AddInclude('gdkrgb.inc');
+ AddInclude('gdkdisplay.inc');
+ AddInclude('gdkscreen.inc');
+ AddInclude('gdkselection.inc');
+ AddInclude('gdktypes.inc');
+ AddInclude('gdkvisual.inc');
+ AddInclude('gdkwindow.inc');
+ AddInclude('gdkincludes.inc');
+ AddInclude('gdkcolor.inc');
+ AddInclude('gdkcursor.inc');
+ AddInclude('gdkdnd.inc');
+ AddInclude('gdkregion-generic.inc');
+ AddInclude('gdkdrawable.inc');
+ AddInclude('gdkevents.inc');
+ AddInclude('gdkfont.inc');
+ AddInclude('gdkgc.inc');
+ AddInclude('gdkimage.inc');
+ AddInclude('gdkinput.inc');
+ AddInclude('gdkkeys.inc');
+ AddInclude('gdkkeysyms.inc');
+ AddInclude('gdkpango.inc');
+ AddInclude('gdkpixbuf.inc');
+ AddInclude('gdkpixmap.inc');
+ AddInclude('gdkproperty.inc');
+ AddInclude('gdkregion.inc');
+ AddInclude('gdkrgb.inc');
+ AddInclude('gdkdisplay.inc');
+ AddInclude('gdkscreen.inc');
+ AddInclude('gdkselection.inc');
+ AddInclude('gdktypes.inc');
+ AddInclude('gdkvisual.inc');
+ AddInclude('gdkwindow.inc');
+ AddUnit('glib2');
+ AddUnit('gdk2pixbuf');
+ AddUnit('pango');
+ end;
+ T:=P.Targets.AddUnit('gdk2x.pas');
+ with T.Dependencies do
+ begin
+ AddInclude('gdk2x11includes.inc');
+ AddInclude('xsettings-common.inc');
+ AddInclude('xsettings-client.inc');
+ AddInclude('gdkdisplay-x11.inc');
+ AddInclude('gdkdrawable-x11.inc');
+ AddInclude('gdkinputprivate.inc');
+ AddInclude('gdkpixmap-x11.inc');
+ AddInclude('gdkprivate-x11.inc');
+ AddInclude('gdkscreen-x11.inc');
+ AddInclude('gdkwindow-x11.inc');
+ AddInclude('gdkx.inc');
+ AddInclude('gxid_proto.inc');
+ AddInclude('mwmutil.inc');
+ AddInclude('gdk2x11includes.inc');
+ AddInclude('xsettings-common.inc');
+ AddInclude('xsettings-client.inc');
+ AddInclude('gdkdisplay-x11.inc');
+ AddInclude('gdkdrawable-x11.inc');
+ AddInclude('gdkinputprivate.inc');
+ AddInclude('gdkpixmap-x11.inc');
+ AddInclude('gdkprivate-x11.inc');
+ AddInclude('gdkscreen-x11.inc');
+ AddInclude('gdkwindow-x11.inc');
+ AddInclude('gdkx.inc');
+ AddInclude('gxid_proto.inc');
+ AddInclude('mwmutil.inc');
+ AddInclude('gdk2x11includes.inc');
+ AddInclude('xsettings-common.inc');
+ AddInclude('xsettings-client.inc');
+ AddInclude('gdkdisplay-x11.inc');
+ AddInclude('gdkdrawable-x11.inc');
+ AddInclude('gdkinputprivate.inc');
+ AddInclude('gdkpixmap-x11.inc');
+ AddInclude('gdkprivate-x11.inc');
+ AddInclude('gdkscreen-x11.inc');
+ AddInclude('gdkwindow-x11.inc');
+ AddInclude('gdkx.inc');
+ AddInclude('gxid_proto.inc');
+ AddInclude('mwmutil.inc');
+ AddUnit('glib2');
+ AddUnit('gdk2');
+ AddUnit('xlib');
+ AddUnit('xrender');
+ end;
+ T:=P.Targets.AddUnit('gdkglext.pas');
+ with T.Dependencies do
+ begin
+ AddInclude('gdkglext_includes.inc');
+ AddInclude('gdkgldefs.inc');
+ AddInclude('gdkglversion.inc');
+ AddInclude('gdkgltokens.inc');
+ AddInclude('gdkgltypes.inc');
+ AddInclude('gdkglenumtypes.inc');
+ AddInclude('gdkglinit.inc');
+ AddInclude('gdkglquery.inc');
+ AddInclude('gdkglconfig.inc');
+ AddInclude('gdkglcontext.inc');
+ AddInclude('gdkgldrawable.inc');
+ AddInclude('gdkglpixmap.inc');
+ AddInclude('gdkglwindow.inc');
+ AddInclude('gdkglfont.inc');
+ AddInclude('gdkglshapes.inc');
+ AddInclude('gdkglext_includes.inc');
+ AddInclude('gdkgldefs.inc');
+ AddInclude('gdkglversion.inc');
+ AddInclude('gdkgltokens.inc');
+ AddInclude('gdkgltypes.inc');
+ AddInclude('gdkglenumtypes.inc');
+ AddInclude('gdkglinit.inc');
+ AddInclude('gdkglquery.inc');
+ AddInclude('gdkglconfig.inc');
+ AddInclude('gdkglcontext.inc');
+ AddInclude('gdkgldrawable.inc');
+ AddInclude('gdkglpixmap.inc');
+ AddInclude('gdkglwindow.inc');
+ AddInclude('gdkglfont.inc');
+ AddInclude('gdkglshapes.inc');
+ AddInclude('gdkglext_includes.inc');
+ AddInclude('gdkgldefs.inc');
+ AddInclude('gdkglversion.inc');
+ AddInclude('gdkgltokens.inc');
+ AddInclude('gdkgltypes.inc');
+ AddInclude('gdkglenumtypes.inc');
+ AddInclude('gdkglinit.inc');
+ AddInclude('gdkglquery.inc');
+ AddInclude('gdkglconfig.inc');
+ AddInclude('gdkglcontext.inc');
+ AddInclude('gdkgldrawable.inc');
+ AddInclude('gdkglpixmap.inc');
+ AddInclude('gdkglwindow.inc');
+ AddInclude('gdkglfont.inc');
+ AddInclude('gdkglshapes.inc');
+ AddUnit('glib2');
+ AddUnit('gdk2');
+ end;
+ T:=P.Targets.AddUnit('glib2.pas');
+ with T.Dependencies do
+ begin
+ AddInclude('gtypes.inc');
+ AddInclude('glibconfig.inc');
+ AddInclude('gquark.inc');
+ AddInclude('gvaluecollector.inc');
+ AddInclude('gtype.inc');
+ AddInclude('genums.inc');
+ AddInclude('gvalue.inc');
+ AddInclude('gtypeplugin.inc');
+ AddInclude('gdataset.inc');
+ AddInclude('gslist.inc');
+ AddInclude('glist.inc');
+ AddInclude('gparam.inc');
+ AddInclude('gboxed.inc');
+ AddInclude('gtype.inc');
+ AddInclude('gvalue.inc');
+ AddInclude('gvaluearray.inc');
+ AddInclude('gvaluecollector.inc');
+ AddInclude('gvaluetypes.inc');
+ AddInclude('gparam.inc');
+ AddInclude('gclosure.inc');
+ AddInclude('gsignal.inc');
+ AddInclude('gtypeplugin.inc');
+ AddInclude('gobject.inc');
+ AddInclude('gmacros.inc');
+ AddInclude('gtypes.inc');
+ AddInclude('genums.inc');
+ AddInclude('glibconfig.inc');
+ AddInclude('gstrfuncs.inc');
+ AddInclude('gutils.inc');
+ AddInclude('galloca.inc');
+ AddInclude('ghash.inc');
+ AddInclude('gquark.inc');
+ AddInclude('gerror.inc');
+ AddInclude('gbacktrace.inc');
+ AddInclude('gmem.inc');
+ AddInclude('garray.inc');
+ AddInclude('gslist.inc');
+ AddInclude('glist.inc');
+ AddInclude('gcache.inc');
+ AddInclude('gcompletion.inc');
+ AddInclude('gconvert.inc');
+ AddInclude('gdataset.inc');
+ AddInclude('gdate.inc');
+ AddInclude('gdir.inc');
+ AddInclude('gfileutils.inc');
+ AddInclude('ghook.inc');
+ AddInclude('gthread.inc');
+ AddInclude('gthreadpool.inc');
+ AddInclude('gtimer.inc');
+ AddInclude('gmain.inc');
+ AddInclude('gasyncqueue.inc');
+ AddInclude('gunicode.inc');
+ AddInclude('gstring.inc');
+ AddInclude('giochannel.inc');
+ AddInclude('gmessages.inc');
+ AddInclude('gmarkup.inc');
+ AddInclude('gnode.inc');
+ AddInclude('gtree.inc');
+ AddInclude('gpattern.inc');
+ AddInclude('gprimes.inc');
+ AddInclude('gqsort.inc');
+ AddInclude('gqueue.inc');
+ AddInclude('grand.inc');
+ AddInclude('grel.inc');
+ AddInclude('gscanner.inc');
+ AddInclude('gshell.inc');
+ AddInclude('gspawn.inc');
+ AddInclude('gboxed.inc');
+ AddInclude('gmodule.inc');
+ AddInclude('gmarshal.inc');
+ end;
+ T:=P.Targets.AddUnit('gtk2.pas');
+ with T.Dependencies do
+ begin
+ AddInclude('gtkincludes.inc');
+ AddInclude('gtkobject.inc');
+ AddInclude('gtkdebug.inc');
+ AddInclude('gtktypeutils.inc');
+ AddInclude('gtkwidget.inc');
+ AddInclude('gtkmisc.inc');
+ AddInclude('gtkaccelgroup.inc');
+ AddInclude('gtkcontainer.inc');
+ AddInclude('gtkbin.inc');
+ AddInclude('gtkwindow.inc');
+ AddInclude('gtklabel.inc');
+ AddInclude('gtkaccellabel.inc');
+ AddInclude('gtkaccelmap.inc');
+ AddInclude('gtkaccessible.inc');
+ AddInclude('gtkadjustment.inc');
+ AddInclude('gtkalignment.inc');
+ AddInclude('gtkframe.inc');
+ AddInclude('gtkaspectframe.inc');
+ AddInclude('gtkarrow.inc');
+ AddInclude('gtkbindings.inc');
+ AddInclude('gtkbox.inc');
+ AddInclude('gtkbbox.inc');
+ AddInclude('gtkbutton.inc');
+ AddInclude('gtkcalendar.inc');
+ AddInclude('gtkcelleditable.inc');
+ AddInclude('gtkcellrenderer.inc');
+ AddInclude('gtkcellrenderertext.inc');
+ AddInclude('gtkcellrenderertoggle.inc');
+ AddInclude('gtkcellrendererpixbuf.inc');
+ AddInclude('gtkitem.inc');
+ AddInclude('gtkmenuitem.inc');
+ AddInclude('gtktogglebutton.inc');
+ AddInclude('gtkcheckbutton.inc');
+ AddInclude('gtkcheckmenuitem.inc');
+ AddInclude('gtkclipboard.inc');
+ AddInclude('gtkclist.inc');
+ AddInclude('gtkdialog.inc');
+ AddInclude('gtkvbox.inc');
+ AddInclude('gtkcolorsel.inc');
+ AddInclude('gtkcolorseldialog.inc');
+ AddInclude('gtkhbox.inc');
+ AddInclude('gtkcombo.inc');
+ AddInclude('gtkctree.inc');
+ AddInclude('gtkdrawingarea.inc');
+ AddInclude('gtkcurve.inc');
+ AddInclude('gtkdnd.inc');
+ AddInclude('gtkeditable.inc');
+ AddInclude('gtkimcontext.inc');
+ AddInclude('gtkmenushell.inc');
+ AddInclude('gtkmenu.inc');
+ AddInclude('gtkentry.inc');
+ AddInclude('gtkenums.inc');
+ AddInclude('gtkeventbox.inc');
+ AddInclude('fnmatch.inc');
+ AddInclude('gtkfilesel.inc');
+ AddInclude('gtkfixed.inc');
+ AddInclude('gtkfontsel.inc');
+ AddInclude('gtkgamma.inc');
+ AddInclude('gtkgc.inc');
+ AddInclude('gtkhandlebox.inc');
+ AddInclude('gtkpaned.inc');
+ AddInclude('gtkhbbox.inc');
+ AddInclude('gtkhpaned.inc');
+ AddInclude('gtkruler.inc');
+ AddInclude('gtkhruler.inc');
+ AddInclude('gtksettings.inc');
+ AddInclude('gtkrc.inc');
+ AddInclude('gtkstyle.inc');
+ AddInclude('gtkrange.inc');
+ AddInclude('gtkscale.inc');
+ AddInclude('gtkhscale.inc');
+ AddInclude('gtkscrollbar.inc');
+ AddInclude('gtkhscrollbar.inc');
+ AddInclude('gtkseparator.inc');
+ AddInclude('gtkhseparator.inc');
+ AddInclude('gtkiconfactory.inc');
+ AddInclude('gtkimage.inc');
+ AddInclude('gtkimagemenuitem.inc');
+ AddInclude('gtkimcontextsimple.inc');
+ AddInclude('gtkimmulticontext.inc');
+ AddInclude('gtkinputdialog.inc');
+ AddInclude('gtkinvisible.inc');
+ AddInclude('gtkitemfactory.inc');
+ AddInclude('gtklayout.inc');
+ AddInclude('gtklist.inc');
+ AddInclude('gtklistitem.inc');
+ AddInclude('gtktreemodel.inc');
+ AddInclude('gtktreesortable.inc');
+ AddInclude('gtktreemodelsort.inc');
+ AddInclude('gtkliststore.inc');
+ AddInclude('gtkmain.inc');
+ AddInclude('gtkmenubar.inc');
+ AddInclude('gtkmessagedialog.inc');
+ AddInclude('gtknotebook.inc');
+ AddInclude('gtkoldeditable.inc');
+ AddInclude('gtkoptionmenu.inc');
+ AddInclude('gtkpixmap.inc');
+ AddInclude('gtkplug.inc');
+ AddInclude('gtkpreview.inc');
+ AddInclude('gtkprogress.inc');
+ AddInclude('gtkprogressbar.inc');
+ AddInclude('gtkradiobutton.inc');
+ AddInclude('gtkradiomenuitem.inc');
+ AddInclude('gtkscrolledwindow.inc');
+ AddInclude('gtkselection.inc');
+ AddInclude('gtkseparatormenuitem.inc');
+ AddInclude('gtksignal.inc');
+ AddInclude('gtksizegroup.inc');
+ AddInclude('gtksocket.inc');
+ AddInclude('gtkspinbutton.inc');
+ AddInclude('gtkstock.inc');
+ AddInclude('gtkstatusbar.inc');
+ AddInclude('gtktable.inc');
+ AddInclude('gtktearoffmenuitem.inc');
+ AddInclude('gtktext.inc');
+ AddInclude('gtktextiter.inc');
+ AddInclude('gtktexttag.inc');
+ AddInclude('gtktexttagtable.inc');
+ AddInclude('gtktextmark.inc');
+ AddInclude('gtktextmarkprivate.inc');
+ AddInclude('gtktextchild.inc');
+ AddInclude('gtktextchildprivate.inc');
+ AddInclude('gtktextsegment.inc');
+ AddInclude('gtktextbtree.inc');
+ AddInclude('gtktextbuffer.inc');
+ AddInclude('gtktextlayout.inc');
+ AddInclude('gtktextview.inc');
+ AddInclude('gtktipsquery.inc');
+ AddInclude('gtktooltips.inc');
+ AddInclude('gtktoolbar.inc');
+ AddInclude('gtktree.inc');
+ AddInclude('gtktreednd.inc');
+ AddInclude('gtktreeitem.inc');
+ AddInclude('gtktreeselection.inc');
+ AddInclude('gtktreestore.inc');
+ AddInclude('gtktreeviewcolumn.inc');
+ AddInclude('gtkrbtree.inc');
+ AddInclude('gtktreeprivate.inc');
+ AddInclude('gtktreeview.inc');
+ AddInclude('gtkvbbox.inc');
+ AddInclude('gtkviewport.inc');
+ AddInclude('gtkvpaned.inc');
+ AddInclude('gtkvruler.inc');
+ AddInclude('gtkvscale.inc');
+ AddInclude('gtkvscrollbar.inc');
+ AddInclude('gtkvseparator.inc');
+ AddInclude('gtkfilefilter.inc');
+ AddInclude('gtkfilesystem.inc');
+ AddInclude('gtkcellrenderercombo.inc');
+ AddInclude('gtkfilechooser.inc');
+ AddInclude('gtkfilechooserprivate.inc');
+ AddInclude('gtkfilechooserutils.inc');
+ AddInclude('gtkfilechooserwidget.inc');
+ AddInclude('gtkfilechooserdialog.inc');
+ AddInclude('gtkexpander.inc');
+ AddInclude('gtkaction.inc');
+ AddInclude('gtkactiongroup.inc');
+ AddInclude('gtktoggleaction.inc');
+ AddInclude('gtkradioaction.inc');
+ AddInclude('gtkcombobox.inc');
+ AddInclude('gtkcomboboxentry.inc');
+ AddInclude('gtktoolitem.inc');
+ AddInclude('gtktoolbutton.inc');
+ AddInclude('gtktoggletoolbutton.inc');
+ AddInclude('gtkradiotoolbutton.inc');
+ AddInclude('gtkfontbutton.inc');
+ AddInclude('gtkicontheme.inc');
+ AddInclude('gtkcolorbutton.inc');
+ AddInclude('gtkcelllayout.inc');
+ AddInclude('gtkentrycompletion.inc');
+ AddInclude('gtkuimanager.inc');
+ AddInclude('gtktreemodelfilter.inc');
+ AddInclude('gtkincludes.inc');
+ AddInclude('gtkobject.inc');
+ AddInclude('gtkdebug.inc');
+ AddInclude('gtktypeutils.inc');
+ AddInclude('gtkwidget.inc');
+ AddInclude('gtkmisc.inc');
+ AddInclude('gtkaccelgroup.inc');
+ AddInclude('gtkcontainer.inc');
+ AddInclude('gtkbin.inc');
+ AddInclude('gtkwindow.inc');
+ AddInclude('gtklabel.inc');
+ AddInclude('gtkaccellabel.inc');
+ AddInclude('gtkaccelmap.inc');
+ AddInclude('gtkaccessible.inc');
+ AddInclude('gtkadjustment.inc');
+ AddInclude('gtkalignment.inc');
+ AddInclude('gtkframe.inc');
+ AddInclude('gtkaspectframe.inc');
+ AddInclude('gtkarrow.inc');
+ AddInclude('gtkbindings.inc');
+ AddInclude('gtkbox.inc');
+ AddInclude('gtkbbox.inc');
+ AddInclude('gtkbutton.inc');
+ AddInclude('gtkcalendar.inc');
+ AddInclude('gtkcelleditable.inc');
+ AddInclude('gtkcellrenderer.inc');
+ AddInclude('gtkcellrenderertext.inc');
+ AddInclude('gtkcellrenderertoggle.inc');
+ AddInclude('gtkcellrendererpixbuf.inc');
+ AddInclude('gtkitem.inc');
+ AddInclude('gtkmenuitem.inc');
+ AddInclude('gtktogglebutton.inc');
+ AddInclude('gtkcheckbutton.inc');
+ AddInclude('gtkcheckmenuitem.inc');
+ AddInclude('gtkclipboard.inc');
+ AddInclude('gtkclist.inc');
+ AddInclude('gtkdialog.inc');
+ AddInclude('gtkvbox.inc');
+ AddInclude('gtkcolorsel.inc');
+ AddInclude('gtkcolorseldialog.inc');
+ AddInclude('gtkhbox.inc');
+ AddInclude('gtkcombo.inc');
+ AddInclude('gtkctree.inc');
+ AddInclude('gtkdrawingarea.inc');
+ AddInclude('gtkcurve.inc');
+ AddInclude('gtkdnd.inc');
+ AddInclude('gtkeditable.inc');
+ AddInclude('gtkimcontext.inc');
+ AddInclude('gtkmenushell.inc');
+ AddInclude('gtkmenu.inc');
+ AddInclude('gtkentry.inc');
+ AddInclude('gtkenums.inc');
+ AddInclude('gtkeventbox.inc');
+ AddInclude('fnmatch.inc');
+ AddInclude('gtkfilesel.inc');
+ AddInclude('gtkfixed.inc');
+ AddInclude('gtkfontsel.inc');
+ AddInclude('gtkgamma.inc');
+ AddInclude('gtkgc.inc');
+ AddInclude('gtkhandlebox.inc');
+ AddInclude('gtkpaned.inc');
+ AddInclude('gtkhbbox.inc');
+ AddInclude('gtkhpaned.inc');
+ AddInclude('gtkruler.inc');
+ AddInclude('gtkhruler.inc');
+ AddInclude('gtksettings.inc');
+ AddInclude('gtkrc.inc');
+ AddInclude('gtkstyle.inc');
+ AddInclude('gtkrange.inc');
+ AddInclude('gtkscale.inc');
+ AddInclude('gtkhscale.inc');
+ AddInclude('gtkscrollbar.inc');
+ AddInclude('gtkhscrollbar.inc');
+ AddInclude('gtkseparator.inc');
+ AddInclude('gtkhseparator.inc');
+ AddInclude('gtkiconfactory.inc');
+ AddInclude('gtkimage.inc');
+ AddInclude('gtkimagemenuitem.inc');
+ AddInclude('gtkimcontextsimple.inc');
+ AddInclude('gtkimmulticontext.inc');
+ AddInclude('gtkinputdialog.inc');
+ AddInclude('gtkinvisible.inc');
+ AddInclude('gtkitemfactory.inc');
+ AddInclude('gtklayout.inc');
+ AddInclude('gtklist.inc');
+ AddInclude('gtklistitem.inc');
+ AddInclude('gtktreemodel.inc');
+ AddInclude('gtktreesortable.inc');
+ AddInclude('gtktreemodelsort.inc');
+ AddInclude('gtkliststore.inc');
+ AddInclude('gtkmain.inc');
+ AddInclude('gtkmenubar.inc');
+ AddInclude('gtkmessagedialog.inc');
+ AddInclude('gtknotebook.inc');
+ AddInclude('gtkoldeditable.inc');
+ AddInclude('gtkoptionmenu.inc');
+ AddInclude('gtkpixmap.inc');
+ AddInclude('gtkplug.inc');
+ AddInclude('gtkpreview.inc');
+ AddInclude('gtkprogress.inc');
+ AddInclude('gtkprogressbar.inc');
+ AddInclude('gtkradiobutton.inc');
+ AddInclude('gtkradiomenuitem.inc');
+ AddInclude('gtkscrolledwindow.inc');
+ AddInclude('gtkselection.inc');
+ AddInclude('gtkseparatormenuitem.inc');
+ AddInclude('gtksignal.inc');
+ AddInclude('gtksizegroup.inc');
+ AddInclude('gtksocket.inc');
+ AddInclude('gtkspinbutton.inc');
+ AddInclude('gtkstock.inc');
+ AddInclude('gtkstatusbar.inc');
+ AddInclude('gtktable.inc');
+ AddInclude('gtktearoffmenuitem.inc');
+ AddInclude('gtktext.inc');
+ AddInclude('gtktextiter.inc');
+ AddInclude('gtktexttag.inc');
+ AddInclude('gtktexttagtable.inc');
+ AddInclude('gtktextmark.inc');
+ AddInclude('gtktextmarkprivate.inc');
+ AddInclude('gtktextchild.inc');
+ AddInclude('gtktextchildprivate.inc');
+ AddInclude('gtktextsegment.inc');
+ AddInclude('gtktextbtree.inc');
+ AddInclude('gtktextbuffer.inc');
+ AddInclude('gtktextlayout.inc');
+ AddInclude('gtktextview.inc');
+ AddInclude('gtktipsquery.inc');
+ AddInclude('gtktooltips.inc');
+ AddInclude('gtktoolbar.inc');
+ AddInclude('gtktree.inc');
+ AddInclude('gtktreednd.inc');
+ AddInclude('gtktreeitem.inc');
+ AddInclude('gtktreeselection.inc');
+ AddInclude('gtktreestore.inc');
+ AddInclude('gtktreeviewcolumn.inc');
+ AddInclude('gtkrbtree.inc');
+ AddInclude('gtktreeprivate.inc');
+ AddInclude('gtktreeview.inc');
+ AddInclude('gtkvbbox.inc');
+ AddInclude('gtkviewport.inc');
+ AddInclude('gtkvpaned.inc');
+ AddInclude('gtkvruler.inc');
+ AddInclude('gtkvscale.inc');
+ AddInclude('gtkvscrollbar.inc');
+ AddInclude('gtkvseparator.inc');
+ AddInclude('gtkfilefilter.inc');
+ AddInclude('gtkfilesystem.inc');
+ AddInclude('gtkcellrenderercombo.inc');
+ AddInclude('gtkfilechooser.inc');
+ AddInclude('gtkfilechooserprivate.inc');
+ AddInclude('gtkfilechooserutils.inc');
+ AddInclude('gtkfilechooserwidget.inc');
+ AddInclude('gtkfilechooserdialog.inc');
+ AddInclude('gtkexpander.inc');
+ AddInclude('gtkaction.inc');
+ AddInclude('gtkactiongroup.inc');
+ AddInclude('gtktoggleaction.inc');
+ AddInclude('gtkradioaction.inc');
+ AddInclude('gtkcombobox.inc');
+ AddInclude('gtkcomboboxentry.inc');
+ AddInclude('gtktoolitem.inc');
+ AddInclude('gtktoolbutton.inc');
+ AddInclude('gtktoggletoolbutton.inc');
+ AddInclude('gtkradiotoolbutton.inc');
+ AddInclude('gtkfontbutton.inc');
+ AddInclude('gtkicontheme.inc');
+ AddInclude('gtkcolorbutton.inc');
+ AddInclude('gtkcelllayout.inc');
+ AddInclude('gtkentrycompletion.inc');
+ AddInclude('gtkuimanager.inc');
+ AddInclude('gtktreemodelfilter.inc');
+ AddInclude('gtkincludes.inc');
+ AddInclude('gtkobject.inc');
+ AddInclude('gtkdebug.inc');
+ AddInclude('gtktypeutils.inc');
+ AddInclude('gtkwidget.inc');
+ AddInclude('gtkmisc.inc');
+ AddInclude('gtkaccelgroup.inc');
+ AddInclude('gtkcontainer.inc');
+ AddInclude('gtkbin.inc');
+ AddInclude('gtkwindow.inc');
+ AddInclude('gtklabel.inc');
+ AddInclude('gtkaccellabel.inc');
+ AddInclude('gtkaccelmap.inc');
+ AddInclude('gtkaccessible.inc');
+ AddInclude('gtkadjustment.inc');
+ AddInclude('gtkalignment.inc');
+ AddInclude('gtkframe.inc');
+ AddInclude('gtkaspectframe.inc');
+ AddInclude('gtkarrow.inc');
+ AddInclude('gtkbindings.inc');
+ AddInclude('gtkbox.inc');
+ AddInclude('gtkbbox.inc');
+ AddInclude('gtkbutton.inc');
+ AddInclude('gtkcalendar.inc');
+ AddInclude('gtkcelleditable.inc');
+ AddInclude('gtkcellrenderer.inc');
+ AddInclude('gtkcellrenderertext.inc');
+ AddInclude('gtkcellrenderertoggle.inc');
+ AddInclude('gtkcellrendererpixbuf.inc');
+ AddInclude('gtkitem.inc');
+ AddInclude('gtkmenuitem.inc');
+ AddInclude('gtktogglebutton.inc');
+ AddInclude('gtkcheckbutton.inc');
+ AddInclude('gtkcheckmenuitem.inc');
+ AddInclude('gtkclipboard.inc');
+ AddInclude('gtkclist.inc');
+ AddInclude('gtkdialog.inc');
+ AddInclude('gtkvbox.inc');
+ AddInclude('gtkcolorsel.inc');
+ AddInclude('gtkcolorseldialog.inc');
+ AddInclude('gtkhbox.inc');
+ AddInclude('gtkcombo.inc');
+ AddInclude('gtkctree.inc');
+ AddInclude('gtkdrawingarea.inc');
+ AddInclude('gtkcurve.inc');
+ AddInclude('gtkdnd.inc');
+ AddInclude('gtkeditable.inc');
+ AddInclude('gtkimcontext.inc');
+ AddInclude('gtkmenushell.inc');
+ AddInclude('gtkmenu.inc');
+ AddInclude('gtkentry.inc');
+ AddInclude('gtkenums.inc');
+ AddInclude('gtkeventbox.inc');
+ AddInclude('fnmatch.inc');
+ AddInclude('gtkfilesel.inc');
+ AddInclude('gtkfixed.inc');
+ AddInclude('gtkfontsel.inc');
+ AddInclude('gtkgamma.inc');
+ AddInclude('gtkgc.inc');
+ AddInclude('gtkhandlebox.inc');
+ AddInclude('gtkpaned.inc');
+ AddInclude('gtkhbbox.inc');
+ AddInclude('gtkhpaned.inc');
+ AddInclude('gtkruler.inc');
+ AddInclude('gtkhruler.inc');
+ AddInclude('gtksettings.inc');
+ AddInclude('gtkrc.inc');
+ AddInclude('gtkstyle.inc');
+ AddInclude('gtkrange.inc');
+ AddInclude('gtkscale.inc');
+ AddInclude('gtkhscale.inc');
+ AddInclude('gtkscrollbar.inc');
+ AddInclude('gtkhscrollbar.inc');
+ AddInclude('gtkseparator.inc');
+ AddInclude('gtkhseparator.inc');
+ AddInclude('gtkiconfactory.inc');
+ AddInclude('gtkimage.inc');
+ AddInclude('gtkimagemenuitem.inc');
+ AddInclude('gtkimcontextsimple.inc');
+ AddInclude('gtkimmulticontext.inc');
+ AddInclude('gtkinputdialog.inc');
+ AddInclude('gtkinvisible.inc');
+ AddInclude('gtkitemfactory.inc');
+ AddInclude('gtklayout.inc');
+ AddInclude('gtklist.inc');
+ AddInclude('gtklistitem.inc');
+ AddInclude('gtktreemodel.inc');
+ AddInclude('gtktreesortable.inc');
+ AddInclude('gtktreemodelsort.inc');
+ AddInclude('gtkliststore.inc');
+ AddInclude('gtkmain.inc');
+ AddInclude('gtkmenubar.inc');
+ AddInclude('gtkmessagedialog.inc');
+ AddInclude('gtknotebook.inc');
+ AddInclude('gtkoldeditable.inc');
+ AddInclude('gtkoptionmenu.inc');
+ AddInclude('gtkpixmap.inc');
+ AddInclude('gtkplug.inc');
+ AddInclude('gtkpreview.inc');
+ AddInclude('gtkprogress.inc');
+ AddInclude('gtkprogressbar.inc');
+ AddInclude('gtkradiobutton.inc');
+ AddInclude('gtkradiomenuitem.inc');
+ AddInclude('gtkscrolledwindow.inc');
+ AddInclude('gtkselection.inc');
+ AddInclude('gtkseparatormenuitem.inc');
+ AddInclude('gtksignal.inc');
+ AddInclude('gtksizegroup.inc');
+ AddInclude('gtksocket.inc');
+ AddInclude('gtkspinbutton.inc');
+ AddInclude('gtkstock.inc');
+ AddInclude('gtkstatusbar.inc');
+ AddInclude('gtktable.inc');
+ AddInclude('gtktearoffmenuitem.inc');
+ AddInclude('gtktext.inc');
+ AddInclude('gtktextiter.inc');
+ AddInclude('gtktexttag.inc');
+ AddInclude('gtktexttagtable.inc');
+ AddInclude('gtktextmark.inc');
+ AddInclude('gtktextmarkprivate.inc');
+ AddInclude('gtktextchild.inc');
+ AddInclude('gtktextchildprivate.inc');
+ AddInclude('gtktextsegment.inc');
+ AddInclude('gtktextbtree.inc');
+ AddInclude('gtktextbuffer.inc');
+ AddInclude('gtktextlayout.inc');
+ AddInclude('gtktextview.inc');
+ AddInclude('gtktipsquery.inc');
+ AddInclude('gtktooltips.inc');
+ AddInclude('gtktoolbar.inc');
+ AddInclude('gtktree.inc');
+ AddInclude('gtktreednd.inc');
+ AddInclude('gtktreeitem.inc');
+ AddInclude('gtktreeselection.inc');
+ AddInclude('gtktreestore.inc');
+ AddInclude('gtktreeviewcolumn.inc');
+ AddInclude('gtkrbtree.inc');
+ AddInclude('gtktreeprivate.inc');
+ AddInclude('gtktreeview.inc');
+ AddInclude('gtkvbbox.inc');
+ AddInclude('gtkviewport.inc');
+ AddInclude('gtkvpaned.inc');
+ AddInclude('gtkvruler.inc');
+ AddInclude('gtkvscale.inc');
+ AddInclude('gtkvscrollbar.inc');
+ AddInclude('gtkvseparator.inc');
+ AddInclude('gtkfilefilter.inc');
+ AddInclude('gtkfilesystem.inc');
+ AddInclude('gtkcellrenderercombo.inc');
+ AddInclude('gtkfilechooser.inc');
+ AddInclude('gtkfilechooserprivate.inc');
+ AddInclude('gtkfilechooserutils.inc');
+ AddInclude('gtkfilechooserwidget.inc');
+ AddInclude('gtkfilechooserdialog.inc');
+ AddInclude('gtkexpander.inc');
+ AddInclude('gtkaction.inc');
+ AddInclude('gtkactiongroup.inc');
+ AddInclude('gtktoggleaction.inc');
+ AddInclude('gtkradioaction.inc');
+ AddInclude('gtkcombobox.inc');
+ AddInclude('gtkcomboboxentry.inc');
+ AddInclude('gtktoolitem.inc');
+ AddInclude('gtktoolbutton.inc');
+ AddInclude('gtktoggletoolbutton.inc');
+ AddInclude('gtkradiotoolbutton.inc');
+ AddInclude('gtkfontbutton.inc');
+ AddInclude('gtkicontheme.inc');
+ AddInclude('gtkcolorbutton.inc');
+ AddInclude('gtkcelllayout.inc');
+ AddInclude('gtkentrycompletion.inc');
+ AddInclude('gtkuimanager.inc');
+ AddInclude('gtktreemodelfilter.inc');
+ AddInclude('gtkincludes.inc');
+ AddInclude('gtkobject.inc');
+ AddInclude('gtkdebug.inc');
+ AddInclude('gtktypeutils.inc');
+ AddInclude('gtkwidget.inc');
+ AddInclude('gtkmisc.inc');
+ AddInclude('gtkaccelgroup.inc');
+ AddInclude('gtkcontainer.inc');
+ AddInclude('gtkbin.inc');
+ AddInclude('gtkwindow.inc');
+ AddInclude('gtklabel.inc');
+ AddInclude('gtkaccellabel.inc');
+ AddInclude('gtkaccelmap.inc');
+ AddInclude('gtkaccessible.inc');
+ AddInclude('gtkadjustment.inc');
+ AddInclude('gtkalignment.inc');
+ AddInclude('gtkframe.inc');
+ AddInclude('gtkaspectframe.inc');
+ AddInclude('gtkarrow.inc');
+ AddInclude('gtkbindings.inc');
+ AddInclude('gtkbox.inc');
+ AddInclude('gtkbbox.inc');
+ AddInclude('gtkbutton.inc');
+ AddInclude('gtkcalendar.inc');
+ AddInclude('gtkcelleditable.inc');
+ AddInclude('gtkcellrenderer.inc');
+ AddInclude('gtkcellrenderertext.inc');
+ AddInclude('gtkcellrenderertoggle.inc');
+ AddInclude('gtkcellrendererpixbuf.inc');
+ AddInclude('gtkitem.inc');
+ AddInclude('gtkmenuitem.inc');
+ AddInclude('gtktogglebutton.inc');
+ AddInclude('gtkcheckbutton.inc');
+ AddInclude('gtkcheckmenuitem.inc');
+ AddInclude('gtkclipboard.inc');
+ AddInclude('gtkclist.inc');
+ AddInclude('gtkdialog.inc');
+ AddInclude('gtkvbox.inc');
+ AddInclude('gtkcolorsel.inc');
+ AddInclude('gtkcolorseldialog.inc');
+ AddInclude('gtkhbox.inc');
+ AddInclude('gtkcombo.inc');
+ AddInclude('gtkctree.inc');
+ AddInclude('gtkdrawingarea.inc');
+ AddInclude('gtkcurve.inc');
+ AddInclude('gtkdnd.inc');
+ AddInclude('gtkeditable.inc');
+ AddInclude('gtkimcontext.inc');
+ AddInclude('gtkmenushell.inc');
+ AddInclude('gtkmenu.inc');
+ AddInclude('gtkentry.inc');
+ AddInclude('gtkenums.inc');
+ AddInclude('gtkeventbox.inc');
+ AddInclude('fnmatch.inc');
+ AddInclude('gtkfilesel.inc');
+ AddInclude('gtkfixed.inc');
+ AddInclude('gtkfontsel.inc');
+ AddInclude('gtkgamma.inc');
+ AddInclude('gtkgc.inc');
+ AddInclude('gtkhandlebox.inc');
+ AddInclude('gtkpaned.inc');
+ AddInclude('gtkhbbox.inc');
+ AddInclude('gtkhpaned.inc');
+ AddInclude('gtkruler.inc');
+ AddInclude('gtkhruler.inc');
+ AddInclude('gtksettings.inc');
+ AddInclude('gtkrc.inc');
+ AddInclude('gtkstyle.inc');
+ AddInclude('gtkrange.inc');
+ AddInclude('gtkscale.inc');
+ AddInclude('gtkhscale.inc');
+ AddInclude('gtkscrollbar.inc');
+ AddInclude('gtkhscrollbar.inc');
+ AddInclude('gtkseparator.inc');
+ AddInclude('gtkhseparator.inc');
+ AddInclude('gtkiconfactory.inc');
+ AddInclude('gtkimage.inc');
+ AddInclude('gtkimagemenuitem.inc');
+ AddInclude('gtkimcontextsimple.inc');
+ AddInclude('gtkimmulticontext.inc');
+ AddInclude('gtkinputdialog.inc');
+ AddInclude('gtkinvisible.inc');
+ AddInclude('gtkitemfactory.inc');
+ AddInclude('gtklayout.inc');
+ AddInclude('gtklist.inc');
+ AddInclude('gtklistitem.inc');
+ AddInclude('gtktreemodel.inc');
+ AddInclude('gtktreesortable.inc');
+ AddInclude('gtktreemodelsort.inc');
+ AddInclude('gtkliststore.inc');
+ AddInclude('gtkmain.inc');
+ AddInclude('gtkmenubar.inc');
+ AddInclude('gtkmessagedialog.inc');
+ AddInclude('gtknotebook.inc');
+ AddInclude('gtkoldeditable.inc');
+ AddInclude('gtkoptionmenu.inc');
+ AddInclude('gtkpixmap.inc');
+ AddInclude('gtkplug.inc');
+ AddInclude('gtkpreview.inc');
+ AddInclude('gtkprogress.inc');
+ AddInclude('gtkprogressbar.inc');
+ AddInclude('gtkradiobutton.inc');
+ AddInclude('gtkradiomenuitem.inc');
+ AddInclude('gtkscrolledwindow.inc');
+ AddInclude('gtkselection.inc');
+ AddInclude('gtkseparatormenuitem.inc');
+ AddInclude('gtksignal.inc');
+ AddInclude('gtksizegroup.inc');
+ AddInclude('gtksocket.inc');
+ AddInclude('gtkspinbutton.inc');
+ AddInclude('gtkstock.inc');
+ AddInclude('gtkstatusbar.inc');
+ AddInclude('gtktable.inc');
+ AddInclude('gtktearoffmenuitem.inc');
+ AddInclude('gtktext.inc');
+ AddInclude('gtktextiter.inc');
+ AddInclude('gtktexttag.inc');
+ AddInclude('gtktexttagtable.inc');
+ AddInclude('gtktextmark.inc');
+ AddInclude('gtktextmarkprivate.inc');
+ AddInclude('gtktextchild.inc');
+ AddInclude('gtktextchildprivate.inc');
+ AddInclude('gtktextsegment.inc');
+ AddInclude('gtktextbtree.inc');
+ AddInclude('gtktextbuffer.inc');
+ AddInclude('gtktextlayout.inc');
+ AddInclude('gtktextview.inc');
+ AddInclude('gtktipsquery.inc');
+ AddInclude('gtktooltips.inc');
+ AddInclude('gtktoolbar.inc');
+ AddInclude('gtktree.inc');
+ AddInclude('gtktreednd.inc');
+ AddInclude('gtktreeitem.inc');
+ AddInclude('gtktreeselection.inc');
+ AddInclude('gtktreestore.inc');
+ AddInclude('gtktreeviewcolumn.inc');
+ AddInclude('gtkrbtree.inc');
+ AddInclude('gtktreeprivate.inc');
+ AddInclude('gtktreeview.inc');
+ AddInclude('gtkvbbox.inc');
+ AddInclude('gtkviewport.inc');
+ AddInclude('gtkvpaned.inc');
+ AddInclude('gtkvruler.inc');
+ AddInclude('gtkvscale.inc');
+ AddInclude('gtkvscrollbar.inc');
+ AddInclude('gtkvseparator.inc');
+ AddInclude('gtkfilefilter.inc');
+ AddInclude('gtkfilesystem.inc');
+ AddInclude('gtkcellrenderercombo.inc');
+ AddInclude('gtkfilechooser.inc');
+ AddInclude('gtkfilechooserprivate.inc');
+ AddInclude('gtkfilechooserutils.inc');
+ AddInclude('gtkfilechooserwidget.inc');
+ AddInclude('gtkfilechooserdialog.inc');
+ AddInclude('gtkexpander.inc');
+ AddInclude('gtkaction.inc');
+ AddInclude('gtkactiongroup.inc');
+ AddInclude('gtktoggleaction.inc');
+ AddInclude('gtkradioaction.inc');
+ AddInclude('gtkcombobox.inc');
+ AddInclude('gtkcomboboxentry.inc');
+ AddInclude('gtktoolitem.inc');
+ AddInclude('gtktoolbutton.inc');
+ AddInclude('gtktoggletoolbutton.inc');
+ AddInclude('gtkradiotoolbutton.inc');
+ AddInclude('gtkfontbutton.inc');
+ AddInclude('gtkicontheme.inc');
+ AddInclude('gtkcolorbutton.inc');
+ AddInclude('gtkcelllayout.inc');
+ AddInclude('gtkentrycompletion.inc');
+ AddInclude('gtkuimanager.inc');
+ AddInclude('gtktreemodelfilter.inc');
+ AddUnit('glib2');
+ AddUnit('atk');
+ AddUnit('pango');
+ AddUnit('gdk2pixbuf');
+ AddUnit('gdk2');
+ end;
+ T:=P.Targets.AddUnit('gtkglext.pas');
+ with T.Dependencies do
+ begin
+ AddInclude('gtkglext_includes.inc');
+ AddInclude('gtkgldefs.inc');
+ AddInclude('gtkglversion.inc');
+ AddInclude('gtkglinit.inc');
+ AddInclude('gtkglwidget.inc');
+ AddInclude('gtkglext_includes.inc');
+ AddInclude('gtkgldefs.inc');
+ AddInclude('gtkglversion.inc');
+ AddInclude('gtkglinit.inc');
+ AddInclude('gtkglwidget.inc');
+ AddInclude('gtkglext_includes.inc');
+ AddInclude('gtkgldefs.inc');
+ AddInclude('gtkglversion.inc');
+ AddInclude('gtkglinit.inc');
+ AddInclude('gtkglwidget.inc');
+ AddUnit('glib2');
+ AddUnit('gdk2');
+ AddUnit('gtk2');
+ AddUnit('gdkglext');
+ end;
+ T:=P.Targets.AddUnit('libglade2.pas');
+ with T.Dependencies do
+ begin
+ AddInclude('glade-init.inc');
+ AddInclude('glade-xml.inc');
+ AddUnit('glib2');
+ AddUnit('gtk2');
+ end;
+ T:=P.Targets.AddUnit('pango.pas');
+ with T.Dependencies do
+ begin
+ AddInclude('pangoincludes.inc');
+ AddInclude('pango-types.inc');
+ AddInclude('pango-attributes.inc');
+ AddInclude('pango-break.inc');
+ AddInclude('pango-context.inc');
+ AddInclude('pango-coverage.inc');
+ AddInclude('pango-engine.inc');
+ AddInclude('pango-fontset.inc');
+ AddInclude('pango-font.inc');
+ AddInclude('pango-fontmap.inc');
+ AddInclude('pango-glyph.inc');
+ AddInclude('pango-item.inc');
+ AddInclude('pango-layout.inc');
+ AddInclude('pango-tabs.inc');
+ AddInclude('pangoincludes.inc');
+ AddInclude('pango-types.inc');
+ AddInclude('pango-attributes.inc');
+ AddInclude('pango-break.inc');
+ AddInclude('pango-context.inc');
+ AddInclude('pango-coverage.inc');
+ AddInclude('pango-engine.inc');
+ AddInclude('pango-fontset.inc');
+ AddInclude('pango-font.inc');
+ AddInclude('pango-fontmap.inc');
+ AddInclude('pango-glyph.inc');
+ AddInclude('pango-item.inc');
+ AddInclude('pango-layout.inc');
+ AddInclude('pango-tabs.inc');
+ AddInclude('pangoincludes.inc');
+ AddInclude('pango-types.inc');
+ AddInclude('pango-attributes.inc');
+ AddInclude('pango-break.inc');
+ AddInclude('pango-context.inc');
+ AddInclude('pango-coverage.inc');
+ AddInclude('pango-engine.inc');
+ AddInclude('pango-fontset.inc');
+ AddInclude('pango-font.inc');
+ AddInclude('pango-fontmap.inc');
+ AddInclude('pango-glyph.inc');
+ AddInclude('pango-item.inc');
+ AddInclude('pango-layout.inc');
+ AddInclude('pango-tabs.inc');
+ AddInclude('pangoincludes.inc');
+ AddInclude('pango-types.inc');
+ AddInclude('pango-attributes.inc');
+ AddInclude('pango-break.inc');
+ AddInclude('pango-context.inc');
+ AddInclude('pango-coverage.inc');
+ AddInclude('pango-engine.inc');
+ AddInclude('pango-fontset.inc');
+ AddInclude('pango-font.inc');
+ AddInclude('pango-fontmap.inc');
+ AddInclude('pango-glyph.inc');
+ AddInclude('pango-item.inc');
+ AddInclude('pango-layout.inc');
+ AddInclude('pango-tabs.inc');
+ AddUnit('glib2');
+ end;
+
+{$ifndef ALLPACKAGES}
+ Run;
+ end;
+end.
+{$endif ALLPACKAGES}
diff --git a/packages/gtk2/src/atk/atk.inc b/packages/gtk2/src/atk/atk.inc
new file mode 100644
index 0000000000..91d4cb3fd4
--- /dev/null
+++ b/packages/gtk2/src/atk/atk.inc
@@ -0,0 +1,55 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ ATK - Accessibility Toolkit
+ Copyright 2001 Sun Microsystems Inc.
+
+ 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.
+ }
+{$ifndef __ATK_H__}
+{$define __ATK_H__}
+{$include <atk/atkobject.inc}
+{$include <atk/atkaction.inc}
+{$include <atk/atkcomponent.inc}
+{$include <atk/atkdocument.inc}
+{$include <atk/atkeditabletext.inc}
+{$include <atk/atkgobjectaccessible.inc}
+{$include <atk/atkhyperlink.inc}
+{$include <atk/atkhypertext.inc}
+{$include <atk/atkimage.inc}
+{$include <atk/atkobjectfactory.inc}
+{$include <atk/atkregistry.inc}
+{$include <atk/atkrelation.inc}
+{$include <atk/atkrelationset.inc}
+{$include <atk/atkselection.inc}
+{$include <atk/atkstate.inc}
+{$include <atk/atkstateset.inc}
+{$include <atk/atkstreamablecontent.inc}
+{$include <atk/atktable.inc}
+{$include <atk/atktext.inc}
+{$include <atk/atkutil.inc}
+{$include <atk/atkvalue.inc}
+{$endif}
+{ __ATK_H__ }
+
diff --git a/packages/gtk2/src/atk/atk.pas b/packages/gtk2/src/atk/atk.pas
new file mode 100644
index 0000000000..2af1927fc6
--- /dev/null
+++ b/packages/gtk2/src/atk/atk.pas
@@ -0,0 +1,91 @@
+{ ATK - Accessibility Toolkit
+ Copyright 2001 Sun Microsystems Inc.
+
+ 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 atk; // keep unit name lowercase for kylix
+
+{$IFDEF FPC}
+ {$mode objfpc}
+{$ENDIF}
+{$IFDEF VER140}
+ {$DEFINE KYLIX}
+{$ENDIF}
+
+interface
+
+uses glib2;
+
+const
+{$ifdef win32}
+ {$define atkwin}
+ atklib = 'libatk-1.0-0.dll';
+ {$IFDEF FPC}
+ {$ifndef NO_SMART_LINK}
+ {$smartlink on}
+ {$endif}
+ {$ENDIF}
+{$else}
+ {$ifdef UseCustomLibs}
+ atklib = '';
+ {$else}
+ atklib = 'libatk-1.0.so';
+ {$endif}
+{$endif}
+
+{$IFNDEF KYLIX}
+ {$PACKRECORDS C}
+{$ELSE}
+ {$ALIGN 4}
+ {$WEAKPACKAGEUNIT}
+ {$WARNINGS OFF}
+{$ENDIF}
+
+type
+{$DEFINE read_forward_definitions}
+ // internal types
+ PAtkImplementor = pointer;
+ PAtkAction = pointer;
+ PAtkComponent = pointer;
+ PAtkDocument = pointer;
+ PAtkEditableText = pointer;
+ PAtkHypertext = pointer;
+ PAtkImage = pointer;
+ PAtkSelection = pointer;
+ PAtkStreamableContent = pointer;
+ PAtkTable = pointer;
+ PAtkText = pointer;
+ PAtkValue = pointer;
+
+{$include atkincludes.inc}
+{$UNDEF read_forward_definitions}
+
+{$DEFINE read_interface_types}
+{$include atkincludes.inc}
+{$UNDEF read_interface_types}
+
+{$DEFINE read_interface_rest}
+{$include atkincludes.inc}
+{$UNDEF read_interface_rest}
+
+implementation
+
+// call implementation parts of header files
+{$DEFINE read_implementation}
+{$include atkincludes.inc}
+{$UNDEF read_implementation}
+
+end.
diff --git a/packages/gtk2/src/atk/atkaction.inc b/packages/gtk2/src/atk/atkaction.inc
new file mode 100644
index 0000000000..e7ba644cf1
--- /dev/null
+++ b/packages/gtk2/src/atk/atkaction.inc
@@ -0,0 +1,89 @@
+// included by atk.pp
+
+{
+ The interface AtkAction should be supported by any anObject that can
+ perform one or more actions. The interface provides the standard
+ mechanism for an assistive technology to determine what those actions
+ are as well as tell the anObject to perform them. Any anObject that can
+ be manipulated should support this interface.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PAtkActionIface = ^TAtkActionIface;
+ TAtkActionIface = record
+ parent : TGTypeInterface;
+ do_action : function (action:PAtkAction; i:gint):gboolean; cdecl;
+ get_n_actions : function (action:PAtkAction):gint; cdecl;
+ get_description : function (action:PAtkAction; i:gint):Pgchar; cdecl;
+ get_name : function (action:PAtkAction; i:gint):Pgchar; cdecl;
+ get_keybinding : function (action:PAtkAction; i:gint):Pgchar; cdecl;
+ set_description : function (action:PAtkAction; i:gint; desc:Pgchar):gboolean; cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_ACTION : GType;
+function ATK_IS_ACTION(obj: pointer) : boolean;
+function ATK_ACTION(obj: pointer) : PAtkAction;
+function ATK_ACTION_GET_IFACE(obj: pointer) : PAtkActionIface;
+
+
+{
+ These are the function which would be called by an application with
+ the argument being a AtkObject anObject cast to (AtkAction).
+
+ The function will just check that the corresponding
+ function pointer is not NULL and will call it.
+
+ The "real" implementation of the function for accessible will be
+ provided in a support library
+ }
+function atk_action_get_type:GType; cdecl; external atklib;
+function atk_action_do_action(action:PAtkAction; i:gint):gboolean; cdecl; external atklib;
+function atk_action_get_n_actions(action:PAtkAction):gint; cdecl; external atklib;
+function atk_action_get_description(action:PAtkAction; i:gint):Pgchar; cdecl; external atklib;
+function atk_action_get_name(action:PAtkAction; i:gint):Pgchar; cdecl; external atklib;
+function atk_action_get_keybinding(action:PAtkAction; i:gint):Pgchar; cdecl; external atklib;
+function atk_action_set_description(action:PAtkAction; i:gint; desc:Pgchar):gboolean; cdecl; external atklib;
+{
+ Additional GObject properties exported by AtkAction:
+ "accessible_action"
+ (an accessible action, or the list of actions, has changed)
+ }
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_ACTION : GType;
+begin
+ ATK_TYPE_ACTION:=atk_action_get_type;
+end;
+
+function ATK_IS_ACTION(obj: pointer) : boolean;
+begin
+ ATK_IS_ACTION:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_ACTION);
+end;
+
+function ATK_ACTION(obj: pointer) : PAtkAction;
+begin
+ ATK_ACTION:=PAtkAction(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_ACTION));
+end;
+
+function ATK_ACTION_GET_IFACE(obj: pointer) : PAtkActionIface;
+begin
+ ATK_ACTION_GET_IFACE:=PAtkActionIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_ACTION));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkcomponent.inc b/packages/gtk2/src/atk/atkcomponent.inc
new file mode 100644
index 0000000000..369ce3b0d8
--- /dev/null
+++ b/packages/gtk2/src/atk/atkcomponent.inc
@@ -0,0 +1,92 @@
+// included by atk.pp
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ TAtkFocusHandler = procedure (para1:PAtkObject; para2:gboolean); cdecl;
+ PAtkComponentIface = ^TAtkComponentIface;
+ TAtkComponentIface = record
+ parent : TGTypeInterface;
+ add_focus_handler : function (component:PAtkComponent; handler:TAtkFocusHandler):guint; cdecl;
+ contains : function (component:PAtkComponent; x:gint; y:gint; coord_type:TAtkCoordType):gboolean; cdecl;
+ ref_accessible_at_point : function (component:PAtkComponent; x:gint; y:gint; coord_type:TAtkCoordType):PAtkObject; cdecl;
+ get_extents : procedure (component:PAtkComponent; x:Pgint; y:Pgint; width:Pgint; height:Pgint;
+ coord_type:TAtkCoordType); cdecl;
+ get_position : procedure (component:PAtkComponent; x:Pgint; y:Pgint; coord_type:TAtkCoordType); cdecl;
+ get_size : procedure (component:PAtkComponent; width:Pgint; height:Pgint); cdecl;
+ grab_focus : function (component:PAtkComponent):gboolean; cdecl;
+ remove_focus_handler : procedure (component:PAtkComponent; handler_id:guint); cdecl;
+ set_extents : function (component:PAtkComponent; x:gint; y:gint; width:gint; height:gint;
+ coord_type:TAtkCoordType):gboolean; cdecl;
+ set_position : function (component:PAtkComponent; x:gint; y:gint; coord_type:TAtkCoordType):gboolean; cdecl;
+ set_size : function (component:PAtkComponent; width:gint; height:gint):gboolean; cdecl;
+ get_layer : function (component:PAtkComponent):TAtkLayer; cdecl;
+ get_mdi_zorder : function (component:PAtkComponent):gint; cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{
+ The AtkComponent interface should be supported by any anObject that is
+ rendered on the screen. The interface provides the standard mechanism
+ for an assistive technology to determine and set the graphical
+ representation of an anObject.
+ }
+function ATK_TYPE_COMPONENT : GType;
+function ATK_IS_COMPONENT(obj: pointer) : boolean;
+function ATK_COMPONENT(obj: pointer) : PAtkComponent;
+function ATK_COMPONENT_GET_IFACE(obj: pointer) : PAtkComponentIface;
+
+
+{ convenience functions }
+function atk_component_get_type:GType; cdecl; external atklib;
+function atk_component_add_focus_handler(component:PAtkComponent; handler:TAtkFocusHandler):guint; cdecl; external atklib;
+function atk_component_contains(component:PAtkComponent; x:gint; y:gint; coord_type:TAtkCoordType):gboolean; cdecl; external atklib;
+function atk_component_ref_accessible_at_point(component:PAtkComponent; x:gint; y:gint; coord_type:TAtkCoordType):PAtkObject; cdecl; external atklib;
+procedure atk_component_get_extents(component:PAtkComponent; x:Pgint; y:Pgint; width:Pgint; height:Pgint;
+ coord_type:TAtkCoordType); cdecl; external atklib;
+procedure atk_component_get_position(component:PAtkComponent; x:Pgint; y:Pgint; coord_type:TAtkCoordType); cdecl; external atklib;
+procedure atk_component_get_size(component:PAtkComponent; width:Pgint; height:Pgint); cdecl; external atklib;
+function atk_component_get_layer(component:PAtkComponent):TAtkLayer; cdecl; external atklib;
+function atk_component_get_mdi_zorder(component:PAtkComponent):gint; cdecl; external atklib;
+function atk_component_grab_focus(component:PAtkComponent):gboolean; cdecl; external atklib;
+procedure atk_component_remove_focus_handler(component:PAtkComponent; handler_id:guint); cdecl; external atklib;
+function atk_component_set_extents(component:PAtkComponent; x:gint; y:gint; width:gint; height:gint;
+ coord_type:TAtkCoordType):gboolean; cdecl; external atklib;
+function atk_component_set_position(component:PAtkComponent; x:gint; y:gint; coord_type:TAtkCoordType):gboolean; cdecl; external atklib;
+function atk_component_set_size(component:PAtkComponent; width:gint; height:gint):gboolean; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_COMPONENT : GType;
+begin
+ ATK_TYPE_COMPONENT:=atk_component_get_type;
+end;
+
+function ATK_IS_COMPONENT(obj: pointer) : boolean;
+begin
+ ATK_IS_COMPONENT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_COMPONENT);
+end;
+
+function ATK_COMPONENT(obj: pointer) : PAtkComponent;
+begin
+ ATK_COMPONENT:=PAtkComponent(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_COMPONENT));
+end;
+
+function ATK_COMPONENT_GET_IFACE(obj: pointer) : PAtkComponentIface;
+begin
+ ATK_COMPONENT_GET_IFACE:=PAtkComponentIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_COMPONENT));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkdocument.inc b/packages/gtk2/src/atk/atkdocument.inc
new file mode 100644
index 0000000000..f19e69b020
--- /dev/null
+++ b/packages/gtk2/src/atk/atkdocument.inc
@@ -0,0 +1,71 @@
+// included by atk.pp
+
+{
+ The AtkDocument interface should be supported by any anObject that has an
+ associated document anObject model (DOM). This interface provides the
+ standard mechanism allowing an assistive technology access to the DOM.
+ }
+
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PAtkDocumentIface = ^TAtkDocumentIface;
+ TAtkDocumentIface = record
+ parent : TGTypeInterface;
+ get_document_type : function (document:PAtkDocument):Pgchar; cdecl;
+ get_document : function (document:PAtkDocument):gpointer; cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ pad3 : TAtkFunction;
+ pad4 : TAtkFunction;
+ pad5 : TAtkFunction;
+ pad6 : TAtkFunction;
+ pad7 : TAtkFunction;
+ pad8 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_DOCUMENT : GType;
+function ATK_IS_DOCUMENT(obj: pointer) : boolean;
+function ATK_DOCUMENT(obj: pointer) : PAtkDocument;
+function ATK_DOCUMENT_GET_IFACE(obj: pointer) : PAtkDocumentIface;
+
+
+function atk_document_get_type:GType; cdecl; external atklib;
+function atk_document_get_document_type(document:PAtkDocument):Pgchar; cdecl; external atklib;
+function atk_document_get_document(document:PAtkDocument):gpointer; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_DOCUMENT : GType;
+begin
+ ATK_TYPE_DOCUMENT:=atk_document_get_type;
+end;
+
+function ATK_IS_DOCUMENT(obj: pointer) : boolean;
+begin
+ ATK_IS_DOCUMENT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_DOCUMENT);
+end;
+
+function ATK_DOCUMENT(obj: pointer) : PAtkDocument;
+begin
+ ATK_DOCUMENT:=PAtkDocument(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_DOCUMENT));
+end;
+
+function ATK_DOCUMENT_GET_IFACE(obj: pointer) : PAtkDocumentIface;
+begin
+ ATK_DOCUMENT_GET_IFACE:=PAtkDocumentIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_DOCUMENT));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkeditabletext.inc b/packages/gtk2/src/atk/atkeditabletext.inc
new file mode 100644
index 0000000000..42948fbfa0
--- /dev/null
+++ b/packages/gtk2/src/atk/atkeditabletext.inc
@@ -0,0 +1,73 @@
+// included by atk.pp
+
+{
+ AtkEditableText is used to support access in an "accessibility" context
+ to editing features of editable text widgets.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PAtkEditableTextIface = ^TAtkEditableTextIface;
+ TAtkEditableTextIface = record
+ parent_interface : TGTypeInterface;
+ set_run_attributes : function (text:PAtkEditableText; attrib_set:PAtkAttributeSet; start_offset:gint; end_offset:gint):gboolean; cdecl;
+ set_text_contents : procedure (text:PAtkEditableText; _string:Pgchar); cdecl;
+ insert_text : procedure (text:PAtkEditableText; _string:Pgchar; length:gint; position:Pgint); cdecl;
+ copy_text : procedure (text:PAtkEditableText; start_pos:gint; end_pos:gint); cdecl;
+ cut_text : procedure (text:PAtkEditableText; start_pos:gint; end_pos:gint); cdecl;
+ delete_text : procedure (text:PAtkEditableText; start_pos:gint; end_pos:gint); cdecl;
+ paste_text : procedure (text:PAtkEditableText; position:gint); cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_EDITABLE_TEXT : GType;
+function ATK_IS_EDITABLE_TEXT(obj: pointer) : boolean;
+function ATK_EDITABLE_TEXT(obj: pointer) : PAtkEditableText;
+function ATK_EDITABLE_TEXT_GET_IFACE(obj: pointer) : PAtkEditableTextIface;
+
+
+function atk_editable_text_get_type:GType; cdecl; external atklib;
+function atk_editable_text_set_run_attributes(text:PAtkEditableText; attrib_set:PAtkAttributeSet; start_offset:gint; end_offset:gint):gboolean; cdecl; external atklib;
+procedure atk_editable_text_set_text_contents(text:PAtkEditableText; _string:Pgchar); cdecl; external atklib;
+procedure atk_editable_text_insert_text(text:PAtkEditableText; _string:Pgchar; length:gint; position:Pgint); cdecl; external atklib;
+procedure atk_editable_text_copy_text(text:PAtkEditableText; start_pos:gint; end_pos:gint); cdecl; external atklib;
+procedure atk_editable_text_cut_text(text:PAtkEditableText; start_pos:gint; end_pos:gint); cdecl; external atklib;
+procedure atk_editable_text_delete_text(text:PAtkEditableText; start_pos:gint; end_pos:gint); cdecl; external atklib;
+procedure atk_editable_text_paste_text(text:PAtkEditableText; position:gint); cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_EDITABLE_TEXT : GType;
+begin
+ ATK_TYPE_EDITABLE_TEXT:=atk_editable_text_get_type;
+end;
+
+function ATK_IS_EDITABLE_TEXT(obj: pointer) : boolean;
+begin
+ ATK_IS_EDITABLE_TEXT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_EDITABLE_TEXT);
+end;
+
+function ATK_EDITABLE_TEXT(obj: pointer) : PAtkEditableText;
+begin
+ ATK_EDITABLE_TEXT:=PAtkEditableText(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_EDITABLE_TEXT));
+end;
+
+function ATK_EDITABLE_TEXT_GET_IFACE(obj: pointer) : PAtkEditableTextIface;
+begin
+ ATK_EDITABLE_TEXT_GET_IFACE:=PAtkEditableTextIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_EDITABLE_TEXT));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkgobjectaccessible.inc b/packages/gtk2/src/atk/atkgobjectaccessible.inc
new file mode 100644
index 0000000000..95d6c4b073
--- /dev/null
+++ b/packages/gtk2/src/atk/atkgobjectaccessible.inc
@@ -0,0 +1,79 @@
+// included by atk.pp
+
+{
+ The AtkGObjectAccessible class is provided as a basis for implementing
+ accessibility support for objects which are not GTK+ widgets
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PAtkGObjectAccessible = ^TAtkGObjectAccessible;
+ TAtkGObjectAccessible = record
+ parent : TAtkObject;
+ end;
+
+ PAtkGObjectAccessibleClass = ^TAtkGObjectAccessibleClass;
+ TAtkGObjectAccessibleClass = record
+ parent_class : TAtkObjectClass;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_GOBJECT_ACCESSIBLE : GType;
+function ATK_GOBJECT_ACCESSIBLE(obj: pointer) : PAtkGObjectAccessible;
+function ATK_GOBJECT_ACCESSIBLE_CLASS(klass: pointer) : PAtkGObjectAccessibleClass;
+function ATK_IS_GOBJECT_ACCESSIBLE(obj: pointer) : boolean;
+function ATK_IS_GOBJECT_ACCESSIBLE_CLASS(klass: pointer) : boolean;
+function ATK_GOBJECT_ACCESSIBLE_GET_CLASS(obj: pointer) : PAtkGObjectAccessibleClass;
+
+
+function atk_gobject_accessible_get_type:GType; cdecl; external atklib;
+
+function atk_gobject_accessible_for_object(obj:PGObject):PAtkObject; cdecl; external atklib;
+function atk_gobject_accessible_get_object(obj:PAtkGObjectAccessible):PGObject; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_GOBJECT_ACCESSIBLE : GType;
+begin
+ ATK_TYPE_GOBJECT_ACCESSIBLE:=atk_gobject_accessible_get_type;
+end;
+
+function ATK_GOBJECT_ACCESSIBLE(obj: pointer) : PAtkGObjectAccessible;
+begin
+ ATK_GOBJECT_ACCESSIBLE:=PAtkGObjectAccessible(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_GOBJECT_ACCESSIBLE));
+end;
+
+function ATK_GOBJECT_ACCESSIBLE_CLASS(klass: pointer) : PAtkGObjectAccessibleClass;
+begin
+ ATK_GOBJECT_ACCESSIBLE_CLASS:=PAtkGObjectAccessibleClass(G_TYPE_CHECK_CLASS_CAST(klass,ATK_TYPE_GOBJECT_ACCESSIBLE));
+end;
+
+function ATK_IS_GOBJECT_ACCESSIBLE(obj: pointer) : boolean;
+begin
+ ATK_IS_GOBJECT_ACCESSIBLE:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_GOBJECT_ACCESSIBLE);
+end;
+
+function ATK_IS_GOBJECT_ACCESSIBLE_CLASS(klass: pointer) : boolean;
+begin
+ ATK_IS_GOBJECT_ACCESSIBLE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,ATK_TYPE_GOBJECT_ACCESSIBLE);
+end;
+
+function ATK_GOBJECT_ACCESSIBLE_GET_CLASS(obj: pointer) : PAtkGObjectAccessibleClass;
+begin
+ ATK_GOBJECT_ACCESSIBLE_GET_CLASS:=PAtkGObjectAccessibleClass(G_TYPE_INSTANCE_GET_CLASS(obj,ATK_TYPE_GOBJECT_ACCESSIBLE));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkhyperlink.inc b/packages/gtk2/src/atk/atkhyperlink.inc
new file mode 100644
index 0000000000..ff0fb50571
--- /dev/null
+++ b/packages/gtk2/src/atk/atkhyperlink.inc
@@ -0,0 +1,101 @@
+// included by atk.pp
+
+{
+ AtkHyperlink encapsulates a link or set of links in a hypertext document.
+
+ It implements the AtkAction interface.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PAtkHyperlink = ^TAtkHyperlink;
+ TAtkHyperlink = record
+ parent : TGObject;
+ end;
+
+{ Returns a string specifying the URI associated with the nth anchor
+ of this link. }
+{ Returns an anObject which represents the link action, as appropriate for
+ that link. }
+{ Gets the index with the hypertext document at which this link ends }
+{ Gets the index with the hypertext document at which this link begins }
+{ Since the document a link is associated with may have changed, this
+ method returns whether or not this link is still valid (with respect
+ to the document is references) }
+{ Returns the number of anchors associated with this link }
+ PAtkHyperlinkClass = ^TAtkHyperlinkClass;
+ TAtkHyperlinkClass = record
+ parent : TGObjectClass;
+ get_uri : function (link:PAtkHyperlink; i:gint):Pgchar; cdecl;
+ get_object : function (link:PAtkHyperlink; i:gint):PAtkObject; cdecl;
+ get_end_index : function (link:PAtkHyperlink):gint; cdecl;
+ get_start_index : function (link:PAtkHyperlink):gint; cdecl;
+ is_valid : function (link:PAtkHyperlink):gboolean; cdecl;
+ get_n_anchors : function (link:PAtkHyperlink):gint; cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ pad3 : TAtkFunction;
+ pad4 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_HYPERLINK : GType;
+function ATK_HYPERLINK(obj: pointer) : PAtkHyperlink;
+function ATK_HYPERLINK_CLASS(klass: pointer) : PAtkHyperlinkClass;
+function ATK_IS_HYPERLINK(obj: pointer) : boolean;
+function ATK_IS_HYPERLINK_CLASS(klass: pointer) : boolean;
+function ATK_HYPERLINK_GET_CLASS(obj: pointer) : PAtkHyperlinkClass;
+
+
+function atk_hyperlink_get_type:GType; cdecl; external atklib;
+function atk_hyperlink_get_uri(link:PAtkHyperlink; i:gint):Pgchar; cdecl; external atklib;
+function atk_hyperlink_get_object(link:PAtkHyperlink; i:gint):PAtkObject; cdecl; external atklib;
+function atk_hyperlink_get_end_index(link:PAtkHyperlink):gint; cdecl; external atklib;
+function atk_hyperlink_get_start_index(link:PAtkHyperlink):gint; cdecl; external atklib;
+function atk_hyperlink_is_valid(link:PAtkHyperlink):gboolean; cdecl; external atklib;
+function atk_hyperlink_get_n_anchors(link:PAtkHyperlink):gint; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_HYPERLINK : GType;
+begin
+ ATK_TYPE_HYPERLINK:=atk_hyperlink_get_type;
+end;
+
+function ATK_HYPERLINK(obj: pointer) : PAtkHyperlink;
+begin
+ ATK_HYPERLINK:=PAtkHyperlink(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_HYPERLINK));
+end;
+
+function ATK_HYPERLINK_CLASS(klass: pointer) : PAtkHyperlinkClass;
+begin
+ ATK_HYPERLINK_CLASS:=PAtkHyperlinkClass(G_TYPE_CHECK_CLASS_CAST(klass,ATK_TYPE_HYPERLINK));
+end;
+
+function ATK_IS_HYPERLINK(obj: pointer) : boolean;
+begin
+ ATK_IS_HYPERLINK:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_HYPERLINK);
+end;
+
+function ATK_IS_HYPERLINK_CLASS(klass: pointer) : boolean;
+begin
+ ATK_IS_HYPERLINK_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,ATK_TYPE_HYPERLINK);
+end;
+
+function ATK_HYPERLINK_GET_CLASS(obj: pointer) : PAtkHyperlinkClass;
+begin
+ ATK_HYPERLINK_GET_CLASS:=PAtkHyperlinkClass(G_TYPE_INSTANCE_GET_CLASS(obj,ATK_TYPE_HYPERLINK));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkhypertext.inc b/packages/gtk2/src/atk/atkhypertext.inc
new file mode 100644
index 0000000000..12b996dff8
--- /dev/null
+++ b/packages/gtk2/src/atk/atkhypertext.inc
@@ -0,0 +1,68 @@
+// included by atk.pp
+
+{
+ The AtkHypertext interface provides standard mechanisms for manipulating
+ hyperlinks.
+ }
+
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PAtkHypertextIface = ^TAtkHypertextIface;
+ TAtkHypertextIface = record
+ parent : TGTypeInterface;
+ get_link : function (hypertext:PAtkHypertext; link_index:gint):PAtkHyperlink; cdecl;
+ get_n_links : function (hypertext:PAtkHypertext):gint; cdecl;
+ get_link_index : function (hypertext:PAtkHypertext; char_index:gint):gint; cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ pad3 : TAtkFunction;
+ pad4 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_HYPERTEXT : GType;
+function ATK_IS_HYPERTEXT(obj: pointer) : boolean;
+function ATK_HYPERTEXT(obj: pointer) : PAtkHypertext;
+function ATK_HYPERTEXT_GET_IFACE(obj: pointer) : PAtkHypertextIface;
+
+
+function atk_hypertext_get_type:GType; cdecl; external atklib;
+function atk_hypertext_get_link(hypertext:PAtkHypertext; link_index:gint):PAtkHyperlink; cdecl; external atklib;
+function atk_hypertext_get_n_links(hypertext:PAtkHypertext):gint; cdecl; external atklib;
+function atk_hypertext_get_link_index(hypertext:PAtkHypertext; char_index:gint):gint; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_HYPERTEXT : GType;
+begin
+ ATK_TYPE_HYPERTEXT:=atk_hypertext_get_type;
+end;
+
+function ATK_IS_HYPERTEXT(obj: pointer) : boolean;
+begin
+ ATK_IS_HYPERTEXT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_HYPERTEXT);
+end;
+
+function ATK_HYPERTEXT(obj: pointer) : PAtkHypertext;
+begin
+ ATK_HYPERTEXT:=PAtkHypertext(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_HYPERTEXT));
+end;
+
+function ATK_HYPERTEXT_GET_IFACE(obj: pointer) : PAtkHypertextIface;
+begin
+ ATK_HYPERTEXT_GET_IFACE:=PAtkHypertextIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_HYPERTEXT));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkimage.inc b/packages/gtk2/src/atk/atkimage.inc
new file mode 100644
index 0000000000..a3b4a3d61c
--- /dev/null
+++ b/packages/gtk2/src/atk/atkimage.inc
@@ -0,0 +1,68 @@
+// included by atk.pp
+
+{
+ The AtkImage interface should be supported by any anObject that has an
+ associated image. This interface provides the standard mechanism for
+ an assistive technology to get descriptive information about images.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PAtkImageIface = ^TAtkImageIface;
+ TAtkImageIface = record
+ parent : TGTypeInterface;
+ get_image_position : procedure (image:PAtkImage; x:Pgint; y:Pgint; coord_type:TAtkCoordType); cdecl;
+ get_image_description : function (image:PAtkImage):Pgchar; cdecl;
+ get_image_size : procedure (image:PAtkImage; width:Pgint; height:Pgint); cdecl;
+ set_image_description : function (image:PAtkImage; description:Pgchar):gboolean; cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_IMAGE : GType;
+function ATK_IS_IMAGE(obj: pointer) : boolean;
+function ATK_IMAGE(obj: pointer) : PAtkImage;
+function ATK_IMAGE_GET_IFACE(obj: pointer) : PAtkImageIface;
+
+
+function atk_image_get_type:GType; cdecl; external atklib;
+function atk_image_get_image_description(image:PAtkImage):Pgchar; cdecl; external atklib;
+procedure atk_image_get_image_size(image:PAtkImage; width:Pgint; height:Pgint); cdecl; external atklib;
+function atk_image_set_image_description(image:PAtkImage; description:Pgchar):gboolean; cdecl; external atklib;
+procedure atk_image_get_image_position(image:PAtkImage; x:Pgint; y:Pgint; coord_type:TAtkCoordType); cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_IMAGE : GType;
+begin
+ ATK_TYPE_IMAGE:=atk_image_get_type;
+end;
+
+function ATK_IS_IMAGE(obj: pointer) : boolean;
+begin
+ ATK_IS_IMAGE:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_IMAGE);
+end;
+
+function ATK_IMAGE(obj: pointer) : PAtkImage;
+begin
+ ATK_IMAGE:=PAtkImage(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_IMAGE));
+end;
+
+function ATK_IMAGE_GET_IFACE(obj: pointer) : PAtkImageIface;
+begin
+ ATK_IMAGE_GET_IFACE:=PAtkImageIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_IMAGE));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkincludes.inc b/packages/gtk2/src/atk/atkincludes.inc
new file mode 100644
index 0000000000..04ab86b350
--- /dev/null
+++ b/packages/gtk2/src/atk/atkincludes.inc
@@ -0,0 +1,23 @@
+// included by atk.pp
+{$include atkobject.inc}
+{$include atkaction.inc}
+{$include atkcomponent.inc}
+{$include atkdocument.inc}
+{$include atkeditabletext.inc}
+{$include atkgobjectaccessible.inc}
+{$include atkhyperlink.inc}
+{$include atkhypertext.inc}
+{$include atkimage.inc}
+{$include atkobjectfactory.inc}
+{$include atkregistry.inc}
+{$include atkrelation.inc}
+{$include atkrelationset.inc}
+{$include atkselection.inc}
+{$include atkstate.inc}
+{$include atkstateset.inc}
+{$include atkstreamablecontent.inc}
+{$include atktable.inc}
+{$include atktext.inc}
+{$include atkutil.inc}
+{$include atkvalue.inc}
+
diff --git a/packages/gtk2/src/atk/atkobject.inc b/packages/gtk2/src/atk/atkobject.inc
new file mode 100644
index 0000000000..f82c377246
--- /dev/null
+++ b/packages/gtk2/src/atk/atkobject.inc
@@ -0,0 +1,510 @@
+// included by atk.pp
+
+{
+ AtkObject represents the minimum information all accessible objects
+ return. This information includes accessible name, accessible
+ description, role and state of the anObject, as well information about
+ its parent and children. It is also possible to obtain more specific
+ accessibility information about a component if it supports one or more
+ of the following interfaces:
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+{
+ AtkRole:
+ @ATK_ROLE_INVALID: Invalid role
+ @ATK_ROLE_ACCEL_LABEL: A label which represents an accelerator
+ @ATK_ROLE_ALERT: An anObject which is an alert to the user
+ @ATK_ROLE_ANIMATION: An anObject which is an animated image
+ @ATK_ROLE_ARROW: An arrow in one of the four cardinal directions
+ @ATK_ROLE_CALENDAR: An anObject that displays a calendar and allows the user to select a date
+ @ATK_ROLE_CANVAS: An anObject that can be drawn into and is used to trap events
+ @ATK_ROLE_CHECK_BOX: A choice that can be checked or unchecked and provides a separate indicator for the current state
+ @ATK_ROLE_CHECK_MENU_ITEM: A menu item with a check box
+ @ATK_ROLE_COLOR_CHOOSER: A specialized dialog that lets the user choose a color
+ @ATK_ROLE_COLUMN_HEADER: The header for a column of data
+ @ATK_ROLE_COMBO_BOX: A list of choices the user can select from
+ @ATK_ROLE_DATE_EDITOR: An anObject whose purpose is to allow a user to edit a date
+ @ATK_ROLE_DESKTOP_ICON: An inconifed internal frame within a DESKTOP_PANE
+ @ATK_ROLE_DESKTOP_FRAME: A pane that supports internal frames and iconified versions of those internal frames
+ @ATK_ROLE_DIAL: An anObject whose purpose is to allow a user to set a value
+ @ATK_ROLE_DIALOG: A top level window with title bar and a border
+ @ATK_ROLE_DIRECTORY_PANE: A pane that allows the user to navigate through and select the contents of a directory
+ @ATK_ROLE_DRAWING_AREA: An anObject used for drawing custom user interface elements
+ @ATK_ROLE_FILE_CHOOSER: A specialized dialog that lets the user choose a file
+ @ATK_ROLE_FILLER: A anObject that fills up space in a user interface
+ @ATK_ROLE_FONT_CHOOSER: A specialized dialog that lets the user choose a font
+ @ATK_ROLE_FRAME: A top level window with a title bar, border, menubar, etc.
+ @ATK_ROLE_GLASS_PANE: A pane that is guaranteed to be painted on top of all panes beneath it
+ @ATK_ROLE_HTML_CONTAINER: A document container for HTML, whose children represent the document content
+ @ATK_ROLE_ICON: A small fixed size picture, typically used to decorate components
+ @ATK_ROLE_IMAGE: An anObject whose primary purpose is to display an image
+ @ATK_ROLE_INTERNAL_FRAME: A frame-like anObject that is clipped by a desktop pane
+ @ATK_ROLE_LABEL: An anObject used to present an icon or short string in an interface
+ @ATK_ROLE_LAYERED_PANE: A specialized pane that allows its children to be drawn in layers, providing a form of stacking order
+ @ATK_ROLE_LIST: An anObject that presents a list of objects to the user and allows the user to select one or more of them
+ @ATK_ROLE_LIST_ITEM: An anObject that represents an element of a list
+ @ATK_ROLE_MENU: An anObject usually found inside a menu bar that contains a list of actions the user can choose from
+ @ATK_ROLE_MENU_BAR: An anObject usually drawn at the top of the primary dialog box of an application that contains a list of menus the user can choose from
+ @ATK_ROLE_MENU_ITEM: An anObject usually contained in a menu that presents an action the user can choose
+ @ATK_ROLE_OPTION_PANE: A specialized pane whose primary use is inside a DIALOG
+ @ATK_ROLE_PAGE_TAB: An anObject that is a child of a page tab list
+ @ATK_ROLE_PAGE_TAB_LIST: An anObject that presents a series of panels (or page tabs), one at a time, through some mechanism provided by the anObject
+ @ATK_ROLE_PANEL: A generic container that is often used to group objects
+ @ATK_ROLE_PASSWORD_TEXT: A text anObject uses for passwords, or other places where the text content is not shown visibly to the user
+ @ATK_ROLE_POPUP_MENU: A temporary window that is usually used to offer the user a list of choices, and then hides when the user selects one of those choices
+ @ATK_ROLE_PROGRESS_BAR: An anObject used to indicate how much of a task has been completed
+ @ATK_ROLE_PUSH_BUTTON: An anObject the user can manipulate to tell the application to do something
+ @ATK_ROLE_RADIO_BUTTON: A specialized check box that will cause other radio buttons in the same group to become unchecked when this one is checked
+ @ATK_ROLE_RADIO_MENU_ITEM: A check menu item which belongs to a group. At each instant exactly one of the radio menu items from a group is selected
+ @ATK_ROLE_ROOT_PANE: A specialized pane that has a glass pane and a layered pane as its children
+ @ATK_ROLE_ROW_HEADER: The header for a row of data
+ @ATK_ROLE_SCROLL_BAR: An anObject usually used to allow a user to incrementally view a large amount of data.
+ @ATK_ROLE_SCROLL_PANE: An anObject that allows a user to incrementally view a large amount of information
+ @ATK_ROLE_SEPARATOR: An anObject usually contained in a menu to provide a visible and logical separation of the contents in a menu
+ @ATK_ROLE_SLIDER: An anObject that allows the user to select from a bounded range
+ @ATK_ROLE_SPLIT_PANE: A specialized panel that presents two other panels at the same time
+ @ATK_ROLE_SPIN_BUTTON: An anObject used to get an integer or floating point number from the user
+ @ATK_ROLE_STATUSBAR: An anObject which reports messages of minor importance to the user
+ @ATK_ROLE_TABLE: An anObject used to represent information in terms of rows and columns
+ @ATK_ROLE_TABLE_CELL: A cell in a table
+ @ATK_ROLE_TABLE_COLUMN_HEADER: The header for a column of a table
+ @ATK_ROLE_TABLE_ROW_HEADER: The header for a row of a table
+ @ATK_ROLE_TEAR_OFF_MENU_ITEM: A menu item used to tear off and reattach its menu
+ @ATK_ROLE_TERMINAL: An anObject that represents an accessible terminal
+ @ATK_ROLE_TEXT: An anObject that presents text to the user
+ @ATK_ROLE_TOGGLE_BUTTON: A specialized push button that can be checked or unchecked, but does not provide a separate indicator for the current state
+ @ATK_ROLE_TOOL_BAR: A bar or palette usually composed of push buttons or toggle buttons
+ @ATK_ROLE_TOOL_TIP: An anObject that provides information about another anObject
+ @ATK_ROLE_TREE: An anObject used to represent hierarchical information to the user
+ @ATK_ROLE_TREE_TABLE: An anObject capable of expanding and collapsing rows as well as showing multiple columns of data
+ @ATK_ROLE_UNKNOWN: The anObject contains some Accessible information, but its role is not known
+ @ATK_ROLE_VIEWPORT: An anObject usually used in a scroll pane
+ @ATK_ROLE_WINDOW: A top level window with no title or border
+ @ATK_ROLE_LAST_DEFINED: not a valid role, used for finding theEnd of enumeration
+
+ Describes the role of an anObject
+ }
+ PAtkRole = ^TAtkRole;
+ TAtkRole = (
+ ATK_ROLE_INVALID {:= 0},
+ ATK_ROLE_ACCEL_LABEL,
+ ATK_ROLE_ALERT,
+ ATK_ROLE_ANIMATION,
+ ATK_ROLE_ARROW,
+ ATK_ROLE_CALENDAR,
+ ATK_ROLE_CANVAS,
+ ATK_ROLE_CHECK_BOX,
+ ATK_ROLE_CHECK_MENU_ITEM,
+ ATK_ROLE_COLOR_CHOOSER,
+ ATK_ROLE_COLUMN_HEADER,
+ ATK_ROLE_COMBO_BOX,
+ ATK_ROLE_DATE_EDITOR,
+ ATK_ROLE_DESKTOP_ICON,
+ ATK_ROLE_DESKTOP_FRAME,
+ ATK_ROLE_DIAL,
+ ATK_ROLE_DIALOG,
+ ATK_ROLE_DIRECTORY_PANE,
+ ATK_ROLE_DRAWING_AREA,
+ ATK_ROLE_FILE_CHOOSER,
+ ATK_ROLE_FILLER,
+ ATK_ROLE_FONT_CHOOSER,
+ ATK_ROLE_FRAME,
+ ATK_ROLE_GLASS_PANE,
+ ATK_ROLE_HTML_CONTAINER,
+ ATK_ROLE_ICON,
+ ATK_ROLE_IMAGE,
+ ATK_ROLE_INTERNAL_FRAME,
+ ATK_ROLE_LABEL,
+ ATK_ROLE_LAYERED_PANE,
+ ATK_ROLE_LIST,
+ ATK_ROLE_LIST_ITEM,
+ ATK_ROLE_MENU,
+ ATK_ROLE_MENU_BAR,
+ ATK_ROLE_MENU_ITEM,
+ ATK_ROLE_OPTION_PANE,
+ ATK_ROLE_PAGE_TAB,
+ ATK_ROLE_PAGE_TAB_LIST,
+ ATK_ROLE_PANEL,
+ ATK_ROLE_PASSWORD_TEXT,
+ ATK_ROLE_POPUP_MENU,
+ ATK_ROLE_PROGRESS_BAR,
+ ATK_ROLE_PUSH_BUTTON,
+ ATK_ROLE_RADIO_BUTTON,
+ ATK_ROLE_RADIO_MENU_ITEM,
+ ATK_ROLE_ROOT_PANE,
+ ATK_ROLE_ROW_HEADER,
+ ATK_ROLE_SCROLL_BAR,
+ ATK_ROLE_SCROLL_PANE,
+ ATK_ROLE_SEPARATOR,
+ ATK_ROLE_SLIDER,
+ ATK_ROLE_SPLIT_PANE,
+ ATK_ROLE_SPIN_BUTTON,
+ ATK_ROLE_STATUSBAR,
+ ATK_ROLE_TABLE,
+ ATK_ROLE_TABLE_CELL,
+ ATK_ROLE_TABLE_COLUMN_HEADER,
+ ATK_ROLE_TABLE_ROW_HEADER,
+ ATK_ROLE_TEAR_OFF_MENU_ITEM,
+ ATK_ROLE_TERMINAL,
+ ATK_ROLE_TEXT,
+ ATK_ROLE_TOGGLE_BUTTON,
+ ATK_ROLE_TOOL_BAR,
+ ATK_ROLE_TOOL_TIP,
+ ATK_ROLE_TREE,
+ ATK_ROLE_TREE_TABLE,
+ ATK_ROLE_UNKNOWN,
+ ATK_ROLE_VIEWPORT,
+ ATK_ROLE_WINDOW,
+ ATK_ROLE_LAST_DEFINED
+ );
+
+
+{
+ AtkLayer:
+ @ATK_LAYER_INVALID: The anObject does not have a layer
+ @ATK_LAYER_BACKGROUND: This layer is reserved for the desktop background
+ @ATK_LAYER_CANVAS: This layer is used for Canvas components
+ @ATK_LAYER_WIDGET: This layer is normally used for components
+ @ATK_LAYER_MDI: This layer is used for layered components
+ @ATK_LAYER_POPUP: This layer is used for popup components, such as menus
+ @ATK_LAYER_OVERLAY: This layer is reserved for future use.
+
+ Describes the layer of a component
+ }
+ PAtkLayer = ^TAtkLayer;
+ TAtkLayer = (
+ ATK_LAYER_INVALID,
+ ATK_LAYER_BACKGROUND,
+ ATK_LAYER_CANVAS,
+ ATK_LAYER_WIDGET,
+ ATK_LAYER_MDI,
+ ATK_LAYER_POPUP,
+ ATK_LAYER_OVERLAY
+ );
+
+
+ PAtkPropertyValues = ^TAtkPropertyValues;
+ TAtkPropertyValues = record
+ property_name : Pgchar;
+ old_value : TGValue;
+ new_value : TGValue;
+ end;
+
+
+ TAtkFunction = function (data:gpointer):gboolean; cdecl;
+{
+ For most properties the old_value field of AtkPropertyValues will
+ not contain a valid value.
+
+ Currently, the only property for which old_value is used is
+ accessible-state; for instance if there is a focus state the
+ property change handler will be called for the anObject which lost the focus
+ with the old_value containing an AtkState value corresponding to focused
+ and the property change handler will be called for the anObject which
+ received the focus with the new_value containing an AtkState value
+ corresponding to focused.
+ }
+
+ PAtkObject = ^TAtkObject;
+ PPAtkObject = ^PAtkObject;
+ TAtkObject = record
+ parent : TGObject;
+ description : Pgchar;
+ name : Pgchar;
+ accessible_parent : PAtkObject;
+ role : TAtkRole;
+ relation_set : PAtkRelationSet;
+ layer : TAtkLayer;
+ end;
+
+ TAtkPropertyChangeHandler = procedure (para1:PAtkObject; para2:PAtkPropertyValues); cdecl;
+
+{
+ Gets the accessible name of the anObject
+ }
+{
+ Gets the accessible description of the anObject
+ }
+{
+ Gets the accessible parent of the anObject
+ }
+{
+ Gets the number of accessible children of the anObject
+ }
+{
+ Returns a reference to the specified accessible child of the anObject.
+ The accessible children are 0-based so the first accessible child is
+ at index 0, the second at index 1 and so on.
+ }
+{
+ Gets the 0-based index of this anObject in its parent; returns -1 if the
+ anObject does not have an accessible parent.
+ }
+{
+ Gets the RelationSet associated with the anObject
+ }
+{
+ Gets the role of the anObject
+ }
+{
+ Gets the state set of the anObject
+ }
+{
+ Sets the accessible name of the anObject
+ }
+{
+ Sets the accessible description of the anObject
+ }
+{
+ Sets the accessible parent of the anObject
+ }
+{
+ Sets the accessible role of the anObject
+ }
+{
+ Specifies a function to be called when a property changes value
+ }
+{
+ Removes a property change handler which was specified using
+ connect_property_change_handler
+ }
+{
+ The signal handler which is executed when there is a change in the
+ children of the anObject
+ }
+{
+ The signal handler which is executed when there is a focus event
+ for an anObject.
+ }
+{
+ The signal handler which is executed when there is a property_change
+ signal for an anObject.
+ }
+{
+ The signal handler which is executed when there is a state_change
+ signal for an anObject.
+ }
+{
+ The signal handler which is executed when there is a change in the
+ visible data for an anObject
+ }
+ PAtkObjectClass = ^TAtkObjectClass;
+ TAtkObjectClass = record
+ parent : TGObjectClass;
+ get_name : function (accessible:PAtkObject):Pgchar; cdecl;
+ get_description : function (accessible:PAtkObject):Pgchar; cdecl;
+ get_parent : function (accessible:PAtkObject):PAtkObject; cdecl;
+ get_n_children : function (accessible:PAtkObject):gint; cdecl;
+ ref_child : function (accessible:PAtkObject; i:gint):PAtkObject; cdecl;
+ get_index_in_parent : function (accessible:PAtkObject):gint; cdecl;
+ ref_relation_set : function (accessible:PAtkObject):PAtkRelationSet; cdecl;
+ get_role : function (accessible:PAtkObject):TAtkRole; cdecl;
+ get_layer : function (accessible:PAtkObject):TAtkLayer; cdecl;
+ get_mdi_zorder : function (accessible:PAtkObject):gint; cdecl;
+ ref_state_set : function (accessible:PAtkObject):PAtkStateSet; cdecl;
+ set_name : procedure (accessible:PAtkObject; name:Pgchar); cdecl;
+ set_description : procedure (accessible:PAtkObject; description:Pgchar); cdecl;
+ set_parent : procedure (accessible:PAtkObject; parent:PAtkObject); cdecl;
+ set_role : procedure (accessible:PAtkObject; role:TAtkRole); cdecl;
+ connect_property_change_handler : function (accessible:PAtkObject; handler:TAtkPropertyChangeHandler):guint; cdecl;
+ remove_property_change_handler : procedure (accessible:PAtkObject; handler_id:guint); cdecl;
+ initialize : procedure (accessible:PAtkObject; data:gpointer); cdecl;
+ children_changed : procedure (accessible:PAtkObject; change_index:guint; changed_child:gpointer); cdecl;
+ focus_event : procedure (accessible:PAtkObject; focus_in:gboolean); cdecl;
+ property_change : procedure (accessible:PAtkObject; values:PAtkPropertyValues); cdecl;
+ state_change : procedure (accessible:PAtkObject; name:Pgchar; state_set:gboolean); cdecl;
+ visible_data_changed : procedure (accessible:PAtkObject); cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ pad3 : TAtkFunction;
+ pad4 : TAtkFunction;
+ end;
+
+ PAtkImplementorIface = ^TAtkImplementorIface;
+ TAtkImplementorIface = record
+ parent : TGTypeInterface;
+ ref_accessible : function (implementor:PAtkImplementor):PAtkObject; cdecl;
+ end;
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function atk_role_register(name:Pgchar):TAtkRole; cdecl; external atklib;
+
+function atk_object_get_type:GType; cdecl; external atklib;
+
+function ATK_TYPE_OBJECT : GType;
+function ATK_OBJECT(obj: pointer) : PAtkObject;
+function ATK_OBJECT_CLASS(klass: pointer) : PAtkObjectClass;
+function ATK_IS_OBJECT(obj: pointer) : boolean;
+function ATK_IS_OBJECT_CLASS(klass: pointer) : boolean;
+function ATK_OBJECT_GET_CLASS(obj: pointer) : PAtkObjectClass;
+
+function ATK_TYPE_IMPLEMENTOR : GType;
+function ATK_IS_IMPLEMENTOR(obj: pointer) : boolean;
+function ATK_IMPLEMENTOR(obj: pointer) : PAtkImplementor;
+function ATK_IMPLEMENTOR_GET_IFACE(obj: pointer) : PAtkImplementorIface;
+
+function atk_implementor_get_type:GType; cdecl; external atklib;
+{
+ This method uses the ref_accessible method in AtkImplementorIface,
+ if the anObject's class implements AtkImplementorIface.
+ Otherwise it returns %NULL.
+
+ IMPORTANT:
+ Note also that because this method may return flyweight objects,
+ it increments the returned AtkObject's reference count.
+ Therefore it is the responsibility of the calling
+ program to unreference the anObject when no longer needed.
+ (c.f. gtk_widget_get_accessible() where this is not the case).
+ }
+function atk_implementor_ref_accessible(implementor:PAtkImplementor):PAtkObject; cdecl; external atklib;
+{
+ Properties directly supported by AtkObject
+ }
+function atk_object_get_name(accessible:PAtkObject):Pgchar; cdecl; external atklib;
+function atk_object_get_description(accessible:PAtkObject):Pgchar; cdecl; external atklib;
+function atk_object_get_parent(accessible:PAtkObject):PAtkObject; cdecl; external atklib;
+function atk_object_get_n_accessible_children(accessible:PAtkObject):gint; cdecl; external atklib;
+function atk_object_ref_accessible_child(accessible:PAtkObject; i:gint):PAtkObject; cdecl; external atklib;
+function atk_object_ref_relation_set(accessible:PAtkObject):PAtkRelationSet; cdecl; external atklib;
+function atk_object_get_role(accessible:PAtkObject):TAtkRole; cdecl; external atklib;
+function atk_object_get_layer(accessible:PAtkObject):TAtkLayer; cdecl; external atklib;
+function atk_object_get_mdi_zorder(accessible:PAtkObject):gint; cdecl; external atklib;
+function atk_object_ref_state_set(accessible:PAtkObject):PAtkStateSet; cdecl; external atklib;
+function atk_object_get_index_in_parent(accessible:PAtkObject):gint; cdecl; external atklib;
+procedure atk_object_set_name(accessible:PAtkObject; name:Pgchar); cdecl; external atklib;
+procedure atk_object_set_description(accessible:PAtkObject; description:Pgchar); cdecl; external atklib;
+procedure atk_object_set_parent(accessible:PAtkObject; parent:PAtkObject); cdecl; external atklib;
+procedure atk_object_set_role(accessible:PAtkObject; role:TAtkRole); cdecl; external atklib;
+function atk_object_connect_property_change_handler(accessible:PAtkObject; handler:TAtkPropertyChangeHandler):guint; cdecl; external atklib;
+procedure atk_object_remove_property_change_handler(accessible:PAtkObject; handler_id:guint); cdecl; external atklib;
+procedure atk_object_notify_state_change(accessible:PAtkObject; state:TAtkState; value:gboolean); cdecl; external atklib;
+procedure atk_object_initialize(accessible:PAtkObject; data:gpointer); cdecl; external atklib;
+function atk_role_get_name(role:TAtkRole):Pgchar; cdecl; external atklib;
+function atk_role_for_name(name:Pgchar):TAtkRole; cdecl; external atklib;
+{
+ Note: the properties which are registered with the GType
+ property registry, for type ATK_TYPE_OBJECT, are as follows:
+
+ "accessible-name"
+ "accessible-description"
+ "accessible-parent"
+ "accessible-role"
+ "accessible-value"
+ "accessible-component-layer"
+ "accessible-component-zorder"
+ "accessible-table-caption"
+ "accessible-table-column-description"
+ "accessible-table-column-header"
+ "accessible-table-row-description"
+ "accessible-table-row-header"
+ "accessible-table-summary"
+ "accessible-model"
+
+ accessibility property change listeners should use the
+ normal GObject property interfaces and "property-change"
+ signal handler semantics to interpret the property change
+ information relayed from AtkObject.
+ (AtkObject instances will connect to the "notify"
+ signal in their host objects, and relay the signals when appropriate).
+ }
+(* For other signals, see related interfaces
+
+ AtkActionIface,
+ AtkComponentIface,
+ AtkHypertextIface,
+ AtkImageIface,
+ AtkSelectionIface,
+ AtkTableIface,
+ AtkTextIface,
+ AtkValueIface.
+
+ The usage model for obtaining these interface instances is:
+ ATK_<interfacename>_GET_IFACE(GObject accessible),
+ where accessible, though specified as a GObject, is
+ the AtkObject instance being queried.
+ More usually, the interface will be used via a cast to the
+ interface's corresponding "type":
+
+ var
+ textImpl: PAtkText;
+ begin
+ textImpl := ATK_TEXT(accessible);
+ if (textImpl<>nil) then
+ cpos := atk_text_get_caret_position(textImpl);
+ end;
+
+ If it's known in advance that accessible implements AtkTextIface,
+ this is shortened to:
+
+ cpos := atk_text_get_caret_position (ATK_TEXT (accessible));
+*)
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_OBJECT : GType;
+begin
+ ATK_TYPE_OBJECT:=atk_object_get_type;
+end;
+
+function ATK_OBJECT(obj: pointer) : PAtkObject;
+begin
+ ATK_OBJECT:=PAtkObject(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_OBJECT));
+end;
+
+function ATK_OBJECT_CLASS(klass: pointer) : PAtkObjectClass;
+begin
+ ATK_OBJECT_CLASS:=PAtkObjectClass(G_TYPE_CHECK_CLASS_CAST(klass,ATK_TYPE_OBJECT));
+end;
+
+function ATK_IS_OBJECT(obj: pointer) : boolean;
+begin
+ ATK_IS_OBJECT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_OBJECT);
+end;
+
+function ATK_IS_OBJECT_CLASS(klass: pointer) : boolean;
+begin
+ ATK_IS_OBJECT_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,ATK_TYPE_OBJECT);
+end;
+
+function ATK_OBJECT_GET_CLASS(obj: pointer) : PAtkObjectClass;
+begin
+ ATK_OBJECT_GET_CLASS:=PAtkObjectClass(G_TYPE_INSTANCE_GET_CLASS(obj,ATK_TYPE_OBJECT));
+end;
+
+function ATK_TYPE_IMPLEMENTOR : GType;
+begin
+ ATK_TYPE_IMPLEMENTOR:=atk_implementor_get_type;
+end;
+
+function ATK_IS_IMPLEMENTOR(obj: pointer) : boolean;
+begin
+ ATK_IS_IMPLEMENTOR:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_IMPLEMENTOR);
+end;
+
+function ATK_IMPLEMENTOR(obj: pointer) : PAtkImplementor;
+begin
+ ATK_IMPLEMENTOR:=PAtkImplementor(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_IMPLEMENTOR));
+end;
+
+function ATK_IMPLEMENTOR_GET_IFACE(obj: pointer) : PAtkImplementorIface;
+begin
+ ATK_IMPLEMENTOR_GET_IFACE:=PAtkImplementorIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_IMPLEMENTOR));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkobjectfactory.inc b/packages/gtk2/src/atk/atkobjectfactory.inc
new file mode 100644
index 0000000000..dfdc990972
--- /dev/null
+++ b/packages/gtk2/src/atk/atkobjectfactory.inc
@@ -0,0 +1,77 @@
+// included by atk.pp
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PAtkObjectFactory = ^TAtkObjectFactory;
+ TAtkObjectFactory = record
+ parent : TGObject;
+ end;
+
+ PAtkObjectFactoryClass = ^TAtkObjectFactoryClass;
+ TAtkObjectFactoryClass = record
+ parent_class : TGObjectClass;
+ create_accessible : function (obj:PGObject):PAtkObject; cdecl;
+ invalidate : procedure (factory:PAtkObjectFactory); cdecl;
+ get_accessible_type : function :GType; cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_OBJECT_FACTORY : GType;
+function ATK_OBJECT_FACTORY(obj: pointer) : PAtkObjectFactory;
+function ATK_OBJECT_FACTORY_CLASS(klass: pointer) : PAtkObjectFactoryClass;
+function ATK_IS_OBJECT_FACTORY(obj: pointer) : boolean;
+function ATK_IS_OBJECT_FACTORY_CLASS(klass: pointer) : boolean;
+function ATK_OBJECT_FACTORY_GET_CLASS(obj: pointer) : PAtkObjectFactoryClass;
+
+
+function atk_object_factory_get_type:GType; cdecl; external atklib;
+function atk_object_factory_create_accessible(factory:PAtkObjectFactory; obj:PGObject):PAtkObject; cdecl; external atklib;
+procedure atk_object_factory_invalidate(factory:PAtkObjectFactory); cdecl; external atklib;
+function atk_object_factory_get_accessible_type(factory:PAtkObjectFactory):GType; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_OBJECT_FACTORY : GType;
+begin
+ ATK_TYPE_OBJECT_FACTORY:=atk_object_factory_get_type;
+end;
+
+function ATK_OBJECT_FACTORY(obj: pointer) : PAtkObjectFactory;
+begin
+ ATK_OBJECT_FACTORY:=PAtkObjectFactory(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_OBJECT_FACTORY));
+end;
+
+function ATK_OBJECT_FACTORY_CLASS(klass: pointer) : PAtkObjectFactoryClass;
+begin
+ ATK_OBJECT_FACTORY_CLASS:=PAtkObjectFactoryClass(G_TYPE_CHECK_CLASS_CAST(klass,ATK_TYPE_OBJECT_FACTORY));
+end;
+
+function ATK_IS_OBJECT_FACTORY(obj: pointer) : boolean;
+begin
+ ATK_IS_OBJECT_FACTORY:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_OBJECT_FACTORY);
+end;
+
+function ATK_IS_OBJECT_FACTORY_CLASS(klass: pointer) : boolean;
+begin
+ ATK_IS_OBJECT_FACTORY_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,ATK_TYPE_OBJECT_FACTORY);
+end;
+
+function ATK_OBJECT_FACTORY_GET_CLASS(obj: pointer) : PAtkObjectFactoryClass;
+begin
+ ATK_OBJECT_FACTORY_GET_CLASS:=PAtkObjectFactoryClass(G_TYPE_INSTANCE_GET_CLASS(obj,ATK_TYPE_OBJECT_FACTORY));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkregistry.inc b/packages/gtk2/src/atk/atkregistry.inc
new file mode 100644
index 0000000000..41e1bbefcf
--- /dev/null
+++ b/packages/gtk2/src/atk/atkregistry.inc
@@ -0,0 +1,75 @@
+// included by atk.pp
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PAtkRegistry = ^TAtkRegistry;
+ TAtkRegistry = record
+ parent : TGObject;
+ factory_type_registry : PGHashTable;
+ factory_singleton_cache : PGHashTable;
+ end;
+
+ PAtkRegistryClass = ^TAtkRegistryClass;
+ TAtkRegistryClass = record
+ parent_class : TGObjectClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_REGISTRY : GType;
+function ATK_REGISTRY(obj: pointer) : PAtkRegistry;
+function ATK_REGISTRY_CLASS(klass: pointer) : PAtkRegistryClass;
+function ATK_IS_REGISTRY(obj: pointer) : boolean;
+function ATK_IS_REGISTRY_CLASS(klass: pointer) : boolean;
+function ATK_REGISTRY_GET_CLASS(obj: pointer) : PAtkRegistryClass;
+
+
+function atk_registry_get_type:GType; cdecl; external atklib;
+procedure atk_registry_set_factory_type(registry:PAtkRegistry; _type:GType; factory_type:GType); cdecl; external atklib;
+function atk_registry_get_factory_type(registry:PAtkRegistry; _type:GType):GType; cdecl; external atklib;
+function atk_registry_get_factory(registry:PAtkRegistry; _type:GType):PAtkObjectFactory; cdecl; external atklib;
+function atk_get_default_registry:PAtkRegistry; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_REGISTRY : GType;
+begin
+ ATK_TYPE_REGISTRY:=atk_registry_get_type;
+end;
+
+function ATK_REGISTRY(obj: pointer) : PAtkRegistry;
+begin
+ ATK_REGISTRY:=PAtkRegistry(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_REGISTRY));
+end;
+
+function ATK_REGISTRY_CLASS(klass: pointer) : PAtkRegistryClass;
+begin
+ ATK_REGISTRY_CLASS:=PAtkRegistryClass(G_TYPE_CHECK_CLASS_CAST(klass,ATK_TYPE_REGISTRY));
+end;
+
+function ATK_IS_REGISTRY(obj: pointer) : boolean;
+begin
+ ATK_IS_REGISTRY:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_REGISTRY);
+end;
+
+function ATK_IS_REGISTRY_CLASS(klass: pointer) : boolean;
+begin
+ ATK_IS_REGISTRY_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,ATK_TYPE_REGISTRY);
+end;
+
+function ATK_REGISTRY_GET_CLASS(obj: pointer) : PAtkRegistryClass;
+begin
+ ATK_REGISTRY_GET_CLASS:=PAtkRegistryClass(G_TYPE_INSTANCE_GET_CLASS(obj,ATK_TYPE_REGISTRY));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkrelation.inc b/packages/gtk2/src/atk/atkrelation.inc
new file mode 100644
index 0000000000..38a57a6da8
--- /dev/null
+++ b/packages/gtk2/src/atk/atkrelation.inc
@@ -0,0 +1,113 @@
+// included by atk.pp
+
+{
+ An AtkRelation describes a relation between the anObject and one or more
+ other objects. The actual relations that an anObject has with other objects
+ are defined as an AtkRelationSet, which is a set of AtkRelations.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{
+ AtkRelationType:
+ @ATK_RELATION_NULL:
+ @ATK_RELATION_CONTROLLED_BY: Indicates an anObject controlled by one or more target objects.
+ @ATK_RELATION_CONTROLLER_FOR: Indicates an anObject is an controller for one or more target objects.
+ @ATK_RELATION_LABEL_FOR: Indicates an anObject is a label for one or more target objects.
+ @ATK_RELATION_LABELLED_BY: Indicates an anObject is labelled by one or more target objects.
+ @ATK_RELATION_MEMBER_OF: Indicates an anObject is a member of a group of one or more target objects.
+ @ATK_RELATION_NODE_CHILD_OF: Indicates an anObject is a cell in a treetable which is displayed because a cell in the same column is expanded and identifies that cell.
+ @ATK_RELATION_LAST_DEFINED:
+
+ Describes the type of the relation
+ }
+ PAtkRelationType = ^TAtkRelationType;
+ TAtkRelationType = (
+ ATK_RELATION_NULL {:= 0},
+ ATK_RELATION_CONTROLLED_BY,
+ ATK_RELATION_CONTROLLER_FOR,
+ ATK_RELATION_LABEL_FOR,
+ ATK_RELATION_LABELLED_BY,
+ ATK_RELATION_MEMBER_OF,
+ ATK_RELATION_NODE_CHILD_OF,
+ ATK_RELATION_LAST_DEFINED
+ );
+
+
+ PAtkRelation = ^TAtkRelation;
+ TAtkRelation = record
+ parent : TGObject;
+ target : PGPtrArray;
+ relationship : TAtkRelationType;
+ end;
+
+ PAtkRelationClass = ^TAtkRelationClass;
+ TAtkRelationClass = record
+ parent : TGObjectClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+function ATK_TYPE_RELATION : GType;
+function ATK_RELATION(obj: pointer) : PAtkRelation;
+function ATK_RELATION_CLASS(klass: pointer) : PAtkRelationClass;
+function ATK_IS_RELATION(obj: pointer) : boolean;
+function ATK_IS_RELATION_CLASS(klass: pointer) : boolean;
+function ATK_RELATION_GET_CLASS(obj: pointer) : PAtkRelationClass;
+
+
+function atk_relation_get_type:GType; cdecl; external atklib;
+function atk_relation_type_register(name:Pgchar):TAtkRelationType; cdecl; external atklib;
+function atk_relation_type_get_name(_type:TAtkRelationType):Pgchar; cdecl; external atklib;
+function atk_relation_type_for_name(name:Pgchar):TAtkRelationType; cdecl; external atklib;
+{ Create a new relation for the specified key and the specified list of targets. }
+function atk_relation_new(targets:PPAtkObject; n_targets:gint; relationship:TAtkRelationType):PAtkRelation; cdecl; external atklib;
+{ Returns the type of a relation. }
+function atk_relation_get_relation_type(relation:PAtkRelation):TAtkRelationType; cdecl; external atklib;
+{ Returns the target list of a relation. }
+function atk_relation_get_target(relation:PAtkRelation):PGPtrArray; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_RELATION : GType;
+begin
+ ATK_TYPE_RELATION:=atk_relation_get_type;
+end;
+
+function ATK_RELATION(obj: pointer) : PAtkRelation;
+begin
+ ATK_RELATION:=PAtkRelation(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_RELATION));
+end;
+
+function ATK_RELATION_CLASS(klass: pointer) : PAtkRelationClass;
+begin
+ ATK_RELATION_CLASS:=PAtkRelationClass(G_TYPE_CHECK_CLASS_CAST(klass,ATK_TYPE_RELATION));
+end;
+
+function ATK_IS_RELATION(obj: pointer) : boolean;
+begin
+ ATK_IS_RELATION:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_RELATION);
+end;
+
+function ATK_IS_RELATION_CLASS(klass: pointer) : boolean;
+begin
+ ATK_IS_RELATION_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,ATK_TYPE_RELATION);
+end;
+
+function ATK_RELATION_GET_CLASS(obj: pointer) : PAtkRelationClass;
+begin
+ ATK_RELATION_GET_CLASS:=PAtkRelationClass(G_TYPE_INSTANCE_GET_CLASS(obj,ATK_TYPE_RELATION));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkrelationset.inc b/packages/gtk2/src/atk/atkrelationset.inc
new file mode 100644
index 0000000000..2c8639ec7e
--- /dev/null
+++ b/packages/gtk2/src/atk/atkrelationset.inc
@@ -0,0 +1,79 @@
+// included by atk.pp
+
+{$IFDEF read_forward_definitions}
+ PAtkRelationSet = ^TAtkRelationSet;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ TAtkRelationSet = record
+ parent : TGObject;
+ relations : PGPtrArray;
+ end;
+
+ PAtkRelationSetClass = ^TAtkRelationSetClass;
+ TAtkRelationSetClass = record
+ parent : TGObjectClass;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_RELATION_SET : GType;
+function ATK_RELATION_SET(obj: pointer) : PAtkRelationSet;
+function ATK_RELATION_SET_CLASS(klass: pointer) : PAtkRelationSetClass;
+function ATK_IS_RELATION_SET(obj: pointer) : boolean;
+function ATK_IS_RELATION_SET_CLASS(klass: pointer) : boolean;
+function ATK_RELATION_SET_GET_CLASS(obj: pointer) : PAtkRelationSetClass;
+
+
+function atk_relation_set_get_type:GType; cdecl; external atklib;
+function atk_relation_set_new:PAtkRelationSet; cdecl; external atklib;
+function atk_relation_set_contains(RelationSet:PAtkRelationSet; relationship:TAtkRelationType):gboolean; cdecl; external atklib;
+procedure atk_relation_set_remove(RelationSet:PAtkRelationSet; relation:PAtkRelation); cdecl; external atklib;
+procedure atk_relation_set_add(RelationSet:PAtkRelationSet; relation:PAtkRelation); cdecl; external atklib;
+function atk_relation_set_get_n_relations(RelationSet:PAtkRelationSet):gint; cdecl; external atklib;
+function atk_relation_set_get_relation(RelationSet:PAtkRelationSet; i:gint):PAtkRelation; cdecl; external atklib;
+function atk_relation_set_get_relation_by_type(RelationSet:PAtkRelationSet; relationship:TAtkRelationType):PAtkRelation; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_RELATION_SET : GType;
+begin
+ ATK_TYPE_RELATION_SET:=atk_relation_set_get_type;
+end;
+
+function ATK_RELATION_SET(obj: pointer) : PAtkRelationSet;
+begin
+ ATK_RELATION_SET:=PAtkRelationSet(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_RELATION_SET));
+end;
+
+function ATK_RELATION_SET_CLASS(klass: pointer) : PAtkRelationSetClass;
+begin
+ ATK_RELATION_SET_CLASS:=PAtkRelationSetClass(G_TYPE_CHECK_CLASS_CAST(klass,ATK_TYPE_RELATION_SET));
+end;
+
+function ATK_IS_RELATION_SET(obj: pointer) : boolean;
+begin
+ ATK_IS_RELATION_SET:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_RELATION_SET);
+end;
+
+function ATK_IS_RELATION_SET_CLASS(klass: pointer) : boolean;
+begin
+ ATK_IS_RELATION_SET_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,ATK_TYPE_RELATION_SET);
+end;
+
+function ATK_RELATION_SET_GET_CLASS(obj: pointer) : PAtkRelationSetClass;
+begin
+ ATK_RELATION_SET_GET_CLASS:=PAtkRelationSetClass(G_TYPE_INSTANCE_GET_CLASS(obj,ATK_TYPE_RELATION_SET));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkselection.inc b/packages/gtk2/src/atk/atkselection.inc
new file mode 100644
index 0000000000..ffb5e81110
--- /dev/null
+++ b/packages/gtk2/src/atk/atkselection.inc
@@ -0,0 +1,77 @@
+// included by atk.pp
+
+{
+ This AtkSelection interface provides the standard mechanism for an
+ assistive technology to determine what the current selected children are,
+ as well as modify the selection set. Any anObject that has children that
+ can be selected should support the AtkSelection interface.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ signal handlers }
+ PAtkSelectionIface = ^TAtkSelectionIface;
+ TAtkSelectionIface = record
+ parent : TGTypeInterface;
+ add_selection : function (selection:PAtkSelection; i:gint):gboolean; cdecl;
+ clear_selection : function (selection:PAtkSelection):gboolean; cdecl;
+ ref_selection : function (selection:PAtkSelection; i:gint):PAtkObject; cdecl;
+ get_selection_count : function (selection:PAtkSelection):gint; cdecl;
+ is_child_selected : function (selection:PAtkSelection; i:gint):gboolean; cdecl;
+ remove_selection : function (selection:PAtkSelection; i:gint):gboolean; cdecl;
+ select_all_selection : function (selection:PAtkSelection):gboolean; cdecl;
+ selection_changed : procedure (selection:PAtkSelection); cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_SELECTION : GType;
+function ATK_IS_SELECTION(obj: pointer) : boolean;
+function ATK_SELECTION(obj: pointer) : PAtkSelection;
+function ATK_SELECTION_GET_IFACE(obj: pointer) : PAtkSelectionIface;
+
+
+function atk_selection_get_type:GType; cdecl; external atklib;
+function atk_selection_add_selection(selection:PAtkSelection; i:gint):gboolean; cdecl; external atklib;
+function atk_selection_clear_selection(selection:PAtkSelection):gboolean; cdecl; external atklib;
+function atk_selection_ref_selection(selection:PAtkSelection; i:gint):PAtkObject; cdecl; external atklib;
+function atk_selection_get_selection_count(selection:PAtkSelection):gint; cdecl; external atklib;
+function atk_selection_is_child_selected(selection:PAtkSelection; i:gint):gboolean; cdecl; external atklib;
+function atk_selection_remove_selection(selection:PAtkSelection; i:gint):gboolean; cdecl; external atklib;
+function atk_selection_select_all_selection(selection:PAtkSelection):gboolean; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_SELECTION : GType;
+begin
+ ATK_TYPE_SELECTION:=atk_selection_get_type;
+end;
+
+function ATK_IS_SELECTION(obj: pointer) : boolean;
+begin
+ ATK_IS_SELECTION:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_SELECTION);
+end;
+
+function ATK_SELECTION(obj: pointer) : PAtkSelection;
+begin
+ ATK_SELECTION:=PAtkSelection(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_SELECTION));
+end;
+
+function ATK_SELECTION_GET_IFACE(obj: pointer) : PAtkSelectionIface;
+begin
+ ATK_SELECTION_GET_IFACE:=PAtkSelectionIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_SELECTION));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkstate.inc b/packages/gtk2/src/atk/atkstate.inc
new file mode 100644
index 0000000000..82e567c79c
--- /dev/null
+++ b/packages/gtk2/src/atk/atkstate.inc
@@ -0,0 +1,96 @@
+// included by atk.pp
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{
+ AtkStateType:
+ @ATK_STATE_INVALID: Indicates an invalid state
+ @ATK_STATE_ACTIVE: Indicates a window is currently the active window
+ @ATK_STATE_ARMED: Indicates that the anObject is armed
+ @ATK_STATE_BUSY: Indicates the current anObject is busy
+ @ATK_STATE_CHECKED: Indicates this anObject is currently checked
+ @ATK_STATE_DEFUNCT: Indicates the user interface anObject corresponding to this anObject no longer exists
+ @ATK_STATE_EDITABLE: Indicates the user can change the contents of this anObject
+ @ATK_STATE_ENABLED: Indicates that this anObject is enabled
+ @ATK_STATE_EXPANDABLE: Indicates this anObject allows progressive disclosure of its children
+ @ATK_STATE_EXPANDED: Indicates this anObject its expanded
+ @ATK_STATE_FOCUSABLE: Indicates this anObject can accept keyboard focus, which means all events resulting from typing on the keyboard will normally be passed to it when it has focus
+ @ATK_STATE_FOCUSED: Indicates this anObject currently has the keyboard focus
+ @ATK_STATE_HORIZONTAL: Indicates the orientation of this anObject is horizontal
+ @ATK_STATE_ICONIFIED: Indicates this anObject is minimized and is represented only by an icon
+ @ATK_STATE_MODAL: Indicates something must be done with this anObject before the user can interact with an anObject in a different window
+ @ATK_STATE_MULTI_LINE: Indicates this (text) anObject can contain multiple lines of text
+ @ATK_STATE_MULTISELECTABLE: Indicates this anObject allows more than one of its children to be selected at the same time
+ @ATK_STATE_OPAQUE: Indicates this anObject paints every pixel within its rectangular region
+ @ATK_STATE_PRESSED: Indicates this anObject is currently pressed
+ @ATK_STATE_RESIZABLE: Indicates the size of this anObject is not fixed
+ @ATK_STATE_SELECTABLE: Indicates this anObject is the child of an anObject that allows its children to be selected and that this child is one of those children that can be selected
+ @ATK_STATE_SELECTED: Indicates this anObject is the child of an anObject that allows its children to be selected and that this child is one of those children that has been selected
+ @ATK_STATE_SENSITIVE: Indicates this anObject is sensitive
+ @ATK_STATE_SHOWING: Indicates this anObject, the anObject's parent, the anObject's parent's parent, and so on, are all visible
+ @ATK_STATE_SINGLE_LINE: Indicates this (text) anObject can contain only a single line of text
+ @ATK_STATE_STALE: Indicates that the index associated with this anObject has changed since the user accessed the anObject.
+ @ATK_STATE_TRANSIENT: Indicates this anObject is transient
+ @ATK_STATE_VERTICAL: Indicates the orientation of this anObject is vertical
+ @ATK_STATE_VISIBLE: Indicates this anObject is visible
+ @ATK_STATE_LAST_DEFINED: Not a valid role, used for finding theEnd of enumeration
+
+ The possible types of states of an anObject
+ }
+ PAtkStateType = ^TAtkStateType;
+ TAtkStateType = (
+ ATK_STATE_INVALID,
+ ATK_STATE_ACTIVE,
+ ATK_STATE_ARMED,
+ ATK_STATE_BUSY,
+ ATK_STATE_CHECKED,
+ ATK_STATE_DEFUNCT,
+ ATK_STATE_EDITABLE,
+ ATK_STATE_ENABLED,
+ ATK_STATE_EXPANDABLE,
+ ATK_STATE_EXPANDED,
+ ATK_STATE_FOCUSABLE,
+ ATK_STATE_FOCUSED,
+ ATK_STATE_HORIZONTAL,
+ ATK_STATE_ICONIFIED,
+ ATK_STATE_MODAL,
+ ATK_STATE_MULTI_LINE,
+ ATK_STATE_MULTISELECTABLE,
+ ATK_STATE_OPAQUE,
+ ATK_STATE_PRESSED,
+ ATK_STATE_RESIZABLE,
+ ATK_STATE_SELECTABLE,
+ ATK_STATE_SELECTED,
+ ATK_STATE_SENSITIVE,
+ ATK_STATE_SHOWING,
+ ATK_STATE_SINGLE_LINE,
+ ATK_STATE_STALE,
+ ATK_STATE_TRANSIENT,
+ ATK_STATE_VERTICAL,
+ ATK_STATE_VISIBLE,
+ ATK_STATE_LAST_DEFINED
+ );
+
+ PAtkState = ^TAtkState;
+ TAtkState = guint64;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+function atk_state_type_register(name:Pgchar):TAtkStateType; cdecl; external atklib;
+function atk_state_type_get_name(_type:TAtkStateType):Pgchar; cdecl; external atklib;
+function atk_state_type_for_name(name:Pgchar):TAtkStateType; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkstateset.inc b/packages/gtk2/src/atk/atkstateset.inc
new file mode 100644
index 0000000000..7b0adfde03
--- /dev/null
+++ b/packages/gtk2/src/atk/atkstateset.inc
@@ -0,0 +1,80 @@
+// included by atk.pp
+
+{$IFDEF read_forward_definitions}
+ PAtkStateSet = ^TAtkStateSet;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ TAtkStateSet = record
+ parent : TGObject;
+ end;
+
+ PAtkStateSetClass = ^TAtkStateSetClass;
+ TAtkStateSetClass = record
+ parent : TGObjectClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_STATE_SET : GType;
+function ATK_STATE_SET(obj: pointer) : PAtkStateSet;
+function ATK_STATE_SET_CLASS(klass: pointer) : PAtkStateSetClass;
+function ATK_IS_STATE_SET(obj: pointer) : boolean;
+function ATK_IS_STATE_SET_CLASS(klass: pointer) : boolean;
+function ATK_STATE_SET_GET_CLASS(obj: pointer) : PAtkStateSetClass;
+
+
+function atk_state_set_get_type:GType; cdecl; external atklib;
+function atk_state_set_new:PAtkStateSet; cdecl; external atklib;
+function atk_state_set_is_empty(StateSet:PAtkStateSet):gboolean; cdecl; external atklib;
+function atk_state_set_add_state(StateSet:PAtkStateSet; _type:TAtkStateType):gboolean; cdecl; external atklib;
+procedure atk_state_set_add_states(StateSet:PAtkStateSet; types:PAtkStateType; n_types:gint); cdecl; external atklib;
+procedure atk_state_set_clear_states(StateSet:PAtkStateSet); cdecl; external atklib;
+function atk_state_set_contains_state(StateSet:PAtkStateSet; _type:TAtkStateType):gboolean; cdecl; external atklib;
+function atk_state_set_contains_states(StateSet:PAtkStateSet; types:PAtkStateType; n_types:gint):gboolean; cdecl; external atklib;
+function atk_state_set_remove_state(StateSet:PAtkStateSet; _type:TAtkStateType):gboolean; cdecl; external atklib;
+function atk_state_set_and_sets(StateSet:PAtkStateSet; compare_set:PAtkStateSet):PAtkStateSet; cdecl; external atklib;
+function atk_state_set_or_sets(StateSet:PAtkStateSet; compare_set:PAtkStateSet):PAtkStateSet; cdecl; external atklib;
+function atk_state_set_xor_sets(StateSet:PAtkStateSet; compare_set:PAtkStateSet):PAtkStateSet; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_STATE_SET : GType;
+begin
+ ATK_TYPE_STATE_SET:=atk_state_set_get_type;
+end;
+
+function ATK_STATE_SET(obj: pointer) : PAtkStateSet;
+begin
+ ATK_STATE_SET:=PAtkStateSet(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_STATE_SET));
+end;
+
+function ATK_STATE_SET_CLASS(klass: pointer) : PAtkStateSetClass;
+begin
+ ATK_STATE_SET_CLASS:=PAtkStateSetClass(G_TYPE_CHECK_CLASS_CAST(klass,ATK_TYPE_STATE_SET));
+end;
+
+function ATK_IS_STATE_SET(obj: pointer) : boolean;
+begin
+ ATK_IS_STATE_SET:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_STATE_SET);
+end;
+
+function ATK_IS_STATE_SET_CLASS(klass: pointer) : boolean;
+begin
+ ATK_IS_STATE_SET_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,ATK_TYPE_STATE_SET);
+end;
+
+function ATK_STATE_SET_GET_CLASS(obj: pointer) : PAtkStateSetClass;
+begin
+ ATK_STATE_SET_GET_CLASS:=PAtkStateSetClass(G_TYPE_INSTANCE_GET_CLASS(obj,ATK_TYPE_STATE_SET));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkstreamablecontent.inc b/packages/gtk2/src/atk/atkstreamablecontent.inc
new file mode 100644
index 0000000000..c6c899dabf
--- /dev/null
+++ b/packages/gtk2/src/atk/atkstreamablecontent.inc
@@ -0,0 +1,78 @@
+// included by atk.pp
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ Get the number of mime types supported by this anObject }
+{ Gets the specified mime type supported by this anObject.
+ The mime types are 0-based so the first mime type is
+ at index 0, the second at index 1 and so on.
+
+ This assumes that the strings for the mime types are stored in the
+ AtkStreamableContent. Alternatively the could be removed
+ and the caller would be responsible for calling g_free() on the
+ returned value.
+ }
+{
+ Is one possible implementation for this method that it constructs the
+ content appropriate for the mime type and then creates a temporary
+ file containing the content, opens the file and then calls
+ g_io_channel_unix_new_fd().
+ }
+ PAtkStreamableContentIface = ^TAtkStreamableContentIface;
+ TAtkStreamableContentIface = record
+ parent : TGTypeInterface;
+ get_n_mime_types : function (streamable:PAtkStreamableContent):gint; cdecl;
+ get_mime_type : function (streamable:PAtkStreamableContent; i:gint):Pgchar; cdecl;
+ get_stream : function (streamable:PAtkStreamableContent; mime_type:Pgchar):PGIOChannel; cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ pad3 : TAtkFunction;
+ pad4 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_STREAMABLE_CONTENT : GType;
+function ATK_IS_STREAMABLE_CONTENT(obj: pointer) : boolean;
+function ATK_STREAMABLE_CONTENT(obj: pointer) : PAtkStreamableContent;
+function ATK_STREAMABLE_CONTENT_GET_IFACE(obj: pointer) : PAtkStreamableContentIface;
+
+
+function atk_streamable_content_get_type:GType; cdecl; external atklib;
+function atk_streamable_content_get_n_mime_types(streamable:PAtkStreamableContent):gint; cdecl; external atklib;
+function atk_streamable_content_get_mime_type(streamable:PAtkStreamableContent; i:gint):Pgchar; cdecl; external atklib;
+function atk_streamable_content_get_stream(streamable:PAtkStreamableContent; mime_type:Pgchar):PGIOChannel; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_STREAMABLE_CONTENT : GType;
+begin
+ ATK_TYPE_STREAMABLE_CONTENT:=atk_streamable_content_get_type;
+end;
+
+function ATK_IS_STREAMABLE_CONTENT(obj: pointer) : boolean;
+begin
+ ATK_IS_STREAMABLE_CONTENT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_STREAMABLE_CONTENT);
+end;
+
+function ATK_STREAMABLE_CONTENT(obj: pointer) : PAtkStreamableContent;
+begin
+ ATK_STREAMABLE_CONTENT:=PAtkStreamableContent(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_STREAMABLE_CONTENT));
+end;
+
+function ATK_STREAMABLE_CONTENT_GET_IFACE(obj: pointer) : PAtkStreamableContentIface;
+begin
+ ATK_STREAMABLE_CONTENT_GET_IFACE:=PAtkStreamableContentIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_STREAMABLE_CONTENT));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atktable.inc b/packages/gtk2/src/atk/atktable.inc
new file mode 100644
index 0000000000..fa8cf962c4
--- /dev/null
+++ b/packages/gtk2/src/atk/atktable.inc
@@ -0,0 +1,129 @@
+// included by atk.pp
+
+{
+ AtkTable describes a user-interface component that presents data in
+ two-dimensional table format.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{
+ signal handlers
+ }
+ PAtkTableIface = ^TAtkTableIface;
+ TAtkTableIface = record
+ parent : TGTypeInterface;
+ ref_at : function (table:PAtkTable; row:gint; column:gint):PAtkObject; cdecl;
+ get_index_at : function (table:PAtkTable; row:gint; column:gint):gint; cdecl;
+ get_column_at_index : function (table:PAtkTable; index:gint):gint; cdecl;
+ get_row_at_index : function (table:PAtkTable; index:gint):gint; cdecl;
+ get_n_columns : function (table:PAtkTable):gint; cdecl;
+ get_n_rows : function (table:PAtkTable):gint; cdecl;
+ get_column_extent_at : function (table:PAtkTable; row:gint; column:gint):gint; cdecl;
+ get_row_extent_at : function (table:PAtkTable; row:gint; column:gint):gint; cdecl;
+ get_caption : function (table:PAtkTable):PAtkObject; cdecl;
+ get_column_description : function (table:PAtkTable; column:gint):Pgchar; cdecl;
+ get_column_header : function (table:PAtkTable; column:gint):PAtkObject; cdecl;
+ get_row_description : function (table:PAtkTable; row:gint):Pgchar; cdecl;
+ get_row_header : function (table:PAtkTable; row:gint):PAtkObject; cdecl;
+ get_summary : function (table:PAtkTable):PAtkObject; cdecl;
+ set_caption : procedure (table:PAtkTable; caption:PAtkObject); cdecl;
+ set_column_description : procedure (table:PAtkTable; column:gint; description:Pgchar); cdecl;
+ set_column_header : procedure (table:PAtkTable; column:gint; header:PAtkObject); cdecl;
+ set_row_description : procedure (table:PAtkTable; row:gint; description:Pgchar); cdecl;
+ set_row_header : procedure (table:PAtkTable; row:gint; header:PAtkObject); cdecl;
+ set_summary : procedure (table:PAtkTable; accessible:PAtkObject); cdecl;
+ get_selected_columns : function (table:PAtkTable; selected:PPgint):gint; cdecl;
+ get_selected_rows : function (table:PAtkTable; selected:PPgint):gint; cdecl;
+ is_column_selected : function (table:PAtkTable; column:gint):gboolean; cdecl;
+ is_row_selected : function (table:PAtkTable; row:gint):gboolean; cdecl;
+ is_selected : function (table:PAtkTable; row:gint; column:gint):gboolean; cdecl;
+ add_row_selection : function (table:PAtkTable; row:gint):gboolean; cdecl;
+ remove_row_selection : function (table:PAtkTable; row:gint):gboolean; cdecl;
+ add_column_selection : function (table:PAtkTable; column:gint):gboolean; cdecl;
+ remove_column_selection : function (table:PAtkTable; column:gint):gboolean; cdecl;
+ row_inserted : procedure (table:PAtkTable; row:gint; num_inserted:gint); cdecl;
+ column_inserted : procedure (table:PAtkTable; column:gint; num_inserted:gint); cdecl;
+ row_deleted : procedure (table:PAtkTable; row:gint; num_deleted:gint); cdecl;
+ column_deleted : procedure (table:PAtkTable; column:gint; num_deleted:gint); cdecl;
+ row_reordered : procedure (table:PAtkTable); cdecl;
+ column_reordered : procedure (table:PAtkTable); cdecl;
+ model_changed : procedure (table:PAtkTable); cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ pad3 : TAtkFunction;
+ pad4 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_TABLE : GType;
+function ATK_IS_TABLE(obj: pointer) : boolean;
+function ATK_TABLE(obj: pointer) : PAtkTable;
+function ATK_TABLE_GET_IFACE(obj: pointer) : PAtkTableIface;
+
+
+function atk_table_get_type:GType; cdecl; external atklib;
+function atk_table_ref_at(table:PAtkTable; row:gint; column:gint):PAtkObject; cdecl; external atklib;
+function atk_table_get_index_at(table:PAtkTable; row:gint; column:gint):gint; cdecl; external atklib;
+function atk_table_get_column_at_index(table:PAtkTable; index:gint):gint; cdecl; external atklib;
+function atk_table_get_row_at_index(table:PAtkTable; index:gint):gint; cdecl; external atklib;
+function atk_table_get_n_columns(table:PAtkTable):gint; cdecl; external atklib;
+function atk_table_get_n_rows(table:PAtkTable):gint; cdecl; external atklib;
+function atk_table_get_column_extent_at(table:PAtkTable; row:gint; column:gint):gint; cdecl; external atklib;
+function atk_table_get_row_extent_at(table:PAtkTable; row:gint; column:gint):gint; cdecl; external atklib;
+function atk_table_get_caption(table:PAtkTable):PAtkObject; cdecl; external atklib;
+function atk_table_get_column_description(table:PAtkTable; column:gint):Pgchar; cdecl; external atklib;
+function atk_table_get_column_header(table:PAtkTable; column:gint):PAtkObject; cdecl; external atklib;
+function atk_table_get_row_description(table:PAtkTable; row:gint):Pgchar; cdecl; external atklib;
+function atk_table_get_row_header(table:PAtkTable; row:gint):PAtkObject; cdecl; external atklib;
+function atk_table_get_summary(table:PAtkTable):PAtkObject; cdecl; external atklib;
+procedure atk_table_set_caption(table:PAtkTable; caption:PAtkObject); cdecl; external atklib;
+procedure atk_table_set_column_description(table:PAtkTable; column:gint; description:Pgchar); cdecl; external atklib;
+procedure atk_table_set_column_header(table:PAtkTable; column:gint; header:PAtkObject); cdecl; external atklib;
+procedure atk_table_set_row_description(table:PAtkTable; row:gint; description:Pgchar); cdecl; external atklib;
+procedure atk_table_set_row_header(table:PAtkTable; row:gint; header:PAtkObject); cdecl; external atklib;
+procedure atk_table_set_summary(table:PAtkTable; accessible:PAtkObject); cdecl; external atklib;
+function atk_table_get_selected_columns(table:PAtkTable; selected:PPgint):gint; cdecl; external atklib;
+function atk_table_get_selected_rows(table:PAtkTable; selected:PPgint):gint; cdecl; external atklib;
+function atk_table_is_column_selected(table:PAtkTable; column:gint):gboolean; cdecl; external atklib;
+function atk_table_is_row_selected(table:PAtkTable; row:gint):gboolean; cdecl; external atklib;
+function atk_table_is_selected(table:PAtkTable; row:gint; column:gint):gboolean; cdecl; external atklib;
+function atk_table_add_row_selection(table:PAtkTable; row:gint):gboolean; cdecl; external atklib;
+function atk_table_remove_row_selection(table:PAtkTable; row:gint):gboolean; cdecl; external atklib;
+function atk_table_add_column_selection(table:PAtkTable; column:gint):gboolean; cdecl; external atklib;
+function atk_table_remove_column_selection(table:PAtkTable; column:gint):gboolean; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_TABLE : GType;
+begin
+ ATK_TYPE_TABLE:=atk_table_get_type;
+end;
+
+function ATK_IS_TABLE(obj: pointer) : boolean;
+begin
+ ATK_IS_TABLE:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_TABLE);
+end;
+
+function ATK_TABLE(obj: pointer) : PAtkTable;
+begin
+ ATK_TABLE:=PAtkTable(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_TABLE));
+end;
+
+function ATK_TABLE_GET_IFACE(obj: pointer) : PAtkTableIface;
+begin
+ ATK_TABLE_GET_IFACE:=PAtkTableIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_TABLE));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atktext.inc b/packages/gtk2/src/atk/atktext.inc
new file mode 100644
index 0000000000..d53c62a6c4
--- /dev/null
+++ b/packages/gtk2/src/atk/atktext.inc
@@ -0,0 +1,230 @@
+// included by atk.pp
+
+{
+ AtkAttributeSet:
+
+ This is a singly-linked list (a #GSList) of #AtkAttribute. It is
+ used by atk_text_get_run_attributes(), atk_text_get_default_attributes()
+ and atk_editable_text_set_run_attributes()
+ }
+
+{$IFDEF read_forward_definitions}
+ PAtkAttributeSet = ^TAtkAttributeSet;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ TAtkAttributeSet = TGSList;
+
+{
+ AtkAttribute:
+ @name: The attribute name. Call atk_text_attr_get_name()
+ @value: the value of the attribute, represented as a string.
+ Call atk_text_attr_get_value() for those which are strings.
+ For values which are numbers, the string representation of the number
+ is in value.
+
+ A string name/value pair representing a text attribute.
+ }
+ PAtkAttribute = ^TAtkAttribute;
+ TAtkAttribute = record
+ name : Pgchar;
+ value : Pgchar;
+ end;
+
+{
+ AtkTextAttribute
+ @ATK_TEXT_ATTR_INVALID: Invalid attribute
+ @ATK_TEXT_ATTR_LEFT_MARGIN: The pixel width of the left margin
+ @ATK_TEXT_ATTR_RIGHT_MARGIN: The pixel width of the right margin
+ @ATK_TEXT_ATTR_INDENT: The number of pixels that the text is indented
+ @ATK_TEXT_ATTR_INVISIBLE: Either "true" or "false" indicating whether text is visible or not
+ @ATK_TEXT_ATTR_EDITABLE: Either "true" or "false" indicating whether text is editable or not
+ @ATK_TEXT_ATTR_PIXELS_ABOVE_LINES: Pixels of blank space to leave above each newline-terminated line.
+ @ATK_TEXT_ATTR_PIXELS_BELOW_LINES: Pixels of blank space to leave below each newline-terminated line.
+ @ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP: Pixels of blank space to leave between wrapped lines inside the same newline-terminated line (paragraph).
+ @ATK_TEXT_ATTR_BG_FULL_HEIGHT: "true" or "false" whether to make the background color for each character the height of the highest font used on the current line, or the height of the font used for the current character.
+ @ATK_TEXT_ATTR_RISE: Number of pixels that the characters are risen above the baseline
+ @ATK_TEXT_ATTR_UNDERLINE: "none", "single", "double" or "low"
+ @ATK_TEXT_ATTR_STRIKETHROUGH: "true" or "false" whether the text is strikethrough
+ @ATK_TEXT_ATTR_SIZE: The size of the characters.
+ @ATK_TEXT_ATTR_SCALE: The scale of the characters. The value is a string representation of a double
+ @ATK_TEXT_ATTR_WEIGHT: The weight of the characters.
+ @ATK_TEXT_ATTR_LANGUAGE: The language used
+ @ATK_TEXT_ATTR_FAMILY_NAME: The font family name
+ @ATK_TEXT_ATTR_BG_COLOR: The background color. The value is an RGB value of the format "%u,%u,%u"
+ @ATK_TEXT_ATTR_FG_COLOR:The foreground color. The value is an RGB value of the format "%u,%u,%u"
+ @ATK_TEXT_ATTR_BG_STIPPLE: "true" if a #GdkBitmap is set for stippling the background color.
+ @ATK_TEXT_ATTR_FG_STIPPLE: "true" if a #GdkBitmap is set for stippling the foreground color.
+ @ATK_TEXT_ATTR_WRAP_MODE: The wrap mode of the text, if any. Values are "none", "char" or "word"
+ @ATK_TEXT_ATTR_DIRECTION: The direction of the text, if set. Values are "none", "ltr" or "rtl"
+ @ATK_TEXT_ATTR_JUSTIFICATION: The justification of the text, if set. Values are "left", "right", "center" or "fill"
+ @ATK_TEXT_ATTR_STRETCH: The stretch of the text, if set. Values are "ultra_condensed", "extra_condensed", "condensed", "semi_condensed", "normal", "semi_expanded", "expanded", "extra_expanded" or "ultra_expanded"
+ @ATK_TEXT_ATTR_VARIANT: The capitalization variant of the text, if set. Values are "normal" or "small_caps"
+ @ATK_TEXT_ATTR_STYLE: The slant style of the text, if set. Values are "normal", "oblique" or "italic"
+ @ATK_TEXT_ATTR_LAST_DEFINED: not a valid text attribute, used for finding theEnd of enumeration
+
+ Describes the text attributes supported
+ }
+
+ PAtkTextAttribute = ^TAtkTextAttribute;
+ TAtkTextAttribute = (
+ ATK_TEXT_ATTR_INVALID {:= 0},
+ ATK_TEXT_ATTR_LEFT_MARGIN,
+ ATK_TEXT_ATTR_RIGHT_MARGIN,
+ ATK_TEXT_ATTR_INDENT,
+ ATK_TEXT_ATTR_INVISIBLE,
+ ATK_TEXT_ATTR_EDITABLE,
+ ATK_TEXT_ATTR_PIXELS_ABOVE_LINES,
+ ATK_TEXT_ATTR_PIXELS_BELOW_LINES,
+ ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP,
+ ATK_TEXT_ATTR_BG_FULL_HEIGHT,
+ ATK_TEXT_ATTR_RISE,
+ ATK_TEXT_ATTR_UNDERLINE,
+ ATK_TEXT_ATTR_STRIKETHROUGH,
+ ATK_TEXT_ATTR_SIZE,
+ ATK_TEXT_ATTR_SCALE,
+ ATK_TEXT_ATTR_WEIGHT,
+ ATK_TEXT_ATTR_LANGUAGE,
+ ATK_TEXT_ATTR_FAMILY_NAME,
+ ATK_TEXT_ATTR_BG_COLOR,
+ ATK_TEXT_ATTR_FG_COLOR,
+ ATK_TEXT_ATTR_BG_STIPPLE,
+ ATK_TEXT_ATTR_FG_STIPPLE,
+ ATK_TEXT_ATTR_WRAP_MODE,
+ ATK_TEXT_ATTR_DIRECTION,
+ ATK_TEXT_ATTR_JUSTIFICATION,
+ ATK_TEXT_ATTR_STRETCH,
+ ATK_TEXT_ATTR_VARIANT,
+ ATK_TEXT_ATTR_STYLE,
+ ATK_TEXT_ATTR_LAST_DEFINED
+ );
+
+
+{
+ AtkTextBoundary:
+ @ATK_TEXT_BOUNDARY_CHAR:
+ @ATK_TEXT_BOUNDARY_WORD_START:
+ @ATK_TEXT_BOUNDARY_WORD_END:
+ @ATK_TEXT_BOUNDARY_SENTENCE_START:
+ @ATK_TEXT_BOUNDARY_SENTENCE_END:
+ @ATK_TEXT_BOUNDARY_LINE_START:
+ @ATK_TEXT_BOUNDARY_LINE_END:
+
+ Text boundary types used for specifying boundaries for regions of text
+ }
+
+ PAtkTextBoundary = ^TAtkTextBoundary;
+ TAtkTextBoundary = (
+ ATK_TEXT_BOUNDARY_CHAR,
+ ATK_TEXT_BOUNDARY_WORD_START,
+ ATK_TEXT_BOUNDARY_WORD_END,
+ ATK_TEXT_BOUNDARY_SENTENCE_START,
+ ATK_TEXT_BOUNDARY_SENTENCE_END,
+ ATK_TEXT_BOUNDARY_LINE_START,
+ ATK_TEXT_BOUNDARY_LINE_END
+ );
+{
+ signal handlers
+ }
+ PAtkTextIface = ^TAtkTextIface;
+ TAtkTextIface = record
+ parent : TGTypeInterface;
+ get_text : function (text:PAtkText; start_offset:gint; end_offset:gint):Pgchar; cdecl;
+ get_text_after_offset : function (text:PAtkText; offset:gint; boundary_type:TAtkTextBoundary; start_offset:Pgint; end_offset:Pgint):Pgchar; cdecl;
+ get_text_at_offset : function (text:PAtkText; offset:gint; boundary_type:TAtkTextBoundary; start_offset:Pgint; end_offset:Pgint):Pgchar; cdecl;
+ get_character_at_offset : function (text:PAtkText; offset:gint):gunichar; cdecl;
+ get_text_before_offset : function (text:PAtkText; offset:gint; boundary_type:TAtkTextBoundary; start_offset:Pgint; end_offset:Pgint):Pgchar; cdecl;
+ get_caret_offset : function (text:PAtkText):gint; cdecl;
+ get_run_attributes : function (text:PAtkText; offset:gint; start_offset:Pgint; end_offset:Pgint):PAtkAttributeSet; cdecl;
+ get_default_attributes : function (text:PAtkText):PAtkAttributeSet; cdecl;
+ get_character_extents : procedure (text:PAtkText; offset:gint; x:Pgint; y:Pgint; width:Pgint;
+ height:Pgint; coords:TAtkCoordType); cdecl;
+ get_character_count : function (text:PAtkText):gint; cdecl;
+ get_offset_at_point : function (text:PAtkText; x:gint; y:gint; coords:TAtkCoordType):gint; cdecl;
+ get_n_selections : function (text:PAtkText):gint; cdecl;
+ get_selection : function (text:PAtkText; selection_num:gint; start_offset:Pgint; end_offset:Pgint):Pgchar; cdecl;
+ add_selection : function (text:PAtkText; start_offset:gint; end_offset:gint):gboolean; cdecl;
+ remove_selection : function (text:PAtkText; selection_num:gint):gboolean; cdecl;
+ set_selection : function (text:PAtkText; selection_num:gint; start_offset:gint; end_offset:gint):gboolean; cdecl;
+ set_caret_offset : function (text:PAtkText; offset:gint):gboolean; cdecl;
+ text_changed : procedure (text:PAtkText; position:gint; length:gint); cdecl;
+ text_caret_moved : procedure (text:PAtkText; location:gint); cdecl;
+ text_selection_changed : procedure (text:PAtkText); cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ pad3 : TAtkFunction;
+ pad4 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+function atk_text_attribute_register(name:Pgchar):TAtkTextAttribute; cdecl; external atklib;
+
+function ATK_TYPE_TEXT : GType;
+function ATK_IS_TEXT(obj: pointer) : boolean;
+function ATK_TEXT(obj: pointer) : PAtkText;
+function ATK_TEXT_GET_IFACE(obj: pointer) : PAtkTextIface;
+
+
+{
+ Additional AtkObject properties used by AtkText:
+ "accessible_text" (accessible text has changed)
+ "accessible_caret" (accessible text cursor position changed:
+ editable text only)
+ }
+function atk_text_get_type:GType; cdecl; external atklib;
+function atk_text_get_text(text:PAtkText; start_offset:gint; end_offset:gint):Pgchar; cdecl; external atklib;
+function atk_text_get_character_at_offset(text:PAtkText; offset:gint):gunichar; cdecl; external atklib;
+function atk_text_get_text_after_offset(text:PAtkText; offset:gint; boundary_type:TAtkTextBoundary; start_offset:Pgint; end_offset:Pgint):Pgchar; cdecl; external atklib;
+function atk_text_get_text_at_offset(text:PAtkText; offset:gint; boundary_type:TAtkTextBoundary; start_offset:Pgint; end_offset:Pgint):Pgchar; cdecl; external atklib;
+function atk_text_get_text_before_offset(text:PAtkText; offset:gint; boundary_type:TAtkTextBoundary; start_offset:Pgint; end_offset:Pgint):Pgchar; cdecl; external atklib;
+function atk_text_get_caret_offset(text:PAtkText):gint; cdecl; external atklib;
+procedure atk_text_get_character_extents(text:PAtkText; offset:gint; x:Pgint; y:Pgint; width:Pgint;
+ height:Pgint; coords:TAtkCoordType); cdecl; external atklib;
+function atk_text_get_run_attributes(text:PAtkText; offset:gint; start_offset:Pgint; end_offset:Pgint):PAtkAttributeSet; cdecl; external atklib;
+function atk_text_get_default_attributes(text:PAtkText):PAtkAttributeSet; cdecl; external atklib;
+function atk_text_get_character_count(text:PAtkText):gint; cdecl; external atklib;
+function atk_text_get_offset_at_point(text:PAtkText; x:gint; y:gint; coords:TAtkCoordType):gint; cdecl; external atklib;
+function atk_text_get_n_selections(text:PAtkText):gint; cdecl; external atklib;
+function atk_text_get_selection(text:PAtkText; selection_num:gint; start_offset:Pgint; end_offset:Pgint):Pgchar; cdecl; external atklib;
+function atk_text_add_selection(text:PAtkText; start_offset:gint; end_offset:gint):gboolean; cdecl; external atklib;
+function atk_text_remove_selection(text:PAtkText; selection_num:gint):gboolean; cdecl; external atklib;
+function atk_text_set_selection(text:PAtkText; selection_num:gint; start_offset:gint; end_offset:gint):gboolean; cdecl; external atklib;
+function atk_text_set_caret_offset(text:PAtkText; offset:gint):gboolean; cdecl; external atklib;
+procedure atk_attribute_set_free(attrib_set:PAtkAttributeSet); cdecl; external atklib;
+function atk_text_attribute_get_name(attr:TAtkTextAttribute):Pgchar; cdecl; external atklib;
+function atk_text_attribute_for_name(name:Pgchar):TAtkTextAttribute; cdecl; external atklib;
+function atk_text_attribute_get_value(attr:TAtkTextAttribute; index:gint):Pgchar; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_TEXT : GType;
+begin
+ ATK_TYPE_TEXT:=atk_text_get_type;
+end;
+
+function ATK_IS_TEXT(obj: pointer) : boolean;
+begin
+ ATK_IS_TEXT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_TEXT);
+end;
+
+function ATK_TEXT(obj: pointer) : PAtkText;
+begin
+ ATK_TEXT:=PAtkText(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_TEXT));
+end;
+
+function ATK_TEXT_GET_IFACE(obj: pointer) : PAtkTextIface;
+begin
+ ATK_TEXT_GET_IFACE:=PAtkTextIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_TEXT));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkutil.inc b/packages/gtk2/src/atk/atkutil.inc
new file mode 100644
index 0000000000..23524dd5da
--- /dev/null
+++ b/packages/gtk2/src/atk/atkutil.inc
@@ -0,0 +1,175 @@
+// included by atk.pp
+
+{$IFDEF read_forward_definitions}
+{
+ AtkCoordType:
+ @ATK_XY_SCREEN: specifies xy coordinates relative to the screen
+ @ATK_XY_WINDOW: specifies xy coordinates relative to the widgets
+ top-level window
+
+ Specifies how xy coordinates are to be interpreted. Used by functions such
+ as atk_component_get_position() and atk_text_get_character_extents()
+ }
+ PAtkCoordType = ^TAtkCoordType;
+ TAtkCoordType = (
+ ATK_XY_SCREEN,
+ ATK_XY_WINDOW
+ );
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{
+ A focus tracker is a function which is called when an anObject
+ receives focus.
+ }
+ TAtkEventListener = procedure (para1:PAtkObject); cdecl;
+
+ TAtkEventListenerInitProc = procedure;
+ TAtkEventListenerInit = procedure (para1: TAtkEventListenerInitProc); cdecl;
+
+ PAtkKeyEventStruct = ^TAtkKeyEventStruct;
+ TAtkKeyEventStruct = record
+ _type : gint;
+ state : guint;
+ keyval : guint;
+ length : gint;
+ _string : Pgchar;
+ keycode : guint16;
+ timestamp : guint32;
+ end;
+ TAtkKeySnoopFunc = function (event:PAtkKeyEventStruct; func_data:gpointer):gint; cdecl;
+
+
+ PAtkKeyEventType = ^TAtkKeyEventType;
+ TAtkKeyEventType = (
+ ATK_KEY_EVENT_PRESS,
+ ATK_KEY_EVENT_RELEASE,
+ ATK_KEY_EVENT_LAST_DEFINED
+ );
+
+ PAtkUtil = ^TAtkUtil;
+ TAtkUtil = record
+ parent : TGObject;
+ end;
+
+ PAtkUtilClass = ^TAtkUtilClass;
+ TAtkUtilClass = record
+ parent : TGObjectClass;
+ add_global_event_listener : function (listener:TGSignalEmissionHook; event_type:Pgchar):guint; cdecl;
+ remove_global_event_listener : procedure (listener_id:guint); cdecl;
+ add_key_event_listener : function (listener:TAtkKeySnoopFunc; data:gpointer):guint; cdecl;
+ remove_key_event_listener : procedure (listener_id:guint); cdecl;
+ get_root : function :PAtkObject; cdecl;
+ get_toolkit_name : function :Pgchar; cdecl;
+ get_toolkit_version : function :Pgchar; cdecl;
+ end;
+
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_UTIL : GType;
+function ATK_IS_UTIL(obj: pointer) : boolean;
+function ATK_UTIL(obj: pointer) : PAtkUtil;
+function ATK_UTIL_CLASS(klass: pointer) : PAtkUtilClass;
+function ATK_IS_UTIL_CLASS(klass: pointer) : boolean;
+function ATK_UTIL_GET_CLASS(obj: pointer) : PAtkUtilClass;
+
+
+function atk_util_get_type:GType; cdecl; external atklib;
+
+{
+ Adds the specified function to the list of functions to be called
+ when an anObject receives focus.
+ }
+
+function atk_add_focus_tracker(focus_tracker:TAtkEventListener):guint; cdecl; external atklib;
+{
+ Removes the specified focus tracker from the list of function
+ to be called when any anObject receives focus
+ }
+procedure atk_remove_focus_tracker(tracker_id:guint); cdecl; external atklib;
+{
+ Specifies the function to be called for focus tracker initialization.
+ removal. This function should be called by an implementation of the
+ ATK interface if any specific work needs to be done to enable
+ focus tracking.
+ }
+procedure atk_focus_tracker_init(add_function:TAtkEventListenerInit); cdecl; external atklib;
+{
+ Cause the focus tracker functions which have been specified to be
+ executed for the anObject.
+ }
+procedure atk_focus_tracker_notify(anObject:PAtkObject); cdecl; external atklib;
+{
+ Adds the specified function to the list of functions to be called
+ when an event of type event_type occurs.
+ }
+function atk_add_global_event_listener(listener:TGSignalEmissionHook; event_type:Pgchar):guint; cdecl; external atklib;
+{
+ Removes the specified event listener
+ }
+procedure atk_remove_global_event_listener(listener_id:guint); cdecl; external atklib;
+{
+ Adds the specified function to the list of functions to be called
+ when an keyboard event occurs.
+ }
+function atk_add_key_event_listener(listener:TAtkKeySnoopFunc; data:gpointer):guint; cdecl; external atklib;
+{
+ Removes the specified event listener
+ }
+procedure atk_remove_key_event_listener(listener_id:guint); cdecl; external atklib;
+{
+ Returns the root accessible container for the current application.
+ }
+function atk_get_root:PAtkObject; cdecl; external atklib;
+{
+ Returns name string for the GUI toolkit.
+ }
+function atk_get_toolkit_name:Pgchar; cdecl; external atklib;
+{
+ Returns version string for the GUI toolkit.
+ }
+function atk_get_toolkit_version:Pgchar; cdecl; external atklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_UTIL : GType;
+begin
+ ATK_TYPE_UTIL:=atk_util_get_type;
+end;
+
+function ATK_IS_UTIL(obj: pointer) : boolean;
+begin
+ ATK_IS_UTIL:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_UTIL);
+end;
+
+function ATK_UTIL(obj: pointer) : PAtkUtil;
+begin
+ ATK_UTIL:=PAtkUtil(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_UTIL));
+end;
+
+function ATK_UTIL_CLASS(klass: pointer) : PAtkUtilClass;
+begin
+ ATK_UTIL_CLASS:=PAtkUtilClass(G_TYPE_CHECK_CLASS_CAST(klass,ATK_TYPE_UTIL));
+end;
+
+function ATK_IS_UTIL_CLASS(klass: pointer) : boolean;
+begin
+ ATK_IS_UTIL_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,ATK_TYPE_UTIL);
+end;
+
+function ATK_UTIL_GET_CLASS(obj: pointer) : PAtkUtilClass;
+begin
+ ATK_UTIL_GET_CLASS:=PAtkUtilClass(G_TYPE_INSTANCE_GET_CLASS(obj,ATK_TYPE_UTIL));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/atk/atkvalue.inc b/packages/gtk2/src/atk/atkvalue.inc
new file mode 100644
index 0000000000..47a12f7c14
--- /dev/null
+++ b/packages/gtk2/src/atk/atkvalue.inc
@@ -0,0 +1,76 @@
+// included by atk.pp
+
+{
+ The AtkValue interface should be supported by any anObject that
+ supports a numerical value (e.g., a scroll bar). This interface
+ provides the standard mechanism for an assistive technology to
+ determine and set the numerical value as well as get the minimum
+ and maximum values.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PAtkValueIface = ^TAtkValueIface;
+ TAtkValueIface = record
+ parent : TGTypeInterface;
+ get_current_value : procedure (obj:PAtkValue; value:PGValue); cdecl;
+ get_maximum_value : procedure (obj:PAtkValue; value:PGValue); cdecl;
+ get_minimum_value : procedure (obj:PAtkValue; value:PGValue); cdecl;
+ set_current_value : function (obj:PAtkValue; value:PGValue):gboolean; cdecl;
+ pad1 : TAtkFunction;
+ pad2 : TAtkFunction;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function ATK_TYPE_VALUE : GType;
+function ATK_IS_VALUE(obj: pointer) : boolean;
+function ATK_VALUE(obj: pointer) : PAtkValue;
+function ATK_VALUE_GET_IFACE(obj: pointer) : PAtkValueIface;
+
+
+function atk_value_get_type:GType; cdecl; external atklib;
+procedure atk_value_get_current_value(obj:PAtkValue; value:PGValue); cdecl; external atklib;
+procedure atk_value_get_maximum_value(obj:PAtkValue; value:PGValue); cdecl; external atklib;
+procedure atk_value_get_minimum_value(obj:PAtkValue; value:PGValue); cdecl; external atklib;
+function atk_value_set_current_value(obj:PAtkValue; value:PGValue):gboolean; cdecl; external atklib;
+{
+ Additional GObject properties exported by GaccessibleValue:
+ "accessible_value"
+ (the accessible value has changed)
+ }
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function ATK_TYPE_VALUE : GType;
+begin
+ ATK_TYPE_VALUE:=atk_value_get_type;
+end;
+
+function ATK_IS_VALUE(obj: pointer) : boolean;
+begin
+ ATK_IS_VALUE:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_VALUE);
+end;
+
+function ATK_VALUE(obj: pointer) : PAtkValue;
+begin
+ ATK_VALUE:=PAtkValue(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_VALUE));
+end;
+
+function ATK_VALUE_GET_IFACE(obj: pointer) : PAtkValueIface;
+begin
+ ATK_VALUE_GET_IFACE:=PAtkValueIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_VALUE));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/buildgtk2.pp b/packages/gtk2/src/buildgtk2.pp
new file mode 100644
index 0000000000..3e6a2594e4
--- /dev/null
+++ b/packages/gtk2/src/buildgtk2.pp
@@ -0,0 +1,36 @@
+{
+ Dummy unit to compile everything in one go
+
+ This unit is part of gtk2forpascal.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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 buildgtk2; // keep unit name lowercase for kylix
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ gtk2, libglade2,gdkglext,gtkglext
+{$ifdef unix}
+ ,gdk2x
+{$endif unix}
+ ;
+
+implementation
+
+end.
diff --git a/packages/gtk2/src/glib/galloca.inc b/packages/gtk2/src/glib/galloca.inc
new file mode 100644
index 0000000000..7459793bb5
--- /dev/null
+++ b/packages/gtk2/src/glib/galloca.inc
@@ -0,0 +1,10 @@
+{ $PACKRECORDS C}
+
+{$ifndef __G_ALLOCA_H__}
+{$define __G_ALLOCA_H__}
+
+// {$include gtypes.inc}
+
+
+{$endif}
+
diff --git a/packages/gtk2/src/glib/garray.inc b/packages/gtk2/src/glib/garray.inc
new file mode 100644
index 0000000000..2ddcb7d421
--- /dev/null
+++ b/packages/gtk2/src/glib/garray.inc
@@ -0,0 +1,126 @@
+
+{$ifndef __G_ARRAY_H__}
+{$define __G_ARRAY_H__}
+
+
+//{$include gtypes.inc}
+
+ type
+ PGArray = ^TGArray;
+ TGArray = record
+ data : Pgchar;
+ len : guint;
+ end;
+
+ PGByteArray = ^TGByteArray;
+ TGByteArray = record
+ data : Pguint8;
+ len : guint;
+ end;
+
+ PGPtrArray = ^TGPtrArray;
+ TGPtrArray = record
+ pdata : Pgpointer;
+ len : guint;
+ end;
+
+
+
+
+{* Resizable arrays, remove fills any cleared spot and shortens the
+ * array, while preserving the order. remove_fast will distort the
+ * order by moving the last element to the position of the removed
+ *}
+
+
+{ macro function; see glib.cc for implementation}
+
+ function g_array_append_val(a: PGArray; v : gpointer) : PGArray;
+
+ function g_array_prepend_val(a: PGArray; v : gpointer) : PGArray;
+
+ function g_array_insert_val(a: PGArray; i: guint; v : gpointer) : PGArray;
+
+
+
+ function g_array_new(zero_terminated:gboolean; clear:gboolean; element_size:guint):PGArray;cdecl;external gliblib name 'g_array_new';
+
+ function g_array_sized_new(zero_terminated:gboolean; clear:gboolean; element_size:guint; reserved_size:guint):PGArray;cdecl;external gliblib name 'g_array_sized_new';
+
+ function g_array_free(parray:PGArray; free_segment:gboolean):Pgchar;cdecl;external gliblib name 'g_array_free';
+
+ function g_array_append_vals(parray:PGArray; data:gconstpointer; len:guint):PGArray;cdecl;external gliblib name 'g_array_append_vals';
+
+ function g_array_prepend_vals(parray:PGArray; data:gconstpointer; len:guint):PGArray;cdecl;external gliblib name 'g_array_prepend_vals';
+
+ function g_array_insert_vals(parray:PGArray; index:guint; data:gconstpointer; len:guint):PGArray;cdecl;external gliblib name 'g_array_insert_vals';
+
+ function g_array_set_size(parray:PGArray; length:guint):PGArray;cdecl;external gliblib name 'g_array_set_size';
+
+ function g_array_remove_index(parray:PGArray; index:guint):PGArray;cdecl;external gliblib name 'g_array_remove_index';
+
+ function g_array_remove_index_fast(parray:PGArray; index:guint):PGArray;cdecl;external gliblib name 'g_array_remove_index_fast';
+
+ procedure g_array_sort(parray:PGArray; compare_func:TGCompareFunc);cdecl;external gliblib name 'g_array_sort';
+
+ procedure g_array_sort_with_data(parray:PGArray; compare_func:TGCompareDataFunc; user_data:gpointer);cdecl;external gliblib name 'g_array_sort_with_data';
+
+{* Resizable pointer array. This interface is much less complicated
+ * than the above. Add appends appends a pointer. Remove fills any
+ * cleared spot and shortens the array. remove_fast will again distort
+ * order.
+ *}
+
+ { macro function }
+ function g_ptr_array_index (parray: PGPtrArray; index: guint): gpointer;
+
+
+ function g_ptr_array_new:PGPtrArray;cdecl;external gliblib name 'g_ptr_array_new';
+
+ function g_ptr_array_sized_new(reserved_size:guint):PGPtrArray;cdecl;external gliblib name 'g_ptr_array_sized_new';
+
+ function g_ptr_array_free(parray:PGPtrArray; free_seg:gboolean):Pgpointer;cdecl;external gliblib name 'g_ptr_array_free';
+
+ procedure g_ptr_array_set_size(parray:PGPtrArray; length:gint);cdecl;external gliblib name 'g_ptr_array_set_size';
+
+ function g_ptr_array_remove_index(parray:PGPtrArray; index:guint):gpointer;cdecl;external gliblib name 'g_ptr_array_remove_index';
+
+ function g_ptr_array_remove_index_fast(parray:PGPtrArray; index:guint):gpointer;cdecl;external gliblib name 'g_ptr_array_remove_index_fast';
+
+ function g_ptr_array_remove(parray:PGPtrArray; data:gpointer):gboolean;cdecl;external gliblib name 'g_ptr_array_remove';
+
+ function g_ptr_array_remove_fast(parray:PGPtrArray; data:gpointer):gboolean;cdecl;external gliblib name 'g_ptr_array_remove_fast';
+
+ procedure g_ptr_array_add(parray:PGPtrArray; data:gpointer);cdecl;external gliblib name 'g_ptr_array_add';
+
+ procedure g_ptr_array_sort(parray:PGPtrArray; compare_func:TGCompareFunc);cdecl;external gliblib name 'g_ptr_array_sort';
+
+ procedure g_ptr_array_sort_with_data(parray:PGPtrArray; compare_func:TGCompareDataFunc; user_data:gpointer);cdecl;external gliblib name 'g_ptr_array_sort_with_data';
+
+
+
+ function g_byte_array_new:PGByteArray;cdecl;external gliblib name 'g_byte_array_new';
+
+ function g_byte_array_sized_new(reserved_size:guint):PGByteArray;cdecl;external gliblib name 'g_byte_array_sized_new';
+
+ function g_byte_array_free(parray:PGByteArray; free_segment:gboolean):Pguint8;cdecl;external gliblib name 'g_byte_array_free';
+
+ function g_byte_array_append(parray:PGByteArray; data:Pguint8; len:guint):PGByteArray;cdecl;external gliblib name 'g_byte_array_append';
+
+ function g_byte_array_prepend(parray:PGByteArray; data:Pguint8; len:guint):PGByteArray;cdecl;external gliblib name 'g_byte_array_prepend';
+
+ function g_byte_array_set_size(parray:PGByteArray; length:guint):PGByteArray;cdecl;external gliblib name 'g_byte_array_set_size';
+
+ function g_byte_array_remove_index(parray:PGByteArray; index:guint):PGByteArray;cdecl;external gliblib name 'g_byte_array_remove_index';
+
+ function g_byte_array_remove_index_fast(parray:PGByteArray; index:guint):PGByteArray;cdecl;external gliblib name 'g_byte_array_remove_index_fast';
+
+ procedure g_byte_array_sort(parray:PGByteArray; compare_func:TGCompareFunc);cdecl;external gliblib name 'g_byte_array_sort';
+
+ procedure g_byte_array_sort_with_data(parray:PGByteArray; compare_func:TGCompareDataFunc; user_data:gpointer);cdecl;external gliblib name 'g_byte_array_sort_with_data';
+
+{$endif}
+
+
+
+
diff --git a/packages/gtk2/src/glib/gasyncqueue.inc b/packages/gtk2/src/glib/gasyncqueue.inc
new file mode 100644
index 0000000000..85bf247e1c
--- /dev/null
+++ b/packages/gtk2/src/glib/gasyncqueue.inc
@@ -0,0 +1,66 @@
+{$ifndef __G_ASYNCQUEUE_H__}
+{$define __G_ASYNCQUEUE_H__}
+
+// {$include gthread.inc}
+
+{* Asyncronous Queues, can be used to communicate between threads
+ *}
+
+ type
+ PGAsyncQueue = pointer;
+{* Get a new GAsyncQueue with the ref_count 1 *}
+
+ function g_async_queue_new:PGAsyncQueue;cdecl;external gliblib name 'g_async_queue_new';
+
+{* Lock and unlock an GAsyncQueue, all functions lock the queue for
+ * themselves, but in certain cirumstances you want to hold the lock longer,
+ * thus you lock the queue, call the *_unlocked functions and unlock it again
+ *}
+ procedure g_async_queue_lock(queue:PGAsyncQueue);cdecl;external gliblib name 'g_async_queue_lock';
+ procedure g_async_queue_unlock(queue:PGAsyncQueue);cdecl;external gliblib name 'g_async_queue_unlock';
+
+
+{* Ref and unref the GAsyncQueue. g_async_queue_unref_unlocked makes
+ * no sense, as after the unreffing the Queue might be gone and can't
+ * be unlocked. So you have a function to call, if you don't hold the
+ * lock (g_async_queue_unref) and one to call, when you already hold
+ * the lock (g_async_queue_unref_and_unlock). After that however, you
+ * don't hold the lock anymore and the Queue might in fact be
+ * destroyed, if you unrefed to zero *}
+
+ procedure g_async_queue_ref(queue:PGAsyncQueue);cdecl;external gliblib name 'g_async_queue_ref';
+ procedure g_async_queue_ref_unlocked(queue:PGAsyncQueue);cdecl;external gliblib name 'g_async_queue_ref_unlocked';
+ procedure g_async_queue_unref(queue:PGAsyncQueue);cdecl;external gliblib name 'g_async_queue_unref';
+ procedure g_async_queue_unref_and_unlock(queue:PGAsyncQueue);cdecl;external gliblib name 'g_async_queue_unref_and_unlock';
+
+{* Push data into the async queue. Must not be NULL *}
+ procedure g_async_queue_push(queue:PGAsyncQueue; data:gpointer);cdecl;external gliblib name 'g_async_queue_push';
+ procedure g_async_queue_push_unlocked(queue:PGAsyncQueue; data:gpointer);cdecl;external gliblib name 'g_async_queue_push_unlocked';
+
+{* Pop data from the async queue, when no data is there, the thread is blocked
+ * until data arrives *}
+ function g_async_queue_pop(queue:PGAsyncQueue):gpointer;cdecl;external gliblib name 'g_async_queue_pop';
+ function g_async_queue_pop_unlocked(queue:PGAsyncQueue):gpointer;cdecl;external gliblib name 'g_async_queue_pop_unlocked';
+
+{* Try to pop data, NULL is returned in case of empty queue *}
+ function g_async_queue_try_pop(queue:PGAsyncQueue):gpointer;cdecl;external gliblib name 'g_async_queue_try_pop';
+ function g_async_queue_try_pop_unlocked(queue:PGAsyncQueue):gpointer;cdecl;external gliblib name 'g_async_queue_try_pop_unlocked';
+
+{* Wait for data until at maximum until end_time is reached, NULL is returned
+ * in case of empty queue*}
+ function g_async_queue_timed_pop(queue:PGAsyncQueue; end_time:PGTimeVal):gpointer;cdecl;external gliblib name 'g_async_queue_timed_pop';
+ function g_async_queue_timed_pop_unlocked(queue:PGAsyncQueue; end_time:PGTimeVal):gpointer;cdecl;external gliblib name 'g_async_queue_timed_pop_unlocked';
+
+
+{* Return the length of the queue, negative values mean, that threads
+ * are waiting, positve values mean, that there are entries in the
+ * queue. Actually this function returns the length of the queue minus
+ * the number of waiting threads, g_async_queue_length == 0 could also
+ * mean 'n' entries in the queue and 'n' thread waiting, such can
+ * happen due to locking of the queue or due to scheduling. *}
+
+ function g_async_queue_length(queue:PGAsyncQueue):gint;cdecl;external gliblib name 'g_async_queue_length';
+ function g_async_queue_length_unlocked(queue:PGAsyncQueue):gint;cdecl;external gliblib name 'g_async_queue_length_unlocked';
+
+{$endif}
+
diff --git a/packages/gtk2/src/glib/gbacktrace.inc b/packages/gtk2/src/glib/gbacktrace.inc
new file mode 100644
index 0000000000..5eb2fb2f85
--- /dev/null
+++ b/packages/gtk2/src/glib/gbacktrace.inc
@@ -0,0 +1,28 @@
+{$ifndef __G_BACKTRACE_H__}
+{$define __G_BACKTRACE_H__}
+
+//{$include gtypes.inc}
+
+{ Fatal error handlers.
+ g_on_error_query() will prompt the user to either
+ [E]xit, [H]alt, [P]roceed or show [S]tack trace.
+ g_on_error_stack_trace() invokes gdb, which attaches to the current
+ process and shows a stack trace.
+ These function may cause different actions on non-unix platforms.
+ The prg_name arg is required by gdb to find the executable, if it is
+ passed as NULL, g_on_error_query() will try g_get_prgname().
+}
+
+ procedure g_on_error_query (prg_name:Pgchar);cdecl;external gliblib name 'g_on_error_query';
+ procedure g_on_error_stack_trace(prg_name:Pgchar);cdecl;external gliblib name 'g_on_error_stack_trace';
+
+{ Hacker macro to place breakpoints for elected machines.
+ Actual use is strongly discouraged of course ;)
+
+}
+
+{* Not implemented *}
+
+
+{$endif} { __G_BACKTRACE_H__ }
+
diff --git a/packages/gtk2/src/glib/gboxed.inc b/packages/gtk2/src/glib/gboxed.inc
new file mode 100644
index 0000000000..fc24b32958
--- /dev/null
+++ b/packages/gtk2/src/glib/gboxed.inc
@@ -0,0 +1,67 @@
+(*
+ * gboxed.inc
+ * depends on gtype.inc
+ *
+ * included by glib2.pas
+ *)
+
+{$ifdef read_forward_definitions}
+(* --- typedefs --- *)
+ TGBoxedCopyFunc = function (boxed:gpointer):gpointer; cdecl;
+
+ TGBoxedFreeFunc = procedure (boxed:gpointer); cdecl;
+{$endif read_forward_definitions}
+
+(****************************************************************)
+
+{$ifdef read_interface_rest}
+
+(*** some macros ***)
+function G_TYPE_IS_BOXED(_type : GType) : gboolean;
+
+function G_VALUE_HOLDS_BOXED(value : PGValue) : gboolean;
+
+(*** GLib boxed types ***)
+
+function G_TYPE_CLOSURE : GType;
+
+function G_TYPE_VALUE : GType;
+
+function G_TYPE_VALUE_ARRAY : GType;
+
+function G_TYPE_GSTRING : GType;
+
+
+(*** prototypes ***)
+
+function g_boxed_copy(boxed_type : GType;
+ src_boxed : gconstpointer):gpointer; cdecl; external gobjectlib;
+
+procedure g_boxed_free(boxed_type : GType;
+ boxed : gpointer); cdecl; external gobjectlib;
+
+procedure g_value_set_boxed(value : PGValue;
+ v_boxed : gconstpointer); cdecl; external gobjectlib;
+
+procedure g_value_set_static_boxed(value : PGValue;
+ v_boxed : gconstpointer); cdecl; external gobjectlib;
+
+function g_value_get_boxed( value : PGValue):gpointer; cdecl; external gobjectlib;
+
+function g_value_dup_boxed( value : PGValue):gpointer; cdecl; external gobjectlib;
+
+
+function g_boxed_type_register_static(name : Pgchar;
+ boxed_copy : TGBoxedCopyFunc;
+ boxed_free : TGBoxedFreeFunc):GType; cdecl; external gobjectlib;
+
+(*** internal (marshaller specific) ***)
+procedure g_value_set_boxed_take_ownership(value:PGValue;
+ v_boxed:gconstpointer); cdecl; external gobjectlib;
+
+function g_closure_get_type : GType; cdecl; external gobjectlib;
+function g_value_get_type : GType; cdecl; external gobjectlib;
+function g_value_array_get_type : GType; cdecl; external gobjectlib;
+function g_gstring_get_type : GType; cdecl; external gobjectlib;
+
+{$endif read_interface_rest}
diff --git a/packages/gtk2/src/glib/gcache.inc b/packages/gtk2/src/glib/gcache.inc
new file mode 100644
index 0000000000..ac4982083e
--- /dev/null
+++ b/packages/gtk2/src/glib/gcache.inc
@@ -0,0 +1,25 @@
+// {include <glib/glist.h>}
+
+type
+ PGCache = pointer;
+
+ TGCacheNewFunc = function (key:gpointer):gpointer;cdecl;
+ TGCacheDupFunc = function (value:gpointer):gpointer;cdecl;
+ TGCacheDestroyFunc = procedure (value:gpointer);cdecl;
+
+{ Caches }
+
+ 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_equal_func:TGEqualFunc):PGCache;cdecl;external gliblib name 'g_cache_new';
+
+ procedure g_cache_destroy(cache:PGCache);cdecl;external gliblib name 'g_cache_destroy';
+
+ function g_cache_insert(cache:PGCache; key:gpointer):gpointer;cdecl;external gliblib name 'g_cache_insert';
+
+ procedure g_cache_remove(cache:PGCache; value:gconstpointer);cdecl;external gliblib name 'g_cache_remove';
+
+ procedure g_cache_key_foreach(cache:PGCache; func:TGHFunc; user_data:gpointer);cdecl;external gliblib name 'g_cache_key_foreach';
+
+ procedure g_cache_value_foreach(cache:PGCache; func:TGHFunc; user_data:gpointer);cdecl;external gliblib name 'g_cache_value_foreach';
+
+
diff --git a/packages/gtk2/src/glib/gclosure.inc b/packages/gtk2/src/glib/gclosure.inc
new file mode 100644
index 0000000000..b28325087c
--- /dev/null
+++ b/packages/gtk2/src/glib/gclosure.inc
@@ -0,0 +1,149 @@
+// included by glib2.pas
+
+{ -- typedefs --- }
+type
+ PGClosure = ^TGClosure;
+ PGClosureNotifyData = ^TGClosureNotifyData;
+ TGClosureNotify = procedure (data:gpointer; closure:PGClosure); cdecl;
+
+{< private > }
+{< private > }
+{< private > }
+{< private > }
+{ finalization notifiers }
+{< private > }
+{ invalidation notifiers }
+{< private > }
+{< private > }
+{< protected > }
+{< public > }
+{< public > }
+{< private > }
+{out }
+{< protected > }
+{< private > }
+{ invariants/constrains:
+ - ->marshal and ->data are _invalid_ as soon as ->is_invalid==TRUE
+ - invocation of all inotifiers occours prior to fnotifiers
+ - order of inotifiers is random
+ inotifiers may _not_ free/invalidate parameter values (e.g. ->data)
+ - order of fnotifiers is random
+ - each notifier may only be removed before or during its invocation
+ - reference counting may only happen prior to fnotify invocation
+ (in that sense, fnotifiers are really finalization handlers)
+ }
+ TGClosure = record
+ flag0 : longint;
+ marshal : procedure (closure:PGClosure; return_value:PGValue; n_param_values:guint; param_values:PGValue; invocation_hint:gpointer;
+ marshal_data:gpointer); cdecl;
+ data : gpointer;
+ notifiers : PGClosureNotifyData;
+ end;
+
+
+ TGCallBackProcedure = procedure;
+ TGCallback = procedure (para1: TGCallBackProcedure); cdecl;
+
+ TGClosureMarshal = procedure (closure:PGClosure; return_value:PGValue; n_param_values:guint; param_values:PGValue; invocation_hint:gpointer;
+ marshal_data:gpointer); cdecl;
+{ --- structures --- }
+ TGClosureNotifyData = record
+ data : gpointer;
+ notify : TGClosureNotify;
+ end;
+
+
+{ --- defines --- }
+
+function G_CLOSURE_NEEDS_MARSHAL(closure : Pointer) : boolean;
+function G_CLOSURE_N_NOTIFIERS(cl : PGClosure) : longint;
+function G_CCLOSURE_SWAP_DATA(cclosure : PGClosure) : longint;
+function G_CALLBACK(f : pointer) : TGCallback;
+
+const
+ bm_TGClosure_ref_count = $7FFF;
+ bp_TGClosure_ref_count = 0;
+ bm_TGClosure_meta_marshal = $8000;
+ bp_TGClosure_meta_marshal = 15;
+ bm_TGClosure_n_guards = $10000;
+ bp_TGClosure_n_guards = 16;
+ bm_TGClosure_n_fnotifiers = $60000;
+ bp_TGClosure_n_fnotifiers = 17;
+ bm_TGClosure_n_inotifiers = $7F80000;
+ bp_TGClosure_n_inotifiers = 19;
+ bm_TGClosure_in_inotify = $8000000;
+ bp_TGClosure_in_inotify = 27;
+ bm_TGClosure_floating = $10000000;
+ bp_TGClosure_floating = 28;
+ bm_TGClosure_derivative_flag = $20000000;
+ bp_TGClosure_derivative_flag = 29;
+ bm_TGClosure_in_marshal = $40000000;
+ bp_TGClosure_in_marshal = 30;
+ bm_TGClosure_is_invalid = $80000000;
+ bp_TGClosure_is_invalid = 31;
+
+function ref_count(var a : TGClosure) : guint;
+procedure set_ref_count(var a : TGClosure; __ref_count : guint);
+function meta_marshal(a : PGClosure) : guint;
+procedure set_meta_marshal(var a : TGClosure; __meta_marshal : guint);
+function n_guards(a : PGClosure) : guint;
+procedure set_n_guards(var a : TGClosure; __n_guards : guint);
+function n_fnotifiers(a : PGClosure) : guint;
+procedure set_n_fnotifiers(var a : TGClosure; __n_fnotifiers : guint);
+function n_inotifiers(a : PGClosure) : guint;
+procedure set_n_inotifiers(var a : TGClosure; __n_inotifiers : guint);
+function in_inotify(var a : TGClosure) : guint;
+procedure set_in_inotify(var a : TGClosure; __in_inotify : guint);
+function floating(var a : TGClosure) : guint;
+procedure set_floating(var a : TGClosure; __floating : guint);
+function derivative_flag(a : PGClosure) : guint;
+procedure set_derivative_flag(var a : TGClosure; __derivative_flag : guint);
+function in_marshal(var a : TGClosure) : guint;
+procedure set_in_marshal(var a : TGClosure; __in_marshal : guint);
+function is_invalid(var a : TGClosure) : guint;
+procedure set_is_invalid(var a : TGClosure; __is_invalid : guint);
+
+
+{ closure for C function calls, callback() is the user function }
+type
+ PGCClosure = ^TGCClosure;
+ TGCClosure = record
+ closure : TGClosure;
+ callback : gpointer;
+ end;
+
+{ --- prototypes --- }
+
+function g_cclosure_new(callback_func:TGCallback; user_data:gpointer; destroy_data:TGClosureNotify):PGClosure; cdecl; external gliblib;
+function g_cclosure_new_swap(callback_func:TGCallback; user_data:gpointer; destroy_data:TGClosureNotify):PGClosure; cdecl; external gliblib;
+function g_signal_type_cclosure_new(itype:GType; struct_offset:guint):PGClosure; cdecl; external gliblib;
+{ --- prototypes --- }
+function g_closure_ref(closure:PGClosure):PGClosure; cdecl; external gliblib;
+procedure g_closure_sink(closure:PGClosure); cdecl; external gliblib;
+procedure g_closure_unref(closure:PGClosure); cdecl; external gliblib;
+{ intimidating }
+function g_closure_new_simple(sizeof_closure:guint; data:gpointer):PGClosure; cdecl; external gliblib;
+procedure g_closure_add_finalize_notifier(closure:PGClosure; notify_data:gpointer; notify_func:TGClosureNotify); cdecl; external gliblib;
+procedure g_closure_remove_finalize_notifier(closure:PGClosure; notify_data:gpointer; notify_func:TGClosureNotify); cdecl; external gliblib;
+procedure g_closure_add_invalidate_notifier(closure:PGClosure; notify_data:gpointer; notify_func:TGClosureNotify); cdecl; external gliblib;
+procedure g_closure_remove_invalidate_notifier(closure:PGClosure; notify_data:gpointer; notify_func:TGClosureNotify); cdecl; external gliblib;
+procedure g_closure_add_marshal_guards(closure:PGClosure; pre_marshal_data:gpointer; pre_marshal_notify:TGClosureNotify; post_marshal_data:gpointer; post_marshal_notify:TGClosureNotify); cdecl; external gliblib;
+procedure g_closure_set_marshal(closure:PGClosure; marshal:TGClosureMarshal); cdecl; external gliblib;
+procedure g_closure_set_meta_marshal(closure:PGClosure; marshal_data:gpointer; meta_marshal:TGClosureMarshal); cdecl; external gliblib;
+procedure g_closure_invalidate(closure:PGClosure); cdecl; external gliblib;
+{out }
+procedure g_closure_invoke(closure:PGClosure; return_value:PGValue; n_param_values:guint; param_values:PGValue; invocation_hint:gpointer); cdecl; external gliblib;
+
+{ FIXME:
+ OK: data_object::destroy -> closure_invalidate();
+ MIS: closure_invalidate() -> disconnect(closure);
+ MIS: disconnect(closure) -> (unlink) closure_unref();
+ OK: closure_finalize() -> g_free (data_string);
+
+ random remarks:
+ - need marshaller repo with decent aliasing to base types
+ - provide marshaller collection, virtually covering anything out there
+ }
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gcompletion.inc b/packages/gtk2/src/glib/gcompletion.inc
new file mode 100644
index 0000000000..164aef42ca
--- /dev/null
+++ b/packages/gtk2/src/glib/gcompletion.inc
@@ -0,0 +1,33 @@
+// {$include <glib/glist.h>}
+
+ type
+ PGCompletionFunc = ^TGCompletionFunc;
+ TGCompletionFunc = gchar;
+
+{ GCompletion }
+
+ TGCompletionStrncmpFunc = function (s1:Pgchar; s2:Pgchar; n:gsize):gint;cdecl;
+ PGCompletion = ^TGCompletion;
+ TGCompletion = record
+ items : PGList;
+ func : TGCompletionFunc;
+ prefix : Pgchar;
+ cache : PGList;
+ strncmp_func : TGCompletionStrncmpFunc;
+ end;
+
+
+ function g_completion_new(func:TGCompletionFunc):PGCompletion;cdecl;external gliblib name 'g_completion_new';
+
+ procedure g_completion_add_items(cmp:PGCompletion; items:PGList);cdecl;external gliblib name 'g_completion_add_items';
+
+ procedure g_completion_remove_items(cmp:PGCompletion; items:PGList);cdecl;external gliblib name 'g_completion_remove_items';
+
+ procedure g_completion_clear_items(cmp:PGCompletion);cdecl;external gliblib name 'g_completion_clear_items';
+
+ function g_completion_complete(cmp:PGCompletion; prefix:Pgchar; new_prefix:PPgchar):PGList;cdecl;external gliblib name 'g_completion_complete';
+
+ procedure g_completion_set_compare(cmp:PGCompletion; strncmp_func:TGCompletionStrncmpFunc);cdecl;external gliblib name 'g_completion_set_compare';
+
+ procedure g_completion_free(cmp:PGCompletion);cdecl;external gliblib name 'g_completion_free';
+
diff --git a/packages/gtk2/src/glib/gconvert.inc b/packages/gtk2/src/glib/gconvert.inc
new file mode 100644
index 0000000000..590f2b0a58
--- /dev/null
+++ b/packages/gtk2/src/glib/gconvert.inc
@@ -0,0 +1,56 @@
+// {$include <stddef.h> /* For size_t */}
+// {$include <glib/gerror.h>}
+
+ type
+ PGConvertError = ^TGConvertError;
+ TGConvertError = (G_CONVERT_ERROR_NO_CONVERSION,
+ G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+ G_CONVERT_ERROR_FAILED,
+ G_CONVERT_ERROR_PARTIAL_INPUT,
+ G_CONVERT_ERROR_BAD_URI,
+ G_CONVERT_ERROR_NOT_ABSOLUTE_PATH
+ );
+
+ function G_CONVERT_ERROR : TGQuark;
+
+
+ function g_convert_error_quark:TGQuark;cdecl;external gliblib name 'g_convert_error_quark';
+
+{ Thin wrappers around iconv }
+ type
+ PGIConv = ^TGIConv;
+ TGIConv = pointer;
+
+ function g_iconv_open(to_codeset:Pgchar; from_codeset:Pgchar):TGIConv;cdecl;external gliblib name 'g_iconv_open';
+
+ function g_iconv(converter:TGIConv; inbuf:PPgchar; inbytes_left:Pgsize; outbuf:PPgchar; outbytes_left:Pgsize):gsize;cdecl;external gliblib name 'g_iconv';
+
+ function g_iconv_close(converter:TGIConv):gint;cdecl;external gliblib name 'g_iconv_close';
+
+ function g_convert(str:Pgchar; len:gssize; to_codeset:Pgchar; from_codeset:Pgchar; bytes_read:Pgsize;
+ bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_convert';
+
+ function g_convert_with_iconv(str:Pgchar; len:gssize; converter:TGIConv; bytes_read:Pgsize; bytes_written:Pgsize;
+ error:PPGError):Pgchar;cdecl;external gliblib name 'g_convert_with_iconv';
+
+ function g_convert_with_fallback(str:Pgchar; len:gssize; to_codeset:Pgchar; from_codeset:Pgchar; fallback:Pgchar;
+ bytes_read:Pgsize; bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_convert_with_fallback';
+
+{ Convert between libc's idea of strings and UTF-8. }
+
+ function g_locale_to_utf8(opsysstring:Pgchar; len:gssize; bytes_read:Pgsize; bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_locale_to_utf8';
+
+ function g_locale_from_utf8(utf8string:Pgchar; len:gssize; bytes_read:Pgsize; bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_locale_from_utf8';
+
+ { Convert between the operating system (or C runtime)
+ representation of file names and UTF-8.
+ }
+ function g_filename_to_utf8(opsysstring:Pgchar; len:gssize; bytes_read:Pgsize; bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_filename_to_utf8';
+
+ function g_filename_from_utf8(utf8string:Pgchar; len:gssize; bytes_read:Pgsize; bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_filename_from_utf8';
+
+ function g_filename_from_uri(uri:Pchar; hostname:PPchar; error:PPGError):Pgchar;cdecl;external gliblib name 'g_filename_from_uri';
+
+ function g_filename_to_uri(filename:Pchar; hostname:Pchar; error:PPGError):Pgchar;cdecl;external gliblib name 'g_filename_to_uri';
+
+
diff --git a/packages/gtk2/src/glib/gdataset.inc b/packages/gtk2/src/glib/gdataset.inc
new file mode 100644
index 0000000000..5d7b9fd9d8
--- /dev/null
+++ b/packages/gtk2/src/glib/gdataset.inc
@@ -0,0 +1,76 @@
+// included by glib2.pas
+
+{$IFDEF read_forward_definitions}
+ PPGData = ^PGData;
+ PGData = pointer;
+
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+type
+ TGDataForeachFunc = procedure (key_id:TGQuark; data:gpointer; user_data:gpointer);cdecl;
+{ Keyed Data List
+ }
+
+procedure g_datalist_init(datalist:PPGData);cdecl;external gliblib name 'g_datalist_init';
+
+procedure g_datalist_clear(datalist:PPGData);cdecl;external gliblib name 'g_datalist_clear';
+
+function g_datalist_id_get_data(datalist:PPGData; key_id:TGQuark):gpointer;cdecl;external gliblib 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 gliblib name 'g_datalist_id_set_data_full';
+
+function g_datalist_id_remove_no_notify(datalist:PPGData; key_id:TGQuark):gpointer;cdecl;external gliblib name 'g_datalist_id_remove_no_notify';
+
+procedure g_datalist_foreach(datalist:PPGData; func:TGDataForeachFunc; user_data:gpointer);cdecl;external gliblib name 'g_datalist_foreach';
+
+{macros}
+procedure g_datalist_id_set_data (datalist: PPGData; key_id:TGQuark; data: gpointer);
+
+procedure g_datalist_id_remove_data (datalist: PPGData; key_id:TGQuark);
+
+function g_datalist_get_data(datalist: PPGData; key_str:PGChar):PPGData;
+
+procedure g_datalist_set_data_full(datalist: PPGData; key_str:PGChar; data:gpointer; destroy_func:TGDestroyNotify);
+
+procedure g_datalist_set_data (datalist: PPGData; key_str:PGChar; data:gpointer);
+
+procedure g_datalist_remove_no_notify(datalist: PPGData; key_str:PGChar);
+
+procedure g_datalist_remove_data(datalist:PPGData; key_str:PGChar);
+
+
+{ Location Associated Keyed Data }
+
+function g_dataset_id_get_data(dataset_location:gconstpointer; key_id:TGQuark):gpointer;cdecl;external gliblib 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 gliblib name 'g_dataset_id_set_data_full';
+
+function g_dataset_id_remove_no_notify(dataset_location:gconstpointer; key_id:TGQuark):gpointer;cdecl;external gliblib name 'g_dataset_id_remove_no_notify';
+
+procedure g_dataset_foreach(dataset_location:gconstpointer; func:TGDataForeachFunc; user_data:gpointer);cdecl;external gliblib name 'g_dataset_foreach';
+
+
+
+{macros}
+procedure g_dataset_id_set_data(location: gconstpointer; key_id:TGQuark; data:gpointer);
+
+procedure g_dataset_id_remove_data(location: gconstpointer; key_id:TGQuark);
+
+function g_dataset_get_data(location: gconstpointer; key_str:PGChar): gpointer;
+
+procedure g_dataset_set_data_full(location: gconstpointer; key_str:PGChar; data:gpointer; destroy_func:TGDestroyNotify);
+
+procedure g_dataset_remove_no_notify(location: gconstpointer; key_str:PGChar);
+
+procedure g_dataset_set_data(location: gconstpointer; key_str:PGChar; data:gpointer);
+
+procedure g_dataset_remove_data(location:gconstpointer; key_str: PGChar);
+{$ENDIF read_interface_rest}
+
+// included by glib2.pas
+
+
diff --git a/packages/gtk2/src/glib/gdate.inc b/packages/gtk2/src/glib/gdate.inc
new file mode 100644
index 0000000000..a2382dae8c
--- /dev/null
+++ b/packages/gtk2/src/glib/gdate.inc
@@ -0,0 +1,256 @@
+// {$include <glib/gquark.h>}
+{ GDate
+
+ Date calculations (not time for now, to be resolved). These are a
+ mutant combination of Steffen Beyer's DateCalc routines
+ (http://www.perl.com/CPAN/authors/id/STBEY/) and Jon Trowbridge's
+ date routines (written for in-house software). Written by Havoc
+ Pennington <hp@pobox.com>
+}
+
+ type
+ PGTime = ^TGTime;
+ TGTime = gint32;
+
+ PGDateYear = ^TGDateYear;
+ TGDateYear = guint16;
+
+ PGDateDay = ^TGDateDay;
+ TGDateDay = guint8; // day of the month
+
+ { day of the month }
+ { make struct tm known without having to include time.h }
+
+ { from time.h }
+ Ptm = ^Ttm;
+ Ttm = record
+ tm_sec : gint; // Seconds. [0-60] (1 leap second)
+ tm_min : gint; // Minutes. [0-59]
+ tm_hour : gint; // Hours. [0-23]
+ tm_mday : gint; // Day. [1-31]
+ tm_mon : gint; // Month. [0-11]
+ tm_year : gint; // Year - 1900.
+ tm_wday : gint; // Day of week. [0-6]
+ tm_yday : gint; // Days in year.[0-365]
+ tm_isdst : gint; // DST. [-1/0/1]
+ tm_gmtoff: glong; // Seconds east of UTC.
+ tm_zone : pgchar; // Timezone abbreviation.
+ end;
+
+
+ { enum used to specify order of appearance in parsed date strings }
+
+ type
+ PGDateDMY = ^TGDateDMY;
+ TGDateDMY = integer;
+ const G_DATE_DAY = 0;
+ G_DATE_MONTH = 1;
+ G_DATE_YEAR = 2;
+
+ { actual week and month values }
+
+ type
+ PGDateWeekday = ^TGDateWeekday;
+ TGDateWeekday = integer;
+ 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
+ PGDateMonth = ^TGDateMonth;
+ TGDateMonth = integer;
+ 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;
+
+ { Note: directly manipulating structs is generally a bad idea, but
+ in this case it's an incredibly bad idea, because all or part
+ of this struct can be invalid at any given time. Use the functions,
+ or you will get hosed, I promise.
+ }
+
+ { julian days representation - we use a
+ bitfield hoping that 64 bit platforms
+ will pack this whole struct in one big
+ int
+ }
+ { julian is valid }
+ { dmy is valid }
+ { DMY representation }
+
+ type
+ PGDate = ^TGDate;
+ TGDate = record
+ flag0 : longint;
+ flag1 : longint;
+ end;
+
+ { g_date_new() returns an invalid date, you then have to _set() stuff
+ to get a usable anObject. You can also allocate a GDate statically,
+ then call g_date_clear() to initialize.
+ }
+
+ function g_date_new:PGDate; cdecl;external gliblib name 'g_date_new';
+
+ function g_date_new_dmy(day:TGDateDay; month:TGDateMonth; year:TGDateYear):PGDate;cdecl;external gliblib name 'g_date_new_dmy';
+
+ function g_date_new_julian(julian_day:guint32):PGDate;cdecl;external gliblib name 'g_date_new_julian';
+
+ procedure g_date_free(date:PGDate);cdecl;external gliblib name 'g_date_free';
+
+ { check g_date_valid() after doing an operation that might fail, like
+ _parse. Almost all g_date operations are undefined on invalid
+ dates (the exceptions are the mutators, since you need those to
+ return to validity).
+ }
+
+ function g_date_valid (date:PGDate): gboolean;cdecl;external gliblib name 'g_date_valid';
+
+ function g_date_valid_month (month:TGDateMonth):gboolean;cdecl;external gliblib name 'g_date_valid_month';
+
+ function g_date_valid_year (year:TGDateYear): gboolean;cdecl;external gliblib name 'g_date_valid_year';
+
+ function g_date_valid_weekday (weekday:TGDateWeekday): gboolean;cdecl;external gliblib name 'g_date_valid_weekday';
+
+ function g_date_valid_julian (julian_date:guint32): gboolean;cdecl;external gliblib name 'g_date_valid_julian';
+
+
+
+ function g_date_get_weekday(date:PGDate):TGDateWeekday;cdecl;external gliblib name 'g_date_get_weekday';
+
+ function g_date_get_month(date:PGDate):TGDateMonth;cdecl;external gliblib name 'g_date_get_month';
+
+ function g_date_get_year(date:PGDate):TGDateYear;cdecl;external gliblib name 'g_date_get_year';
+
+ function g_date_get_day(date:PGDate):TGDateDay;cdecl;external gliblib name 'g_date_get_day';
+
+ function g_date_get_julian(date:PGDate):guint32;cdecl;external gliblib name 'g_date_get_julian';
+
+ function g_date_get_day_of_year(date:PGDate):guint;cdecl;external gliblib name 'g_date_get_day_of_year';
+
+ { First monday/sunday is the start of week 1; if we haven't reached
+ that day, return 0. These are not ISO weeks of the year; that
+ routine needs to be added.
+ these functions return the number of weeks, starting on the
+ corrsponding day
+ }
+
+ function g_date_get_monday_week_of_year(date:PGDate):guint;cdecl;external gliblib name 'g_date_get_monday_week_of_year';
+
+ function g_date_get_sunday_week_of_year(date:PGDate):guint;cdecl;external gliblib name 'g_date_get_sunday_week_of_year';
+
+ { If you create a static date struct you need to clear it to get it
+ in a sane state before use. You can clear a whole array at
+ once with the ndates argument.
+ }
+ procedure g_date_clear(date:PGDate; n_dates:guint);cdecl;external gliblib name 'g_date_clear';
+
+ { The parse routine is meant for dates typed in by a user, so it
+ permits many formats but tries to catch common typos. If your data
+ needs to be strictly validated, it is not an appropriate function.
+ }
+
+ procedure g_date_set_parse(date:PGDate; str:Pgchar);cdecl;external gliblib name 'g_date_set_parse';
+
+ procedure g_date_set_time(date:PGDate; time:TGTime);cdecl;external gliblib name 'g_date_set_time';
+
+ procedure g_date_set_month(date:PGDate; month:TGDateMonth);cdecl;external gliblib name 'g_date_set_month';
+
+ procedure g_date_set_day(date:PGDate; day:TGDateDay);cdecl;external gliblib name 'g_date_set_day';
+
+ procedure g_date_set_year(date:PGDate; year:TGDateYear);cdecl;external gliblib name 'g_date_set_year';
+
+ procedure g_date_set_dmy(date:PGDate; day:TGDateDay; month:TGDateMonth; y:TGDateYear);cdecl;external gliblib name 'g_date_set_dmy';
+
+ procedure g_date_set_julian(date:PGDate; julian_date:guint32);cdecl;external gliblib name 'g_date_set_julian';
+
+ function g_date_is_first_of_month(date:PGDate):gboolean;cdecl;external gliblib name 'g_date_is_first_of_month';
+
+ function g_date_is_last_of_month(date:PGDate):gboolean;cdecl;external gliblib name 'g_date_is_last_of_month';
+
+
+ { To go forward by some number of weeks just go forward weeks 7 days }
+ procedure g_date_add_days(date:PGDate; n_days:guint);cdecl;external gliblib name 'g_date_add_days';
+
+ procedure g_date_subtract_days(date:PGDate; n_days:guint);cdecl;external gliblib name 'g_date_subtract_days';
+
+
+ { If you add/sub months while day > 28, the day might change }
+ procedure g_date_add_months(date:PGDate; n_months:guint);cdecl;external gliblib name 'g_date_add_months';
+
+ procedure g_date_subtract_months(date:PGDate; n_months:guint);cdecl;external gliblib name 'g_date_subtract_months';
+
+
+ { If it's feb 29, changing years can move you to the 28th }
+ procedure g_date_add_years(date:PGDate; n_years:guint);cdecl;external gliblib name 'g_date_add_years';
+
+ procedure g_date_subtract_years(date:PGDate; n_years:guint);cdecl;external gliblib name 'g_date_subtract_years';
+
+
+ function g_date_is_leap_year (year:TGDateYear): gboolean; cdecl;external gliblib name 'g_date_is_leap_year';
+
+ function g_date_get_days_in_month (month: TGDateMonth; year: TGDateYear):guint8;cdecl;external gliblib name 'g_date_get_days_in_month';
+
+ function g_date_get_monday_weeks_in_year (year:TGDateYear): guint8; cdecl;external gliblib name 'g_date_get_monday_weeks_in_year';
+
+ function g_date_get_sunday_weeks_in_year (year:TGDateYear): guint8; cdecl;external gliblib name 'g_date_get_sunday_weeks_in_year';
+
+ { Returns the number of days between the two dates. If date2 comes
+ before date1, a negative value is return. }
+
+ function g_date_days_between(date1:PGDate; date2:PGDate):gint;cdecl;external gliblib name 'g_date_days_between';
+
+ { qsort-friendly (with a cast...) }
+ function g_date_compare(lhs:PGDate; rhs:PGDate):gint;cdecl;external gliblib name 'g_date_compare';
+
+
+ procedure g_date_to_struct_tm(date:PGDate; tm:Ptm);cdecl;external gliblib name 'g_date_to_struct_tm';
+
+ procedure g_date_clamp(date:PGDate; min_date:PGDate; max_date:PGDate);cdecl;external gliblib name 'g_date_clamp';
+
+ { Swap date1 and date2's values if date1 > date2. }
+ procedure g_date_order(date1:PGDate; date2:PGDate);cdecl;external gliblib name 'g_date_order';
+
+ { Just like strftime() except you can only use date-related formats.
+ Using a time format is undefined.
+ }
+ function g_date_strftime(s:Pgchar; slen:gsize; format:Pgchar; date:PGDate):gsize;cdecl;external gliblib name 'g_date_strftime';
+
+{ DEPRECATED functions are maped to their newer versions as the arguments and the return value are the same}
+
+{ DEPRECATED functions are disabled because a
+ name conflict with G_DATE_MONTH, G_DATE_YEAR and G_DATE_DAY
+
+ function g_date_weekday(date:PGDate):TGDateWeekday;cdecl;external gliblib name 'g_date_get_weekday';
+ function g_date_month(date:PGDate):TGDateMonth;cdecl;external gliblib name 'g_date_get_month';
+ function g_date_year(date:PGDate):TGDateYear;cdecl;external gliblib name 'g_date_get_year';
+ function g_date_day(date:PGDate):TGDateDay;cdecl;external gliblib name 'g_date_get_day';
+ function g_date_julian(date:PGDate):guint32;cdecl;external gliblib name 'g_date_get_julian';
+ function g_date_day_of_year(date:PGDate):guint;cdecl;external gliblib name 'g_date_get_day_of_year';
+ function g_date_monday_week_of_year(date:PGDate):guint;cdecl;external gliblib name 'g_date_get_monday_week_of_year';
+ function g_date_sunday_week_of_year(date:PGDate):guint;cdecl;external gliblib name 'g_date_get_sunday_week_of_year';
+ function g_date_days_in_month (month: TGDateMonth; year: TGDateYear):guint8;cdecl;external gliblib name 'g_date_get_days_in_month';
+ function g_date_monday_weeks_in_year (year:TGDateYear): guint8; cdecl;external gliblib name 'g_date_get_monday_weeks_in_year';
+ function g_date_sunday_weeks_in_year (year:TGDateYear): guint8; cdecl;external gliblib name 'g_date_get_sunday_weeks_in_year';
+}
diff --git a/packages/gtk2/src/glib/gdir.inc b/packages/gtk2/src/glib/gdir.inc
new file mode 100644
index 0000000000..4ca343c6aa
--- /dev/null
+++ b/packages/gtk2/src/glib/gdir.inc
@@ -0,0 +1,13 @@
+// {$include <glib/gerror.h>}
+ type
+ PGDir = pointer;
+
+ function g_dir_open(path:Pgchar; flags:guint; error:PPGError):PGDir;cdecl;external gliblib name 'g_dir_open';
+
+ function g_dir_read_name (dir:PGDir): pgchar; cdecl;external gliblib name 'g_dir_read_name';
+
+ procedure g_dir_rewind(dir:PGDir);cdecl;external gliblib name 'g_dir_rewind';
+
+ procedure g_dir_close(dir:PGDir);cdecl;external gliblib name 'g_dir_close';
+
+
diff --git a/packages/gtk2/src/glib/genums.inc b/packages/gtk2/src/glib/genums.inc
new file mode 100644
index 0000000000..74b0a4cfab
--- /dev/null
+++ b/packages/gtk2/src/glib/genums.inc
@@ -0,0 +1,87 @@
+// included by glib2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{ --- enum/flag values & classes --- }
+type
+ PGEnumClass = ^TGEnumClass;
+ PGEnumValue = ^TGEnumValue;
+
+ TGEnumClass = record
+ g_type_class : TGTypeClass;
+ minimum : gint;
+ maximum : gint;
+ n_values : guint;
+ values : PGEnumValue;
+ end;
+
+ TGEnumValue = record
+ value : gint;
+ value_name : Pgchar;
+ value_nick : Pgchar;
+ end;
+
+ PGFlagsClass = ^TGFlagsClass;
+ PGFlagsValue = ^TGFlagsValue;
+
+ TGFlagsClass = record
+ g_type_class : TGTypeClass;
+ mask : guint;
+ n_values : guint;
+ values : PGFlagsValue;
+ end;
+
+ TGFlagsValue = record
+ value : guint;
+ value_name : Pgchar;
+ value_nick : Pgchar;
+ end;
+
+{ --- type macros --- }
+function G_TYPE_IS_ENUM(_type : GType) : gboolean;
+function G_ENUM_CLASS(_class : pointer) : PGEnumClass;
+function G_IS_ENUM_CLASS(_class : pointer) : gboolean;
+function G_ENUM_CLASS_TYPE(_class : pointer) : GType;
+function G_ENUM_CLASS_TYPE_NAME(_class : pointer) : PGChar;
+function G_TYPE_IS_FLAGS(_type : GType) : gboolean;
+function G_FLAGS_CLASS(_class : pointer) : PGFlagsClass;
+function G_IS_FLAGS_CLASS(_class : pointer) : gboolean;
+function G_FLAGS_CLASS_TYPE(_class : pointer) : GType;
+function G_FLAGS_CLASS_TYPE_NAME(_class : pointer) : PGChar;
+function G_VALUE_HOLDS_ENUM(value : pointer) : gboolean;
+function G_VALUE_HOLDS_FLAGS(value : pointer) : gboolean;
+
+
+{ --- prototypes --- }
+
+function g_enum_get_value(enum_class:PGEnumClass; value:gint):PGEnumValue; cdecl; external gliblib;
+function g_enum_get_value_by_name(enum_class:PGEnumClass; name:Pgchar):PGEnumValue; cdecl; external gliblib;
+function g_enum_get_value_by_nick(enum_class:PGEnumClass; nick:Pgchar):PGEnumValue; cdecl; external gliblib;
+function g_flags_get_first_value(flags_class:PGFlagsClass; value:guint):PGFlagsValue; cdecl; external gliblib;
+function g_flags_get_value_by_name(flags_class:PGFlagsClass; name:Pgchar):PGFlagsValue; cdecl; external gliblib;
+function g_flags_get_value_by_nick(flags_class:PGFlagsClass; nick:Pgchar):PGFlagsValue; cdecl; external gliblib;
+procedure g_value_set_enum(value:PGValue; v_enum:gint); cdecl; external gliblib;
+function g_value_get_enum(value:PGValue):gint; cdecl; external gliblib;
+procedure g_value_set_flags(value:PGValue; v_flags:guint); cdecl; external gliblib;
+function g_value_get_flags(value:PGValue):guint; cdecl; external gliblib;
+{ --- registration functions --- }
+{ const_static_values is a NULL terminated array of enum/flags
+ values that is taken over!
+ }
+function g_enum_register_static(name:Pgchar; const_static_values:PGEnumValue):GType; cdecl; external gliblib;
+function g_flags_register_static(name:Pgchar; const_static_values:PGFlagsValue):GType; cdecl; external gliblib;
+{ functions to complete the type information
+ for enums/flags implemented by plugins
+ }
+procedure g_enum_complete_type_info(g_enum_type:GType; info:PGTypeInfo; const_values:PGEnumValue); cdecl; external gliblib;
+procedure g_flags_complete_type_info(g_flags_type:GType; info:PGTypeInfo; const_values:PGFlagsValue); cdecl; external gliblib;
+
+{$ENDIF read_interface_rest}
+
+// included by glib2.pas
+
+
diff --git a/packages/gtk2/src/glib/gerror.inc b/packages/gtk2/src/glib/gerror.inc
new file mode 100644
index 0000000000..da2538e741
--- /dev/null
+++ b/packages/gtk2/src/glib/gerror.inc
@@ -0,0 +1,48 @@
+{$ifndef __G_ERROR_H__}
+{$define __G_ERROR_H__}
+
+//{$include gquark.inc}
+
+ type
+ PPGError = ^PGError;
+ PGError = ^TGError;
+ TGError = record
+ domain : TGQuark;
+ code : gint;
+ message : Pgchar;
+ end;
+
+{$IFNDEF KYLIX}
+ function g_error_new(domain:TGQuark; code:gint; format:Pgchar; args:array of const):PGError;cdecl;overload;external gliblib name 'g_error_new_literal';
+ function g_error_new(domain:TGQuark; code:gint; format:Pgchar):PGError;cdecl;overload;varargs;external gliblib name 'g_error_new_literal';
+{$ELSE}
+ function g_error_new(domain:TGQuark; code:gint; format:Pgchar):PGError;varargs;cdecl;external gliblib name 'g_error_new_literal';
+{$ENDIF}
+
+ function g_error_new_literal(domain:TGQuark; code:gint; message:Pgchar):PGError;cdecl;external gliblib name 'g_error_new_literal';
+
+ procedure g_error_free(error:PGError);cdecl;external gliblib name 'g_error_free';
+
+ function g_error_copy(error:PGError):PGError;cdecl;external gliblib name 'g_error_copy';
+
+ function g_error_matches(error:PGError; domain:TGQuark; code:gint):gboolean;cdecl;external gliblib name 'g_error_matches';
+
+ { if (err) err = g_error_new(domain, code, format, ...), also has
+ some sanity checks.
+ }
+
+{$IFNDEF KYLIX}
+ procedure g_set_error (err: PPGError; domain: TGQuark; code: gint; format: Pgchar; args: array of const);cdecl;overload;external gliblib name 'g_set_error';
+ procedure g_set_error (err: PPGError; domain: TGQuark; code: gint; format: Pgchar);cdecl;overload;varargs;external gliblib name 'g_set_error';
+{$ELSE}
+ procedure g_set_error (err: PPGError; domain: TGQuark; code: gint; format: Pgchar);varargs;cdecl;external gliblib name 'g_set_error';
+{$ENDIF}
+
+ { if dest then dest := src; also has some sanity checks. }
+ procedure g_propagate_error(dest:PPGError; src:PGError);cdecl;external gliblib name 'g_propagate_error';
+
+ { if (err && err) then g_error_free( err); err = NULL; }
+ procedure g_clear_error(err:PPGError);cdecl;external gliblib name 'g_clear_error';
+
+{$endif} { __G_ERROR_H__ }
+
diff --git a/packages/gtk2/src/glib/gfileutils.inc b/packages/gtk2/src/glib/gfileutils.inc
new file mode 100644
index 0000000000..e380f62086
--- /dev/null
+++ b/packages/gtk2/src/glib/gfileutils.inc
@@ -0,0 +1,76 @@
+// {$include <glib/gerror.h>}
+
+ type
+
+ PGFileError = ^TGFileError;
+ TGFileError = gint;
+
+{ For backward-compat reasons, these are synced to an old
+ anonymous enum in libgnome. But don't use that enum
+ in new code.
+}
+
+ type
+ PGFileTest = ^TGFileTest;
+ TGFileTest = integer;
+ const
+ G_FILE_TEST_IS_REGULAR = 1 shl 0;
+ G_FILE_TEST_IS_SYMLINK = 1 shl 1;
+ G_FILE_TEST_IS_DIR = 1 shl 2;
+ G_FILE_TEST_IS_EXECUTABLE = 1 shl 3;
+ G_FILE_TEST_EXISTS = 1 shl 4;
+
+ const
+ G_FILE_ERROR_EXIST = 0;
+ G_FILE_ERROR_ISDIR = 1;
+ G_FILE_ERROR_ACCES = 2;
+ G_FILE_ERROR_NAMETOOLONG = 3;
+ G_FILE_ERROR_NOENT = 4;
+ G_FILE_ERROR_NOTDIR = 5;
+ G_FILE_ERROR_NXIO = 6;
+ G_FILE_ERROR_NODEV = 7;
+ G_FILE_ERROR_ROFS = 8;
+ G_FILE_ERROR_TXTBSY = 9;
+ G_FILE_ERROR_FAULT = 10;
+ G_FILE_ERROR_LOOP = 11;
+ G_FILE_ERROR_NOSPC = 12;
+ G_FILE_ERROR_NOMEM = 13;
+ G_FILE_ERROR_MFILE = 14;
+ G_FILE_ERROR_NFILE = 15;
+ G_FILE_ERROR_BADF = 16;
+ G_FILE_ERROR_INVAL = 17;
+ G_FILE_ERROR_PIPE = 18;
+ G_FILE_ERROR_AGAIN = 19;
+ G_FILE_ERROR_INTR = 20;
+ G_FILE_ERROR_IO = 21;
+ G_FILE_ERROR_PERM = 22;
+ G_FILE_ERROR_FAILED = 23;
+
+ function G_FILE_ERROR: TGQuark;
+
+
+ function g_file_error_quark:TGQuark;cdecl;external gliblib name 'g_file_error_quark';
+
+ { So other code can generate a GFileError }
+ function g_file_error_from_errno(err_no:gint):TGFileError;cdecl;external gliblib name 'g_file_error_from_errno';
+
+ function g_file_test(filename:Pgchar; test:TGFileTest):gboolean;cdecl;external gliblib name 'g_file_test';
+
+ function g_file_get_contents(filename:Pgchar; contents:PPgchar; length:Pgsize; error:PPGError):gboolean;cdecl;external gliblib name 'g_file_get_contents';
+
+ { Wrapper / workalike for mkstemp() }
+ function g_mkstemp(tmpl:Pchar):longint;cdecl;external gliblib name 'g_mkstemp';
+
+ { Wrapper for g_mkstemp }
+ function g_file_open_tmp(tmpl:Pchar; name_used:PPchar; error:PPGError):longint;cdecl;external gliblib name 'g_file_open_tmp';
+
+{$IFNDEF KYLIX}
+ function g_build_path(separator:Pgchar; first_element:Pgchar; args:array of const):Pgchar;cdecl;overload;external gliblib name 'g_build_path';
+ function g_build_path(separator:Pgchar; first_element:Pgchar):Pgchar;cdecl;overload;varargs;external gliblib name 'g_build_path';
+ function g_build_filename(first_element:Pgchar; args:array of const):Pgchar;cdecl;overload;external gliblib name 'g_build_filename';
+ function g_build_filename(first_element:Pgchar):Pgchar;cdecl;overload;varargs;external gliblib name 'g_build_filename';
+{$ELSE}
+ function g_build_path(separator:Pgchar; first_element:Pgchar):Pgchar;varargs;cdecl;external gliblib name 'g_build_path';
+ function g_build_filename(first_element:Pgchar):Pgchar;varargs;cdecl;external gliblib name 'g_build_filename';
+{$ENDIF}
+
diff --git a/packages/gtk2/src/glib/ghash.inc b/packages/gtk2/src/glib/ghash.inc
new file mode 100644
index 0000000000..d6b82b2097
--- /dev/null
+++ b/packages/gtk2/src/glib/ghash.inc
@@ -0,0 +1,57 @@
+// {$include <glib/gtypes.h>}
+
+ type
+ PGHashTable = pointer;
+
+ TGHRFunc = function (key:gpointer; value:gpointer; user_data:gpointer):gboolean;cdecl;
+
+{ Hash tables }
+
+ function g_hash_table_new(hash_func:TGHashFunc; key_equal_func:TGEqualFunc):PGHashTable;cdecl;external gliblib name 'g_hash_table_new';
+
+ function g_hash_table_new_full(hash_func:TGHashFunc; key_equal_func:TGEqualFunc; key_destroy_func:TGDestroyNotify; value_destroy_func:TGDestroyNotify):PGHashTable;cdecl;external gliblib name 'g_hash_table_new_full';
+
+ procedure g_hash_table_destroy(hash_table:PGHashTable);cdecl;external gliblib name 'g_hash_table_destroy';
+
+ procedure g_hash_table_insert(hash_table:PGHashTable; key:gpointer; value:gpointer);cdecl;external gliblib name 'g_hash_table_insert';
+
+ procedure g_hash_table_replace(hash_table:PGHashTable; key:gpointer; value:gpointer);cdecl;external gliblib name 'g_hash_table_replace';
+
+ function g_hash_table_remove(hash_table:PGHashTable; key:gconstpointer):gboolean;cdecl;external gliblib name 'g_hash_table_remove';
+
+ function g_hash_table_steal(hash_table:PGHashTable; key:gconstpointer):gboolean;cdecl;external gliblib name 'g_hash_table_steal';
+
+ function g_hash_table_lookup(hash_table:PGHashTable; key:gconstpointer):gpointer;cdecl;external gliblib 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 gliblib name 'g_hash_table_lookup_extended';
+
+ procedure g_hash_table_foreach(hash_table:PGHashTable; func:TGHFunc; user_data:gpointer);cdecl;external gliblib name 'g_hash_table_foreach';
+
+ function g_hash_table_foreach_remove(hash_table:PGHashTable; func:TGHRFunc; user_data:gpointer):guint;cdecl;external gliblib name 'g_hash_table_foreach_remove';
+
+ function g_hash_table_foreach_steal(hash_table:PGHashTable; func:TGHRFunc; user_data:gpointer):guint;cdecl;external gliblib name 'g_hash_table_foreach_steal';
+
+ function g_hash_table_size(hash_table:PGHashTable):guint;cdecl;external gliblib name 'g_hash_table_size';
+
+
+{ Hash Functions }
+
+ function g_str_equal(v:gconstpointer; v2:gconstpointer):gboolean;cdecl;external gliblib name 'g_str_equal';
+
+ function g_str_hash(v:gconstpointer):guint;cdecl;external gliblib name 'g_str_hash';
+
+ function g_int_equal(v:gconstpointer; v2:gconstpointer):gboolean;cdecl;external gliblib name 'g_int_equal';
+
+ function g_int_hash(v:gconstpointer):guint;cdecl;external gliblib name 'g_int_hash';
+
+ { This "hash" function will just return the key's adress as an
+ unsigned integer. Useful for hashing on plain adresses or
+ simple integer values.
+ passing NULL into g_hash_table_new() as GHashFunc has the
+ same effect as passing g_direct_hash().
+ }
+
+ function g_direct_hash(v:gconstpointer):guint;cdecl;external gliblib name 'g_direct_hash';
+
+ function g_direct_equal(v:gconstpointer; v2:gconstpointer):gboolean;cdecl;external gliblib name 'g_direct_equal';
+
diff --git a/packages/gtk2/src/glib/ghook.inc b/packages/gtk2/src/glib/ghook.inc
new file mode 100644
index 0000000000..5b5fc893b7
--- /dev/null
+++ b/packages/gtk2/src/glib/ghook.inc
@@ -0,0 +1,147 @@
+{*
+ * ghook.inc
+ *
+ * depends on gmem.inc
+ *}
+
+ { --- typedefs --- }
+
+ type
+ PGHook = ^TGHook;
+ TGHook = record
+ data : gpointer;
+ next : PGHook;
+ prev : PGHook;
+ ref_count : guint;
+ hook_id : gulong;
+ flags : guint;
+ func : gpointer;
+ destroy : TGDestroyNotify;
+ end;
+
+ PGHookList = ^TGHookList;
+
+ TGHookCompareFunc = function (new_hook:PGHook; sibling:PGHook):gint;cdecl;
+
+ TGHookFindFunc = function (hook:PGHook; data:gpointer):gboolean;cdecl;
+
+ TGHookMarshaller = procedure (hook:PGHook; marshal_data:gpointer);cdecl;
+
+ TGHookCheckMarshaller = function (hook:PGHook; marshal_data:gpointer):gboolean;cdecl;
+
+ TGHookFunc = procedure (data:gpointer);cdecl;
+
+ TGHookCheckFunc = function (data:gpointer):gboolean;cdecl;
+
+ TGHookFinalizeFunc = procedure (hook_list:PGHookList; hook:PGHook);cdecl;
+
+ TGHookList = record
+ seq_id : gulong;
+ flag0 : longint;
+ hooks : PGHook;
+ hook_memchunk : PGMemChunk;
+ finalize_hook : TGHookFinalizeFunc;
+ dummy : array[0..1] of gpointer;
+ end;
+
+ type
+ PGHookFlagMask = ^TGHookFlagMask;
+ TGHookFlagMask = integer;
+ const
+ G_HOOK_FLAG_ACTIVE = 1 shl 0;
+ G_HOOK_FLAG_IN_CALL = 1 shl 1;
+ G_HOOK_FLAG_MASK = $0f;
+
+ const
+ G_HOOK_FLAG_USER_SHIFT = 4;
+
+ { added for manipulating the TGHookList structure }
+
+ bm_TGHookList_hook_size = $FFFF;
+ bp_TGHookList_hook_size = 0;
+ bm_TGHookList_is_setup = $10000;
+ bp_TGHookList_is_setup = 16;
+
+ function TGHookList_hook_size (var a : TGHookList) : guint;
+ procedure TGHookList_set_hook_size (var a : TGHookList; __hook_size : guint);
+ function TGHookList_is_setup (var a : TGHookList) : guint;
+ procedure TGHookList_set_is_setup (var a : TGHookList; __is_setup : guint);
+
+
+ { --- macros --- }
+
+ function G_HOOK(hook : pointer) : PGHook;
+
+ function G_HOOK_FLAGS(hook : PGHook) : guint;
+
+ 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;
+
+
+ { --- prototypes --- }
+ { callback mainenance functions }
+ procedure g_hook_list_init (hook_list : PGHookList; hook_size : guint);cdecl; external gliblib name 'g_hook_list_init';
+
+ procedure g_hook_list_clear(hook_list:PGHookList);cdecl;external gliblib name 'g_hook_list_clear';
+
+ function g_hook_alloc(hook_list:PGHookList):PGHook;cdecl;external gliblib name 'g_hook_alloc';
+
+ procedure g_hook_free(hook_list:PGHookList; hook:PGHook);cdecl;external gliblib name 'g_hook_free';
+
+ procedure g_hook_ref(hook_list:PGHookList; hook:PGHook);cdecl;external gliblib name 'g_hook_ref';
+
+ procedure g_hook_unref(hook_list:PGHookList; hook:PGHook);cdecl;external gliblib name 'g_hook_unref';
+
+ function g_hook_destroy(hook_list:PGHookList; hook_id:gulong):gboolean;cdecl;external gliblib name 'g_hook_destroy';
+
+ procedure g_hook_destroy_link(hook_list:PGHookList; hook:PGHook);cdecl;external gliblib name 'g_hook_destroy_link';
+
+ procedure g_hook_prepend(hook_list:PGHookList; hook:PGHook);cdecl;external gliblib name 'g_hook_prepend';
+
+ procedure g_hook_insert_before(hook_list:PGHookList; sibling:PGHook; hook:PGHook);cdecl;external gliblib name 'g_hook_insert_before';
+
+ procedure g_hook_insert_sorted(hook_list:PGHookList; hook:PGHook; func:TGHookCompareFunc);cdecl;external gliblib name 'g_hook_insert_sorted';
+
+ function g_hook_get(hook_list:PGHookList; hook_id:gulong):PGHook;cdecl;external gliblib name 'g_hook_get';
+
+ function g_hook_find(hook_list:PGHookList; need_valids:gboolean; func:TGHookFindFunc; data:gpointer):PGHook;cdecl;external gliblib name 'g_hook_find';
+
+ function g_hook_find_data(hook_list:PGHookList; need_valids:gboolean; data:gpointer):PGHook;cdecl;external gliblib name 'g_hook_find_data';
+
+ function g_hook_find_func(hook_list:PGHookList; need_valids:gboolean; func:gpointer):PGHook;cdecl;external gliblib name 'g_hook_find_func';
+
+ function g_hook_find_func_data(hook_list:PGHookList; need_valids:gboolean; func:gpointer; data:gpointer):PGHook;cdecl;external gliblib name 'g_hook_find_func_data';
+
+ { return the first valid hook, and increment its reference count }
+ function g_hook_first_valid(hook_list:PGHookList; may_be_in_call:gboolean):PGHook;cdecl;external gliblib name 'g_hook_first_valid';
+
+ { return the next valid hook with incremented reference count, and
+ decrement the reference count of the original hook
+ }
+ function g_hook_next_valid(hook_list:PGHookList; hook:PGHook; may_be_in_call:gboolean):PGHook;cdecl;external gliblib name 'g_hook_next_valid';
+
+ { GHookCompareFunc implementation to insert hooks sorted by their id }
+ function g_hook_compare_ids(new_hook:PGHook; sibling:PGHook):gint;cdecl;external gliblib name 'g_hook_compare_ids';
+
+ { convenience macros }
+
+ procedure g_hook_append (hook_list: PGHookList; hook:PGHook);
+
+
+ { invoke all valid hooks with the ( GHookCheckFunc) signature,
+ and destroy the hook if FALSE is returned.
+ }
+ procedure g_hook_list_invoke_check(hook_list:PGHookList; may_recurse:gboolean);cdecl;external gliblib name 'g_hook_list_invoke_check';
+
+ { invoke a marshaller on all valid hooks.
+ }
+ procedure g_hook_list_marshal(hook_list:PGHookList; may_recurse:gboolean; marshaller:TGHookMarshaller; marshal_data:gpointer);cdecl;external gliblib name 'g_hook_list_marshal';
+
+ procedure g_hook_list_marshal_check(hook_list:PGHookList; may_recurse:gboolean; marshaller:TGHookCheckMarshaller; marshal_data:gpointer);cdecl;external gliblib name 'g_hook_list_marshal_check';
+
+
diff --git a/packages/gtk2/src/glib/giochannel.inc b/packages/gtk2/src/glib/giochannel.inc
new file mode 100644
index 0000000000..936d3ba7ed
--- /dev/null
+++ b/packages/gtk2/src/glib/giochannel.inc
@@ -0,0 +1,294 @@
+{*
+ * giochannel.inc
+ *
+ * depends on gconvert.inc, gmain.inc, gstring.inc
+ *}
+
+ type
+
+ PGIOError = ^TGIOError;
+ TGIOError = (G_IO_ERROR_NONE,
+ G_IO_ERROR_AGAIN,
+ G_IO_ERROR_INVAL,
+ G_IO_ERROR_UNKNOWN);
+
+ function G_IO_CHANNEL_ERROR : TGQuark;
+
+
+ { Derived from errno }
+ { Other }
+
+ type
+
+ PGIOChannelError = ^TGIOChannelError;
+ TGIOChannelError = (G_IO_CHANNEL_ERROR_FBIG,
+ G_IO_CHANNEL_ERROR_INVAL,
+ G_IO_CHANNEL_ERROR_IO,
+ G_IO_CHANNEL_ERROR_ISDIR,
+ G_IO_CHANNEL_ERROR_NOSPC,
+ G_IO_CHANNEL_ERROR_NXIO,
+ G_IO_CHANNEL_ERROR_OVERFLOW,
+ G_IO_CHANNEL_ERROR_PIPE,
+ G_IO_CHANNEL_ERROR_FAILED);
+
+ PGIOStatus = ^TGIOStatus;
+ TGIOStatus = (G_IO_STATUS_ERROR,
+ G_IO_STATUS_NORMAL,
+ G_IO_STATUS_EOF,
+ G_IO_STATUS_AGAIN);
+
+ PGSeekType = ^TGSeekType;
+ TGSeekType = (G_SEEK_CUR,
+ G_SEEK_SET,
+ G_SEEK_END);
+
+
+ PGIOCondition = ^TGIOCondition;
+ TGIOCondition = gint;
+
+ const
+ G_IO_IN = GLIB_SYSDEF_POLLIN;
+ G_IO_OUT = GLIB_SYSDEF_POLLOUT;
+ G_IO_PRI = GLIB_SYSDEF_POLLPRI;
+ G_IO_ERR = GLIB_SYSDEF_POLLERR;
+ G_IO_HUP = GLIB_SYSDEF_POLLHUP;
+ G_IO_NVAL = GLIB_SYSDEF_POLLNVAL;
+
+ type
+ PGIOFlags = ^TGIOFlags;
+ TGIOFlags = gint;
+ const
+ G_IO_FLAG_APPEND = 1 shl 0;
+ G_IO_FLAG_NONBLOCK = 1 shl 1;
+ G_IO_FLAG_IS_READABLE = 1 shl 2;
+ G_IO_FLAG_IS_WRITEABLE = 1 shl 3;
+ G_IO_FLAG_IS_SEEKABLE = 1 shl 4;
+ G_IO_FLAG_MASK = (1 shl 5) - 1;
+ G_IO_FLAG_GET_MASK = G_IO_FLAG_MASK;
+ G_IO_FLAG_SET_MASK = G_IO_FLAG_APPEND or G_IO_FLAG_NONBLOCK;
+
+ type
+ {< private > }
+ PGIOChannel = ^TGIOChannel;
+
+ TGIOFunc = function (source:PGIOChannel; condition:TGIOCondition; data:gpointer):gboolean;cdecl;
+ PGIOFuncs = ^TGIOFuncs;
+
+ TGIOFuncs = record
+ io_read : function (channel:PGIOChannel; buf:Pgchar; count:gsize; bytes_read:Pgsize; err:PPGError):TGIOStatus;cdecl;
+ io_write : function (channel:PGIOChannel; buf:Pgchar; count:gsize; bytes_written:Pgsize; err:PPGError):TGIOStatus;cdecl;
+ io_seek : function (channel:PGIOChannel; offset:gint64; _type:TGSeekType; err:PPGError):TGIOStatus;cdecl;
+ io_close : function (channel:PGIOChannel; err:PPGError):TGIOStatus;cdecl;
+ io_create_watch : function (channel:PGIOChannel; condition:TGIOCondition):PGSource;cdecl;
+ io_free : procedure (channel:PGIOChannel);cdecl;
+ io_set_flags : function (channel:PGIOChannel; flags:TGIOFlags; err:PPGError):TGIOStatus;cdecl;
+ io_get_flags : function (channel:PGIOChannel):TGIOFlags;cdecl;
+ end;
+
+ TGIOChannel = record
+ ref_count : guint;
+ funcs : PGIOFuncs;
+ encoding : Pgchar;
+ read_cd : TGIConv;
+ write_cd : TGIConv;
+ line_term : Pgchar; // String which indicates the end of a line of text
+ line_term_len : guint; // So we can have null in the line term
+ buf_size : gsize;
+ read_buf : PGString; // Raw data from the channel
+ encoded_read_buf : PGString; // Channel data converted to UTF-8
+ write_buf : PGString; // Data ready to be written to the file
+ partial_write_buf : array[0..5] of gchar; // UTF-8 partial characters, null terminated
+
+ { Group the flags together, immediately after partial_write_buf, to save memory }
+ flag0 : word;
+ reserved1 : gpointer;
+ reserved2 : gpointer;
+ end;
+
+ const
+ bm_TGIOChannel_use_buffer = $1;
+ bp_TGIOChannel_use_buffer = 0;
+ bm_TGIOChannel_do_encode = $2;
+ bp_TGIOChannel_do_encode = 1;
+ bm_TGIOChannel_close_on_unref = $4;
+ bp_TGIOChannel_close_on_unref = 2;
+ bm_TGIOChannel_is_readable = $8;
+ bp_TGIOChannel_is_readable = 3;
+ bm_TGIOChannel_is_writeable = $10;
+ bp_TGIOChannel_is_writeable = 4;
+ bm_TGIOChannel_is_seekable = $20;
+ bp_TGIOChannel_is_seekable = 5;
+
+{ use this to get/set information to the TGIOChannel struct}
+ function TGIOChannel_use_buffer (var a : TGIOChannel) : guint;
+ procedure TGIOChannel_set_use_buffer (var a : TGIOChannel; __use_buffer : guint);
+ function TGIOChannel_do_encode (var a : TGIOChannel) : guint;
+ procedure TGIOChannel_set_do_encode (var a : TGIOChannel; __do_encode : guint);
+ function TGIOChannel_close_on_unref (var a : TGIOChannel) : guint;
+ procedure TGIOChannel_set_close_on_unref (var a : TGIOChannel; __close_on_unref : guint);
+ function TGIOChannel_is_readable (var a : TGIOChannel) : guint;
+ procedure TGIOChannel_set_is_readable (var a : TGIOChannel; __is_readable : guint);
+ function TGIOChannel_is_writeable (var a : TGIOChannel) : guint;
+ procedure TGIOChannel_set_is_writeable (var a : TGIOChannel; __is_writeable : guint);
+ function TGIOChannel_is_seekable (var a : TGIOChannel) : guint;
+ procedure TGIOChannel_set_is_seekable (var a : TGIOChannel; __is_seekable : guint);
+
+
+ procedure g_io_channel_init(channel:PGIOChannel);cdecl;external gliblib name 'g_io_channel_init';
+
+ procedure g_io_channel_ref(channel:PGIOChannel);cdecl;external gliblib name 'g_io_channel_ref';
+
+ procedure g_io_channel_unref(channel:PGIOChannel);cdecl;external gliblib name 'g_io_channel_unref';
+
+{DEPRECATED functions}
+
+ function g_io_channel_read(channel:PGIOChannel; buf:Pgchar; count:gsize; bytes_read:Pgsize):TGIOError;cdecl;external gliblib name 'g_io_channel_read';
+
+ function g_io_channel_write(channel:PGIOChannel; buf:Pgchar; count:gsize; bytes_written:Pgsize):TGIOError;cdecl;external gliblib name 'g_io_channel_write';
+
+ function g_io_channel_seek(channel:PGIOChannel; offset:gint64; _type:TGSeekType):TGIOError;cdecl;external gliblib name 'g_io_channel_seek';
+
+ procedure g_io_channel_close(channel:PGIOChannel);cdecl;external gliblib name 'g_io_channel_close';
+{end of DEPRECATED functions}
+
+ function g_io_channel_shutdown(channel:PGIOChannel; flush:gboolean; err:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_shutdown';
+
+ function g_io_add_watch_full(channel:PGIOChannel; priority:gint; condition:TGIOCondition; func:TGIOFunc; user_data:gpointer;
+ notify:TGDestroyNotify):guint;cdecl;external gliblib name 'g_io_add_watch_full';
+
+ function g_io_create_watch(channel:PGIOChannel; condition:TGIOCondition):PGSource;cdecl;external gliblib name 'g_io_create_watch';
+
+ function g_io_add_watch(channel:PGIOChannel; condition:TGIOCondition; func:TGIOFunc; user_data:gpointer):guint;cdecl;external gliblib name 'g_io_add_watch';
+
+ { character encoding conversion involved functions.
+ }
+ procedure g_io_channel_set_buffer_size(channel:PGIOChannel; size:gsize);cdecl;external gliblib name 'g_io_channel_set_buffer_size';
+
+ function g_io_channel_get_buffer_size(channel:PGIOChannel):gsize;cdecl;external gliblib name 'g_io_channel_get_buffer_size';
+
+ function g_io_channel_get_buffer_condition(channel:PGIOChannel):TGIOCondition;cdecl;external gliblib name 'g_io_channel_get_buffer_condition';
+
+ function g_io_channel_set_flags(channel:PGIOChannel; flags:TGIOFlags; error:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_set_flags';
+
+ function g_io_channel_get_flags(channel:PGIOChannel):TGIOFlags;cdecl;external gliblib name 'g_io_channel_get_flags';
+
+ procedure g_io_channel_set_line_term(channel:PGIOChannel; line_term:Pgchar; length:gint);cdecl;external gliblib name 'g_io_channel_set_line_term';
+
+ function g_io_channel_get_line_term(channel:PGIOChannel; length:Pgint):pgchar;cdecl;external gliblib name 'g_io_channel_get_line_term';
+
+ procedure g_io_channel_set_buffered(channel:PGIOChannel; buffered:gboolean);cdecl;external gliblib name 'g_io_channel_set_buffered';
+
+ function g_io_channel_get_buffered(channel:PGIOChannel):gboolean;cdecl;external gliblib name 'g_io_channel_get_buffered';
+
+ function g_io_channel_set_encoding(channel:PGIOChannel; encoding:Pgchar; error:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_set_encoding';
+
+ function g_io_channel_get_encoding(channel:PGIOChannel):pgchar;cdecl;external gliblib name 'g_io_channel_get_encoding';
+
+ procedure g_io_channel_set_close_on_unref(channel:PGIOChannel; do_close:gboolean);cdecl;external gliblib name 'g_io_channel_set_close_on_unref';
+
+ function g_io_channel_get_close_on_unref(channel:PGIOChannel):gboolean;cdecl;external gliblib name 'g_io_channel_get_close_on_unref';
+
+ function g_io_channel_flush(channel:PGIOChannel; error:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_flush';
+
+ function g_io_channel_read_line(channel:PGIOChannel; str_return:PPgchar; length:Pgsize; terminator_pos:Pgsize; error:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_read_line';
+
+ function g_io_channel_read_line_string(channel:PGIOChannel; buffer:PGString; terminator_pos:Pgsize; error:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_read_line_string';
+
+ function g_io_channel_read_to_end(channel:PGIOChannel; str_return:PPgchar; length:Pgsize; error:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_read_to_end';
+
+ function g_io_channel_read_chars(channel:PGIOChannel; buf:Pgchar; count:gsize; bytes_read:Pgsize; error:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_read_chars';
+
+ function g_io_channel_read_unichar(channel:PGIOChannel; thechar:Pgunichar; error:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_read_unichar';
+
+ function g_io_channel_write_chars(channel:PGIOChannel; buf:Pgchar; count:gssize; bytes_written:Pgsize; error:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_write_chars';
+
+ function g_io_channel_write_unichar(channel:PGIOChannel; thechar:gunichar; error:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_write_unichar';
+
+ function g_io_channel_seek_position(channel:PGIOChannel; offset:gint64; _type:TGSeekType; error:PPGError):TGIOStatus;cdecl;external gliblib name 'g_io_channel_seek_position';
+
+ function g_io_channel_new_file(filename:Pgchar; mode:Pgchar; error:PPGError):PGIOChannel;cdecl;external gliblib name 'g_io_channel_new_file';
+
+
+ { Error handling }
+ function g_io_channel_error_quark:TGQuark;cdecl;external gliblib name 'g_io_channel_error_quark';
+
+ function g_io_channel_error_from_errno(en:gint):TGIOChannelError;cdecl;external gliblib name 'g_io_channel_error_from_errno';
+
+ { On Unix, IO channels created with this function for any file
+ descriptor or socket.
+
+ On Win32, this can be used either for files opened with the MSVCRT
+ (the Microsoft run-time C library) _open() or _pipe, including file
+ descriptors 0, 1 and 2 (corresponding to stdin, stdout and stderr),
+ or for Winsock SOCKETs. If the parameter is a legal file
+ descriptor, it is assumed to be such, otherwise it should be a
+ SOCKET. This relies on SOCKETs and file descriptors not
+ overlapping. If you want to be certain, call either
+ g_io_channel_win32_new_fd() or g_io_channel_win32_new_socket()
+ instead as appropriate.
+
+ The term file descriptor as used in the context of Win32 refers to
+ the emulated Unix-like file descriptors MSVCRT provides. The native
+ corresponding concept is file HANDLE. There isn't as of yet a way to
+ get GIOChannels for Win32 file HANDLEs.
+ }
+ function g_io_channel_unix_new(fd:longint):PGIOChannel;cdecl;external gliblib name 'g_io_channel_unix_new';
+
+ function g_io_channel_unix_get_fd(channel:PGIOChannel):gint;cdecl;external gliblib name 'g_io_channel_unix_get_fd';
+
+ { Hook for GClosure / GSource integration. Don't touch }
+//GLIB_VAR GSourceFuncs g_io_watch_funcs;
+
+{$ifdef WIN32}
+
+ const
+ G_WIN32_MSG_HANDLE = 19981206;
+ { Use this to get a GPollFD from a GIOChannel, so that you can call
+ g_io_channel_win32_poll(). After calling this you should only use
+ g_io_channel_read() to read from the GIOChannel, i.e. never read()
+ from the underlying file descriptor. For SOCKETs, it is possible to call
+ recv().
+ }
+
+ procedure g_io_channel_win32_make_pollfd(channel:PGIOChannel; condition:TGIOCondition; fd:PGPollFD);cdecl;external gliblib name 'g_io_channel_win32_make_pollfd';
+
+ { This can be used to wait a until at least one of the channels is readable.
+ On Unix you would do a select() on the file descriptors of the channels.
+ }
+ function g_io_channel_win32_poll(fds:PGPollFD; n_fds:gint; timeout:gint):gint;cdecl;external gliblib name 'g_io_channel_win32_poll';
+
+ { This is used to add polling for Windows messages. GDK (GTk+) programs
+ should not use this.
+ }
+// procedure g_main_poll_win32_msg_add(priority:gint; fd:PGPollFD; hwnd:guint);cdecl;external gliblib name 'g_main_poll_win32_msg_add';
+//
+//NOTE: already defined in gmain.inc
+
+ { Create an IO channel for Windows messages for window handle hwnd. }
+ function g_io_channel_win32_new_messages(hwnd:guint):PGIOChannel;cdecl;external gliblib name 'g_io_channel_win32_new_messages';
+
+ { Create an IO channel for C runtime (emulated Unix-like) file
+ descriptors. After calling g_io_add_watch() on a IO channel
+ returned by this function, you shouldn't call read() on the file
+ descriptor. This is because adding polling for a file descriptor is
+ implemented on Win32 by starting a thread that sits blocked in a
+ read() from the file descriptor most of the time. All reads from
+ the file descriptor should be done by this internal GLib
+ thread. Your code should call only g_io_channel_read().
+ }
+ function g_io_channel_win32_new_fd(fd:gint):PGIOChannel;cdecl;external gliblib name 'g_io_channel_win32_new_fd';
+
+ { Get the C runtime file descriptor of a channel. }
+ function g_io_channel_win32_get_fd(channel:PGIOChannel):gint;cdecl;external gliblib name 'g_io_channel_win32_get_fd';
+
+ { Create an IO channel for a winsock socket. The parameter should be
+ a SOCKET. Contrary to IO channels for file descriptors (on Win32),
+ you can use normal recv() or recvfrom() on sockets even if GLib
+ is polling them.
+ }
+ function g_io_channel_win32_new_socket(socket:gint):PGIOChannel;cdecl;external gliblib name 'g_io_channel_win32_new_socket';
+
+{$endif}
+
+
+
diff --git a/packages/gtk2/src/glib/glib2.pas b/packages/gtk2/src/glib/glib2.pas
new file mode 100644
index 0000000000..7caf322796
--- /dev/null
+++ b/packages/gtk2/src/glib/glib2.pas
@@ -0,0 +1,1898 @@
+{ 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 Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+ }
+{
+ Modified by the GLib Team and others 1997-2000. See the AUTHORS
+ file for a list of people on the GLib Team. See the ChangeLog
+ files for a list of changes. These files are distributed with
+ GLib at ftp://ftp.gtk.org/pub/gtk/.
+ }
+unit glib2; // keep unit name lowercase for kylix
+
+{$IFDEF FPC}
+ {$mode objfpc}
+{$ENDIF}
+{$IFDEF VER140}
+ {$DEFINE KYLIX}
+{$ENDIF}
+
+interface
+
+uses
+ ctypes,SysUtils;
+
+const
+{$ifdef win32}
+ {$define gtkwin}
+ gliblib = 'libglib-2.0-0.dll';
+ gthreadlib = 'libgthread-2.0-0.dll';
+ gmodulelib = 'libgmodule-2.0-0.dll';
+ gobjectlib = 'libgobject-2.0-0.dll';
+ {$IFDEF FPC}
+ {$ifndef NO_SMART_LINK}
+ {$smartlink on}
+ {$endif}
+ {$ENDIF}
+{$else}
+ {$ifdef UseCustomLibs}
+ gliblib = '';
+ gthreadlib = '';
+ gmodulelib = '';
+ gobjectlib = '';
+ {$else}
+ gliblib = 'libglib-2.0.so';
+ gthreadlib = 'libgthread-2.0.so';
+ gmodulelib = 'libgmodule-2.0.so';
+ gobjectlib = 'libgobject-2.0.so';
+ {$endif}
+{$endif}
+
+{$ifdef FREEBSD}
+ {$linklib c}
+ {$linklib pthread}
+{$endif}
+
+{$IFNDEF KYLIX}
+ {$PACKRECORDS C}
+{$ELSE}
+ {$ALIGN 4}
+ {$WEAKPACKAGEUNIT}
+ {$WARNINGS OFF}
+{$ENDIF}
+
+{$DEFINE read_forward_definitions}
+type
+ // internal types
+ PGTypePlugin = pointer;
+ PGParamSpecPool = pointer;
+
+{$include gtypes.inc}
+{$include glibconfig.inc}
+{$include gquark.inc}
+{$include gvaluecollector.inc}
+{$include gtype.inc}
+{$include genums.inc}
+{$include gvalue.inc}
+{$include gtypeplugin.inc}
+{$include gdataset.inc}
+{$include gslist.inc}
+{$include glist.inc}
+{$include gparam.inc}
+{$include gboxed.inc}
+{$UNDEF read_forward_definitions}
+
+{$DEFINE read_interface_rest}
+{$include gtype.inc}
+
+{$include gvalue.inc}
+{$include gvaluearray.inc}
+{$include gvaluecollector.inc}
+{$include gvaluetypes.inc}
+
+{$include gparam.inc}
+{$include gclosure.inc}
+{$include gsignal.inc}
+{$include gtypeplugin.inc}
+{$include gobject.inc}
+
+{$include gmacros.inc}
+{$include gtypes.inc}
+{$include genums.inc}
+{$include glibconfig.inc}
+{$include gstrfuncs.inc}
+{$include gutils.inc}
+{$include galloca.inc}
+{$include ghash.inc}
+{$include gquark.inc}
+{$include gerror.inc}
+{$include gbacktrace.inc}
+{$include gmem.inc}
+{$include garray.inc}
+{$include gslist.inc}
+{$include glist.inc}
+{$include gcache.inc}
+{$include gcompletion.inc}
+{$include gconvert.inc}
+{$include gdataset.inc}
+{$include gdate.inc}
+{$include gdir.inc}
+{$include gfileutils.inc}
+{$include ghook.inc}
+
+{$include gthread.inc}
+{$include gthreadpool.inc}
+{$include gtimer.inc}
+{$include gmain.inc}
+{$include gasyncqueue.inc}
+
+{$include gunicode.inc}
+{$include gstring.inc}
+{$include giochannel.inc}
+
+{$include gmessages.inc}
+{$include gmarkup.inc}
+{$include gnode.inc}
+{$include gtree.inc}
+{$include gpattern.inc}
+{$include gprimes.inc}
+{$include gqsort.inc}
+{$include gqueue.inc}
+{$include grand.inc}
+{$include grel.inc}
+{$include gscanner.inc}
+{$include gshell.inc}
+{$include gspawn.inc}
+{$include gboxed.inc}
+
+{$include gmodule.inc}
+
+{$include gmarshal.inc}
+
+{$IFDEF win32}
+{$include gwin32.inc}
+{$ENDIF}
+
+{$UNDEF read_interface_rest}
+
+implementation
+
+{$IFNDEF KYLIX}
+{ There is a bug in the compiler. If an external variable is not used, it will
+ create code, that can't be relocated by the linker.
+ So, use them in this hidden dummy procedure.
+}
+procedure CheckUnusedVariable; [Public];
+begin
+ if glib_mem_profiler_table=nil then ;
+ if (glib_interface_age=0) or (glib_binary_age=0)
+ or (g_thread_use_default_impl) then ;
+end;
+{$ENDIF}
+
+
+{************************************
+ * macro functions
+ *
+ ************************************}
+
+{*
+ * gtypes.inc
+ *}
+function GUINT16_SWAP_LE_BE_CONSTANT(val: guint16): guint16;
+begin
+ Result:=((val and $ff) shl 8) or ((val and $ff00) shr 8);
+end;
+
+function GUINT32_SWAP_LE_BE_CONSTANT(val: guint32): guint32;
+begin
+ Result:=
+ ((val and $000000ff) shl 24) or
+ ((val and $0000ff00) shl 8) or
+ ((val and $00ff0000) shr 8) or
+ ((val and $ff000000) shr 24);
+end;
+
+{*
+ * glibconfig.inc
+ *}
+function GUINT_TO_POINTER(i: guint): pointer;
+begin
+ Result:=Pointer(PtrInt(i));
+end;
+
+{*
+ * garray.inc
+ *}
+
+function g_array_append_val(a: PGArray; v : gpointer) : PGArray;
+begin
+ g_array_append_val := g_array_append_vals(a,@(v),1);
+end;
+
+function g_array_prepend_val(a: PGArray; v : gpointer) : PGArray;
+begin
+ g_array_prepend_val := g_array_prepend_vals(a,@(v),1);
+end;
+
+function g_array_insert_val(a: PGArray; i: guint; v : gpointer) : PGArray;
+begin
+ g_array_insert_val := g_array_insert_vals(a,i,@(v),1);
+end;
+
+function g_ptr_array_index (parray: PGPtrArray; index: guint): gpointer;
+begin
+ {$IFDEF FPC}
+ g_ptr_array_index := parray^.pdata[index];
+ {$ELSE}
+ g_ptr_array_index := PGPointer(integer(parray^.pdata) + index*SizeOf(GPointer))^;
+ {$ENDIF}
+end;
+
+{*
+ * gthread.inc
+ *}
+
+function G_THREAD_ERROR: TGQuark;
+begin
+ G_THREAD_ERROR:=g_thread_error_quark;
+end;
+
+procedure g_mutex_lock (mutex: PGMutex);
+begin
+{$IFNDEF KYLIX}
+ if g_threads_got_initialized then
+ g_thread_functions_for_glib_use.mutex_lock (mutex);
+{$ENDIF}
+end;
+
+function g_mutex_trylock (mutex: PGMutex):gboolean;
+begin
+{$IFNDEF KYLIX}
+ if g_threads_got_initialized then
+ g_mutex_trylock := g_thread_functions_for_glib_use.mutex_trylock (mutex)
+ else
+ g_mutex_trylock := true;
+{$ENDIF}
+end;
+
+procedure g_mutex_unlock (mutex: PGMutex);
+begin
+{$IFNDEF KYLIX}
+ if g_threads_got_initialized then
+ g_thread_functions_for_glib_use.mutex_unlock (mutex);
+{$ENDIF}
+end;
+
+procedure g_mutex_free (mutex: PGMutex);
+begin
+{$IFNDEF KYLIX}
+ if g_threads_got_initialized then
+ g_thread_functions_for_glib_use.mutex_free (mutex);
+{$ENDIF}
+end;
+
+procedure g_cond_wait (cond: PGCond; mutex: PGMutex);
+begin
+{$IFNDEF KYLIX}
+ if g_threads_got_initialized then
+ g_thread_functions_for_glib_use.cond_wait (cond, mutex);
+{$ENDIF}
+end;
+
+function g_cond_timed_wait (cond : PGCond;
+ mutex : PGMutex;
+ end_time : PGTimeVal):gboolean;
+begin
+{$IFNDEF KYLIX}
+ if g_threads_got_initialized then
+ g_cond_timed_wait := g_thread_functions_for_glib_use.cond_timed_wait (cond,
+ mutex,
+ end_time)
+ else
+ g_cond_timed_wait := true;
+{$ENDIF}
+end;
+
+
+function g_thread_supported: gboolean;
+begin
+{$IFNDEF KYLIX}
+ g_thread_supported := g_threads_got_initialized;
+{$ENDIF}
+end;
+
+function g_mutex_new : PGMutex;
+begin
+{$IFNDEF KYLIX}
+ g_mutex_new := g_thread_functions_for_glib_use.mutex_new;
+{$ENDIF}
+end;
+
+function g_cond_new : PGCond;
+begin
+{$IFNDEF KYLIX}
+ g_cond_new := g_thread_functions_for_glib_use.cond_new;
+{$ENDIF}
+end;
+
+procedure g_cond_signal (cond: PGCond);
+begin
+{$IFNDEF KYLIX}
+ if g_threads_got_initialized then
+ g_thread_functions_for_glib_use.cond_signal (cond);
+{$ENDIF}
+end;
+
+procedure g_cond_broadcast (cond: PGCond);
+begin
+{$IFNDEF KYLIX}
+ if g_threads_got_initialized then
+ g_thread_functions_for_glib_use.cond_broadcast (cond);
+{$ENDIF}
+end;
+
+procedure g_cond_free (cond: PGCond);
+begin
+{$IFNDEF KYLIX}
+ if g_threads_got_initialized then
+ g_thread_functions_for_glib_use.cond_free (cond);
+{$ENDIF}
+end;
+
+function g_private_new (dest: TGDestroyNotify): PGPrivate;
+begin
+{$IFNDEF KYLIX}
+ g_private_new := g_thread_functions_for_glib_use.private_new (dest);
+{$ENDIF}
+end;
+
+function g_private_get (private_key: PGPrivate): gpointer;
+begin
+{$IFNDEF KYLIX}
+ // convert result to gpointer
+ if g_threads_got_initialized then
+ g_private_get := g_thread_functions_for_glib_use.private_get (private_key)
+ else
+ g_private_get := private_key;
+{$ENDIF}
+end;
+
+
+procedure g_private_set (var private_key: PGPrivate; data: gpointer);
+begin
+{$IFNDEF KYLIX}
+ if g_threads_got_initialized then
+// g_private_set := g_thread_functions_for_glib_use.private_set (private_key, data)
+ else
+ private_key := data; // data casted to GPrivate
+{$ENDIF}
+end;
+
+
+procedure g_thread_yield;
+begin
+{$IFNDEF KYLIX}
+ if g_threads_got_initialized then
+ g_thread_functions_for_glib_use.thread_yield;
+{$ENDIF}
+end;
+
+function g_thread_create (func: TGThreadFunc;
+ data: gpointer;
+ joinable: gboolean;
+ error: PPGError): PGThread;
+ begin
+ g_thread_create := g_thread_create_full (func, data, 0, joinable, false,
+ G_THREAD_PRIORITY_NORMAL, error);
+ end;
+
+function g_static_mutex_get_mutex(mutex: PPGMutex):PGMutex;
+begin
+ g_static_mutex_get_mutex := g_static_mutex_get_mutex_impl (mutex);
+end;
+
+procedure g_static_mutex_lock (mutex: PGStaticMutex);
+begin
+ g_mutex_lock (g_static_mutex_get_mutex_impl (PPGMutex(mutex)));
+end;
+
+function g_static_mutex_trylock (mutex: PGStaticMutex): gboolean;
+begin
+ g_static_mutex_trylock := g_mutex_trylock (g_static_mutex_get_mutex (PPGMutex(mutex)));
+end;
+
+procedure g_static_mutex_unlock (mutex: PGStaticMutex);
+begin
+ g_mutex_unlock (g_static_mutex_get_mutex_impl (PPGMutex(mutex)));
+end;
+
+{*
+ * gmain.inc
+ *}
+
+function g_main_new(is_running: gboolean): PGMainLoop;
+ begin
+ g_main_new := g_main_loop_new (nil, is_running);
+ end;
+
+function g_main_iteration (may_block: gboolean): gboolean;
+ begin
+ g_main_iteration := g_main_context_iteration (nil, may_block);
+ end;
+
+function g_main_pending: gboolean;
+ begin
+ g_main_pending := g_main_context_pending (nil);
+ end;
+
+procedure g_main_set_poll_func(func: TGPollFunc);
+ begin
+ g_main_context_set_poll_func (nil, func);
+ end;
+
+{*
+ * gslist.inc
+ *}
+
+function g_slist_next(slist : PGSList) : PGSList;
+ begin
+ if slist <> nil then
+ g_slist_next := slist^.next
+ else
+ g_slist_next := nil;
+ end;
+
+{*
+ * gmem.inc
+ *}
+
+function g_new(bytes_per_struct, n_structs: gsize): gpointer;
+begin
+ g_new:=g_malloc(n_structs*bytes_per_struct);
+end;
+
+function g_new0(bytes_per_struct, n_structs: gsize): gpointer;
+begin
+ g_new0:=g_malloc0(n_structs*bytes_per_struct);
+end;
+
+function g_renew(struct_size: gsize; OldMem: gpointer; n_structs : gsize) : gpointer;
+begin
+ g_renew:=g_realloc(OldMem,struct_size*n_structs);
+end;
+
+function g_chunk_new(chunk : Pointer) : Pointer;
+begin
+ g_chunk_new:=g_mem_chunk_alloc(chunk);
+end;
+
+function g_chunk_new0(chunk : Pointer) : Pointer;
+begin
+ g_chunk_new0:=g_mem_chunk_alloc0(chunk);
+end;
+
+procedure g_chunk_free(mem_chunk:PGMemChunk; mem:gpointer);
+begin
+ g_mem_chunk_free(mem_chunk,mem);
+end;
+
+
+{*
+ * glist.inc
+ *}
+function g_list_previous (list : PGList) : PGList;
+ begin
+ if list <> nil then
+ g_list_previous:=(PGList(list))^.prev
+ else
+ g_list_previous:=nil;
+ 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;
+
+{*
+ * gconvert,inc
+ *}
+function G_CONVERT_ERROR : TGQuark;
+ begin
+ G_CONVERT_ERROR:=g_convert_error_quark;
+ end;
+
+{*
+ * gdataset.inc
+ *}
+
+procedure g_datalist_id_set_data (datalist: PPGData; key_id:TGQuark; data: gpointer);
+ begin
+ g_datalist_id_set_data_full (datalist, key_id, data, nil);
+ end;
+
+procedure g_datalist_id_remove_data (datalist: PPGData; key_id:TGQuark);
+ begin
+ g_datalist_id_set_data (datalist, key_id, NULL);
+ end;
+
+function g_datalist_get_data(datalist: PPGData; key_str:PGChar):PPGData;
+ begin
+ g_datalist_get_data := g_datalist_id_get_data (datalist, g_quark_try_string (key_str));
+ end;
+
+procedure g_datalist_set_data_full(datalist: PPGData; key_str:PGChar; data:gpointer; destroy_func:TGDestroyNotify);
+ begin
+ g_datalist_id_set_data_full (datalist, g_quark_from_string (key_str), data, destroy_func);
+ end;
+
+procedure g_datalist_set_data (datalist: PPGData; key_str:PGChar; data:gpointer);
+ begin
+ g_datalist_set_data_full (datalist, key_str, data, nil);
+ end;
+
+procedure g_datalist_remove_no_notify(datalist: PPGData; key_str:PGChar);
+ begin
+ g_datalist_id_remove_no_notify (datalist, g_quark_try_string (key_str) );
+ end;
+
+procedure g_datalist_remove_data(datalist:PPGData; key_str:PGChar);
+ begin
+ g_datalist_id_set_data (datalist, g_quark_try_string (key_str), nil);
+ end;
+
+procedure g_dataset_id_set_data(location: gconstpointer; key_id:TGQuark; data:gpointer);
+ begin
+ g_dataset_id_set_data_full (location, key_id, data, nil);
+ end;
+
+procedure g_dataset_id_remove_data(location: gconstpointer; key_id:TGQuark);
+ begin
+ g_dataset_id_set_data (location, key_id, nil);
+ end;
+
+function g_dataset_get_data(location: gconstpointer; key_str:PGChar): gpointer;
+ begin
+ g_dataset_get_data:= g_dataset_id_get_data (location, g_quark_try_string (key_str));
+ end;
+
+procedure g_dataset_set_data_full(location: gconstpointer; key_str:PGChar; data:gpointer; destroy_func:TGDestroyNotify);
+ begin
+ g_dataset_id_set_data_full (location, g_quark_from_string (key_str), data, destroy_func);
+ end;
+
+procedure g_dataset_remove_no_notify(location: gconstpointer; key_str:PGChar);
+ begin
+ g_dataset_id_remove_no_notify (location, g_quark_try_string (key_str));
+ end;
+
+procedure g_dataset_set_data(location: gconstpointer; key_str:PGChar; data:gpointer);
+ begin
+ g_dataset_set_data_full (location, key_str, data, nil);
+ end;
+
+procedure g_dataset_remove_data(location:gconstpointer; key_str: PGChar);
+ begin
+ g_dataset_id_set_data (location, g_quark_try_string (key_str), nil);
+ end;
+{*
+ * gfileutils.inc
+ *}
+function G_FILE_ERROR: TGQuark;
+ begin
+ G_FILE_ERROR:=g_file_error_quark;
+ end;
+
+{*
+ * ghook.inc
+ *}
+function TGHookList_hook_size (var a : TGHookList) : guint;
+ begin
+ TGHookList_hook_size:=(a.flag0 and bm_TGHookList_hook_size) shr bp_TGHookList_hook_size;
+ end;
+
+procedure TGHookList_set_hook_size (var a : TGHookList; __hook_size : guint);
+ begin
+ a.flag0:=a.flag0 or ((__hook_size shl bp_TGHookList_hook_size) and bm_TGHookList_hook_size);
+ end;
+
+function TGHookList_is_setup (var a : TGHookList) : guint;
+ begin
+ TGHookList_is_setup:=(a.flag0 and bm_TGHookList_is_setup) shr bp_TGHookList_is_setup;
+ end;
+
+procedure TGHookList_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(hook : pointer) : PGHook;
+ begin
+ G_HOOK := PGHook(hook);
+ end;
+
+function G_HOOK_FLAGS(hook : PGHook) : guint;
+ begin
+ G_HOOK_FLAGS := hook^.flags;
+ end;
+{ from the old glib}
+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;
+{ end of old glib}
+
+procedure g_hook_append (hook_list: PGHookList; hook:PGHook);
+ begin
+ g_hook_insert_before (hook_list, nil, hook);
+ end;
+
+{*
+ * giochannel.inc
+ *}
+ function G_IO_CHANNEL_ERROR : TGQuark;
+ begin
+ G_IO_CHANNEL_ERROR:=g_io_channel_error_quark;
+ end;
+
+function TGIOChannel_use_buffer(var a : TGIOChannel) : guint;
+ begin
+ TGIOChannel_use_buffer:=(a.flag0 and bm_TGIOChannel_use_buffer) shr bp_TGIOChannel_use_buffer;
+ end;
+
+procedure TGIOChannel_set_use_buffer(var a : TGIOChannel; __use_buffer : guint);
+ begin
+ a.flag0:=a.flag0 or ((__use_buffer shl bp_TGIOChannel_use_buffer) and bm_TGIOChannel_use_buffer);
+ end;
+
+function TGIOChannel_do_encode(var a : TGIOChannel) : guint;
+ begin
+ TGIOChannel_do_encode:=(a.flag0 and bm_TGIOChannel_do_encode) shr bp_TGIOChannel_do_encode;
+ end;
+
+procedure TGIOChannel_set_do_encode(var a : TGIOChannel; __do_encode : guint);
+ begin
+ a.flag0:=a.flag0 or ((__do_encode shl bp_TGIOChannel_do_encode) and bm_TGIOChannel_do_encode);
+ end;
+
+function TGIOChannel_close_on_unref(var a : TGIOChannel) : guint;
+ begin
+ TGIOChannel_close_on_unref:=(a.flag0 and bm_TGIOChannel_close_on_unref) shr bp_TGIOChannel_close_on_unref;
+ end;
+
+procedure TGIOChannel_set_close_on_unref(var a : TGIOChannel; __close_on_unref : guint);
+ begin
+ a.flag0:=a.flag0 or ((__close_on_unref shl bp_TGIOChannel_close_on_unref) and bm_TGIOChannel_close_on_unref);
+ end;
+
+function TGIOChannel_is_readable(var a : TGIOChannel) : guint;
+ begin
+ TGIOChannel_is_readable:=(a.flag0 and bm_TGIOChannel_is_readable) shr bp_TGIOChannel_is_readable;
+ end;
+
+procedure TGIOChannel_set_is_readable(var a : TGIOChannel; __is_readable : guint);
+ begin
+ a.flag0:=a.flag0 or ((__is_readable shl bp_TGIOChannel_is_readable) and bm_TGIOChannel_is_readable);
+ end;
+
+function TGIOChannel_is_writeable(var a : TGIOChannel) : guint;
+ begin
+ TGIOChannel_is_writeable:=(a.flag0 and bm_TGIOChannel_is_writeable) shr bp_TGIOChannel_is_writeable;
+ end;
+
+procedure TGIOChannel_set_is_writeable(var a : TGIOChannel; __is_writeable : guint);
+ begin
+ a.flag0:=a.flag0 or ((__is_writeable shl bp_TGIOChannel_is_writeable) and bm_TGIOChannel_is_writeable);
+ end;
+
+function TGIOChannel_is_seekable(var a : TGIOChannel) : guint;
+ begin
+ TGIOChannel_is_seekable:=(a.flag0 and bm_TGIOChannel_is_seekable) shr bp_TGIOChannel_is_seekable;
+ end;
+
+procedure TGIOChannel_set_is_seekable(var a : TGIOChannel; __is_seekable : guint);
+ begin
+ a.flag0:=a.flag0 or ((__is_seekable shl bp_TGIOChannel_is_seekable) and bm_TGIOChannel_is_seekable);
+ end;
+{*
+ * gunicode.inc
+ *}
+function g_utf8_next_char (p: pguchar):pguchar;
+ begin
+ {$IFNDEF KYLIX}
+ g_utf8_next_char := p + ord ((g_utf8_skip + p^ )^); // needs to be tested
+ {$ENDIF}
+ end;
+
+{*
+ * gutils.inc
+ *}
+function GLIB_CHECK_VERSION (major, minor, micro: guint):boolean;
+ begin
+ {$IFNDEF KYLIX}
+ GLIB_CHECK_VERSION := ( (GLIB_MAJOR_VERSION > major) or
+ ((GLIB_MAJOR_VERSION = major) and (GLIB_MINOR_VERSION > minor)) or
+ ((GLIB_MAJOR_VERSION = major) and (GLIB_MINOR_VERSION = minor) and (GLIB_MICRO_VERSION >= micro)));
+ {$ENDIF}
+ end;
+{*
+ * gmessages.inc
+ *}
+procedure g_error (format:Pgchar; args: array of const);
+begin
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, Pgchar(SysUtils.Format(string(format), args)));
+end;
+
+procedure g_error (format:Pgchar);
+begin
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format);
+end;
+
+procedure g_message (format:Pgchar; args: array of const);
+begin
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, Pgchar(SysUtils.Format(string(format), args)));
+end;
+
+procedure g_message (format:Pgchar);
+begin
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format);
+end;
+
+procedure g_critical (format:Pgchar; args: array of const);
+begin
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, Pgchar(SysUtils.Format(string(format), args)));
+end;
+
+procedure g_critical (format:Pgchar);
+begin
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format);
+end;
+
+procedure g_warning (format:Pgchar; args: array of const);
+begin
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, Pgchar(SysUtils.Format(string(format), args)));
+end;
+
+procedure g_warning (format:Pgchar);
+begin
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format);
+end;
+
+{*
+ * gmarkup.inc
+ *}
+function G_MARKUP_ERROR : TGQuark;
+begin
+ G_MARKUP_ERROR:=g_markup_error_quark;
+end;
+
+{*
+ * gnode.inc
+ *}
+function G_NODE_IS_ROOT (node: PGNode): boolean;
+begin
+ G_NODE_IS_ROOT := (node^.parent = nil) and (node^.next = nil) and (node^.prev = nil);
+end;
+
+function G_NODE_IS_LEAF (node: PGNode): boolean;
+begin
+ G_NODE_IS_LEAF := node^.children = nil;
+end;
+
+function g_node_append (parent: PGNode; node: PGNode): PGNode;
+begin
+ g_node_append := g_node_insert_before (parent, nil, node);
+end;
+
+function g_node_insert_data (parent: PGNode; position: gint; data: gpointer): PGNode;
+begin
+ g_node_insert_data := g_node_insert (parent, position, g_node_new(data));
+end;
+
+function g_node_insert_data_before (parent: PGNode; sibling: PGNode; data: gpointer): 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: gpointer): PGNode;
+begin
+ g_node_prepend_data := g_node_prepend (parent, g_node_new(data));
+end;
+
+function g_node_append_data (parent: PGNode; data: gpointer): PGNode;
+begin
+ g_node_append_data := g_node_insert_before (parent, nil, g_node_new(data));
+end;
+
+function g_node_prev_sibling (node : PGNode): PGNode;
+begin
+ if node <> nil then
+ g_node_prev_sibling := node^.prev
+ else
+ g_node_prev_sibling := nil;
+end;
+
+function g_node_next_sibling (node : PGNode): PGNode;
+begin
+ if node <> nil then
+ g_node_next_sibling := node^.next
+ else
+ g_node_next_sibling := nil;
+end;
+
+function g_node_first_child (node : PGNode): PGNode;
+begin
+ if node <> nil then
+ g_node_first_child := node^.children
+ else
+ g_node_first_child := nil;
+end;
+
+{*
+ * grand.inc
+ *}
+
+function g_rand_boolean(rand : PGRand) : gboolean;
+begin
+ g_rand_boolean:=((g_rand_int(rand)) and (1 shl 15)) <> 0;
+end;
+{
+function g_rand_boolean(rand : PGRand) :gboolean;
+begin
+ if ((g_rand_int(rand)) and (1 shl 15)) <> 0 then
+ g_rand_boolean := 1
+ else
+ g_rand_boolean := 0;
+end;
+}
+function g_random_boolean : gboolean;
+begin
+ g_random_boolean:=((g_random_int) and (1 shl 15)) <> 0;
+end;
+{
+function g_random_boolean : gboolean;
+begin
+ if (((g_random_int) and (1 shl 15))) <> 0 then
+ g_random_boolean := 1
+ else
+ g_random_boolean := 0;
+end;
+}
+
+{*
+ * gscanner.inc
+ *}
+function TGScannerConfig_case_sensitive(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_case_sensitive:=(a.flag0 and bm_TGScannerConfig_case_sensitive) shr bp_TGScannerConfig_case_sensitive;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_skip_comment_multi(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_skip_comment_multi:=(a.flag0 and bm_TGScannerConfig_skip_comment_multi) shr bp_TGScannerConfig_skip_comment_multi;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_skip_comment_single(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_skip_comment_single:=(a.flag0 and bm_TGScannerConfig_skip_comment_single) shr bp_TGScannerConfig_skip_comment_single;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scan_comment_multi(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_comment_multi:=(a.flag0 and bm_TGScannerConfig_scan_comment_multi) shr bp_TGScannerConfig_scan_comment_multi;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scan_identifier(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_identifier:=(a.flag0 and bm_TGScannerConfig_scan_identifier) shr bp_TGScannerConfig_scan_identifier;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scan_identifier_1char(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_identifier_1char:=(a.flag0 and bm_TGScannerConfig_scan_identifier_1char) shr bp_TGScannerConfig_scan_identifier_1char;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scan_identifier_NULL(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_identifier_NULL:=(a.flag0 and bm_TGScannerConfig_scan_identifier_NULL) shr bp_TGScannerConfig_scan_identifier_NULL;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scan_symbols(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_symbols:=(a.flag0 and bm_TGScannerConfig_scan_symbols) shr bp_TGScannerConfig_scan_symbols;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scan_binary(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_binary:=(a.flag0 and bm_TGScannerConfig_scan_binary) shr bp_TGScannerConfig_scan_binary;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scan_octal(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_octal:=(a.flag0 and bm_TGScannerConfig_scan_octal) shr bp_TGScannerConfig_scan_octal;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scan_float(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_float:=(a.flag0 and bm_TGScannerConfig_scan_float) shr bp_TGScannerConfig_scan_float;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scan_hex(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_hex:=(a.flag0 and bm_TGScannerConfig_scan_hex) shr bp_TGScannerConfig_scan_hex;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scan_hex_dollar(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_hex_dollar:=(a.flag0 and bm_TGScannerConfig_scan_hex_dollar) shr bp_TGScannerConfig_scan_hex_dollar;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scan_string_sq(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_string_sq:=(a.flag0 and bm_TGScannerConfig_scan_string_sq) shr bp_TGScannerConfig_scan_string_sq;
+end;
+
+procedure TGScannerConfig_set_scan_string_sq(var a : TGScannerConfig; __scan_string_sq : guint);
+begin
+ a.flag0:=a.flag0 or ((__scan_string_sq shl bp_TGScannerConfig_scan_string_sq) and bm_TGScannerConfig_scan_string_sq);
+end;
+
+function TGScannerConfig_scan_string_dq(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scan_string_dq:=(a.flag0 and bm_TGScannerConfig_scan_string_dq) shr bp_TGScannerConfig_scan_string_dq;
+end;
+
+procedure TGScannerConfig_set_scan_string_dq(var a : TGScannerConfig; __scan_string_dq : guint);
+begin
+ a.flag0:=a.flag0 or ((__scan_string_dq shl bp_TGScannerConfig_scan_string_dq) and bm_TGScannerConfig_scan_string_dq);
+end;
+
+function TGScannerConfig_numbers_2_int(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_numbers_2_int:=(a.flag0 and bm_TGScannerConfig_numbers_2_int) shr bp_TGScannerConfig_numbers_2_int;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_int_2_float(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_int_2_float:=(a.flag0 and bm_TGScannerConfig_int_2_float) shr bp_TGScannerConfig_int_2_float;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_identifier_2_string(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_identifier_2_string:=(a.flag0 and bm_TGScannerConfig_identifier_2_string) shr bp_TGScannerConfig_identifier_2_string;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_char_2_token(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_char_2_token:=(a.flag0 and bm_TGScannerConfig_char_2_token) shr bp_TGScannerConfig_char_2_token;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_symbol_2_token(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_symbol_2_token:=(a.flag0 and bm_TGScannerConfig_symbol_2_token) shr bp_TGScannerConfig_symbol_2_token;
+end;
+
+procedure TGScannerConfig_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 TGScannerConfig_scope_0_fallback(var a : TGScannerConfig) : guint;
+begin
+ TGScannerConfig_scope_0_fallback:=(a.flag0 and bm_TGScannerConfig_scope_0_fallback) shr bp_TGScannerConfig_scope_0_fallback;
+end;
+
+procedure TGScannerConfig_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;
+
+procedure g_scanner_freeze_symbol_table(scanner : PGScanner);
+begin
+ { do nothing }
+ if Scanner=nil then ;
+end;
+
+procedure g_scanner_thaw_symbol_table(scanner : PGScanner);
+begin
+ { do nothing }
+ if Scanner=nil then ;
+end;
+{*
+ * gshell.inc
+ *}
+function G_SHELL_ERROR : TGQuark;
+begin
+ G_SHELL_ERROR:=g_shell_error_quark;
+end;
+
+{*
+ * gspawn.inc
+ *}
+function G_SPAWN_ERROR : TGQuark;
+begin
+ G_SPAWN_ERROR:=g_spawn_error_quark;
+end;
+
+
+// from gstrfuncs.inc ----------------------------------------------------------
+
+function g_ascii_isalnum(c : gchar) : boolean;
+begin
+ {$IFNDEF KYLIX}
+ g_ascii_isalnum:=((g_ascii_table[guchar(c)]) and G_ASCII_ALNUM) <> 0;
+ {$ENDIF}
+end;
+
+function g_ascii_isalpha(c : gchar) : boolean;
+begin
+ {$IFNDEF KYLIX}
+ g_ascii_isalpha:=((g_ascii_table[guchar(c)]) and G_ASCII_ALPHA) <> 0;
+ {$ENDIF}
+end;
+
+function g_ascii_iscntrl(c : gchar) : boolean;
+begin
+ {$IFNDEF KYLIX}
+ g_ascii_iscntrl:=((g_ascii_table[guchar(c)]) and G_ASCII_CNTRL) <> 0;
+ {$ENDIF}
+end;
+
+function g_ascii_isdigit(c : gchar) : boolean;
+begin
+ {$IFNDEF KYLIX}
+ g_ascii_isdigit:=((g_ascii_table[guchar(c)]) and G_ASCII_DIGIT) <> 0;
+ {$ENDIF}
+end;
+
+function g_ascii_isgraph(c : gchar) : boolean;
+begin
+ {$IFNDEF KYLIX}
+ g_ascii_isgraph:=((g_ascii_table[guchar(c)]) and G_ASCII_GRAPH) <> 0;
+ {$ENDIF}
+end;
+
+function g_ascii_islower(c : gchar) : boolean;
+begin
+ {$IFNDEF KYLIX}
+ g_ascii_islower:=((g_ascii_table[guchar(c)]) and G_ASCII_LOWER) <> 0;
+ {$ENDIF}
+end;
+
+function g_ascii_isprint(c : gchar) : boolean;
+begin
+ {$IFNDEF KYLIX}
+ g_ascii_isprint:=((g_ascii_table[guchar(c)]) and G_ASCII_PRINT) <> 0;
+ {$ENDIF}
+end;
+
+function g_ascii_ispunct(c : gchar) : boolean;
+begin
+ {$IFNDEF KYLIX}
+ g_ascii_ispunct:=((g_ascii_table[guchar(c)]) and G_ASCII_PUNCT) <> 0;
+ {$ENDIF}
+end;
+
+function g_ascii_isspace(c : gchar) : boolean;
+begin
+ {$IFNDEF KYLIX}
+ g_ascii_isspace:=((g_ascii_table[guchar(c)]) and G_ASCII_SPACE) <> 0;
+ {$ENDIF}
+end;
+
+function g_ascii_isupper(c : gchar) : boolean;
+begin
+ {$IFNDEF KYLIX}
+ g_ascii_isupper:=((g_ascii_table[guchar(c)]) and G_ASCII_UPPER) <> 0;
+ {$ENDIF}
+end;
+
+function g_ascii_isxdigit(c : gchar) : boolean;
+begin
+ {$IFNDEF KYLIX}
+ g_ascii_isxdigit:=((g_ascii_table[guchar(c)]) and G_ASCII_XDIGIT) <> 0;
+ {$ENDIF}
+end;
+
+function g_strstrip(_string : PGChar) : PGChar;
+begin
+ g_strstrip:=g_strchomp(g_strchug(_string));
+end;
+
+// gtype.inc -------------------------------------------------------------------
+
+function G_TYPE_MAKE_FUNDAMENTAL(x : longint) : GType;
+begin
+ G_TYPE_MAKE_FUNDAMENTAL:=GType(x shl G_TYPE_FUNDAMENTAL_SHIFT);
+end;
+
+function G_TYPE_IS_FUNDAMENTAL(_type : GType) : boolean;
+begin
+ G_TYPE_IS_FUNDAMENTAL:=_type <= G_TYPE_FUNDAMENTAL_MAX;
+end;
+
+function G_TYPE_IS_DERIVED(_type : GType) : boolean;
+begin
+ G_TYPE_IS_DERIVED:=_type > G_TYPE_FUNDAMENTAL_MAX;
+end;
+
+function G_TYPE_IS_INTERFACE(_type : GType) : boolean;
+begin
+ G_TYPE_IS_INTERFACE:=(G_TYPE_FUNDAMENTAL(_type)) = G_TYPE_INTERFACE;
+end;
+
+function G_TYPE_IS_CLASSED(_type : GType) : gboolean;
+begin
+ G_TYPE_IS_CLASSED:=private_g_type_test_flags(_type,G_TYPE_FLAG_CLASSED);
+end;
+
+function G_TYPE_IS_INSTANTIATABLE(_type : GType) : boolean;
+begin
+ G_TYPE_IS_INSTANTIATABLE:=private_g_type_test_flags(_type,
+ G_TYPE_FLAG_INSTANTIATABLE);
+end;
+
+function G_TYPE_IS_DERIVABLE(_type : GType) : boolean;
+begin
+ G_TYPE_IS_DERIVABLE:=private_g_type_test_flags(_type,G_TYPE_FLAG_DERIVABLE);
+end;
+
+function G_TYPE_IS_DEEP_DERIVABLE(_type : GType) : boolean;
+begin
+ G_TYPE_IS_DEEP_DERIVABLE:=private_g_type_test_flags(_type,G_TYPE_FLAG_DEEP_DERIVABLE);
+end;
+
+function G_TYPE_IS_ABSTRACT(_type : GType) : boolean;
+begin
+ G_TYPE_IS_ABSTRACT:=private_g_type_test_flags(_type,G_TYPE_FLAG_ABSTRACT);
+end;
+
+function G_TYPE_IS_VALUE_ABSTRACT(_type : GType) : boolean;
+begin
+ G_TYPE_IS_VALUE_ABSTRACT:=private_g_type_test_flags(_type,G_TYPE_FLAG_VALUE_ABSTRACT);
+end;
+
+function G_TYPE_IS_VALUE_TYPE(_type : GType) : boolean;
+begin
+ G_TYPE_IS_VALUE_TYPE:=private_g_type_check_is_value_type(_type);
+end;
+
+function G_TYPE_HAS_VALUE_TABLE(_type : GType) : boolean;
+begin
+ G_TYPE_HAS_VALUE_TABLE:=(g_type_value_table_peek(_type)) <> NULL;
+end;
+
+function G_TYPE_CHECK_INSTANCE(instance : Pointer) : gboolean;
+begin
+ G_TYPE_CHECK_INSTANCE:=private_g_type_check_instance(PGTypeInstance(instance));
+end;
+
+function G_TYPE_CHECK_INSTANCE_CAST(instance: Pointer; g_type: GType) : PGTypeInstance;
+begin
+ G_TYPE_CHECK_INSTANCE_CAST:=private_g_type_check_instance_cast(instance,g_type);
+end;
+
+function G_TYPE_CHECK_INSTANCE_TYPE(instance: Pointer; g_type: GType) : boolean;
+begin
+ G_TYPE_CHECK_INSTANCE_TYPE:=private_g_type_check_instance_is_a(instance,g_type);
+end;
+
+function G_TYPE_INSTANCE_GET_CLASS(instance: Pointer; g_type: GType) : PGTypeClass;
+// #define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type) (_G_TYPE_IGC ((instance), (g_type), c_type))
+// #define _G_TYPE_IGC(ip, gt, ct) ((ct*) (((GTypeInstance*) ip)->g_class))
+begin
+ Result:=PGTypeInstance(Instance)^.g_class;
+ Result:=private_g_type_check_class_cast(Result,g_type);
+end;
+
+function G_TYPE_INSTANCE_GET_INTERFACE(instance: Pointer; g_type: GType) : Pointer;
+begin
+ G_TYPE_INSTANCE_GET_INTERFACE:=
+ g_type_interface_peek((PGTypeInstance(instance))^.g_class,g_type);
+end;
+
+function G_TYPE_CHECK_CLASS_CAST(g_class: pointer; g_type: GType) : Pointer;
+begin
+ G_TYPE_CHECK_CLASS_CAST:=
+ private_g_type_check_class_cast(PGTypeClass(g_class),g_type);
+end;
+
+function G_TYPE_CHECK_CLASS_TYPE(g_class: pointer; g_type : GType) : boolean;
+begin
+ G_TYPE_CHECK_CLASS_TYPE:=private_g_type_check_class_is_a(PGTypeClass(g_class),g_type);
+end;
+
+function G_TYPE_CHECK_VALUE(value : Pointer) : boolean;
+begin
+ G_TYPE_CHECK_VALUE:=private_g_type_check_value(PGValue(Value));
+end;
+
+function G_TYPE_CHECK_VALUE_TYPE(value: pointer; g_type : GType) : boolean;
+begin
+ G_TYPE_CHECK_VALUE_TYPE:=private_g_type_check_value_holds(PGValue(value),g_type);
+end;
+
+function G_TYPE_FROM_INSTANCE(instance : Pointer) : GType;
+begin
+ G_TYPE_FROM_INSTANCE:=G_TYPE_FROM_CLASS((PGTypeInstance(instance))^.g_class);
+end;
+
+function G_TYPE_FROM_CLASS(g_class : Pointer) : GType;
+begin
+ G_TYPE_FROM_CLASS:=(PGTypeClass(g_class))^.g_type;
+end;
+
+function G_TYPE_FROM_INTERFACE(g_iface : Pointer) : GType;
+begin
+ G_TYPE_FROM_INTERFACE:=(PGTypeInterface(g_iface))^.g_type;
+end;
+
+// gvalue.inc ------------------------------------------------------------------
+
+function G_TYPE_IS_VALUE(_type : GType) : boolean;
+begin
+ G_TYPE_IS_VALUE:=private_g_type_check_is_value_type(_type);
+end;
+
+function G_IS_VALUE(value : Pointer) : boolean;
+begin
+ G_IS_VALUE:=G_TYPE_CHECK_VALUE(value);
+end;
+
+function G_VALUE_TYPE(value : Pointer) : GType;
+begin
+ G_VALUE_TYPE:=(PGValue(value))^.g_type;
+end;
+
+function G_VALUE_TYPE_NAME(value : Pointer) : PGChar;
+begin
+ G_VALUE_TYPE_NAME:=g_type_name(G_VALUE_TYPE(value));
+end;
+
+function G_VALUE_HOLDS(value: pointer; g_type : GType) : boolean;
+begin
+ G_VALUE_HOLDS:=G_TYPE_CHECK_VALUE_TYPE(value,g_type);
+end;
+
+// gparam.inc ------------------------------------------------------------------
+
+function G_TYPE_IS_PARAM(_type : GType) : boolean;
+begin
+ G_TYPE_IS_PARAM:=(G_TYPE_FUNDAMENTAL(_type)) = G_TYPE_PARAM;
+end;
+
+function G_PARAM_SPEC(pspec : Pointer) : PGParamSpec;
+begin
+ G_PARAM_SPEC:=PGParamSpec(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM));
+end;
+
+function G_IS_PARAM_SPEC(pspec : Pointer) : boolean;
+begin
+ G_IS_PARAM_SPEC:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM);
+end;
+
+function G_PARAM_SPEC_CLASS(pclass : Pointer) : PGParamSpecClass;
+begin
+ G_PARAM_SPEC_CLASS:=PGParamSpecClass(G_TYPE_CHECK_CLASS_CAST(pclass,G_TYPE_PARAM));
+end;
+
+function G_IS_PARAM_SPEC_CLASS(pclass : Pointer) : boolean;
+begin
+ G_IS_PARAM_SPEC_CLASS:=G_TYPE_CHECK_CLASS_TYPE(pclass,G_TYPE_PARAM);
+end;
+
+function G_PARAM_SPEC_GET_CLASS(pspec : Pointer) : PGParamSpecClass;
+begin
+ G_PARAM_SPEC_GET_CLASS:=PGParamSpecClass(G_TYPE_INSTANCE_GET_CLASS(pspec,G_TYPE_PARAM));
+end;
+
+function G_PARAM_SPEC_TYPE(pspec : Pointer) : GType;
+begin
+ G_PARAM_SPEC_TYPE:=G_TYPE_FROM_INSTANCE(pspec);
+end;
+
+function G_PARAM_SPEC_TYPE_NAME(pspec : Pointer) : PGChar;
+begin
+ G_PARAM_SPEC_TYPE_NAME:=g_type_name(G_PARAM_SPEC_TYPE(pspec));
+end;
+
+function G_PARAM_SPEC_VALUE_TYPE(pspec : Pointer) : GType;
+begin
+ G_PARAM_SPEC_VALUE_TYPE:=(G_PARAM_SPEC(pspec))^.value_type;
+end;
+
+function G_VALUE_HOLDS_PARAM(value : Pointer) : boolean;
+begin
+ G_VALUE_HOLDS_PARAM:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_PARAM);
+end;
+
+// gclosure.inc ----------------------------------------------------------------
+
+function G_CLOSURE_NEEDS_MARSHAL(closure : Pointer) : boolean;
+begin
+ G_CLOSURE_NEEDS_MARSHAL := not Assigned((PGClosure(closure))^.marshal);
+end;
+
+function G_CLOSURE_N_NOTIFIERS(cl : PGClosure) : longint;
+begin
+ G_CLOSURE_N_NOTIFIERS:=((meta_marshal(cl) + ((n_guards(cl)) shl 1))
+ + (n_fnotifiers(cl))) + (n_inotifiers(cl));
+end;
+
+function G_CCLOSURE_SWAP_DATA(cclosure : PGClosure) : longint;
+begin
+ G_CCLOSURE_SWAP_DATA:=derivative_flag(cclosure);
+end;
+
+function G_CALLBACK(f : pointer) : TGCallback;
+begin
+ G_CALLBACK:=TGCallback(f);
+end;
+
+function ref_count(var a : TGClosure) : guint;
+begin
+ ref_count:=(a.flag0 and bm_TGClosure_ref_count) shr bp_TGClosure_ref_count;
+end;
+
+procedure set_ref_count(var a : TGClosure; __ref_count : guint);
+begin
+ a.flag0:=a.flag0 or ((__ref_count shl bp_TGClosure_ref_count) and bm_TGClosure_ref_count);
+end;
+
+function meta_marshal(a : PGClosure) : guint;
+begin
+ meta_marshal:=(a^.flag0 and bm_TGClosure_meta_marshal) shr bp_TGClosure_meta_marshal;
+end;
+
+procedure set_meta_marshal(var a : TGClosure; __meta_marshal : guint);
+begin
+ a.flag0:=a.flag0 or ((__meta_marshal shl bp_TGClosure_meta_marshal) and bm_TGClosure_meta_marshal);
+end;
+
+function n_guards(a : PGClosure) : guint;
+begin
+ n_guards:=(a^.flag0 and bm_TGClosure_n_guards) shr bp_TGClosure_n_guards;
+end;
+
+procedure set_n_guards(var a : TGClosure; __n_guards : guint);
+begin
+ a.flag0:=a.flag0 or ((__n_guards shl bp_TGClosure_n_guards) and bm_TGClosure_n_guards);
+end;
+
+function n_fnotifiers(a : PGClosure) : guint;
+begin
+ n_fnotifiers:=(a^.flag0 and bm_TGClosure_n_fnotifiers) shr bp_TGClosure_n_fnotifiers;
+end;
+
+procedure set_n_fnotifiers(var a : TGClosure; __n_fnotifiers : guint);
+begin
+ a.flag0:=a.flag0 or ((__n_fnotifiers shl bp_TGClosure_n_fnotifiers) and bm_TGClosure_n_fnotifiers);
+end;
+
+function n_inotifiers(a : PGClosure) : guint;
+begin
+ n_inotifiers:=(a^.flag0 and bm_TGClosure_n_inotifiers) shr bp_TGClosure_n_inotifiers;
+end;
+
+procedure set_n_inotifiers(var a : TGClosure; __n_inotifiers : guint);
+begin
+ a.flag0:=a.flag0 or ((__n_inotifiers shl bp_TGClosure_n_inotifiers) and bm_TGClosure_n_inotifiers);
+end;
+
+function in_inotify(var a : TGClosure) : guint;
+begin
+ in_inotify:=(a.flag0 and bm_TGClosure_in_inotify) shr bp_TGClosure_in_inotify;
+end;
+
+procedure set_in_inotify(var a : TGClosure; __in_inotify : guint);
+begin
+ a.flag0:=a.flag0 or ((__in_inotify shl bp_TGClosure_in_inotify) and bm_TGClosure_in_inotify);
+end;
+
+function floating(var a : TGClosure) : guint;
+begin
+ floating:=(a.flag0 and bm_TGClosure_floating) shr bp_TGClosure_floating;
+end;
+
+procedure set_floating(var a : TGClosure; __floating : guint);
+begin
+ a.flag0:=a.flag0 or ((__floating shl bp_TGClosure_floating) and bm_TGClosure_floating);
+end;
+
+function derivative_flag(a : PGClosure) : guint;
+begin
+ derivative_flag:=(a^.flag0 and bm_TGClosure_derivative_flag) shr bp_TGClosure_derivative_flag;
+end;
+
+procedure set_derivative_flag(var a : TGClosure; __derivative_flag : guint);
+begin
+ a.flag0:=a.flag0 or ((__derivative_flag shl bp_TGClosure_derivative_flag) and bm_TGClosure_derivative_flag);
+end;
+
+function in_marshal(var a : TGClosure) : guint;
+begin
+ in_marshal:=(a.flag0 and bm_TGClosure_in_marshal) shr bp_TGClosure_in_marshal;
+end;
+
+procedure set_in_marshal(var a : TGClosure; __in_marshal : guint);
+begin
+ a.flag0:=a.flag0 or ((__in_marshal shl bp_TGClosure_in_marshal) and bm_TGClosure_in_marshal);
+end;
+
+function is_invalid(var a : TGClosure) : guint;
+begin
+ is_invalid:=(a.flag0 and bm_TGClosure_is_invalid) shr bp_TGClosure_is_invalid;
+end;
+
+procedure set_is_invalid(var a : TGClosure; __is_invalid : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_invalid shl bp_TGClosure_is_invalid) and bm_TGClosure_is_invalid);
+end;
+
+// gsignal.inc -----------------------------------------------------------------
+
+function g_signal_connect(instance:gpointer; detailed_signal:Pgchar;
+ c_handler:TGCallback; data:gpointer) : gulong;
+begin
+ g_signal_connect:=g_signal_connect_data(instance,detailed_signal,c_handler,
+ data,NULL,TGConnectFlags(0));
+end;
+
+function g_signal_connect_after(instance:gpointer; detailed_signal:Pgchar;
+ c_handler:TGCallback; data:gpointer) : gulong;
+begin
+ g_signal_connect_after:=g_signal_connect_data(instance,detailed_signal,
+ c_handler,data,NULL,G_CONNECT_AFTER);
+end;
+
+function g_signal_connect_swapped(instance:gpointer; detailed_signal:Pgchar;
+ c_handler:TGCallback; data:gpointer) : gulong;
+begin
+ g_signal_connect_swapped:=g_signal_connect_data(instance,detailed_signal,
+ c_handler,data,NULL,G_CONNECT_SWAPPED);
+end;
+
+function g_signal_handlers_disconnect_by_func(instance:gpointer;
+ func, data: gpointer) : guint;
+begin
+ g_signal_handlers_disconnect_by_func:=g_signal_handlers_disconnect_matched(
+ instance,TGSignalMatchType(G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA),0,0,
+ NULL,func,data);
+end;
+
+procedure g_signal_handlers_block_by_func(instance: gpointer; func, data: gpointer);
+begin
+ g_signal_handlers_block_matched(instance,
+ TGSignalMatchType(G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA),
+ 0, 0, nil, func, data);
+end;
+
+procedure g_signal_handlers_unblock_by_func(instance: gpointer; func, data: gpointer);
+begin
+ g_signal_handlers_unblock_matched(instance,
+ TGSignalMatchType(G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA),
+ 0, 0, nil, func, data);
+end;
+
+
+// gobject.inc -----------------------------------------------------------------
+
+function G_TYPE_IS_OBJECT(_type : GType) : boolean;
+begin
+ G_TYPE_IS_OBJECT:=(G_TYPE_FUNDAMENTAL(_type)) = G_TYPE_OBJECT;
+end;
+
+function G_OBJECT(anObject: pointer) : PGObject;
+begin
+ G_OBJECT:=PGObject(G_TYPE_CHECK_INSTANCE_CAST(anObject,G_TYPE_OBJECT));
+end;
+
+function G_OBJECT_CLASS(_class : Pointer) : PGObjectClass;
+begin
+ G_OBJECT_CLASS:=PGObjectClass(G_TYPE_CHECK_CLASS_CAST(_class,G_TYPE_OBJECT));
+end;
+
+function G_IS_OBJECT(anObject: pointer) : boolean;
+begin
+ G_IS_OBJECT:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,G_TYPE_OBJECT);
+end;
+
+function G_IS_OBJECT_CLASS(_class : Pointer) : boolean;
+begin
+ G_IS_OBJECT_CLASS:=G_TYPE_CHECK_CLASS_TYPE(_class,G_TYPE_OBJECT);
+end;
+
+function G_OBJECT_GET_CLASS(anObject: pointer) : PGObjectClass;
+begin
+ G_OBJECT_GET_CLASS:=PGObjectClass(G_TYPE_INSTANCE_GET_CLASS(anObject,G_TYPE_OBJECT));
+end;
+
+function G_OBJECT_TYPE(anObject: pointer) : GType;
+begin
+ G_OBJECT_TYPE:=G_TYPE_FROM_INSTANCE(anObject);
+end;
+
+function G_OBJECT_TYPE_NAME(anObject: pointer) : Pgchar;
+begin
+ G_OBJECT_TYPE_NAME:=g_type_name(G_OBJECT_TYPE(anObject));
+end;
+
+function G_OBJECT_CLASS_TYPE(_class : Pointer) : GType;
+begin
+ G_OBJECT_CLASS_TYPE:=G_TYPE_FROM_CLASS(_class);
+end;
+
+function G_OBJECT_CLASS_NAME(_class : Pointer) : Pgchar;
+begin
+ G_OBJECT_CLASS_NAME:=g_type_name(G_OBJECT_CLASS_TYPE(_class));
+end;
+
+function G_VALUE_HOLDS_OBJECT(value : Pointer) : boolean;
+begin
+ G_VALUE_HOLDS_OBJECT:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_OBJECT);
+end;
+
+procedure G_OBJECT_WARN_INVALID_PROPERTY_ID(anObject: gpointer;
+ property_id: gint; pspec : gpointer);
+begin
+ G_OBJECT_WARN_INVALID_PSPEC(anObject,'property',property_id,pspec);
+end;
+
+procedure G_OBJECT_WARN_INVALID_PSPEC(anObject: gpointer; pname: PGChar;
+ property_id: gint; pspec: gpointer);
+var
+ _object: PGObject;
+ _pspec: PGParamSpec;
+ _property_id: guint;
+begin
+ _object := PGObject (anObject);
+ _pspec := PGParamSpec (pspec);
+ _property_id := (property_id);
+ g_warning ('%s: invalid %s id %u for "%s" of type `%s'' in `%s''',
+ ['',
+ pname,
+ _property_id,
+ _pspec^.name,
+ g_type_name (G_PARAM_SPEC_TYPE (_pspec)),
+ G_OBJECT_TYPE_NAME (_object)]);
+end;
+
+// gtypeplugin.inc -------------------------------------------------------------
+
+
+
+function G_TYPE_TYPE_PLUGIN : GType;
+begin
+ G_TYPE_TYPE_PLUGIN:=g_type_plugin_get_type;
+end;
+
+function G_TYPE_PLUGIN(inst : Pointer) : PGTypePlugin;
+begin
+ G_TYPE_PLUGIN:=PGTypePlugin(G_TYPE_CHECK_INSTANCE_CAST(inst,G_TYPE_TYPE_PLUGIN));
+end;
+
+function G_TYPE_PLUGIN_CLASS(vtable : Pointer) : PGTypePluginClass;
+begin
+ G_TYPE_PLUGIN_CLASS:=PGTypePluginClass(G_TYPE_CHECK_CLASS_CAST(vtable,G_TYPE_TYPE_PLUGIN));
+end;
+
+function G_IS_TYPE_PLUGIN(inst : Pointer) : boolean;
+begin
+ G_IS_TYPE_PLUGIN:=G_TYPE_CHECK_INSTANCE_TYPE(inst,G_TYPE_TYPE_PLUGIN);
+end;
+
+function G_IS_TYPE_PLUGIN_CLASS(vtable : Pointer) : boolean;
+begin
+ G_IS_TYPE_PLUGIN_CLASS:=G_TYPE_CHECK_CLASS_TYPE(vtable,G_TYPE_TYPE_PLUGIN);
+end;
+
+function G_TYPE_PLUGIN_GET_CLASS(inst : Pointer) : PGTypePluginClass;
+begin
+ G_TYPE_PLUGIN_GET_CLASS:=PGTypePluginClass(G_TYPE_INSTANCE_GET_INTERFACE(inst,G_TYPE_TYPE_PLUGIN));
+end;
+
+// genums.inc ------------------------------------------------------------------
+
+
+function G_TYPE_IS_ENUM(_type : GType) : gboolean;
+begin
+ G_TYPE_IS_ENUM:=(G_TYPE_FUNDAMENTAL(_type) = G_TYPE_ENUM);
+end;
+
+function G_ENUM_CLASS(_class : pointer) : PGEnumClass;
+begin
+ G_ENUM_CLASS:=PGEnumClass(G_TYPE_CHECK_CLASS_CAST(_class,G_TYPE_ENUM));
+end;
+
+function G_IS_ENUM_CLASS(_class : pointer) : gboolean;
+begin
+ G_IS_ENUM_CLASS:=G_TYPE_CHECK_CLASS_TYPE(_class,G_TYPE_ENUM);
+end;
+
+function G_ENUM_CLASS_TYPE(_class : pointer) : GType;
+begin
+ G_ENUM_CLASS_TYPE:=G_TYPE_FROM_CLASS(_class);
+end;
+
+function G_ENUM_CLASS_TYPE_NAME(_class : pointer) : PGChar;
+begin
+ G_ENUM_CLASS_TYPE_NAME:=g_type_name(G_ENUM_CLASS_TYPE(_class));
+end;
+
+function G_TYPE_IS_FLAGS(_type : GType) : gboolean;
+begin
+ G_TYPE_IS_FLAGS:=(G_TYPE_FUNDAMENTAL(_type)) = G_TYPE_FLAGS;
+end;
+
+function G_FLAGS_CLASS(_class : pointer) : PGFlagsClass;
+begin
+ G_FLAGS_CLASS:=PGFlagsClass(G_TYPE_CHECK_CLASS_CAST(_class,G_TYPE_FLAGS));
+end;
+
+function G_IS_FLAGS_CLASS(_class : pointer) : gboolean;
+begin
+ G_IS_FLAGS_CLASS:=G_TYPE_CHECK_CLASS_TYPE(_class,G_TYPE_FLAGS);
+end;
+
+function G_FLAGS_CLASS_TYPE(_class : pointer) : GType;
+begin
+ G_FLAGS_CLASS_TYPE:=G_TYPE_FROM_CLASS(_class);
+end;
+
+function G_FLAGS_CLASS_TYPE_NAME(_class : pointer) : PGChar;
+begin
+ G_FLAGS_CLASS_TYPE_NAME:=g_type_name(G_FLAGS_TYPE(PtrInt(_class)));
+end;
+
+function G_VALUE_HOLDS_ENUM(value : pointer) : gboolean;
+begin
+ G_VALUE_HOLDS_ENUM:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_ENUM);
+end;
+
+function G_VALUE_HOLDS_FLAGS(value : pointer) : gboolean;
+begin
+ G_VALUE_HOLDS_FLAGS:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_FLAGS);
+end;
+
+// gmacros.inc -----------------------------------------------------------------
+
+function CLAMP(x, MinX, MaxX: integer): integer;
+begin
+ if x<MinX then
+ Result:=MinX
+ else if x>MaxX then
+ Result:=MaxX
+ else
+ Result:=x;
+end;
+
+function GPOINTER_TO_SIZE(p: GPointer): GSize;
+begin
+ Result:=GSize(PtrInt(p));
+end;
+
+function GSIZE_TO_POINTER(s: GSize): GPointer;
+begin
+ Result:=GPointer(PtrInt(s));
+end;
+
+// gvaluetypes.inc -------------------------------------------------------------
+
+function G_VALUE_HOLDS_CHAR(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_CHAR:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_CHAR);
+end;
+
+function G_VALUE_HOLDS_UCHAR(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_UCHAR:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_UCHAR);
+end;
+
+function G_VALUE_HOLDS_BOOLEAN(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_BOOLEAN:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_BOOLEAN);
+end;
+
+function G_VALUE_HOLDS_INT(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_INT:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_INT);
+end;
+
+function G_VALUE_HOLDS_UINT(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_UINT:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_UINT);
+end;
+
+function G_VALUE_HOLDS_LONG(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_LONG:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_LONG);
+end;
+
+function G_VALUE_HOLDS_ULONG(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_ULONG:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_ULONG);
+end;
+
+function G_VALUE_HOLDS_INT64(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_INT64:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_INT64);
+end;
+
+function G_VALUE_HOLDS_UINT64(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_UINT64:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_UINT64);
+end;
+
+function G_VALUE_HOLDS_FLOAT(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_FLOAT:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_FLOAT);
+end;
+
+function G_VALUE_HOLDS_DOUBLE(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_DOUBLE:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_DOUBLE);
+end;
+
+function G_VALUE_HOLDS_STRING(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_STRING:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_STRING);
+end;
+
+function G_VALUE_HOLDS_POINTER(value : PGValue) : boolean;
+begin
+ G_VALUE_HOLDS_POINTER:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_POINTER);
+end;
+
+
+// gboxed.inc ------------------------------------------------------------------
+
+function G_TYPE_IS_BOXED(_type : GType) : gboolean;
+begin
+ G_TYPE_IS_BOXED:=(G_TYPE_FUNDAMENTAL(_type)) = G_TYPE_BOXED;
+end;
+
+function G_VALUE_HOLDS_BOXED(value : PGValue) : gboolean;
+begin
+ G_VALUE_HOLDS_BOXED:=G_TYPE_CHECK_VALUE_TYPE(value,G_TYPE_BOXED);
+end;
+
+function G_TYPE_CLOSURE : GType;
+begin
+ G_TYPE_CLOSURE:=g_closure_get_type;
+end;
+
+function G_TYPE_VALUE : GType;
+begin
+ G_TYPE_VALUE:=g_value_get_type;
+end;
+
+function G_TYPE_VALUE_ARRAY : GType;
+begin
+ G_TYPE_VALUE_ARRAY:=g_value_array_get_type;
+end;
+
+function G_TYPE_GSTRING : GType;
+begin
+ G_TYPE_GSTRING:=g_gstring_get_type;
+end;
+
+
+end.
diff --git a/packages/gtk2/src/glib/glibconfig.inc b/packages/gtk2/src/glib/glibconfig.inc
new file mode 100644
index 0000000000..e6e6e25797
--- /dev/null
+++ b/packages/gtk2/src/glib/glibconfig.inc
@@ -0,0 +1,115 @@
+// included by glib2.pas
+
+{*
+ * glibconfig.inc
+ *
+ * depends on gmacros.inc
+ *}
+
+{$IFDEF read_forward_definitions}
+ Pgint8 = ^gint8;
+ gint8 = shortint;
+
+ Pguint8 = ^guint8;
+ guint8 = byte;
+
+ Pgint16 = ^gint16;
+ gint16 = smallint;
+
+ Pguint16 = ^guint16;
+ guint16 = word;
+
+ Pgint32 = ^gint32;
+ gint32 = longint;
+
+ Pguint32 = ^guint32;
+ guint32 = dword;
+
+ Pgint64 = ^gint64;
+ gint64 = int64;
+
+ Pguint64 = ^guint64;
+ guint64 = qword;
+
+ pgssize = ^gssize;
+ gssize = longint;
+ pgsize = ^gsize;
+ gsize = dword;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+const
+ G_MINFLOAT = 5.0e-324;
+ G_MAXFLOAT = 1.7e308;
+ G_MINDOUBLE = G_MINFLOAT; // since gdouble is the same
+ G_MAXDOUBLE = G_MAXFLOAT; // as gfloat
+ G_MAXSHORT = 32767;
+ G_MINSHORT = -G_MAXSHORT-1;
+ G_MAXUSHORT = 2*G_MAXSHORT+1;
+ G_MAXINT = 2147483647;
+ G_MININT = -G_MAXINT-1;
+ G_MAXUINT = 4294967295; // 2*G_MAXINT+1;
+ G_MINLONG = G_MININT; // since glong is the same
+ G_MAXLONG = G_MAXINT; // as gint
+ G_MAXULONG = G_MAXUINT;
+ G_MAXINT64 = 9223372036854775807;
+ G_MININT64 = -G_MAXINT64-1;
+ {$IFNDEF KYLIX}
+ G_MAXUINT64 = qword(2)*qword(G_MAXINT64)+1;
+ {$ELSE}
+ G_MAXUINT64 = G_MAXINT64; // Kylix doesn't support constants bigger than G_MAXINT64
+ {$ENDIF}
+
+
+const
+ G_GINT16_FORMAT = 'hi';
+ G_GUINT16_FORMAT = 'hu';
+
+ G_GINT32_FORMAT = 'i';
+ G_GUINT32_FORMAT = 'u';
+
+ G_HAVE_GINT64 = 1; { always true }
+
+ G_GINT64_FORMAT = 'I64i';
+ G_GUINT64_FORMAT = 'I64u';
+
+ GLIB_SIZEOF_VOID_P = SizeOf(Pointer);
+ GLIB_SIZEOF_LONG = SizeOf(longint);
+ GLIB_SIZEOF_SIZE_T = SizeOf(longint);
+
+type
+ PGSystemThread = ^TGSystemThread;
+ TGSystemThread = record
+ data : array [0..3] of char;
+ dummy_double : double;
+ dummy_pointer : pointer;
+ dummy_long : longint;
+ end;
+
+
+const
+ GLIB_SYSDEF_POLLIN = 1;
+ GLIB_SYSDEF_POLLOUT = 4;
+ GLIB_SYSDEF_POLLPRI = 2;
+ GLIB_SYSDEF_POLLERR = 8;
+ GLIB_SYSDEF_POLLHUP = 16;
+ GLIB_SYSDEF_POLLNVAL = 32;
+
+{$ifdef win32}
+ G_MODULE_SUFFIX = 'dll';
+{$else}
+ G_MODULE_SUFFIX = 'so';
+{$endif}
+
+function GUINT_TO_POINTER(i: guint): pointer;
+
+
+
+{$ENDIF read_interface_rest}
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/glist.inc b/packages/gtk2/src/glib/glist.inc
new file mode 100644
index 0000000000..b386eb60ef
--- /dev/null
+++ b/packages/gtk2/src/glib/glist.inc
@@ -0,0 +1,86 @@
+// included by glib2.pas
+
+{$IFDEF read_forward_definitions}
+ PGList = ^TGList;
+ TGList = record
+ data : gpointer;
+ next : PGList;
+ prev : PGList;
+ end;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{ Doubly linked lists }
+
+procedure g_list_push_allocator(allocator:PGAllocator);cdecl;external gliblib name 'g_list_push_allocator';
+
+procedure g_list_pop_allocator;cdecl;external gliblib name 'g_list_pop_allocator';
+
+function g_list_alloc:PGList;cdecl;external gliblib name 'g_list_alloc';
+
+procedure g_list_free(list:PGList);cdecl;external gliblib name 'g_list_free';
+
+procedure g_list_free_1(list:PGList);cdecl;external gliblib name 'g_list_free_1';
+
+function g_list_append(list:PGList; data:gpointer):PGList;cdecl;external gliblib name 'g_list_append';
+
+function g_list_prepend(list:PGList; data:gpointer):PGList;cdecl;external gliblib name 'g_list_prepend';
+
+function g_list_insert(list:PGList; data:gpointer; position:gint):PGList;cdecl;external gliblib name 'g_list_insert';
+
+function g_list_insert_sorted(list:PGList; data:gpointer; func:TGCompareFunc):PGList;cdecl;external gliblib name 'g_list_insert_sorted';
+
+function g_list_insert_before(list:PGList; sibling:PGList; data:gpointer):PGList;cdecl;external gliblib name 'g_list_insert_before';
+
+function g_list_concat(list1:PGList; list2:PGList):PGList;cdecl;external gliblib name 'g_list_concat';
+
+function g_list_remove(list:PGList; data:gconstpointer):PGList;cdecl;external gliblib name 'g_list_remove';
+
+function g_list_remove_all(list:PGList; data:gconstpointer):PGList;cdecl;external gliblib name 'g_list_remove_all';
+
+function g_list_remove_link(list:PGList; llink:PGList):PGList;cdecl;external gliblib name 'g_list_remove_link';
+
+function g_list_delete_link(list:PGList; link:PGList):PGList;cdecl;external gliblib name 'g_list_delete_link';
+
+function g_list_reverse(list:PGList):PGList;cdecl;external gliblib name 'g_list_reverse';
+
+function g_list_copy(list:PGList):PGList;cdecl;external gliblib name 'g_list_copy';
+
+function g_list_nth(list:PGList; n:guint):PGList;cdecl;external gliblib name 'g_list_nth';
+
+function g_list_nth_prev(list:PGList; n:guint):PGList;cdecl;external gliblib name 'g_list_nth_prev';
+
+function g_list_find(list:PGList; data:gconstpointer):PGList;cdecl;external gliblib name 'g_list_find';
+
+function g_list_find_custom(list:PGList; data:gconstpointer; func:TGCompareFunc):PGList;cdecl;external gliblib name 'g_list_find_custom';
+
+function g_list_position(list:PGList; llink:PGList):gint;cdecl;external gliblib name 'g_list_position';
+
+function g_list_index(list:PGList; data:gconstpointer):gint;cdecl;external gliblib name 'g_list_index';
+
+function g_list_last(list:PGList):PGList;cdecl;external gliblib name 'g_list_last';
+
+function g_list_first(list:PGList):PGList;cdecl;external gliblib name 'g_list_first';
+
+function g_list_length(list:PGList):guint;cdecl;external gliblib name 'g_list_length';
+
+procedure g_list_foreach(list:PGList; func:TGFunc; user_data:gpointer);cdecl;external gliblib name 'g_list_foreach';
+
+function g_list_sort(list:PGList; compare_func:TGCompareFunc):PGList;cdecl;external gliblib name 'g_list_sort';
+
+function g_list_sort_with_data(list:PGList; compare_func:TGCompareDataFunc; user_data:gpointer):PGList;cdecl;external gliblib name 'g_list_sort_with_data';
+
+function g_list_nth_data(list:PGList; n:guint):gpointer;cdecl;external gliblib name 'g_list_nth_data';
+
+{ Macros }
+
+function g_list_previous (list : PGList) : PGList;
+
+function g_list_next (list : PGList) : PGList;
+{$ENDIF read_interface_rest}
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gmacros.inc b/packages/gtk2/src/glib/gmacros.inc
new file mode 100644
index 0000000000..007987a4c9
--- /dev/null
+++ b/packages/gtk2/src/glib/gmacros.inc
@@ -0,0 +1,17 @@
+{$ifndef __G_MACROS_H__}
+{$define __G_MACROS_H__}
+
+ const
+ NULL = nil;
+ gTRUE = 1;
+ gFALSE = 0;
+
+function CLAMP(x, MinX, MaxX: integer): integer;
+
+// Macros by analogy to GINT_TO_POINTER, GPOINTER_TO_INT
+function GPOINTER_TO_SIZE(p: GPointer): GSize;
+function GSIZE_TO_POINTER(s: GSize): GPointer;
+
+{$endif} { __G_MACROS_H__ }
+
+
diff --git a/packages/gtk2/src/glib/gmain.inc b/packages/gtk2/src/glib/gmain.inc
new file mode 100644
index 0000000000..9a4336397b
--- /dev/null
+++ b/packages/gtk2/src/glib/gmain.inc
@@ -0,0 +1,268 @@
+
+{$ifndef __G_MAIN_H__}
+{$define __G_MAIN_H__}
+
+//{$include gslist.inc}
+//{$include gthread.inc}
+
+ type
+ PGMainContext = pointer;
+ PGMainLoop = pointer;
+
+ PGSourceFunc = ^TGSourceFunc;
+ TGSourceFunc = function (data:gpointer):gboolean;cdecl;
+
+ {< private > }
+ PGSourceCallbackFuncs = ^TGSourceCallbackFuncs;
+
+ PGSource = ^TGSource;
+ PGSourceFuncs = ^TGSourceFuncs;
+
+ TGSource = record
+ callback_data : gpointer;
+ callback_funcs : PGSourceCallbackFuncs;
+ source_funcs : PGSourceFuncs;
+ ref_count : guint;
+ context : PGMainContext;
+ priority : gint;
+ flags : guint;
+ source_id : guint;
+ poll_fds : PGSList;
+ prev : PGSource;
+ next : PGSource;
+ reserved1 : gpointer;
+ reserved2 : gpointer;
+ end;
+
+ TGSourceCallbackFuncs = record
+ ref : procedure (cb_data:gpointer); cdecl;
+ unref : procedure (cb_data:gpointer); cdecl;
+ get : procedure (cb_data:gpointer; source:PGSource; func:PGSourceFunc; data:Pgpointer); cdecl;
+ end;
+
+ TGSourceDummyMarshal = procedure {no parameters} ;cdecl;
+ { Can be NULL }
+ { For use by g_source_set_closure }
+ { Really is of type GClosureMarshal }
+
+ TGSourceFuncs = record
+ prepare : function (source:PGSource; timeout:gint):gboolean; cdecl;
+ check : function (source:PGSource):gboolean; cdecl;
+ dispatch : function (source:PGSource; callback:TGSourceFunc; user_data:gpointer):gboolean; cdecl;
+ finalize : procedure (source:PGSource); cdecl;
+ closure_callback : TGSourceFunc;
+ closure_marshal : TGSourceDummyMarshal;
+ end;
+
+ { Any definitions using GPollFD or GPollFunc are primarily
+ for Unix and not guaranteed to be the compatible on all
+ operating systems on which GLib runs. Right now, the
+ GLib does use these functions on Win32 as well, but interprets
+ them in a fairly different way than on Unix. If you use
+ these definitions, you are should be prepared to recode
+ for different operating systems.
+
+
+ On Win32, the fd in a GPollFD should be Win32 HANDLE ( not a file
+ descriptor as provided by the C runtime) that can be used by
+ MsgWaitForMultipleObjects. This does not include file handles
+ from CreateFile, SOCKETs, nor pipe handles. (But you can use
+ WSAEventSelect to signal events when a SOCKET is readable).
+
+ On Win32, fd can also be the special value G_WIN32_MSG_HANDLE to
+ indicate polling for messages. These message queue GPollFDs should
+ be added with the g_main_poll_win32_msg_add function.
+
+ But note that G_WIN32_MSG_HANDLE GPollFDs should not be used by GDK
+ (GTK) programs, as GDK itself wants to read messages and convert them
+ to GDK events.
+
+ So, unless you really know what you are doing, it's best not to try
+ to use the main loop polling stuff for your own needs on
+ Win32. It's really only written for the GIMP's needs so
+ far.
+ }
+
+ PGPollFD = ^TGPollFD;
+ TGPollFD = record
+ fd : gint;
+ events : gushort;
+ revents : gushort;
+ end;
+
+ TGPollFunc = function (ufds:PGPollFD; nfsd:guint; timeout:gint):gint;cdecl;
+
+ { Standard priorities }
+
+ const
+ G_PRIORITY_HIGH = -(100);
+ G_PRIORITY_DEFAULT = 0;
+ G_PRIORITY_HIGH_IDLE = 100;
+ G_PRIORITY_DEFAULT_IDLE = 200;
+ G_PRIORITY_LOW = 300;
+ { GMainContext: }
+
+ function g_main_context_new:PGMainContext;cdecl;external gliblib name 'g_main_context_new';
+
+ procedure g_main_context_ref(context:PGMainContext);cdecl;external gliblib name 'g_main_context_ref';
+
+ procedure g_main_context_unref(context:PGMainContext);cdecl;external gliblib name 'g_main_context_unref';
+
+ function g_main_context_default:PGMainContext;cdecl;external gliblib name 'g_main_context_default';
+
+ function g_main_context_iteration(context:PGMainContext; may_block:gboolean):gboolean;cdecl;external gliblib name 'g_main_context_iteration';
+
+ function g_main_context_pending(context:PGMainContext):gboolean;cdecl;external gliblib name 'g_main_context_pending';
+
+ { For implementation of legacy interfaces
+ }
+ function g_main_context_find_source_by_id(context:PGMainContext; source_id:guint):PGSource;cdecl;external gliblib name 'g_main_context_find_source_by_id';
+
+ function g_main_context_find_source_by_user_data(context:PGMainContext; user_data:gpointer):PGSource;cdecl;external gliblib name 'g_main_context_find_source_by_user_data';
+
+ function g_main_context_find_source_by_funcs_user_data(context:PGMainContext; funcs:PGSourceFuncs; user_data:gpointer):PGSource;cdecl;external gliblib name 'g_main_context_find_source_by_funcs_user_data';
+
+ { Low level functions for implementing custom main loops.
+ }
+ procedure g_main_context_wakeup(context:PGMainContext);cdecl;external gliblib name 'g_main_context_wakeup';
+
+ function g_main_context_acquire(context:PGMainContext):gboolean;cdecl;external gliblib name 'g_main_context_acquire';
+
+ procedure g_main_context_release(context:PGMainContext);cdecl;external gliblib name 'g_main_context_release';
+
+ function g_main_context_wait(context:PGMainContext; cond:PGCond; mutex:PGMutex):gboolean;cdecl;external gliblib name 'g_main_context_wait';
+
+ function g_main_context_prepare(context:PGMainContext; priority:Pgint):gboolean;cdecl;external gliblib name 'g_main_context_prepare';
+
+ function g_main_context_query(context:PGMainContext; max_priority:gint; timeout:Pgint; fds:PGPollFD; n_fds:gint):gint;cdecl;external gliblib name 'g_main_context_query';
+
+ function g_main_context_check(context:PGMainContext; max_priority:gint; fds:PGPollFD; n_fds:gint):gint;cdecl;external gliblib name 'g_main_context_check';
+
+ procedure g_main_context_dispatch(context:PGMainContext);cdecl;external gliblib name 'g_main_context_dispatch';
+
+ procedure g_main_context_set_poll_func(context:PGMainContext; func:TGPollFunc);cdecl;external gliblib name 'g_main_context_set_poll_func';
+
+ function g_main_context_get_poll_func(context:PGMainContext):TGPollFunc;cdecl;external gliblib name 'g_main_context_get_poll_func';
+
+ { Low level functions for use by source implementations
+ }
+ procedure g_main_context_add_poll(context:PGMainContext; fd:PGPollFD; priority:gint);cdecl;external gliblib name 'g_main_context_add_poll';
+
+ procedure g_main_context_remove_poll(context:PGMainContext; fd:PGPollFD);cdecl;external gliblib name 'g_main_context_remove_poll';
+
+ { GMainLoop: }
+ function g_main_loop_new(context:PGMainContext; is_running:gboolean):PGMainLoop;cdecl;external gliblib name 'g_main_loop_new';
+
+ procedure g_main_loop_run(loop:PGMainLoop);cdecl;external gliblib name 'g_main_loop_run';
+
+ procedure g_main_loop_quit(loop:PGMainLoop);cdecl;external gliblib name 'g_main_loop_quit';
+
+ function g_main_loop_ref(loop:PGMainLoop):PGMainLoop;cdecl;external gliblib name 'g_main_loop_ref';
+
+ procedure g_main_loop_unref(loop:PGMainLoop);cdecl;external gliblib name 'g_main_loop_unref';
+
+ function g_main_loop_is_running(loop:PGMainLoop):gboolean;cdecl;external gliblib name 'g_main_loop_is_running';
+
+ function g_main_loop_get_context(loop:PGMainLoop):PGMainContext;cdecl;external gliblib name 'g_main_loop_get_context';
+
+ { GSource: }
+ function g_source_new(source_funcs:PGSourceFuncs; struct_size:guint):PGSource;cdecl;external gliblib name 'g_source_new';
+
+ function g_source_ref(source:PGSource):PGSource;cdecl;external gliblib name 'g_source_ref';
+
+ procedure g_source_unref(source:PGSource);cdecl;external gliblib name 'g_source_unref';
+
+ function g_source_attach(source:PGSource; context:PGMainContext):guint;cdecl;external gliblib name 'g_source_attach';
+
+ procedure g_source_destroy(source:PGSource);cdecl;external gliblib name 'g_source_destroy';
+
+ procedure g_source_set_priority(source:PGSource; priority:gint);cdecl;external gliblib name 'g_source_set_priority';
+
+ function g_source_get_priority(source:PGSource):gint;cdecl;external gliblib name 'g_source_get_priority';
+
+ procedure g_source_set_can_recurse(source:PGSource; can_recurse:gboolean);cdecl;external gliblib name 'g_source_set_can_recurse';
+
+ function g_source_get_can_recurse(source:PGSource):gboolean;cdecl;external gliblib name 'g_source_get_can_recurse';
+
+ function g_source_get_id(source:PGSource):guint;cdecl;external gliblib name 'g_source_get_id';
+
+ function g_source_get_context(source:PGSource):PGMainContext;cdecl;external gliblib name 'g_source_get_context';
+
+ procedure g_source_set_callback(source:PGSource; func:TGSourceFunc; data:gpointer; notify:TGDestroyNotify);cdecl;external gliblib name 'g_source_set_callback';
+
+ { Used to implement g_source_connect_closure and internally }
+ procedure g_source_set_callback_indirect(source:PGSource; callback_data:gpointer; callback_funcs:PGSourceCallbackFuncs);cdecl;external gliblib name 'g_source_set_callback_indirect';
+
+ procedure g_source_add_poll(source:PGSource; fd:PGPollFD);cdecl;external gliblib name 'g_source_add_poll';
+
+ procedure g_source_remove_poll(source:PGSource; fd:PGPollFD);cdecl;external gliblib name 'g_source_remove_poll';
+
+ procedure g_source_get_current_time(source:PGSource; timeval:PGTimeVal);cdecl;external gliblib name 'g_source_get_current_time';
+
+ { void g_source_connect_closure (GSource source,
+ GClosure closure);
+ }
+ { Specific source types
+ }
+ function g_idle_source_new:PGSource;cdecl;external gliblib name 'g_idle_source_new';
+
+ function g_timeout_source_new(interval:guint):PGSource;cdecl;external gliblib name 'g_timeout_source_new';
+
+ { Miscellaneous functions
+ }
+ procedure g_get_current_time(result:PGTimeVal);cdecl;external gliblib name 'g_get_current_time';
+
+ { ============== Compat main loop stuff ================== }
+
+ function g_main_new(is_running: gboolean): PGMainLoop;
+
+
+ { these functions are maped to their newer versions }
+ procedure g_main_run (loop:PGMainLoop);cdecl;external gliblib name 'g_main_loop_run';
+ procedure g_main_quit (loop:PGMainLoop);cdecl;external gliblib name 'g_main_loop_quit';
+ procedure g_main_destroy (loop:PGMainLoop);cdecl;external gliblib name 'g_main_loop_unref';
+ function g_main_is_running (loop:PGMainLoop):gboolean;cdecl;external gliblib name 'g_main_loop_is_running';
+
+
+ { Functions to manipulate the default main loop}
+ function g_main_iteration (may_block: gboolean): gboolean;
+ function g_main_pending: gboolean;
+ // g_main_context_pending (NULL)
+ procedure g_main_set_poll_func(func: TGPollFunc);
+ // g_main_context_set_poll_func (NULL, func)
+
+ { ======= end of Compat main loop stuff ================== }
+
+ { Source manipulation by ID }
+
+ function g_source_remove(tag:guint):gboolean;cdecl;external gliblib name 'g_source_remove';
+
+ function g_source_remove_by_user_data(user_data:gpointer):gboolean;cdecl;external gliblib name 'g_source_remove_by_user_data';
+
+ function g_source_remove_by_funcs_user_data(funcs:PGSourceFuncs; user_data:gpointer):gboolean;cdecl;external gliblib name 'g_source_remove_by_funcs_user_data';
+
+ { Idles and timeouts }
+ function g_timeout_add_full(priority:gint; interval:guint; _function:TGSourceFunc; data:gpointer; notify:TGDestroyNotify):guint;cdecl;external gliblib name 'g_timeout_add_full';
+
+ function g_timeout_add(interval:guint; _function:TGSourceFunc; data:gpointer):guint;cdecl;external gliblib name 'g_timeout_add';
+
+ function g_idle_add(_function:TGSourceFunc; data:gpointer):guint;cdecl;external gliblib name 'g_idle_add';
+
+ function g_idle_add_full(priority:gint; _function:TGSourceFunc; data:gpointer; notify:TGDestroyNotify):guint;cdecl;external gliblib name 'g_idle_add_full';
+
+ function g_idle_remove_by_data(data:gpointer):gboolean;cdecl;external gliblib name 'g_idle_remove_by_data';
+
+ { Hook for GClosure / GSource integration. Don't touch }
+// GLIB_VAR GSourceFuncs g_timeout_funcs;
+// GLIB_VAR GSourceFuncs g_idle_funcs;
+
+{$ifdef win32}
+ { This is used to add polling for Windows messages. GDK (GTK+) programs
+ should not use this.
+ }
+
+ procedure g_main_poll_win32_msg_add(priority:gint; fd:PGPollFD; hwnd:guint);cdecl;external gliblib name 'g_main_poll_win32_msg_add';
+{$endif}
+
+{$endif}
+
diff --git a/packages/gtk2/src/glib/gmarkup.inc b/packages/gtk2/src/glib/gmarkup.inc
new file mode 100644
index 0000000000..62f711e02b
--- /dev/null
+++ b/packages/gtk2/src/glib/gmarkup.inc
@@ -0,0 +1,111 @@
+{*
+ * gmarkup.inc
+ *
+ * depends on gerror.inc
+ *}
+
+
+ { These three are primarily intended for specific GMarkupParser
+ implementations to set.
+ }
+ type
+
+ PGMarkupError = ^TGMarkupError;
+ TGMarkupError = (G_MARKUP_ERROR_BAD_UTF8,
+ G_MARKUP_ERROR_EMPTY,
+ G_MARKUP_ERROR_PARSE,
+ G_MARKUP_ERROR_UNKNOWN_ELEMENT,
+ G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
+ G_MARKUP_ERROR_INVALID_CONTENT);
+
+
+ function G_MARKUP_ERROR : TGQuark;
+
+
+ function g_markup_error_quark:TGQuark;cdecl;external gliblib name 'g_markup_error_quark';
+
+ type
+ PGMarkupParseFlags = ^TGMarkupParseFlags;
+ TGMarkupParseFlags = integer;
+
+ const
+ { Hmm, can't think of any at the moment }
+ G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 shl 0;
+
+ type
+ PGMarkupParseContext = ^TGMarkupParseContext;
+ TGMarkupParseContext = pointer; // please correct me if it's wrong
+
+
+ PGMarkupParser = ^TGMarkupParser;
+ TGMarkupParser = record
+
+ { Called for open tags <foo bar="baz"> }
+ start_element : procedure (context : PGMarkupParseContext;
+ element_name : Pgchar;
+ attribute_names : PPgchar;
+ attribute_values : PPgchar;
+ user_data : gpointer; error:PPGError);cdecl;
+
+ { Called for close tags </foo> }
+ end_element : procedure (context : PGMarkupParseContext;
+ element_name : Pgchar;
+ user_data : gpointer;
+ error : PPGError); cdecl;
+
+ { Called for character data }
+ { text is not nul-terminated }
+ text : procedure (context : PGMarkupParseContext;
+ text : Pgchar;
+ text_len : gsize;
+ user_data : gpointer;
+ error : PPGError); cdecl;
+
+ { Called for strings that should be re-saved verbatim in this same
+ position, but are not otherwise interpretable. At the moment
+ this includes comments and processing instructions.
+ }
+ { text is not nul-terminated. }
+
+ passthrough : procedure (context : PGMarkupParseContext;
+ passthrough_text : Pgchar;
+ text_len : gsize;
+ user_data : gpointer;
+ error : PPGError); cdecl;
+
+ { Called on error, including one set by other
+ methods in the vtable. The GError should not be freed.
+ }
+ error : procedure (context : PGMarkupParseContext;
+ error : PGError;
+ user_data : gpointer); cdecl;
+ end;
+
+
+
+ function g_markup_parse_context_new (parser : PGMarkupParser;
+ flags : TGMarkupParseFlags;
+ user_data : gpointer;
+ user_data_dnotify : TGDestroyNotify): PGMarkupParseContext; cdecl;external gliblib name 'g_markup_parse_context_new';
+
+ procedure g_markup_parse_context_free(context : PGMarkupParseContext);cdecl;external gliblib name 'g_markup_parse_context_free';
+
+ function g_markup_parse_context_parse(context : PGMarkupParseContext;
+ text : Pgchar;
+ text_len : gssize;
+ error : PPGError):gboolean;cdecl;external gliblib name 'g_markup_parse_context_parse';
+
+ function g_markup_parse_context_end_parse(context : PGMarkupParseContext;
+ error : PPGError):gboolean;cdecl;external gliblib name 'g_markup_parse_context_end_parse';
+
+ { For user-constructed error messages, has no precise semantics }
+ procedure g_markup_parse_context_get_position(context : PGMarkupParseContext;
+ line_number : Pgint;
+ char_number : Pgint);cdecl;external gliblib name 'g_markup_parse_context_get_position';
+
+ { useful when saving }
+ function g_markup_escape_text (text : Pgchar;
+ length : gssize):Pgchar;cdecl;external gliblib name 'g_markup_escape_text';
+
+
+
diff --git a/packages/gtk2/src/glib/gmarshal.inc b/packages/gtk2/src/glib/gmarshal.inc
new file mode 100644
index 0000000000..1c4b90c682
--- /dev/null
+++ b/packages/gtk2/src/glib/gmarshal.inc
@@ -0,0 +1,73 @@
+// included by glib2.pas
+
+procedure g_cclosure_marshal_VOID__VOID(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__BOOLEAN(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__CHAR(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__UCHAR(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__INT(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__UINT(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__LONG(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__ULONG(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__ENUM(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__FLAGS(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__FLOAT(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__DOUBLE(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__STRING(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__PARAM(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__BOXED(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__POINTER(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__OBJECT(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_STRING__OBJECT_POINTER(closure:PGClosure;
+ return_value:PGValue; n_param_values:GUInt; param_values:PGValue;
+ invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_VOID__UINT_POINTER(closure:PGClosure;
+ return_value:PGValue; n_param_values:GUInt; param_values:PGValue;
+ invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+procedure g_cclosure_marshal_BOOLEAN__FLAGS(closure:PGClosure;
+ return_value:PGValue; n_param_values:GUInt; param_values:PGValue;
+ invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gobjectlib;
+
+procedure g_cclosure_marshal_BOOL__FLAGS(closure:PGClosure;
+ return_value:PGValue; n_param_values:GUInt; param_values:PGValue;
+ invocation_hint:GPointer;
+ marshal_data:GPointer);cdecl;external gliblib name 'g_cclosure_marshal_BOOLEAN__FLAGS';
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gmem.inc b/packages/gtk2/src/glib/gmem.inc
new file mode 100644
index 0000000000..63dc357f76
--- /dev/null
+++ b/packages/gtk2/src/glib/gmem.inc
@@ -0,0 +1,125 @@
+// included by glib2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ G_MEM_ALIGN = GLIB_SIZEOF_VOID_P;
+
+type
+ PGMemVTable = ^TGMemVTable;
+ TGMemVTable = record
+ malloc : function (n_bytes:gsize):gpointer; cdecl;
+ realloc : function (mem:gpointer; n_bytes:gsize):gpointer; cdecl;
+ free : procedure (mem:gpointer); cdecl;
+ calloc : function (n_blocks:gsize; n_block_bytes:gsize):gpointer; cdecl;
+ try_malloc : function (n_bytes:gsize):gpointer; cdecl;
+ try_realloc : function (mem:gpointer; n_bytes:gsize):gpointer; cdecl;
+ end;
+
+ PGMemChunk = pointer; // internal structure of gmem.c
+ PGAllocator = pointer; // internal structure of gmem.c
+
+
+{ Memory allocation functions }
+
+function g_malloc(n_bytes:gulong):gpointer; cdecl; external gliblib;
+function g_malloc0(n_bytes:gulong):gpointer; cdecl; external gliblib;
+function g_realloc(mem:gpointer; n_bytes:gulong):gpointer; cdecl; external gliblib;
+procedure g_free(mem:gpointer); cdecl; external gliblib;
+function g_try_malloc(n_bytes:gulong):gpointer; cdecl; external gliblib;
+function g_try_realloc(mem:gpointer; n_bytes:gulong):gpointer; cdecl; external gliblib;
+
+{ Convenience memory allocators }
+function g_new(bytes_per_struct, n_structs: gsize): gpointer;
+function g_new0(bytes_per_struct, n_structs: gsize): gpointer;
+function g_renew(struct_size: gsize; OldMem: gpointer; n_structs : gsize) : gpointer;
+
+{ Memory allocation virtualization for debugging purposes
+ g_mem_set_vtable() has to be the very first GLib function called
+ if being used
+ }
+{ optional }
+
+procedure g_mem_set_vtable(vtable:PGMemVTable); cdecl; external gliblib;
+function g_mem_is_system_malloc:gboolean; cdecl; external gliblib;
+
+{$IFNDEF KYLIX}
+{ Memory profiler and checker, has to be enabled via g_mem_set_vtable() }
+var
+ {$IFDEF WIN32}
+ glib_mem_profiler_table : PGMemVTable; external gliblib name 'glib_mem_profiler_table';
+ {$ELSE}
+ glib_mem_profiler_table : PGMemVTable;cvar;external;
+ {$ENDIF}
+{$ENDIF}
+
+procedure g_mem_profile; cdecl; external gliblib;
+{ Memchunk convenience functions }
+
+{ c specific:
+ #define g_mem_chunk_create(type, pre_alloc, alloc_type) (
+ g_mem_chunk_new (#type " mem chunks (" #pre_alloc ")",
+ sizeof (type), sizeof (type) * (pre_alloc), (alloc_type)) ) }
+
+function g_chunk_new(chunk : Pointer) : Pointer;
+function g_chunk_new0(chunk : Pointer) : Pointer;
+procedure g_chunk_free(mem_chunk:PGMemChunk; mem:gpointer);
+{ "g_mem_chunk_new" creates a new memory chunk.
+ Memory chunks are used to allocate pieces of memory which are
+ always the same size. Lists are a good example of such a data type.
+ The memory chunk allocates and frees blocks of memory as needed.
+ Just be sure to call "g_mem_chunk_free" and not "g_free" on data
+ allocated in a mem chunk. ("g_free" will most likely cause a seg
+ fault...somewhere).
+
+ Oh yeah, GMemChunk is an opaque data type. (You don't really
+ want to know what's going on inside do you?)
+ }
+{ ALLOC_ONLY MemChunk's can only allocate memory. The free operation
+ is interpreted as a no op. ALLOC_ONLY MemChunk's save 4 bytes per
+ atom. (They are also useful for lists which use MemChunk to allocate
+ memory but are also part of the MemChunk implementation).
+ ALLOC_AND_FREE MemChunk's can allocate and free memory.
+ }
+
+const
+ G_ALLOC_ONLY = 1;
+ G_ALLOC_AND_FREE = 2;
+
+function g_mem_chunk_new(name:Pgchar; atom_size:gint; area_size:gulong; _type:gint):PGMemChunk; cdecl; external gliblib;
+procedure g_mem_chunk_destroy(mem_chunk:PGMemChunk); cdecl; external gliblib;
+function g_mem_chunk_alloc(mem_chunk:PGMemChunk):gpointer; cdecl; external gliblib;
+function g_mem_chunk_alloc0(mem_chunk:PGMemChunk):gpointer; cdecl; external gliblib;
+procedure g_mem_chunk_free(mem_chunk:PGMemChunk; mem:gpointer); cdecl; external gliblib;
+procedure g_mem_chunk_clean(mem_chunk:PGMemChunk); cdecl; external gliblib;
+procedure g_mem_chunk_reset(mem_chunk:PGMemChunk); cdecl; external gliblib;
+procedure g_mem_chunk_print(mem_chunk:PGMemChunk); cdecl; external gliblib;
+procedure g_mem_chunk_info; cdecl; external gliblib;
+
+{ Ah yes...we have a "g_blow_chunks" function.
+ "g_blow_chunks" simply compresses all the chunks. This operation
+ consists of freeing every memory area that should be freed (but
+ which we haven't gotten around to doing yet). And, no,
+ "g_blow_chunks" doesn't follow the naming scheme, but it is a
+ much better name than "g_mem_chunk_clean_all" or something
+ similar.
+ }
+procedure g_blow_chunks; cdecl; external gliblib;
+
+{ Generic allocators }
+function g_allocator_new(name:Pgchar; n_preallocs:guint):PGAllocator; cdecl; external gliblib;
+procedure g_allocator_free(allocator:PGAllocator); cdecl; external gliblib;
+
+{ internal }
+const
+ G_ALLOCATOR_LIST = 1;
+ G_ALLOCATOR_SLIST = 2;
+ G_ALLOCATOR_NODE = 3;
+
+{$ENDIF read_interface_rest}
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gmessages.inc b/packages/gtk2/src/glib/gmessages.inc
new file mode 100644
index 0000000000..03ad036d5d
--- /dev/null
+++ b/packages/gtk2/src/glib/gmessages.inc
@@ -0,0 +1,140 @@
+{*
+ * gmessages.inc
+ *
+ * depends on gtypes.inc
+ *}
+
+
+ { calculate a string size, guarranteed to fit format + args.
+ }
+
+{$IFNDEF KYLIX}
+ function g_printf_string_upper_bound(format:Pgchar; args:array of const):gsize;cdecl;external gliblib name 'g_printf_string_upper_bound';
+{$ELSE}
+ function g_printf_string_upper_bound(format:Pgchar):gsize;varargs;cdecl;external gliblib name 'g_printf_string_upper_bound';
+{$ENDIF}
+
+ { Log level shift offset for user defined
+ log levels (0-7 are used by GLib).
+ }
+
+ const
+ G_LOG_LEVEL_USER_SHIFT = 8;
+ { Glib log levels and flags. }
+
+
+ type
+
+ PGLogLevelFlags = ^TGLogLevelFlags;
+ 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 = not 3;
+// G_LOG_LEVEL_MASK = not (G_LOG_FLAG_RECURSION or G_LOG_FLAG_FATAL);
+
+
+ { GLib log levels that are considered fatal by default }
+ const
+ G_LOG_FATAL_MASK = 5;
+
+ type
+ TGLogFunc = procedure (log_domain:Pgchar; log_level:TGLogLevelFlags; TheMessage:Pgchar; user_data:gpointer);cdecl;
+
+ { Logging mechanism }
+
+ function g_log_set_handler(log_domain:Pgchar; log_levels:TGLogLevelFlags; log_func:TGLogFunc; user_data:gpointer):guint;cdecl;external gliblib name 'g_log_set_handler';
+
+ procedure g_log_remove_handler(log_domain:Pgchar; handler_id:guint);cdecl;external gliblib name 'g_log_remove_handler';
+
+ procedure g_log_default_handler(log_domain:Pgchar; log_level:TGLogLevelFlags; TheMessage:Pgchar; unused_data:gpointer);cdecl;external gliblib name 'g_log_default_handler';
+
+{$IFNDEF KYLIX}
+ procedure g_log(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_log';
+ procedure g_log(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar);cdecl;overload;varargs;external gliblib name 'g_log';
+
+ procedure g_logv(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_logv';
+ procedure g_logv(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar);cdecl;overload;varargs;external gliblib name 'g_logv';
+{$ELSE}
+ procedure g_log(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar);varargs;cdecl;external gliblib name 'g_log';
+ procedure g_logv(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar);varargs;cdecl;external gliblib name 'g_logv';
+{$ENDIF}
+
+
+ function g_log_set_fatal_mask(log_domain:Pgchar; fatal_mask:TGLogLevelFlags):TGLogLevelFlags;cdecl;external gliblib name 'g_log_set_fatal_mask';
+
+ function g_log_set_always_fatal(fatal_mask:TGLogLevelFlags):TGLogLevelFlags;cdecl;external gliblib name 'g_log_set_always_fatal';
+
+ { internal }
+ procedure _g_log_fallback_handler(log_domain:Pgchar; log_level:TGLogLevelFlags; message:Pgchar; unused_data:gpointer);cdecl;external gliblib name '_g_log_fallback_handler';
+
+ const
+ G_LOG_DOMAIN = nil;
+
+// or try this:
+//
+// function G_LOG_DOMAIN : pgchar;
+// begin
+// G_LOG_DOMAIN := PGChar(0);
+// end;
+
+
+ procedure g_error (format:Pgchar; args: array of const); overload;
+ procedure g_error (format:Pgchar); overload;
+
+ procedure g_message (format:Pgchar; args: array of const); overload;
+ procedure g_message (format:Pgchar); overload;
+
+ procedure g_critical (format:Pgchar; args: array of const); overload;
+ procedure g_critical (format:Pgchar); overload;
+
+ procedure g_warning (format:Pgchar; args: array of const); overload;
+ procedure g_warning (format:Pgchar); overload;
+
+ type
+ TGPrintFunc = procedure (_string: pgchar);
+
+{$IFNDEF KYLIX}
+ procedure g_print(format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_print';
+ procedure g_print(format:Pgchar);cdecl;overload;varargs;external gliblib name 'g_print';
+{$ELSE}
+ procedure g_print(format:Pgchar);varargs;cdecl;external gliblib name 'g_print';
+{$ENDIF}
+
+ function g_set_print_handler(func:TGPrintFunc):TGPrintFunc;cdecl;external gliblib name 'g_set_print_handler';
+
+
+{$IFNDEF KYLIX}
+ procedure g_printerr(format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_printerr';
+ procedure g_printerr(format:Pgchar);cdecl;overload;varargs;external gliblib name 'g_printerr';
+{$ELSE}
+ procedure g_printerr(format:Pgchar);varargs;cdecl;external gliblib name 'g_printerr';
+{$ENDIF}
+
+ function g_set_printerr_handler(func:TGPrintFunc):TGPrintFunc;cdecl;external gliblib name 'g_set_printerr_handler';
+
+ { Provide macros for error handling. The "assert" macros will
+ exit on failure. The "return" macros will exit the current
+ function. Two different definitions are given for the macros
+ if G_DISABLE_ASSERT is not defined, in order to support gcc's
+ __PRETTY_FUNCTION__ capability.
+ }
+
+{ ????????? }
+
+// #define g_assert(expr) G_STMT_START{ }G_STMT_END
+// #define g_assert_not_reached() G_STMT_START{ }G_STMT_END
+
+
+// #define g_return_if_fail(expr) G_STMT_START{ }G_STMT_END
+// #define g_return_val_if_fail(expr,val) G_STMT_START{ }G_STMT_END
+// #define g_return_if_reached() G_STMT_START{ return; }G_STMT_END
+// #define g_return_val_if_reached(val) G_STMT_START{ return (val); }G_STMT_END
+
diff --git a/packages/gtk2/src/glib/gmodule.inc b/packages/gtk2/src/glib/gmodule.inc
new file mode 100644
index 0000000000..f0092f6363
--- /dev/null
+++ b/packages/gtk2/src/glib/gmodule.inc
@@ -0,0 +1,41 @@
+// included by glib2.pas
+
+ type
+
+ PGModule = pointer;
+ TGModuleFlags = Longint;
+
+
+ TGModuleCheckInit = function (module:PGModule):Pgchar;cdecl;
+ TGModuleUnload = procedure (module:PGModule);cdecl;
+
+
+ Const
+ G_MODULE_BIND_LAZY = 1 shl 0;
+ G_MODULE_BIND_MASK = 1;
+
+
+ function g_module_supported:gboolean;cdecl; external gmodulelib name 'g_module_supported';
+
+ function g_module_open(file_name:Pgchar;
+ flags:TGModuleFlags):PGModule;cdecl;external gmodulelib name 'g_module_open';
+
+ function g_module_close(module:PGModule):gboolean;cdecl;external gmodulelib name 'g_module_close';
+
+ procedure g_module_make_resident(module:PGModule);cdecl;external gmodulelib name 'g_module_make_resident';
+
+ function g_module_error: Pgchar;cdecl;external gmodulelib name 'g_module_error';
+
+ function g_module_symbol(module:PGModule;
+ symbol_name:Pgchar;
+ symbol:Pgpointer): gboolean;cdecl;external gmodulelib name 'g_module_symbol';
+
+ function g_module_name(module:PGModule):Pgchar;cdecl;external gmodulelib name 'g_module_name';
+
+ function g_module_build_path(directory:Pgchar;
+ module_name:Pgchar):Pgchar;cdecl;external gmodulelib name 'g_module_build_path';
+
+
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gnode.inc b/packages/gtk2/src/glib/gnode.inc
new file mode 100644
index 0000000000..879ec2a35e
--- /dev/null
+++ b/packages/gtk2/src/glib/gnode.inc
@@ -0,0 +1,134 @@
+{*
+ * gnode.inc
+ *
+ * depends on gmem.inc
+ *}
+
+
+ type
+ PGNode = ^TGNode;
+ TGNode = record
+ data : gpointer;
+ next : PGNode;
+ prev : PGNode;
+ parent : PGNode;
+ children : PGNode;
+ end;
+
+ { Tree traverse flags }
+
+ PGTraverseFlags = ^TGTraverseFlags;
+ TGTraverseFlags = gint;
+
+ const
+ G_TRAVERSE_LEAFS = 1 shl 0;
+ G_TRAVERSE_NON_LEAFS = 1 shl 1;
+ G_TRAVERSE_ALL = G_TRAVERSE_LEAFS or G_TRAVERSE_NON_LEAFS;
+ G_TRAVERSE_MASK = $03;
+
+ { Tree traverse orders }
+ type
+
+ PGTraverseType = ^TGTraverseType;
+ TGTraverseType = (G_IN_ORDER,
+ G_PRE_ORDER,
+ G_POST_ORDER,
+ G_LEVEL_ORDER);
+
+ TGNodeTraverseFunc = function (node:PGNode; data:gpointer):gboolean;cdecl;
+
+ TGNodeForeachFunc = procedure (node:PGNode; data:gpointer);cdecl;
+
+ { N-way tree implementation
+ }
+
+ function G_NODE_IS_ROOT (node: PGNode): boolean;
+
+ function G_NODE_IS_LEAF (node: PGNode): boolean;
+
+ procedure g_node_push_allocator(allocator:PGAllocator);cdecl;external gliblib name 'g_node_push_allocator';
+
+ procedure g_node_pop_allocator;cdecl;external gliblib name 'g_node_pop_allocator';
+
+ function g_node_new(data:gpointer):PGNode;cdecl;external gliblib name 'g_node_new';
+
+ procedure g_node_destroy(root:PGNode);cdecl;external gliblib name 'g_node_destroy';
+
+ procedure g_node_unlink(node:PGNode);cdecl;external gliblib name 'g_node_unlink';
+
+ function g_node_copy(node:PGNode):PGNode;cdecl;external gliblib name 'g_node_copy';
+
+ function g_node_insert(parent:PGNode; position:gint; node:PGNode):PGNode;cdecl;external gliblib name 'g_node_insert';
+
+ function g_node_insert_before(parent:PGNode; sibling:PGNode; node:PGNode):PGNode;cdecl;external gliblib name 'g_node_insert_before';
+
+ function g_node_insert_after(parent:PGNode; sibling:PGNode; node:PGNode):PGNode;cdecl;external gliblib name 'g_node_insert_after';
+
+ function g_node_prepend(parent:PGNode; node:PGNode):PGNode;cdecl;external gliblib name 'g_node_prepend';
+
+ function g_node_n_nodes(root:PGNode; flags:TGTraverseFlags):guint;cdecl;external gliblib name 'g_node_n_nodes';
+
+ function g_node_get_root(node:PGNode):PGNode;cdecl;external gliblib name 'g_node_get_root';
+
+ function g_node_is_ancestor(node:PGNode; descendant:PGNode):gboolean;cdecl;external gliblib name 'g_node_is_ancestor';
+
+ function g_node_depth(node:PGNode):guint;cdecl;external gliblib name 'g_node_depth';
+
+ function g_node_find(root:PGNode; order:TGTraverseType; flags:TGTraverseFlags; data:gpointer):PGNode;cdecl;external gliblib name 'g_node_find';
+
+ { convenience macros }
+ function g_node_append (parent: PGNode; node: PGNode): PGNode;
+
+ function g_node_insert_data (parent: PGNode; position: gint; data: gpointer): PGNode;
+
+ function g_node_insert_data_before (parent: PGNode; sibling: PGNode; data: gpointer): PGNode;
+
+ function g_node_prepend_data (parent: PGNode; data: gpointer): PGNode;
+
+ function g_node_append_data (parent: PGNode; data: gpointer): PGNode;
+
+ { traversal function, assumes that `node' is root
+ (only traverses `node' and its subtree).
+ this function is just a high level interface to
+ low level traversal functions, optimized for speed.
+ }
+ function g_node_traverse (root : PGNode;
+ order : TGTraverseType;
+ flags : TGTraverseFlags;
+ max_depth : gint;
+ func : TGNodeTraverseFunc;
+ data : gpointer):guint;cdecl;external gliblib name 'g_node_traverse';
+
+ { return the maximum tree height starting with `node', this is an expensive
+ operation, since we need to visit all nodes. this could be shortened by
+ adding `guint height' to struct _GNode, but then again, this is not very
+ often needed, and would make g_node_insert() more time consuming.
+ }
+ function g_node_max_height(root:PGNode):guint;cdecl;external gliblib name 'g_node_max_height';
+
+ procedure g_node_children_foreach(node:PGNode; flags:TGTraverseFlags; func:TGNodeForeachFunc; data:gpointer);cdecl;external gliblib name 'g_node_children_foreach';
+
+ procedure g_node_reverse_children(node:PGNode);cdecl;external gliblib name 'g_node_reverse_children';
+
+ function g_node_n_children(node:PGNode):guint;cdecl;external gliblib name 'g_node_n_children';
+
+ function g_node_nth_child(node:PGNode; n:guint):PGNode;cdecl;external gliblib name 'g_node_nth_child';
+
+ function g_node_last_child(node:PGNode):PGNode;cdecl;external gliblib name 'g_node_last_child';
+
+ function g_node_find_child(node:PGNode; flags:TGTraverseFlags; data:gpointer):PGNode;cdecl;external gliblib name 'g_node_find_child';
+
+ function g_node_child_position(node:PGNode; child:PGNode):gint;cdecl;external gliblib name 'g_node_child_position';
+
+ function g_node_child_index(node:PGNode; data:gpointer):gint;cdecl;external gliblib name 'g_node_child_index';
+
+ function g_node_first_sibling(node:PGNode):PGNode;cdecl;external gliblib name 'g_node_first_sibling';
+
+ function g_node_last_sibling(node:PGNode):PGNode;cdecl;external gliblib 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;
+
diff --git a/packages/gtk2/src/glib/gobject.inc b/packages/gtk2/src/glib/gobject.inc
new file mode 100644
index 0000000000..399b4dd8dd
--- /dev/null
+++ b/packages/gtk2/src/glib/gobject.inc
@@ -0,0 +1,136 @@
+// included by glib2.pas
+
+{ --- typedefs & structures --- }
+type
+{< private > }
+ PGObject = ^TGObject;
+ TGObject = record
+ g_type_instance : TGTypeInstance;
+ ref_count : guint;
+ qdata : PGData;
+ end;
+
+ TGObjectGetPropertyFunc = procedure (anObject:PGObject; property_id:guint; value:PGValue; pspec:PGParamSpec); cdecl;
+
+ TGObjectSetPropertyFunc = procedure (anObject:PGObject; property_id:guint; value:PGValue; pspec:PGParamSpec); cdecl;
+
+ TGObjectFinalizeFunc = procedure (anObject:PGObject); cdecl;
+
+ TGWeakNotify = procedure (data:gpointer; where_the_object_was:PGObject); cdecl;
+
+{< private > }
+ PGObjectConstructParam = ^TGObjectConstructParam;
+
+{ public overridable methods }
+{ seldomly overidden }
+{ signals }
+{ padding }
+ PGObjectClass = ^TGObjectClass;
+ TGObjectClass = record
+ g_type_class : TGTypeClass;
+ construct_properties : PGSList;
+ _constructor : function (_type:GType; n_construct_properties:guint; construct_properties:PGObjectConstructParam):PGObject; cdecl;
+ set_property : procedure (anObject:PGObject; property_id:guint; value:PGValue; pspec:PGParamSpec); cdecl;
+ get_property : procedure (anObject:PGObject; property_id:guint; value:PGValue; pspec:PGParamSpec); cdecl;
+ _dispose : procedure (anObject:PGObject); cdecl;
+ finalize : procedure (anObject:PGObject); cdecl;
+ dispatch_properties_changed : procedure (anObject:PGObject; n_pspecs:guint; pspecs:PPGParamSpec); cdecl;
+ notify : procedure (anObject:PGObject; pspec:PGParamSpec); cdecl;
+ pdummy : array[0..7] of gpointer;
+ end;
+
+ TGObjectConstructParam = record
+ pspec : PGParamSpec;
+ value : PGValue;
+ end;
+
+{ --- type macros --- }
+
+function G_TYPE_IS_OBJECT(_type : GType) : boolean;
+function G_OBJECT(anObject: pointer) : PGObject;
+function G_OBJECT_CLASS(_class : Pointer) : PGObjectClass;
+function G_IS_OBJECT(anObject: pointer) : boolean;
+function G_IS_OBJECT_CLASS(_class : Pointer) : boolean;
+function G_OBJECT_GET_CLASS(anObject: pointer) : PGObjectClass;
+function G_OBJECT_TYPE(anObject: pointer) : GType;
+function G_OBJECT_TYPE_NAME(anObject: pointer) : Pgchar;
+function G_OBJECT_CLASS_TYPE(_class : Pointer) : GType;
+function G_OBJECT_CLASS_NAME(_class : Pointer) : Pgchar;
+function G_VALUE_HOLDS_OBJECT(value : Pointer) : boolean;
+
+
+{ --- prototypes --- }
+
+procedure g_object_class_install_property(oclass:PGObjectClass; property_id:guint; pspec:PGParamSpec); cdecl; external gobjectlib;
+function g_object_class_find_property(oclass:PGObjectClass; property_name:Pgchar):PGParamSpec; cdecl; external gobjectlib;
+function g_object_class_list_properties(oclass:PGObjectClass; n_properties:Pguint):PPGParamSpec; cdecl; external gobjectlib;
+{$IFNDEF KYLIX}
+function g_object_new(object_type:GType; first_property_name:Pgchar; args:array of const):gpointer; cdecl; overload; external gobjectlib;
+function g_object_new(object_type:GType; first_property_name:Pgchar):gpointer; cdecl; overload; varargs; external gobjectlib;
+function g_object_newv(object_type:GType; n_parameters:guint; parameters:PGParameter):gpointer; cdecl; external gobjectlib;
+function g_object_new_valist(object_type:GType; first_property_name:Pgchar; var_args: array of const):PGObject; cdecl; external gobjectlib;
+procedure g_object_set(anObject:gpointer; first_property_name:Pgchar; args:array of const); cdecl; overload; external gobjectlib;
+procedure g_object_set(anObject:gpointer; first_property_name:Pgchar); cdecl; overload; varargs; external gobjectlib;
+procedure g_object_get(anObject:gpointer; first_property_name:Pgchar; args:array of const); cdecl; overload; external gobjectlib;
+procedure g_object_get(anObject:gpointer; first_property_name:Pgchar); cdecl; overload; varargs; external gobjectlib;
+function g_object_connect(anObject:gpointer; signal_spec:Pgchar; args:array of const):gpointer; cdecl; overload; external gobjectlib;
+function g_object_connect(anObject:gpointer; signal_spec:Pgchar):gpointer; cdecl; overload; varargs; external gobjectlib;
+procedure g_object_disconnect(anObject:gpointer; signal_spec:Pgchar; args:array of const); cdecl; overload; external gobjectlib;
+procedure g_object_disconnect(anObject:gpointer; signal_spec:Pgchar); cdecl; overload; varargs; external gobjectlib;
+procedure g_object_set_valist(anObject:PGObject; first_property_name:Pgchar; var_args: array of const); cdecl; external gobjectlib;
+procedure g_object_get_valist(anObject:PGObject; first_property_name:Pgchar; var_args: array of const); cdecl; external gobjectlib;
+{$ELSE}
+function g_object_new(object_type:GType; first_property_name:Pgchar):gpointer; varargs; cdecl; external gobjectlib;
+function g_object_newv(object_type:GType; n_parameters:guint; parameters:PGParameter):gpointer; varargs; cdecl; external gobjectlib;
+function g_object_new_valist(object_type:GType; first_property_name:Pgchar):PGObject; varargs; cdecl; external gobjectlib;
+procedure g_object_set(anObject:gpointer; first_property_name:Pgchar); varargs; cdecl; external gobjectlib;
+procedure g_object_get(anObject:gpointer; first_property_name:Pgchar); varargs; cdecl; external gobjectlib;
+function g_object_connect(anObject:gpointer; signal_spec:Pgchar):gpointer; varargs; cdecl; external gobjectlib;
+procedure g_object_disconnect(anObject:gpointer; signal_spec:Pgchar); varargs; cdecl; external gobjectlib;
+procedure g_object_set_valist(anObject:PGObject; first_property_name:Pgchar); varargs; cdecl; external gobjectlib;
+procedure g_object_get_valist(anObject:PGObject; first_property_name:Pgchar); varargs; cdecl; external gobjectlib;
+{$ENDIF}
+procedure g_object_set_property(anObject:PGObject; property_name:Pgchar; value:PGValue); cdecl; external gobjectlib;
+procedure g_object_get_property(anObject:PGObject; property_name:Pgchar; value:PGValue); cdecl; external gobjectlib;
+procedure g_object_freeze_notify(anObject:PGObject); cdecl; external gobjectlib;
+procedure g_object_notify(anObject:PGObject; property_name:Pgchar); cdecl; external gobjectlib;
+procedure g_object_thaw_notify(anObject:PGObject); cdecl; external gobjectlib;
+function g_object_ref(anObject:gpointer):gpointer; cdecl; external gobjectlib;
+procedure g_object_unref(anObject:gpointer); cdecl; external gobjectlib;
+procedure g_object_weak_ref(anObject:PGObject; notify:TGWeakNotify; data:gpointer); cdecl; external gobjectlib;
+procedure g_object_weak_unref(anObject:PGObject; notify:TGWeakNotify; data:gpointer); cdecl; external gobjectlib;
+procedure g_object_add_weak_pointer(anObject:PGObject; weak_pointer_location:Pgpointer); cdecl; external gobjectlib;
+procedure g_object_remove_weak_pointer(anObject:PGObject; weak_pointer_location:Pgpointer); cdecl; external gobjectlib;
+function g_object_get_qdata(anObject:PGObject; quark:TGQuark):gpointer; cdecl; external gobjectlib;
+procedure g_object_set_qdata(anObject:PGObject; quark:TGQuark; data:gpointer); cdecl; external gobjectlib;
+procedure g_object_set_qdata_full(anObject:PGObject; quark:TGQuark; data:gpointer; destroy:TGDestroyNotify); cdecl; external gobjectlib;
+function g_object_steal_qdata(anObject:PGObject; quark:TGQuark):gpointer; cdecl; external gobjectlib;
+function g_object_get_data(anObject:PGObject; key:Pgchar):gpointer; cdecl; external gobjectlib;
+procedure g_object_set_data(anObject:PGObject; key:Pgchar; data:gpointer); cdecl; external gobjectlib;
+procedure g_object_set_data_full(anObject:PGObject; key:Pgchar; data:gpointer; destroy:TGDestroyNotify); cdecl; external gobjectlib;
+function g_object_steal_data(anObject:PGObject; key:Pgchar):gpointer; cdecl; external gobjectlib;
+procedure g_object_watch_closure(anObject:PGObject; closure:PGClosure); cdecl; external gobjectlib;
+function g_cclosure_new_object(callback_func:TGCallback; anObject:PGObject):PGClosure; cdecl; external gobjectlib;
+function g_cclosure_new_object_swap(callback_func:TGCallback; anObject:PGObject):PGClosure; cdecl; external gobjectlib;
+function g_closure_new_object(sizeof_closure:guint; anObject:PGObject):PGClosure; cdecl; external gobjectlib;
+procedure g_value_set_object(value:PGValue; v_object:gpointer); cdecl; external gobjectlib;
+function g_value_get_object(value:PGValue):gpointer; cdecl; external gobjectlib;
+function g_value_dup_object(value:PGValue):PGObject; cdecl; external gobjectlib;
+function g_signal_connect_object(instance:gpointer; detailed_signal:Pgchar; c_handler:TGCallback; gobject:gpointer; connect_flags:TGConnectFlags):gulong; cdecl; external gobjectlib;
+{< protected > }
+procedure g_object_run_dispose(anObject:PGObject); cdecl; external gobjectlib;
+{ --- marshaller specific --- }
+procedure g_value_set_object_take_ownership(value:PGValue; v_object:gpointer); cdecl; external gobjectlib;
+
+
+{ --- implementation macros --- }
+procedure G_OBJECT_WARN_INVALID_PSPEC(anObject: gpointer; pname: PGChar;
+ property_id: gint; pspec: gpointer);
+procedure G_OBJECT_WARN_INVALID_PROPERTY_ID(anObject: gpointer;
+ property_id: gint; pspec : gpointer);
+
+type
+ G_FLAGS_TYPE = GType;
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gparam.inc b/packages/gtk2/src/glib/gparam.inc
new file mode 100644
index 0000000000..8b5f45a972
--- /dev/null
+++ b/packages/gtk2/src/glib/gparam.inc
@@ -0,0 +1,160 @@
+// included by glib2.pas
+
+{$IFDEF read_forward_definitions}
+{ --- flags --- }
+ PGParamFlags = ^TGParamFlags;
+ TGParamFlags = longint;
+
+{ --- typedefs & structures --- }
+{ class using this property }
+{< private > }
+{ sort-criteria }
+ PGParamSpec = ^TGParamSpec;
+ PPGParamSpec = ^PGParamSpec;
+ TGParamSpec = record
+ g_type_instance : TGTypeInstance;
+ name : Pgchar;
+ flags : TGParamFlags;
+ value_type : GType;
+ owner_type : GType;
+ _nick : Pgchar;
+ _blurb : Pgchar;
+ qdata : PGData;
+ ref_count : guint;
+ param_id : guint;
+ end;
+
+{ GParam methods }
+ PGParamSpecClass = ^TGParamSpecClass;
+ TGParamSpecClass = record
+ g_type_class : TGTypeClass;
+ value_type : GType;
+ finalize : procedure (pspec:PGParamSpec); cdecl;
+ value_set_default : procedure (pspec:PGParamSpec; value:PGValue); cdecl;
+ value_validate : function (pspec:PGParamSpec; value:PGValue):gboolean; cdecl;
+ values_cmp : function (pspec:PGParamSpec; value1:PGValue; value2:PGValue):gint; cdecl;
+ dummy : array[0..3] of gpointer;
+ end;
+
+{ auxillary structure for _setv() variants }
+ PGParameter = ^TGParameter;
+ TGParameter = record
+ name : Pgchar;
+ value : TGValue;
+ end;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+{ --- standard type macros --- }
+
+function G_TYPE_IS_PARAM(_type : GType) : boolean;
+function G_PARAM_SPEC(pspec : Pointer) : PGParamSpec;
+function G_IS_PARAM_SPEC(pspec : Pointer) : boolean;
+function G_PARAM_SPEC_CLASS(pclass : Pointer) : PGParamSpecClass;
+function G_IS_PARAM_SPEC_CLASS(pclass : Pointer) : boolean;
+function G_PARAM_SPEC_GET_CLASS(pspec : Pointer) : PGParamSpecClass;
+
+{ --- convenience macros --- }
+function G_PARAM_SPEC_TYPE(pspec : Pointer) : GType;
+function G_PARAM_SPEC_TYPE_NAME(pspec : Pointer) : PGChar;
+function G_PARAM_SPEC_VALUE_TYPE(pspec : Pointer) : GType;
+function G_VALUE_HOLDS_PARAM(value : Pointer) : boolean;
+
+const
+ G_PARAM_READABLE = 1 shl 0;
+ G_PARAM_WRITABLE = 1 shl 1;
+ G_PARAM_CONSTRUCT = 1 shl 2;
+ G_PARAM_CONSTRUCT_ONLY = 1 shl 3;
+ G_PARAM_LAX_VALIDATION = 1 shl 4;
+ G_PARAM_PRIVATE = 1 shl 5;
+ G_PARAM_READWRITE = G_PARAM_READABLE or G_PARAM_WRITABLE;
+ G_PARAM_MASK = $000000ff;
+
+{ bits in the range 0xffffff00 are reserved for 3rd party usage }
+ G_PARAM_USER_SHIFT = 8;
+
+
+
+{ --- prototypes --- }
+
+function g_param_spec_ref(pspec:PGParamSpec):PGParamSpec; cdecl; external gliblib;
+procedure g_param_spec_unref(pspec:PGParamSpec); cdecl; external gliblib;
+procedure g_param_spec_sink(pspec:PGParamSpec); cdecl; external gliblib;
+function g_param_spec_get_qdata(pspec:PGParamSpec; quark:TGQuark):gpointer; cdecl; external gliblib;
+procedure g_param_spec_set_qdata(pspec:PGParamSpec; quark:TGQuark; data:gpointer); cdecl; external gliblib;
+procedure g_param_spec_set_qdata_full(pspec:PGParamSpec; quark:TGQuark; data:gpointer; destroy:TGDestroyNotify); cdecl; external gliblib;
+function g_param_spec_steal_qdata(pspec:PGParamSpec; quark:TGQuark):gpointer; cdecl; external gliblib;
+procedure g_param_value_set_default(pspec:PGParamSpec; value:PGValue); cdecl; external gliblib;
+function g_param_value_defaults(pspec:PGParamSpec; value:PGValue):gboolean; cdecl; external gliblib;
+function g_param_value_validate(pspec:PGParamSpec; value:PGValue):gboolean; cdecl; external gliblib;
+function g_param_value_convert(pspec:PGParamSpec; src_value:PGValue; dest_value:PGValue; strict_validation:gboolean):gboolean; cdecl; external gliblib;
+function g_param_values_cmp(pspec:PGParamSpec; value1:PGValue; value2:PGValue):gint; cdecl; external gliblib;
+function g_param_spec_get_name(pspec:PGParamSpec):Pgchar; cdecl; external gliblib;
+function g_param_spec_get_nick(pspec:PGParamSpec):Pgchar; cdecl; external gliblib;
+function g_param_spec_get_blurb(pspec:PGParamSpec):Pgchar; cdecl; external gliblib;
+procedure g_value_set_param(value:PGValue; param:PGParamSpec); cdecl; external gliblib;
+function g_value_get_param(value:PGValue):PGParamSpec; cdecl; external gliblib;
+function g_value_dup_param(value:PGValue):PGParamSpec; cdecl; external gliblib;
+{ --- marshaller specific --- }
+procedure g_value_set_param_take_ownership(value:PGValue; param:PGParamSpec); cdecl; external gliblib;
+{ --- convenience functions --- }
+
+
+type
+{ type system portion }
+{ obligatory }
+{ optional }
+{ optional }
+{ class portion }
+{ obligatory }
+{ optional }
+{ recommended }
+{ optional }
+{ recommended }
+ PGParamSpecTypeInfo = ^TGParamSpecTypeInfo;
+ TGParamSpecTypeInfo = record
+ instance_size : guint16;
+ n_preallocs : guint16;
+ instance_init : procedure (pspec:PGParamSpec); cdecl;
+ value_type : GType;
+ finalize : procedure (pspec:PGParamSpec); cdecl;
+ value_set_default : procedure (pspec:PGParamSpec; value:PGValue); cdecl;
+ value_validate : function (pspec:PGParamSpec; value:PGValue):gboolean; cdecl;
+ values_cmp : function (pspec:PGParamSpec; value1:PGValue; value2:PGValue):gint; cdecl;
+ end;
+
+
+function g_param_type_register_static(name:Pgchar; pspec_info:PGParamSpecTypeInfo):GType; cdecl; external gliblib;
+{ For registering builting types }
+function _g_param_type_register_static_constant(name:Pgchar; pspec_info:PGParamSpecTypeInfo; opt_type:GType):GType; cdecl; external gliblib;
+{ --- protected --- }
+function g_param_spec_internal(param_type:GType; name:Pgchar; nick:Pgchar; blurb:Pgchar; flags:TGParamFlags):gpointer; cdecl; external gliblib;
+function g_param_spec_pool_new(type_prefixing:gboolean):PGParamSpecPool; cdecl; external gliblib;
+procedure g_param_spec_pool_insert(pool:PGParamSpecPool; pspec:PGParamSpec; owner_type:GType); cdecl; external gliblib;
+procedure g_param_spec_pool_remove(pool:PGParamSpecPool; pspec:PGParamSpec); cdecl; external gliblib;
+function g_param_spec_pool_lookup(pool:PGParamSpecPool; param_name:Pgchar; owner_type:GType; walk_ancestors:gboolean):PGParamSpec; cdecl; external gliblib;
+function g_param_spec_pool_list_owned(pool:PGParamSpecPool; owner_type:GType):PGList; cdecl; external gliblib;
+function g_param_spec_pool_list(pool:PGParamSpecPool; owner_type:GType; n_pspecs_p:Pguint):PPGParamSpec; cdecl; external gliblib;
+
+{ contracts:
+
+ gboolean value_validate (GParamSpec pspec,
+ GValue value):
+ modify value contents in the least destructive way, so
+ that it complies with pspec's requirements (i.e.
+ according to minimum/maximum ranges etc...). return
+ whether modification was necessary.
+
+ gint values_cmp (GParamSpec pspec,
+ const GValue value1,
+ const GValue value2):
+ return value1 - value2, i.e. (-1) if value1 < value2,
+ (+1) if value1 > value2, and (0) otherwise (equality)
+ }
+{$ENDIF read_interface_rest}
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gparamspecs.inc b/packages/gtk2/src/glib/gparamspecs.inc
new file mode 100644
index 0000000000..928cc82862
--- /dev/null
+++ b/packages/gtk2/src/glib/gparamspecs.inc
@@ -0,0 +1,979 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ GObject - GLib Type, Object, Parameter and Signal Library
+ Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+
+ gparamspecs.h: GLib default param specs
+ }
+{$if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)}
+{$error "Only <glib-anObject.h> can be included directly."}
+{$endif}
+{$ifndef __G_PARAMSPECS_H__}
+{$define __G_PARAMSPECS_H__}
+{$include <gobject/gvalue.inc}
+{$include <gobject/genums.inc}
+{$include <gobject/gboxed.inc}
+{$include <gobject/gobject.inc}
+{ --- type macros --- }
+function G_TYPE_PARAM_CHAR : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_CHAR(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_CHAR(pspec : longint) : longint;
+function G_TYPE_PARAM_UCHAR : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_UCHAR(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_UCHAR(pspec : longint) : longint;
+function G_TYPE_PARAM_BOOLEAN : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_BOOLEAN(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_BOOLEAN(pspec : longint) : longint;
+function G_TYPE_PARAM_INT : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_INT(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_INT(pspec : longint) : longint;
+function G_TYPE_PARAM_UINT : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_UINT(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_UINT(pspec : longint) : longint;
+function G_TYPE_PARAM_LONG : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_LONG(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_LONG(pspec : longint) : longint;
+function G_TYPE_PARAM_ULONG : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_ULONG(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_ULONG(pspec : longint) : longint;
+function G_TYPE_PARAM_INT64 : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_INT64(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_INT64(pspec : longint) : longint;
+function G_TYPE_PARAM_UINT64 : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_UINT64(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_UINT64(pspec : longint) : longint;
+function G_TYPE_PARAM_UNICHAR : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_UNICHAR(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_UNICHAR(pspec : longint) : longint;
+function G_TYPE_PARAM_ENUM : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_ENUM(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_ENUM(pspec : longint) : longint;
+function G_TYPE_PARAM_FLAGS : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_FLAGS(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_FLAGS(pspec : longint) : longint;
+function G_TYPE_PARAM_FLOAT : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_FLOAT(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_FLOAT(pspec : longint) : longint;
+function G_TYPE_PARAM_DOUBLE : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_DOUBLE(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_DOUBLE(pspec : longint) : longint;
+function G_TYPE_PARAM_STRING : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_STRING(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_STRING(pspec : longint) : longint;
+function G_TYPE_PARAM_PARAM : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_PARAM(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_PARAM(pspec : longint) : longint;
+function G_TYPE_PARAM_BOXED : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_BOXED(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_BOXED(pspec : longint) : longint;
+function G_TYPE_PARAM_POINTER : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_POINTER(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_POINTER(pspec : longint) : longint;
+function G_TYPE_PARAM_VALUE_ARRAY : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_VALUE_ARRAY(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_VALUE_ARRAY(pspec : longint) : longint;
+function G_TYPE_PARAM_OBJECT : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_OBJECT(pspec : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_OBJECT(pspec : longint) : longint;
+
+{ --- typedefs & structures --- }
+type
+ PGParamSpecChar = ^TGParamSpecChar;
+ TGParamSpecChar = record
+ parent_instance : TGParamSpec;
+ minimum : gint8;
+ maximum : gint8;
+ default_value : gint8;
+ end;
+
+ PGParamSpecUChar = ^TGParamSpecUChar;
+ TGParamSpecUChar = record
+ parent_instance : TGParamSpec;
+ minimum : guint8;
+ maximum : guint8;
+ default_value : guint8;
+ end;
+
+ PGParamSpecBoolean = ^TGParamSpecBoolean;
+ TGParamSpecBoolean = record
+ parent_instance : TGParamSpec;
+ default_value : gboolean;
+ end;
+
+ PGParamSpecInt = ^TGParamSpecInt;
+ TGParamSpecInt = record
+ parent_instance : TGParamSpec;
+ minimum : gint;
+ maximum : gint;
+ default_value : gint;
+ end;
+
+ PGParamSpecUInt = ^TGParamSpecUInt;
+ TGParamSpecUInt = record
+ parent_instance : TGParamSpec;
+ minimum : guint;
+ maximum : guint;
+ default_value : guint;
+ end;
+
+ PGParamSpecLong = ^TGParamSpecLong;
+ TGParamSpecLong = record
+ parent_instance : TGParamSpec;
+ minimum : glong;
+ maximum : glong;
+ default_value : glong;
+ end;
+
+ PGParamSpecULong = ^TGParamSpecULong;
+ TGParamSpecULong = record
+ parent_instance : TGParamSpec;
+ minimum : gulong;
+ maximum : gulong;
+ default_value : gulong;
+ end;
+
+ PGParamSpecInt64 = ^TGParamSpecInt64;
+ TGParamSpecInt64 = record
+ parent_instance : TGParamSpec;
+ minimum : Tgint64;
+ maximum : Tgint64;
+ default_value : Tgint64;
+ end;
+
+ PGParamSpecUInt64 = ^TGParamSpecUInt64;
+ TGParamSpecUInt64 = record
+ parent_instance : TGParamSpec;
+ minimum : Tguint64;
+ maximum : Tguint64;
+ default_value : Tguint64;
+ end;
+
+ PGParamSpecUnichar = ^TGParamSpecUnichar;
+ TGParamSpecUnichar = record
+ parent_instance : TGParamSpec;
+ default_value : gunichar;
+ end;
+
+ PGParamSpecEnum = ^TGParamSpecEnum;
+ TGParamSpecEnum = record
+ parent_instance : TGParamSpec;
+ enum_class : PGEnumClass;
+ default_value : gint;
+ end;
+
+ PGParamSpecFlags = ^TGParamSpecFlags;
+ TGParamSpecFlags = record
+ parent_instance : TGParamSpec;
+ flags_class : PGFlagsClass;
+ default_value : guint;
+ end;
+
+ PGParamSpecFloat = ^TGParamSpecFloat;
+ TGParamSpecFloat = record
+ parent_instance : TGParamSpec;
+ minimum : gfloat;
+ maximum : gfloat;
+ default_value : gfloat;
+ epsilon : gfloat;
+ end;
+
+ PGParamSpecDouble = ^TGParamSpecDouble;
+ TGParamSpecDouble = record
+ parent_instance : TGParamSpec;
+ minimum : gdouble;
+ maximum : gdouble;
+ default_value : gdouble;
+ epsilon : gdouble;
+ end;
+
+ PGParamSpecString = ^TGParamSpecString;
+ TGParamSpecString = record
+ parent_instance : TGParamSpec;
+ default_value : Pgchar;
+ cset_first : Pgchar;
+ cset_nth : Pgchar;
+ substitutor : gchar;
+ flag0 : word;
+ end;
+
+const
+ bm_TGParamSpecString_null_fold_if_empty = $1;
+ bp_TGParamSpecString_null_fold_if_empty = 0;
+ bm_TGParamSpecString_ensure_non_null = $2;
+ bp_TGParamSpecString_ensure_non_null = 1;
+function null_fold_if_empty(var a : TGParamSpecString) : guint;
+procedure set_null_fold_if_empty(var a : TGParamSpecString; __null_fold_if_empty : guint);
+function ensure_non_null(var a : TGParamSpecString) : guint;
+procedure set_ensure_non_null(var a : TGParamSpecString; __ensure_non_null : guint);
+type
+ PGParamSpecParam = ^TGParamSpecParam;
+ TGParamSpecParam = record
+ parent_instance : TGParamSpec;
+ end;
+
+ PGParamSpecBoxed = ^TGParamSpecBoxed;
+ TGParamSpecBoxed = record
+ parent_instance : TGParamSpec;
+ end;
+
+ PGParamSpecPointer = ^TGParamSpecPointer;
+ TGParamSpecPointer = record
+ parent_instance : TGParamSpec;
+ end;
+
+ PGParamSpecValueArray = ^TGParamSpecValueArray;
+ TGParamSpecValueArray = record
+ parent_instance : TGParamSpec;
+ element_spec : PGParamSpec;
+ fixed_n_elements : guint;
+ end;
+
+ PGParamSpecObject = ^TGParamSpecObject;
+ TGParamSpecObject = record
+ parent_instance : TGParamSpec;
+ end;
+
+{ --- GParamSpec prototypes --- }
+
+
+
+
+function g_param_spec_char(name:Pgchar; nick:Pgchar; blurb:Pgchar; minimum:gint8; maximum:gint8;
+ default_value:gint8; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_uchar(name:Pgchar; nick:Pgchar; blurb:Pgchar; minimum:guint8; maximum:guint8;
+ default_value:guint8; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_boolean(name:Pgchar; nick:Pgchar; blurb:Pgchar; default_value:gboolean; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_int(name:Pgchar; nick:Pgchar; blurb:Pgchar; minimum:gint; maximum:gint;
+ default_value:gint; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_uint(name:Pgchar; nick:Pgchar; blurb:Pgchar; minimum:guint; maximum:guint;
+ default_value:guint; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_long(name:Pgchar; nick:Pgchar; blurb:Pgchar; minimum:glong; maximum:glong;
+ default_value:glong; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_ulong(name:Pgchar; nick:Pgchar; blurb:Pgchar; minimum:gulong; maximum:gulong;
+ default_value:gulong; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_int64(name:Pgchar; nick:Pgchar; blurb:Pgchar; minimum:Tgint64; maximum:Tgint64;
+ default_value:Tgint64; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_uint64(name:Pgchar; nick:Pgchar; blurb:Pgchar; minimum:Tguint64; maximum:Tguint64;
+ default_value:Tguint64; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_unichar(name:Pgchar; nick:Pgchar; blurb:Pgchar; default_value:gunichar; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_enum(name:Pgchar; nick:Pgchar; blurb:Pgchar; enum_type:GType; default_value:gint;
+ flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_flags(name:Pgchar; nick:Pgchar; blurb:Pgchar; flags_type:GType; default_value:guint;
+ flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_float(name:Pgchar; nick:Pgchar; blurb:Pgchar; minimum:gfloat; maximum:gfloat;
+ default_value:gfloat; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_double(name:Pgchar; nick:Pgchar; blurb:Pgchar; minimum:gdouble; maximum:gdouble;
+ default_value:gdouble; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+
+function g_param_spec_string(name:Pgchar; nick:Pgchar; blurb:Pgchar; default_value:Pgchar; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_param(name:Pgchar; nick:Pgchar; blurb:Pgchar; param_type:GType; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_boxed(name:Pgchar; nick:Pgchar; blurb:Pgchar; boxed_type:GType; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_pointer(name:Pgchar; nick:Pgchar; blurb:Pgchar; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_value_array(name:Pgchar; nick:Pgchar; blurb:Pgchar; element_spec:PGParamSpec; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+
+
+
+function g_param_spec_object(name:Pgchar; nick:Pgchar; blurb:Pgchar; object_type:GType; flags:TGParamFlags):PGParamSpec; cdecl; external gliblib;
+ var
+ g_param_spec_types : PGType;cvar;public;
+{$endif}
+{ __G_PARAMSPECS_H__ }
+function G_TYPE_PARAM_CHAR : longint;
+begin
+ G_TYPE_PARAM_CHAR:=g_param_spec_types[0];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_CHAR(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_CHAR:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_CHAR);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_CHAR(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_CHAR:=PGParamSpecChar(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_CHAR));
+end;
+
+function G_TYPE_PARAM_UCHAR : longint;
+begin
+ G_TYPE_PARAM_UCHAR:=g_param_spec_types[1];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_UCHAR(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_UCHAR:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_UCHAR);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_UCHAR(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_UCHAR:=PGParamSpecUChar(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_UCHAR));
+end;
+
+function G_TYPE_PARAM_BOOLEAN : longint;
+begin
+ G_TYPE_PARAM_BOOLEAN:=g_param_spec_types[2];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_BOOLEAN(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_BOOLEAN:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_BOOLEAN);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_BOOLEAN(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_BOOLEAN:=PGParamSpecBoolean(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_BOOLEAN));
+end;
+
+function G_TYPE_PARAM_INT : longint;
+begin
+ G_TYPE_PARAM_INT:=g_param_spec_types[3];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_INT(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_INT:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_INT);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_INT(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_INT:=PGParamSpecInt(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_INT));
+end;
+
+function G_TYPE_PARAM_UINT : longint;
+begin
+ G_TYPE_PARAM_UINT:=g_param_spec_types[4];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_UINT(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_UINT:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_UINT);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_UINT(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_UINT:=PGParamSpecUInt(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_UINT));
+end;
+
+function G_TYPE_PARAM_LONG : longint;
+begin
+ G_TYPE_PARAM_LONG:=g_param_spec_types[5];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_LONG(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_LONG:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_LONG);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_LONG(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_LONG:=PGParamSpecLong(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_LONG));
+end;
+
+function G_TYPE_PARAM_ULONG : longint;
+begin
+ G_TYPE_PARAM_ULONG:=g_param_spec_types[6];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_ULONG(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_ULONG:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_ULONG);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_ULONG(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_ULONG:=PGParamSpecULong(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_ULONG));
+end;
+
+function G_TYPE_PARAM_INT64 : longint;
+begin
+ G_TYPE_PARAM_INT64:=g_param_spec_types[7];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_INT64(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_INT64:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_INT64);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_INT64(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_INT64:=PGParamSpecInt64(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_INT64));
+end;
+
+function G_TYPE_PARAM_UINT64 : longint;
+begin
+ G_TYPE_PARAM_UINT64:=g_param_spec_types[8];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_UINT64(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_UINT64:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_UINT64);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_UINT64(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_UINT64:=PGParamSpecUInt64(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_UINT64));
+end;
+
+function G_TYPE_PARAM_UNICHAR : longint;
+begin
+ G_TYPE_PARAM_UNICHAR:=g_param_spec_types[9];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_UNICHAR(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_UNICHAR:=PGParamSpecUnichar(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_UNICHAR));
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_UNICHAR(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_UNICHAR:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_UNICHAR);
+end;
+
+function G_TYPE_PARAM_ENUM : longint;
+begin
+ G_TYPE_PARAM_ENUM:=g_param_spec_types[10];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_ENUM(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_ENUM:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_ENUM);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_ENUM(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_ENUM:=PGParamSpecEnum(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_ENUM));
+end;
+
+function G_TYPE_PARAM_FLAGS : longint;
+begin
+ G_TYPE_PARAM_FLAGS:=g_param_spec_types[11];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_FLAGS(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_FLAGS:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_FLAGS);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_FLAGS(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_FLAGS:=PGParamSpecFlags(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_FLAGS));
+end;
+
+function G_TYPE_PARAM_FLOAT : longint;
+begin
+ G_TYPE_PARAM_FLOAT:=g_param_spec_types[12];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_FLOAT(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_FLOAT:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_FLOAT);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_FLOAT(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_FLOAT:=PGParamSpecFloat(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_FLOAT));
+end;
+
+function G_TYPE_PARAM_DOUBLE : longint;
+begin
+ G_TYPE_PARAM_DOUBLE:=g_param_spec_types[13];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_DOUBLE(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_DOUBLE:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_DOUBLE);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_DOUBLE(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_DOUBLE:=PGParamSpecDouble(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_DOUBLE));
+end;
+
+function G_TYPE_PARAM_STRING : longint;
+begin
+ G_TYPE_PARAM_STRING:=g_param_spec_types[14];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_STRING(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_STRING:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_STRING);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_STRING(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_STRING:=PGParamSpecString(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_STRING));
+end;
+
+function G_TYPE_PARAM_PARAM : longint;
+begin
+ G_TYPE_PARAM_PARAM:=g_param_spec_types[15];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_PARAM(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_PARAM:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_PARAM);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_PARAM(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_PARAM:=PGParamSpecParam(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_PARAM));
+end;
+
+function G_TYPE_PARAM_BOXED : longint;
+begin
+ G_TYPE_PARAM_BOXED:=g_param_spec_types[16];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_BOXED(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_BOXED:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_BOXED);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_BOXED(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_BOXED:=PGParamSpecBoxed(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_BOXED));
+end;
+
+function G_TYPE_PARAM_POINTER : longint;
+begin
+ G_TYPE_PARAM_POINTER:=g_param_spec_types[17];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_POINTER(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_POINTER:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_POINTER);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_POINTER(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_POINTER:=PGParamSpecPointer(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_POINTER));
+end;
+
+function G_TYPE_PARAM_VALUE_ARRAY : longint;
+begin
+ G_TYPE_PARAM_VALUE_ARRAY:=g_param_spec_types[18];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_VALUE_ARRAY(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_VALUE_ARRAY:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_VALUE_ARRAY);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_VALUE_ARRAY(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_VALUE_ARRAY:=PGParamSpecValueArray(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_VALUE_ARRAY));
+end;
+
+function G_TYPE_PARAM_OBJECT : longint;
+begin
+ G_TYPE_PARAM_OBJECT:=g_param_spec_types[19];
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_PARAM_SPEC_OBJECT(pspec : longint) : longint;
+begin
+ G_IS_PARAM_SPEC_OBJECT:=G_TYPE_CHECK_INSTANCE_TYPE(pspec,G_TYPE_PARAM_OBJECT);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_PARAM_SPEC_OBJECT(pspec : longint) : longint;
+begin
+ G_PARAM_SPEC_OBJECT:=PGParamSpecObject(G_TYPE_CHECK_INSTANCE_CAST(pspec,G_TYPE_PARAM_OBJECT));
+end;
+
+function null_fold_if_empty(var a : TGParamSpecString) : guint;
+begin
+ null_fold_if_empty:=(a.flag0 and bm_TGParamSpecString_null_fold_if_empty) shr bp_TGParamSpecString_null_fold_if_empty;
+end;
+
+procedure set_null_fold_if_empty(var a : TGParamSpecString; __null_fold_if_empty : guint);
+begin
+ a.flag0:=a.flag0 or ((__null_fold_if_empty shl bp_TGParamSpecString_null_fold_if_empty) and bm_TGParamSpecString_null_fold_if_empty);
+end;
+
+function ensure_non_null(var a : TGParamSpecString) : guint;
+begin
+ ensure_non_null:=(a.flag0 and bm_TGParamSpecString_ensure_non_null) shr bp_TGParamSpecString_ensure_non_null;
+end;
+
+procedure set_ensure_non_null(var a : TGParamSpecString; __ensure_non_null : guint);
+begin
+ a.flag0:=a.flag0 or ((__ensure_non_null shl bp_TGParamSpecString_ensure_non_null) and bm_TGParamSpecString_ensure_non_null);
+end;
+
+
diff --git a/packages/gtk2/src/glib/gpattern.inc b/packages/gtk2/src/glib/gpattern.inc
new file mode 100644
index 0000000000..23ba590dd1
--- /dev/null
+++ b/packages/gtk2/src/glib/gpattern.inc
@@ -0,0 +1,26 @@
+{*
+ * gpattern.inc
+ *
+ * depends on gtypes.inc
+ *}
+
+
+
+ type
+ PGPatternSpec = pointer;
+
+
+ function g_pattern_spec_new(pattern:Pgchar):PGPatternSpec;cdecl;external gliblib name 'g_pattern_spec_new';
+
+ procedure g_pattern_spec_free(pspec:PGPatternSpec);cdecl;external gliblib name 'g_pattern_spec_free';
+
+ function g_pattern_spec_equal(pspec1:PGPatternSpec; pspec2:PGPatternSpec):gboolean;cdecl;external gliblib name 'g_pattern_spec_equal';
+
+ function g_pattern_match(pspec:PGPatternSpec; string_length:guint; _string:Pgchar; string_reversed:Pgchar):gboolean;cdecl;external gliblib name 'g_pattern_match';
+
+ function g_pattern_match_string(pspec:PGPatternSpec; _string:Pgchar):gboolean;cdecl;external gliblib name 'g_pattern_match_string';
+
+ function g_pattern_match_simple(pattern:Pgchar; _string:Pgchar):gboolean;cdecl;external gliblib name 'g_pattern_match_simple';
+
+
+
diff --git a/packages/gtk2/src/glib/gprimes.inc b/packages/gtk2/src/glib/gprimes.inc
new file mode 100644
index 0000000000..eddac79c19
--- /dev/null
+++ b/packages/gtk2/src/glib/gprimes.inc
@@ -0,0 +1,19 @@
+{*
+ * gprimes.inc
+ *
+ * depends on gtypes.h
+ *}
+
+ { Prime numbers.}
+
+ { This function returns prime numbers spaced by approximately 1.5-2.0
+ and is for use in resizing data structures which prefer
+ prime-valued sizes. The closest spaced prime function returns the
+ next largest prime, or the highest it knows about which is about
+ MAXINT/4.
+ }
+
+ function g_spaced_primes_closest(num:guint):guint;cdecl;external gliblib name 'g_spaced_primes_closest';
+
+
+
diff --git a/packages/gtk2/src/glib/gqsort.inc b/packages/gtk2/src/glib/gqsort.inc
new file mode 100644
index 0000000000..5f53d2c9ce
--- /dev/null
+++ b/packages/gtk2/src/glib/gqsort.inc
@@ -0,0 +1,15 @@
+{*
+ * gqsort.inc
+ *
+ * depends on gtypes.inc
+ *}
+
+
+ procedure g_qsort_with_data (pbase : gconstpointer;
+ total_elems : gint;
+ size : gsize;
+ compare_func : TGCompareDataFunc;
+ user_data : gpointer);cdecl;external gliblib name 'g_qsort_with_data';
+
+
+
diff --git a/packages/gtk2/src/glib/gquark.inc b/packages/gtk2/src/glib/gquark.inc
new file mode 100644
index 0000000000..e76acedd17
--- /dev/null
+++ b/packages/gtk2/src/glib/gquark.inc
@@ -0,0 +1,22 @@
+// included by glib2.pp
+
+{$IFDEF read_forward_definitions}
+ PGQuark = ^TGQuark;
+ TGQuark = guint32;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+{ Quarks (string<->id association) }
+
+function g_quark_try_string(_string:Pgchar):TGQuark;cdecl;external gliblib name 'g_quark_try_string';
+
+function g_quark_from_static_string(_string:Pgchar):TGQuark;cdecl;external gliblib name 'g_quark_from_static_string';
+
+function g_quark_from_string(_string:Pgchar):TGQuark;cdecl;external gliblib name 'g_quark_from_string';
+
+function g_quark_to_string (quark: TGQuark): Pgchar;cdecl;external gliblib name 'g_quark_to_string';
+{$ENDIF read_interface_rest}
+
diff --git a/packages/gtk2/src/glib/gqueue.inc b/packages/gtk2/src/glib/gqueue.inc
new file mode 100644
index 0000000000..9576d086c9
--- /dev/null
+++ b/packages/gtk2/src/glib/gqueue.inc
@@ -0,0 +1,44 @@
+{*
+ * gqueue.inc
+ *
+ * depends on glist.inc
+ *}
+
+ type
+ PGQueue = ^TGQueue;
+ TGQueue = record
+ head : PGList;
+ tail : PGList;
+ length : guint;
+ end;
+
+ { Queues }
+
+ function g_queue_new:PGQueue;cdecl;external gliblib name 'g_queue_new';
+
+ procedure g_queue_free(queue:PGQueue);cdecl;external gliblib name 'g_queue_free';
+
+ procedure g_queue_push_head(queue:PGQueue; data:gpointer);cdecl;external gliblib name 'g_queue_push_head';
+
+ procedure g_queue_push_tail(queue:PGQueue; data:gpointer);cdecl;external gliblib name 'g_queue_push_tail';
+
+ function g_queue_pop_head(queue:PGQueue):gpointer;cdecl;external gliblib name 'g_queue_pop_head';
+
+ function g_queue_pop_tail(queue:PGQueue):gpointer;cdecl;external gliblib name 'g_queue_pop_tail';
+
+ function g_queue_is_empty(queue:PGQueue):gboolean;cdecl;external gliblib name 'g_queue_is_empty';
+
+ function g_queue_peek_head(queue:PGQueue):gpointer;cdecl;external gliblib name 'g_queue_peek_head';
+
+ function g_queue_peek_tail(queue:PGQueue):gpointer;cdecl;external gliblib name 'g_queue_peek_tail';
+
+ procedure g_queue_push_head_link(queue:PGQueue; link:PGList);cdecl;external gliblib name 'g_queue_push_head_link';
+
+ procedure g_queue_push_tail_link(queue:PGQueue; link:PGList);cdecl;external gliblib name 'g_queue_push_tail_link';
+
+ function g_queue_pop_head_link(queue:PGQueue):PGList;cdecl;external gliblib name 'g_queue_pop_head_link';
+
+ function g_queue_pop_tail_link(queue:PGQueue):PGList;cdecl;external gliblib name 'g_queue_pop_tail_link';
+
+
+
diff --git a/packages/gtk2/src/glib/grand.inc b/packages/gtk2/src/glib/grand.inc
new file mode 100644
index 0000000000..432044fde7
--- /dev/null
+++ b/packages/gtk2/src/glib/grand.inc
@@ -0,0 +1,50 @@
+{*
+ * grand.inc
+ *
+ * depends on gtypes.inc
+ *}
+
+
+
+ type
+ PGRand = pointer; // check please
+
+ { GRand - a good and fast random number generator: Mersenne Twister
+ see http://www.math.keio.ac.jp/~matumoto/emt.html for more info.
+ The range functions return a value in the intervall [begin, end).
+ int -> [0..2^32-1]
+ int_range -> [begin..end-1]
+ double -> [0..1)
+ double_range -> [begin..end)
+ }
+
+ function g_rand_new_with_seed(seed:guint32):PGRand;cdecl;external gliblib name 'g_rand_new_with_seed';
+
+ function g_rand_new:PGRand;cdecl;external gliblib name 'g_rand_new';
+
+ procedure g_rand_free(rand:PGRand);cdecl;external gliblib name 'g_rand_free';
+
+ procedure g_rand_set_seed(rand:PGRand; seed:guint32);cdecl;external gliblib name 'g_rand_set_seed';
+
+ function g_rand_boolean(rand : PGRand) : gboolean;
+
+ function g_rand_int(rand:PGRand):guint32;cdecl;external gliblib name 'g_rand_int';
+
+ function g_rand_int_range(rand:PGRand; _begin:gint32; _end:gint32):gint32;cdecl;external gliblib name 'g_rand_int_range';
+
+ function g_rand_double(rand:PGRand):gdouble;cdecl;external gliblib name 'g_rand_double';
+
+ function g_rand_double_range(rand:PGRand; _begin:gdouble; _end:gdouble):gdouble;cdecl;external gliblib name 'g_rand_double_range';
+
+ procedure g_random_set_seed(seed:guint32);cdecl;external gliblib name 'g_random_set_seed';
+
+ function g_random_boolean : gboolean;
+
+ function g_random_int:guint32;cdecl;external gliblib name 'g_random_int';
+
+ function g_random_int_range(_begin:gint32; _end:gint32):gint32;cdecl;external gliblib name 'g_random_int_range';
+
+ function g_random_double:gdouble;cdecl;external gliblib name 'g_random_double';
+
+ function g_random_double_range(_begin:gdouble; _end:gdouble):gdouble;cdecl;external gliblib name 'g_random_double_range';
+
diff --git a/packages/gtk2/src/glib/grel.inc b/packages/gtk2/src/glib/grel.inc
new file mode 100644
index 0000000000..9c8c394fb2
--- /dev/null
+++ b/packages/gtk2/src/glib/grel.inc
@@ -0,0 +1,69 @@
+{*
+ * grel.inc
+ *
+ * depends on gtypes.inc
+ *}
+
+ type
+ PGTuples = ^TGTuples;
+ TGTuples = record
+ len : guint;
+ end;
+ PGRelation = pointer;
+
+ { GRelation
+
+ Indexed Relations. Imagine a really simple table in a
+ database. Relations are not ordered. This data type is meant for
+ maintaining a N-way mapping.
+
+ g_relation_new() creates a relation with FIELDS fields
+
+ g_relation_destroy() frees all resources
+ g_tuples_destroy() frees the result of g_relation_select()
+
+ g_relation_index() indexes relation FIELD with the provided
+ equality and hash functions. this must be done before any
+ calls to insert are made.
+
+ g_relation_insert() inserts a new tuple. you are expected to
+ provide the right number of fields.
+
+ g_relation_delete() deletes all relations with KEY in FIELD
+ g_relation_select() returns ...
+ g_relation_count() counts ...
+ }
+
+ function g_relation_new(fields:gint):PGRelation;cdecl;external gliblib name 'g_relation_new';
+
+ procedure g_relation_destroy(relation:PGRelation);cdecl;external gliblib name 'g_relation_destroy';
+
+ procedure g_relation_index(relation:PGRelation; field:gint; hash_func:TGHashFunc; key_equal_func:TGEqualFunc);cdecl;external gliblib name 'g_relation_index';
+
+{$IFNDEF KYLIX}
+ procedure g_relation_insert(relation:PGRelation; args:array of const);cdecl;overload;external gliblib name 'g_relation_insert';
+ procedure g_relation_insert(relation:PGRelation);cdecl;overload;varargs;external gliblib name 'g_relation_insert';
+{$ELSE}
+ procedure g_relation_insert(relation:PGRelation);varargs;cdecl;external gliblib name 'g_relation_insert';
+{$ENDIF}
+
+ function g_relation_delete(relation:PGRelation; key:gconstpointer; field:gint):gint;cdecl;external gliblib name 'g_relation_delete';
+
+ function g_relation_select(relation:PGRelation; key:gconstpointer; field:gint):PGTuples;cdecl;external gliblib name 'g_relation_select';
+
+ function g_relation_count(relation:PGRelation; key:gconstpointer; field:gint):gint;cdecl;external gliblib name 'g_relation_count';
+
+{$IFNDEF KYLIX}
+ function g_relation_exists(relation:PGRelation; args:array of const):gboolean;cdecl;overload;external gliblib name 'g_relation_exists';
+ function g_relation_exists(relation:PGRelation):gboolean;cdecl;overload;varargs;external gliblib name 'g_relation_exists';
+{$ELSE}
+ function g_relation_exists(relation:PGRelation):gboolean;varargs;cdecl;external gliblib name 'g_relation_exists';
+{$ENDIF}
+
+ procedure g_relation_print(relation:PGRelation);cdecl;external gliblib name 'g_relation_print';
+
+ procedure g_tuples_destroy(tuples:PGTuples);cdecl;external gliblib name 'g_tuples_destroy';
+
+ function g_tuples_index(tuples:PGTuples; index:gint; field:gint):gpointer;cdecl;external gliblib name 'g_tuples_index';
+
+
diff --git a/packages/gtk2/src/glib/gscanner.inc b/packages/gtk2/src/glib/gscanner.inc
new file mode 100644
index 0000000000..3736589469
--- /dev/null
+++ b/packages/gtk2/src/glib/gscanner.inc
@@ -0,0 +1,334 @@
+{*
+ * gscanner.inc
+ *
+ * depends on ghash.inc
+ *}
+
+
+ { GScanner: Flexible lexical scanner for general purpose.}
+
+ type
+
+ PGTokenType = ^TGTokenType;
+ TGTokenType = gint;
+
+ const
+ G_TOKEN_LEFT_PAREN = 40; // ASCII Code of '('
+ G_TOKEN_RIGHT_PAREN = 41; // ASCII Code of ')'
+ G_TOKEN_LEFT_CURLY = 123; // ASCII Code of '{'
+ G_TOKEN_RIGHT_CURLY = 125; // ASCII Code of '}'
+ G_TOKEN_LEFT_BRACE = 91; // ASCII Code of '['
+ G_TOKEN_RIGHT_BRACE = 93; // ASCII Code of ']'
+ G_TOKEN_EQUAL_SIGN = 61; // ASCII Code of '='
+ G_TOKEN_COMMA = 44; // ASCII Code of ','
+ G_TOKEN_NONE = 256;
+ G_TOKEN_ERROR = 257;
+ G_TOKEN_CHAR = 258;
+ 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
+ PGScanner = ^TGScanner;
+ PGScannerConfig = ^TGScannerConfig;
+
+ 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;
+
+ TGScannerMsgFunc = procedure (scanner:PGScanner; message:Pgchar; error:gboolean);cdecl;
+
+ TGScanner = record
+ user_data : gpointer; { unused fields }
+ max_parse_errors : guint;
+
+ parse_errors : guint; { g_scanner_error() increments this field }
+
+ input_name : Pgchar; { name of input stream, featured by
+ the default message handler }
+
+ qdata : PGData; { quarked data }
+
+ config : PGScannerConfig; { link into the scanner configuration }
+
+ token : TGTokenType; { fields filled in after g_scanner_get_next_token() }
+ value : TGTokenValue;
+ line : guint;
+ position : guint;
+
+ next_token : TGTokenType; { fields filled in after g_scanner_peek_next_token() }
+ next_value : TGTokenValue;
+ next_line : guint;
+ next_position : guint;
+
+ symbol_table : PGHashTable; { to be considered private }
+ input_fd : gint;
+ text : Pgchar;
+ text_end : Pgchar;
+ buffer : Pgchar;
+ scope_id : guint;
+
+ msg_handler : TGScannerMsgFunc; { handler function for _warn and _error }
+ end;
+
+ TGScannerConfig = record
+ { Character sets }
+ cset_skip_characters : Pgchar; { default: " \t\n" }
+
+ cset_identifier_first : Pgchar;
+ cset_identifier_nth : Pgchar;
+ cpair_comment_single : Pgchar; { default: "#\n" }
+
+ flag0 : longint; { Boolean values to be adjusted "on the fly"
+ to configure scanning behaviour. }
+ padding_dummy : guint;
+ end;
+
+
+
+
+ { Character sets }
+
+ const
+ G_CSET_A_2_Z_UCASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; // NOTE: renamed
+ G_CSET_a_2_z_lcase = 'abcdefghijklmnopqrstuvwxyz'; // dito
+ G_CSET_DIGITS = '0123456789';
+{
+
+ How to express an escape sequenced string in pascal???
+
+ G_CSET_LATINC = #300 + #301 + #302 + #303 + #304 + #305 + #306 + #307 + #310 + #311 +
+ #312 + #313 + #314 + #315 + #316 + #317 + #320 + #321 + #322 + #323 +
+ #324 + #325 + #326 + #330 + #331 + #332 + #333 + #334 + #335 + #336;
+
+ G_CSET_LATINS = #337#340#341#342#343#344#345#346#347#350#351#352#353#354#355#356#357#360
+ #361#362#363#364#365#366#370#371#372#373#374#375#376#377;
+
+ This is the original version:
+
+ #define G_CSET_LATINC "\300\301\302\303\304\305\306"\
+ "\307\310\311\312\313\314\315\316\317\320"\
+ "\321\322\323\324\325\326"\
+ "\330\331\332\333\334\335\336"
+ #define G_CSET_LATINS "\337\340\341\342\343\344\345\346"\
+ "\347\350\351\352\353\354\355\356\357\360"\
+ "\361\362\363\364\365\366"\
+ "\370\371\372\373\374\375\376\377"
+
+}
+
+
+ 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;
+
+ { Should symbol lookup work case sensitive? }
+ function TGScannerConfig_case_sensitive(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_case_sensitive(var a : TGScannerConfig; __case_sensitive : guint);
+
+ { C-like comment }
+ function TGScannerConfig_skip_comment_multi(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_skip_comment_multi(var a : TGScannerConfig; __skip_comment_multi : guint);
+
+ { single line comment }
+ function TGScannerConfig_skip_comment_single(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_skip_comment_single(var a : TGScannerConfig; __skip_comment_single : guint);
+
+ { scan multi line comments? }
+ function TGScannerConfig_scan_comment_multi(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_comment_multi(var a : TGScannerConfig; __scan_comment_multi : guint);
+
+ function TGScannerConfig_scan_identifier(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_identifier(var a : TGScannerConfig; __scan_identifier : guint);
+
+ function TGScannerConfig_scan_identifier_1char(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_identifier_1char(var a : TGScannerConfig; __scan_identifier_1char : guint);
+
+ function TGScannerConfig_scan_identifier_NULL(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_identifier_NULL(var a : TGScannerConfig; __scan_identifier_NULL : guint);
+
+ function TGScannerConfig_scan_symbols(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_symbols(var a : TGScannerConfig; __scan_symbols : guint);
+
+ function TGScannerConfig_scan_binary(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_binary(var a : TGScannerConfig; __scan_binary : guint);
+
+ function TGScannerConfig_scan_octal(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_octal(var a : TGScannerConfig; __scan_octal : guint);
+
+ function TGScannerConfig_scan_float(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_float(var a : TGScannerConfig; __scan_float : guint);
+
+ { `0x0ff0' }
+ function TGScannerConfig_scan_hex(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_hex(var a : TGScannerConfig; __scan_hex : guint);
+
+ { `$0ff0' }
+ function TGScannerConfig_scan_hex_dollar(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_hex_dollar(var a : TGScannerConfig; __scan_hex_dollar : guint);
+
+ { string: 'anything' }
+ function TGScannerConfig_scan_string_sq(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_string_sq(var a : TGScannerConfig; __scan_string_sq : guint);
+
+ { string: "\\-escapes!\n" }
+ function TGScannerConfig_scan_string_dq(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scan_string_dq(var a : TGScannerConfig; __scan_string_dq : guint);
+
+ { bin, octal, hex => int }
+ function TGScannerConfig_numbers_2_int(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_numbers_2_int(var a : TGScannerConfig; __numbers_2_int : guint);
+
+ { int => G_TOKEN_FLOAT? }
+ function TGScannerConfig_int_2_float(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_int_2_float(var a : TGScannerConfig; __int_2_float : guint);
+
+ function TGScannerConfig_identifier_2_string(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_identifier_2_string(var a : TGScannerConfig; __identifier_2_string : guint);
+
+ { return G_TOKEN_CHAR? }
+ function TGScannerConfig_char_2_token(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_char_2_token(var a : TGScannerConfig; __char_2_token : guint);
+
+ function TGScannerConfig_symbol_2_token(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_symbol_2_token(var a : TGScannerConfig; __symbol_2_token : guint);
+
+ { try scope 0 on lookups? }
+ function TGScannerConfig_scope_0_fallback(var a : TGScannerConfig) : guint;
+ procedure TGScannerConfig_set_scope_0_fallback(var a : TGScannerConfig; __scope_0_fallback : guint);
+
+
+ function g_scanner_new(config_templ:PGScannerConfig):PGScanner;cdecl;external gliblib name 'g_scanner_new';
+
+ procedure g_scanner_destroy(scanner:PGScanner);cdecl;external gliblib name 'g_scanner_destroy';
+
+ procedure g_scanner_input_file(scanner:PGScanner; input_fd:gint);cdecl;external gliblib name 'g_scanner_input_file';
+
+ procedure g_scanner_sync_file_offset(scanner:PGScanner);cdecl;external gliblib name 'g_scanner_sync_file_offset';
+
+ procedure g_scanner_input_text(scanner:PGScanner; text:Pgchar; text_len:guint);cdecl;external gliblib name 'g_scanner_input_text';
+
+ function g_scanner_get_next_token(scanner:PGScanner):TGTokenType;cdecl;external gliblib name 'g_scanner_get_next_token';
+
+ function g_scanner_peek_next_token(scanner:PGScanner):TGTokenType;cdecl;external gliblib name 'g_scanner_peek_next_token';
+
+ function g_scanner_cur_token(scanner:PGScanner):TGTokenType;cdecl;external gliblib name 'g_scanner_cur_token';
+
+ function g_scanner_cur_value(scanner:PGScanner):TGTokenValue;cdecl;external gliblib name 'g_scanner_cur_value';
+
+ function g_scanner_cur_line(scanner:PGScanner):guint;cdecl;external gliblib name 'g_scanner_cur_line';
+
+ function g_scanner_cur_position(scanner:PGScanner):guint;cdecl;external gliblib name 'g_scanner_cur_position';
+
+ function g_scanner_eof(scanner:PGScanner):gboolean;cdecl;external gliblib name 'g_scanner_eof';
+
+ function g_scanner_set_scope(scanner:PGScanner; scope_id:guint):guint;cdecl;external gliblib name 'g_scanner_set_scope';
+
+ procedure g_scanner_scope_add_symbol(scanner:PGScanner; scope_id:guint; symbol:Pgchar; value:gpointer);cdecl;external gliblib name 'g_scanner_scope_add_symbol';
+
+ procedure g_scanner_scope_remove_symbol(scanner:PGScanner; scope_id:guint; symbol:Pgchar);cdecl;external gliblib name 'g_scanner_scope_remove_symbol';
+
+ function g_scanner_scope_lookup_symbol(scanner:PGScanner; scope_id:guint; symbol:Pgchar):gpointer;cdecl;external gliblib name 'g_scanner_scope_lookup_symbol';
+
+ procedure g_scanner_scope_foreach_symbol(scanner:PGScanner; scope_id:guint; func:TGHFunc; user_data:gpointer);cdecl;external gliblib name 'g_scanner_scope_foreach_symbol';
+
+ function g_scanner_lookup_symbol(scanner:PGScanner; symbol:Pgchar):gpointer;cdecl;external gliblib name 'g_scanner_lookup_symbol';
+
+ 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 gliblib name 'g_scanner_unexp_token';
+
+
+{$IFNDEF KYLIX}
+ procedure g_scanner_error(scanner:PGScanner; format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_scanner_error';
+ procedure g_scanner_error(scanner:PGScanner; format:Pgchar);cdecl;overload;varargs;external gliblib name 'g_scanner_error';
+
+ procedure g_scanner_warn(scanner:PGScanner; format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_scanner_warn';
+ procedure g_scanner_warn(scanner:PGScanner; format:Pgchar);cdecl;overload;varargs;external gliblib name 'g_scanner_warn';
+{$ELSE}
+ procedure g_scanner_error(scanner:PGScanner; format:Pgchar);varargs;cdecl;external gliblib name 'g_scanner_error';
+ procedure g_scanner_warn(scanner:PGScanner; format:Pgchar);varargs;cdecl;external gliblib name 'g_scanner_warn';
+{$ENDIF}
+
+{$ifndef G_DISABLE_DEPRECATED}
+// { keep downward source compatibility }
+// { #define g_scanner_add_symbol( scanner, symbol, value ) G_STMT_START { \ }
+// { g_scanner_scope_add_symbol ((scanner), 0, (symbol), (value)); \ }
+// { } G_STMT_END }
+// { #define g_scanner_remove_symbol( scanner, symbol ) G_STMT_START { \ }
+// { g_scanner_scope_remove_symbol ((scanner), 0, (symbol)); \ }
+// { } G_STMT_END }
+// { #define g_scanner_foreach_symbol( scanner, func, data ) G_STMT_START { \ }
+// { g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \ }
+// { } G_STMT_END }
+
+ { The following two functions are deprecated and will be removed in
+ the next major release. They do no good. }
+
+
+ procedure g_scanner_freeze_symbol_table(scanner : PGScanner);
+
+ procedure g_scanner_thaw_symbol_table(scanner : PGScanner);
+
+{$endif} { G_DISABLE_DEPRECATED }
+
+
diff --git a/packages/gtk2/src/glib/gshell.inc b/packages/gtk2/src/glib/gshell.inc
new file mode 100644
index 0000000000..5ace15c6b2
--- /dev/null
+++ b/packages/gtk2/src/glib/gshell.inc
@@ -0,0 +1,28 @@
+{*
+ * gshell.inc
+ *
+ * depends on gerror.inc
+ *}
+
+ function G_SHELL_ERROR : TGQuark;
+
+
+
+
+
+ type
+
+ PGShellError = ^TGShellError;
+ TGShellError = (G_SHELL_ERROR_BAD_QUOTING, { mismatched or otherwise mangled quoting }
+ G_SHELL_ERROR_EMPTY_STRING, { string to be parsed was empty }
+ G_SHELL_ERROR_FAILED);
+
+ function g_shell_error_quark:TGQuark;cdecl;external gliblib name 'g_shell_error_quark';
+
+ function g_shell_quote(unquoted_string:Pgchar):Pgchar;cdecl;external gliblib name 'g_shell_quote';
+
+ function g_shell_unquote(quoted_string:Pgchar; error:PPGError):Pgchar;cdecl;external gliblib name 'g_shell_unquote';
+
+ function g_shell_parse_argv(command_line:Pgchar; argcp:Pgint; argvp:PPPgchar; error:PPGError):gboolean;cdecl;external gliblib name 'g_shell_parse_argv';
+
+
diff --git a/packages/gtk2/src/glib/gsignal.inc b/packages/gtk2/src/glib/gsignal.inc
new file mode 100644
index 0000000000..949bf4651a
--- /dev/null
+++ b/packages/gtk2/src/glib/gsignal.inc
@@ -0,0 +1,150 @@
+// included by glib2.pas
+
+{ --- typedefs --- }
+type
+ PGSignalInvocationHint = ^TGSignalInvocationHint;
+
+ PGSignalCMarshaller = ^TGSignalCMarshaller;
+ TGSignalCMarshaller = TGClosureMarshal;
+
+ TGSignalEmissionHook = function (ihint:PGSignalInvocationHint; n_param_values:guint; param_values:PGValue; data:gpointer):gboolean; cdecl;
+
+ TGSignalAccumulator = function (ihint:PGSignalInvocationHint; return_accu:PGValue; handler_return:PGValue; data:gpointer):gboolean; cdecl;
+
+{ --- run, match and connect types --- }
+ PGSignalFlags = ^TGSignalFlags;
+ TGSignalFlags = longint;
+
+{ --- signal information --- }
+ TGSignalInvocationHint = record
+ signal_id : guint;
+ detail : TGQuark;
+ run_type : TGSignalFlags;
+ end;
+
+{ mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag }
+{ mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag }
+ PGSignalQuery = ^TGSignalQuery;
+ TGSignalQuery = record
+ signal_id : guint;
+ signal_name : Pgchar;
+ itype : GType;
+ signal_flags : TGSignalFlags;
+ return_type : GType;
+ n_params : guint;
+ param_types : PGType;
+ end;
+
+
+const
+ G_SIGNAL_RUN_FIRST = 1 shl 0;
+ G_SIGNAL_RUN_LAST = 1 shl 1;
+ G_SIGNAL_RUN_CLEANUP = 1 shl 2;
+ G_SIGNAL_NO_RECURSE = 1 shl 3;
+ G_SIGNAL_DETAILED = 1 shl 4;
+ G_SIGNAL_ACTION = 1 shl 5;
+ G_SIGNAL_NO_HOOKS = 1 shl 6;
+ G_SIGNAL_FLAGS_MASK = $7f;
+
+type
+ PGConnectFlags = ^TGConnectFlags;
+ TGConnectFlags = longint;
+
+const
+ G_CONNECT_AFTER = 1 shl 0;
+ G_CONNECT_SWAPPED = 1 shl 1;
+
+type
+ PGSignalMatchType = ^TGSignalMatchType;
+ TGSignalMatchType = longint;
+
+const
+ G_SIGNAL_MATCH_ID = 1 shl 0;
+ G_SIGNAL_MATCH_DETAIL = 1 shl 1;
+ G_SIGNAL_MATCH_CLOSURE = 1 shl 2;
+ G_SIGNAL_MATCH_FUNC = 1 shl 3;
+ G_SIGNAL_MATCH_DATA = 1 shl 4;
+ G_SIGNAL_MATCH_UNBLOCKED = 1 shl 5;
+ G_SIGNAL_MATCH_MASK = $3f;
+
+ G_SIGNAL_TYPE_STATIC_SCOPE = G_TYPE_FLAG_RESERVED_ID_BIT;
+
+
+{ --- signals --- }
+
+function g_signal_newv(signal_name:Pgchar; itype:GType; signal_flags:TGSignalFlags; class_closure:PGClosure; accumulator:TGSignalAccumulator;
+ accu_data:gpointer; c_marshaller:TGSignalCMarshaller; return_type:GType; n_params:guint; param_types:PGType):guint; cdecl; external gobjectlib;
+{$IFNDEF KYLIX}
+function g_signal_new_valist(signal_name:Pgchar; itype:GType; signal_flags:TGSignalFlags; class_closure:PGClosure; accumulator:TGSignalAccumulator;
+ accu_data:gpointer; c_marshaller:TGSignalCMarshaller; return_type:GType; n_params:guint; args: array of const):guint; cdecl; external gobjectlib;
+function g_signal_new(signal_name:Pgchar; itype:GType; signal_flags:TGSignalFlags; class_offset:guint; accumulator:TGSignalAccumulator;
+ accu_data:gpointer; c_marshaller:TGSignalCMarshaller; return_type:GType; n_params:guint; args:array of const):guint; cdecl; overload; external gobjectlib;
+function g_signal_new(signal_name:Pgchar; itype:GType; signal_flags:TGSignalFlags; class_offset:guint; accumulator:TGSignalAccumulator;
+ accu_data:gpointer; c_marshaller:TGSignalCMarshaller; return_type:GType; n_params:guint):guint; cdecl; overload; varargs; external gobjectlib;
+{$ELSE}
+function g_signal_new_valist(signal_name:Pgchar; itype:GType; signal_flags:TGSignalFlags; class_closure:PGClosure; accumulator:TGSignalAccumulator;
+ accu_data:gpointer; c_marshaller:TGSignalCMarshaller; return_type:GType; n_params:guint):guint; varargs; cdecl; external gobjectlib;
+function g_signal_new(signal_name:Pgchar; itype:GType; signal_flags:TGSignalFlags; class_offset:guint; accumulator:TGSignalAccumulator;
+ accu_data:gpointer; c_marshaller:TGSignalCMarshaller; return_type:GType; n_params:guint):guint; varargs; cdecl; external gobjectlib;
+{$ENDIF}
+procedure g_signal_emitv(instance_and_params:PGValue; signal_id:guint; detail:TGQuark; return_value:PGValue); cdecl; external gobjectlib;
+{$IFNDEF KYLIX}
+procedure g_signal_emit_valist(instance:gpointer; signal_id:guint; detail:TGQuark; var_args: array of const); cdecl; external gobjectlib;
+procedure g_signal_emit(instance:gpointer; signal_id:guint; detail:TGQuark; args:array of const); cdecl; overload; external gobjectlib;
+procedure g_signal_emit(instance:gpointer; signal_id:guint; detail:TGQuark); cdecl; overload; varargs; external gobjectlib;
+procedure g_signal_emit_by_name(instance:gpointer; detailed_signal:Pgchar; args:array of const); cdecl; overload; external gobjectlib;
+procedure g_signal_emit_by_name(instance:gpointer; detailed_signal:Pgchar); cdecl; overload; varargs; external gobjectlib;
+{$ELSE}
+procedure g_signal_emit_valist(instance:gpointer; signal_id:guint; detail:TGQuark); varargs; cdecl; external gobjectlib;
+procedure g_signal_emit(instance:gpointer; signal_id:guint; detail:TGQuark); varargs; cdecl; external gobjectlib;
+procedure g_signal_emit_by_name(instance:gpointer; detailed_signal:Pgchar); varargs; cdecl; external gobjectlib;
+{$ENDIF}
+function g_signal_lookup(name:Pgchar; itype:GType):guint; cdecl; external gobjectlib;
+function g_signal_name(signal_id:guint):Pgchar; cdecl; external gobjectlib;
+procedure g_signal_query(signal_id:guint; query:PGSignalQuery); cdecl; external gobjectlib;
+function g_signal_list_ids(itype:GType; n_ids:Pguint):Pguint; cdecl; external gobjectlib;
+function g_signal_parse_name(detailed_signal:Pgchar; itype:GType; signal_id_p:Pguint; detail_p:PGQuark; force_detail_quark:gboolean):gboolean; cdecl; external gobjectlib;
+function g_signal_get_invocation_hint(instance:gpointer):PGSignalInvocationHint; cdecl; external gobjectlib;
+{ --- signal emissions --- }
+procedure g_signal_stop_emission(instance:gpointer; signal_id:guint; detail:TGQuark); cdecl; external gobjectlib;
+procedure g_signal_stop_emission_by_name(instance:gpointer; detailed_signal:Pgchar); cdecl; external gobjectlib;
+function g_signal_add_emission_hook(signal_id:guint; quark:TGQuark; hook_func:TGSignalEmissionHook; hook_data:gpointer; data_destroy:TGDestroyNotify):gulong; cdecl; external gobjectlib;
+procedure g_signal_remove_emission_hook(signal_id:guint; hook_id:gulong); cdecl; external gobjectlib;
+{ --- signal handlers --- }
+function g_signal_has_handler_pending(instance:gpointer; signal_id:guint; detail:TGQuark; may_be_blocked:gboolean):gboolean; cdecl; external gobjectlib;
+function g_signal_connect_closure_by_id(instance:gpointer; signal_id:guint; detail:TGQuark; closure:PGClosure; after:gboolean):gulong; cdecl; external gobjectlib;
+function g_signal_connect_closure(instance:gpointer; detailed_signal:Pgchar; closure:PGClosure; after:gboolean):gulong; cdecl; external gobjectlib;
+function g_signal_connect_data(instance:gpointer; detailed_signal:Pgchar; c_handler:TGCallback; data:gpointer; destroy_data:TGClosureNotify;
+ connect_flags:TGConnectFlags):gulong; cdecl; external gobjectlib;
+procedure g_signal_handler_block(instance:gpointer; handler_id:gulong); cdecl; external gobjectlib;
+procedure g_signal_handler_unblock(instance:gpointer; handler_id:gulong); cdecl; external gobjectlib;
+procedure g_signal_handler_disconnect(instance:gpointer; handler_id:gulong); cdecl; external gobjectlib;
+function g_signal_handler_is_connected(instance:gpointer; handler_id:gulong):gboolean; cdecl; external gobjectlib;
+function g_signal_handler_find(instance: gpointer; mask: TGSignalMatchType;
+ signal_id: guint; detail: TGQuark; closure: PGClosure;
+ func:gpointer; data:gpointer):gulong; cdecl; external gobjectlib;
+function g_signal_handlers_block_matched(instance:gpointer; mask:TGSignalMatchType; signal_id:guint; detail:TGQuark; closure:PGClosure;
+ func:gpointer; data:gpointer):guint; cdecl; external gobjectlib;
+function g_signal_handlers_unblock_matched(instance:gpointer; mask:TGSignalMatchType; signal_id:guint; detail:TGQuark; closure:PGClosure;
+ func:gpointer; data:gpointer):guint; cdecl; external gobjectlib;
+function g_signal_handlers_disconnect_matched(instance:gpointer; mask:TGSignalMatchType; signal_id:guint; detail:TGQuark; closure:PGClosure;
+ func:gpointer; data:gpointer):guint; cdecl; external gobjectlib;
+{ --- chaining for language bindings --- }
+procedure g_signal_override_class_closure(signal_id:guint; instance_type:GType; class_closure:PGClosure); cdecl; external gobjectlib;
+procedure g_signal_chain_from_overridden(instance_and_params:PGValue; return_value:PGValue); cdecl; external gobjectlib;
+
+{ --- convenience --- }
+function g_signal_connect(instance:gpointer; detailed_signal:Pgchar; c_handler:TGCallback; data:gpointer) : gulong;
+function g_signal_connect_after(instance:gpointer; detailed_signal:Pgchar; c_handler:TGCallback; data:gpointer) : gulong;
+function g_signal_connect_swapped(instance:gpointer; detailed_signal:Pgchar; c_handler:TGCallback; data:gpointer) : gulong;
+function g_signal_handlers_disconnect_by_func(instance:gpointer; func, data: gpointer) : guint;
+
+procedure g_signal_handlers_block_by_func(instance: gpointer; func, data: gpointer);
+procedure g_signal_handlers_unblock_by_func(instance: gpointer; func, data: gpointer);
+
+{< private > }
+procedure g_signal_handlers_destroy(instance:gpointer); cdecl; external gobjectlib;
+procedure _g_signals_destroy(itype:GType); cdecl; external gobjectlib;
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gslist.inc b/packages/gtk2/src/glib/gslist.inc
new file mode 100644
index 0000000000..3b6456a049
--- /dev/null
+++ b/packages/gtk2/src/glib/gslist.inc
@@ -0,0 +1,80 @@
+// included by glib2.pas
+
+{$IFDEF read_forward_definitions}
+ PGSList = ^TGSList;
+ PPGSList = ^PGSList;
+ TGSList = record
+ data : gpointer;
+ next : PGSList;
+ end;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{ Singly linked lists
+ }
+
+procedure g_slist_push_allocator(allocator:PGAllocator);cdecl;external gliblib name 'g_slist_push_allocator';
+
+procedure g_slist_pop_allocator;cdecl;external gliblib name 'g_slist_pop_allocator';
+
+function g_slist_alloc:PGSList;cdecl;external gliblib name 'g_slist_alloc';
+
+procedure g_slist_free(list:PGSList);cdecl;external gliblib name 'g_slist_free';
+
+procedure g_slist_free_1(list:PGSList);cdecl;external gliblib name 'g_slist_free_1';
+
+function g_slist_append(list:PGSList; data:gpointer):PGSList;cdecl;external gliblib name 'g_slist_append';
+
+function g_slist_prepend(list:PGSList; data:gpointer):PGSList;cdecl;external gliblib name 'g_slist_prepend';
+
+function g_slist_insert(list:PGSList; data:gpointer; position:gint):PGSList;cdecl;external gliblib name 'g_slist_insert';
+
+function g_slist_insert_sorted(list:PGSList; data:gpointer; func:TGCompareFunc):PGSList;cdecl;external gliblib name 'g_slist_insert_sorted';
+
+function g_slist_insert_before(slist:PGSList; sibling:PGSList; data:gpointer):PGSList;cdecl;external gliblib name 'g_slist_insert_before';
+
+function g_slist_concat(list1:PGSList; list2:PGSList):PGSList;cdecl;external gliblib name 'g_slist_concat';
+
+function g_slist_remove(list:PGSList; data:gconstpointer):PGSList;cdecl;external gliblib name 'g_slist_remove';
+
+function g_slist_remove_all(list:PGSList; data:gconstpointer):PGSList;cdecl;external gliblib name 'g_slist_remove_all';
+
+function g_slist_remove_link(list:PGSList; link:PGSList):PGSList;cdecl;external gliblib name 'g_slist_remove_link';
+
+function g_slist_delete_link(list:PGSList; link:PGSList):PGSList;cdecl;external gliblib name 'g_slist_delete_link';
+
+function g_slist_reverse(list:PGSList):PGSList;cdecl;external gliblib name 'g_slist_reverse';
+
+function g_slist_copy(list:PGSList):PGSList;cdecl;external gliblib name 'g_slist_copy';
+
+function g_slist_nth(list:PGSList; n:guint):PGSList;cdecl;external gliblib name 'g_slist_nth';
+
+function g_slist_find(list:PGSList; data:gconstpointer):PGSList;cdecl;external gliblib name 'g_slist_find';
+
+function g_slist_find_custom(list:PGSList; data:gconstpointer; func:TGCompareFunc):PGSList;cdecl;external gliblib name 'g_slist_find_custom';
+
+function g_slist_position(list:PGSList; llink:PGSList):gint;cdecl;external gliblib name 'g_slist_position';
+
+function g_slist_index(list:PGSList; data:gconstpointer):gint;cdecl;external gliblib name 'g_slist_index';
+
+function g_slist_last(list:PGSList):PGSList;cdecl;external gliblib name 'g_slist_last';
+
+function g_slist_length(list:PGSList):guint;cdecl;external gliblib name 'g_slist_length';
+
+procedure g_slist_foreach(list:PGSList; func:TGFunc; user_data:gpointer);cdecl;external gliblib name 'g_slist_foreach';
+
+function g_slist_sort(list:PGSList; compare_func:TGCompareFunc):PGSList;cdecl;external gliblib name 'g_slist_sort';
+
+function g_slist_sort_with_data(list:PGSList; compare_func:TGCompareDataFunc; user_data:gpointer):PGSList;cdecl;external gliblib name 'g_slist_sort_with_data';
+
+function g_slist_nth_data(list:PGSList; n:guint):gpointer;cdecl;external gliblib name 'g_slist_nth_data';
+
+function g_slist_next(slist : PGSList) : PGSList;
+
+{$ENDIF read_interface_rest}
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gsourceclosure.inc b/packages/gtk2/src/glib/gsourceclosure.inc
new file mode 100644
index 0000000000..8b2f955ebd
--- /dev/null
+++ b/packages/gtk2/src/glib/gsourceclosure.inc
@@ -0,0 +1,56 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ GObject - GLib Type, Object, Parameter and Signal Library
+ Copyright (C) 2001 Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+ }
+{$if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)}
+{$error "Only <glib-anObject.h> can be included directly."}
+{$endif}
+{$ifndef __G_SOURCECLOSURE_H__}
+{$include <gobject/gclosure.inc}
+
+procedure g_source_set_closure(source:PGSource; closure:PGClosure); cdecl; external gliblib;
+function g_io_channel_get_type:GType; cdecl; external gliblib;
+function g_io_condition_get_type:GType; cdecl; external gliblib;
+function G_TYPE_IO_CHANNEL : longint;
+ { return type might be wrong }
+function G_TYPE_IO_CONDITION : longint;
+ { return type might be wrong }
+
+{$endif}
+{ __G_SOURCECLOSURE_H__ }
+function G_TYPE_IO_CHANNEL : longint;
+begin
+ G_TYPE_IO_CHANNEL:=g_io_channel_get_type;
+end;
+
+function G_TYPE_IO_CONDITION : longint;
+begin
+ G_TYPE_IO_CONDITION:=g_io_condition_get_type;
+end;
+
+
diff --git a/packages/gtk2/src/glib/gspawn.inc b/packages/gtk2/src/glib/gspawn.inc
new file mode 100644
index 0000000000..2a5ef86104
--- /dev/null
+++ b/packages/gtk2/src/glib/gspawn.inc
@@ -0,0 +1,75 @@
+{*
+ * gspawn.inc
+ *
+ * depends on gerror.inc
+ *}
+
+ { I'm not sure I remember our proposed naming convention here. }
+
+ function G_SPAWN_ERROR : TGQuark;
+
+
+
+ type
+
+ PGSpawnError = ^TGSpawnError;
+ TGSpawnError = (G_SPAWN_ERROR_FORK,
+ G_SPAWN_ERROR_READ,
+ G_SPAWN_ERROR_CHDIR,
+ G_SPAWN_ERROR_ACCES,
+ G_SPAWN_ERROR_PERM,
+ G_SPAWN_ERROR_2BIG,
+ G_SPAWN_ERROR_NOEXEC,
+ G_SPAWN_ERROR_NAMETOOLONG,
+ G_SPAWN_ERROR_NOENT,
+ G_SPAWN_ERROR_NOMEM,
+ G_SPAWN_ERROR_NOTDIR,
+ G_SPAWN_ERROR_LOOP,
+ G_SPAWN_ERROR_TXTBUSY,
+ G_SPAWN_ERROR_IO,
+ G_SPAWN_ERROR_NFILE,
+ G_SPAWN_ERROR_MFILE,
+ G_SPAWN_ERROR_INVAL,
+ G_SPAWN_ERROR_ISDIR,
+ G_SPAWN_ERROR_LIBBAD,
+ G_SPAWN_ERROR_FAILED);
+
+ TGSpawnChildSetupFunc = procedure (user_data:gpointer);cdecl;
+
+ { look for argv[0] in the path i.e. use execvp() }
+ { Dump output to /dev/null }
+
+ PGSpawnFlags = ^TGSpawnFlags;
+ TGSpawnFlags = integer;
+
+ const
+ G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 shl 0;
+ G_SPAWN_DO_NOT_REAP_CHILD = 1 shl 1;
+ G_SPAWN_SEARCH_PATH = 1 shl 2;
+ G_SPAWN_STDOUT_TO_DEV_NULL = 1 shl 3;
+ G_SPAWN_STDERR_TO_DEV_NULL = 1 shl 4;
+ G_SPAWN_CHILD_INHERITS_STDIN = 1 shl 5;
+ G_SPAWN_FILE_AND_ARGV_ZERO = 1 shl 6;
+
+ function g_spawn_error_quark:TGQuark;cdecl;external gliblib name 'g_spawn_error_quark';
+
+ function g_spawn_async(working_directory:Pgchar; argv:PPgchar; envp:PPgchar; flags:TGSpawnFlags; child_setup:TGSpawnChildSetupFunc;
+ user_data:gpointer; child_pid:Pgint; error:PPGError):gboolean;cdecl;external gliblib name 'g_spawn_async';
+
+ { Opens pipes for non-NULL standard_output, standard_input, standard_error,
+ and returns the parent's end of the pipes.
+ }
+ function g_spawn_async_with_pipes(working_directory:Pgchar; argv:PPgchar; envp:PPgchar; flags:TGSpawnFlags; child_setup:TGSpawnChildSetupFunc;
+ user_data:gpointer; child_pid:Pgint; standard_input:Pgint; standard_output:Pgint; standard_error:Pgint;
+ error:PPGError):gboolean;cdecl;external gliblib name 'g_spawn_async_with_pipes';
+
+ { If standard_output or standard_error are non-NULL, the full
+ standard output or error of the command will be placed there.
+ }
+ function g_spawn_sync(working_directory:Pgchar; argv:PPgchar; envp:PPgchar; flags:TGSpawnFlags; child_setup:TGSpawnChildSetupFunc;
+ user_data:gpointer; standard_output:PPgchar; standard_error:PPgchar; exit_status:Pgint; error:PPGError):gboolean;cdecl;external gliblib name 'g_spawn_sync';
+
+ function g_spawn_command_line_sync(command_line:Pgchar; standard_output:PPgchar; standard_error:PPgchar; exit_status:Pgint; error:PPGError):gboolean;cdecl;external gliblib name 'g_spawn_command_line_sync';
+
+ function g_spawn_command_line_async(command_line:Pgchar; error:PPGError):gboolean;cdecl;external gliblib name 'g_spawn_command_line_async';
+
diff --git a/packages/gtk2/src/glib/gstrfuncs.inc b/packages/gtk2/src/glib/gstrfuncs.inc
new file mode 100644
index 0000000000..4b14cbcd6b
--- /dev/null
+++ b/packages/gtk2/src/glib/gstrfuncs.inc
@@ -0,0 +1,157 @@
+// included by glib2.pas
+
+{ Functions like the ones in <ctype.h> that are not affected by locale. }
+type
+ PGAsciiType = ^TGAsciiType;
+ TGAsciiType = longint;
+
+const
+ G_ASCII_ALNUM = 1 shl 0;
+ G_ASCII_ALPHA = 1 shl 1;
+ G_ASCII_CNTRL = 1 shl 2;
+ G_ASCII_DIGIT = 1 shl 3;
+ G_ASCII_GRAPH = 1 shl 4;
+ G_ASCII_LOWER = 1 shl 5;
+ G_ASCII_PRINT = 1 shl 6;
+ G_ASCII_PUNCT = 1 shl 7;
+ G_ASCII_SPACE = 1 shl 8;
+ G_ASCII_UPPER = 1 shl 9;
+ G_ASCII_XDIGIT= 1 shl 10;
+
+{$IFNDEF KYLIX}
+var
+ g_ascii_table : Pguint16; external gliblib name 'g_ascii_table';
+{$ENDIF}
+
+function g_ascii_isalnum(c : gchar) : boolean;
+function g_ascii_isalpha(c : gchar) : boolean;
+function g_ascii_iscntrl(c : gchar) : boolean;
+function g_ascii_isdigit(c : gchar) : boolean;
+function g_ascii_isgraph(c : gchar) : boolean;
+function g_ascii_islower(c : gchar) : boolean;
+function g_ascii_isprint(c : gchar) : boolean;
+function g_ascii_ispunct(c : gchar) : boolean;
+function g_ascii_isspace(c : gchar) : boolean;
+function g_ascii_isupper(c : gchar) : boolean;
+function g_ascii_isxdigit(c : gchar) : boolean;
+
+function g_ascii_tolower(c:gchar):gchar; cdecl; external gliblib;
+function g_ascii_toupper(c:gchar):gchar; cdecl; external gliblib;
+function g_ascii_digit_value(c:gchar):gint; cdecl; external gliblib;
+function g_ascii_xdigit_value(c:gchar):gint; cdecl; external gliblib;
+
+
+{ String utility functions that modify a string argument or
+ return a constant string that must not be freed. }
+
+const
+ G_STR_DELIMITERS = '_-|> <.';
+
+function g_strdelimit(_string:Pgchar; delimiters:Pgchar; new_delimiter:gchar):Pgchar; cdecl; external gliblib;
+function g_strcanon(_string:Pgchar; valid_chars:Pgchar; substitutor:gchar):Pgchar; cdecl; external gliblib;
+function g_strerror(errnum:gint):Pgchar; cdecl; external gliblib;
+function g_strsignal(signum:gint):Pgchar; cdecl; external gliblib;
+function g_strreverse(_string:Pgchar):Pgchar; cdecl; external gliblib;
+function g_strlcpy(dest:Pgchar; src:Pgchar; dest_size:gsize):gsize; cdecl; external gliblib;
+function g_strlcat(dest:Pgchar; src:Pgchar; dest_size:gsize):gsize; cdecl; external gliblib;
+function g_strstr_len(haystack:Pgchar; haystack_len:gssize; needle:Pgchar):Pgchar; cdecl; external gliblib;
+function g_strrstr(haystack:Pgchar; needle:Pgchar):Pgchar; cdecl; external gliblib;
+function g_strrstr_len(haystack:Pgchar; haystack_len:gssize; needle:Pgchar):Pgchar; cdecl; external gliblib;
+function g_str_has_suffix(str:Pgchar; suffix:Pgchar):gboolean; cdecl; external gliblib;
+function g_str_has_prefix(str:Pgchar; prefix:Pgchar):gboolean; cdecl; external gliblib;
+{ String to/from double conversion functions }
+function g_strtod(nptr:Pgchar; endptr:PPgchar):gdouble; cdecl; external gliblib;
+function g_ascii_strtod(nptr:Pgchar; endptr:PPgchar):gdouble; cdecl; external gliblib;
+
+{ 29 bytes should enough for all possible values that
+ g_ascii_dtostr can produce.
+ Then add 10 for good measure }
+const
+ G_ASCII_DTOSTR_BUF_SIZE = 29 + 10;
+
+function g_ascii_dtostr(buffer:Pgchar; buf_len:gint; d:gdouble):Pgchar; cdecl; external gliblib;
+function g_ascii_formatd(buffer:Pgchar; buf_len:gint; format:Pgchar; d:gdouble):Pgchar; cdecl; external gliblib;
+{ removes leading spaces }
+function g_strchug(_string:Pgchar):Pgchar; cdecl; external gliblib;
+{ removes trailing spaces }
+function g_strchomp(_string:Pgchar):Pgchar; cdecl; external gliblib;
+{ removes leading & trailing spaces }
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function g_strstrip(_string : PGChar) : PGChar;
+
+function g_ascii_strcasecmp(s1:Pgchar; s2:Pgchar):gint; cdecl; external gliblib;
+function g_ascii_strncasecmp(s1:Pgchar; s2:Pgchar; n:gsize):gint; cdecl; external gliblib;
+function g_ascii_strdown(str:Pgchar; len:gssize):Pgchar; cdecl; external gliblib;
+function g_ascii_strup(str:Pgchar; len:gssize):Pgchar; cdecl; external gliblib;
+
+{$ifndef G_DISABLE_DEPRECATED}
+{ The following four functions are deprecated and will be removed in
+ the next major release. They use the locale-specific tolower and
+ toupper, which is almost never the right thing.
+ }
+function g_strcasecmp(s1:Pgchar; s2:Pgchar):gint; cdecl; external gliblib;
+function g_strncasecmp(s1:Pgchar; s2:Pgchar; n:guint):gint; cdecl; external gliblib;
+function g_strdown(_string:Pgchar):Pgchar; cdecl; external gliblib;
+function g_strup(_string:Pgchar):Pgchar; cdecl; external gliblib;
+{$endif}
+{ G_DISABLE_DEPRECATED }
+
+{ String utility functions that return a newly allocated string which
+ ought to be freed with g_free from the caller at some point.
+ }
+function g_strdup(str:Pgchar):Pgchar; cdecl; external gliblib;
+{$IFNDEF KYLIX}
+function g_strdup_printf(format:Pgchar; args:array of const):Pgchar; cdecl; overload; external gliblib;
+function g_strdup_printf(format:Pgchar):Pgchar; cdecl; overload; varargs; external gliblib;
+function g_strdup_vprintf(format:Pgchar; args: array of const):Pgchar; cdecl; external gliblib;
+{$ELSE}
+function g_strdup_printf(format:Pgchar):Pgchar; varargs; cdecl; external gliblib;
+function g_strdup_vprintf(format:Pgchar):Pgchar; varargs; cdecl; external gliblib;
+{$ENDIF}
+function g_strndup(str:Pgchar; n:gsize):Pgchar; cdecl; external gliblib;
+function g_strnfill(length:gsize; fill_char:gchar):Pgchar; cdecl; external gliblib;
+{$IFNDEF KYLIX}
+function g_strconcat(string1:Pgchar; args:array of const):Pgchar; cdecl; overload; external gliblib;
+function g_strconcat(string1:Pgchar):Pgchar; cdecl; overload; varargs; external gliblib;
+{ NULL terminated }
+function g_strjoin(separator:Pgchar; args:array of const):Pgchar; cdecl; overload; external gliblib;
+function g_strjoin(separator:Pgchar):Pgchar; cdecl; overload; varargs; external gliblib;
+{$ELSE}
+function g_strconcat(string1:Pgchar):Pgchar; varargs; cdecl; external gliblib;
+function g_strjoin(separator:Pgchar):Pgchar; varargs; cdecl; external gliblib;
+{$ENDIF}
+{ NULL terminated }
+{ Make a copy of a string interpreting C string -style escape
+ sequences. Inverse of g_strescape. The recognized sequences are \b
+ \f \n \r \t \\ \" and the octal format.
+ }
+function g_strcompress(source:Pgchar):Pgchar; cdecl; external gliblib;
+{ Copy a string escaping nonprintable characters like in C strings.
+ Inverse of g_strcompress. The exceptions parameter, if non-NULL, points
+ to a string containing characters that are not to be escaped.
+
+ Deprecated API: gchar g_strescape (const gchar source);
+ Luckily this function wasn't used much, using NULL as second parameter
+ provides mostly identical semantics.
+ }
+function g_strescape(source:Pgchar; exceptions:Pgchar):Pgchar; cdecl; external gliblib;
+function g_memdup(mem:gconstpointer; byte_size:guint):gpointer; cdecl; external gliblib;
+{ NULL terminated string arrays.
+ g_strsplit() splits up string into max_tokens tokens at delim and
+ returns a newly allocated string array.
+ g_strjoinv() concatenates all of str_array's strings, sliding in an
+ optional separator, the returned string is newly allocated.
+ g_strfreev() frees the array itself and all of its strings.
+ g_strdupv() copies a NULL-terminated array of strings
+ }
+function g_strsplit(_string:Pgchar; delimiter:Pgchar; max_tokens:gint):PPgchar; cdecl; external gliblib;
+function g_strjoinv(separator:Pgchar; str_array:PPgchar):Pgchar; cdecl; external gliblib;
+procedure g_strfreev(str_array:PPgchar); cdecl; external gliblib;
+function g_strdupv(str_array:PPgchar):PPgchar; cdecl; external gliblib;
+function g_stpcpy(dest:Pgchar; src:Pchar):Pgchar; cdecl; external gliblib;
+
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gstring.inc b/packages/gtk2/src/glib/gstring.inc
new file mode 100644
index 0000000000..174baa45e0
--- /dev/null
+++ b/packages/gtk2/src/glib/gstring.inc
@@ -0,0 +1,105 @@
+{*
+ * gstring.inc
+ *
+ * depends on gtypes.inc, gunicode.inc
+ *}
+
+ type
+ PGString = ^TGString;
+ TGString = record
+ str : Pgchar;
+ len : gsize;
+ allocated_len : gsize;
+ end;
+
+ PGStringChunk = pointer; // structure not known
+
+ { String Chunks
+ }
+
+ function g_string_chunk_new(size:gsize):PGStringChunk;cdecl;external gliblib name 'g_string_chunk_new';
+
+ procedure g_string_chunk_free(chunk:PGStringChunk);cdecl;external gliblib name 'g_string_chunk_free';
+
+ function g_string_chunk_insert(chunk:PGStringChunk; _string:Pgchar):Pgchar;cdecl;external gliblib name 'g_string_chunk_insert';
+
+ function g_string_chunk_insert_const(chunk:PGStringChunk; _string:Pgchar):Pgchar;cdecl;external gliblib name 'g_string_chunk_insert_const';
+
+ { Strings
+ }
+ function g_string_new(init:Pgchar):PGString;cdecl;external gliblib name 'g_string_new';
+
+ function g_string_new_len(init:Pgchar; len:gssize):PGString;cdecl;external gliblib name 'g_string_new_len';
+
+ function g_string_sized_new(dfl_size:gsize):PGString;cdecl;external gliblib name 'g_string_sized_new';
+
+ function g_string_free(_string:PGString; free_segment:gboolean):Pgchar;cdecl;external gliblib name 'g_string_free';
+
+ function g_string_equal(v:PGString; v2:PGString):gboolean;cdecl;external gliblib name 'g_string_equal';
+
+ function g_string_hash(str:PGString):guint;cdecl;external gliblib name 'g_string_hash';
+
+ function g_string_assign(_string:PGString; rval:Pgchar):PGString;cdecl;external gliblib name 'g_string_assign';
+
+ function g_string_truncate(_string:PGString; len:gsize):PGString;cdecl;external gliblib name 'g_string_truncate';
+
+ function g_string_set_size(_string:PGString; len:gsize):PGString;cdecl;external gliblib name 'g_string_set_size';
+
+ function g_string_insert_len(_string:PGString; pos:gssize; val:Pgchar; len:gssize):PGString;cdecl;external gliblib name 'g_string_insert_len';
+
+ function g_string_append(_string:PGString; val:Pgchar):PGString;cdecl;external gliblib name 'g_string_append';
+
+ function g_string_append_len(_string:PGString; val:Pgchar; len:gssize):PGString;cdecl;external gliblib name 'g_string_append_len';
+
+ function g_string_append_c(_string:PGString; c:gchar):PGString;cdecl;external gliblib name 'g_string_append_c';
+
+ function g_string_append_unichar(_string:PGString; wc:gunichar):PGString;cdecl;external gliblib name 'g_string_append_unichar';
+
+ function g_string_prepend(_string:PGString; val:Pgchar):PGString;cdecl;external gliblib name 'g_string_prepend';
+
+ function g_string_prepend_c(_string:PGString; c:gchar):PGString;cdecl;external gliblib name 'g_string_prepend_c';
+
+ function g_string_prepend_unichar(_string:PGString; wc:gunichar):PGString;cdecl;external gliblib name 'g_string_prepend_unichar';
+
+ function g_string_prepend_len(_string:PGString; val:Pgchar; len:gssize):PGString;cdecl;external gliblib name 'g_string_prepend_len';
+
+ function g_string_insert(_string:PGString; pos:gssize; val:Pgchar):PGString;cdecl;external gliblib name 'g_string_insert';
+
+ function g_string_insert_c(_string:PGString; pos:gssize; c:gchar):PGString;cdecl;external gliblib name 'g_string_insert_c';
+
+ function g_string_insert_unichar(_string:PGString; pos:gssize; wc:gunichar):PGString;cdecl;external gliblib name 'g_string_insert_unichar';
+
+ function g_string_erase(_string:PGString; pos:gssize; len:gssize):PGString;cdecl;external gliblib name 'g_string_erase';
+
+ function g_string_ascii_down(_string:PGString):PGString;cdecl;external gliblib name 'g_string_ascii_down';
+
+ function g_string_ascii_up(_string:PGString):PGString;cdecl;external gliblib name 'g_string_ascii_up';
+
+{$IFNDEF KYLIX}
+ procedure g_string_printf(_string:PGString; format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_string_printf';
+ procedure g_string_printf(_string:PGString; format:Pgchar);cdecl;overload;varargs;external gliblib name 'g_string_printf';
+
+ procedure g_string_append_printf(_string:PGString; format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_string_append_printf';
+ procedure g_string_append_printf(_string:PGString; format:Pgchar);cdecl;varargs;overload;external gliblib name 'g_string_append_printf';
+{$ELSE}
+ procedure g_string_printf(_string:PGString; format:Pgchar);varargs;cdecl;external gliblib name 'g_string_printf';
+ procedure g_string_append_printf(_string:PGString; format:Pgchar);varargs;cdecl;external gliblib name 'g_string_append_printf';
+{$ENDIF}
+
+{DEPRECATED functions}
+
+ { The following two functions are deprecated and will be removed in
+ the next major release. They use the locale-specific tolower and
+ toupper, which is almost never the right thing.
+ }
+
+ function g_string_down(_string:PGString):PGString;cdecl;external gliblib name 'g_string_down';
+
+ function g_string_up(_string:PGString):PGString;cdecl;external gliblib name 'g_string_up';
+
+ { These aliases are included for compatibility. }
+
+
+// #define g_string_sprintf g_string_printf;
+// #define g_string_sprintfa g_string_append_printf;
+
diff --git a/packages/gtk2/src/glib/gthread.inc b/packages/gtk2/src/glib/gthread.inc
new file mode 100644
index 0000000000..fa9d1b3fc6
--- /dev/null
+++ b/packages/gtk2/src/glib/gthread.inc
@@ -0,0 +1,278 @@
+//{$ifndef __G_THREAD_H__}
+//{$define __G_THREAD_H__}
+
+//{$include gerror.inc}
+// {$include gtypes.inc}
+
+{* GLib Thread support *}
+
+
+ function g_thread_error_quark : TGQuark; cdecl; external gthreadlib name 'g_thread_error_quark';
+
+
+ function G_THREAD_ERROR: TGQuark;
+
+
+
+
+ type
+ PGThreadError = ^TGThreadError;
+ TGThreadError = ( G_THREAD_ERROR_AGAIN { Resource temporarily unavailable });
+
+ TGThreadFunc = function (data:gpointer):gpointer;cdecl;
+
+ PGThreadPriority = ^TGThreadPriority;
+ TGThreadPriority = (G_THREAD_PRIORITY_LOW,
+ G_THREAD_PRIORITY_NORMAL,
+ G_THREAD_PRIORITY_HIGH,
+ G_THREAD_PRIORITY_URGENT);
+
+ PGThread = ^TGThread;
+ TGThread = record
+ func : TGThreadFunc;
+ data : gpointer;
+ joinable : gboolean;
+ priority : TGThreadPriority;
+ end;
+
+ PPGMutex = ^PGMutex;
+ PGMutex = pointer; // GMutex;
+ PGCond = pointer; // GCond;
+ PGPrivate = pointer; // GPrivate;
+
+// typedef struct _GMutex* GStaticMutex;
+ PGStaticMutex = ^TGStaticMutex;
+ TGStaticMutex = PGMutex;
+
+ PGThreadFunctions = ^TGThreadFunctions;
+ TGThreadFunctions = record
+ mutex_new : function :PGMutex; cdecl;
+ mutex_lock : procedure (mutex:PGMutex); cdecl;
+ mutex_trylock : function (mutex:PGMutex):gboolean; cdecl;
+ mutex_unlock : procedure (mutex:PGMutex); cdecl;
+ mutex_free : procedure (mutex:PGMutex); cdecl;
+ cond_new : function :PGCond; cdecl;
+ cond_signal : procedure (cond:PGCond); cdecl;
+ cond_broadcast : procedure (cond:PGCond); cdecl;
+ cond_wait : procedure (cond:PGCond; mutex:PGMutex); cdecl;
+ cond_timed_wait : function (cond:PGCond; mutex:PGMutex; end_time:PGTimeVal):gboolean; cdecl;
+ cond_free : procedure (cond:PGCond); cdecl;
+ private_new : function (dest:TGDestroyNotify):PGPrivate; cdecl;
+ private_get : function (private_key:PGPrivate):gpointer; cdecl;
+ private_set : procedure (private_key:PGPrivate; data:gpointer); cdecl;
+ thread_create : procedure (func:TGThreadFunc; data:gpointer; stack_size:gulong; joinable:gboolean; bound:gboolean;
+ priority:TGThreadPriority; thread:gpointer; error:PPGError); cdecl;
+ thread_yield : procedure ; cdecl;
+ thread_join : procedure (thread:gpointer); cdecl;
+ thread_exit : procedure ; cdecl;
+ thread_set_priority : procedure (thread:gpointer; priority:TGThreadPriority); cdecl;
+ thread_self : procedure (thread:gpointer); cdecl;
+ thread_equal : function (thread1:gpointer; thread2:gpointer):gboolean; cdecl;
+ end;
+
+
+{$IFNDEF KYLIX}
+ var
+ {$IFDEF WIN32}
+ g_thread_functions_for_glib_use : TGThreadFunctions; external gliblib name 'g_thread_functions_for_glib_use';
+ g_thread_use_default_impl : gboolean; external gliblib name 'g_thread_use_default_impl';
+ g_threads_got_initialized : gboolean; external gliblib name 'g_threads_got_initialized';
+ {$ELSE}
+ g_thread_functions_for_glib_use : TGThreadFunctions;cvar;external; // ?????
+ g_thread_use_default_impl : gboolean;cvar;external;
+ g_threads_got_initialized : gboolean;cvar;external;
+ {$ENDIF}
+{$ENDIF}
+
+
+{ initializes the mutex/cond/private implementation for glib, might
+ only be called once, and must not be called directly or indirectly
+ from another glib-function, e.g. as a callback.
+}
+
+ procedure g_thread_init(vtable:PGThreadFunctions);cdecl;external gthreadlib name 'g_thread_init';
+
+{ Errorcheck mutexes. If you define G_ERRORCHECK_MUTEXES, then all
+ mutexes will check for re-locking and re-unlocking }
+
+{ Initialize thread system with errorcheck mutexes. vtable must be
+ NULL. Do not call directly. Use #define G_ERRORCHECK_MUTEXES
+ instead.
+}
+ procedure g_thread_init_with_errorcheck_mutexes(vtable:PGThreadFunctions);cdecl;external gthreadlib name 'g_thread_init_with_errorcheck_mutexes';
+
+{ A random number to recognize debug calls to g_mutex_... }
+
+ const
+ G_MUTEX_DEBUG_MAGIC = $f8e18ad7;
+
+
+{ internal function for fallback static mutex implementation }
+ function g_static_mutex_get_mutex_impl(mutex:PPGMutex):PGMutex;cdecl;external gthreadlib name 'g_static_mutex_get_mutex_impl';
+
+
+{ shorthands for conditional and unconditional function calls }
+
+ function g_thread_supported: gboolean;
+
+ procedure g_mutex_lock (mutex: PGMutex);
+
+ function g_mutex_trylock (mutex: PGMutex):gboolean;
+
+ procedure g_mutex_unlock (mutex: PGMutex);
+
+ procedure g_mutex_free (mutex: PGMutex);
+
+ procedure g_cond_wait (cond: PGCond; mutex: PGMutex);
+
+ function g_cond_timed_wait (cond: PGCond;
+ mutex: PGMutex;
+ end_time: PGTimeVal):gboolean;
+
+ function g_mutex_new : PGMutex;
+ function g_cond_new : PGCond;
+
+ procedure g_cond_signal (cond: PGCond);
+ procedure g_cond_broadcast (cond: PGCond);
+ procedure g_cond_free (cond: PGCond);
+ function g_private_new (dest: TGDestroyNotify): PGPrivate;
+ function g_private_get (private_key: PGPrivate): gpointer;
+ procedure g_private_set (var private_key: PGPrivate; data: gpointer);
+
+ procedure g_thread_yield;
+
+
+ function g_thread_create (func: TGThreadFunc;
+ data: gpointer;
+ joinable: gboolean;
+ error: PPGError): PGThread;
+
+ function g_thread_create_full (func : TGThreadFunc;
+ data : gpointer;
+ stack_size: gulong;
+ joinable, bound: gboolean;
+ priority : TGThreadPriority;
+ error : ppGError): PGThread; cdecl; external gthreadlib name 'g_thread_create_full';
+
+
+ function g_thread_self:PGThread;cdecl;external gthreadlib name 'g_thread_self';
+
+ procedure g_thread_exit(retval:gpointer);cdecl;external gthreadlib name 'g_thread_exit';
+
+ function g_thread_join(thread:PGThread):gpointer;cdecl;external gthreadlib name 'g_thread_join';
+
+ procedure g_thread_set_priority(thread:PGThread; priority:TGThreadPriority);cdecl;external gthreadlib name 'g_thread_set_priority';
+
+{ GStaticMutexes can be statically initialized with the value
+ G_STATIC_MUTEX_INIT, and then they can directly be used, that is
+ much easier, than having to explicitly allocate the mutex before
+ use
+}
+
+ procedure g_static_mutex_lock (mutex: PGStaticMutex);
+
+ function g_static_mutex_trylock (mutex: PGStaticMutex): gboolean;
+
+ procedure g_static_mutex_unlock (mutex: PGStaticMutex);
+
+
+ procedure g_static_mutex_free(mutex:PGStaticMutex);cdecl;external gthreadlib name 'g_static_mutex_free';
+
+
+ type
+ PGStaticPrivate = ^TGStaticPrivate;
+ TGStaticPrivate = record
+ index : guint;
+ end;
+
+ const
+ nG_STATIC_PRIVATE_INIT = 0; //renamed because of conflict with function_name
+
+ procedure g_static_private_init(private_key:PGStaticPrivate);cdecl;external gthreadlib name 'g_static_private_init';
+
+ function g_static_private_get(private_key:PGStaticPrivate):gpointer;cdecl;external gthreadlib name 'g_static_private_get';
+
+ procedure g_static_private_set(private_key:PGStaticPrivate; data:gpointer; notify:TGDestroyNotify);cdecl;external gthreadlib name 'g_static_private_set';
+
+ procedure g_static_private_free(private_key:PGStaticPrivate);cdecl;external gthreadlib name 'g_static_private_free';
+
+ type
+ PGStaticRecMutex = ^TGStaticRecMutex;
+ TGStaticRecMutex = record
+ mutex : TGStaticMutex;
+ depth : guint;
+ owner : TGSystemThread; // defined in glibconfig.inc
+ end;
+
+ const
+ nG_STATIC_MUTEX_INIT = nil; // from glibconfig.h
+ nG_STATIC_REC_MUTEX_INIT = nG_STATIC_MUTEX_INIT;
+
+
+ procedure g_static_rec_mutex_init(mutex:PGStaticRecMutex);cdecl;external gthreadlib name 'g_static_rec_mutex_init';
+
+ procedure g_static_rec_mutex_lock(mutex:PGStaticRecMutex);cdecl;external gthreadlib name 'g_static_rec_mutex_lock';
+
+ function g_static_rec_mutex_trylock(mutex:PGStaticRecMutex):gboolean;cdecl;external gthreadlib name 'g_static_rec_mutex_trylock';
+
+ procedure g_static_rec_mutex_unlock(mutex:PGStaticRecMutex);cdecl;external gthreadlib name 'g_static_rec_mutex_unlock';
+
+ procedure g_static_rec_mutex_lock_full(mutex:PGStaticRecMutex; depth:guint);cdecl;external gthreadlib name 'g_static_rec_mutex_lock_full';
+
+ function g_static_rec_mutex_unlock_full(mutex:PGStaticRecMutex):guint;cdecl;external gthreadlib name 'g_static_rec_mutex_unlock_full';
+
+ procedure g_static_rec_mutex_free(mutex:PGStaticRecMutex);cdecl;external gthreadlib name 'g_static_rec_mutex_free';
+
+
+ type
+ PGStaticRWLock = ^TGStaticRWLock;
+ TGStaticRWLock = record
+ mutex : TGStaticMutex;
+ read_cond : PGCond;
+ write_cond : PGCond;
+ read_counter : guint;
+ write : gboolean;
+ want_to_read : guint;
+ want_to_write : guint;
+ end;
+
+{* i can't translate this macro. any ideas???
+ *
+ * #define G_STATIC_RW_LOCK_INIT G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0
+ *}
+
+ procedure g_static_rw_lock_init(lock:PGStaticRWLock);cdecl;external gthreadlib name 'g_static_rw_lock_init';
+
+ procedure g_static_rw_lock_reader_lock(lock:PGStaticRWLock);cdecl;external gthreadlib name 'g_static_rw_lock_reader_lock';
+
+ function g_static_rw_lock_reader_trylock(lock:PGStaticRWLock):gboolean;cdecl;external gthreadlib name 'g_static_rw_lock_reader_trylock';
+
+ procedure g_static_rw_lock_reader_unlock(lock:PGStaticRWLock);cdecl;external gthreadlib name 'g_static_rw_lock_reader_unlock';
+
+ procedure g_static_rw_lock_writer_lock(lock:PGStaticRWLock);cdecl;external gthreadlib name 'g_static_rw_lock_writer_lock';
+
+ function g_static_rw_lock_writer_trylock(lock:PGStaticRWLock):gboolean;cdecl;external gthreadlib name 'g_static_rw_lock_writer_trylock';
+
+ procedure g_static_rw_lock_writer_unlock(lock:PGStaticRWLock);cdecl;external gthreadlib name 'g_static_rw_lock_writer_unlock';
+
+ procedure g_static_rw_lock_free(lock:PGStaticRWLock);cdecl;external gthreadlib name 'g_static_rw_lock_free';
+
+{ these are some convenience macros that expand to nothing if GLib
+ was configured with --disable-threads. for using StaticMutexes,
+ you define them with G_LOCK_DEFINE_STATIC (name) or G_LOCK_DEFINE (name)
+ if you need to export the mutex. With G_LOCK_EXTERN (name) you can
+ declare such an globally defined lock. name is a unique identifier
+ for the protected varibale or code portion. locking, testing and
+ unlocking of such mutexes can be done with G_LOCK(), G_UNLOCK() and
+ G_TRYLOCK() respectively.
+}
+ procedure glib_dummy_decl;cdecl;external gthreadlib name 'glib_dummy_decl';
+
+{ anyone an idea???
+ #define G_LOCK_NAME(name) g__ ## name ## _lock
+ #define G_LOCK(name) g_static_mutex_lock (&G_LOCK_NAME (name))
+ #define G_UNLOCK(name) g_static_mutex_unlock (&G_LOCK_NAME (name))
+ #define G_TRYLOCK(name) g_static_mutex_trylock (&G_LOCK_NAME (name))
+}
+
+//{$endif}
diff --git a/packages/gtk2/src/glib/gthreadpool.inc b/packages/gtk2/src/glib/gthreadpool.inc
new file mode 100644
index 0000000000..b2a04d436f
--- /dev/null
+++ b/packages/gtk2/src/glib/gthreadpool.inc
@@ -0,0 +1,57 @@
+// included by glib2.pas
+
+type
+{ Thread Pools }
+
+{ The real GThreadPool is bigger, so you may only create a thread
+ pool with the constructor function }
+ PGThreadPool = ^TGThreadPool;
+ TGThreadPool = record
+ func : TGFunc;
+ user_data : gpointer;
+ exclusive : gboolean;
+ end;
+
+{ Get a thread pool with the function func, at most max_threads may
+ run at a time (max_threads == -1 means no limit), exclusive == TRUE
+ means, that the threads shouldn't be shared and that they will be
+ prestarted (otherwise they are started as needed) user_data is the
+ 2nd argument to the func }
+function g_thread_pool_new(func:TGFunc; user_data:gpointer; max_threads:gint; exclusive:gboolean; error:PPGError):PGThreadPool; cdecl; external gliblib;
+
+{ Push new data into the thread pool. This task is assigned to a thread later
+ (when the maximal number of threads is reached for that pool) or now
+ (otherwise). If necessary a new thread will be started. The function
+ returns immediatly }
+procedure g_thread_pool_push(pool:PGThreadPool; data:gpointer; error:PPGError); cdecl; external gliblib;
+
+{ Set the number of threads, which can run concurrently for that pool, -1
+ means no limit. 0 means has the effect, that the pool won't process
+ requests until the limit is set higher again }
+procedure g_thread_pool_set_max_threads(pool:PGThreadPool; max_threads:gint; error:PPGError); cdecl; external gliblib;
+function g_thread_pool_get_max_threads(pool:PGThreadPool):gint; cdecl; external gliblib;
+
+{ Get the number of threads assigned to that pool. This number doesn't
+ necessarily represent the number of working threads in that pool }
+function g_thread_pool_get_num_threads(pool:PGThreadPool):guint; cdecl; external gliblib;
+
+{ Get the number of unprocessed items in the pool }
+function g_thread_pool_unprocessed(pool:PGThreadPool):guint; cdecl; external gliblib;
+
+{ Free the pool, immediate means, that all unprocessed items in the queue
+ wont be processed, wait means, that the function doesn't return immediatly,
+ but after all threads in the pool are ready processing items. immediate
+ does however not mean, that threads are killed. }
+procedure g_thread_pool_free(pool:PGThreadPool; immediate:gboolean; wait:gboolean); cdecl; external gliblib;
+
+{ Set the maximal number of unused threads before threads will be stopped by
+ GLib, -1 means no limit }
+procedure g_thread_pool_set_max_unused_threads(max_threads:gint); cdecl; external gliblib;
+function g_thread_pool_get_max_unused_threads:gint; cdecl; external gliblib;
+function g_thread_pool_get_num_unused_threads:guint; cdecl; external gliblib;
+
+{ Stop all currently unused threads, but leave the limit untouched }
+procedure g_thread_pool_stop_unused_threads; cdecl; external gliblib;
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gtimer.inc b/packages/gtk2/src/glib/gtimer.inc
new file mode 100644
index 0000000000..1484e2fe3a
--- /dev/null
+++ b/packages/gtk2/src/glib/gtimer.inc
@@ -0,0 +1,23 @@
+// included by glib2.pas
+
+{ Timer }
+
+type
+ PGTimer = pointer;
+
+{ microseconds per second }
+
+const
+ G_USEC_PER_SEC = 1000000;
+
+function g_timer_new:PGTimer; cdecl; external gliblib;
+procedure g_timer_destroy(timer:PGTimer); cdecl; external gliblib;
+procedure g_timer_start(timer:PGTimer); cdecl; external gliblib;
+procedure g_timer_stop(timer:PGTimer); cdecl; external gliblib;
+procedure g_timer_reset(timer:PGTimer); cdecl; external gliblib;
+function g_timer_elapsed(timer:PGTimer; microseconds:Pgulong):gdouble; cdecl; external gliblib;
+procedure g_usleep(microseconds:gulong); cdecl; external gliblib;
+procedure g_time_val_add(time:PGTimeVal; microseconds:glong); cdecl; external gliblib;
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gtree.inc b/packages/gtk2/src/glib/gtree.inc
new file mode 100644
index 0000000000..3a06399061
--- /dev/null
+++ b/packages/gtk2/src/glib/gtree.inc
@@ -0,0 +1,30 @@
+// included by glib2.pas
+type
+ PGTree = pointer;
+ TGTraverseFunc = function (key:gpointer; value:gpointer; data:gpointer):gboolean; cdecl;
+
+{ Balanced binary trees }
+
+function g_tree_new(key_compare_func:TGCompareFunc):PGTree; cdecl; external gliblib;
+function g_tree_new_with_data(key_compare_func:TGCompareDataFunc; key_compare_data:gpointer):PGTree; cdecl; external gliblib;
+function g_tree_new_full(key_compare_func:TGCompareDataFunc; key_compare_data:gpointer; key_destroy_func:TGDestroyNotify; value_destroy_func:TGDestroyNotify):PGTree; cdecl; external gliblib;
+procedure g_tree_destroy(tree:PGTree); cdecl; external gliblib;
+procedure g_tree_insert(tree:PGTree; key:gpointer; value:gpointer); cdecl; external gliblib;
+procedure g_tree_replace(tree:PGTree; key:gpointer; value:gpointer); cdecl; external gliblib;
+procedure g_tree_remove(tree:PGTree; key:gconstpointer); cdecl; external gliblib;
+procedure g_tree_steal(tree:PGTree; key:gconstpointer); cdecl; external gliblib;
+function g_tree_lookup(tree:PGTree; key:gconstpointer):gpointer; cdecl; external gliblib;
+function g_tree_lookup_extended(tree:PGTree; lookup_key:gconstpointer; orig_key:Pgpointer; value:Pgpointer):gboolean; cdecl; external gliblib;
+procedure g_tree_foreach(tree:PGTree; func:TGTraverseFunc; user_data:gpointer); cdecl; external gliblib;
+
+{$ifndef G_DISABLE_DEPRECATED}
+procedure g_tree_traverse(tree:PGTree; traverse_func:TGTraverseFunc; traverse_type:TGTraverseType; user_data:gpointer); cdecl; external gliblib;
+{$endif}
+{ G_DISABLE_DEPRECATED }
+
+function g_tree_search(tree:PGTree; search_func:TGCompareFunc; user_data:gconstpointer):gpointer; cdecl; external gliblib;
+function g_tree_height(tree:PGTree):gint; cdecl; external gliblib;
+function g_tree_nnodes(tree:PGTree):gint; cdecl; external gliblib;
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gtype.inc b/packages/gtk2/src/glib/gtype.inc
new file mode 100644
index 0000000000..2fa72e7f47
--- /dev/null
+++ b/packages/gtk2/src/glib/gtype.inc
@@ -0,0 +1,281 @@
+// included by glib2.pas
+
+{$IFDEF read_forward_definitions}
+{ Typedefs }
+ PGType = ^GType;
+ GType = gulong;
+
+{ Basic Type Structures }
+{< private > }
+ PGTypeClass = ^TGTypeClass;
+ TGTypeClass = record
+ g_type : GType;
+ end;
+
+{< private > }
+ PGTypeInstance = ^TGTypeInstance;
+ TGTypeInstance = record
+ g_class : PGTypeClass;
+ end;
+
+{< private > }
+{ iface type }
+ PGTypeInterface = ^TGTypeInterface;
+ TGTypeInterface = record
+ g_type : GType;
+ g_instance_type : GType;
+ end;
+
+ PGTypeQuery = ^TGTypeQuery;
+ TGTypeQuery = record
+ _type : GType;
+ type_name : Pgchar;
+ class_size : guint;
+ instance_size : guint;
+ end;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+{ Basic Type Macros }
+
+const
+ G_TYPE_FUNDAMENTAL_SHIFT = 2;
+ G_TYPE_FUNDAMENTAL_MAX = 255 shl G_TYPE_FUNDAMENTAL_SHIFT;
+
+{ Constant fundamental types,
+ introduced by g_type_init(). }
+ G_TYPE_INVALID = GType(0 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_NONE = GType(1 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_INTERFACE = GType(2 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_CHAR = GType(3 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_UCHAR = GType(4 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_BOOLEAN = GType(5 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_INT = GType(6 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_UINT = GType(7 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_LONG = GType(8 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_ULONG = GType(9 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_INT64 = GType(10 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_UINT64 = GType(11 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_ENUM = GType(12 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_FLAGS = GType(13 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_FLOAT = GType(14 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_DOUBLE = GType(15 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_STRING = GType(16 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_POINTER = GType(17 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_BOXED = GType(18 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_PARAM = GType(19 shl G_TYPE_FUNDAMENTAL_SHIFT);
+ G_TYPE_OBJECT = GType(20 shl G_TYPE_FUNDAMENTAL_SHIFT);
+
+{ Reserved fundamental type numbers to create new fundamental
+ type IDs with G_TYPE_MAKE_FUNDAMENTAL().
+ Send email to gtk-devel-list@redhat.com for reservations.
+ }
+
+function G_TYPE_MAKE_FUNDAMENTAL(x : longint) : GType;
+
+
+const
+ G_TYPE_RESERVED_GLIB_FIRST = 21;
+ G_TYPE_RESERVED_GLIB_LAST = 31;
+ G_TYPE_RESERVED_BSE_FIRST = 32;
+ G_TYPE_RESERVED_BSE_LAST = 48;
+ G_TYPE_RESERVED_USER_FIRST = 49;
+
+
+{ Type Checking Macros }
+
+function G_TYPE_IS_FUNDAMENTAL(_type : GType) : boolean;
+function G_TYPE_IS_DERIVED(_type : GType) : boolean;
+function G_TYPE_IS_INTERFACE(_type : GType) : boolean;
+function G_TYPE_IS_CLASSED(_type : GType) : gboolean;
+function G_TYPE_IS_INSTANTIATABLE(_type : GType) : boolean;
+function G_TYPE_IS_DERIVABLE(_type : GType) : boolean;
+function G_TYPE_IS_DEEP_DERIVABLE(_type : GType) : boolean;
+function G_TYPE_IS_ABSTRACT(_type : GType) : boolean;
+function G_TYPE_IS_VALUE_ABSTRACT(_type : GType) : boolean;
+function G_TYPE_IS_VALUE_TYPE(_type : GType) : boolean;
+function G_TYPE_HAS_VALUE_TABLE(_type : GType) : boolean;
+
+{ Casts, checks and accessors for structured types
+ usage of these macros is reserved to type implementations only }
+{< protected > }
+function G_TYPE_CHECK_INSTANCE(instance : Pointer) : gboolean;
+function G_TYPE_CHECK_INSTANCE_CAST(instance: Pointer; g_type: GType) : PGTypeInstance;
+function G_TYPE_CHECK_INSTANCE_TYPE(instance: Pointer; g_type: GType) : boolean;
+function G_TYPE_INSTANCE_GET_CLASS(instance: Pointer; g_type: GType) : PGTypeClass;
+function G_TYPE_INSTANCE_GET_INTERFACE(instance: Pointer; g_type: GType) : Pointer;
+function G_TYPE_CHECK_CLASS_CAST(g_class: pointer; g_type: GType) : Pointer;
+function G_TYPE_CHECK_CLASS_TYPE(g_class: pointer; g_type : GType) : boolean;
+function G_TYPE_CHECK_VALUE(value : Pointer) : boolean;
+function G_TYPE_CHECK_VALUE_TYPE(value: pointer; g_type : GType) : boolean;
+function G_TYPE_FROM_INSTANCE(instance : Pointer) : GType;
+function G_TYPE_FROM_CLASS(g_class : Pointer) : GType;
+function G_TYPE_FROM_INTERFACE(g_iface : Pointer) : GType;
+
+{ debug flags for g_type_init_with_debug_flags() }
+{< skip > }
+type
+ PGTypeDebugFlags = ^TGTypeDebugFlags;
+ TGTypeDebugFlags = longint;
+
+const
+ G_TYPE_DEBUG_NONE = 0;
+ G_TYPE_DEBUG_OBJECTS = 1 shl 0;
+ G_TYPE_DEBUG_SIGNALS = 1 shl 1;
+ G_TYPE_DEBUG_MASK = $03;
+
+
+{ --- prototypes --- }
+
+procedure g_type_init; cdecl; external gobjectlib;
+procedure g_type_init_with_debug_flags(debug_flags:TGTypeDebugFlags); cdecl; external gobjectlib;
+function g_type_name(_type:GType):Pgchar; cdecl; external gobjectlib;
+function g_type_qname(_type:GType):TGQuark; cdecl; external gobjectlib;
+function g_type_from_name(name:Pgchar):GType; cdecl; external gobjectlib;
+function g_type_parent(_type:GType):GType; cdecl; external gobjectlib;
+function g_type_depth(_type:GType):guint; cdecl; external gobjectlib;
+function g_type_next_base(leaf_type:GType; root_type:GType):GType; cdecl; external gobjectlib;
+function g_type_is_a(_type:GType; is_a_type:GType):gboolean; cdecl; external gobjectlib;
+function g_type_class_ref(_type:GType):gpointer; cdecl; external gobjectlib;
+function g_type_class_peek(_type:GType):gpointer; cdecl; external gobjectlib;
+procedure g_type_class_unref(g_class:gpointer); cdecl; external gobjectlib;
+function g_type_class_peek_parent(g_class:gpointer):gpointer; cdecl; external gobjectlib;
+function g_type_interface_peek(instance_class:gpointer; iface_type:GType):gpointer; cdecl; external gobjectlib;
+function g_type_interface_peek_parent(g_iface:gpointer):gpointer; cdecl; external gobjectlib;
+{ g_free() the returned arrays }
+function g_type_children(_type:GType; n_children:Pguint):PGType; cdecl; external gobjectlib;
+function g_type_interfaces(_type:GType; n_interfaces:Pguint):PGType; cdecl; external gobjectlib;
+{ per-type _static_ data }
+procedure g_type_set_qdata(_type:GType; quark:TGQuark; data:gpointer); cdecl; external gobjectlib;
+function g_type_get_qdata(_type:GType; quark:TGQuark):gpointer; cdecl; external gobjectlib;
+procedure g_type_query(_type:GType; query:PGTypeQuery); cdecl; external gobjectlib;
+
+
+{ --- type registration --- }
+type
+ TGBaseInitFunc = procedure (g_class:gpointer); cdecl;
+
+ TGBaseFinalizeFunc = procedure (g_class:gpointer); cdecl;
+
+ TGClassInitFunc = procedure (g_class:gpointer; class_data:gpointer); cdecl;
+
+ TGClassFinalizeFunc = procedure (g_class:gpointer; class_data:gpointer); cdecl;
+
+ TGInstanceInitFunc = procedure (instance:PGTypeInstance; g_class:gpointer); cdecl;
+
+ TGInterfaceInitFunc = procedure (g_iface:gpointer; iface_data:gpointer); cdecl;
+
+ TGInterfaceFinalizeFunc = procedure (g_iface:gpointer; iface_data:gpointer); cdecl;
+
+ TGTypeClassCacheFunc = function (cache_data:gpointer; g_class:PGTypeClass):gboolean; cdecl;
+
+{< skip > }
+
+ PGTypeFundamentalFlags = ^TGTypeFundamentalFlags;
+ TGTypeFundamentalFlags = longint;
+
+const
+ G_TYPE_FLAG_CLASSED = 1 shl 0;
+ G_TYPE_FLAG_INSTANTIATABLE = 1 shl 1;
+ G_TYPE_FLAG_DERIVABLE = 1 shl 2;
+ G_TYPE_FLAG_DEEP_DERIVABLE = 1 shl 3;
+
+
+{< skip > }
+type
+ PGTypeFlags = ^TGTypeFlags;
+ TGTypeFlags = longint;
+
+const
+ G_TYPE_FLAG_ABSTRACT = 1 shl 4;
+ G_TYPE_FLAG_VALUE_ABSTRACT = 1 shl 5;
+
+type
+{ interface types, classed types, instantiated types }
+
+{ varargs functionality (optional) }
+ PGTypeValueTable = ^TGTypeValueTable;
+ TGTypeValueTable = record
+ value_init : procedure (value:PGValue); cdecl;
+ value_free : procedure (value:PGValue); cdecl;
+ value_copy : procedure (src_value:PGValue; dest_value:PGValue); cdecl;
+ value_peek_pointer : function (value:PGValue):gpointer; cdecl;
+ collect_format : Pgchar;
+ collect_value : function (value:PGValue; n_collect_values:guint; collect_values:PGTypeCValue; collect_flags:guint):Pgchar; cdecl;
+ lcopy_format : Pgchar;
+ lcopy_value : function (value:PGValue; n_collect_values:guint; collect_values:PGTypeCValue; collect_flags:guint):Pgchar; cdecl;
+ end;
+
+
+{ classed types, instantiated types }
+{ instantiated types }
+{ value handling }
+ PGTypeInfo = ^TGTypeInfo;
+ TGTypeInfo = record
+ class_size : guint16;
+ base_init : TGBaseInitFunc;
+ base_finalize : TGBaseFinalizeFunc;
+ class_init : TGClassInitFunc;
+ class_finalize : TGClassFinalizeFunc;
+ class_data : gconstpointer;
+ instance_size : guint16;
+ n_preallocs : guint16;
+ instance_init : TGInstanceInitFunc;
+ value_table : PGTypeValueTable;
+ end;
+
+ PGTypeFundamentalInfo = ^TGTypeFundamentalInfo;
+ TGTypeFundamentalInfo = record
+ type_flags : TGTypeFundamentalFlags;
+ end;
+
+ PGInterfaceInfo = ^TGInterfaceInfo;
+ TGInterfaceInfo = record
+ interface_init : TGInterfaceInitFunc;
+ interface_finalize : TGInterfaceFinalizeFunc;
+ interface_data : gpointer;
+ end;
+
+
+function g_type_register_static(parent_type:GType; type_name:Pgchar; info:PGTypeInfo; flags:TGTypeFlags):GType; cdecl; external gobjectlib;
+function g_type_register_dynamic(parent_type:GType; type_name:Pgchar; plugin:PGTypePlugin; flags:TGTypeFlags):GType; cdecl; external gobjectlib;
+function g_type_register_fundamental(type_id:GType; type_name:Pgchar; info:PGTypeInfo; finfo:PGTypeFundamentalInfo; flags:TGTypeFlags):GType; cdecl; external gobjectlib;
+procedure g_type_add_interface_static(instance_type:GType; interface_type:GType; info:PGInterfaceInfo); cdecl; external gobjectlib;
+procedure g_type_add_interface_dynamic(instance_type:GType; interface_type:GType; plugin:PGTypePlugin); cdecl; external gobjectlib;
+procedure g_type_interface_add_prerequisite(interface_type:GType; prerequisite_type:GType); cdecl; external gobjectlib;
+{ --- protected (for fundamental type implementations) --- }
+function g_type_get_plugin(_type:GType):PGTypePlugin; cdecl; external gobjectlib;
+function g_type_interface_get_plugin(instance_type:GType; implementation_type:GType):PGTypePlugin; cdecl; external gobjectlib;
+function g_type_fundamental_next:GType; cdecl; external gobjectlib;
+function g_type_fundamental(type_id:GType):GType; cdecl; external gobjectlib;
+function g_type_create_instance(_type:GType):PGTypeInstance; cdecl; external gobjectlib;
+procedure g_type_free_instance(instance:PGTypeInstance); cdecl; external gobjectlib;
+procedure g_type_add_class_cache_func(cache_data:gpointer; cache_func:TGTypeClassCacheFunc); cdecl; external gobjectlib;
+procedure g_type_remove_class_cache_func(cache_data:gpointer; cache_func:TGTypeClassCacheFunc); cdecl; external gobjectlib;
+procedure g_type_class_unref_uncached(g_class:gpointer); cdecl; external gobjectlib;
+function g_type_value_table_peek(_type:GType):PGTypeValueTable; cdecl; external gobjectlib;
+{< private > }
+function private_g_type_check_instance(instance:PGTypeInstance):gboolean; cdecl; external gobjectlib name 'g_type_check_instance';
+function private_g_type_check_instance_cast(instance:PGTypeInstance; iface_type:GType):PGTypeInstance; cdecl; external gobjectlib name 'g_type_check_instance_cast';
+function private_g_type_check_instance_is_a(instance:PGTypeInstance; iface_type:GType):gboolean; cdecl; external gobjectlib name 'g_type_check_instance_is_a';
+function private_g_type_check_class_cast(g_class:PGTypeClass; is_a_type:GType):PGTypeClass; cdecl; external gobjectlib name 'g_type_check_class_cast';
+function private_g_type_check_class_is_a(g_class:PGTypeClass; is_a_type:GType):gboolean; cdecl; external gobjectlib name 'g_type_check_class_is_a';
+function private_g_type_check_is_value_type(_type:GType):gboolean; cdecl; external gobjectlib name 'g_type_check_is_value_type';
+function private_g_type_check_value(value:PGValue):gboolean; cdecl; external gobjectlib name 'g_type_check_value';
+function private_g_type_check_value_holds(value:PGValue; _type:GType):gboolean; cdecl; external gobjectlib name 'g_type_check_value_holds';
+function private_g_type_test_flags(_type:GType; flags:guint):gboolean; cdecl; external gobjectlib name 'g_type_test_flags';
+{ --- debugging functions --- }
+function g_type_name_from_instance(instance:PGTypeInstance):Pgchar; cdecl; external gobjectlib;
+function g_type_name_from_class(g_class:PGTypeClass):Pgchar; cdecl; external gobjectlib;
+{ --- implementation bits --- }
+
+const
+ G_TYPE_FLAG_RESERVED_ID_BIT = GType(1 shl 0);
+
+{$ENDIF read_interface_rest}
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gtypemodule.inc b/packages/gtk2/src/glib/gtypemodule.inc
new file mode 100644
index 0000000000..440a836968
--- /dev/null
+++ b/packages/gtk2/src/glib/gtypemodule.inc
@@ -0,0 +1,145 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ GObject - GLib Type, Object, Parameter and Signal Library
+ Copyright (C) 2000 Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+ }
+{$if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)}
+{$error "Only <glib-anObject.h> can be included directly."}
+{$endif}
+{$ifndef __G_TYPE_MODULE_H__}
+{$define __G_TYPE_MODULE_H__}
+{$include <gobject/gobject.inc}
+type
+function G_TYPE_TYPE_MODULE : longint;
+ { return type might be wrong }
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_TYPE_MODULE(module : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_TYPE_MODULE_CLASS(_class : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_TYPE_MODULE(module : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_TYPE_MODULE_CLASS(_class : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_TYPE_MODULE_GET_CLASS(module : longint) : longint;
+
+type
+ PGTypeModule = ^TGTypeModule;
+ TGTypeModule = record
+ parent_instance : TGObject;
+ use_count : guint;
+ type_infos : PGSList;
+ interface_infos : PGSList;
+ name : Pgchar;
+ end;
+
+{ Padding for future expansion }
+ PGTypeModuleClass = ^TGTypeModuleClass;
+ TGTypeModuleClass = record
+ parent_class : TGObjectClass;
+ load : function (module:PGTypeModule):gboolean; cdecl;
+ unload : procedure (module:PGTypeModule); cdecl;
+ reserved1 : procedure ; cdecl;
+ reserved2 : procedure ; cdecl;
+ reserved3 : procedure ; cdecl;
+ reserved4 : procedure ; cdecl;
+ end;
+
+
+function g_type_module_get_type:GType; cdecl; external gliblib;
+function g_type_module_use(module:PGTypeModule):gboolean; cdecl; external gliblib;
+procedure g_type_module_unuse(module:PGTypeModule); cdecl; external gliblib;
+
+procedure g_type_module_set_name(module:PGTypeModule; name:Pgchar); cdecl; external gliblib;
+
+
+function g_type_module_register_type(module:PGTypeModule; parent_type:GType; type_name:Pgchar; type_info:PGTypeInfo; flags:TGTypeFlags):GType; cdecl; external gliblib;
+
+procedure g_type_module_add_interface(module:PGTypeModule; instance_type:GType; interface_type:GType; interface_info:PGInterfaceInfo); cdecl; external gliblib;
+{$endif}
+{ __G_TYPE_MODULE_H__ }
+function G_TYPE_TYPE_MODULE : longint;
+begin
+ G_TYPE_TYPE_MODULE:=g_type_module_get_type;
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_TYPE_MODULE(module : longint) : longint;
+begin
+ G_TYPE_MODULE:=PGTypeModule(G_TYPE_CHECK_INSTANCE_CAST(module,G_TYPE_TYPE_MODULE));
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_TYPE_MODULE_CLASS(_class : longint) : longint;
+begin
+ G_TYPE_MODULE_CLASS:=PGTypeModuleClass(G_TYPE_CHECK_CLASS_CAST(_class,G_TYPE_TYPE_MODULE));
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_TYPE_MODULE(module : longint) : longint;
+begin
+ G_IS_TYPE_MODULE:=G_TYPE_CHECK_INSTANCE_TYPE(module,G_TYPE_TYPE_MODULE);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_IS_TYPE_MODULE_CLASS(_class : longint) : longint;
+begin
+ G_IS_TYPE_MODULE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(_class,G_TYPE_TYPE_MODULE);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function G_TYPE_MODULE_GET_CLASS(module : longint) : longint;
+begin
+ G_TYPE_MODULE_GET_CLASS:=PGTypeModuleClass(G_TYPE_INSTANCE_GET_CLASS(module,G_TYPE_TYPE_MODULE));
+end;
+
+
diff --git a/packages/gtk2/src/glib/gtypeplugin.inc b/packages/gtk2/src/glib/gtypeplugin.inc
new file mode 100644
index 0000000000..522397064b
--- /dev/null
+++ b/packages/gtk2/src/glib/gtypeplugin.inc
@@ -0,0 +1,45 @@
+// included by glib2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{ --- typedefs & structures --- }
+type
+ TGTypePluginUse = procedure (plugin:PGTypePlugin); cdecl;
+
+ TGTypePluginUnuse = procedure (plugin:PGTypePlugin); cdecl;
+
+ TGTypePluginCompleteTypeInfo = procedure (plugin:PGTypePlugin; g_type:GType; info:PGTypeInfo; value_table:PGTypeValueTable); cdecl;
+
+ TGTypePluginCompleteInterfaceInfo = procedure (plugin:PGTypePlugin; instance_type:GType; interface_type:GType; info:PGInterfaceInfo); cdecl;
+ PGTypePluginClass = ^TGTypePluginClass;
+ TGTypePluginClass = record
+ base_iface : TGTypeInterface;
+ use_plugin : TGTypePluginUse;
+ unuse_plugin : TGTypePluginUnuse;
+ complete_type_info : TGTypePluginCompleteTypeInfo;
+ complete_interface_info : TGTypePluginCompleteInterfaceInfo;
+ end;
+
+function G_TYPE_TYPE_PLUGIN : GType;
+function G_TYPE_PLUGIN(inst : Pointer) : PGTypePlugin;
+function G_TYPE_PLUGIN_CLASS(vtable : Pointer) : PGTypePluginClass;
+function G_IS_TYPE_PLUGIN(inst : Pointer) : boolean;
+function G_IS_TYPE_PLUGIN_CLASS(vtable : Pointer) : boolean;
+function G_TYPE_PLUGIN_GET_CLASS(inst : Pointer) : PGTypePluginClass;
+
+
+{ --- prototypes --- }
+
+function g_type_plugin_get_type:GType; cdecl; external gliblib;
+procedure g_type_plugin_use(plugin:PGTypePlugin); cdecl; external gliblib;
+procedure g_type_plugin_unuse(plugin:PGTypePlugin); cdecl; external gliblib;
+procedure g_type_plugin_complete_type_info(plugin:PGTypePlugin; g_type:GType; info:PGTypeInfo; value_table:PGTypeValueTable); cdecl; external gliblib;
+procedure g_type_plugin_complete_interface_info(plugin:PGTypePlugin; instance_type:GType; interface_type:GType; info:PGInterfaceInfo); cdecl; external gliblib;
+{$ENDIF read_interface_rest}
+
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gtypes.inc b/packages/gtk2/src/glib/gtypes.inc
new file mode 100644
index 0000000000..5ee8479711
--- /dev/null
+++ b/packages/gtk2/src/glib/gtypes.inc
@@ -0,0 +1,136 @@
+// included by glib2.pas
+
+{*
+ * gtypes.inc
+ *
+ * depends on glibconfig.inc
+ *}
+
+{$IFDEF read_forward_definitions}
+ {$IFDEF KYLIX}
+ dword = Cardinal;
+ qword = Int64;
+ {$ENDIF}
+
+ PPPchar = ^PPchar;
+ PPPgchar = ^PPgchar;
+ PPgchar = ^Pgchar;
+ {$IFNDEF KYLIX}
+ Pgchar = ^gchar;
+ {$ELSE}
+ Pgchar = PChar;
+ {$ENDIF}
+ gchar = char;
+
+ Pgshort = ^gshort;
+ gshort = cshort;
+
+ Pglong = ^glong;
+ glong = clong;
+
+ Pgint = ^gint;
+ PPgint = ^Pgint;
+ gint = cint;
+
+ Pgboolean = ^gboolean;
+ gboolean = longbool;
+
+ Pguchar = ^guchar;
+ PPguchar = ^Pguchar;
+ guchar = byte;
+
+ Pgushort = ^gushort;
+ gushort = cushort;
+
+ Pgulong = ^gulong;
+ gulong = culong;
+
+ Pguint = ^guint;
+ guint = cuint;
+
+ Pgfloat = ^gfloat;
+ gfloat = cfloat;
+
+ Pgdouble = ^gdouble;
+ gdouble = cdouble;
+
+ pgpointer = ^gpointer;
+ gpointer = pointer;
+ gconstpointer = pointer;
+
+ PGCompareFunc = ^TGCompareFunc;
+ TGCompareFunc = function (a, b: gconstpointer): gint; cdecl;
+
+ PGCompareDataFunc = ^TGCompareDataFunc;
+ TGCompareDataFunc = function (a, b: gconstpointer;
+ user_data: gpointer): gint; cdecl;
+
+ PGEqualFunc = ^TGEqualFunc;
+ TGEqualFunc = function (a, b: gconstpointer): gboolean; cdecl;
+
+ PGDestroyNotify = ^TGDestroyNotify;
+ TGDestroyNotify = procedure (data: gpointer);cdecl;
+
+ PGFunc = ^TGFunc;
+ TGFunc = procedure (data, userdata: gpointer;
+ key : gconstpointer); cdecl;
+
+ PGHashFunc = ^TGHashFunc;
+ TGHashFunc = function (key : gconstpointer): guint; cdecl;
+
+
+ PGHFunc = ^TGHFunc;
+ TGHFunc = procedure (key, value, user_data: gpointer); cdecl;
+
+ PGFreeFunc = procedure (data: gpointer); cdecl;
+
+ PGTimeVal = ^TGTimeVal;
+ TGTimeVal = record
+ tv_sec : glong;
+ tv_usec : glong;
+ end;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+{ Mathematische Konstanten}
+
+ const
+ G_E = 2.7182818284590452354E0;
+ G_LN2 = 6.9314718055994530942E-1;
+ G_LN10 = 2.3025850929940456840E0;
+ G_PI = 3.14159265358979323846E0;
+ G_PI_2 = 1.57079632679489661923E0;
+ G_PI_4 = 0.78539816339744830962E0;
+ G_SQRT2 = 1.4142135623730950488E0;
+
+{ byteorder}
+ G_LITTLE_ENDIAN = 1234;
+ G_BIG_ENDIAN = 4321;
+ G_PDP_ENDIAN = 3412; { unused, need specific PDP check }
+{
+
+ Basic bit swapping functions
+}
+function GUINT16_SWAP_LE_BE_CONSTANT(val: guint16): guint16;
+function GUINT32_SWAP_LE_BE_CONSTANT(val: guint32): guint32;
+
+{
+ Portable versions of host-network order stuff
+}
+{ ToDo:
+function g_ntohl(val): guint32;
+// Result:=GUINT32_FROM_BE (val);
+function g_ntohs(val): guint16;
+// Result:=GUINT16_FROM_BE (val);
+function g_htonl(val): guint32;
+// Result:=GUINT32_TO_BE (val);
+function g_htons(val): guint16;
+// Result:=GUINT16_TO_BE (val);
+}
+
+{$ENDIF read_interface_rest}
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gunicode.inc b/packages/gtk2/src/glib/gunicode.inc
new file mode 100644
index 0000000000..23eb7ec38d
--- /dev/null
+++ b/packages/gtk2/src/glib/gunicode.inc
@@ -0,0 +1,241 @@
+{*
+ * gunicode.inc
+ *
+ * depends on gerror.inc, gtypes.inc
+ *}
+
+
+ type
+ Pgunichar = ^gunichar;
+ gunichar = guint32;
+
+ Pgunichar2 = ^gunichar2;
+ gunichar2 = guint16;
+
+ { These are the possible character classifications.
+ See http://www.unicode.org/Public/UNIDATA/UnicodeData.html
+ }
+
+ PGUnicodeType = ^TGUnicodeType;
+ TGUnicodeType = (G_UNICODE_CONTROL,
+ G_UNICODE_FORMAT,
+ G_UNICODE_UNASSIGNED,
+ G_UNICODE_PRIVATE_USE,
+ G_UNICODE_SURROGATE,
+ G_UNICODE_LOWERCASE_LETTER,
+ G_UNICODE_MODIFIER_LETTER,
+ G_UNICODE_OTHER_LETTER,
+ G_UNICODE_TITLECASE_LETTER,
+ G_UNICODE_UPPERCASE_LETTER,
+ G_UNICODE_COMBINING_MARK,
+ G_UNICODE_ENCLOSING_MARK,
+ G_UNICODE_NON_SPACING_MARK,
+ G_UNICODE_DECIMAL_NUMBER,
+ G_UNICODE_LETTER_NUMBER,
+ G_UNICODE_OTHER_NUMBER,
+ G_UNICODE_CONNECT_PUNCTUATION,
+ G_UNICODE_DASH_PUNCTUATION,
+ G_UNICODE_CLOSE_PUNCTUATION,
+ G_UNICODE_FINAL_PUNCTUATION,
+ G_UNICODE_INITIAL_PUNCTUATION,
+ G_UNICODE_OTHER_PUNCTUATION,
+ G_UNICODE_OPEN_PUNCTUATION,
+ G_UNICODE_CURRENCY_SYMBOL,
+ G_UNICODE_MODIFIER_SYMBOL,
+ G_UNICODE_MATH_SYMBOL,
+ G_UNICODE_OTHER_SYMBOL,
+ G_UNICODE_LINE_SEPARATOR,
+ G_UNICODE_PARAGRAPH_SEPARATOR,
+ G_UNICODE_SPACE_SEPARATOR);
+
+ { These are the possible line break classifications.
+ See http://www.unicode.org/unicode/reports/tr14/
+ }
+
+ PGUnicodeBreakType = ^TGUnicodeBreakType;
+ TGUnicodeBreakType = (G_UNICODE_BREAK_MANDATORY,
+ G_UNICODE_BREAK_CARRIAGE_RETURN,
+ G_UNICODE_BREAK_LINE_FEED,
+ G_UNICODE_BREAK_COMBINING_MARK,
+ G_UNICODE_BREAK_SURROGATE,
+ G_UNICODE_BREAK_ZERO_WIDTH_SPACE,
+ G_UNICODE_BREAK_INSEPARABLE,
+ G_UNICODE_BREAK_NON_BREAKING_GLUE,
+ G_UNICODE_BREAK_CONTINGENT,
+ G_UNICODE_BREAK_SPACE,
+ G_UNICODE_BREAK_AFTER,
+ G_UNICODE_BREAK_BEFORE,
+ G_UNICODE_BREAK_BEFORE_AND_AFTER,
+ G_UNICODE_BREAK_HYPHEN,
+ G_UNICODE_BREAK_NON_STARTER,
+ G_UNICODE_BREAK_OPEN_PUNCTUATION,
+ G_UNICODE_BREAK_CLOSE_PUNCTUATION,
+ G_UNICODE_BREAK_QUOTATION,
+ G_UNICODE_BREAK_EXCLAMATION,
+ G_UNICODE_BREAK_IDEOGRAPHIC,
+ G_UNICODE_BREAK_NUMERIC,
+ G_UNICODE_BREAK_INFIX_SEPARATOR,
+ G_UNICODE_BREAK_SYMBOL,
+ G_UNICODE_BREAK_ALPHABETIC,
+ G_UNICODE_BREAK_PREFIX,
+ G_UNICODE_BREAK_POSTFIX,
+ G_UNICODE_BREAK_COMPLEX_CONTEXT,
+ G_UNICODE_BREAK_AMBIGUOUS,
+ G_UNICODE_BREAK_UNKNOWN);
+
+ { Returns TRUE if current locale uses UTF-8 charset. If CHARSET is
+ not null, sets CHARSET to the name of the current locale's
+ charset. This value is statically allocated, and should be copied
+ in case the locale's charset will be changed later using setlocale()
+ or in some other way.
+ }
+ function g_get_charset(charset:PPchar):gboolean;cdecl;external gliblib name 'g_get_charset';
+
+ { These are all analogs of the <ctype.h> functions.
+ }
+ function g_unichar_isalnum(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_isalnum';
+
+ function g_unichar_isalpha(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_isalpha';
+
+ function g_unichar_iscntrl(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_iscntrl';
+
+ function g_unichar_isdigit(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_isdigit';
+
+ function g_unichar_isgraph(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_isgraph';
+
+ function g_unichar_islower(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_islower';
+
+ function g_unichar_isprint(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_isprint';
+
+ function g_unichar_ispunct(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_ispunct';
+
+ function g_unichar_isspace(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_isspace';
+
+ function g_unichar_isupper(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_isupper';
+
+ function g_unichar_isxdigit(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_isxdigit';
+
+ function g_unichar_istitle(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_istitle';
+
+ function g_unichar_isdefined(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_isdefined';
+
+ function g_unichar_iswide(c:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_iswide';
+
+ { More <ctype.h> functions. These convert between the three cases.
+ See the Unicode book to understand title case. }
+ function g_unichar_toupper(c:gunichar):gunichar;cdecl;external gliblib name 'g_unichar_toupper';
+
+ function g_unichar_tolower(c:gunichar):gunichar;cdecl;external gliblib name 'g_unichar_tolower';
+
+ function g_unichar_totitle(c:gunichar):gunichar;cdecl;external gliblib name 'g_unichar_totitle';
+
+ { If C is a digit (according to `g_unichar_isdigit'), then return its
+ numeric value. Otherwise return -1. }
+ function g_unichar_digit_value(c:gunichar):gint;cdecl;external gliblib name 'g_unichar_digit_value';
+
+ function g_unichar_xdigit_value(c:gunichar):gint;cdecl;external gliblib name 'g_unichar_xdigit_value';
+
+ { Return the Unicode character type of a given character. }
+ function g_unichar_type(c:gunichar):TGUnicodeType;cdecl;external gliblib name 'g_unichar_type';
+
+ { Return the line break property for a given character }
+ function g_unichar_break_type(c:gunichar):TGUnicodeBreakType;cdecl;external gliblib name 'g_unichar_break_type';
+
+ { Compute canonical ordering of a string in-place. This rearranges
+ decomposed characters in the string according to their combining
+ classes. See the Unicode manual for more information. }
+ procedure g_unicode_canonical_ordering(_string:Pgunichar; len:gsize);cdecl;external gliblib name 'g_unicode_canonical_ordering';
+
+ { Compute canonical decomposition of a character. Returns g_malloc()d
+ string of Unicode characters. RESULT_LEN is set to the resulting
+ length of the string. }
+ function g_unicode_canonical_decomposition(ch:gunichar; result_len:Pgsize):Pgunichar;cdecl;external gliblib name 'g_unicode_canonical_decomposition';
+
+{$IFNDEF KYLIX}
+ { Array of skip-bytes-per-initial character.
+ }
+ var
+ g_utf8_skip : pgchar; external gliblib name 'g_utf8_skip';
+{$ENDIF}
+
+ function g_utf8_next_char (p: pguchar):pguchar;
+
+
+ function g_utf8_get_char(p:Pgchar):gunichar;cdecl;external gliblib name 'g_utf8_get_char';
+
+ function g_utf8_get_char_validated(p:Pgchar; max_len:gssize):gunichar;cdecl;external gliblib name 'g_utf8_get_char_validated';
+
+ function g_utf8_offset_to_pointer(str:Pgchar; offset:glong):Pgchar;cdecl;external gliblib name 'g_utf8_offset_to_pointer';
+
+ function g_utf8_pointer_to_offset(str:Pgchar; pos:Pgchar):glong;cdecl;external gliblib name 'g_utf8_pointer_to_offset';
+
+ function g_utf8_prev_char(p:Pgchar):Pgchar;cdecl;external gliblib name 'g_utf8_prev_char';
+
+ function g_utf8_find_next_char(p:Pgchar; _end:Pgchar):Pgchar;cdecl;external gliblib name 'g_utf8_find_next_char';
+
+ function g_utf8_find_prev_char(str:Pgchar; p:Pgchar):Pgchar;cdecl;external gliblib name 'g_utf8_find_prev_char';
+
+ function g_utf8_strlen(p:Pgchar; max:gssize):glong;cdecl;external gliblib name 'g_utf8_strlen';
+
+ { Copies n characters from src to dest }
+ function g_utf8_strncpy(dest:Pgchar; src:Pgchar; n:gsize):Pgchar;cdecl;external gliblib name 'g_utf8_strncpy';
+
+ { Find the UTF-8 character corresponding to ch, in string p. These
+ functions are equivalants to strchr and strrchr }
+ function g_utf8_strchr(p:Pgchar; len:gssize; c:gunichar):Pgchar;cdecl;external gliblib name 'g_utf8_strchr';
+
+ function g_utf8_strrchr(p:Pgchar; len:gssize; c:gunichar):Pgchar;cdecl;external gliblib name 'g_utf8_strrchr';
+
+ function g_utf8_to_utf16(str:Pgchar; len:glong; items_read:Pglong; items_written:Pglong; error:PPGError):Pgunichar2;cdecl;external gliblib name 'g_utf8_to_utf16';
+
+ function g_utf8_to_ucs4(str:Pgchar; len:glong; items_read:Pglong; items_written:Pglong; error:PPGError):Pgunichar;cdecl;external gliblib name 'g_utf8_to_ucs4';
+
+ function g_utf8_to_ucs4_fast(str:Pgchar; len:glong; items_written:Pglong):Pgunichar;cdecl;external gliblib name 'g_utf8_to_ucs4_fast';
+
+ function g_utf16_to_ucs4(str:Pgunichar2; len:glong; items_read:Pglong; items_written:Pglong; error:PPGError):Pgunichar;cdecl;external gliblib name 'g_utf16_to_ucs4';
+
+ function g_utf16_to_utf8(str:Pgunichar2; len:glong; items_read:Pglong; items_written:Pglong; error:PPGError):Pgchar;cdecl;external gliblib name 'g_utf16_to_utf8';
+
+ function g_ucs4_to_utf16(str:Pgunichar; len:glong; items_read:Pglong; items_written:Pglong; error:PPGError):Pgunichar2;cdecl;external gliblib name 'g_ucs4_to_utf16';
+
+ function g_ucs4_to_utf8(str:Pgunichar; len:glong; items_read:Pglong; items_written:Pglong; error:PPGError):Pgchar;cdecl;external gliblib name 'g_ucs4_to_utf8';
+
+ { Convert a single character into UTF-8. outbuf must have at
+ least 6 bytes of space. Returns the number of bytes in the
+ result.
+ }
+ function g_unichar_to_utf8(c:gunichar; outbuf:Pgchar):gint;cdecl;external gliblib name 'g_unichar_to_utf8';
+
+ { Validate a UTF8 string, return TRUE if valid, put pointer to
+ first invalid char in end
+ }
+ function g_utf8_validate(str:Pgchar; max_len:gssize; _end:PPgchar):gboolean;cdecl;external gliblib name 'g_utf8_validate';
+
+ { Validate a Unicode character }
+ function g_unichar_validate(ch:gunichar):gboolean;cdecl;external gliblib name 'g_unichar_validate';
+
+ function g_utf8_strup(str:Pgchar; len:gssize):Pgchar;cdecl;external gliblib name 'g_utf8_strup';
+
+ function g_utf8_strdown(str:Pgchar; len:gssize):Pgchar;cdecl;external gliblib name 'g_utf8_strdown';
+
+ function g_utf8_casefold(str:Pgchar; len:gssize):Pgchar;cdecl;external gliblib name 'g_utf8_casefold';
+
+
+ type
+
+ PGNormalizeMode = ^TGNormalizeMode;
+ TGNormalizeMode = gint;
+ const G_NORMALIZE_DEFAULT = 0;
+ G_NORMALIZE_NFD = G_NORMALIZE_DEFAULT;
+ G_NORMALIZE_DEFAULT_COMPOSE = 1;
+ G_NORMALIZE_NFC = G_NORMALIZE_DEFAULT_COMPOSE;
+ G_NORMALIZE_ALL = 2;
+ G_NORMALIZE_NFKD = G_NORMALIZE_ALL;
+ G_NORMALIZE_ALL_COMPOSE = 3;
+ G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE;
+
+ function g_utf8_normalize(str:Pgchar; len:gssize; mode:TGNormalizeMode):Pgchar;cdecl;external gliblib name 'g_utf8_normalize';
+
+ function g_utf8_collate(str1:Pgchar; str2:Pgchar):gint;cdecl;external gliblib name 'g_utf8_collate';
+
+ function g_utf8_collate_key(str:Pgchar; len:gssize):Pgchar;cdecl;external gliblib name 'g_utf8_collate_key';
diff --git a/packages/gtk2/src/glib/gutils.inc b/packages/gtk2/src/glib/gutils.inc
new file mode 100644
index 0000000000..406b1b7ab0
--- /dev/null
+++ b/packages/gtk2/src/glib/gutils.inc
@@ -0,0 +1,162 @@
+{*
+ * gutils.inc
+ *
+ * depends on gtypes.inc
+ *}
+
+{$ifdef WIN32}
+
+ { On native Win32, directory separator is the backslash, and search path
+ separator is the semicolon.
+ }
+
+ const
+ G_DIR_SEPERATOR = '\';
+ G_DIR_SEPARATOR_S = '\';
+ G_SEARCHPATH_SEPARATOR = ';';
+ G_SEARCHPATH_SEPARATOR_S = ';';
+{$else}
+ { !WIN32 }
+ { Unix }
+
+ const
+ G_DIR_SEPARATOR = '/';
+ G_DIR_SEPARATOR_S = '/';
+ G_SEARCHPATH_SEPARATOR = ':';
+ G_SEARCHPATH_SEPARATOR_S = ':';
+{$endif}
+
+
+ function g_get_user_name:Pgchar;cdecl;external gliblib name 'g_get_user_name';
+
+ function g_get_real_name:Pgchar;cdecl;external gliblib name 'g_get_real_name';
+
+ function g_get_home_dir:Pgchar;cdecl;external gliblib name 'g_get_home_dir';
+
+ function g_get_tmp_dir:Pgchar;cdecl;external gliblib name 'g_get_tmp_dir';
+
+ function g_get_prgname:Pgchar;cdecl;external gliblib name 'g_get_prgname';
+
+ procedure g_set_prgname(prgname:Pgchar);cdecl;external gliblib name 'g_set_prgname';
+
+
+ type
+ PGDebugKey = ^TGDebugKey;
+ TGDebugKey = record
+ key : Pgchar;
+ value : guint;
+ end;
+
+ { Miscellaneous utility functions
+ }
+
+ function g_parse_debug_string(_string:Pgchar; keys:PGDebugKey; nkeys:guint):guint;cdecl;external gliblib name 'g_parse_debug_string';
+
+{$IFNDEF KYLIX}
+ function g_snprintf(_string:Pgchar; n:gulong; format:Pgchar; args:array of const):gint;cdecl;overload;external gliblib name 'g_snprintf';
+ function g_snprintf(_string:Pgchar; n:gulong; format:Pgchar):gint;cdecl;overload;varargs;external gliblib name 'g_snprintf';
+ function g_vsnprintf(_string:Pgchar; n:gulong; format:Pgchar; args:array of const):gint;cdecl;external gliblib name 'g_vsnprintf';
+{$ELSE}
+ function g_snprintf(_string:Pgchar; n:gulong; format:Pgchar):gint;varargs;cdecl;external gliblib name 'g_snprintf';
+ function g_vsnprintf(_string:Pgchar; n:gulong; format:Pgchar):gint;varargs;cdecl;external gliblib name 'g_vsnprintf';
+{$ENDIF}
+
+ { Check if a file name is an absolute path }
+
+ function g_path_is_absolute(file_name:Pgchar):gboolean;cdecl;external gliblib name 'g_path_is_absolute';
+
+ { In case of absolute paths, skip the root part }
+ function g_path_skip_root(file_name:Pgchar):Pgchar;cdecl;external gliblib name 'g_path_skip_root';
+
+{DEPRECATED}
+ { These two functions are deprecated and will be removed in the next
+ major release of GLib. Use g_path_get_dirname/g_path_get_basename
+ instead. Whatch out! The string returned by g_path_get_basename
+ must be g_freed, while the string returned by g_basename must not. }
+
+ function g_basename(file_name:Pgchar):Pgchar;cdecl;external gliblib name 'g_basename';
+ function g_dirname(file_name:Pgchar):Pgchar;cdecl;external gliblib name 'g_path_get_dirname';
+
+
+
+ { The returned strings are newly allocated with g_malloc() }
+
+ function g_get_current_dir:Pgchar;cdecl;external gliblib name 'g_get_current_dir';
+
+ function g_path_get_basename(file_name:Pgchar):Pgchar;cdecl;external gliblib name 'g_path_get_basename';
+
+ function g_path_get_dirname(file_name:Pgchar):Pgchar;cdecl;external gliblib name 'g_path_get_dirname';
+
+ { Set the pointer at the specified location to NULL }
+ procedure g_nullify_pointer(nullify_location:Pgpointer);cdecl;external gliblib name 'g_nullify_pointer';
+
+ { Get the codeset for the current locale }
+ { gchar g_get_codeset (void); }
+
+
+ { return the environment string for the variable. The returned memory
+ must not be freed. }
+ function g_getenv(variable:Pgchar):Pgchar;cdecl;external gliblib name 'g_getenv';
+
+ { we try to provide a usefull equivalent for ATEXIT if it is
+ not defined, but use is actually abandoned. people should
+ use g_atexit() instead.
+ }
+
+ type
+ TGVoidFunc = procedure;cdecl;
+
+ { we use a GLib function as a replacement for ATEXIT, so
+ the programmer is not required to check the return value
+ (if there is any in the implementation) and doesn't encounter
+ missing include files.
+ }
+
+ procedure g_atexit(func:TGVoidFunc);cdecl;external gliblib name 'g_atexit';
+
+ { Look for an executable in PATH, following execvp() rules }
+
+ function g_find_program_in_path(_program:Pgchar):Pgchar;cdecl;external gliblib name 'g_find_program_in_path';
+
+ { Bit tests
+ }
+ function g_bit_nth_lsf(mask:gulong; nth_bit:gint):gint;cdecl;external gliblib name 'g_bit_nth_lsf';
+
+ function g_bit_nth_msf(mask:gulong; nth_bit:gint):gint;cdecl;external gliblib name 'g_bit_nth_msf';
+
+ function g_bit_storage(number:gulong):guint;cdecl;external gliblib name 'g_bit_storage';
+
+ { Trash Stacks
+ elements need to be >= sizeof (gpointer)
+ }
+
+ type
+ PPGTrashStack = ^PGTrashStack;
+ PGTrashStack = ^TGTrashStack;
+ TGTrashStack = record
+ next : PGTrashStack;
+ end;
+
+
+ procedure g_trash_stack_push(stack_p:PPGTrashStack; data_p:gpointer);cdecl;external gliblib name 'g_trash_stack_push';
+
+ function g_trash_stack_pop(stack_p:PPGTrashStack):gpointer;cdecl;external gliblib name 'g_trash_stack_pop';
+
+ function g_trash_stack_peek(stack_p:PPGTrashStack):gpointer;cdecl;external gliblib name 'g_trash_stack_peek';
+
+ function g_trash_stack_height(stack_p:PPGTrashStack):guint;cdecl;external gliblib name 'g_trash_stack_height';
+
+{$IFNDEF KYLIX}
+ { Glib version.
+ we prefix variable declarations so they can
+ properly get exported in windows dlls.
+ }
+ var
+ glib_major_version : guint;external gliblib name 'glib_major_version';
+ glib_minor_version : guint;external gliblib name 'glib_minor_version';
+ glib_micro_version : guint;external gliblib name 'glib_micro_version';
+ glib_interface_age : guint;external gliblib name 'glib_interface_age';
+ glib_binary_age : guint;external gliblib name 'glib_binary_age';
+
+ function GLIB_CHECK_VERSION (major, minor, micro: guint):boolean;
+{$ENDIF}
diff --git a/packages/gtk2/src/glib/gvalue.inc b/packages/gtk2/src/glib/gvalue.inc
new file mode 100644
index 0000000000..e45c603956
--- /dev/null
+++ b/packages/gtk2/src/glib/gvalue.inc
@@ -0,0 +1,63 @@
+// included by glib2.pas
+
+{$IFDEF read_forward_definitions}
+{< private > }
+{ public for GTypeValueTable methods }
+ PGValue = ^TGValue;
+ TGValue = record
+ g_type : GType;
+ data : array[0..1] of record
+ case longint of
+ 0 : ( v_int : gint );
+ 1 : ( v_uint : guint );
+ 2 : ( v_long : glong );
+ 3 : ( v_ulong : gulong );
+ 4 : ( v_int64 : gint64 );
+ 5 : ( v_uint64 : guint64 );
+ 6 : ( v_float : gfloat );
+ 7 : ( v_double : gdouble );
+ 8 : ( v_pointer : gpointer );
+ end;
+ end;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+
+{ --- type macros --- }
+
+function G_TYPE_IS_VALUE(_type : GType) : boolean;
+function G_IS_VALUE(value : pointer) : boolean;
+function G_VALUE_TYPE(value : Pointer) : GType;
+function G_VALUE_TYPE_NAME(value : Pointer) : PGChar;
+function G_VALUE_HOLDS(value: pointer; g_type : GType) : boolean;
+
+{ --- typedefs & structures --- }
+type
+ TGValueTransform = procedure (src_value:PGValue; dest_value:PGValue); cdecl;
+
+
+{ --- prototypes --- }
+
+function g_value_init(value:PGValue; g_type:GType):PGValue; cdecl; external gobjectlib;
+procedure g_value_copy(src_value:PGValue; dest_value:PGValue); cdecl; external gobjectlib;
+function g_value_reset(value:PGValue):PGValue; cdecl; external gobjectlib;
+procedure g_value_unset(value:PGValue); cdecl; external gobjectlib;
+procedure g_value_set_instance(value:PGValue; instance:gpointer); cdecl; external gobjectlib;
+{ --- private --- }
+function g_value_fits_pointer(value:PGValue):gboolean; cdecl; external gobjectlib;
+function g_value_peek_pointer(value:PGValue):gpointer; cdecl; external gobjectlib;
+{ --- implementation details --- }
+function g_value_type_compatible(src_type:GType; dest_type:GType):gboolean; cdecl; external gobjectlib;
+function g_value_type_transformable(src_type:GType; dest_type:GType):gboolean; cdecl; external gobjectlib;
+function g_value_transform(src_value:PGValue; dest_value:PGValue):gboolean; cdecl; external gobjectlib;
+procedure g_value_register_transform_func(src_type:GType; dest_type:GType; transform_func:TGValueTransform); cdecl; external gobjectlib;
+
+const
+ G_VALUE_NOCOPY_CONTENTS = 1 shl 27;
+
+{$ENDIF read_interface_rest}
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gvaluearray.inc b/packages/gtk2/src/glib/gvaluearray.inc
new file mode 100644
index 0000000000..45b881834b
--- /dev/null
+++ b/packages/gtk2/src/glib/gvaluearray.inc
@@ -0,0 +1,49 @@
+
+{ GObject - GLib Type, Object, Parameter and Signal Library
+ Copyright (C) 2001 Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+
+ gvaluearray.h: GLib array type holding GValues
+ }
+
+{ --- typedefs & structs --- }
+type
+{< private > }
+ PGValueArray = ^TGValueArray;
+ TGValueArray = record
+ n_values : guint;
+ values : PGValue;
+ n_prealloced : guint;
+ end;
+
+{ --- prototypes --- }
+
+function g_value_array_get_nth(value_array:PGValueArray; index:guint):PGValue; cdecl; external gobjectlib;
+function g_value_array_new(n_prealloced:guint):PGValueArray; cdecl; external gobjectlib;
+procedure g_value_array_free(value_array:PGValueArray); cdecl; external gobjectlib;
+
+function g_value_array_copy(value_array:PGValueArray):PGValueArray; cdecl; external gobjectlib;
+
+function g_value_array_prepend(value_array:PGValueArray; value:PGValue):PGValueArray; cdecl; external gobjectlib;
+
+function g_value_array_append(value_array:PGValueArray; value:PGValue):PGValueArray; cdecl; external gobjectlib;
+
+function g_value_array_insert(value_array:PGValueArray; index:guint; value:PGValue):PGValueArray; cdecl; external gobjectlib;
+function g_value_array_remove(value_array:PGValueArray; index:guint):PGValueArray; cdecl; external gobjectlib;
+function g_value_array_sort(value_array:PGValueArray; compare_func:TGCompareFunc):PGValueArray; cdecl; external gobjectlib;
+function g_value_array_sort_with_data(value_array:PGValueArray; compare_func:TGCompareDataFunc; user_data:gpointer):PGValueArray; cdecl; external gobjectlib;
+
diff --git a/packages/gtk2/src/glib/gvaluecollector.inc b/packages/gtk2/src/glib/gvaluecollector.inc
new file mode 100644
index 0000000000..6f770479df
--- /dev/null
+++ b/packages/gtk2/src/glib/gvaluecollector.inc
@@ -0,0 +1,142 @@
+// included by glib2.pas
+
+{$IFDEF read_forward_definitions}
+{ vararg union holding actuall values collected
+ }
+ PGTypeCValue = ^TGTypeCValue;
+ TGTypeCValue = record
+ case longint of
+ 0 : ( v_int : gint );
+ 1 : ( v_long : glong );
+ 2 : ( v_int64 : gint64 );
+ 3 : ( v_double : gdouble );
+ 4 : ( v_pointer : gpointer );
+ end;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+{ we may want to add aggregate types here some day, if requested
+ by users. the basic C types are covered already, everything
+ smaller than an int is promoted to an integer and floats are
+ always promoted to doubles for varargs call constructions.
+ }
+{< skip > }
+const
+ G_VALUE_COLLECT_INT = 'i';
+ G_VALUE_COLLECT_LONG = 'l';
+ G_VALUE_COLLECT_INT64 = 'q';
+ G_VALUE_COLLECT_DOUBLE = 'd';
+ G_VALUE_COLLECT_POINTER = 'p';
+
+{ G_VALUE_COLLECT() collects a variable argument value
+ from a va_list. we have to implement the varargs collection as a
+ macro, because on some systems va_list variables cannot be passed
+ by reference.
+ value is supposed to be initialized according to the value
+ type to be collected.
+ var_args is the va_list variable and may be evaluated multiple times.
+ __error is a gchar variable that will be modified to hold a g_new()
+ allocated error messages if something fails.
+ }
+(* ToDo: #define G_VALUE_COLLECT(value, var_args, flags, __error) \
+G_STMT_START { \
+ GValue _value = (value); \
+ guint _flags = (flags); \
+ GType _value_type = G_VALUE_TYPE (_value); \
+ GTypeValueTable _vtable = g_type_value_table_peek (_value_type); \
+ gchar _collect_format = _vtable->collect_format; \
+ GTypeCValue _cvalues[G_VALUE_COLLECT_FORMAT_MAX_LENGTH] = { { 0, }, }; \
+ guint _n_values = 0; \
+ \
+ if (_vtable->value_free) \
+ _vtable->value_free (_value); \
+ _value->g_type = _value_type; // value_meminit() from gvalue.c \
+ memset (_value->data, 0, sizeof (_value->data)); \
+ while ( _collect_format) \
+ { \
+ GTypeCValue _cvalue = _cvalues + _n_values++; \
+ \
+ switch ( _collect_format++) \
+ { \
+ case G_VALUE_COLLECT_INT: \
+ _cvalue->v_int = va_arg ((var_args), gint); \
+ break; \
+ case G_VALUE_COLLECT_LONG: \
+ _cvalue->v_long = va_arg ((var_args), glong); \
+ break; \
+ case G_VALUE_COLLECT_INT64: \
+ _cvalue->v_int64 = va_arg ((var_args), gint64); \
+ break; \
+ case G_VALUE_COLLECT_DOUBLE: \
+ _cvalue->v_double = va_arg ((var_args), gdouble); \
+ break; \
+ case G_VALUE_COLLECT_POINTER: \
+ _cvalue->v_pointer = va_arg ((var_args), gpointer); \
+ break; \
+ default: \
+ g_assert_not_reached (); \
+ } \
+ } \
+ (__error) = _vtable->collect_value (_value, \
+ _n_values, \
+ _cvalues, \
+ _flags); \
+} G_STMT_END
+*)
+
+
+
+{ G_VALUE_LCOPY() collects a value's variable argument
+ locations from a va_list. usage is analogous to G_VALUE_COLLECT().
+ }
+(* ToDo: #define G_VALUE_LCOPY(value, var_args, flags, __error) \
+G_STMT_START { \
+ const GValue _value = (value); \
+ guint _flags = (flags); \
+ GType _value_type = G_VALUE_TYPE (_value); \
+ GTypeValueTable _vtable = g_type_value_table_peek (_value_type); \
+ gchar _lcopy_format = _vtable->lcopy_format; \
+ GTypeCValue _cvalues[G_VALUE_COLLECT_FORMAT_MAX_LENGTH] = { { 0, }, }; \
+ guint _n_values = 0; \
+ \
+ while ( _lcopy_format) \
+ { \
+ GTypeCValue _cvalue = _cvalues + _n_values++; \
+ \
+ switch ( _lcopy_format++) \
+ { \
+ case G_VALUE_COLLECT_INT: \
+ _cvalue->v_int = va_arg ((var_args), gint); \
+ break; \
+ case G_VALUE_COLLECT_LONG: \
+ _cvalue->v_long = va_arg ((var_args), glong); \
+ break; \
+ case G_VALUE_COLLECT_INT64: \
+ _cvalue->v_int64 = va_arg ((var_args), gint64); \
+ break; \
+ case G_VALUE_COLLECT_DOUBLE: \
+ _cvalue->v_double = va_arg ((var_args), gdouble); \
+ break; \
+ case G_VALUE_COLLECT_POINTER: \
+ _cvalue->v_pointer = va_arg ((var_args), gpointer); \
+ break; \
+ default: \
+ g_assert_not_reached (); \
+ } \
+ } \
+ (__error) = _vtable->lcopy_value (_value, \
+ _n_values, \
+ _cvalues, \
+ _flags); \
+} G_STMT_END
+*)
+
+const
+ G_VALUE_COLLECT_FORMAT_MAX_LENGTH = 8;
+
+{$ENDIF read_interface_rest}
+// included by glib2.pas
+
diff --git a/packages/gtk2/src/glib/gvaluetypes.inc b/packages/gtk2/src/glib/gvaluetypes.inc
new file mode 100644
index 0000000000..94cd53401e
--- /dev/null
+++ b/packages/gtk2/src/glib/gvaluetypes.inc
@@ -0,0 +1,111 @@
+{ GObject - GLib Type, Object, Parameter and Signal Library
+ Copyright (C) 1997-1999, 2000-2001 Tim Janik and Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+
+ gvaluetypes.h: GLib default values
+ }
+
+
+{ --- type macros --- }
+
+function G_VALUE_HOLDS_CHAR(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_UCHAR(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_BOOLEAN(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_INT(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_UINT(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_LONG(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_ULONG(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_INT64(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_UINT64(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_FLOAT(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_DOUBLE(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_STRING(value : PGValue) : boolean;
+
+function G_VALUE_HOLDS_POINTER(value : PGValue) : boolean;
+
+{ --- prototypes --- }
+procedure g_value_set_char(value:PGValue; v_char:gchar); cdecl; external gobjectlib;
+
+function g_value_get_char(value:PGValue):gchar; cdecl; external gobjectlib;
+procedure g_value_set_uchar(value:PGValue; v_uchar:guchar); cdecl; external gobjectlib;
+
+function g_value_get_uchar(value:PGValue):guchar; cdecl; external gobjectlib;
+procedure g_value_set_boolean(value:PGValue; v_boolean:gboolean); cdecl; external gobjectlib;
+
+function g_value_get_boolean(value:PGValue):gboolean; cdecl; external gobjectlib;
+procedure g_value_set_int(value:PGValue; v_int:gint); cdecl; external gobjectlib;
+
+function g_value_get_int(value:PGValue):gint; cdecl; external gobjectlib;
+procedure g_value_set_uint(value:PGValue; v_uint:guint); cdecl; external gobjectlib;
+
+function g_value_get_uint(value:PGValue):guint; cdecl; external gobjectlib;
+procedure g_value_set_long(value:PGValue; v_long:glong); cdecl; external gobjectlib;
+
+function g_value_get_long(value:PGValue):glong; cdecl; external gobjectlib;
+procedure g_value_set_ulong(value:PGValue; v_ulong:gulong); cdecl; external gobjectlib;
+
+function g_value_get_ulong(value:PGValue):gulong; cdecl; external gobjectlib;
+procedure g_value_set_int64(value:PGValue; v_int64:gint64); cdecl; external gobjectlib;
+
+function g_value_get_int64(value:PGValue):gint64; cdecl; external gobjectlib;
+procedure g_value_set_uint64(value:PGValue; v_uint64:guint64); cdecl; external gobjectlib;
+
+function g_value_get_uint64(value:PGValue):guint64; cdecl; external gobjectlib;
+procedure g_value_set_float(value:PGValue; v_float:gfloat); cdecl; external gobjectlib;
+
+function g_value_get_float(value:PGValue):gfloat; cdecl; external gobjectlib;
+procedure g_value_set_double(value:PGValue; v_double:gdouble); cdecl; external gobjectlib;
+
+function g_value_get_double(value:PGValue):gdouble; cdecl; external gobjectlib;
+
+procedure g_value_set_string(value:PGValue; v_string:Pgchar); cdecl; external gobjectlib;
+
+procedure g_value_set_static_string(value:PGValue; v_string:Pgchar); cdecl; external gobjectlib;
+
+function g_value_get_string(value:PGValue):Pgchar; cdecl; external gobjectlib;
+
+function g_value_dup_string(value:PGValue):Pgchar; cdecl; external gobjectlib;
+procedure g_value_set_pointer(value:PGValue; v_pointer:gpointer); cdecl; external gobjectlib;
+
+function g_value_get_pointer(value:PGValue):gpointer; cdecl; external gobjectlib;
+{ Convenience for registering new pointer types }
+
+function g_pointer_type_register_static(name:Pgchar):GType; cdecl; external gobjectlib;
+{ debugging aid, describe value contents as string }
+
+function g_strdup_value_contents(value:PGValue):Pgchar; cdecl; external gobjectlib;
+{ --- marshaller specific --- }
+procedure g_value_set_string_take_ownership(value:PGValue; v_string:Pgchar); cdecl; external gobjectlib;
+{ humpf, need a C representable type name for G_TYPE_STRING }
+type
+
+ Pgchararray = ^Tgchararray;
+ Tgchararray = gchar;
+
+
+
diff --git a/packages/gtk2/src/glib/gwin32.inc b/packages/gtk2/src/glib/gwin32.inc
new file mode 100644
index 0000000000..ab14631993
--- /dev/null
+++ b/packages/gtk2/src/glib/gwin32.inc
@@ -0,0 +1,48 @@
+{*
+ * gwin32.inc
+ *
+ * depends on gtypes.inc
+ *}
+
+{$ifdef WIN32}
+
+{ Windows emulation stubs for common Unix functions
+}
+
+ const
+ MAXPATHLEN = 1024;
+
+ type
+
+ Ppid_t = ^Tpid_t;
+ Tpid_t = longint;
+
+ { For some POSIX functions that are not provided by the MS runtime,
+ we provide emulators in glib, which are prefixed with g_win32_.
+ }
+ function ftruncate(f:gint; size:guint):gint;cdecl;external gliblib name 'g_win32_ftruncate';
+
+ function g_win32_ftruncate(f:gint; size:guint):gint;cdecl;external gliblib name 'g_win32_ftruncate';
+
+ { The MS setlocale uses locale names of the form "English_United
+ States.1252" etc. We want the Unixish standard form "en", "zh_TW"
+ etc. This function gets the current thread locale from Windows and
+ returns it as a string of the above form for use in forming file
+ names etc. The returned string should be deallocated with g_free().
+ }
+
+ function g_win32_getlocale:Pgchar;cdecl;external gliblib name 'g_win32_getlocale';
+
+ { Translate a Win32 error code (as returned by GetLastError()) into
+ the corresponding message. The returned string should be deallocated
+ with g_free().
+ }
+ function g_win32_error_message(error:gint):Pgchar;cdecl;external gliblib name 'g_win32_error_message';
+
+ function g_win32_get_package_installation_directory(package:Pgchar; dll_name:Pgchar):Pgchar;cdecl;external gliblib name 'g_win32_get_package_installation_directory';
+
+ function g_win32_get_package_installation_subdirectory(package:Pgchar; dll_name:Pgchar; subdir:Pgchar):Pgchar;cdecl;external gliblib name 'g_win32_get_package_installation_subdirectory';
+
+
+
+{$endif}
diff --git a/packages/gtk2/src/gtk+/gdk-pixbuf/gdk-pixbuf-loader.inc b/packages/gtk2/src/gtk+/gdk-pixbuf/gdk-pixbuf-loader.inc
new file mode 100644
index 0000000000..95991d42c4
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk-pixbuf/gdk-pixbuf-loader.inc
@@ -0,0 +1,77 @@
+// included by gdk2pixbuf.pp
+
+{$IFDEF read_interface}
+
+type
+{< private > }
+ PGdkPixbufLoader = ^TGdkPixbufLoader;
+ TGdkPixbufLoader = record
+ parent_instance : TGObject;
+ priv : gpointer;
+ end;
+
+{ Last known frame needs a redraw for x, y, width, height }
+ PGdkPixbufLoaderClass = ^TGdkPixbufLoaderClass;
+ TGdkPixbufLoaderClass = record
+ parent_class : TGObjectClass;
+ area_prepared : procedure (loader:PGdkPixbufLoader); cdecl;
+ area_updated : procedure (loader:PGdkPixbufLoader; x:longint; y:longint; width:longint; height:longint); cdecl;
+ closed : procedure (loader:PGdkPixbufLoader); cdecl;
+ end;
+
+
+function GDK_TYPE_PIXBUF_LOADER : GType;
+function GDK_PIXBUF_LOADER(obj : pointer) : PGdkPixbufLoader;
+function GDK_PIXBUF_LOADER_CLASS(klass : pointer) : PGdkPixbufLoaderClass;
+function GDK_IS_PIXBUF_LOADER(obj : pointer) : boolean;
+function GDK_IS_PIXBUF_LOADER_CLASS(klass : pointer) : boolean;
+function GDK_PIXBUF_LOADER_GET_CLASS(obj : pointer) : PGdkPixbufLoaderClass;
+
+function gdk_pixbuf_loader_get_type:GType; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_loader_new:PGdkPixbufLoader; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_loader_new_with_type(image_type:Pchar; error:PPGError):PGdkPixbufLoader; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_loader_write(loader:PGdkPixbufLoader; buf:Pguchar; count:gsize; error:PPGError):gboolean; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_loader_get_pixbuf(loader:PGdkPixbufLoader):PGdkPixbuf; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_loader_get_animation(loader:PGdkPixbufLoader):PGdkPixbufAnimation; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_loader_close(loader:PGdkPixbufLoader; error:PPGError):gboolean; cdecl; external gdkpixbuflib;
+
+{$ENDIF read_interface}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_PIXBUF_LOADER : GType;
+begin
+ GDK_TYPE_PIXBUF_LOADER:=gdk_pixbuf_loader_get_type;
+end;
+
+function GDK_PIXBUF_LOADER(obj : pointer) : PGdkPixbufLoader;
+begin
+ GDK_PIXBUF_LOADER:=PGdkPixbufLoader(G_TYPE_CHECK_INSTANCE_CAST(obj,
+ GDK_TYPE_PIXBUF_LOADER));
+end;
+
+function GDK_PIXBUF_LOADER_CLASS(klass : pointer) : PGdkPixbufLoaderClass;
+begin
+ GDK_PIXBUF_LOADER_CLASS:=PGdkPixbufLoaderClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ GDK_TYPE_PIXBUF_LOADER));
+end;
+
+function GDK_IS_PIXBUF_LOADER(obj : pointer) : boolean;
+begin
+ GDK_IS_PIXBUF_LOADER:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GDK_TYPE_PIXBUF_LOADER);
+end;
+
+function GDK_IS_PIXBUF_LOADER_CLASS(klass : pointer) : boolean;
+begin
+ GDK_IS_PIXBUF_LOADER_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,
+ GDK_TYPE_PIXBUF_LOADER);
+end;
+
+function GDK_PIXBUF_LOADER_GET_CLASS(obj : pointer) : PGdkPixbufLoaderClass;
+begin
+ GDK_PIXBUF_LOADER_GET_CLASS:=PGdkPixbufLoaderClass(G_TYPE_INSTANCE_GET_CLASS(
+ obj,GDK_TYPE_PIXBUF_LOADER));
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk-pixbuf/gdk2pixbuf.pas b/packages/gtk2/src/gtk+/gdk-pixbuf/gdk2pixbuf.pas
new file mode 100644
index 0000000000..77ca5f3b04
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk-pixbuf/gdk2pixbuf.pas
@@ -0,0 +1,346 @@
+{ GdkPixbuf library - Main header file
+
+ Copyright (C) 1999 The Free Software Foundation
+
+ Authors: Mark Crichton <crichton@gimp.org>
+ Miguel de Icaza <miguel@gnu.org>
+ Federico Mena-Quintero <federico@gimp.org>
+ Havoc Pennington <hp@redhat.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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 gdk2pixbuf; // keep unit name lowercase for kylix
+
+{$IFDEF FPC}
+ {$mode objfpc}
+{$ENDIF}
+{$IFDEF VER140}
+ {$DEFINE KYLIX}
+{$ENDIF}
+
+interface
+
+uses glib2;
+
+const
+{$ifdef win32}
+ {$define gdkpixbufwin}
+ gdkpixbuflib = 'libgdk_pixbuf-2.0-0.dll';
+ {$IFDEF FPC}
+ {$ifndef NO_SMART_LINK}
+ {$smartlink on}
+ {$endif}
+ {$ENDIF}
+{$else}
+ {$ifdef darwin}
+ gdkpixbuflib = 'gdk_pixbuf-2.0.0';
+ {$linklib gtk-x11-2.0}
+ {$linklib gdk-x11-2.0}
+ {$linklib pango-1.0.0}
+ {$linklib glib-2.0.0}
+ {$linklib gobject-2.0.0}
+ {$linklib gdk_pixbuf-2.0.0}
+ {$linklib atk-1.0.0}
+ {$else}
+ {$ifdef UseCustomLibs}
+ gdkpixbuflib = '';
+ {$else}
+ gdkpixbuflib = 'libgdk_pixbuf-2.0.so';
+ {$endif}
+ {$endif}
+{$endif}
+
+{$define HasGTK2_4}
+{$define HasGTK2_6}
+
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+{$IFNDEF KYLIX}
+ {$PACKRECORDS C}
+{$ELSE}
+ {$ALIGN 4}
+ {$WEAKPACKAGEUNIT}
+ {$WARNINGS OFF}
+{$ENDIF}
+
+{$IFNDEF Kylix}
+var
+ {$IFDEF WIN32 }
+ gdk_pixbuf_major_version: guint; external gdkpixbuflib name 'gdk_pixbuf_major_version';
+ gdk_pixbuf_minor_version: guint; external gdkpixbuflib name 'gdk_pixbuf_minor_version';
+ gdk_pixbuf_micro_version: guint; external gdkpixbuflib name 'gdk_pixbuf_micro_version';
+ gdk_pixbuf_version: PChar ; external gdkpixbuflib name 'gdk_pixbuf_version';
+ {$ELSE }
+ gdk_pixbuf_major_version: guint;cvar;external;
+ gdk_pixbuf_minor_version: guint;cvar;external;
+ gdk_pixbuf_micro_version: guint;cvar;external;
+ gdk_pixbuf_version: PChar;cvar;external;
+ {$ENDIF }
+{$ENDIF}
+
+type
+ // internal type
+ PGdkPixbuf = pointer;
+
+ // internal type
+ PGdkPixbufAnimation = pointer;
+
+ // internal type
+ PGdkPixbufAnimationIter = pointer;
+
+
+{ Alpha compositing mode }
+ PGdkPixbufAlphaMode = ^TGdkPixbufAlphaMode;
+ TGdkPixbufAlphaMode = (
+ GDK_PIXBUF_ALPHA_BILEVEL,
+ GDK_PIXBUF_ALPHA_FULL
+ );
+
+{ Color spaces; right now only RGB is supported.
+ Note that these values are encoded in inline pixbufs
+ as ints, so don't reorder them
+ }
+ PGdkColorspace = ^TGdkColorspace;
+ TGdkColorspace = (GDK_COLORSPACE_RGB);
+
+{ Handler that must free the pixel array }
+ TGdkPixbufDestroyNotify = procedure (pixels:Pguchar; data:gpointer); cdecl;
+
+{ image data hosed }
+{ no mem to load image }
+{ bad option passed to save routine }
+{ unsupported image type (sort of an ENOSYS) }
+{ unsupported operation (load, save) for image type }
+ PGdkPixbufError = ^TGdkPixbufError;
+ TGdkPixbufError = (
+ GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
+ GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
+ GDK_PIXBUF_ERROR_BAD_OPTION,
+ GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
+ GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION,
+ GDK_PIXBUF_ERROR_FAILED
+ );
+
+{ Interpolation modes }
+ PGdkInterpType = ^TGdkInterpType;
+ TGdkInterpType = (
+ GDK_INTERP_NEAREST,
+ GDK_INTERP_TILES,
+ GDK_INTERP_BILINEAR,
+ GDK_INTERP_HYPER
+ );
+
+function GDK_TYPE_PIXBUF : GType;
+function GDK_PIXBUF(anObject : pointer) : PGdkPixbuf;
+function GDK_IS_PIXBUF(anObject : pointer) : boolean;
+
+function GDK_TYPE_PIXBUF_ANIMATION : GType;
+function GDK_PIXBUF_ANIMATION(anObject : pointer) : PGdkPixbufAnimation;
+function GDK_IS_PIXBUF_ANIMATION(anObject : pointer) : boolean;
+function GDK_TYPE_PIXBUF_ANIMATION_ITER : GType;
+function GDK_PIXBUF_ANIMATION_ITER(anObject : pointer) : PGdkPixbufAnimationIter;
+function GDK_IS_PIXBUF_ANIMATION_ITER(anObject : pointer) : boolean;
+
+function GDK_PIXBUF_ERROR : TGQuark;
+function gdk_pixbuf_error_quark:TGQuark; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_get_type:GType; cdecl; external gdkpixbuflib;
+
+
+{ Reference counting }
+{$ifndef GDK_PIXBUF_DISABLE_DEPRECATED}
+function gdk_pixbuf_ref(pixbuf:PGdkPixbuf):PGdkPixbuf; cdecl; external gdkpixbuflib;
+procedure gdk_pixbuf_unref(pixbuf:PGdkPixbuf); cdecl; external gdkpixbuflib;
+{$endif}
+
+
+{ GdkPixbuf accessors }
+function gdk_pixbuf_get_colorspace(pixbuf:PGdkPixbuf):TGdkColorspace; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_get_n_channels(pixbuf:PGdkPixbuf):longint; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_get_has_alpha(pixbuf:PGdkPixbuf):gboolean; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_get_bits_per_sample(pixbuf:PGdkPixbuf):longint; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_get_pixels(pixbuf:PGdkPixbuf):Pguchar; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_get_width(pixbuf:PGdkPixbuf):longint; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_get_height(pixbuf:PGdkPixbuf):longint; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_get_rowstride(pixbuf:PGdkPixbuf):longint; cdecl; external gdkpixbuflib;
+
+{ Create a blank pixbuf with an optimal rowstride and a new buffer }
+function gdk_pixbuf_new(colorspace:TGdkColorspace; has_alpha:gboolean; bits_per_sample:longint; width:longint; height:longint):PGdkPixbuf; cdecl; external gdkpixbuflib;
+
+{ Copy a pixbuf }
+function gdk_pixbuf_copy(pixbuf:PGdkPixbuf):PGdkPixbuf; cdecl; external gdkpixbuflib;
+
+{ Create a pixbuf which points to the pixels of another pixbuf }
+function gdk_pixbuf_new_subpixbuf(src_pixbuf:PGdkPixbuf; src_x:longint; src_y:longint; width:longint; height:longint):PGdkPixbuf; cdecl; external gdkpixbuflib;
+
+{ Simple loading }
+function gdk_pixbuf_new_from_file(filename:Pchar; error:PPGError):PGdkPixbuf; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_new_from_data(data:Pguchar; colorspace:TGdkColorspace; has_alpha:gboolean; bits_per_sample:longint; width:longint;
+ height:longint; rowstride:longint; destroy_fn:TGdkPixbufDestroyNotify; destroy_fn_data:gpointer):PGdkPixbuf; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_new_from_xpm_data(data:PPchar):PGdkPixbuf; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_new_from_inline(data_length:gint; var data:guint8; copy_pixels:gboolean; error:PPGError):PGdkPixbuf; cdecl; external gdkpixbuflib;
+
+{$IFDEF HasGTK2_4}
+function gdk_pixbuf_new_from_file_at_size(filename:Pchar; width, height: gint;error:PPGError):PGdkPixbuf; cdecl; external gdkpixbuflib;
+{$ENDIF HasGTK2_4}
+{$IFDEF HasGTK2_6}
+function gdk_pixbuf_new_from_file_at_scale(filename:Pchar; width, height: gint; preserve_aspect_ratio: gboolean; error:PPGError):PGdkPixbuf; cdecl; external gdkpixbuflib;
+{$ENDIF HasGTK2_6}
+
+{ Mutations }
+procedure gdk_pixbuf_fill(pixbuf:PGdkPixbuf; pixel:guint32); cdecl; external gdkpixbuflib;
+
+{ Saving }
+{$IFNDEF KYLIX}
+function gdk_pixbuf_save(pixbuf:PGdkPixbuf; filename:Pchar; _type:Pchar; error:PPGError; args:array of const):gboolean; cdecl; overload; external gdkpixbuflib;
+function gdk_pixbuf_save(pixbuf:PGdkPixbuf; filename:Pchar; _type:Pchar; error:PPGError):gboolean; cdecl; overload; external gdkpixbuflib;
+{$ELSE}
+function gdk_pixbuf_save(pixbuf:PGdkPixbuf; filename:Pchar; _type:Pchar; error:PPGError):gboolean; varargs; cdecl; external gdkpixbuflib;
+{$ENDIF}
+function gdk_pixbuf_savev(pixbuf:PGdkPixbuf; filename:Pchar; _type:Pchar; option_keys:PPchar; option_values:PPchar;
+ error:PPGError):gboolean; cdecl; external gdkpixbuflib;
+
+{ Adding an alpha channel }
+function gdk_pixbuf_add_alpha(pixbuf:PGdkPixbuf; substitute_color:gboolean; r:guchar; g:guchar; b:guchar):PGdkPixbuf; cdecl; external gdkpixbuflib;
+
+{ Copy an area of a pixbuf onto another one }
+procedure gdk_pixbuf_copy_area(src_pixbuf:PGdkPixbuf; src_x:longint; src_y:longint; width:longint; height:longint;
+ dest_pixbuf:PGdkPixbuf; dest_x:longint; dest_y:longint); cdecl; external gdkpixbuflib;
+
+{ Brighten/darken and optionally make it pixelated-looking }
+procedure gdk_pixbuf_saturate_and_pixelate(src:PGdkPixbuf; dest:PGdkPixbuf; saturation:gfloat; pixelate:gboolean); cdecl; external gdkpixbuflib;
+
+
+{ Rendering to a drawable }
+{ Scaling }
+procedure gdk_pixbuf_scale(src:PGdkPixbuf; dest:PGdkPixbuf; dest_x:longint; dest_y:longint; dest_width:longint;
+ dest_height:longint; offset_x:double; offset_y:double; scale_x:double; scale_y:double;
+ interp_type:TGdkInterpType); cdecl; external gdkpixbuflib;
+procedure gdk_pixbuf_composite(src:PGdkPixbuf; dest:PGdkPixbuf; dest_x:longint; dest_y:longint; dest_width:longint;
+ dest_height:longint; offset_x:double; offset_y:double; scale_x:double; scale_y:double;
+ interp_type:TGdkInterpType; overall_alpha:longint); cdecl; external gdkpixbuflib;
+procedure gdk_pixbuf_composite_color(src:PGdkPixbuf; dest:PGdkPixbuf; dest_x:longint; dest_y:longint; dest_width:longint;
+ dest_height:longint; offset_x:double; offset_y:double; scale_x:double; scale_y:double;
+ interp_type:TGdkInterpType; overall_alpha:longint; check_x:longint; check_y:longint; check_size:longint;
+ color1:guint32; color2:guint32); cdecl; external gdkpixbuflib;
+function gdk_pixbuf_scale_simple(src:PGdkPixbuf; dest_width:longint; dest_height:longint; interp_type:TGdkInterpType):PGdkPixbuf; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_composite_color_simple(src:PGdkPixbuf; dest_width:longint; dest_height:longint; interp_type:TGdkInterpType; overall_alpha:longint;
+ check_size:longint; color1:guint32; color2:guint32):PGdkPixbuf; cdecl; external gdkpixbuflib;
+
+{ Animation support }
+function gdk_pixbuf_animation_get_type:GType; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_animation_new_from_file(filename:Pchar; error:PPGError):PGdkPixbufAnimation; cdecl; external gdkpixbuflib;
+
+{$ifndef GDK_PIXBUF_DISABLE_DEPRECATED}
+function gdk_pixbuf_animation_ref(animation:PGdkPixbufAnimation):PGdkPixbufAnimation; cdecl; external gdkpixbuflib;
+procedure gdk_pixbuf_animation_unref(animation:PGdkPixbufAnimation); cdecl; external gdkpixbuflib;
+{$endif}
+
+function gdk_pixbuf_animation_get_width(animation:PGdkPixbufAnimation):longint; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_animation_get_height(animation:PGdkPixbufAnimation):longint; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_animation_is_static_image(animation:PGdkPixbufAnimation):gboolean; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_animation_get_static_image(animation:PGdkPixbufAnimation):PGdkPixbuf; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_animation_get_iter(animation:PGdkPixbufAnimation; var start_time:TGTimeVal):PGdkPixbufAnimationIter; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_animation_iter_get_type:GType; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_animation_iter_get_delay_time(iter:PGdkPixbufAnimationIter):longint; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_animation_iter_get_pixbuf(iter:PGdkPixbufAnimationIter):PGdkPixbuf; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_animation_iter_on_currently_loading_frame(iter:PGdkPixbufAnimationIter):gboolean; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_animation_iter_advance(iter:PGdkPixbufAnimationIter; var current_time:TGTimeVal):gboolean; cdecl; external gdkpixbuflib;
+function gdk_pixbuf_get_option(pixbuf:PGdkPixbuf; key:Pgchar):Pgchar; cdecl; external gdkpixbuflib;
+
+{$DEFINE read_interface}
+{$include gdk-pixbuf-loader.inc}
+{ $include gdk-pixbuf-enum-types.inc}
+{$UNDEF read_interface}
+
+
+implementation
+
+
+{$DEFINE read_implementation}
+{$include gdk-pixbuf-loader.inc}
+{ $include gdk-pixbuf-enum-types.inc}
+{$UNDEF read_implementation}
+
+{$IFNDEF KYLIX}
+{ There is a bug in the compiler. If an external variable is not used, it will
+ create code, that can be relocated by the linker.
+ So, use them in this hidden procedure.
+}
+procedure CheckUnusedVariable; [Public];
+begin
+ if (gdk_pixbuf_major_version=0)
+ and (gdk_pixbuf_minor_version=0)
+ and (gdk_pixbuf_micro_version=0)
+ and (gdk_pixbuf_version=nil) then ;
+end;
+{$ENDIF}
+
+
+function GDK_TYPE_PIXBUF : GType;
+begin
+ GDK_TYPE_PIXBUF:=gdk_pixbuf_get_type;
+end;
+
+function GDK_PIXBUF(anObject : pointer) : PGdkPixbuf;
+begin
+ GDK_PIXBUF:=PGdkPixbuf(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_PIXBUF));
+end;
+
+function GDK_IS_PIXBUF(anObject : pointer) : boolean;
+begin
+ GDK_IS_PIXBUF:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_PIXBUF);
+end;
+
+function GDK_TYPE_PIXBUF_ANIMATION : GType;
+begin
+ GDK_TYPE_PIXBUF_ANIMATION:=gdk_pixbuf_animation_get_type;
+end;
+
+function GDK_PIXBUF_ANIMATION(anObject : pointer) : PGdkPixbufAnimation;
+begin
+ GDK_PIXBUF_ANIMATION:=PGdkPixbufAnimation(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ GDK_TYPE_PIXBUF_ANIMATION));
+end;
+
+function GDK_IS_PIXBUF_ANIMATION(anObject : pointer) : boolean;
+begin
+ GDK_IS_PIXBUF_ANIMATION:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,
+ GDK_TYPE_PIXBUF_ANIMATION);
+end;
+
+function GDK_TYPE_PIXBUF_ANIMATION_ITER : GType;
+begin
+ GDK_TYPE_PIXBUF_ANIMATION_ITER:=gdk_pixbuf_animation_iter_get_type;
+end;
+
+function GDK_PIXBUF_ANIMATION_ITER(anObject : pointer) : PGdkPixbufAnimationIter;
+begin
+ GDK_PIXBUF_ANIMATION_ITER:=PGdkPixbufAnimationIter(G_TYPE_CHECK_INSTANCE_CAST(
+ anObject,GDK_TYPE_PIXBUF_ANIMATION_ITER));
+end;
+
+function GDK_IS_PIXBUF_ANIMATION_ITER(anObject : pointer) : boolean;
+begin
+ GDK_IS_PIXBUF_ANIMATION_ITER:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,
+ GDK_TYPE_PIXBUF_ANIMATION_ITER);
+end;
+
+function GDK_PIXBUF_ERROR : TGQuark;
+begin
+ GDK_PIXBUF_ERROR:=gdk_pixbuf_error_quark;
+end;
+
+
+end.
diff --git a/packages/gtk2/src/gtk+/gdk/gdk2.pas b/packages/gtk2/src/gtk+/gdk/gdk2.pas
new file mode 100644
index 0000000000..3441960018
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdk2.pas
@@ -0,0 +1,240 @@
+{
+ 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 Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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 gdk2; // keep unit name lowercase for kylix
+
+{$IFDEF FPC}
+ {$mode objfpc}
+{$ENDIF}
+{$IFDEF VER140}
+ {$DEFINE KYLIX}
+{$ENDIF}
+
+interface
+
+uses glib2, gdk2pixbuf, pango;
+
+const
+// OS dependent defines
+{$ifdef win32}
+ {$DEFINE GDK_WINDOWING_WIN32}
+ gdklib = 'libgdk-win32-2.0-0.dll';
+ {$IFDEF FPC}
+ {$ifndef NO_SMART_LINK}
+ {$smartlink on}
+ {$endif}
+ {$ENDIF}
+ GDK_HAVE_WCHAR_H=1;
+ GDK_HAVE_WCTYPE_H=1;
+{$else}
+ {$ifdef darwin}
+ gdklib = 'gdk-x11-2.0';
+ {$linklib gtk-x11-2.0}
+ {$linklib gdk-x11-2.0}
+ {$linklib pango-1.0.0}
+ {$linklib glib-2.0.0}
+ {$linklib gobject-2.0.0}
+ {$linklib gdk_pixbuf-2.0.0}
+ {$linklib atk-1.0.0}
+ {$else}
+ {$ifdef UseCustomLibs}
+ gdklib = '';
+ {$else}
+ gdklib = 'libgdk-x11-2.0.so';
+ {$endif}
+ {$endif}
+{$endif}
+
+{$IFNDEF KYLIX}
+ {$PACKRECORDS C}
+{$ELSE}
+ {$ALIGN 4}
+ {$WEAKPACKAGEUNIT}
+ {$WARNINGS OFF}
+{$ENDIF}
+
+
+// the included header files:
+{
+ number of points to buffer before sending them off
+ to scanlines() : Must be an even number
+ }
+const
+ NUMPTSTOBUFFER = 200;
+ GDK_MAX_TIMECOORD_AXES = 128;
+
+type
+ PGdkDeviceClass = ^TGdkDeviceClass;
+ TGdkDeviceClass = record
+ parent_class: TGObjectClass;
+ end;
+
+ PGdkVisualClass = ^TGdkVisualClass;
+ TGdkVisualClass = record
+ parent_class: TGObjectClass;
+ end;
+
+{$DEFINE read_forward_definitions}
+{$include gdkincludes.inc}
+{$UNDEF read_forward_definitions}
+
+{$DEFINE read_interface_types}
+{$include gdkincludes.inc}
+{$UNDEF read_interface_types}
+
+{$DEFINE read_interface_rest}
+{$include gdkincludes.inc}
+{$UNDEF read_interface_rest}
+
+procedure gdk_parse_args(argc:Pgint; var argv:PPgchar); cdecl; external gdklib;
+procedure gdk_init(argc:Pgint; var argv:PPgchar); cdecl; external gdklib;
+function gdk_init_check(argc:Pgint; var argv:PPgchar):gboolean; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_exit(error_code:gint); cdecl; external gdklib;
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+
+function gdk_set_locale:Pgchar; cdecl; external gdklib;
+function gdk_get_program_class:Pchar; cdecl; external gdklib;
+procedure gdk_set_program_class(program_class:Pchar); cdecl; external gdklib;
+
+{ Push and pop error handlers for X errors }
+procedure gdk_error_trap_push; cdecl; external gdklib;
+function gdk_error_trap_pop:gint; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_set_use_xshm(use_xshm:gboolean); cdecl; external gdklib;
+function gdk_get_use_xshm:gboolean; cdecl; external gdklib;
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+
+function gdk_get_display:Pgchar; cdecl; external gdklib;
+function gdk_get_display_arg_name:Pgchar; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+function gdk_input_add_full(source:gint; condition:TGdkInputCondition; _function:TGdkInputFunction; data:gpointer; destroy:TGdkDestroyNotify):gint; cdecl; external gdklib;
+function gdk_input_add(source:gint; condition:TGdkInputCondition; _function:TGdkInputFunction; data:gpointer):gint; cdecl; external gdklib;
+procedure gdk_input_remove(tag:gint); cdecl; external gdklib;
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+
+function gdk_pointer_grab(window:PGdkWindow; owner_events:gboolean; event_mask:TGdkEventMask; confine_to:PGdkWindow; cursor:PGdkCursor;
+ time:guint32):TGdkGrabStatus; cdecl; external gdklib;
+function gdk_keyboard_grab(window:PGdkWindow; owner_events:gboolean; time:guint32):TGdkGrabStatus; cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+procedure gdk_pointer_ungrab(time:guint32); cdecl; external gdklib;
+procedure gdk_keyboard_ungrab(time:guint32); cdecl; external gdklib;
+function gdk_pointer_is_grabbed:gboolean; cdecl; external gdklib;
+function gdk_screen_width:gint; cdecl; external gdklib;
+function gdk_screen_height:gint; cdecl; external gdklib;
+function gdk_screen_width_mm:gint; cdecl; external gdklib;
+function gdk_screen_height_mm:gint; cdecl; external gdklib;
+procedure gdk_beep; cdecl; external gdklib;
+{$endif}
+{ GDK_MULTIHEAD_SAFE }
+
+procedure gdk_flush; cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+procedure gdk_set_double_click_time(msec:guint); cdecl; external gdklib;
+{$endif}
+
+{ Rectangle utilities }
+function gdk_rectangle_intersect(src1:PGdkRectangle; src2:PGdkRectangle; dest:PGdkRectangle):gboolean; cdecl; external gdklib;
+procedure gdk_rectangle_union(src1:PGdkRectangle; src2:PGdkRectangle; dest:PGdkRectangle); cdecl; external gdklib;
+function gdk_rectangle_get_type:GType; cdecl; external gdklib;
+function GDK_TYPE_RECTANGLE : GType;
+
+{ Conversion functions between wide char and multibyte strings. }
+function gdk_wcstombs(src:PGdkWChar):Pgchar; cdecl; external gdklib;
+function gdk_mbstowcs(dest:PGdkWChar; src:Pgchar; dest_max:gint):gint; cdecl; external gdklib;
+{ Miscellaneous }
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_event_send_client_message(event:PGdkEvent; xid:guint32):gboolean; cdecl; external gdklib;
+procedure gdk_event_send_clientmessage_toall(event:PGdkEvent); cdecl; external gdklib;
+{$endif}
+
+function gdk_event_send_client_message_for_display(display:PGdkDisplay; event:PGdkEvent; xid:guint32):gboolean; cdecl; external gdklib;
+
+
+{$IFNDEF KYLIX}
+{ Threading }
+var
+ {$IFDEF WIN32}
+ gdk_threads_mutex : PGMutex; external gdklib name 'gdk_threads_mutex';
+ {$ELSE}
+ gdk_threads_mutex : PGMutex; cvar; external;
+ {$ENDIF}
+{$ENDIF}
+
+procedure gdk_threads_enter; cdecl; external gdklib;
+procedure gdk_threads_leave; cdecl; external gdklib;
+procedure gdk_threads_init; cdecl; external gdklib;
+
+procedure _GDK_THREADS_ENTER;
+procedure _GDK_THREADS_LEAVE;
+
+
+
+implementation
+
+{$IFNDEF KYLIX}
+{ There is a bug in the compiler. If an external variable is not used, it will
+ create code, that can be relocated by the linker.
+ So, use them in this hidden procedure.
+}
+procedure CheckUnusedVariable; [Public];
+begin
+ if (gdk_threads_mutex<>nil) then ;
+end;
+{$ENDIF}
+
+//------------------------------------------------------------------------------
+
+function GDK_TYPE_RECTANGLE : GType;
+begin
+ GDK_TYPE_RECTANGLE:=gdk_rectangle_get_type;
+end;
+
+procedure _GDK_THREADS_ENTER;
+begin
+{$ifdef G_THREADS_ENABLED}
+ if (gdk_threads_mutex) then
+ g_mutex_lock (gdk_threads_mutex);
+{$endif}
+end;
+
+procedure _GDK_THREADS_LEAVE;
+begin
+{$ifdef G_THREADS_ENABLED}
+ if (gdk_threads_mutex) then
+ g_mutex_unlock (gdk_threads_mutex);
+{$endif}
+end;
+
+// call implementation parts of header files
+{$DEFINE read_implementation}
+{$include gdkincludes.inc}
+{$UNDEF read_implementation}
+
+end.
diff --git a/packages/gtk2/src/gtk+/gdk/gdkcolor.inc b/packages/gtk2/src/gtk+/gdk/gdkcolor.inc
new file mode 100644
index 0000000000..c0df91699b
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkcolor.inc
@@ -0,0 +1,141 @@
+// included by gdk2.pp
+
+{$IFDEF read_forward_definitions}
+{ The color type.
+ A color consists of red, green and blue values in the
+ range 0-65535 and a pixel value. The pixel value is highly
+ dependent on the depth and colormap which this color will
+ be used to draw into. Therefore, sharing colors between
+ colormaps is a bad idea.
+ }
+ PGdkColor = ^TGdkColor;
+ TGdkColor = record
+ pixel : guint32;
+ red : guint16;
+ green : guint16;
+ blue : guint16;
+ end;
+
+ PGdkColormap = ^TGdkColormap;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGdkColormapClass = ^TGdkColormapClass;
+ TGdkColormapClass = record
+ parent_class : TGObjectClass;
+ end;
+
+ TGdkColormap = record
+ parent_instance : TGObject;
+ size : gint;
+ colors : PGdkColor;
+ visual : PGdkVisual;
+ windowing_data : gpointer;
+ screen : PGdkScreen;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+{ The colormap type. }
+function GDK_TYPE_COLORMAP : GType;
+function GDK_COLORMAP(anObject : pointer) : PGdkColormap;
+function GDK_COLORMAP_CLASS(klass : pointer) : PGdkColormapClass;
+function GDK_IS_COLORMAP(anObject : pointer) : boolean;
+function GDK_IS_COLORMAP_CLASS(klass : pointer) : boolean;
+function GDK_COLORMAP_GET_CLASS(obj : pointer) : PGdkColormapClass;
+
+function GDK_TYPE_COLOR : GType;
+
+function gdk_colormap_get_type:GType; cdecl; external gdklib;
+function gdk_colormap_new(visual:PGdkVisual; allocate:gboolean):PGdkColormap; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+function gdk_colormap_ref(cmap:PGdkColormap):PGdkColormap; cdecl; external gdklib;
+procedure gdk_colormap_unref(cmap:PGdkColormap); cdecl; external gdklib;
+{$endif}
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_colormap_get_system:PGdkColormap; cdecl; external gdklib;
+{$endif}
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+function gdk_colormap_get_system_size:gint; cdecl; external gdklib;
+procedure gdk_colormap_change(colormap:PGdkColormap; ncolors:gint); cdecl; external gdklib;
+{$endif}
+
+function gdk_colormap_alloc_colors(colormap:PGdkColormap; colors:PGdkColor; ncolors:gint; writeable:gboolean; best_match:gboolean;
+ success:Pgboolean):gint; cdecl; external gdklib;
+function gdk_colormap_alloc_color(colormap:PGdkColormap; color:PGdkColor; writeable:gboolean; best_match:gboolean):gboolean; cdecl; external gdklib;
+procedure gdk_colormap_free_colors(colormap:PGdkColormap; colors:PGdkColor; ncolors:gint); cdecl; external gdklib;
+procedure gdk_colormap_query_color(colormap:PGdkColormap; pixel:gulong; result:PGdkColor); cdecl; external gdklib;
+function gdk_colormap_get_visual(colormap:PGdkColormap):PGdkVisual; cdecl; external gdklib;
+function gdk_color_copy(color:PGdkColor):PGdkColor; cdecl; external gdklib;
+procedure gdk_color_free(color:PGdkColor); cdecl; external gdklib;
+function gdk_color_parse(spec:Pgchar; color:PGdkColor):gint; cdecl; external gdklib;
+function gdk_color_hash(colora:PGdkColor):guint; cdecl; external gdklib;
+function gdk_color_equal(colora:PGdkColor; colorb:PGdkColor):gboolean; cdecl; external gdklib;
+function gdk_color_get_type:GType; cdecl; external gdklib;
+
+{ The following functions are deprecated }
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_colors_store(colormap:PGdkColormap; colors:PGdkColor; ncolors:gint); cdecl; external gdklib;
+function gdk_colors_alloc(colormap:PGdkColormap; contiguous:gboolean; planes:Pgulong; nplanes:gint; pixels:Pgulong;
+ npixels:gint):gint; cdecl; external gdklib;
+procedure gdk_colors_free(colormap:PGdkColormap; pixels:Pgulong; npixels:gint; planes:gulong); cdecl; external gdklib;
+function gdk_color_white(colormap:PGdkColormap; color:PGdkColor):gint; cdecl; external gdklib;
+function gdk_color_black(colormap:PGdkColormap; color:PGdkColor):gint; cdecl; external gdklib;
+function gdk_color_alloc(colormap:PGdkColormap; color:PGdkColor):gint; cdecl; external gdklib;
+function gdk_color_change(colormap:PGdkColormap; color:PGdkColor):gint; cdecl; external gdklib;
+{$endif}
+
+{ GDK_DISABLE_DEPRECATED }
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_COLORMAP : GType;
+begin
+ GDK_TYPE_COLORMAP:=gdk_colormap_get_type;
+end;
+
+function GDK_COLORMAP(anObject : pointer) : PGdkColormap;
+begin
+ GDK_COLORMAP:=PGdkColormap(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ GDK_TYPE_COLORMAP));
+end;
+
+function GDK_COLORMAP_CLASS(klass : pointer) : PGdkColormapClass;
+begin
+ GDK_COLORMAP_CLASS:=PGdkColormapClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ GDK_TYPE_COLORMAP));
+end;
+
+function GDK_IS_COLORMAP(anObject : pointer) : boolean;
+begin
+ GDK_IS_COLORMAP:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_COLORMAP);
+end;
+
+function GDK_IS_COLORMAP_CLASS(klass : pointer) : boolean;
+begin
+ GDK_IS_COLORMAP_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_COLORMAP);
+end;
+
+function GDK_COLORMAP_GET_CLASS(obj : pointer) : PGdkColormapClass;
+begin
+ GDK_COLORMAP_GET_CLASS:=PGdkColormapClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ GDK_TYPE_COLORMAP));
+end;
+
+function GDK_TYPE_COLOR : GType;
+begin
+ GDK_TYPE_COLOR:=gdk_color_get_type;
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkcursor.inc b/packages/gtk2/src/gtk+/gdk/gdkcursor.inc
new file mode 100644
index 0000000000..59ecd453c4
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkcursor.inc
@@ -0,0 +1,138 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+
+{ Cursor types. }
+ PGdkCursorType = ^TGdkCursorType;
+ TGdkCursorType = gint;
+
+ PGdkCursor = ^TGdkCursor;
+ TGdkCursor = record
+ _type : TGdkCursorType;
+ ref_count : guint;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+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=GDK_XTERM+1;
+
+function GDK_TYPE_CURSOR : GType;
+
+{ Cursors }
+
+function gdk_cursor_get_type:GType; cdecl; external gdklib;
+function gdk_cursor_new_for_screen(screen:PGdkScreen; cursor_type:TGdkCursorType):PGdkCursor; cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_cursor_new(cursor_type:TGdkCursorType):PGdkCursor; cdecl; external gdklib;
+{$endif}
+
+function gdk_cursor_new_from_pixmap(source:PGdkPixmap; mask:PGdkPixmap; fg:PGdkColor; bg:PGdkColor; x:gint;
+ y:gint):PGdkCursor; cdecl; external gdklib;
+function gdk_cursor_get_screen(cursor:PGdkCursor):PGdkScreen; cdecl; external gdklib;
+function gdk_cursor_ref(cursor:PGdkCursor):PGdkCursor; cdecl; external gdklib;
+procedure gdk_cursor_unref(cursor:PGdkCursor); cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_cursor_destroy(cursor:PGdkCursor);
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+procedure gdk_cursor_destroy(cursor:PGdkCursor);
+begin
+ gdk_cursor_unref(cursor);
+end;
+
+function GDK_TYPE_CURSOR : GType;
+begin
+ GDK_TYPE_CURSOR:=gdk_cursor_get_type;
+end;
+
+{$ENDIF}
diff --git a/packages/gtk2/src/gtk+/gdk/gdkdisplay.inc b/packages/gtk2/src/gtk+/gdk/gdkdisplay.inc
new file mode 100644
index 0000000000..fd4f8c065a
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkdisplay.inc
@@ -0,0 +1,107 @@
+// included by gdk2.pp
+
+{$IFDEF read_forward_definitions}
+ PGdkDisplay = ^TGdkDisplay;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{< private > }
+{ Information for determining if the latest button click
+ is part of a double-click or triple-click
+ }
+{ The last 2 button click times. }
+{ The last 2 windows to receive button presses. }
+{ The last 2 buttons to be pressed. }
+{ Maximum time between clicks in msecs }
+ TGdkDisplay = record
+ parent_instance : TGObject;
+ queued_events : PGList;
+ queued_tail : PGList;
+ button_click_time : array[0..1] of guint32;
+ button_window : array[0..1] of PGdkWindow;
+ button_number : array[0..1] of guint;
+ double_click_time : guint;
+ end;
+
+ PGdkDisplayClass = ^TGdkDisplayClass;
+ TGdkDisplayClass = record
+ parent_class : TGObjectClass;
+ get_display_name : function (display:PGdkDisplay):Pgchar; cdecl;
+ get_n_screens : function (display:PGdkDisplay):gint; cdecl;
+ get_screen : function (display:PGdkDisplay; screen_num:gint):PGdkScreen; cdecl;
+ get_default_screen : function (display:PGdkDisplay):PGdkScreen; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GDK_TYPE_DISPLAY : GType;
+function GDK_DISPLAY_OBJECT(anObject : pointer) : PGdkDisplay;
+function GDK_DISPLAY_CLASS(klass : pointer) : PGdkDisplayClass;
+function GDK_IS_DISPLAY(anObject : pointer) : boolean;
+function GDK_IS_DISPLAY_CLASS(klass : pointer) : boolean;
+function GDK_DISPLAY_GET_CLASS(obj : pointer) : PGdkDisplayClass;
+
+//function gdk_display_get_type:GType; cdecl; external gdklib;
+function gdk_display_open(display_name:Pgchar):PGdkDisplay; cdecl; external gdklib;
+function gdk_display_get_name(display:PGdkDisplay):Pgchar; cdecl; external gdklib;
+function gdk_display_get_n_screens(display:PGdkDisplay):gint; cdecl; external gdklib;
+function gdk_display_get_screen(display:PGdkDisplay; screen_num:gint):PGdkScreen; cdecl; external gdklib;
+function gdk_display_get_default_screen(display:PGdkDisplay):PGdkScreen; cdecl; external gdklib;
+procedure gdk_display_pointer_ungrab(display:PGdkDisplay; time:guint32); cdecl; external gdklib;
+procedure gdk_display_keyboard_ungrab(display:PGdkDisplay; time:guint32); cdecl; external gdklib;
+function gdk_display_pointer_is_grabbed(display:PGdkDisplay):gboolean; cdecl; external gdklib;
+procedure gdk_display_beep(display:PGdkDisplay); cdecl; external gdklib;
+procedure gdk_display_sync(display:PGdkDisplay); cdecl; external gdklib;
+procedure gdk_display_close(display:PGdkDisplay); cdecl; external gdklib;
+function gdk_display_list_devices(display:PGdkDisplay):PGList; cdecl; external gdklib;
+function gdk_display_get_event(display:PGdkDisplay):PGdkEvent; cdecl; external gdklib;
+function gdk_display_peek_event(display:PGdkDisplay):PGdkEvent; cdecl; external gdklib;
+procedure gdk_display_put_event(display:PGdkDisplay; event:PGdkEvent); cdecl; external gdklib;
+procedure gdk_display_add_client_message_filter(display:PGdkDisplay; message_type:TGdkAtom; func:TGdkFilterFunc; data:gpointer); cdecl; external gdklib;
+procedure gdk_display_set_double_click_time(display:PGdkDisplay; msec:guint); cdecl; external gdklib;
+procedure gdk_display_set_sm_client_id(display:PGdkDisplay; sm_client_id:Pgchar); cdecl; external gdklib;
+procedure gdk_set_default_display(display:PGdkDisplay); cdecl; external gdklib;
+function gdk_get_default_display:PGdkDisplay; cdecl; external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_DISPLAY : GType;
+begin
+ GDK_TYPE_DISPLAY:=0; //gdk_display_get_type;
+end;
+
+function GDK_DISPLAY_OBJECT(anObject : pointer) : PGdkDisplay;
+begin
+ GDK_DISPLAY_OBJECT:=PGdkDisplay(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ GDK_TYPE_DISPLAY));
+end;
+
+function GDK_DISPLAY_CLASS(klass : pointer) : PGdkDisplayClass;
+begin
+ GDK_DISPLAY_CLASS:=PGdkDisplayClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ GDK_TYPE_DISPLAY));
+end;
+
+function GDK_IS_DISPLAY(anObject : pointer) : boolean;
+begin
+ GDK_IS_DISPLAY:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_DISPLAY);
+end;
+
+function GDK_IS_DISPLAY_CLASS(klass : pointer) : boolean;
+begin
+ GDK_IS_DISPLAY_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_DISPLAY);
+end;
+
+function GDK_DISPLAY_GET_CLASS(obj : pointer) : PGdkDisplayClass;
+begin
+ GDK_DISPLAY_GET_CLASS:=PGdkDisplayClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ GDK_TYPE_DISPLAY));
+end;
+
+{$ENDIF}
diff --git a/packages/gtk2/src/gtk+/gdk/gdkdnd.inc b/packages/gtk2/src/gtk+/gdk/gdkdnd.inc
new file mode 100644
index 0000000000..03f5cfbfad
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkdnd.inc
@@ -0,0 +1,140 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+ PGdkDragAction = ^TGdkDragAction;
+ TGdkDragAction = longint; // see below for possible values
+
+{ A root window with nobody claiming drags }
+{ Not a valid drag window }
+{ The simple WM_DROPFILES dnd }
+{ The complex OLE2 dnd (not implemented) }
+{ Intra-app }
+ PGdkDragProtocol = ^TGdkDragProtocol;
+ TGdkDragProtocol = (GDK_DRAG_PROTO_MOTIF,GDK_DRAG_PROTO_XDND,
+ GDK_DRAG_PROTO_ROOTWIN,GDK_DRAG_PROTO_NONE,
+ GDK_DRAG_PROTO_WIN32_DROPFILES,GDK_DRAG_PROTO_OLE2,
+ GDK_DRAG_PROTO_LOCAL);
+
+{< public > }
+{< private > }
+ PGdkDragContext = ^TGdkDragContext;
+ TGdkDragContext = record
+ parent_instance : TGObject;
+ protocol : TGdkDragProtocol;
+ is_source : gboolean;
+ source_window : PGdkWindow;
+ dest_window : PGdkWindow;
+ targets : PGList;
+ actions : TGdkDragAction;
+ suggested_action : TGdkDragAction;
+ action : TGdkDragAction;
+ start_time : guint32;
+ windowing_data : gpointer;
+ end;
+
+ PGdkDragContextClass = ^TGdkDragContextClass;
+ TGdkDragContextClass = record
+ parent_class : TGObjectClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ // values for TGdkDragAction
+ 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;
+
+
+{ Object that holds information about a drag in progress.
+ this is used on both source and destination sides.
+ }
+function GDK_TYPE_DRAG_CONTEXT : GType;
+function GDK_DRAG_CONTEXT(anObject : Pointer) : PGdkDragContext;
+function GDK_DRAG_CONTEXT_CLASS(klass : Pointer) : PGdkDragContextClass;
+function GDK_IS_DRAG_CONTEXT(anObject : Pointer) : boolean;
+function GDK_IS_DRAG_CONTEXT_CLASS(klass : Pointer) : boolean;
+function GDK_DRAG_CONTEXT_GET_CLASS(obj : Pointer) : PGdkDragContextClass;
+
+
+{ Drag and Drop }
+
+function gdk_drag_context_get_type:GType; cdecl; external gdklib;
+function gdk_drag_context_new:PGdkDragContext; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_drag_context_ref(context:PGdkDragContext); cdecl; external gdklib;
+procedure gdk_drag_context_unref(context:PGdkDragContext); cdecl; external gdklib;
+{$endif}
+
+
+{ Destination side }
+
+procedure gdk_drag_status(context:PGdkDragContext; action:TGdkDragAction; time:guint32); cdecl; external gdklib;
+procedure gdk_drop_reply(context:PGdkDragContext; ok:gboolean; time:guint32); cdecl; external gdklib;
+procedure gdk_drop_finish(context:PGdkDragContext; success:gboolean; time:guint32); cdecl; external gdklib;
+function gdk_drag_get_selection(context:PGdkDragContext):TGdkAtom; cdecl; external gdklib;
+
+
+{ Source side }
+
+function gdk_drag_begin(window:PGdkWindow; targets:PGList):PGdkDragContext; cdecl; external gdklib;
+function gdk_drag_get_protocol_for_display(display:PGdkDisplay; xid:guint32; protocol:PGdkDragProtocol):guint32; cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_drag_get_protocol(xid:guint32; protocol:PGdkDragProtocol):guint32; cdecl; external gdklib;
+{$endif}
+
+
+{ GDK_MULTIHEAD_SAFE }
+
+procedure gdk_drag_find_window(context:PGdkDragContext; drag_window:PGdkWindow; x_root:gint; y_root:gint; var dest_window:PGdkWindow;
+ protocol:PGdkDragProtocol); cdecl; external gdklib;
+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 gdklib;
+procedure gdk_drag_drop(context:PGdkDragContext; time:guint32); cdecl; external gdklib;
+procedure gdk_drag_abort(context:PGdkDragContext; time:guint32); cdecl; external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_DRAG_CONTEXT : GType;
+begin
+ GDK_TYPE_DRAG_CONTEXT:=gdk_drag_context_get_type;
+end;
+
+function GDK_DRAG_CONTEXT(anObject : Pointer) : PGdkDragContext;
+begin
+ GDK_DRAG_CONTEXT:=PGdkDragContext(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ GDK_TYPE_DRAG_CONTEXT));
+end;
+
+function GDK_DRAG_CONTEXT_CLASS(klass : Pointer) : PGdkDragContextClass;
+begin
+ GDK_DRAG_CONTEXT_CLASS:=PGdkDragContextClass(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_DRAG_CONTEXT));
+end;
+
+function GDK_IS_DRAG_CONTEXT(anObject : Pointer) : boolean;
+begin
+ GDK_IS_DRAG_CONTEXT:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_DRAG_CONTEXT);
+end;
+
+function GDK_IS_DRAG_CONTEXT_CLASS(klass : Pointer) : boolean;
+begin
+ GDK_IS_DRAG_CONTEXT_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_DRAG_CONTEXT);
+end;
+
+function GDK_DRAG_CONTEXT_GET_CLASS(obj : Pointer) : PGdkDragContextClass;
+begin
+ GDK_DRAG_CONTEXT_GET_CLASS:=PGdkDragContextClass(G_TYPE_INSTANCE_GET_CLASS(
+ obj,GDK_TYPE_DRAG_CONTEXT));
+end;
+
+{$ENDIF}
diff --git a/packages/gtk2/src/gtk+/gdk/gdkdrawable.inc b/packages/gtk2/src/gtk+/gdk/gdkdrawable.inc
new file mode 100644
index 0000000000..f023a228e6
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkdrawable.inc
@@ -0,0 +1,225 @@
+// included by gdk2.pp
+
+{$IFDEF read_forward_definitions}
+ PGdkDrawable = ^TGdkDrawable;
+ TGdkDrawable = record
+ parent_instance : TGObject;
+ end;
+
+ PGdkWindow = ^TGdkWindow;
+ TGdkWindow = TGdkDrawable;
+
+ PGdkPixmap = ^TGdkPixmap;
+ TGdkPixmap = TGdkDrawable;
+
+ PGdkBitmap = ^TGdkBitmap;
+ TGdkBitmap = TGdkDrawable;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+{ Padding for future expansion }
+ PGdkDrawableClass = ^TGdkDrawableClass;
+ TGdkDrawableClass = record
+ parent_class : TGObjectClass;
+ create_gc : function (drawable:PGdkDrawable; values:PGdkGCValues; mask:TGdkGCValuesMask):PGdkGC; cdecl;
+ draw_rectangle : procedure (drawable:PGdkDrawable; gc:PGdkGC; filled:gint; x:gint; y:gint;
+ width:gint; height:gint); cdecl;
+ draw_arc : procedure (drawable:PGdkDrawable; gc:PGdkGC; filled:gint; x:gint; y:gint;
+ width:gint; height:gint; angle1:gint; angle2:gint); cdecl;
+ draw_polygon : procedure (drawable:PGdkDrawable; gc:PGdkGC; filled:gint; points:PGdkPoint; npoints:gint); cdecl;
+ draw_text : procedure (drawable:PGdkDrawable; font:PGdkFont; gc:PGdkGC; x:gint; y:gint;
+ text:Pgchar; text_length:gint); cdecl;
+ draw_text_wc : procedure (drawable:PGdkDrawable; font:PGdkFont; gc:PGdkGC; x:gint; y:gint;
+ text:PGdkWChar; text_length:gint); cdecl;
+ draw_drawable : procedure (drawable:PGdkDrawable; gc:PGdkGC; src:PGdkDrawable; xsrc:gint; ysrc:gint;
+ xdest:gint; ydest:gint; width:gint; height:gint); cdecl;
+ draw_points : procedure (drawable:PGdkDrawable; gc:PGdkGC; points:PGdkPoint; npoints:gint); cdecl;
+ draw_segments : procedure (drawable:PGdkDrawable; gc:PGdkGC; segs:PGdkSegment; nsegs:gint); cdecl;
+ draw_lines : procedure (drawable:PGdkDrawable; gc:PGdkGC; points:PGdkPoint; npoints:gint); cdecl;
+ draw_glyphs : procedure (drawable:PGdkDrawable; gc:PGdkGC; font:PPangoFont; x:gint; y:gint;
+ glyphs:PPangoGlyphString); cdecl;
+ draw_image : procedure (drawable:PGdkDrawable; gc:PGdkGC; image:PGdkImage; xsrc:gint; ysrc:gint;
+ xdest:gint; ydest:gint; width:gint; height:gint); cdecl;
+ get_depth : function (drawable:PGdkDrawable):gint; cdecl;
+ get_size : procedure (drawable:PGdkDrawable; width:Pgint; height:Pgint); cdecl;
+ set_colormap : procedure (drawable:PGdkDrawable; cmap:PGdkColormap); cdecl;
+ get_colormap : function (drawable:PGdkDrawable):PGdkColormap; cdecl;
+ get_visual : function (drawable:PGdkDrawable):PGdkVisual; cdecl;
+ get_screen : function (drawable:PGdkDrawable):PGdkScreen; cdecl;
+ get_image : function (drawable:PGdkDrawable; x:gint; y:gint; width:gint; height:gint):PGdkImage; cdecl;
+ get_clip_region : function (drawable:PGdkDrawable):PGdkRegion; cdecl;
+ get_visible_region : function (drawable:PGdkDrawable):PGdkRegion; cdecl;
+ get_composite_drawable : function (drawable:PGdkDrawable; x:gint; y:gint; width:gint; height:gint;
+ composite_x_offset:Pgint; composite_y_offset:Pgint):PGdkDrawable; cdecl;
+ _draw_pixbuf : procedure (drawable:PGdkDrawable; gc:PGdkGC; pixbuf:PGdkPixbuf; src_x:gint; src_y:gint;
+ dest_x:gint; dest_y:gint; width:gint; height:gint; dither:TGdkRgbDither;
+ x_dither:gint; y_dither:gint); cdecl;
+ _copy_to_image : function (drawable:PGdkDrawable; image:PGdkImage; src_x:gint; src_y:gint; dest_x:gint;
+ dest_y:gint; width:gint; height:gint):PGdkImage; cdecl;
+ _gdk_reserved1 : procedure ; cdecl;
+ _gdk_reserved2 : procedure ; cdecl;
+ _gdk_reserved3 : procedure ; cdecl;
+ _gdk_reserved4 : procedure ; cdecl;
+ _gdk_reserved5 : procedure ; cdecl;
+ _gdk_reserved6 : procedure ; cdecl;
+ _gdk_reserved7 : procedure ; cdecl;
+ _gdk_reserved9 : procedure ; cdecl;
+ _gdk_reserved10 : procedure ; cdecl;
+ _gdk_reserved11 : procedure ; cdecl;
+ _gdk_reserved12 : procedure ; cdecl;
+ _gdk_reserved13 : procedure ; cdecl;
+ _gdk_reserved14 : procedure ; cdecl;
+ _gdk_reserved15 : procedure ; cdecl;
+ _gdk_reserved16 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+function GDK_TYPE_DRAWABLE : GType;
+function GDK_DRAWABLE(anObject : Pointer) : PGdkDrawable;
+function GDK_DRAWABLE_CLASS(klass : Pointer) : PGdkDrawableClass;
+function GDK_IS_DRAWABLE(anObject : Pointer) : boolean;
+function GDK_IS_DRAWABLE_CLASS(klass : Pointer) : boolean;
+function GDK_DRAWABLE_GET_CLASS(obj : Pointer) : PGdkDrawableClass;
+
+
+function gdk_drawable_get_type:GType; cdecl; external gdklib;
+{ Manipulation of drawables }
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_drawable_set_data(drawable:PGdkDrawable; key:Pgchar; data:gpointer; destroy_func:TGDestroyNotify); cdecl; external gdklib;
+function gdk_drawable_get_data(drawable:PGdkDrawable; key:Pgchar):gpointer; cdecl; external gdklib;
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+
+procedure gdk_drawable_get_size(drawable:PGdkDrawable; width:Pgint; height:Pgint); cdecl; external gdklib;
+procedure gdk_drawable_set_colormap(drawable:PGdkDrawable; colormap:PGdkColormap); cdecl; external gdklib;
+function gdk_drawable_get_colormap(drawable:PGdkDrawable):PGdkColormap; cdecl; external gdklib;
+function gdk_drawable_get_visual(drawable:PGdkDrawable):PGdkVisual; cdecl; external gdklib;
+function gdk_drawable_get_depth(drawable:PGdkDrawable):gint; cdecl; external gdklib;
+function gdk_drawable_get_screen(drawable:PGdkDrawable):PGdkScreen; cdecl; external gdklib;
+function gdk_drawable_get_display(drawable:PGdkDrawable):PGdkDisplay; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+function gdk_drawable_ref(drawable:PGdkDrawable):PGdkDrawable; cdecl; external gdklib;
+procedure gdk_drawable_unref(drawable:PGdkDrawable); cdecl; external gdklib;
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+
+
+{ Drawing }
+
+procedure gdk_draw_point(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint); cdecl; external gdklib;
+procedure gdk_draw_line(drawable:PGdkDrawable; gc:PGdkGC; x1:gint; y1:gint; x2:gint;
+ y2:gint); cdecl; external gdklib;
+procedure gdk_draw_rectangle(drawable:PGdkDrawable; gc:PGdkGC; filled:gint; x:gint; y:gint;
+ width:gint; height:gint); cdecl; external gdklib;
+procedure gdk_draw_arc(drawable:PGdkDrawable; gc:PGdkGC; filled:gint; x:gint; y:gint;
+ width:gint; height:gint; angle1:gint; angle2:gint); cdecl; external gdklib;
+procedure gdk_draw_polygon(drawable:PGdkDrawable; gc:PGdkGC; filled:gint; points:PGdkPoint; npoints:gint); cdecl; external gdklib;
+{$IFDEF GTK2_2}
+procedure gdk_draw_pixbuf(drawable: PGdkDrawable; gc:PGdkGC; src:PGdkPixbuf;
+ xsrc:gint; ysrc:gint; xdest:gint; ydest:gint;
+ width:gint; height:gint; dither:TGdkRgbDither;
+ x_dither:gint; y_dither:gint); cdecl; external gdklib;
+{$ENDIF}
+
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_draw_string(drawable:PGdkDrawable; font:PGdkFont; gc:PGdkGC; x:gint; y:gint;
+ _string:Pgchar); cdecl; external gdklib;
+procedure gdk_draw_text(drawable:PGdkDrawable; font:PGdkFont; gc:PGdkGC; x:gint; y:gint;
+ text:Pgchar; text_length:gint); cdecl; external gdklib;
+procedure gdk_draw_text_wc(drawable:PGdkDrawable; font:PGdkFont; gc:PGdkGC; x:gint; y:gint;
+ text:PGdkWChar; text_length:gint); cdecl; external gdklib;
+{$endif}
+
+
+{ GDK_DISABLE_DEPRECATED }
+
+procedure gdk_draw_drawable(drawable:PGdkDrawable; gc:PGdkGC; src:PGdkDrawable; xsrc:gint; ysrc:gint;
+ xdest:gint; ydest:gint; width:gint; height:gint); cdecl; external gdklib;
+procedure gdk_draw_image(drawable:PGdkDrawable; gc:PGdkGC; image:PGdkImage; xsrc:gint; ysrc:gint;
+ xdest:gint; ydest:gint; width:gint; height:gint); cdecl; external gdklib;
+procedure gdk_draw_points(drawable:PGdkDrawable; gc:PGdkGC; points:PGdkPoint; npoints:gint); cdecl; external gdklib;
+procedure gdk_draw_segments(drawable:PGdkDrawable; gc:PGdkGC; segs:PGdkSegment; nsegs:gint); cdecl; external gdklib;
+procedure gdk_draw_lines(drawable:PGdkDrawable; gc:PGdkGC; points:PGdkPoint; npoints:gint); cdecl; external gdklib;
+procedure gdk_draw_glyphs(drawable:PGdkDrawable; gc:PGdkGC; font:PPangoFont; x:gint; y:gint;
+ glyphs:PPangoGlyphString); cdecl; external gdklib;
+procedure gdk_draw_layout_line(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint; line:PPangoLayoutLine); cdecl; external gdklib;
+procedure gdk_draw_layout(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint; layout:PPangoLayout); cdecl; external gdklib;
+procedure gdk_draw_layout_line_with_colors(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint; line:PPangoLayoutLine;
+ foreground:PGdkColor; background:PGdkColor); cdecl; external gdklib;
+procedure gdk_draw_layout_with_colors(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint; layout:PPangoLayout;
+ foreground:PGdkColor; background:PGdkColor); cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_draw_pixmap(drawable:PGdkDrawable; gc:PGdkGC; src:PGdkDrawable; xsrc:gint; ysrc:gint;
+ xdest:gint; ydest:gint; width:gint; height:gint);
+procedure gdk_draw_bitmap(drawable:PGdkDrawable; gc:PGdkGC; src:PGdkDrawable; xsrc:gint; ysrc:gint;
+ xdest:gint; ydest:gint; width:gint; height:gint);
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+
+function gdk_drawable_get_image(drawable:PGdkDrawable; x:gint; y:gint; width:gint; height:gint):PGdkImage; cdecl; external gdklib;
+function gdk_drawable_get_clip_region(drawable:PGdkDrawable):PGdkRegion; cdecl; external gdklib;
+function gdk_drawable_get_visible_region(drawable:PGdkDrawable):PGdkRegion; cdecl; external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_DRAWABLE : GType;
+begin
+ GDK_TYPE_DRAWABLE:=gdk_drawable_get_type;
+end;
+
+function GDK_DRAWABLE(anObject : Pointer) : PGdkDrawable;
+begin
+ GDK_DRAWABLE:=PGdkDrawable(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ GDK_TYPE_DRAWABLE));
+end;
+
+function GDK_DRAWABLE_CLASS(klass : Pointer) : PGdkDrawableClass;
+begin
+ GDK_DRAWABLE_CLASS:=PGdkDrawableClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ GDK_TYPE_DRAWABLE));
+end;
+
+function GDK_IS_DRAWABLE(anObject : Pointer) : boolean;
+begin
+ GDK_IS_DRAWABLE:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_DRAWABLE);
+end;
+
+function GDK_IS_DRAWABLE_CLASS(klass : Pointer) : boolean;
+begin
+ GDK_IS_DRAWABLE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_DRAWABLE);
+end;
+
+function GDK_DRAWABLE_GET_CLASS(obj : Pointer) : PGdkDrawableClass;
+begin
+ GDK_DRAWABLE_GET_CLASS:=PGdkDrawableClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ GDK_TYPE_DRAWABLE));
+end;
+
+procedure gdk_draw_pixmap(drawable:PGdkDrawable; gc:PGdkGC; src:PGdkDrawable;
+ xsrc:gint; ysrc:gint; xdest:gint; ydest:gint; width:gint; height:gint);
+begin
+ gdk_draw_drawable(drawable,gc,src,xsrc,ysrc,xdest,ydest,width,height);
+end;
+
+procedure gdk_draw_bitmap(drawable:PGdkDrawable; gc:PGdkGC; src:PGdkDrawable;
+ xsrc:gint; ysrc:gint; xdest:gint; ydest:gint; width:gint; height:gint);
+begin
+ gdk_draw_drawable(drawable,gc,src,xsrc,ysrc,xdest,ydest,width,height);
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkevents.inc b/packages/gtk2/src/gtk+/gdk/gdkevents.inc
new file mode 100644
index 0000000000..85a8e94f23
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkevents.inc
@@ -0,0 +1,478 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+ PGdkEvent = ^TGdkEvent;
+
+ TGdkEventFunc = procedure (event:PGdkEvent; data:gpointer); cdecl;
+{ Event filtering }
+
+ PGdkXEvent = ^TGdkXEvent;
+ TGdkXEvent = procedure;
+{ Can be cast to window system specific
+ even type, XEvent on X11, MSG on Win32.
+ }
+{ Event not handled, continue processesing }
+{ Translated event stored }
+{ Terminate processing, removing event }
+
+ PGdkFilterReturn = ^TGdkFilterReturn;
+ TGdkFilterReturn = (
+ GDK_FILTER_CONTINUE,
+ GDK_FILTER_TRANSLATE,
+ GDK_FILTER_REMOVE
+ );
+
+ TGdkFilterFunc = function (xevent:PGdkXEvent; event:PGdkEvent;
+ data:gpointer):TGdkFilterReturn; cdecl;
+{ Event types.
+ Nothing: No event occurred.
+ Delete: A window delete event was sent by the window manager.
+ The specified window should be deleted.
+ Destroy: A window has been destroyed.
+ Expose: Part of a window has been uncovered.
+ NoExpose: Same as expose, but no expose event was generated.
+ VisibilityNotify: A window has become fully/partially/not obscured.
+ MotionNotify: The mouse has moved.
+ ButtonPress: A mouse button was pressed.
+ ButtonRelease: A mouse button was release.
+ KeyPress: A key was pressed.
+ KeyRelease: A key was released.
+ EnterNotify: A window was entered.
+ LeaveNotify: A window was exited.
+ FocusChange: The focus window has changed. (The focus window gets
+ keyboard events).
+ Resize: A window has been resized.
+ Map: A window has been mapped. (It is now visible on the screen).
+ Unmap: A window has been unmapped. (It is no longer visible on
+ the screen).
+ Scroll: A mouse wheel was scrolled either up or down.
+ }
+
+ PGdkEventType = ^TGdkEventType;
+ TGdkEventType = gint;
+
+{ Event masks. (Used to select what types of events a window
+ will receive).
+ }
+
+ PGdkEventMask = ^TGdkEventMask;
+ TGdkEventMask = gint32;
+
+ PGdkVisibilityState = ^TGdkVisibilityState;
+ TGdkVisibilityState = (
+ GDK_VISIBILITY_UNOBSCURED,
+ GDK_VISIBILITY_PARTIAL,
+ GDK_VISIBILITY_FULLY_OBSCURED
+ );
+
+ PGdkScrollDirection = ^TGdkScrollDirection;
+ TGdkScrollDirection = (
+ GDK_SCROLL_UP,
+ GDK_SCROLL_DOWN,
+ GDK_SCROLL_LEFT,
+ GDK_SCROLL_RIGHT
+ );
+
+{ Types of enter/leave notifications.
+ Ancestor:
+ Virtual:
+ Inferior:
+ Nonlinear:
+ NonlinearVirtual:
+ Unknown: An unknown type of enter/leave event occurred.
+ }
+
+ PGdkNotifyType = ^TGdkNotifyType;
+ TGdkNotifyType = integer; // see below for possible values
+
+{ Enter/leave event modes.
+ NotifyNormal
+ NotifyGrab
+ NotifyUngrab
+ }
+
+ PGdkCrossingMode = ^TGdkCrossingMode;
+ TGdkCrossingMode = (
+ GDK_CROSSING_NORMAL,
+ GDK_CROSSING_GRAB,
+ GDK_CROSSING_UNGRAB
+ );
+
+ PGdkPropertyState = ^TGdkPropertyState;
+ TGdkPropertyState = (
+ GDK_PROPERTY_NEW_VALUE,
+ GDK_PROPERTY_STATE_DELETE // was GDK_PROPERTY_DELETE, but there is also a function
+ );
+
+ PGdkWindowState = ^TGdkWindowState;
+ TGdkWindowState = gint;
+
+
+ PGdkSettingAction = ^TGdkSettingAction;
+ TGdkSettingAction = (
+ GDK_SETTING_ACTION_NEW,
+ GDK_SETTING_ACTION_CHANGED,
+ GDK_SETTING_ACTION_DELETED
+ );
+
+ PGdkEventAny = ^TGdkEventAny;
+ TGdkEventAny = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ end;
+
+{ If non-zero, how many more events follow. }
+ PGdkEventExpose = ^TGdkEventExpose;
+ TGdkEventExpose = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ area : TGdkRectangle;
+ region : PGdkRegion;
+ count : gint;
+ end;
+
+{ XXX: does anyone need the X major_code or minor_code fields? }
+ PGdkEventNoExpose = ^TGdkEventNoExpose;
+ TGdkEventNoExpose = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ end;
+
+ PGdkEventVisibility = ^TGdkEventVisibility;
+ TGdkEventVisibility = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ state : TGdkVisibilityState;
+ end;
+
+ PGdkEventMotion = ^TGdkEventMotion;
+ TGdkEventMotion = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ time : guint32;
+ x : gdouble;
+ y : gdouble;
+ axes : Pgdouble;
+ state : guint;
+ is_hint : gint16;
+ device : PGdkDevice;
+ x_root : gdouble;
+ y_root : gdouble;
+ end;
+
+ PGdkEventButton = ^TGdkEventButton;
+ TGdkEventButton = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ time : guint32;
+ x : gdouble;
+ y : gdouble;
+ axes : Pgdouble;
+ state : guint;
+ button : guint;
+ device : PGdkDevice;
+ x_root : gdouble;
+ y_root : gdouble;
+ end;
+
+ PGdkEventScroll = ^TGdkEventScroll;
+ TGdkEventScroll = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ time : guint32;
+ x : gdouble;
+ y : gdouble;
+ state : guint;
+ direction : TGdkScrollDirection;
+ device : PGdkDevice;
+ x_root : gdouble;
+ y_root : gdouble;
+ end;
+
+ PGdkEventKey = ^TGdkEventKey;
+ TGdkEventKey = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ time : guint32;
+ state : guint;
+ keyval : guint;
+ length : gint;
+ _string : Pgchar;
+ hardware_keycode : guint16;
+ group : guint8;
+ end;
+
+ PGdkEventCrossing = ^TGdkEventCrossing;
+ TGdkEventCrossing = record
+ _type : 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
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ _in : gint16;
+ end;
+
+ PGdkEventConfigure = ^TGdkEventConfigure;
+ TGdkEventConfigure = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ x : gint;
+ y : gint;
+ width : gint;
+ height : gint;
+ end;
+
+ PGdkEventProperty = ^TGdkEventProperty;
+ TGdkEventProperty = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ atom : TGdkAtom;
+ time : guint32;
+ state : guint;
+ end;
+
+ PGdkEventSelection = ^TGdkEventSelection;
+ TGdkEventSelection = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ selection : TGdkAtom;
+ target : TGdkAtom;
+ _property : TGdkAtom;
+ time : guint32;
+ requestor : TGdkNativeWindow;
+ end;
+
+{ This event type will be used pretty rarely. It only is important
+ for XInput aware programs that are drawing their own cursor }
+ PGdkEventProximity = ^TGdkEventProximity;
+ TGdkEventProximity = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ time : guint32;
+ device : PGdkDevice;
+ end;
+
+ PmatDUMMY = ^TmatDUMMY;
+ TmatDUMMY = record
+ case longint of
+ 0 : ( b : array[0..19] of char );
+ 1 : ( s : array[0..9] of smallint );
+ 2 : ( li : array[0..4] of longint );
+ end;
+
+ PGdkEventClient = ^TGdkEventClient;
+ TGdkEventClient = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ message_type : TGdkAtom;
+ data_format : gushort;
+ data : record
+ case longint of
+ 0 : ( b : array[0..19] of char );
+ 1 : ( s : array[0..9] of smallint );
+ 2 : ( l : array[0..4] of longint );
+ end;
+ end;
+
+ PGdkEventSetting = ^TGdkEventSetting;
+ TGdkEventSetting = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ action : TGdkSettingAction;
+ name : Pchar;
+ end;
+
+ PGdkEventWindowState = ^TGdkEventWindowState;
+ TGdkEventWindowState = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ changed_mask : TGdkWindowState;
+ new_window_state : TGdkWindowState;
+ end;
+
+{ Event types for DND }
+ PGdkEventDND = ^TGdkEventDND;
+ TGdkEventDND = record
+ _type : TGdkEventType;
+ window : PGdkWindow;
+ send_event : gint8;
+ context : PGdkDragContext;
+ time : guint32;
+ x_root : gshort;
+ y_root : gshort;
+ end;
+
+ TGdkEvent = record
+ case longint of
+ 0 : ( _type : TGdkEventType );
+ 1 : ( any : TGdkEventAny );
+ 2 : ( expose : TGdkEventExpose );
+ 3 : ( no_expose : TGdkEventNoExpose );
+ 4 : ( visibility : TGdkEventVisibility );
+ 5 : ( motion : TGdkEventMotion );
+ 6 : ( button : TGdkEventButton );
+ 7 : ( scroll : TGdkEventScroll );
+ 8 : ( key : TGdkEventKey );
+ 9 : ( crossing : TGdkEventCrossing );
+ 10 : ( focus_change : TGdkEventFocus );
+ 11 : ( configure : TGdkEventConfigure );
+ 12 : ( _property : TGdkEventProperty );
+ 13 : ( selection : TGdkEventSelection );
+ 14 : ( proximity : TGdkEventProximity );
+ 15 : ( client : TGdkEventClient );
+ 16 : ( dnd : TGdkEventDND );
+ 17 : ( window_state : TGdkEventWindowState );
+ 18 : ( setting : TGdkEventSetting );
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+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; // was GDK_DRAG_MOTION, which bites gdk_drag_motion
+ GDK_DRAG_STATUS_EVENT = 25; // was GDK_DRAG_STATUS, which bites gdk_drag_status
+ GDK_DROP_START = 26;
+ GDK_DROP_FINISHED = 27;
+ GDK_CLIENT_EVENT = 28;
+ GDK_VISIBILITY_NOTIFY = 29;
+ GDK_NO_EXPOSE = 30;
+ GDK_SCROLL = 31;
+ GDK_WINDOW_STATE = 32;
+ GDK_SETTING = 33;
+
+ // values for TGdkNotifyType
+ 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;
+
+
+function GDK_TYPE_EVENT : GType;
+
+const
+ GDK_PRIORITY_EVENTS = G_PRIORITY_DEFAULT;
+ GDK_PRIORITY_REDRAW = G_PRIORITY_HIGH_IDLE + 20;
+
+ 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_SCROLL_MASK = 1 shl 21;
+ GDK_ALL_EVENTS_MASK = $3FFFFE;
+
+ GDK_WINDOW_STATE_WITHDRAWN = 1 shl 0;
+ GDK_WINDOW_STATE_ICONIFIED = 1 shl 1;
+ GDK_WINDOW_STATE_MAXIMIZED = 1 shl 2;
+ GDK_WINDOW_STATE_STICKY = 1 shl 3;
+
+
+function gdk_event_get_type:GType; cdecl; external gdklib;
+function gdk_events_pending:gboolean; cdecl; external gdklib;
+function gdk_event_get:PGdkEvent; cdecl; external gdklib;
+function gdk_event_peek:PGdkEvent; cdecl; external gdklib;
+function gdk_event_get_graphics_expose(window:PGdkWindow):PGdkEvent; cdecl; external gdklib;
+procedure gdk_event_put(event:PGdkEvent); cdecl; external gdklib;
+function gdk_event_copy(event:PGdkEvent):PGdkEvent; cdecl; external gdklib;
+procedure gdk_event_free(event:PGdkEvent); cdecl; external gdklib;
+function gdk_event_get_time(event:PGdkEvent):guint32; cdecl; external gdklib;
+function gdk_event_get_state(event:PGdkEvent; state:PGdkModifierType):gboolean; cdecl; external gdklib;
+function gdk_event_get_coords(event:PGdkEvent; x_win:Pgdouble; y_win:Pgdouble):gboolean; cdecl; external gdklib;
+function gdk_event_get_root_coords(event:PGdkEvent; x_root:Pgdouble; y_root:Pgdouble):gboolean; cdecl; external gdklib;
+function gdk_event_get_axis(event:PGdkEvent; axis_use:TGdkAxisUse; value:Pgdouble):gboolean; cdecl; external gdklib;
+procedure gdk_event_handler_set(func:TGdkEventFunc; data:gpointer; notify:TGDestroyNotify); cdecl; external gdklib;
+procedure gdk_set_show_events(show_events:gboolean); cdecl; external gdklib;
+function gdk_get_show_events:gboolean; cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+procedure gdk_add_client_message_filter(message_type:TGdkAtom; func:TGdkFilterFunc; data:gpointer); cdecl; external gdklib;
+function gdk_setting_get(name:Pgchar; var value:TGValue):gboolean; cdecl; external gdklib;
+{$endif}
+{ GDK_MULTIHEAD_SAFE }
+
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_EVENT : GType;
+begin
+ GDK_TYPE_EVENT:=gdk_event_get_type;
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkfont.inc b/packages/gtk2/src/gtk+/gdk/gdkfont.inc
new file mode 100644
index 0000000000..816716dc68
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkfont.inc
@@ -0,0 +1,85 @@
+// included by gdk2.pp
+{$IFDEF read_forward_definitions}
+{ Types of font.
+ GDK_FONT_FONT: the font is an XFontStruct.
+ GDK_FONT_FONTSET: the font is an XFontSet used for I18N.
+ }
+ PGdkFontType = ^TGdkFontType;
+ TGdkFontType = (
+ GDK_FONT_FONT,
+ GDK_FONT_FONTSET
+ );
+
+ PGdkFont = ^TGdkFont;
+ TGdkFont = record
+ _type : TGdkFontType;
+ ascent : gint;
+ descent : gint;
+ end;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GDK_TYPE_FONT : GType;
+
+
+function gdk_font_get_type:GType; cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_font_load(font_name:Pgchar):PGdkFont; cdecl; external gdklib;
+function gdk_fontset_load(fontset_name:Pgchar):PGdkFont; cdecl; external gdklib;
+function gdk_font_from_description(font_desc:PPangoFontDescription):PGdkFont; cdecl; external gdklib;
+{$endif}
+
+function gdk_font_load_for_display(display:PGdkDisplay; font_name:Pgchar):PGdkFont; cdecl; external gdklib;
+function gdk_fontset_load_for_display(display:PGdkDisplay; fontset_name:Pgchar):PGdkFont; cdecl; external gdklib;
+function gdk_font_from_description_for_display(display:PGdkDisplay; font_desc:PPangoFontDescription):PGdkFont; cdecl; external gdklib;
+function gdk_font_ref(font:PGdkFont):PGdkFont; cdecl; external gdklib;
+procedure gdk_font_unref(font:PGdkFont); cdecl; external gdklib;
+function gdk_font_id(font:PGdkFont):gint; cdecl; external gdklib;
+function gdk_font_equal(fonta:PGdkFont; fontb:PGdkFont):gboolean; cdecl; external gdklib;
+function gdk_string_width(font:PGdkFont; _string:Pgchar):gint; cdecl; external gdklib;
+function gdk_text_width(font:PGdkFont; text:Pgchar; text_length:gint):gint; cdecl; external gdklib;
+function gdk_text_width_wc(font:PGdkFont; text:PGdkWChar; text_length:gint):gint; cdecl; external gdklib;
+function gdk_char_width(font:PGdkFont; character:gchar):gint; cdecl; external gdklib;
+function gdk_char_width_wc(font:PGdkFont; character:TGdkWChar):gint; cdecl; external gdklib;
+function gdk_string_measure(font:PGdkFont; _string:Pgchar):gint; cdecl; external gdklib;
+function gdk_text_measure(font:PGdkFont; text:Pgchar; text_length:gint):gint; cdecl; external gdklib;
+function gdk_char_measure(font:PGdkFont; character:gchar):gint; cdecl; external gdklib;
+function gdk_string_height(font:PGdkFont; _string:Pgchar):gint; cdecl; external gdklib;
+function gdk_text_height(font:PGdkFont; text:Pgchar; text_length:gint):gint; cdecl; external gdklib;
+function gdk_char_height(font:PGdkFont; character:gchar):gint; cdecl; external gdklib;
+procedure gdk_text_extents(font:PGdkFont; text:Pgchar; text_length:gint; lbearing:Pgint; rbearing:Pgint;
+ width:Pgint; ascent:Pgint; descent:Pgint); cdecl; external gdklib;
+procedure gdk_text_extents_wc(font:PGdkFont; text:PGdkWChar; text_length:gint; lbearing:Pgint; rbearing:Pgint;
+ width:Pgint; ascent:Pgint; descent:Pgint); cdecl; external gdklib;
+procedure gdk_string_extents(font:PGdkFont; _string:Pgchar; lbearing:Pgint; rbearing:Pgint; width:Pgint;
+ ascent:Pgint; descent:Pgint); cdecl; external gdklib;
+function gdk_font_get_display(font:PGdkFont):PGdkDisplay; cdecl; external gdklib;
+
+{$ifdef GDK_WINDOWING_WIN32}
+
+{ Ditto temporary }
+
+function gdk_font_full_name_get(font:PGdkFont):Pgchar; cdecl; external gdklib;
+procedure gdk_font_full_name_free(name:Pgchar); cdecl; external gdklib;
+{$endif GDK_WINDOWING_WIN32}
+
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_FONT : GType;
+begin
+ GDK_TYPE_FONT:=gdk_font_get_type;
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkgc.inc b/packages/gtk2/src/gtk+/gdk/gdkgc.inc
new file mode 100644
index 0000000000..234bbdef31
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkgc.inc
@@ -0,0 +1,272 @@
+// included by gdk2.pp
+
+{$IFDEF read_forward_definitions}
+{ GC function types.
+ Copy: Overwrites destination pixels with the source pixels.
+ Invert: Inverts the destination pixels.
+ Xor: Xor's the destination pixels with the source pixels.
+ Clear: set pixels to 0
+ And: source AND destination
+ And Reverse: source AND (NOT destination)
+ And Invert: (NOT source) AND destination
+ Noop: destination
+ Or: source OR destination
+ Nor: (NOT source) AND (NOT destination)
+ Equiv: (NOT source) XOR destination
+ Xor Reverse: source OR (NOT destination)
+ Copy Inverted: NOT source
+ Xor Inverted: (NOT source) OR destination
+ Nand: (NOT source) OR (NOT destination)
+ Set: set pixels to 1
+ }
+ PGdkFunction = ^TGdkFunction;
+ TGdkFunction = (
+ GDK_COPY,
+ GDK_INVERT,
+ GDK_XOR,
+ GDK_CLEAR,
+ GDK_AND,
+ GDK_AND_REVERSE,
+ GDK_AND_INVERT,
+ GDK_NOOP,
+ GDK_OR,
+ GDK_EQUIV,
+ GDK_OR_REVERSE,
+ GDK_COPY_INVERT,
+ GDK_OR_INVERT,
+ GDK_NAND,
+ GDK_NOR,
+ GDK_SET
+ );
+
+{ GC cap styles
+ CapNotLast:
+ CapButt:
+ CapRound:
+ CapProjecting:
+ }
+ PGdkCapStyle = ^TGdkCapStyle;
+ TGdkCapStyle = (
+ GDK_CAP_NOT_LAST,
+ GDK_CAP_BUTT,
+ GDK_CAP_ROUND,
+ GDK_CAP_PROJECTING
+ );
+
+{ GC fill types.
+ Solid:
+ Tiled:
+ Stippled:
+ OpaqueStippled:
+ }
+ PGdkFill = ^TGdkFill;
+ TGdkFill = (
+ GDK_SOLID,
+ GDK_TILED,
+ GDK_STIPPLED,
+ GDK_OPAQUE_STIPPLED
+ );
+
+{ GC join styles
+ JoinMiter:
+ JoinRound:
+ JoinBevel:
+ }
+ PGdkJoinStyle = ^TGdkJoinStyle;
+ TGdkJoinStyle = (
+ GDK_JOIN_MITER,
+ GDK_JOIN_ROUND,
+ GDK_JOIN_BEVEL
+ );
+
+{ GC line styles
+ Solid:
+ OnOffDash:
+ DoubleDash:
+ }
+ PGdkLineStyle = ^TGdkLineStyle;
+ TGdkLineStyle = (
+ GDK_LINE_SOLID,
+ GDK_LINE_ON_OFF_DASH,
+ GDK_LINE_DOUBLE_DASH
+ );
+
+ PGdkSubwindowMode = ^TGdkSubwindowMode;
+ TGdkSubwindowMode = integer; // see below for possible values
+
+ PGdkGCValuesMask = ^TGdkGCValuesMask;
+ TGdkGCValuesMask = longint; // see below for possible values
+
+ PGdkGCValues = ^TGdkGCValues;
+ TGdkGCValues = record
+ foreground : TGdkColor;
+ background : TGdkColor;
+ font : PGdkFont;
+ _function : 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
+ parent_instance : TGObject;
+ clip_x_origin : gint;
+ clip_y_origin : gint;
+ ts_x_origin : gint;
+ ts_y_origin : gint;
+ colormap : PGdkColormap;
+ end;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ Padding for future expansion }
+ PGdkGCClass = ^TGdkGCClass;
+ TGdkGCClass = record
+ parent_class : TGObjectClass;
+ get_values : procedure (gc:PGdkGC; values:PGdkGCValues); cdecl;
+ set_values : procedure (gc:PGdkGC; values:PGdkGCValues; mask:TGdkGCValuesMask); cdecl;
+ set_dashes : procedure (gc:PGdkGC; dash_offset:gint; dash_list:array of gint8; n:gint); cdecl;
+ _gdk_reserved1 : procedure ; cdecl;
+ _gdk_reserved2 : procedure ; cdecl;
+ _gdk_reserved3 : procedure ; cdecl;
+ _gdk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ // values for TGdkGCValuesMask
+ 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;
+
+ // values for TGdkSubwindowMode
+ GDK_CLIP_BY_CHILDREN = 0;
+ GDK_INCLUDE_INFERIORS = 1;
+
+
+function GDK_TYPE_GC : GType;
+function GDK_GC(anObject : Pointer) : PGdkGC;
+function GDK_GC_CLASS(klass : Pointer) : PGdkGCClass;
+function GDK_IS_GC(anObject : Pointer) : boolean;
+function GDK_IS_GC_CLASS(klass : Pointer) : boolean;
+function GDK_GC_GET_CLASS(obj : Pointer) : PGdkGCClass;
+
+
+function gdk_gc_get_type:GType; cdecl; external gdklib;
+function gdk_gc_new(drawable:PGdkDrawable):PGdkGC; cdecl; external gdklib;
+function gdk_gc_new_with_values(drawable:PGdkDrawable; values:PGdkGCValues; values_mask:TGdkGCValuesMask):PGdkGC; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+function gdk_gc_ref(gc:PGdkGC):PGdkGC; cdecl; external gdklib;
+procedure gdk_gc_unref(gc:PGdkGC); cdecl; external gdklib;
+{$endif}
+
+procedure gdk_gc_get_values(gc:PGdkGC; values:PGdkGCValues); cdecl; external gdklib;
+procedure gdk_gc_set_values(gc:PGdkGC; values:PGdkGCValues; values_mask:TGdkGCValuesMask); cdecl; external gdklib;
+procedure gdk_gc_set_foreground(gc:PGdkGC; color:PGdkColor); cdecl; external gdklib;
+procedure gdk_gc_set_background(gc:PGdkGC; color:PGdkColor); cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_gc_set_font(gc:PGdkGC; font:PGdkFont); cdecl; external gdklib;
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+
+procedure gdk_gc_set_function(gc:PGdkGC; _function:TGdkFunction); cdecl; external gdklib;
+procedure gdk_gc_set_fill(gc:PGdkGC; fill:TGdkFill); cdecl; external gdklib;
+procedure gdk_gc_set_tile(gc:PGdkGC; tile:PGdkPixmap); cdecl; external gdklib;
+procedure gdk_gc_set_stipple(gc:PGdkGC; stipple:PGdkPixmap); cdecl; external gdklib;
+procedure gdk_gc_set_ts_origin(gc:PGdkGC; x:gint; y:gint); cdecl; external gdklib;
+procedure gdk_gc_set_clip_origin(gc:PGdkGC; x:gint; y:gint); cdecl; external gdklib;
+procedure gdk_gc_set_clip_mask(gc:PGdkGC; mask:PGdkBitmap); cdecl; external gdklib;
+procedure gdk_gc_set_clip_rectangle(gc:PGdkGC; rectangle:PGdkRectangle); cdecl; external gdklib;
+procedure gdk_gc_set_clip_region(gc:PGdkGC; region:PGdkRegion); cdecl; external gdklib;
+procedure gdk_gc_set_subwindow(gc:PGdkGC; mode:TGdkSubwindowMode); cdecl; external gdklib;
+procedure gdk_gc_set_exposures(gc:PGdkGC; exposures:gboolean); cdecl; external gdklib;
+procedure gdk_gc_set_line_attributes(gc:PGdkGC; line_width:gint; line_style:TGdkLineStyle; cap_style:TGdkCapStyle; join_style:TGdkJoinStyle); cdecl; external gdklib;
+procedure gdk_gc_set_dashes(gc:PGdkGC; dash_offset:gint; dash_list:array of gint8; n:gint); cdecl; external gdklib;
+procedure gdk_gc_offset(gc:PGdkGC; x_offset:gint; y_offset:gint); cdecl; external gdklib;
+procedure gdk_gc_copy(dst_gc:PGdkGC; src_gc:PGdkGC); cdecl; external gdklib;
+procedure gdk_gc_set_colormap(gc:PGdkGC; colormap:PGdkColormap); cdecl; external gdklib;
+function gdk_gc_get_colormap(gc:PGdkGC):PGdkColormap; cdecl; external gdklib;
+procedure gdk_gc_set_rgb_fg_color(gc:PGdkGC; color:PGdkColor); cdecl; external gdklib;
+procedure gdk_gc_set_rgb_bg_color(gc:PGdkGC; color:PGdkColor); cdecl; external gdklib;
+function gdk_gc_get_screen(gc:PGdkGC):PGdkScreen; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_gc_destroy(gc:PGdkGC);
+{$endif}
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_GC : GType;
+begin
+ GDK_TYPE_GC:=gdk_gc_get_type;
+end;
+
+function GDK_GC(anObject : Pointer) : PGdkGC;
+begin
+ GDK_GC:=PGdkGC(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_GC));
+end;
+
+function GDK_GC_CLASS(klass : Pointer) : PGdkGCClass;
+begin
+ GDK_GC_CLASS:=PGdkGCClass(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_GC));
+end;
+
+function GDK_IS_GC(anObject : Pointer) : boolean;
+begin
+ GDK_IS_GC:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_GC);
+end;
+
+function GDK_IS_GC_CLASS(klass : Pointer) : boolean;
+begin
+ GDK_IS_GC_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_GC);
+end;
+
+function GDK_GC_GET_CLASS(obj : Pointer) : PGdkGCClass;
+begin
+ GDK_GC_GET_CLASS:=PGdkGCClass(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_GC));
+end;
+
+procedure gdk_gc_destroy(gc:PGdkGC);
+begin
+ g_object_unref(G_OBJECT(gc));
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdki18n.inc b/packages/gtk2/src/gtk+/gdk/gdki18n.inc
new file mode 100644
index 0000000000..3a2b2a2f72
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdki18n.inc
@@ -0,0 +1,112 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ 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 Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+ }
+{
+ Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
+ file for a list of people on the GTK+ Team. See the ChangeLog
+ files for a list of changes. These files are distributed with
+ GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ }
+{$ifndef __GDK_I18N_H__}
+{$define __GDK_I18N_H__}
+{$ifndef GDK_DISABLE_DEPRECATED}
+{ GDK uses "glib". (And so does GTK).
+ }
+
+{$include <gdkconfig.inc}
+{ international string support }
+{$include <stdlib.inc}
+{$if !defined(GDK_HAVE_BROKEN_WCTYPE) && (defined(GDK_HAVE_WCTYPE_H) || defined(GDK_HAVE_WCHAR_H)) && !defined(X_LOCALE)}
+{$ifdef GDK_HAVE_WCTYPE_H}
+{$include <wctype.inc}
+{$else}
+{$ifdef GDK_HAVE_WCHAR_H}
+{$include <wchar.inc}
+{$endif}
+{$endif}
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function gdk_iswalnum(c : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function gdk_iswspace(c : longint) : longint;
+
+{$else}
+{$include <ctype.inc}
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function gdk_iswalnum(c : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function gdk_iswspace(c : longint) : longint;
+
+{$endif}
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+{$endif}
+{ __GDK_I18N_H__ }
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function gdk_iswalnum(c : longint) : longint;
+begin
+ gdk_iswalnum:=iswalnum(c);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function gdk_iswspace(c : longint) : longint;
+begin
+ gdk_iswspace:=iswspace(c);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function gdk_iswalnum(c : longint) : longint;
+begin
+ gdk_iswalnum:=(Twchar_t(c)) <= ($FF and (@(isalnum(c))));
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function gdk_iswspace(c : longint) : longint;
+begin
+ gdk_iswspace:=(Twchar_t(c)) <= ($FF and (@(isspace(c))));
+end;
+
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkimage.inc b/packages/gtk2/src/gtk+/gdk/gdkimage.inc
new file mode 100644
index 0000000000..bbb0eceaaa
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkimage.inc
@@ -0,0 +1,128 @@
+// included by gdk2.pp
+{$IFDEF read_forward_definitions}
+{ Types of images.
+ Normal: Normal X image type. These are slow as they involve passing
+ the entire image through the X connection each time a draw
+ request is required. On Win32, a bitmap.
+ Shared: Shared memory X image type. These are fast as the X server
+ and the program actually use the same piece of memory. They
+ should be used with care though as there is the possibility
+ for both the X server and the program to be reading/writing
+ the image simultaneously and producing undesired results.
+ On Win32, also a bitmap.
+ }
+ PGdkImageType = ^TGdkImageType;
+ TGdkImageType = (
+ GDK_IMAGE_NORMAL,
+ GDK_IMAGE_SHARED,
+ GDK_IMAGE_FASTEST
+ );
+
+ PGdkImage = ^TGdkImage;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ PGdkImageClass = ^TGdkImageClass;
+ TGdkImageClass = record
+ parent_class : TGObjectClass;
+ end;
+
+{ visual used to create the image }
+{ bytes per pixel }
+{ bytes per line }
+{ bits per pixel }
+ TGdkImage = record
+ parent_instance : TGObject;
+ _type : TGdkImageType;
+ visual : PGdkVisual;
+ byte_order : TGdkByteOrder;
+ width : gint;
+ height : gint;
+ depth : guint16;
+ bpp : guint16;
+ bpl : guint16;
+ bits_per_pixel : guint16;
+ mem : gpointer;
+ colormap : PGdkColormap;
+ windowing_data : gpointer;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GDK_TYPE_IMAGE : GType;
+function GDK_IMAGE(anObject : Pointer) : PGdkImage;
+function GDK_IMAGE_CLASS(klass : Pointer) : PGdkImageClass;
+function GDK_IS_IMAGE(anObject : Pointer) : boolean;
+function GDK_IS_IMAGE_CLASS(klass : Pointer) : boolean;
+function GDK_IMAGE_GET_CLASS(obj : Pointer) : PGdkImageClass;
+
+
+function gdk_image_get_type:GType; cdecl; external gdklib;
+function gdk_image_new(_type:TGdkImageType; visual:PGdkVisual; width:gint; height:gint):PGdkImage; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+function gdk_image_get(drawable:PGdkDrawable; x:gint; y:gint; width:gint; height:gint):PGdkImage; cdecl; external gdklib;
+function gdk_image_ref(image:PGdkImage):PGdkImage; cdecl; external gdklib;
+procedure gdk_image_unref(image:PGdkImage); cdecl; external gdklib;
+{$endif}
+
+procedure gdk_image_put_pixel(image:PGdkImage; x:gint; y:gint; pixel:guint32); cdecl; external gdklib;
+function gdk_image_get_pixel(image:PGdkImage; x:gint; y:gint):guint32; cdecl; external gdklib;
+procedure gdk_image_set_colormap(image:PGdkImage; colormap:PGdkColormap); cdecl; external gdklib;
+function gdk_image_get_colormap(image:PGdkImage):PGdkColormap; cdecl; external gdklib;
+
+{$ifdef GDK_ENABLE_BROKEN}
+function gdk_image_new_bitmap(visual:PGdkVisual; data:gpointer; width:gint; height:gint):PGdkImage; cdecl; external gdklib;
+{$endif}
+{ GDK_ENABLE_BROKEN }
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_image_destroy(image:PGdkImage);
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_IMAGE : GType;
+begin
+ GDK_TYPE_IMAGE:=gdk_image_get_type;
+end;
+
+function GDK_IMAGE(anObject : Pointer) : PGdkImage;
+begin
+ GDK_IMAGE:=PGdkImage(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_IMAGE));
+end;
+
+function GDK_IMAGE_CLASS(klass : Pointer) : PGdkImageClass;
+begin
+ GDK_IMAGE_CLASS:=PGdkImageClass(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_IMAGE));
+end;
+
+function GDK_IS_IMAGE(anObject : Pointer) : boolean;
+begin
+ GDK_IS_IMAGE:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_IMAGE);
+end;
+
+function GDK_IS_IMAGE_CLASS(klass : Pointer) : boolean;
+begin
+ GDK_IS_IMAGE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_IMAGE);
+end;
+
+function GDK_IMAGE_GET_CLASS(obj : Pointer) : PGdkImageClass;
+begin
+ GDK_IMAGE_GET_CLASS:=PGdkImageClass(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_IMAGE));
+end;
+
+procedure gdk_image_destroy(image:PGdkImage);
+begin
+ g_object_unref(G_OBJECT(image));
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkincludes.inc b/packages/gtk2/src/gtk+/gdk/gdkincludes.inc
new file mode 100644
index 0000000000..1b67d22fac
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkincludes.inc
@@ -0,0 +1,29 @@
+// included by gdk2.pp
+{$include gdkcolor.inc}
+{$include gdkcursor.inc}
+{$include gdkdnd.inc}
+{$include gdkregion-generic.inc}
+{$include gdkdrawable.inc}
+//-->$include gdkenumtypes.inc} // not implemented, yet
+{$include gdkevents.inc}
+{$include gdkfont.inc}
+{$include gdkgc.inc}
+//-->$include gdki18n.inc} // macros need to be implemented
+{$include gdkimage.inc}
+{$include gdkinput.inc}
+//-->$include gdkinternals.inc} // not translated, yet
+{$include gdkkeys.inc}
+{$include gdkkeysyms.inc}
+{$include gdkpango.inc}
+{$include gdkpixbuf.inc}
+{$include gdkpixmap.inc}
+{$include gdkproperty.inc}
+{$include gdkregion.inc}
+{$include gdkrgb.inc}
+{$include gdkdisplay.inc}
+{$include gdkscreen.inc}
+{$include gdkselection.inc}
+{$include gdktypes.inc}
+{$include gdkvisual.inc}
+{$include gdkwindow.inc}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkinput.inc b/packages/gtk2/src/gtk+/gdk/gdkinput.inc
new file mode 100644
index 0000000000..482462791d
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkinput.inc
@@ -0,0 +1,154 @@
+// included by gdk2.pp
+
+{$IFDEF read_forward_definitions}
+ PGdkDevice = ^TGdkDevice;
+ PGdkTimeCoord = ^TGdkTimeCoord;
+ PPGdkTimeCoord = ^PGdkTimeCoord;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGdkExtensionMode = ^TGdkExtensionMode;
+ TGdkExtensionMode = (
+ GDK_EXTENSION_EVENTS_NONE,
+ GDK_EXTENSION_EVENTS_ALL,
+ GDK_EXTENSION_EVENTS_CURSOR
+ );
+
+ PGdkInputSource = ^TGdkInputSource;
+ TGdkInputSource = (
+ GDK_SOURCE_MOUSE,
+ GDK_SOURCE_PEN,
+ GDK_SOURCE_ERASER,
+ GDK_SOURCE_CURSOR
+ );
+
+ PGdkInputMode = ^TGdkInputMode;
+ TGdkInputMode = (
+ GDK_MODE_DISABLED,
+ GDK_MODE_SCREEN,
+ GDK_MODE_WINDOW
+ );
+
+ PGdkAxisUse = ^TGdkAxisUse;
+ TGdkAxisUse = longint;
+
+ PGdkDeviceKey = ^TGdkDeviceKey;
+ TGdkDeviceKey = record
+ keyval : guint;
+ modifiers : TGdkModifierType;
+ end;
+
+ PGdkDeviceAxis = ^TGdkDeviceAxis;
+ TGdkDeviceAxis = record
+ use : TGdkAxisUse;
+ min : gdouble;
+ max : gdouble;
+ end;
+
+{ All fields are read-only }
+{ TRUE if the X pointer follows device motion }
+ TGdkDevice = record
+ parent_instance : TGObject;
+ name : Pgchar;
+ source : TGdkInputSource;
+ mode : TGdkInputMode;
+ has_cursor : gboolean;
+ num_axes : gint;
+ axes : PGdkDeviceAxis;
+ num_keys : gint;
+ keys : PGdkDeviceKey;
+ end;
+
+{ We don't allocate each coordinate this big, but we use it to
+ be ANSI compliant and avoid accessing past the defined limits.
+ }
+
+ TGdkTimeCoord = record
+ time : guint32;
+ axes : array[0..(GDK_MAX_TIMECOORD_AXES)-1] of gdouble;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+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_WHEEL = 6;
+ GDK_AXIS_LAST = 7;
+
+
+function GDK_TYPE_DEVICE : GType;
+function GDK_DEVICE(anObject : Pointer) : PGdkDevice;
+function GDK_DEVICE_CLASS(klass : Pointer) : PGdkDeviceClass;
+function GDK_IS_DEVICE(anObject : Pointer) : boolean;
+function GDK_IS_DEVICE_CLASS(klass : Pointer) : boolean;
+function GDK_DEVICE_GET_CLASS(obj : Pointer) : PGdkDeviceClass;
+
+
+function gdk_device_get_type:GType; cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+{ Returns a list of GdkDevice }
+function gdk_devices_list:PGList; cdecl; external gdklib;
+{$endif}
+{ GDK_MULTIHEAD_SAFE }
+
+
+{ Functions to configure a device }
+
+procedure gdk_device_set_source(device:PGdkDevice; source:TGdkInputSource); cdecl; external gdklib;
+function gdk_device_set_mode(device:PGdkDevice; mode:TGdkInputMode):gboolean; cdecl; external gdklib;
+procedure gdk_device_set_key(device:PGdkDevice; index:guint; keyval:guint; modifiers:TGdkModifierType); cdecl; external gdklib;
+procedure gdk_device_set_axis_use(device:PGdkDevice; index:guint; use:TGdkAxisUse); cdecl; external gdklib;
+procedure gdk_device_get_state(device:PGdkDevice; window:PGdkWindow; axes:Pgdouble; mask:PGdkModifierType); cdecl; external gdklib;
+function gdk_device_get_history(device:PGdkDevice; window:PGdkWindow; start:guint32; stop:guint32; var events:PPGdkTimeCoord;
+ n_events:Pgint):gboolean; cdecl; external gdklib;
+procedure gdk_device_free_history(events:PPGdkTimeCoord; n_events:gint); cdecl; external gdklib;
+function gdk_device_get_axis(device:PGdkDevice; axes:Pgdouble; use:TGdkAxisUse; value:Pgdouble):gboolean; cdecl; external gdklib;
+procedure gdk_input_set_extension_events(window:PGdkWindow; mask:gint; mode:TGdkExtensionMode); cdecl; external gdklib;
+function gdk_device_get_core_pointer:PGdkDevice; cdecl; external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_DEVICE : GType;
+begin
+ GDK_TYPE_DEVICE:=gdk_device_get_type;
+end;
+
+function GDK_DEVICE(anObject : Pointer) : PGdkDevice;
+begin
+ GDK_DEVICE:=PGdkDevice(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_DEVICE));
+end;
+
+function GDK_DEVICE_CLASS(klass : Pointer) : PGdkDeviceClass;
+begin
+ GDK_DEVICE_CLASS:=PGdkDeviceClass(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_DEVICE));
+end;
+
+function GDK_IS_DEVICE(anObject : Pointer) : boolean;
+begin
+ GDK_IS_DEVICE:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_DEVICE);
+end;
+
+function GDK_IS_DEVICE_CLASS(klass : Pointer) : boolean;
+begin
+ GDK_IS_DEVICE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_DEVICE);
+end;
+
+function GDK_DEVICE_GET_CLASS(obj : Pointer) : PGdkDeviceClass;
+begin
+ GDK_DEVICE_GET_CLASS:=PGdkDeviceClass(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_DEVICE));
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkkeys.inc b/packages/gtk2/src/gtk+/gdk/gdkkeys.inc
new file mode 100644
index 0000000000..60d35b9b62
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkkeys.inc
@@ -0,0 +1,105 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+{ GdkKeymapKey is a hardware key that can be mapped to a keyval }
+ PGdkKeymapKey = ^TGdkKeymapKey;
+ TGdkKeymapKey = record
+ keycode : guint;
+ group : gint;
+ level : gint;
+ end;
+
+ PGdkKeymap = ^TGdkKeymap;
+ TGdkKeymap = record
+ parent_instance : TGObject;
+ display : PGdkDisplay;
+ end;
+
+ PGdkKeymapClass = ^TGdkKeymapClass;
+ TGdkKeymapClass = record
+ parent_class : TGObjectClass;
+ direction_changed : procedure (keymap:PGdkKeymap); cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{ A GdkKeymap defines the translation from keyboard state
+ (including a hardware key, a modifier mask, and active keyboard group)
+ to a keyval. This translation has two phases. The first phase is
+ to determine the effective keyboard group and level for the keyboard
+ state; the second phase is to look up the keycode/group/level triplet
+ in the keymap and see what keyval it corresponds to.
+ }
+function GDK_TYPE_KEYMAP : GType;
+function GDK_KEYMAP(anObject : Pointer) : PGdkKeymap;
+function GDK_KEYMAP_CLASS(klass : Pointer) : PGdkKeymapClass;
+function GDK_IS_KEYMAP(anObject : Pointer) : boolean;
+function GDK_IS_KEYMAP_CLASS(klass : Pointer) : boolean;
+function GDK_KEYMAP_GET_CLASS(obj : Pointer) : PGdkKeymapClass;
+
+
+function gdk_keymap_get_type:GType; cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_keymap_get_default:PGdkKeymap; cdecl; external gdklib;
+{$endif}
+
+function gdk_keymap_get_for_display(display:PGdkDisplay):PGdkKeymap; cdecl; external gdklib;
+function gdk_keymap_lookup_key(keymap:PGdkKeymap; key:PGdkKeymapKey):guint; cdecl; external gdklib;
+function gdk_keymap_translate_keyboard_state(keymap:PGdkKeymap; hardware_keycode:guint; state:TGdkModifierType; group:gint; keyval:Pguint;
+ effective_group:Pgint; level:Pgint; consumed_modifiers:PGdkModifierType):gboolean; cdecl; external gdklib;
+function gdk_keymap_get_entries_for_keyval(keymap:PGdkKeymap; keyval:guint; var keys:PGdkKeymapKey; n_keys:Pgint):gboolean; cdecl; external gdklib;
+function gdk_keymap_get_entries_for_keycode(keymap:PGdkKeymap; hardware_keycode:guint; var keys:PGdkKeymapKey; var keyvals:Pguint; n_entries:Pgint):gboolean; cdecl; external gdklib;
+function gdk_keymap_get_direction(keymap:PGdkKeymap):TPangoDirection; cdecl; external gdklib;
+
+
+{ Key values }
+
+function gdk_keyval_name(keyval:guint):Pgchar; cdecl; external gdklib;
+function gdk_keyval_from_name(keyval_name:Pgchar):guint; cdecl; external gdklib;
+procedure gdk_keyval_convert_case(symbol:guint; lower:Pguint; upper:Pguint); cdecl; external gdklib;
+function gdk_keyval_to_upper(keyval:guint):guint; cdecl; external gdklib;
+function gdk_keyval_to_lower(keyval:guint):guint; cdecl; external gdklib;
+function gdk_keyval_is_upper(keyval:guint):gboolean; cdecl; external gdklib;
+function gdk_keyval_is_lower(keyval:guint):gboolean; cdecl; external gdklib;
+function gdk_keyval_to_unicode(keyval:guint):guint32; cdecl; external gdklib;
+function gdk_unicode_to_keyval(wc:guint32):guint; cdecl; external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_KEYMAP : GType;
+begin
+ GDK_TYPE_KEYMAP:=gdk_keymap_get_type;
+end;
+
+function GDK_KEYMAP(anObject : Pointer) : PGdkKeymap;
+begin
+ GDK_KEYMAP:=PGdkKeymap(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_KEYMAP));
+end;
+
+function GDK_KEYMAP_CLASS(klass : Pointer) : PGdkKeymapClass;
+begin
+ GDK_KEYMAP_CLASS:=PGdkKeymapClass(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_KEYMAP));
+end;
+
+function GDK_IS_KEYMAP(anObject : Pointer) : boolean;
+begin
+ GDK_IS_KEYMAP:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_KEYMAP);
+end;
+
+function GDK_IS_KEYMAP_CLASS(klass : Pointer) : boolean;
+begin
+ GDK_IS_KEYMAP_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_KEYMAP);
+end;
+
+function GDK_KEYMAP_GET_CLASS(obj : Pointer) : PGdkKeymapClass;
+begin
+ GDK_KEYMAP_GET_CLASS:=PGdkKeymapClass(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_KEYMAP));
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkkeysyms.inc b/packages/gtk2/src/gtk+/gdk/gdkkeysyms.inc
new file mode 100644
index 0000000000..e63b78a5d8
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkkeysyms.inc
@@ -0,0 +1,1342 @@
+// included by gdk2.pp
+
+{$ifdef read_interface_rest}
+const
+ GDK_KEY_VoidSymbol = $FFFFFF;
+ GDK_KEY_BackSpace = $FF08;
+ GDK_KEY_Tab = $FF09;
+ GDK_KEY_Linefeed = $FF0A;
+ GDK_KEY_Clear = $FF0B;
+ GDK_KEY_Return = $FF0D;
+ GDK_KEY_Pause = $FF13;
+ GDK_KEY_Scroll_Lock = $FF14;
+ GDK_KEY_Sys_Req = $FF15;
+ GDK_KEY_Escape = $FF1B;
+ GDK_KEY_Delete = $FFFF;
+ GDK_KEY_Multi_key = $FF20;
+ GDK_KEY_Codeinput = $FF37;
+ GDK_KEY_SingleCandidate = $FF3C;
+ GDK_KEY_MultipleCandidate = $FF3D;
+ GDK_KEY_PreviousCandidate = $FF3E;
+ GDK_KEY_Kanji = $FF21;
+ GDK_KEY_Muhenkan = $FF22;
+ GDK_KEY_Henkan_Mode = $FF23;
+ GDK_KEY_Henkan = $FF23;
+ GDK_KEY_Romaji = $FF24;
+ GDK_KEY_Hiragana = $FF25;
+ GDK_KEY_Katakana = $FF26;
+ GDK_KEY_Hiragana_Katakana = $FF27;
+ GDK_KEY_Zenkaku = $FF28;
+ GDK_KEY_Hankaku = $FF29;
+ GDK_KEY_Zenkaku_Hankaku = $FF2A;
+ GDK_KEY_Touroku = $FF2B;
+ GDK_KEY_Massyo = $FF2C;
+ GDK_KEY_Kana_Lock = $FF2D;
+ GDK_KEY_Kana_Shift = $FF2E;
+ GDK_KEY_Eisu_Shift = $FF2F;
+ GDK_KEY_Eisu_toggle = $FF30;
+ GDK_KEY_Kanji_Bangou = $FF37;
+ GDK_KEY_Zen_Koho = $FF3D;
+ GDK_KEY_Mae_Koho = $FF3E;
+ GDK_KEY_Home = $FF50;
+ GDK_KEY_Left = $FF51;
+ GDK_KEY_Up = $FF52;
+ GDK_KEY_Right = $FF53;
+ GDK_KEY_Down = $FF54;
+ GDK_KEY_Prior = $FF55;
+ GDK_KEY_Page_Up = $FF55;
+ GDK_KEY_Next = $FF56;
+ GDK_KEY_Page_Down = $FF56;
+ GDK_KEY_End = $FF57;
+ GDK_KEY_Begin = $FF58;
+ GDK_KEY_Select = $FF60;
+ GDK_KEY_Print = $FF61;
+ GDK_KEY_Execute = $FF62;
+ GDK_KEY_Insert = $FF63;
+ GDK_KEY_Undo = $FF65;
+ GDK_KEY_Redo = $FF66;
+ GDK_KEY_Menu = $FF67;
+ GDK_KEY_Find = $FF68;
+ GDK_KEY_Cancel = $FF69;
+ GDK_KEY_Help = $FF6A;
+ GDK_KEY_Break = $FF6B;
+ GDK_KEY_Mode_switch = $FF7E;
+ GDK_KEY_script_switch = $FF7E;
+ GDK_KEY_Num_Lock = $FF7F;
+ GDK_KEY_KP_Space = $FF80;
+ GDK_KEY_KP_Tab = $FF89;
+ GDK_KEY_KP_Enter = $FF8D;
+ GDK_KEY_KP_F1 = $FF91;
+ GDK_KEY_KP_F2 = $FF92;
+ GDK_KEY_KP_F3 = $FF93;
+ GDK_KEY_KP_F4 = $FF94;
+ GDK_KEY_KP_Home = $FF95;
+ GDK_KEY_KP_Left = $FF96;
+ GDK_KEY_KP_Up = $FF97;
+ GDK_KEY_KP_Right = $FF98;
+ GDK_KEY_KP_Down = $FF99;
+ GDK_KEY_KP_Prior = $FF9A;
+ GDK_KEY_KP_Page_Up = $FF9A;
+ GDK_KEY_KP_Next = $FF9B;
+ GDK_KEY_KP_Page_Down = $FF9B;
+ GDK_KEY_KP_End = $FF9C;
+ GDK_KEY_KP_Begin = $FF9D;
+ GDK_KEY_KP_Insert = $FF9E;
+ GDK_KEY_KP_Delete = $FF9F;
+ GDK_KEY_KP_Equal = $FFBD;
+ GDK_KEY_KP_Multiply = $FFAA;
+ GDK_KEY_KP_Add = $FFAB;
+ GDK_KEY_KP_Separator = $FFAC;
+ GDK_KEY_KP_Subtract = $FFAD;
+ GDK_KEY_KP_Decimal = $FFAE;
+ GDK_KEY_KP_Divide = $FFAF;
+ GDK_KEY_KP_0 = $FFB0;
+ GDK_KEY_KP_1 = $FFB1;
+ GDK_KEY_KP_2 = $FFB2;
+ GDK_KEY_KP_3 = $FFB3;
+ GDK_KEY_KP_4 = $FFB4;
+ GDK_KEY_KP_5 = $FFB5;
+ GDK_KEY_KP_6 = $FFB6;
+ GDK_KEY_KP_7 = $FFB7;
+ GDK_KEY_KP_8 = $FFB8;
+ GDK_KEY_KP_9 = $FFB9;
+ GDK_KEY_F1 = $FFBE;
+ GDK_KEY_F2 = $FFBF;
+ GDK_KEY_F3 = $FFC0;
+ GDK_KEY_F4 = $FFC1;
+ GDK_KEY_F5 = $FFC2;
+ GDK_KEY_F6 = $FFC3;
+ GDK_KEY_F7 = $FFC4;
+ GDK_KEY_F8 = $FFC5;
+ GDK_KEY_F9 = $FFC6;
+ GDK_KEY_F10 = $FFC7;
+ GDK_KEY_F11 = $FFC8;
+ GDK_KEY_L1 = $FFC8;
+ GDK_KEY_F12 = $FFC9;
+ GDK_KEY_L2 = $FFC9;
+ GDK_KEY_F13 = $FFCA;
+ GDK_KEY_L3 = $FFCA;
+ GDK_KEY_F14 = $FFCB;
+ GDK_KEY_L4 = $FFCB;
+ GDK_KEY_F15 = $FFCC;
+ GDK_KEY_L5 = $FFCC;
+ GDK_KEY_F16 = $FFCD;
+ GDK_KEY_L6 = $FFCD;
+ GDK_KEY_F17 = $FFCE;
+ GDK_KEY_L7 = $FFCE;
+ GDK_KEY_F18 = $FFCF;
+ GDK_KEY_L8 = $FFCF;
+ GDK_KEY_F19 = $FFD0;
+ GDK_KEY_L9 = $FFD0;
+ GDK_KEY_F20 = $FFD1;
+ GDK_KEY_L10 = $FFD1;
+ GDK_KEY_F21 = $FFD2;
+ GDK_KEY_R1 = $FFD2;
+ GDK_KEY_F22 = $FFD3;
+ GDK_KEY_R2 = $FFD3;
+ GDK_KEY_F23 = $FFD4;
+ GDK_KEY_R3 = $FFD4;
+ GDK_KEY_F24 = $FFD5;
+ GDK_KEY_R4 = $FFD5;
+ GDK_KEY_F25 = $FFD6;
+ GDK_KEY_R5 = $FFD6;
+ GDK_KEY_F26 = $FFD7;
+ GDK_KEY_R6 = $FFD7;
+ GDK_KEY_F27 = $FFD8;
+ GDK_KEY_R7 = $FFD8;
+ GDK_KEY_F28 = $FFD9;
+ GDK_KEY_R8 = $FFD9;
+ GDK_KEY_F29 = $FFDA;
+ GDK_KEY_R9 = $FFDA;
+ GDK_KEY_F30 = $FFDB;
+ GDK_KEY_R10 = $FFDB;
+ GDK_KEY_F31 = $FFDC;
+ GDK_KEY_R11 = $FFDC;
+ GDK_KEY_F32 = $FFDD;
+ GDK_KEY_R12 = $FFDD;
+ GDK_KEY_F33 = $FFDE;
+ GDK_KEY_R13 = $FFDE;
+ GDK_KEY_F34 = $FFDF;
+ GDK_KEY_R14 = $FFDF;
+ GDK_KEY_F35 = $FFE0;
+ GDK_KEY_R15 = $FFE0;
+ GDK_KEY_Shift_L = $FFE1;
+ GDK_KEY_Shift_R = $FFE2;
+ GDK_KEY_Control_L = $FFE3;
+ GDK_KEY_Control_R = $FFE4;
+ GDK_KEY_Caps_Lock = $FFE5;
+ GDK_KEY_Shift_Lock = $FFE6;
+ GDK_KEY_Meta_L = $FFE7;
+ GDK_KEY_Meta_R = $FFE8;
+ GDK_KEY_Alt_L = $FFE9;
+ GDK_KEY_Alt_R = $FFEA;
+ GDK_KEY_Super_L = $FFEB;
+ GDK_KEY_Super_R = $FFEC;
+ GDK_KEY_Hyper_L = $FFED;
+ GDK_KEY_Hyper_R = $FFEE;
+ GDK_KEY_ISO_Lock = $FE01;
+ GDK_KEY_ISO_Level2_Latch = $FE02;
+ GDK_KEY_ISO_Level3_Shift = $FE03;
+ GDK_KEY_ISO_Level3_Latch = $FE04;
+ GDK_KEY_ISO_Level3_Lock = $FE05;
+ GDK_KEY_ISO_Group_Shift = $FF7E;
+ GDK_KEY_ISO_Group_Latch = $FE06;
+ GDK_KEY_ISO_Group_Lock = $FE07;
+ GDK_KEY_ISO_Next_Group = $FE08;
+ GDK_KEY_ISO_Next_Group_Lock = $FE09;
+ GDK_KEY_ISO_Prev_Group = $FE0A;
+ GDK_KEY_ISO_Prev_Group_Lock = $FE0B;
+ GDK_KEY_ISO_First_Group = $FE0C;
+ GDK_KEY_ISO_First_Group_Lock = $FE0D;
+ GDK_KEY_ISO_Last_Group = $FE0E;
+ GDK_KEY_ISO_Last_Group_Lock = $FE0F;
+ GDK_KEY_ISO_Left_Tab = $FE20;
+ GDK_KEY_ISO_Move_Line_Up = $FE21;
+ GDK_KEY_ISO_Move_Line_Down = $FE22;
+ GDK_KEY_ISO_Partial_Line_Up = $FE23;
+ GDK_KEY_ISO_Partial_Line_Down = $FE24;
+ GDK_KEY_ISO_Partial_Space_Left = $FE25;
+ GDK_KEY_ISO_Partial_Space_Right = $FE26;
+ GDK_KEY_ISO_Set_Margin_Left = $FE27;
+ GDK_KEY_ISO_Set_Margin_Right = $FE28;
+ GDK_KEY_ISO_Release_Margin_Left = $FE29;
+ GDK_KEY_ISO_Release_Margin_Right = $FE2A;
+ GDK_KEY_ISO_Release_Both_Margins = $FE2B;
+ GDK_KEY_ISO_Fast_Cursor_Left = $FE2C;
+ GDK_KEY_ISO_Fast_Cursor_Right = $FE2D;
+ GDK_KEY_ISO_Fast_Cursor_Up = $FE2E;
+ GDK_KEY_ISO_Fast_Cursor_Down = $FE2F;
+ GDK_KEY_ISO_Continuous_Underline = $FE30;
+ GDK_KEY_ISO_Discontinuous_Underline = $FE31;
+ GDK_KEY_ISO_Emphasize = $FE32;
+ GDK_KEY_ISO_Center_Object = $FE33;
+ GDK_KEY_ISO_Enter = $FE34;
+ GDK_KEY_dead_grave = $FE50;
+ GDK_KEY_dead_acute = $FE51;
+ GDK_KEY_dead_circumflex = $FE52;
+ GDK_KEY_dead_tilde = $FE53;
+ GDK_KEY_dead_macron = $FE54;
+ GDK_KEY_dead_breve = $FE55;
+ GDK_KEY_dead_abovedot = $FE56;
+ GDK_KEY_dead_diaeresis = $FE57;
+ GDK_KEY_dead_abovering = $FE58;
+ GDK_KEY_dead_doubleacute = $FE59;
+ GDK_KEY_dead_caron = $FE5A;
+ GDK_KEY_dead_cedilla = $FE5B;
+ GDK_KEY_dead_ogonek = $FE5C;
+ GDK_KEY_dead_iota = $FE5D;
+ GDK_KEY_dead_voiced_sound = $FE5E;
+ GDK_KEY_dead_semivoiced_sound = $FE5F;
+ GDK_KEY_dead_belowdot = $FE60;
+ GDK_KEY_First_Virtual_Screen = $FED0;
+ GDK_KEY_Prev_Virtual_Screen = $FED1;
+ GDK_KEY_Next_Virtual_Screen = $FED2;
+ GDK_KEY_Last_Virtual_Screen = $FED4;
+ GDK_KEY_Terminate_Server = $FED5;
+ GDK_KEY_AccessX_Enable = $FE70;
+ GDK_KEY_AccessX_Feedback_Enable = $FE71;
+ GDK_KEY_RepeatKeys_Enable = $FE72;
+ GDK_KEY_SlowKeys_Enable = $FE73;
+ GDK_KEY_BounceKeys_Enable = $FE74;
+ GDK_KEY_StickyKeys_Enable = $FE75;
+ GDK_KEY_MouseKeys_Enable = $FE76;
+ GDK_KEY_MouseKeys_Accel_Enable = $FE77;
+ GDK_KEY_Overlay1_Enable = $FE78;
+ GDK_KEY_Overlay2_Enable = $FE79;
+ GDK_KEY_AudibleBell_Enable = $FE7A;
+ GDK_KEY_Pointer_Left = $FEE0;
+ GDK_KEY_Pointer_Right = $FEE1;
+ GDK_KEY_Pointer_Up = $FEE2;
+ GDK_KEY_Pointer_Down = $FEE3;
+ GDK_KEY_Pointer_UpLeft = $FEE4;
+ GDK_KEY_Pointer_UpRight = $FEE5;
+ GDK_KEY_Pointer_DownLeft = $FEE6;
+ GDK_KEY_Pointer_DownRight = $FEE7;
+ GDK_KEY_Pointer_Button_Dflt = $FEE8;
+ GDK_KEY_Pointer_Button1 = $FEE9;
+ GDK_KEY_Pointer_Button2 = $FEEA;
+ GDK_KEY_Pointer_Button3 = $FEEB;
+ GDK_KEY_Pointer_Button4 = $FEEC;
+ GDK_KEY_Pointer_Button5 = $FEED;
+ GDK_KEY_Pointer_DblClick_Dflt = $FEEE;
+ GDK_KEY_Pointer_DblClick1 = $FEEF;
+ GDK_KEY_Pointer_DblClick2 = $FEF0;
+ GDK_KEY_Pointer_DblClick3 = $FEF1;
+ GDK_KEY_Pointer_DblClick4 = $FEF2;
+ GDK_KEY_Pointer_DblClick5 = $FEF3;
+ GDK_KEY_Pointer_Drag_Dflt = $FEF4;
+ GDK_KEY_Pointer_Drag1 = $FEF5;
+ GDK_KEY_Pointer_Drag2 = $FEF6;
+ GDK_KEY_Pointer_Drag3 = $FEF7;
+ GDK_KEY_Pointer_Drag4 = $FEF8;
+ GDK_KEY_Pointer_Drag5 = $FEFD;
+ GDK_KEY_Pointer_EnableKeys = $FEF9;
+ GDK_KEY_Pointer_Accelerate = $FEFA;
+ GDK_KEY_Pointer_DfltBtnNext = $FEFB;
+ GDK_KEY_Pointer_DfltBtnPrev = $FEFC;
+ GDK_KEY_3270_Duplicate = $FD01;
+ GDK_KEY_3270_FieldMark = $FD02;
+ GDK_KEY_3270_Right2 = $FD03;
+ GDK_KEY_3270_Left2 = $FD04;
+ GDK_KEY_3270_BackTab = $FD05;
+ GDK_KEY_3270_EraseEOF = $FD06;
+ GDK_KEY_3270_EraseInput = $FD07;
+ GDK_KEY_3270_Reset = $FD08;
+ GDK_KEY_3270_Quit = $FD09;
+ GDK_KEY_3270_PA1 = $FD0A;
+ GDK_KEY_3270_PA2 = $FD0B;
+ GDK_KEY_3270_PA3 = $FD0C;
+ GDK_KEY_3270_Test = $FD0D;
+ GDK_KEY_3270_Attn = $FD0E;
+ GDK_KEY_3270_CursorBlink = $FD0F;
+ GDK_KEY_3270_AltCursor = $FD10;
+ GDK_KEY_3270_KeyClick = $FD11;
+ GDK_KEY_3270_Jump = $FD12;
+ GDK_KEY_3270_Ident = $FD13;
+ GDK_KEY_3270_Rule = $FD14;
+ GDK_KEY_3270_Copy = $FD15;
+ GDK_KEY_3270_Play = $FD16;
+ GDK_KEY_3270_Setup = $FD17;
+ GDK_KEY_3270_Record = $FD18;
+ GDK_KEY_3270_ChangeScreen = $FD19;
+ GDK_KEY_3270_DeleteWord = $FD1A;
+ GDK_KEY_3270_ExSelect = $FD1B;
+ GDK_KEY_3270_CursorSelect = $FD1C;
+ GDK_KEY_3270_PrintScreen = $FD1D;
+ GDK_KEY_3270_Enter = $FD1E;
+ GDK_KEY_space = $020;
+ GDK_KEY_exclam = $021;
+ GDK_KEY_quotedbl = $022;
+ GDK_KEY_numbersign = $023;
+ GDK_KEY_dollar = $024;
+ GDK_KEY_percent = $025;
+ GDK_KEY_ampersand = $026;
+ GDK_KEY_apostrophe = $027;
+ GDK_KEY_quoteright = $027;
+ GDK_KEY_parenleft = $028;
+ GDK_KEY_parenright = $029;
+ GDK_KEY_asterisk = $02a;
+ GDK_KEY_plus = $02b;
+ GDK_KEY_comma = $02c;
+ GDK_KEY_minus = $02d;
+ GDK_KEY_period = $02e;
+ GDK_KEY_slash = $02f;
+ GDK_KEY_0 = $030;
+ GDK_KEY_1 = $031;
+ GDK_KEY_2 = $032;
+ GDK_KEY_3 = $033;
+ GDK_KEY_4 = $034;
+ GDK_KEY_5 = $035;
+ GDK_KEY_6 = $036;
+ GDK_KEY_7 = $037;
+ GDK_KEY_8 = $038;
+ GDK_KEY_9 = $039;
+ GDK_KEY_colon = $03a;
+ GDK_KEY_semicolon = $03b;
+ GDK_KEY_less = $03c;
+ GDK_KEY_equal = $03d;
+ GDK_KEY_greater = $03e;
+ GDK_KEY_question = $03f;
+ GDK_KEY_at = $040;
+ GDK_KEY_CAPITAL_A = $041;
+ GDK_KEY_CAPITAL_B = $042;
+ GDK_KEY_CAPITAL_C = $043;
+ GDK_KEY_CAPITAL_D = $044;
+ GDK_KEY_CAPITAL_E = $045;
+ GDK_KEY_CAPITAL_F = $046;
+ GDK_KEY_CAPITAL_G = $047;
+ GDK_KEY_CAPITAL_H = $048;
+ GDK_KEY_CAPITAL_I = $049;
+ GDK_KEY_CAPITAL_J = $04a;
+ GDK_KEY_CAPITAL_K = $04b;
+ GDK_KEY_CAPITAL_L = $04c;
+ GDK_KEY_CAPITAL_M = $04d;
+ GDK_KEY_CAPITAL_N = $04e;
+ GDK_KEY_CAPITAL_O = $04f;
+ GDK_KEY_CAPITAL_P = $050;
+ GDK_KEY_CAPITAL_Q = $051;
+ GDK_KEY_CAPITAL_R = $052;
+ GDK_KEY_CAPITAL_S = $053;
+ GDK_KEY_CAPITAL_T = $054;
+ GDK_KEY_CAPITAL_U = $055;
+ GDK_KEY_CAPITAL_V = $056;
+ GDK_KEY_CAPITAL_W = $057;
+ GDK_KEY_CAPITAL_X = $058;
+ GDK_KEY_CAPITAL_Y = $059;
+ GDK_KEY_CAPITAL_Z = $05a;
+ GDK_KEY_bracketleft = $05b;
+ GDK_KEY_backslash = $05c;
+ GDK_KEY_bracketright = $05d;
+ GDK_KEY_asciicircum = $05e;
+ GDK_KEY_underscore = $05f;
+ GDK_KEY_grave = $060;
+ GDK_KEY_quoteleft = $060;
+ GDK_KEY_a = $061;
+ GDK_KEY_b = $062;
+ GDK_KEY_c = $063;
+ GDK_KEY_d = $064;
+ GDK_KEY_e = $065;
+ GDK_KEY_f = $066;
+ GDK_KEY_g = $067;
+ GDK_KEY_h = $068;
+ GDK_KEY_i = $069;
+ GDK_KEY_j = $06a;
+ GDK_KEY_k = $06b;
+ GDK_KEY_l = $06c;
+ GDK_KEY_m = $06d;
+ GDK_KEY_n = $06e;
+ GDK_KEY_o = $06f;
+ GDK_KEY_p = $070;
+ GDK_KEY_q = $071;
+ GDK_KEY_r = $072;
+ GDK_KEY_s = $073;
+ GDK_KEY_t = $074;
+ GDK_KEY_u = $075;
+ GDK_KEY_v = $076;
+ GDK_KEY_w = $077;
+ GDK_KEY_x = $078;
+ GDK_KEY_y = $079;
+ GDK_KEY_z = $07a;
+ GDK_KEY_braceleft = $07b;
+ GDK_KEY_bar = $07c;
+ GDK_KEY_braceright = $07d;
+ GDK_KEY_asciitilde = $07e;
+ GDK_KEY_nobreakspace = $0a0;
+ GDK_KEY_exclamdown = $0a1;
+ GDK_KEY_cent = $0a2;
+ GDK_KEY_sterling = $0a3;
+ GDK_KEY_currency = $0a4;
+ GDK_KEY_yen = $0a5;
+ GDK_KEY_brokenbar = $0a6;
+ GDK_KEY_section = $0a7;
+ GDK_KEY_diaeresis = $0a8;
+ GDK_KEY_copyright = $0a9;
+ GDK_KEY_ordfeminine = $0aa;
+ GDK_KEY_guillemotleft = $0ab;
+ GDK_KEY_notsign = $0ac;
+ GDK_KEY_hyphen = $0ad;
+ GDK_KEY_registered = $0ae;
+ GDK_KEY_macron = $0af;
+ GDK_KEY_degree = $0b0;
+ GDK_KEY_plusminus = $0b1;
+ GDK_KEY_twosuperior = $0b2;
+ GDK_KEY_threesuperior = $0b3;
+ GDK_KEY_acute = $0b4;
+ GDK_KEY_mu = $0b5;
+ GDK_KEY_paragraph = $0b6;
+ GDK_KEY_periodcentered = $0b7;
+ GDK_KEY_cedilla = $0b8;
+ GDK_KEY_onesuperior = $0b9;
+ GDK_KEY_masculine = $0ba;
+ GDK_KEY_guillemotright = $0bb;
+ GDK_KEY_onequarter = $0bc;
+ GDK_KEY_onehalf = $0bd;
+ GDK_KEY_threequarters = $0be;
+ GDK_KEY_questiondown = $0bf;
+ GDK_KEY_CAPITAL_Agrave = $0c0;
+ GDK_KEY_CAPITAL_Aacute = $0c1;
+ GDK_KEY_CAPITAL_Acircumflex = $0c2;
+ GDK_KEY_CAPITAL_Atilde = $0c3;
+ GDK_KEY_CAPITAL_Adiaeresis = $0c4;
+ GDK_KEY_CAPITAL_Aring = $0c5;
+ GDK_KEY_CAPITAL_AE = $0c6;
+ GDK_KEY_CAPITAL_Ccedilla = $0c7;
+ GDK_KEY_CAPITAL_Egrave = $0c8;
+ GDK_KEY_CAPITAL_Eacute = $0c9;
+ GDK_KEY_CAPITAL_Ecircumflex = $0ca;
+ GDK_KEY_CAPITAL_Ediaeresis = $0cb;
+ GDK_KEY_CAPITAL_Igrave = $0cc;
+ GDK_KEY_CAPITAL_Iacute = $0cd;
+ GDK_KEY_CAPITAL_Icircumflex = $0ce;
+ GDK_KEY_CAPITAL_Idiaeresis = $0cf;
+ GDK_KEY_CAPITAL_ETH = $0d0;
+ GDK_KEY_CAPITAL_Ntilde = $0d1;
+ GDK_KEY_CAPITAL_Ograve = $0d2;
+ GDK_KEY_CAPITAL_Oacute = $0d3;
+ GDK_KEY_CAPITAL_Ocircumflex = $0d4;
+ GDK_KEY_CAPITAL_Otilde = $0d5;
+ GDK_KEY_CAPITAL_Odiaeresis = $0d6;
+ GDK_KEY_multiply = $0d7;
+ GDK_KEY_Ooblique = $0d8;
+ GDK_KEY_CAPITAL_Ugrave = $0d9;
+ GDK_KEY_CAPITAL_Uacute = $0da;
+ GDK_KEY_CAPITAL_Ucircumflex = $0db;
+ GDK_KEY_CAPITAL_Udiaeresis = $0dc;
+ GDK_KEY_CAPITAL_Yacute = $0dd;
+ GDK_KEY_CAPITAL_THORN = $0de;
+ GDK_KEY_ssharp = $0df;
+ GDK_KEY_agrave = $0e0;
+ GDK_KEY_aacute = $0e1;
+ GDK_KEY_acircumflex = $0e2;
+ GDK_KEY_atilde = $0e3;
+ GDK_KEY_adiaeresis = $0e4;
+ GDK_KEY_aring = $0e5;
+ GDK_KEY_ae = $0e6;
+ GDK_KEY_ccedilla = $0e7;
+ GDK_KEY_egrave = $0e8;
+ GDK_KEY_eacute = $0e9;
+ GDK_KEY_ecircumflex = $0ea;
+ GDK_KEY_ediaeresis = $0eb;
+ GDK_KEY_igrave = $0ec;
+ GDK_KEY_iacute = $0ed;
+ GDK_KEY_icircumflex = $0ee;
+ GDK_KEY_idiaeresis = $0ef;
+ GDK_KEY_eth = $0f0;
+ GDK_KEY_ntilde = $0f1;
+ GDK_KEY_ograve = $0f2;
+ GDK_KEY_oacute = $0f3;
+ GDK_KEY_ocircumflex = $0f4;
+ GDK_KEY_otilde = $0f5;
+ GDK_KEY_odiaeresis = $0f6;
+ GDK_KEY_division = $0f7;
+ GDK_KEY_oslash = $0f8;
+ GDK_KEY_ugrave = $0f9;
+ GDK_KEY_uacute = $0fa;
+ GDK_KEY_ucircumflex = $0fb;
+ GDK_KEY_udiaeresis = $0fc;
+ GDK_KEY_yacute = $0fd;
+ GDK_KEY_thorn = $0fe;
+ GDK_KEY_ydiaeresis = $0ff;
+ GDK_KEY_CAPITAL_Aogonek = $1a1;
+ GDK_KEY_breve = $1a2;
+ GDK_KEY_CAPITAL_Lstroke = $1a3;
+ GDK_KEY_CAPITAL_Lcaron = $1a5;
+ GDK_KEY_CAPITAL_Sacute = $1a6;
+ GDK_KEY_CAPITAL_Scaron = $1a9;
+ GDK_KEY_CAPITAL_Scedilla = $1aa;
+ GDK_KEY_CAPITAL_Tcaron = $1ab;
+ GDK_KEY_CAPITAL_Zacute = $1ac;
+ GDK_KEY_CAPITAL_Zcaron = $1ae;
+ GDK_KEY_CAPITAL_Zabovedot = $1af;
+ GDK_KEY_aogonek = $1b1;
+ GDK_KEY_ogonek = $1b2;
+ GDK_KEY_lstroke = $1b3;
+ GDK_KEY_lcaron = $1b5;
+ GDK_KEY_sacute = $1b6;
+ GDK_KEY_caron = $1b7;
+ GDK_KEY_scaron = $1b9;
+ GDK_KEY_scedilla = $1ba;
+ GDK_KEY_tcaron = $1bb;
+ GDK_KEY_zacute = $1bc;
+ GDK_KEY_doubleacute = $1bd;
+ GDK_KEY_zcaron = $1be;
+ GDK_KEY_zabovedot = $1bf;
+ GDK_KEY_CAPITAL_Racute = $1c0;
+ GDK_KEY_CAPITAL_Abreve = $1c3;
+ GDK_KEY_CAPITAL_Lacute = $1c5;
+ GDK_KEY_CAPITAL_Cacute = $1c6;
+ GDK_KEY_CAPITAL_Ccaron = $1c8;
+ GDK_KEY_CAPITAL_Eogonek = $1ca;
+ GDK_KEY_CAPITAL_Ecaron = $1cc;
+ GDK_KEY_CAPITAL_Dcaron = $1cf;
+ GDK_KEY_CAPITAL_Dstroke = $1d0;
+ GDK_KEY_CAPITAL_Nacute = $1d1;
+ GDK_KEY_CAPITAL_Ncaron = $1d2;
+ GDK_KEY_CAPITAL_Odoubleacute = $1d5;
+ GDK_KEY_CAPITAL_Rcaron = $1d8;
+ GDK_KEY_CAPITAL_Uring = $1d9;
+ GDK_KEY_CAPITAL_Udoubleacute = $1db;
+ GDK_KEY_CAPITAL_Tcedilla = $1de;
+ GDK_KEY_racute = $1e0;
+ GDK_KEY_abreve = $1e3;
+ GDK_KEY_lacute = $1e5;
+ GDK_KEY_cacute = $1e6;
+ GDK_KEY_ccaron = $1e8;
+ GDK_KEY_eogonek = $1ea;
+ GDK_KEY_ecaron = $1ec;
+ GDK_KEY_dcaron = $1ef;
+ GDK_KEY_dstroke = $1f0;
+ GDK_KEY_nacute = $1f1;
+ GDK_KEY_ncaron = $1f2;
+ GDK_KEY_odoubleacute = $1f5;
+ GDK_KEY_udoubleacute = $1fb;
+ GDK_KEY_rcaron = $1f8;
+ GDK_KEY_uring = $1f9;
+ GDK_KEY_tcedilla = $1fe;
+ GDK_KEY_abovedot = $1ff;
+ GDK_KEY_CAPITAL_Hstroke = $2a1;
+ GDK_KEY_CAPITAL_Hcircumflex = $2a6;
+ GDK_KEY_CAPITAL_Iabovedot = $2a9;
+ GDK_KEY_CAPITAL_Gbreve = $2ab;
+ GDK_KEY_CAPITAL_Jcircumflex = $2ac;
+ GDK_KEY_hstroke = $2b1;
+ GDK_KEY_hcircumflex = $2b6;
+ GDK_KEY_idotless = $2b9;
+ GDK_KEY_gbreve = $2bb;
+ GDK_KEY_jcircumflex = $2bc;
+ GDK_KEY_CAPITAL_Cabovedot = $2c5;
+ GDK_KEY_CAPITAL_Ccircumflex = $2c6;
+ GDK_KEY_CAPITAL_Gabovedot = $2d5;
+ GDK_KEY_CAPITAL_Gcircumflex = $2d8;
+ GDK_KEY_CAPITAL_Ubreve = $2dd;
+ GDK_KEY_CAPITAL_Scircumflex = $2de;
+ GDK_KEY_cabovedot = $2e5;
+ GDK_KEY_ccircumflex = $2e6;
+ GDK_KEY_gabovedot = $2f5;
+ GDK_KEY_gcircumflex = $2f8;
+ GDK_KEY_ubreve = $2fd;
+ GDK_KEY_scircumflex = $2fe;
+ GDK_KEY_kra = $3a2;
+ GDK_KEY_kappa = $3a2;
+ GDK_KEY_CAPITAL_Rcedilla = $3a3;
+ GDK_KEY_CAPITAL_Itilde = $3a5;
+ GDK_KEY_CAPITAL_Lcedilla = $3a6;
+ GDK_KEY_CAPITAL_Emacron = $3aa;
+ GDK_KEY_CAPITAL_Gcedilla = $3ab;
+ GDK_KEY_CAPITAL_Tslash = $3ac;
+ GDK_KEY_rcedilla = $3b3;
+ GDK_KEY_itilde = $3b5;
+ GDK_KEY_lcedilla = $3b6;
+ GDK_KEY_emacron = $3ba;
+ GDK_KEY_gcedilla = $3bb;
+ GDK_KEY_tslash = $3bc;
+ GDK_KEY_CAPITAL_ENG = $3bd;
+ GDK_KEY_eng = $3bf;
+ GDK_KEY_CAPITAL_Amacron = $3c0;
+ GDK_KEY_CAPITAL_Iogonek = $3c7;
+ GDK_KEY_CAPITAL_Eabovedot = $3cc;
+ GDK_KEY_CAPITAL_Imacron = $3cf;
+ GDK_KEY_CAPITAL_Ncedilla = $3d1;
+ GDK_KEY_CAPITAL_Omacron = $3d2;
+ GDK_KEY_CAPITAL_Kcedilla = $3d3;
+ GDK_KEY_CAPITAL_Uogonek = $3d9;
+ GDK_KEY_CAPITAL_Utilde = $3dd;
+ GDK_KEY_CAPITAL_Umacron = $3de;
+ GDK_KEY_amacron = $3e0;
+ GDK_KEY_iogonek = $3e7;
+ GDK_KEY_eabovedot = $3ec;
+ GDK_KEY_imacron = $3ef;
+ GDK_KEY_ncedilla = $3f1;
+ GDK_KEY_omacron = $3f2;
+ GDK_KEY_kcedilla = $3f3;
+ GDK_KEY_uogonek = $3f9;
+ GDK_KEY_utilde = $3fd;
+ GDK_KEY_umacron = $3fe;
+ GDK_KEY_CAPITAL_OE = $13bc;
+ GDK_KEY_oe = $13bd;
+ GDK_KEY_CAPITAL_Ydiaeresis = $13be;
+ GDK_KEY_overline = $47e;
+ GDK_KEY_kana_fullstop = $4a1;
+ GDK_KEY_kana_openingbracket = $4a2;
+ GDK_KEY_kana_closingbracket = $4a3;
+ GDK_KEY_kana_comma = $4a4;
+ GDK_KEY_kana_conjunctive = $4a5;
+ GDK_KEY_kana_middledot = $4a5;
+ GDK_KEY_kana_WO = $4a6;
+ GDK_KEY_kana_a = $4a7;
+ GDK_KEY_kana_i = $4a8;
+ GDK_KEY_kana_u = $4a9;
+ GDK_KEY_kana_e = $4aa;
+ GDK_KEY_kana_o = $4ab;
+ GDK_KEY_kana_ya = $4ac;
+ GDK_KEY_kana_yu = $4ad;
+ GDK_KEY_kana_yo = $4ae;
+ GDK_KEY_kana_tsu = $4af;
+ GDK_KEY_kana_tu = $4af;
+ GDK_KEY_prolongedsound = $4b0;
+ GDK_KEY_kana_CAPITAL_A = $4b1;
+ GDK_KEY_kana_CAPITAL_I = $4b2;
+ GDK_KEY_kana_CAPITAL_U = $4b3;
+ GDK_KEY_kana_CAPITAL_E = $4b4;
+ GDK_KEY_kana_CAPITAL_O = $4b5;
+ GDK_KEY_kana_KA = $4b6;
+ GDK_KEY_kana_KI = $4b7;
+ GDK_KEY_kana_KU = $4b8;
+ GDK_KEY_kana_KE = $4b9;
+ GDK_KEY_kana_KO = $4ba;
+ GDK_KEY_kana_SA = $4bb;
+ GDK_KEY_kana_SHI = $4bc;
+ GDK_KEY_kana_SU = $4bd;
+ GDK_KEY_kana_SE = $4be;
+ GDK_KEY_kana_SO = $4bf;
+ GDK_KEY_kana_TA = $4c0;
+ GDK_KEY_kana_CHI = $4c1;
+ GDK_KEY_kana_TI = $4c1;
+ GDK_KEY_kana_CAPITAL_TSU = $4c2;
+ GDK_KEY_kana_CAPITAL_TU = $4c2;
+ GDK_KEY_kana_TE = $4c3;
+ GDK_KEY_kana_TO = $4c4;
+ GDK_KEY_kana_NA = $4c5;
+ GDK_KEY_kana_NI = $4c6;
+ GDK_KEY_kana_NU = $4c7;
+ GDK_KEY_kana_NE = $4c8;
+ GDK_KEY_kana_NO = $4c9;
+ GDK_KEY_kana_HA = $4ca;
+ GDK_KEY_kana_HI = $4cb;
+ GDK_KEY_kana_FU = $4cc;
+ GDK_KEY_kana_HU = $4cc;
+ GDK_KEY_kana_HE = $4cd;
+ GDK_KEY_kana_HO = $4ce;
+ GDK_KEY_kana_MA = $4cf;
+ GDK_KEY_kana_MI = $4d0;
+ GDK_KEY_kana_MU = $4d1;
+ GDK_KEY_kana_ME = $4d2;
+ GDK_KEY_kana_MO = $4d3;
+ GDK_KEY_kana_CAPITAL_YA = $4d4;
+ GDK_KEY_kana_CAPITAL_YU = $4d5;
+ GDK_KEY_kana_CAPITAL_YO = $4d6;
+ GDK_KEY_kana_RA = $4d7;
+ GDK_KEY_kana_RI = $4d8;
+ GDK_KEY_kana_RU = $4d9;
+ GDK_KEY_kana_RE = $4da;
+ GDK_KEY_kana_RO = $4db;
+ GDK_KEY_kana_WA = $4dc;
+ GDK_KEY_kana_N = $4dd;
+ GDK_KEY_voicedsound = $4de;
+ GDK_KEY_semivoicedsound = $4df;
+ GDK_KEY_kana_switch = $FF7E;
+ GDK_KEY_Arabic_comma = $5ac;
+ GDK_KEY_Arabic_semicolon = $5bb;
+ GDK_KEY_Arabic_question_mark = $5bf;
+ GDK_KEY_Arabic_hamza = $5c1;
+ GDK_KEY_Arabic_maddaonalef = $5c2;
+ GDK_KEY_Arabic_hamzaonalef = $5c3;
+ GDK_KEY_Arabic_hamzaonwaw = $5c4;
+ GDK_KEY_Arabic_hamzaunderalef = $5c5;
+ GDK_KEY_Arabic_hamzaonyeh = $5c6;
+ GDK_KEY_Arabic_alef = $5c7;
+ GDK_KEY_Arabic_beh = $5c8;
+ GDK_KEY_Arabic_tehmarbuta = $5c9;
+ GDK_KEY_Arabic_teh = $5ca;
+ GDK_KEY_Arabic_theh = $5cb;
+ GDK_KEY_Arabic_jeem = $5cc;
+ GDK_KEY_Arabic_hah = $5cd;
+ GDK_KEY_Arabic_khah = $5ce;
+ GDK_KEY_Arabic_dal = $5cf;
+ GDK_KEY_Arabic_thal = $5d0;
+ GDK_KEY_Arabic_ra = $5d1;
+ GDK_KEY_Arabic_zain = $5d2;
+ GDK_KEY_Arabic_seen = $5d3;
+ GDK_KEY_Arabic_sheen = $5d4;
+ GDK_KEY_Arabic_sad = $5d5;
+ GDK_KEY_Arabic_dad = $5d6;
+ GDK_KEY_Arabic_tah = $5d7;
+ GDK_KEY_Arabic_zah = $5d8;
+ GDK_KEY_Arabic_ain = $5d9;
+ GDK_KEY_Arabic_ghain = $5da;
+ GDK_KEY_Arabic_tatweel = $5e0;
+ GDK_KEY_Arabic_feh = $5e1;
+ GDK_KEY_Arabic_qaf = $5e2;
+ GDK_KEY_Arabic_kaf = $5e3;
+ GDK_KEY_Arabic_lam = $5e4;
+ GDK_KEY_Arabic_meem = $5e5;
+ GDK_KEY_Arabic_noon = $5e6;
+ GDK_KEY_Arabic_ha = $5e7;
+ GDK_KEY_Arabic_heh = $5e7;
+ GDK_KEY_Arabic_waw = $5e8;
+ GDK_KEY_Arabic_alefmaksura = $5e9;
+ GDK_KEY_Arabic_yeh = $5ea;
+ GDK_KEY_Arabic_fathatan = $5eb;
+ GDK_KEY_Arabic_dammatan = $5ec;
+ GDK_KEY_Arabic_kasratan = $5ed;
+ GDK_KEY_Arabic_fatha = $5ee;
+ GDK_KEY_Arabic_damma = $5ef;
+ GDK_KEY_Arabic_kasra = $5f0;
+ GDK_KEY_Arabic_shadda = $5f1;
+ GDK_KEY_Arabic_sukun = $5f2;
+ GDK_KEY_Arabic_switch = $FF7E;
+ GDK_KEY_Serbian_dje = $6a1;
+ GDK_KEY_Macedonia_gje = $6a2;
+ GDK_KEY_Cyrillic_io = $6a3;
+ GDK_KEY_Ukrainian_ie = $6a4;
+ GDK_KEY_Ukranian_je = $6a4;
+ GDK_KEY_Macedonia_dse = $6a5;
+ GDK_KEY_Ukrainian_i = $6a6;
+ GDK_KEY_Ukranian_i = $6a6;
+ GDK_KEY_Ukrainian_yi = $6a7;
+ GDK_KEY_Ukranian_yi = $6a7;
+ GDK_KEY_Cyrillic_je = $6a8;
+ GDK_KEY_Serbian_je = $6a8;
+ GDK_KEY_Cyrillic_lje = $6a9;
+ GDK_KEY_Serbian_lje = $6a9;
+ GDK_KEY_Cyrillic_nje = $6aa;
+ GDK_KEY_Serbian_nje = $6aa;
+ GDK_KEY_Serbian_tshe = $6ab;
+ GDK_KEY_Macedonia_kje = $6ac;
+ GDK_KEY_Byelorussian_shortu = $6ae;
+ GDK_KEY_Cyrillic_dzhe = $6af;
+ GDK_KEY_Serbian_dze = $6af;
+ GDK_KEY_numerosign = $6b0;
+ GDK_KEY_Serbian_CAPITAL_DJE = $6b1;
+ GDK_KEY_Macedonia_CAPITAL_GJE = $6b2;
+ GDK_KEY_Cyrillic_CAPITAL_IO = $6b3;
+ GDK_KEY_Ukrainian_CAPITAL_IE = $6b4;
+ GDK_KEY_Ukranian_CAPITAL_JE = $6b4;
+ GDK_KEY_Macedonia_CAPITAL_DSE = $6b5;
+ GDK_KEY_Ukrainian_CAPITAL_I = $6b6;
+ GDK_KEY_Ukranian_CAPITAL_I = $6b6;
+ GDK_KEY_Ukrainian_CAPITAL_YI = $6b7;
+ GDK_KEY_Ukranian_CAPITAL_YI = $6b7;
+ GDK_KEY_Cyrillic_CAPITAL_JE = $6b8;
+ GDK_KEY_Serbian_CAPITAL_JE = $6b8;
+ GDK_KEY_Cyrillic_CAPITAL_LJE = $6b9;
+ GDK_KEY_Serbian_CAPITAL_LJE = $6b9;
+ GDK_KEY_Cyrillic_CAPITAL_NJE = $6ba;
+ GDK_KEY_Serbian_CAPITAL_NJE = $6ba;
+ GDK_KEY_Serbian_CAPITAL_TSHE = $6bb;
+ GDK_KEY_Macedonia_CAPITAL_KJE = $6bc;
+ GDK_KEY_Byelorussian_CAPITAL_SHORTU = $6be;
+ GDK_KEY_Cyrillic_CAPITAL_DZHE = $6bf;
+ GDK_KEY_Serbian_CAPITAL_DZE = $6bf;
+ GDK_KEY_Cyrillic_yu = $6c0;
+ GDK_KEY_Cyrillic_a = $6c1;
+ GDK_KEY_Cyrillic_be = $6c2;
+ GDK_KEY_Cyrillic_tse = $6c3;
+ GDK_KEY_Cyrillic_de = $6c4;
+ GDK_KEY_Cyrillic_ie = $6c5;
+ GDK_KEY_Cyrillic_ef = $6c6;
+ GDK_KEY_Cyrillic_ghe = $6c7;
+ GDK_KEY_Cyrillic_ha = $6c8;
+ GDK_KEY_Cyrillic_i = $6c9;
+ GDK_KEY_Cyrillic_shorti = $6ca;
+ GDK_KEY_Cyrillic_ka = $6cb;
+ GDK_KEY_Cyrillic_el = $6cc;
+ GDK_KEY_Cyrillic_em = $6cd;
+ GDK_KEY_Cyrillic_en = $6ce;
+ GDK_KEY_Cyrillic_o = $6cf;
+ GDK_KEY_Cyrillic_pe = $6d0;
+ GDK_KEY_Cyrillic_ya = $6d1;
+ GDK_KEY_Cyrillic_er = $6d2;
+ GDK_KEY_Cyrillic_es = $6d3;
+ GDK_KEY_Cyrillic_te = $6d4;
+ GDK_KEY_Cyrillic_u = $6d5;
+ GDK_KEY_Cyrillic_zhe = $6d6;
+ GDK_KEY_Cyrillic_ve = $6d7;
+ GDK_KEY_Cyrillic_softsign = $6d8;
+ GDK_KEY_Cyrillic_yeru = $6d9;
+ GDK_KEY_Cyrillic_ze = $6da;
+ GDK_KEY_Cyrillic_sha = $6db;
+ GDK_KEY_Cyrillic_e = $6dc;
+ GDK_KEY_Cyrillic_shcha = $6dd;
+ GDK_KEY_Cyrillic_che = $6de;
+ GDK_KEY_Cyrillic_hardsign = $6df;
+ GDK_KEY_Cyrillic_CAPITAL_YU = $6e0;
+ GDK_KEY_Cyrillic_CAPITAL_A = $6e1;
+ GDK_KEY_Cyrillic_CAPITAL_BE = $6e2;
+ GDK_KEY_Cyrillic_CAPITAL_TSE = $6e3;
+ GDK_KEY_Cyrillic_CAPITAL_DE = $6e4;
+ GDK_KEY_Cyrillic_CAPITAL_IE = $6e5;
+ GDK_KEY_Cyrillic_CAPITAL_EF = $6e6;
+ GDK_KEY_Cyrillic_CAPITAL_GHE = $6e7;
+ GDK_KEY_Cyrillic_CAPITAL_HA = $6e8;
+ GDK_KEY_Cyrillic_CAPITAL_I = $6e9;
+ GDK_KEY_Cyrillic_CAPITAL_SHORTI = $6ea;
+ GDK_KEY_Cyrillic_CAPITAL_KA = $6eb;
+ GDK_KEY_Cyrillic_CAPITAL_EL = $6ec;
+ GDK_KEY_Cyrillic_CAPITAL_EM = $6ed;
+ GDK_KEY_Cyrillic_CAPITAL_EN = $6ee;
+ GDK_KEY_Cyrillic_CAPITAL_O = $6ef;
+ GDK_KEY_Cyrillic_CAPITAL_PE = $6f0;
+ GDK_KEY_Cyrillic_CAPITAL_YA = $6f1;
+ GDK_KEY_Cyrillic_CAPITAL_ER = $6f2;
+ GDK_KEY_Cyrillic_CAPITAL_ES = $6f3;
+ GDK_KEY_Cyrillic_CAPITAL_TE = $6f4;
+ GDK_KEY_Cyrillic_CAPITAL_U = $6f5;
+ GDK_KEY_Cyrillic_CAPITAL_ZHE = $6f6;
+ GDK_KEY_Cyrillic_CAPITAL_VE = $6f7;
+ GDK_KEY_Cyrillic_CAPITAL_SOFTSIGN = $6f8;
+ GDK_KEY_Cyrillic_CAPITAL_YERU = $6f9;
+ GDK_KEY_Cyrillic_CAPITAL_ZE = $6fa;
+ GDK_KEY_Cyrillic_CAPITAL_SHA = $6fb;
+ GDK_KEY_Cyrillic_CAPITAL_E = $6fc;
+ GDK_KEY_Cyrillic_CAPITAL_SHCHA = $6fd;
+ GDK_KEY_Cyrillic_CAPITAL_CHE = $6fe;
+ GDK_KEY_Cyrillic_CAPITAL_HARDSIGN = $6ff;
+ GDK_KEY_Greek_CAPITAL_ALPHAaccent = $7a1;
+ GDK_KEY_Greek_CAPITAL_EPSILONaccent = $7a2;
+ GDK_KEY_Greek_CAPITAL_ETAaccent = $7a3;
+ GDK_KEY_Greek_CAPITAL_IOTAaccent = $7a4;
+ GDK_KEY_Greek_CAPITAL_IOTAdiaeresis = $7a5;
+ GDK_KEY_Greek_CAPITAL_OMICRONaccent = $7a7;
+ GDK_KEY_Greek_CAPITAL_UPSILONaccent = $7a8;
+ GDK_KEY_Greek_CAPITAL_UPSILONdieresis = $7a9;
+ GDK_KEY_Greek_CAPITAL_OMEGAaccent = $7ab;
+ GDK_KEY_Greek_accentdieresis = $7ae;
+ GDK_KEY_Greek_horizbar = $7af;
+ GDK_KEY_Greek_alphaaccent = $7b1;
+ GDK_KEY_Greek_epsilonaccent = $7b2;
+ GDK_KEY_Greek_etaaccent = $7b3;
+ GDK_KEY_Greek_iotaaccent = $7b4;
+ GDK_KEY_Greek_iotadieresis = $7b5;
+ GDK_KEY_Greek_iotaaccentdieresis = $7b6;
+ GDK_KEY_Greek_omicronaccent = $7b7;
+ GDK_KEY_Greek_upsilonaccent = $7b8;
+ GDK_KEY_Greek_upsilondieresis = $7b9;
+ GDK_KEY_Greek_upsilonaccentdieresis = $7ba;
+ GDK_KEY_Greek_omegaaccent = $7bb;
+ GDK_KEY_Greek_CAPITAL_ALPHA = $7c1;
+ GDK_KEY_Greek_CAPITAL_BETA = $7c2;
+ GDK_KEY_Greek_CAPITAL_GAMMA = $7c3;
+ GDK_KEY_Greek_CAPITAL_DELTA = $7c4;
+ GDK_KEY_Greek_CAPITAL_EPSILON = $7c5;
+ GDK_KEY_Greek_CAPITAL_ZETA = $7c6;
+ GDK_KEY_Greek_CAPITAL_ETA = $7c7;
+ GDK_KEY_Greek_CAPITAL_THETA = $7c8;
+ GDK_KEY_Greek_CAPITAL_IOTA = $7c9;
+ GDK_KEY_Greek_CAPITAL_KAPPA = $7ca;
+ GDK_KEY_Greek_CAPITAL_LAMDA = $7cb;
+ GDK_KEY_Greek_CAPITAL_LAMBDA = $7cb;
+ GDK_KEY_Greek_CAPITAL_MU = $7cc;
+ GDK_KEY_Greek_CAPITAL_NU = $7cd;
+ GDK_KEY_Greek_CAPITAL_XI = $7ce;
+ GDK_KEY_Greek_CAPITAL_OMICRON = $7cf;
+ GDK_KEY_Greek_CAPITAL_PI = $7d0;
+ GDK_KEY_Greek_CAPITAL_RHO = $7d1;
+ GDK_KEY_Greek_CAPITAL_SIGMA = $7d2;
+ GDK_KEY_Greek_CAPITAL_TAU = $7d4;
+ GDK_KEY_Greek_CAPITAL_UPSILON = $7d5;
+ GDK_KEY_Greek_CAPITAL_PHI = $7d6;
+ GDK_KEY_Greek_CAPITAL_CHI = $7d7;
+ GDK_KEY_Greek_CAPITAL_PSI = $7d8;
+ GDK_KEY_Greek_CAPITAL_OMEGA = $7d9;
+ GDK_KEY_Greek_alpha = $7e1;
+ GDK_KEY_Greek_beta = $7e2;
+ GDK_KEY_Greek_gamma = $7e3;
+ GDK_KEY_Greek_delta = $7e4;
+ GDK_KEY_Greek_epsilon = $7e5;
+ GDK_KEY_Greek_zeta = $7e6;
+ GDK_KEY_Greek_eta = $7e7;
+ GDK_KEY_Greek_theta = $7e8;
+ GDK_KEY_Greek_iota = $7e9;
+ GDK_KEY_Greek_kappa = $7ea;
+ GDK_KEY_Greek_lamda = $7eb;
+ GDK_KEY_Greek_lambda = $7eb;
+ GDK_KEY_Greek_mu = $7ec;
+ GDK_KEY_Greek_nu = $7ed;
+ GDK_KEY_Greek_xi = $7ee;
+ GDK_KEY_Greek_omicron = $7ef;
+ GDK_KEY_Greek_pi = $7f0;
+ GDK_KEY_Greek_rho = $7f1;
+ GDK_KEY_Greek_sigma = $7f2;
+ GDK_KEY_Greek_finalsmallsigma = $7f3;
+ GDK_KEY_Greek_tau = $7f4;
+ GDK_KEY_Greek_upsilon = $7f5;
+ GDK_KEY_Greek_phi = $7f6;
+ GDK_KEY_Greek_chi = $7f7;
+ GDK_KEY_Greek_psi = $7f8;
+ GDK_KEY_Greek_omega = $7f9;
+ GDK_KEY_Greek_switch = $FF7E;
+ GDK_KEY_leftradical = $8a1;
+ GDK_KEY_topleftradical = $8a2;
+ GDK_KEY_horizconnector = $8a3;
+ GDK_KEY_topintegral = $8a4;
+ GDK_KEY_botintegral = $8a5;
+ GDK_KEY_vertconnector = $8a6;
+ GDK_KEY_topleftsqbracket = $8a7;
+ GDK_KEY_botleftsqbracket = $8a8;
+ GDK_KEY_toprightsqbracket = $8a9;
+ GDK_KEY_botrightsqbracket = $8aa;
+ GDK_KEY_topleftparens = $8ab;
+ GDK_KEY_botleftparens = $8ac;
+ GDK_KEY_toprightparens = $8ad;
+ GDK_KEY_botrightparens = $8ae;
+ GDK_KEY_leftmiddlecurlybrace = $8af;
+ GDK_KEY_rightmiddlecurlybrace = $8b0;
+ GDK_KEY_topleftsummation = $8b1;
+ GDK_KEY_botleftsummation = $8b2;
+ GDK_KEY_topvertsummationconnector = $8b3;
+ GDK_KEY_botvertsummationconnector = $8b4;
+ GDK_KEY_toprightsummation = $8b5;
+ GDK_KEY_botrightsummation = $8b6;
+ GDK_KEY_rightmiddlesummation = $8b7;
+ GDK_KEY_lessthanequal = $8bc;
+ GDK_KEY_notequal = $8bd;
+ GDK_KEY_greaterthanequal = $8be;
+ GDK_KEY_integral = $8bf;
+ GDK_KEY_therefore = $8c0;
+ GDK_KEY_variation = $8c1;
+ GDK_KEY_infinity = $8c2;
+ GDK_KEY_nabla = $8c5;
+ GDK_KEY_approximate = $8c8;
+ GDK_KEY_similarequal = $8c9;
+ GDK_KEY_ifonlyif = $8cd;
+ GDK_KEY_implies = $8ce;
+ GDK_KEY_identical = $8cf;
+ GDK_KEY_radical = $8d6;
+ GDK_KEY_includedin = $8da;
+ GDK_KEY_includes = $8db;
+ GDK_KEY_intersection = $8dc;
+ GDK_KEY_union = $8dd;
+ GDK_KEY_logicaland = $8de;
+ GDK_KEY_logicalor = $8df;
+ GDK_KEY_partialderivative = $8ef;
+ GDK_KEY_function = $8f6;
+ GDK_KEY_leftarrow = $8fb;
+ GDK_KEY_uparrow = $8fc;
+ GDK_KEY_rightarrow = $8fd;
+ GDK_KEY_downarrow = $8fe;
+ GDK_KEY_blank = $9df;
+ GDK_KEY_soliddiamond = $9e0;
+ GDK_KEY_checkerboard = $9e1;
+ GDK_KEY_ht = $9e2;
+ GDK_KEY_ff = $9e3;
+ GDK_KEY_cr = $9e4;
+ GDK_KEY_lf = $9e5;
+ GDK_KEY_nl = $9e8;
+ GDK_KEY_vt = $9e9;
+ GDK_KEY_lowrightcorner = $9ea;
+ GDK_KEY_uprightcorner = $9eb;
+ GDK_KEY_upleftcorner = $9ec;
+ GDK_KEY_lowleftcorner = $9ed;
+ GDK_KEY_crossinglines = $9ee;
+ GDK_KEY_horizlinescan1 = $9ef;
+ GDK_KEY_horizlinescan3 = $9f0;
+ GDK_KEY_horizlinescan5 = $9f1;
+ GDK_KEY_horizlinescan7 = $9f2;
+ GDK_KEY_horizlinescan9 = $9f3;
+ GDK_KEY_leftt = $9f4;
+ GDK_KEY_rightt = $9f5;
+ GDK_KEY_bott = $9f6;
+ GDK_KEY_topt = $9f7;
+ GDK_KEY_vertbar = $9f8;
+ GDK_KEY_emspace = $aa1;
+ GDK_KEY_enspace = $aa2;
+ GDK_KEY_em3space = $aa3;
+ GDK_KEY_em4space = $aa4;
+ GDK_KEY_digitspace = $aa5;
+ GDK_KEY_punctspace = $aa6;
+ GDK_KEY_thinspace = $aa7;
+ GDK_KEY_hairspace = $aa8;
+ GDK_KEY_emdash = $aa9;
+ GDK_KEY_endash = $aaa;
+ GDK_KEY_signifblank = $aac;
+ GDK_KEY_ellipsis = $aae;
+ GDK_KEY_doubbaselinedot = $aaf;
+ GDK_KEY_onethird = $ab0;
+ GDK_KEY_twothirds = $ab1;
+ GDK_KEY_onefifth = $ab2;
+ GDK_KEY_twofifths = $ab3;
+ GDK_KEY_threefifths = $ab4;
+ GDK_KEY_fourfifths = $ab5;
+ GDK_KEY_onesixth = $ab6;
+ GDK_KEY_fivesixths = $ab7;
+ GDK_KEY_careof = $ab8;
+ GDK_KEY_figdash = $abb;
+ GDK_KEY_leftanglebracket = $abc;
+ GDK_KEY_decimalpoint = $abd;
+ GDK_KEY_rightanglebracket = $abe;
+ GDK_KEY_marker = $abf;
+ GDK_KEY_oneeighth = $ac3;
+ GDK_KEY_threeeighths = $ac4;
+ GDK_KEY_fiveeighths = $ac5;
+ GDK_KEY_seveneighths = $ac6;
+ GDK_KEY_trademark = $ac9;
+ GDK_KEY_signaturemark = $aca;
+ GDK_KEY_trademarkincircle = $acb;
+ GDK_KEY_leftopentriangle = $acc;
+ GDK_KEY_rightopentriangle = $acd;
+ GDK_KEY_emopencircle = $ace;
+ GDK_KEY_emopenrectangle = $acf;
+ GDK_KEY_leftsinglequotemark = $ad0;
+ GDK_KEY_rightsinglequotemark = $ad1;
+ GDK_KEY_leftdoublequotemark = $ad2;
+ GDK_KEY_rightdoublequotemark = $ad3;
+ GDK_KEY_prescription = $ad4;
+ GDK_KEY_minutes = $ad6;
+ GDK_KEY_seconds = $ad7;
+ GDK_KEY_latincross = $ad9;
+ GDK_KEY_hexagram = $ada;
+ GDK_KEY_filledrectbullet = $adb;
+ GDK_KEY_filledlefttribullet = $adc;
+ GDK_KEY_filledrighttribullet = $add;
+ GDK_KEY_emfilledcircle = $ade;
+ GDK_KEY_emfilledrect = $adf;
+ GDK_KEY_enopencircbullet = $ae0;
+ GDK_KEY_enopensquarebullet = $ae1;
+ GDK_KEY_openrectbullet = $ae2;
+ GDK_KEY_opentribulletup = $ae3;
+ GDK_KEY_opentribulletdown = $ae4;
+ GDK_KEY_openstar = $ae5;
+ GDK_KEY_enfilledcircbullet = $ae6;
+ GDK_KEY_enfilledsqbullet = $ae7;
+ GDK_KEY_filledtribulletup = $ae8;
+ GDK_KEY_filledtribulletdown = $ae9;
+ GDK_KEY_leftpointer = $aea;
+ GDK_KEY_rightpointer = $aeb;
+ GDK_KEY_club = $aec;
+ GDK_KEY_diamond = $aed;
+ GDK_KEY_heart = $aee;
+ GDK_KEY_maltesecross = $af0;
+ GDK_KEY_dagger = $af1;
+ GDK_KEY_doubledagger = $af2;
+ GDK_KEY_checkmark = $af3;
+ GDK_KEY_ballotcross = $af4;
+ GDK_KEY_musicalsharp = $af5;
+ GDK_KEY_musicalflat = $af6;
+ GDK_KEY_malesymbol = $af7;
+ GDK_KEY_femalesymbol = $af8;
+ GDK_KEY_telephone = $af9;
+ GDK_KEY_telephonerecorder = $afa;
+ GDK_KEY_phonographcopyright = $afb;
+ GDK_KEY_caret = $afc;
+ GDK_KEY_singlelowquotemark = $afd;
+ GDK_KEY_doublelowquotemark = $afe;
+ GDK_KEY_cursor = $aff;
+ GDK_KEY_leftcaret = $ba3;
+ GDK_KEY_rightcaret = $ba6;
+ GDK_KEY_downcaret = $ba8;
+ GDK_KEY_upcaret = $ba9;
+ GDK_KEY_overbar = $bc0;
+ GDK_KEY_downtack = $bc2;
+ GDK_KEY_upshoe = $bc3;
+ GDK_KEY_downstile = $bc4;
+ GDK_KEY_underbar = $bc6;
+ GDK_KEY_jot = $bca;
+ GDK_KEY_quad = $bcc;
+ GDK_KEY_uptack = $bce;
+ GDK_KEY_circle = $bcf;
+ GDK_KEY_upstile = $bd3;
+ GDK_KEY_downshoe = $bd6;
+ GDK_KEY_rightshoe = $bd8;
+ GDK_KEY_leftshoe = $bda;
+ GDK_KEY_lefttack = $bdc;
+ GDK_KEY_righttack = $bfc;
+ GDK_KEY_hebrew_doublelowline = $cdf;
+ GDK_KEY_hebrew_aleph = $ce0;
+ GDK_KEY_hebrew_bet = $ce1;
+ GDK_KEY_hebrew_beth = $ce1;
+ GDK_KEY_hebrew_gimel = $ce2;
+ GDK_KEY_hebrew_gimmel = $ce2;
+ GDK_KEY_hebrew_dalet = $ce3;
+ GDK_KEY_hebrew_daleth = $ce3;
+ GDK_KEY_hebrew_he = $ce4;
+ GDK_KEY_hebrew_waw = $ce5;
+ GDK_KEY_hebrew_zain = $ce6;
+ GDK_KEY_hebrew_zayin = $ce6;
+ GDK_KEY_hebrew_chet = $ce7;
+ GDK_KEY_hebrew_het = $ce7;
+ GDK_KEY_hebrew_tet = $ce8;
+ GDK_KEY_hebrew_teth = $ce8;
+ GDK_KEY_hebrew_yod = $ce9;
+ GDK_KEY_hebrew_finalkaph = $cea;
+ GDK_KEY_hebrew_kaph = $ceb;
+ GDK_KEY_hebrew_lamed = $cec;
+ GDK_KEY_hebrew_finalmem = $ced;
+ GDK_KEY_hebrew_mem = $cee;
+ GDK_KEY_hebrew_finalnun = $cef;
+ GDK_KEY_hebrew_nun = $cf0;
+ GDK_KEY_hebrew_samech = $cf1;
+ GDK_KEY_hebrew_samekh = $cf1;
+ GDK_KEY_hebrew_ayin = $cf2;
+ GDK_KEY_hebrew_finalpe = $cf3;
+ GDK_KEY_hebrew_pe = $cf4;
+ GDK_KEY_hebrew_finalzade = $cf5;
+ GDK_KEY_hebrew_finalzadi = $cf5;
+ GDK_KEY_hebrew_zade = $cf6;
+ GDK_KEY_hebrew_zadi = $cf6;
+ GDK_KEY_hebrew_qoph = $cf7;
+ GDK_KEY_hebrew_kuf = $cf7;
+ GDK_KEY_hebrew_resh = $cf8;
+ GDK_KEY_hebrew_shin = $cf9;
+ GDK_KEY_hebrew_taw = $cfa;
+ GDK_KEY_hebrew_taf = $cfa;
+ GDK_KEY_Hebrew_switch = $FF7E;
+ GDK_KEY_Thai_kokai = $da1;
+ GDK_KEY_Thai_khokhai = $da2;
+ GDK_KEY_Thai_khokhuat = $da3;
+ GDK_KEY_Thai_khokhwai = $da4;
+ GDK_KEY_Thai_khokhon = $da5;
+ GDK_KEY_Thai_khorakhang = $da6;
+ GDK_KEY_Thai_ngongu = $da7;
+ GDK_KEY_Thai_chochan = $da8;
+ GDK_KEY_Thai_choching = $da9;
+ GDK_KEY_Thai_chochang = $daa;
+ GDK_KEY_Thai_soso = $dab;
+ GDK_KEY_Thai_chochoe = $dac;
+ GDK_KEY_Thai_yoying = $dad;
+ GDK_KEY_Thai_dochada = $dae;
+ GDK_KEY_Thai_topatak = $daf;
+ GDK_KEY_Thai_thothan = $db0;
+ GDK_KEY_Thai_thonangmontho = $db1;
+ GDK_KEY_Thai_thophuthao = $db2;
+ GDK_KEY_Thai_nonen = $db3;
+ GDK_KEY_Thai_dodek = $db4;
+ GDK_KEY_Thai_totao = $db5;
+ GDK_KEY_Thai_thothung = $db6;
+ GDK_KEY_Thai_thothahan = $db7;
+ GDK_KEY_Thai_thothong = $db8;
+ GDK_KEY_Thai_nonu = $db9;
+ GDK_KEY_Thai_bobaimai = $dba;
+ GDK_KEY_Thai_popla = $dbb;
+ GDK_KEY_Thai_phophung = $dbc;
+ GDK_KEY_Thai_fofa = $dbd;
+ GDK_KEY_Thai_phophan = $dbe;
+ GDK_KEY_Thai_fofan = $dbf;
+ GDK_KEY_Thai_phosamphao = $dc0;
+ GDK_KEY_Thai_moma = $dc1;
+ GDK_KEY_Thai_yoyak = $dc2;
+ GDK_KEY_Thai_rorua = $dc3;
+ GDK_KEY_Thai_ru = $dc4;
+ GDK_KEY_Thai_loling = $dc5;
+ GDK_KEY_Thai_lu = $dc6;
+ GDK_KEY_Thai_wowaen = $dc7;
+ GDK_KEY_Thai_sosala = $dc8;
+ GDK_KEY_Thai_sorusi = $dc9;
+ GDK_KEY_Thai_sosua = $dca;
+ GDK_KEY_Thai_hohip = $dcb;
+ GDK_KEY_Thai_lochula = $dcc;
+ GDK_KEY_Thai_oang = $dcd;
+ GDK_KEY_Thai_honokhuk = $dce;
+ GDK_KEY_Thai_paiyannoi = $dcf;
+ GDK_KEY_Thai_saraa = $dd0;
+ GDK_KEY_Thai_maihanakat = $dd1;
+ GDK_KEY_Thai_saraaa = $dd2;
+ GDK_KEY_Thai_saraam = $dd3;
+ GDK_KEY_Thai_sarai = $dd4;
+ GDK_KEY_Thai_saraii = $dd5;
+ GDK_KEY_Thai_saraue = $dd6;
+ GDK_KEY_Thai_sarauee = $dd7;
+ GDK_KEY_Thai_sarau = $dd8;
+ GDK_KEY_Thai_sarauu = $dd9;
+ GDK_KEY_Thai_phinthu = $dda;
+ GDK_KEY_Thai_maihanakat_maitho = $dde;
+ GDK_KEY_Thai_baht = $ddf;
+ GDK_KEY_Thai_sarae = $de0;
+ GDK_KEY_Thai_saraae = $de1;
+ GDK_KEY_Thai_sarao = $de2;
+ GDK_KEY_Thai_saraaimaimuan = $de3;
+ GDK_KEY_Thai_saraaimaimalai = $de4;
+ GDK_KEY_Thai_lakkhangyao = $de5;
+ GDK_KEY_Thai_maiyamok = $de6;
+ GDK_KEY_Thai_maitaikhu = $de7;
+ GDK_KEY_Thai_maiek = $de8;
+ GDK_KEY_Thai_maitho = $de9;
+ GDK_KEY_Thai_maitri = $dea;
+ GDK_KEY_Thai_maichattawa = $deb;
+ GDK_KEY_Thai_thanthakhat = $dec;
+ GDK_KEY_Thai_nikhahit = $ded;
+ GDK_KEY_Thai_leksun = $df0;
+ GDK_KEY_Thai_leknung = $df1;
+ GDK_KEY_Thai_leksong = $df2;
+ GDK_KEY_Thai_leksam = $df3;
+ GDK_KEY_Thai_leksi = $df4;
+ GDK_KEY_Thai_lekha = $df5;
+ GDK_KEY_Thai_lekhok = $df6;
+ GDK_KEY_Thai_lekchet = $df7;
+ GDK_KEY_Thai_lekpaet = $df8;
+ GDK_KEY_Thai_lekkao = $df9;
+ GDK_KEY_Hangul = $ff31;
+ GDK_KEY_Hangul_Start = $ff32;
+ GDK_KEY_Hangul_End = $ff33;
+ GDK_KEY_Hangul_Hanja = $ff34;
+ GDK_KEY_Hangul_Jamo = $ff35;
+ GDK_KEY_Hangul_Romaja = $ff36;
+ GDK_KEY_Hangul_Codeinput = $ff37;
+ GDK_KEY_Hangul_Jeonja = $ff38;
+ GDK_KEY_Hangul_Banja = $ff39;
+ GDK_KEY_Hangul_PreHanja = $ff3a;
+ GDK_KEY_Hangul_PostHanja = $ff3b;
+ GDK_KEY_Hangul_SingleCandidate = $ff3c;
+ GDK_KEY_Hangul_MultipleCandidate = $ff3d;
+ GDK_KEY_Hangul_PreviousCandidate = $ff3e;
+ GDK_KEY_Hangul_Special = $ff3f;
+ GDK_KEY_Hangul_switch = $FF7E;
+ GDK_KEY_Hangul_Kiyeog = $ea1;
+ GDK_KEY_Hangul_SsangKiyeog = $ea2;
+ GDK_KEY_Hangul_KiyeogSios = $ea3;
+ GDK_KEY_Hangul_Nieun = $ea4;
+ GDK_KEY_Hangul_NieunJieuj = $ea5;
+ GDK_KEY_Hangul_NieunHieuh = $ea6;
+ GDK_KEY_Hangul_Dikeud = $ea7;
+ GDK_KEY_Hangul_SsangDikeud = $ea8;
+ GDK_KEY_Hangul_Rieul = $ea9;
+ GDK_KEY_Hangul_RieulKiyeog = $eaa;
+ GDK_KEY_Hangul_RieulMieum = $eab;
+ GDK_KEY_Hangul_RieulPieub = $eac;
+ GDK_KEY_Hangul_RieulSios = $ead;
+ GDK_KEY_Hangul_RieulTieut = $eae;
+ GDK_KEY_Hangul_RieulPhieuf = $eaf;
+ GDK_KEY_Hangul_RieulHieuh = $eb0;
+ GDK_KEY_Hangul_Mieum = $eb1;
+ GDK_KEY_Hangul_Pieub = $eb2;
+ GDK_KEY_Hangul_SsangPieub = $eb3;
+ GDK_KEY_Hangul_PieubSios = $eb4;
+ GDK_KEY_Hangul_Sios = $eb5;
+ GDK_KEY_Hangul_SsangSios = $eb6;
+ GDK_KEY_Hangul_Ieung = $eb7;
+ GDK_KEY_Hangul_Jieuj = $eb8;
+ GDK_KEY_Hangul_SsangJieuj = $eb9;
+ GDK_KEY_Hangul_Cieuc = $eba;
+ GDK_KEY_Hangul_Khieuq = $ebb;
+ GDK_KEY_Hangul_Tieut = $ebc;
+ GDK_KEY_Hangul_Phieuf = $ebd;
+ GDK_KEY_Hangul_Hieuh = $ebe;
+ GDK_KEY_Hangul_A = $ebf;
+ GDK_KEY_Hangul_AE = $ec0;
+ GDK_KEY_Hangul_YA = $ec1;
+ GDK_KEY_Hangul_YAE = $ec2;
+ GDK_KEY_Hangul_EO = $ec3;
+ GDK_KEY_Hangul_E = $ec4;
+ GDK_KEY_Hangul_YEO = $ec5;
+ GDK_KEY_Hangul_YE = $ec6;
+ GDK_KEY_Hangul_O = $ec7;
+ GDK_KEY_Hangul_WA = $ec8;
+ GDK_KEY_Hangul_WAE = $ec9;
+ GDK_KEY_Hangul_OE = $eca;
+ GDK_KEY_Hangul_YO = $ecb;
+ GDK_KEY_Hangul_U = $ecc;
+ GDK_KEY_Hangul_WEO = $ecd;
+ GDK_KEY_Hangul_WE = $ece;
+ GDK_KEY_Hangul_WI = $ecf;
+ GDK_KEY_Hangul_YU = $ed0;
+ GDK_KEY_Hangul_EU = $ed1;
+ GDK_KEY_Hangul_YI = $ed2;
+ GDK_KEY_Hangul_I = $ed3;
+ GDK_KEY_Hangul_J_Kiyeog = $ed4;
+ GDK_KEY_Hangul_J_SsangKiyeog = $ed5;
+ GDK_KEY_Hangul_J_KiyeogSios = $ed6;
+ GDK_KEY_Hangul_J_Nieun = $ed7;
+ GDK_KEY_Hangul_J_NieunJieuj = $ed8;
+ GDK_KEY_Hangul_J_NieunHieuh = $ed9;
+ GDK_KEY_Hangul_J_Dikeud = $eda;
+ GDK_KEY_Hangul_J_Rieul = $edb;
+ GDK_KEY_Hangul_J_RieulKiyeog = $edc;
+ GDK_KEY_Hangul_J_RieulMieum = $edd;
+ GDK_KEY_Hangul_J_RieulPieub = $ede;
+ GDK_KEY_Hangul_J_RieulSios = $edf;
+ GDK_KEY_Hangul_J_RieulTieut = $ee0;
+ GDK_KEY_Hangul_J_RieulPhieuf = $ee1;
+ GDK_KEY_Hangul_J_RieulHieuh = $ee2;
+ GDK_KEY_Hangul_J_Mieum = $ee3;
+ GDK_KEY_Hangul_J_Pieub = $ee4;
+ GDK_KEY_Hangul_J_PieubSios = $ee5;
+ GDK_KEY_Hangul_J_Sios = $ee6;
+ GDK_KEY_Hangul_J_SsangSios = $ee7;
+ GDK_KEY_Hangul_J_Ieung = $ee8;
+ GDK_KEY_Hangul_J_Jieuj = $ee9;
+ GDK_KEY_Hangul_J_Cieuc = $eea;
+ GDK_KEY_Hangul_J_Khieuq = $eeb;
+ GDK_KEY_Hangul_J_Tieut = $eec;
+ GDK_KEY_Hangul_J_Phieuf = $eed;
+ GDK_KEY_Hangul_J_Hieuh = $eee;
+ GDK_KEY_Hangul_RieulYeorinHieuh = $eef;
+ GDK_KEY_Hangul_SunkyeongeumMieum = $ef0;
+ GDK_KEY_Hangul_SunkyeongeumPieub = $ef1;
+ GDK_KEY_Hangul_PanSios = $ef2;
+ GDK_KEY_Hangul_KkogjiDalrinIeung = $ef3;
+ GDK_KEY_Hangul_SunkyeongeumPhieuf = $ef4;
+ GDK_KEY_Hangul_YeorinHieuh = $ef5;
+ GDK_KEY_Hangul_AraeA = $ef6;
+ GDK_KEY_Hangul_AraeAE = $ef7;
+ GDK_KEY_Hangul_J_PanSios = $ef8;
+ GDK_KEY_Hangul_J_KkogjiDalrinIeung = $ef9;
+ GDK_KEY_Hangul_J_YeorinHieuh = $efa;
+ GDK_KEY_Korean_Won = $eff;
+ GDK_KEY_EcuSign = $20a0;
+ GDK_KEY_ColonSign = $20a1;
+ GDK_KEY_CruzeiroSign = $20a2;
+ GDK_KEY_FFrancSign = $20a3;
+ GDK_KEY_LiraSign = $20a4;
+ GDK_KEY_MillSign = $20a5;
+ GDK_KEY_NairaSign = $20a6;
+ GDK_KEY_PesetaSign = $20a7;
+ GDK_KEY_RupeeSign = $20a8;
+ GDK_KEY_WonSign = $20a9;
+ GDK_KEY_NewSheqelSign = $20aa;
+ GDK_KEY_DongSign = $20ab;
+ GDK_KEY_EuroSign = $20ac;
+{$endif}
+
+// included by gdk2.pp
+
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkpango.inc b/packages/gtk2/src/gtk+/gdk/gdkpango.inc
new file mode 100644
index 0000000000..5de3a0cb5b
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkpango.inc
@@ -0,0 +1,49 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+{ Attributes use to render insensitive text in GTK+. }
+ PGdkPangoAttrStipple = ^TGdkPangoAttrStipple;
+ TGdkPangoAttrStipple = record
+ attr : TPangoAttribute;
+ stipple : PGdkBitmap;
+ end;
+
+ PGdkPangoAttrEmbossed = ^TGdkPangoAttrEmbossed;
+ TGdkPangoAttrEmbossed = record
+ attr : TPangoAttribute;
+ embossed : gboolean;
+ end;
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+{ Pango interaction }
+
+function gdk_pango_context_get_for_screen(screen:PGdkScreen):PPangoContext; cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_pango_context_get:PPangoContext; cdecl; external gdklib;
+{$endif}
+
+procedure gdk_pango_context_set_colormap(context:PPangoContext; colormap:PGdkColormap); cdecl; external gdklib;
+
+{ Get a clip region to draw only part of a layout or
+ line. index_ranges contains alternating range starts/stops. The
+ region is the region which contains the given ranges, i.e. if you
+ draw with the region as clip, only the given ranges are drawn.
+ }
+function gdk_pango_layout_line_get_clip_region(line:PPangoLayoutLine; x_origin:gint; y_origin:gint; index_ranges:Pgint; n_ranges:gint):PGdkRegion; cdecl; external gdklib;
+function gdk_pango_layout_get_clip_region(layout:PPangoLayout; x_origin:gint; y_origin:gint; index_ranges:Pgint; n_ranges:gint):PGdkRegion; cdecl; external gdklib;
+
+function gdk_pango_attr_stipple_new(stipple:PGdkBitmap):PPangoAttribute; cdecl; external gdklib;
+function gdk_pango_attr_embossed_new(embossed:gboolean):PPangoAttribute; cdecl; external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+{$ENDIF}
diff --git a/packages/gtk2/src/gtk+/gdk/gdkpixbuf.inc b/packages/gtk2/src/gtk+/gdk/gdkpixbuf.inc
new file mode 100644
index 0000000000..f9ab602f15
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkpixbuf.inc
@@ -0,0 +1,38 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+{ Rendering to a drawable }
+
+procedure gdk_pixbuf_render_threshold_alpha(pixbuf:PGdkPixbuf; bitmap:PGdkBitmap; src_x:longint; src_y:longint; dest_x:longint;
+ dest_y:longint; width:longint; height:longint; alpha_threshold:longint); cdecl; external gdklib;
+procedure gdk_pixbuf_render_to_drawable(pixbuf:PGdkPixbuf; drawable:PGdkDrawable; gc:PGdkGC; src_x:longint; src_y:longint;
+ dest_x:longint; dest_y:longint; width:longint; height:longint; dither:TGdkRgbDither;
+ x_dither:longint; y_dither:longint); cdecl; external gdklib;
+procedure gdk_pixbuf_render_to_drawable_alpha(pixbuf:PGdkPixbuf; drawable:PGdkDrawable; src_x:longint; src_y:longint; dest_x:longint;
+ dest_y:longint; width:longint; height:longint; alpha_mode:TGdkPixbufAlphaMode; alpha_threshold:longint;
+ dither:TGdkRgbDither; x_dither:longint; y_dither:longint); cdecl; external gdklib;
+procedure gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf:PGdkPixbuf; colormap:PGdkColormap; var pixmap_return:PGdkPixmap; var mask_return:PGdkBitmap; alpha_threshold:longint); cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+procedure gdk_pixbuf_render_pixmap_and_mask(pixbuf:PGdkPixbuf; var pixmap_return:PGdkPixmap; var mask_return:PGdkBitmap; alpha_threshold:longint); cdecl; external gdklib;
+{$endif}
+
+
+{ Fetching a region from a drawable }
+
+function gdk_pixbuf_get_from_drawable(dest:PGdkPixbuf; src:PGdkDrawable; cmap:PGdkColormap; src_x:longint; src_y:longint;
+ dest_x:longint; dest_y:longint; width:longint; height:longint):PGdkPixbuf; cdecl; external gdklib;
+function gdk_pixbuf_get_from_image(dest:PGdkPixbuf; src:PGdkImage; cmap:PGdkColormap; src_x:longint; src_y:longint;
+ dest_x:longint; dest_y:longint; width:longint; height:longint):PGdkPixbuf; cdecl; external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+{$ENDIF}
diff --git a/packages/gtk2/src/gtk+/gdk/gdkpixmap.inc b/packages/gtk2/src/gtk+/gdk/gdkpixmap.inc
new file mode 100644
index 0000000000..409c60855a
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkpixmap.inc
@@ -0,0 +1,125 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+{ window-system-specific delegate anObject }
+ PGdkPixmapObject = ^TGdkPixmapObject;
+ TGdkPixmapObject = record
+ parent_instance : TGdkDrawable;
+ impl : PGdkDrawable;
+ depth : gint;
+ end;
+
+ PGdkPixmapObjectClass = ^TGdkPixmapObjectClass;
+ TGdkPixmapObjectClass = record
+ parent_class : TGdkDrawableClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GDK_TYPE_PIXMAP : GType;
+function GDK_PIXMAP(anObject : Pointer) : PGdkPixmap;
+function GDK_PIXMAP_CLASS(klass : Pointer) : PGdkPixmapObjectClass;
+function GDK_IS_PIXMAP(anObject : Pointer) : boolean;
+function GDK_IS_PIXMAP_CLASS(klass : Pointer) : boolean;
+function GDK_PIXMAP_GET_CLASS(obj : Pointer) : PGdkPixmapObjectClass;
+
+function GDK_PIXMAP_OBJECT(anObject : Pointer) : PGdkPixmapObject;
+
+
+function gdk_pixmap_get_type:GType; cdecl; external gdklib;
+
+
+{ Pixmaps }
+
+function gdk_pixmap_new(window:PGdkWindow; width:gint; height:gint; depth:gint):PGdkPixmap; cdecl; external gdklib;
+function gdk_bitmap_create_from_data(window:PGdkWindow; data:Pgchar; width:gint; height:gint):PGdkBitmap; cdecl; external gdklib;
+function gdk_pixmap_create_from_data(window:PGdkWindow; data:Pgchar; width:gint; height:gint; depth:gint;
+ fg:PGdkColor; bg:PGdkColor):PGdkPixmap; cdecl; external gdklib;
+function gdk_pixmap_create_from_xpm(window:PGdkWindow; var mask:PGdkBitmap; transparent_color:PGdkColor; filename:Pgchar):PGdkPixmap; cdecl; external gdklib;
+function gdk_pixmap_colormap_create_from_xpm(window:PGdkWindow; colormap:PGdkColormap; var mask:PGdkBitmap; transparent_color:PGdkColor; filename:Pgchar):PGdkPixmap; cdecl; external gdklib;
+function gdk_pixmap_create_from_xpm_d(window:PGdkWindow; var mask:PGdkBitmap; transparent_color:PGdkColor; data:PPgchar):PGdkPixmap; cdecl; external gdklib;
+function gdk_pixmap_colormap_create_from_xpm_d(window:PGdkWindow; colormap:PGdkColormap; var mask:PGdkBitmap; transparent_color:PGdkColor; data:PPgchar):PGdkPixmap; cdecl; external gdklib;
+{ Functions to create/lookup pixmaps from their native equivalents }
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_pixmap_foreign_new(anid:TGdkNativeWindow):PGdkPixmap; cdecl; external gdklib;
+function gdk_pixmap_lookup(anid:TGdkNativeWindow):PGdkPixmap; cdecl; external gdklib;
+{$endif}
+{ GDK_MULTIHEAD_SAFE }
+
+function gdk_pixmap_foreign_new_for_display(display:PGdkDisplay; anid:TGdkNativeWindow):PGdkPixmap; cdecl; external gdklib;
+function gdk_pixmap_lookup_for_display(display:PGdkDisplay; anid:TGdkNativeWindow):PGdkPixmap; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+function gdk_bitmap_ref(drawable:PGdkDrawable):PGdkDrawable;
+procedure gdk_bitmap_unref(drawable:PGdkDrawable);
+function gdk_pixmap_ref(drawable:PGdkDrawable):PGdkDrawable;
+procedure gdk_pixmap_unref(drawable:PGdkDrawable);
+{$endif}
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_PIXMAP : GType;
+begin
+ GDK_TYPE_PIXMAP:=gdk_pixmap_get_type;
+end;
+
+function GDK_PIXMAP(anObject : Pointer) : PGdkPixmap;
+begin
+ GDK_PIXMAP:=PGdkPixmap(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_PIXMAP));
+end;
+
+function GDK_PIXMAP_CLASS(klass : Pointer) : PGdkPixmapObjectClass;
+begin
+ GDK_PIXMAP_CLASS:=PGdkPixmapObjectClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ GDK_TYPE_PIXMAP));
+end;
+
+function GDK_IS_PIXMAP(anObject : Pointer) : boolean;
+begin
+ GDK_IS_PIXMAP:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_PIXMAP);
+end;
+
+function GDK_IS_PIXMAP_CLASS(klass : Pointer) : boolean;
+begin
+ GDK_IS_PIXMAP_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_PIXMAP);
+end;
+
+function GDK_PIXMAP_GET_CLASS(obj : Pointer) : PGdkPixmapObjectClass;
+begin
+ GDK_PIXMAP_GET_CLASS:=PGdkPixmapObjectClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ GDK_TYPE_PIXMAP));
+end;
+
+function GDK_PIXMAP_OBJECT(anObject : Pointer) : PGdkPixmapObject;
+begin
+ GDK_PIXMAP_OBJECT:=PGdkPixmapObject(GDK_PIXMAP(anObject));
+end;
+
+function gdk_bitmap_ref(drawable:PGdkDrawable):PGdkDrawable;
+begin
+ gdk_bitmap_ref:=GDK_DRAWABLE(g_object_ref(G_OBJECT(drawable)));
+end;
+
+procedure gdk_bitmap_unref(drawable:PGdkDrawable);
+begin
+ g_object_unref(G_OBJECT(drawable));
+end;
+
+function gdk_pixmap_ref(drawable:PGdkDrawable):PGdkDrawable;
+begin
+ gdk_pixmap_ref:=GDK_DRAWABLE(g_object_ref(G_OBJECT(drawable)));
+end;
+
+procedure gdk_pixmap_unref(drawable:PGdkDrawable);
+begin
+ g_object_unref(G_OBJECT(drawable));
+end;
+
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkpoly-generic.inc b/packages/gtk2/src/gtk+/gdk/gdkpoly-generic.inc
new file mode 100644
index 0000000000..737e9ba851
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkpoly-generic.inc
@@ -0,0 +1,338 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ $TOG: poly.h /main/5 1998/02/06 17:47:27 kaleb $ }
+{
+
+Copyright 1987, 1998 The Open Group
+
+All Rights Reserved.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+ }
+{
+ This file contains a few macros to help track
+ the edge of a filled anObject. The anObject is assumed
+ to be filled in scanline order, and thus the
+ algorithm used is an extension of Bresenham's line
+ drawing algorithm which assumes that y is always the
+ major axis.
+ Since these pieces of code are the same for any filled shape,
+ it is more convenient to gather the library in one
+ place, but since these pieces of code are also in
+ the inner loops of output primitives, procedure call
+ overhead is out of the question.
+ See the author for a derivation if needed.
+ }
+{
+ In scan converting polygons, we want to choose those pixels
+ which are inside the polygon. Thus, we add .5 to the starting
+ x coordinate for both left and right edges. Now we choose the
+ first pixel which is inside the pgon for the left edge and the
+ first pixel which is outside the pgon for the right edge.
+ Draw the left pixel, but not the right.
+
+ How to add .5 to the starting x coordinate:
+ If the edge is moving to the right, then subtract dy from the
+ error term from the general form of the algorithm.
+ If the edge is moving to the left, then add dy to the error term.
+
+ The reason for the difference between edges moving to the left
+ and edges moving to the right is simple: If an edge is moving
+ to the right, then we want the algorithm to flip immediately.
+ If it is moving to the left, then we don't want it to flip until
+ we traverse an entire pixel.
+ }
+{#define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) { \
+int dx; // local storage \
+\
+// \
+// if the edge is horizontal, then it is ignored \
+// and assumed not to be processed. Otherwise, do this stuff. \
+// \
+if ((dy) != 0) { \
+ xStart = (x1); \
+ dx = (x2) - xStart; \
+ if (dx < 0) { \
+ m = dx / (dy); \
+ m1 = m - 1; \
+ incr1 = -2 dx + 2 (dy) m1; \
+ incr2 = -2 dx + 2 (dy) m; \
+ d = 2 m (dy) - 2 dx - 2 (dy); \
+ } else { \
+ m = dx / (dy); \
+ m1 = m + 1; \
+ incr1 = 2 dx - 2 (dy) m1; \
+ incr2 = 2 dx - 2 (dy) m; \
+ d = -2 m (dy) + 2 dx; \
+ } \
+} \
+}
+ }
+{#define BRESINCRPGON(d, minval, m, m1, incr1, incr2) { \
+ if (m1 > 0) { \
+ if (d > 0) { \
+ minval += m1; \
+ d += incr1; \
+ } \
+ else { \
+ minval += m; \
+ d += incr2; \
+ } \
+ } else {\
+ if (d >= 0) { \
+ minval += m1; \
+ d += incr1; \
+ } \
+ else { \
+ minval += m; \
+ d += incr2; \
+ } \
+ } \
+}
+ }
+{
+ This structure contains all of the information needed
+ to run the bresenham algorithm.
+ The variables may be hardcoded into the declarations
+ instead of using this structure to make use of
+ register declarations.
+ }
+{ minor axis }
+{ decision variable }
+{ slope and slope+1 }
+{ error increments }
+type
+
+ PBRESINFO = ^TBRESINFO;
+ TBRESINFO = record
+ minor_axis : longint;
+ d : longint;
+ m : longint;
+ m1 : longint;
+ incr1 : longint;
+ incr2 : longint;
+ end;
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function BRESINITPGONSTRUCT(dmaj,min1,min2,bres : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function BRESINCRPGONSTRUCT(bres : longint) : longint;
+
+{
+ These are the data structures needed to scan
+ convert regions. Two different scan conversion
+ methods are available -- the even-odd method, and
+ the winding number method.
+ The even-odd rule states that a point is inside
+ the polygon if a ray drawn from that point in any
+ direction will pass through an odd number of
+ path segments.
+ By the winding number rule, a point is decided
+ to be inside the polygon if a ray drawn from that
+ point in any direction passes through a different
+ number of clockwise and counter-clockwise path
+ segments.
+
+ These data structures are adapted somewhat from
+ the algorithm in (Foley/Van Dam) for scan converting
+ polygons.
+ The basic algorithm is to start at the top (smallest y)
+ of the polygon, stepping down to the bottom of
+ the polygon by incrementing the y coordinate. We
+ keep a list of edges which the current scanline crosses,
+ sorted by x. This list is called the Active Edge Table (AET)
+ As we change the y-coordinate, we update each entry in
+ in the active edge table to reflect the edges new xcoord.
+ This list must be sorted at each scanline in case
+ two edges intersect.
+ We also keep a data structure known as the Edge Table (ET),
+ which keeps track of all the edges which the current
+ scanline has not yet reached. The ET is basically a
+ list of ScanLineList structures containing a list of
+ edges which are entered at a given scanline. There is one
+ ScanLineList per scanline at which an edge is entered.
+ When we enter a new edge, we move it from the ET to the AET.
+
+ From the AET, we can implement the even-odd rule as in
+ (Foley/Van Dam).
+ The winding number rule is a little trickier. We also
+ keep the EdgeTableEntries in the AET linked by the
+ nextWETE (winding EdgeTableEntry) link. This allows
+ the edges to be linked just as before for updating
+ purposes, but only uses the edges linked by the nextWETE
+ link as edges representing spans of the polygon to
+ drawn (as with the even-odd rule).
+ }
+{
+ for the winding number rule
+ }
+
+const
+ CLOCKWISE = 1;
+ COUNTERCLOCKWISE = -(1);
+{ ycoord at which we exit this edge. }
+{ Bresenham info to run the edge }
+{ next in the list }
+{ for insertion sort }
+{ for winding num rule }
+{ flag for winding number rule }
+type
+
+ PEdgeTableEntry = ^TEdgeTableEntry;
+ TEdgeTableEntry = record
+ ymax : longint;
+ bres : TBRESINFO;
+ next : PEdgeTableEntry;
+ back : PEdgeTableEntry;
+ nextWETE : PEdgeTableEntry;
+ ClockWise : longint;
+ end;
+{ the scanline represented }
+{ header node }
+{ next in the list }
+
+ PScanLineList = ^TScanLineList;
+ TScanLineList = record
+ scanline : longint;
+ edgelist : PEdgeTableEntry;
+ next : PScanLineList;
+ end;
+{ ymax for the polygon }
+{ ymin for the polygon }
+{ header node }
+
+ PEdgeTable = ^TEdgeTable;
+ TEdgeTable = record
+ ymax : longint;
+ ymin : longint;
+ scanlines : TScanLineList;
+ end;
+{
+ Here is a struct to help with storage allocation
+ so we can allocate a big chunk at a time, and then take
+ pieces from this heap when we need to.
+ }
+
+const
+ SLLSPERBLOCK = 25;
+type
+
+ PScanLineListBlock = ^TScanLineListBlock;
+ TScanLineListBlock = record
+ SLLs : array[0..(SLLSPERBLOCK)-1] of TScanLineList;
+ next : PScanLineListBlock;
+ end;
+{
+
+ a few macros for the inner loops of the fill code where
+ performance considerations don't allow a procedure call.
+
+ Evaluate the given edge at the given scanline.
+ If the edge has expired, then we leave it and fix up
+ the active edge table; otherwise, we increment the
+ x value to be ready for the next scanline.
+ The winding number rule is in effect, so we must notify
+ the caller when the edge has been removed so he
+ can reorder the Winding Active Edge Table.
+ }
+{
+#define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) { \
+ if (pAET->ymax == y) { // leaving this edge \
+ pPrevAET->next = pAET->next; \
+ pAET = pPrevAET->next; \
+ fixWAET = 1; \
+ if (pAET) \
+ pAET->back = pPrevAET; \
+ } \
+ else { \
+ BRESINCRPGONSTRUCT(pAET->bres); \
+ pPrevAET = pAET; \
+ pAET = pAET->next; \
+ } \
+}
+ }
+{
+ Evaluate the given edge at the given scanline.
+ If the edge has expired, then we leave it and fix up
+ the active edge table; otherwise, we increment the
+ x value to be ready for the next scanline.
+ The even-odd rule is in effect.
+ }
+{#define EVALUATEEDGEEVENODD(pAET, pPrevAET, y) { \
+ if (pAET->ymax == y) { // leaving this edge \
+ pPrevAET->next = pAET->next; \
+ pAET = pPrevAET->next; \
+ if (pAET) \
+ pAET->back = pPrevAET; \
+ } \
+ else { \
+ BRESINCRPGONSTRUCT(pAET->bres); \
+ pPrevAET = pAET; \
+ pAET = pAET->next; \
+ } \
+}
+ }
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function BRESINITPGONSTRUCT(dmaj,min1,min2,bres : longint) : longint;
+begin
+ BRESINITPGONSTRUCT:=BRESINITPGON(dmaj,min1,min2,bres.minor_axis,bres.d,bres.m,bres.m1,bres.incr1,bres.incr2);
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function BRESINCRPGONSTRUCT(bres : longint) : longint;
+begin
+ BRESINCRPGONSTRUCT:=BRESINCRPGON(bres.d,bres.minor_axis,bres.m,bres.m1,bres.incr1,bres.incr2);
+end;
+
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkprivate.inc b/packages/gtk2/src/gtk+/gdk/gdkprivate.inc
new file mode 100644
index 0000000000..4e08e88fc1
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkprivate.inc
@@ -0,0 +1,89 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ 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 Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+ }
+{
+ Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
+ file for a list of people on the GTK+ Team. See the ChangeLog
+ files for a list of changes. These files are distributed with
+ GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ }
+{$ifndef __GDK_PRIVATE_H__}
+{$define __GDK_PRIVATE_H__}
+{$include <gdk/gdktypes.inc}
+{$include <gdk/gdkevents.inc}
+{$include <gdk/gdkfont.inc}
+{$include <gdk/gdkgc.inc}
+{$include <gdk/gdkimage.inc}
+{$include <gdk/gdkregion.inc}
+{$include <gdk/gdkvisual.inc}
+{$include <gdk/gdkwindow.inc}
+function GDK_PARENT_RELATIVE_BG : PGdkPixmap;
+function GDK_NO_BG : PGdkPixmap;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function GDK_WINDOW_TYPE(d : longint) : longint;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function GDK_WINDOW_DESTROYED(d : longint) : longint;
+
+procedure gdk_window_destroy_notify(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_synthesize_window_state(window:PGdkWindow; unset_flags:TGdkWindowState; set_flags:TGdkWindowState); cdecl; external gdklib;
+{$endif}
+{ __GDK_PRIVATE_H__ }
+function GDK_PARENT_RELATIVE_BG : PGdkPixmap;
+ begin
+ GDK_PARENT_RELATIVE_BG:=PGdkPixmap(1);
+ end;
+
+function GDK_NO_BG : PGdkPixmap;
+ begin
+ GDK_NO_BG:=PGdkPixmap(2);
+ end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function GDK_WINDOW_TYPE(d : longint) : longint;
+begin
+ GDK_WINDOW_TYPE:=(PGdkWindowObject(GDK_WINDOW(d)))^.window_type;
+end;
+
+{ was #define dname(params) para_def_expr }
+{ argument types are unknown }
+{ return type might be wrong }
+function GDK_WINDOW_DESTROYED(d : longint) : longint;
+begin
+ GDK_WINDOW_DESTROYED:=(PGdkWindowObject(GDK_WINDOW(d)))^.destroyed;
+end;
+
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkproperty.inc b/packages/gtk2/src/gtk+/gdk/gdkproperty.inc
new file mode 100644
index 0000000000..5143045845
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkproperty.inc
@@ -0,0 +1,47 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+ PGdkPropMode = ^TGdkPropMode;
+ TGdkPropMode = (
+ GDK_PROP_MODE_REPLACE,
+ GDK_PROP_MODE_PREPEND,
+ GDK_PROP_MODE_APPEND
+ );
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function gdk_atom_intern(atom_name:Pgchar; only_if_exists:gboolean):TGdkAtom; cdecl; external gdklib;
+function gdk_atom_name(atom:TGdkAtom):Pgchar; cdecl; external gdklib;
+function gdk_property_get(window:PGdkWindow; _property:TGdkAtom; _type:TGdkAtom; offset:gulong; length:gulong;
+ pdelete:gint; actual_property_type:PGdkAtom; actual_format:Pgint; actual_length:Pgint; data:PPguchar):gboolean; cdecl; external gdklib;
+procedure gdk_property_change(window:PGdkWindow; _property:TGdkAtom; _type:TGdkAtom; format:gint; mode:TGdkPropMode;
+ data:Pguchar; nelements:gint); cdecl; external gdklib;
+procedure gdk_property_delete(window:PGdkWindow; _property:TGdkAtom); cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_text_property_to_text_list(encoding:TGdkAtom; format:gint; text:Pguchar; length:gint; var list:PPgchar):gint; cdecl; external gdklib;
+function gdk_text_property_to_utf8_list(encoding:TGdkAtom; format:gint; text:Pguchar; length:gint; var list:PPgchar):gint; cdecl; external gdklib;
+function gdk_utf8_to_compound_text(str:Pgchar; encoding:PGdkAtom; format:Pgint; ctext:PPguchar; length:Pgint):gboolean; cdecl; external gdklib;
+function gdk_string_to_compound_text(str:Pgchar; encoding:PGdkAtom; format:Pgint; ctext:PPguchar; length:Pgint):gint; cdecl; external gdklib;
+{$endif}
+
+function gdk_text_property_to_text_list_for_display(display:PGdkDisplay; encoding:TGdkAtom; format:gint; text:Pguchar; length:gint;
+ var list:PPgchar):gint; cdecl; external gdklib;
+function gdk_text_property_to_utf8_list_for_display(display:PGdkDisplay; encoding:TGdkAtom; format:gint; text:Pguchar; length:gint;
+ var list:PPgchar):gint; cdecl; external gdklib;
+function gdk_utf8_to_string_target(str:Pgchar):Pgchar; cdecl; external gdklib;
+function gdk_string_to_compound_text_for_display(display:PGdkDisplay; str:Pgchar; encoding:PGdkAtom; format:Pgint; ctext:PPguchar;
+ length:Pgint):gint; cdecl; external gdklib;
+function gdk_utf8_to_compound_text_for_display(display:PGdkDisplay; str:Pgchar; encoding:PGdkAtom; format:Pgint; ctext:PPguchar;
+ length:Pgint):gboolean; cdecl; external gdklib;
+procedure gdk_free_text_list(list:PPgchar); cdecl; external gdklib;
+procedure gdk_free_compound_text(ctext:Pguchar); cdecl; external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+{$ENDIF}
diff --git a/packages/gtk2/src/gtk+/gdk/gdkregion-generic.inc b/packages/gtk2/src/gtk+/gdk/gdkregion-generic.inc
new file mode 100644
index 0000000000..ca2e1138ee
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkregion-generic.inc
@@ -0,0 +1,155 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+ PGdkRegionBox = ^TGdkRegionBox;
+ TGdkRegionBox = TGdkSegment;
+
+{
+ clip region
+ }
+ PGdkRegion = ^TGdkRegion;
+ TGdkRegion = record
+ size : longint;
+ numRects : longint;
+ rects : PGdkRegionBox;
+ extents : TGdkRegionBox;
+ end;
+
+{
+ used to allocate buffers for points and link
+ the buffers together
+ }
+ PPOINTBLOCK = ^TPOINTBLOCK;
+ TPOINTBLOCK = record
+ pts : array[0..(NUMPTSTOBUFFER)-1] of TGdkPoint;
+ next : PPOINTBLOCK;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{ 1 if two BOXs overlap.
+ 0 if two BOXs do not overlap.
+ Remember, x2 and y2 are not in the region
+ }
+function gdkregion_EXTENTCHECK(r1, r2: PGdkRegionBox): boolean;
+
+{
+ update region extents
+ }
+procedure gdkregion_EXTENTS(r: PGdkRegionBox; idRect: PGdkRegion);
+
+{
+ Check to see if there is enough memory in the present region.
+ }
+function gdkregion_MEMCHECK(reg: PGdkRegion; var ARect, firstrect: PGdkRegionBox): boolean;
+
+{ this routine checks to see if the previous rectangle is the same
+ or subsumes the new rectangle to add.
+ }
+function gdkregion_CHECK_PREVIOUS(Reg: PGdkRegion; R: PGdkRegionBox;
+ Rx1,Ry1,Rx2,Ry2 : gint) : boolean;
+
+{ add a rectangle to the given Region }
+procedure gdkregion_ADDRECT(reg: PGdkRegion; r: PGdkRegionBox;
+ rx1, ry1, rx2, ry2: gint);
+
+{ add a rectangle to the given Region }
+procedure gdkregion_ADDRECTNOX(reg: PGdkRegion; r: PGdkRegionBox; rx1,ry1,rx2,ry2: gint);
+
+{ }
+function gdkregion_EMPTY_REGION(pReg: PGdkRegion): boolean;
+{pReg->numRects = 0}
+
+function gdkregion_REGION_NOT_EMPTY(pReg : PGdkRegion) : boolean;
+
+function gdkregion_INBOX(r: TGdkRegionBox; x,y : gint) : boolean;
+
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function gdkregion_EXTENTCHECK(r1, r2: PGdkRegionBox): boolean;
+begin
+ gdkregion_EXTENTCHECK:=(r1^.x2 > r2^.x1) and (r1^.x1 < r2^.x2) and (r1^.y2 > r2^.y1)
+ and (r1^.y1 < r2^.y2)
+end;
+
+procedure gdkregion_EXTENTS(r: PGdkRegionBox; idRect: PGdkRegion);
+begin
+ if (r^.x1 < idRect^.extents.x1) then idRect^.extents.x1 := r^.x1;
+ if r^.y1 < idRect^.extents.y1 then idRect^.extents.y1 := r^.y1;
+ if r^.x2 > idRect^.extents.x2 then idRect^.extents.x2 := r^.x2;
+end;
+
+function gdkregion_MEMCHECK(reg: PGdkRegion;
+ var ARect, firstrect: PGdkRegionBox): boolean;
+begin
+{$IFNDEF KYLIX}
+ if reg^.numRects >= reg^.size - 1 then begin
+ firstrect := PGdkRegionBox(g_renew (SizeOf(TGdkRegionBox), firstrect,
+ 2 * reg^.size));
+ reg^.size:=reg^.size*2;
+ Arect:=@firstrect[reg^.numRects];
+ end;
+ Result:=true;
+{$ENDIF}
+end;
+
+function gdkregion_CHECK_PREVIOUS(Reg: PGdkRegion; R: PGdkRegionBox;
+ Rx1,Ry1,Rx2,Ry2 : gint) : boolean;
+begin
+{$IFNDEF KYLIX}
+ gdkregion_CHECK_PREVIOUS:=
+ not (((((Reg^.numRects > 0) and ((R - 1)^.y1 = Ry1))
+ and ((R - 1)^.y2 = Ry2))
+ and ((R - 1)^.x1 <= Rx1))
+ and ((R - 1)^.x2 >= Rx2));
+{$ENDIF}
+end;
+
+procedure gdkregion_ADDRECT(reg: PGdkRegion; r: PGdkRegionBox;
+ rx1, ry1, rx2, ry2: gint);
+begin
+ if ((rx1 < rx2) and (ry1 < ry2)
+ and gdkregion_CHECK_PREVIOUS(reg, r, rx1, ry1, rx2, ry2)) then begin
+ r^.x1 := rx1;
+ r^.y1 := ry1;
+ r^.x2 := rx2;
+ r^.y2 := ry2;
+ end;
+
+end;
+
+procedure gdkregion_ADDRECTNOX(reg: PGdkRegion; r: PGdkRegionBox;
+ rx1,ry1,rx2,ry2: gint);
+begin
+ if ((rx1 < rx2) and (ry1 < ry2)
+ and gdkregion_CHECK_PREVIOUS(reg, r, rx1, ry1, rx2, ry2)) then begin
+ r^.x1 := rx1;
+ r^.y1 := ry1;
+ r^.x2 := rx2;
+ r^.y2 := ry2;
+ inc(reg^.numRects);
+ end;
+
+end;
+
+function gdkregion_EMPTY_REGION(pReg: PGdkRegion): boolean;
+begin
+ gdkregion_EMPTY_REGION:=pReg^.numRects=0;
+end;
+
+function gdkregion_REGION_NOT_EMPTY(pReg : PGdkRegion) : boolean;
+begin
+ gdkregion_REGION_NOT_EMPTY:=pReg^.numRects<>0;
+end;
+
+function gdkregion_INBOX(r: TGdkRegionBox; x,y : gint) : boolean;
+begin
+ gdkregion_INBOX:=(((r.x2 > x) and (r.x1 <= x)) and (r.y2 > y)) and (r.y1<= y);
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkregion.inc b/packages/gtk2/src/gtk+/gdk/gdkregion.inc
new file mode 100644
index 0000000000..e0ffebd6db
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkregion.inc
@@ -0,0 +1,58 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+{ GC fill rule for polygons
+ EvenOddRule
+ WindingRule
+ }
+ PGdkFillRule = ^TGdkFillRule;
+ TGdkFillRule = (
+ GDK_EVEN_ODD_RULE,
+ GDK_WINDING_RULE
+ );
+
+{ Types of overlapping between a rectangle and a region
+ GDK_OVERLAP_RECTANGLE_IN: rectangle is in region
+ GDK_OVERLAP_RECTANGLE_OUT: rectangle in not in region
+ GDK_OVERLAP_RECTANGLE_PART: rectangle in partially in region
+ }
+ PGdkOverlapType = ^TGdkOverlapType;
+ TGdkOverlapType = (
+ GDK_OVERLAP_RECTANGLE_IN,
+ GDK_OVERLAP_RECTANGLE_OUT,
+ GDK_OVERLAP_RECTANGLE_PART
+ );
+
+ TGdkSpanFunc = procedure (span:PGdkSpan; data:gpointer); cdecl;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function gdk_region_new:PGdkRegion; cdecl; external gdklib;
+function gdk_region_polygon(points:PGdkPoint; npoints:gint; fill_rule:TGdkFillRule):PGdkRegion; cdecl; external gdklib;
+function gdk_region_copy(region:PGdkRegion):PGdkRegion; cdecl; external gdklib;
+function gdk_region_rectangle(rectangle:PGdkRectangle):PGdkRegion; cdecl; external gdklib;
+procedure gdk_region_destroy(region:PGdkRegion); cdecl; external gdklib;
+procedure gdk_region_get_clipbox(region:PGdkRegion; rectangle:PGdkRectangle); cdecl; external gdklib;
+procedure gdk_region_get_rectangles(region:PGdkRegion; var rectangles:PGdkRectangle; n_rectangles:Pgint); cdecl; external gdklib;
+function gdk_region_empty(region:PGdkRegion):gboolean; cdecl; external gdklib;
+function gdk_region_equal(region1:PGdkRegion; region2:PGdkRegion):gboolean; cdecl; external gdklib;
+function gdk_region_point_in(region:PGdkRegion; x:longint; y:longint):gboolean; cdecl; external gdklib;
+function gdk_region_rect_in(region:PGdkRegion; rect:PGdkRectangle):TGdkOverlapType; cdecl; external gdklib;
+procedure gdk_region_offset(region:PGdkRegion; dx:gint; dy:gint); cdecl; external gdklib;
+procedure gdk_region_shrink(region:PGdkRegion; dx:gint; dy:gint); cdecl; external gdklib;
+procedure gdk_region_union_with_rect(region:PGdkRegion; rect:PGdkRectangle); cdecl; external gdklib;
+procedure gdk_region_intersect(source1:PGdkRegion; source2:PGdkRegion); cdecl; external gdklib;
+procedure gdk_region_union(source1:PGdkRegion; source2:PGdkRegion); cdecl; external gdklib;
+procedure gdk_region_subtract(source1:PGdkRegion; source2:PGdkRegion); cdecl; external gdklib;
+procedure gdk_region_xor(source1:PGdkRegion; source2:PGdkRegion); cdecl; external gdklib;
+procedure gdk_region_spans_intersect_foreach(region:PGdkRegion; spans:PGdkSpan; n_spans:longint; sorted:gboolean; _function:TGdkSpanFunc;
+ data:gpointer); cdecl; external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkrgb.inc b/packages/gtk2/src/gtk+/gdk/gdkrgb.inc
new file mode 100644
index 0000000000..7847c3df99
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkrgb.inc
@@ -0,0 +1,84 @@
+// included by gdk2.pp
+
+{$IFDEF read_forward_definitions}
+ PGdkRgbDither = ^TGdkRgbDither;
+ TGdkRgbDither = (
+ GDK_RGB_DITHER_NONE,
+ GDK_RGB_DITHER_NORMAL,
+ GDK_RGB_DITHER_MAX
+ );
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{< private > }
+ PGdkRgbCmap = ^TGdkRgbCmap;
+ TGdkRgbCmap = record
+ colors : array[0..255] of guint32;
+ n_colors : gint;
+ info_list : PGSList;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_rgb_init; cdecl; external gdklib;
+function gdk_rgb_xpixel_from_rgb(rgb:guint32):gulong; cdecl; external gdklib;
+procedure gdk_rgb_gc_set_foreground(gc:PGdkGC; rgb:guint32); cdecl; external gdklib;
+procedure gdk_rgb_gc_set_background(gc:PGdkGC; rgb:guint32); cdecl; external gdklib;
+{$endif}
+
+
+{ GDK_DISABLE_DEPRECATED }
+
+procedure gdk_rgb_find_color(colormap:PGdkColormap; color:PGdkColor); cdecl; external gdklib;
+
+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 gdklib;
+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 gdklib;
+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 gdklib;
+procedure gdk_draw_rgb_32_image_dithalign(drawable:PGdkDrawable; gc:PGdkGC; x:gint; y:gint; width:gint;
+ height:gint; dith:TGdkRgbDither; buf:Pguchar; rowstride:gint; xdith:gint;
+ ydith:gint); cdecl; external gdklib;
+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 gdklib;
+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 gdklib;
+function gdk_rgb_cmap_new(colors:Pguint32; n_colors:gint):PGdkRgbCmap; cdecl; external gdklib;
+procedure gdk_rgb_cmap_free(cmap:PGdkRgbCmap); cdecl; external gdklib;
+procedure gdk_rgb_set_verbose(verbose:gboolean); cdecl; external gdklib;
+
+
+{ experimental colormap stuff }
+
+procedure gdk_rgb_set_install(install:gboolean); cdecl; external gdklib;
+procedure gdk_rgb_set_min_colors(min_colors:gint); cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_rgb_get_colormap:PGdkColormap; cdecl; external gdklib;
+function gdk_rgb_get_visual:PGdkVisual; cdecl; external gdklib;
+function gdk_rgb_ditherable:gboolean; cdecl; external gdklib;
+{$ifndef GDK_DISABLE_DEPRECATED}
+function gdk_rgb_get_cmap:PGdkColormap;
+{$endif GDK_DISABLE_DEPRECATED}
+{$endif GDK_MULTIHEAD_SAFE}
+
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function gdk_rgb_get_cmap:PGdkColormap;
+begin
+ gdk_rgb_get_cmap:=gdk_rgb_get_colormap;
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkscreen.inc b/packages/gtk2/src/gtk+/gdk/gdkscreen.inc
new file mode 100644
index 0000000000..697aacbc98
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkscreen.inc
@@ -0,0 +1,106 @@
+// included by gdk2.pp
+{$IFDEF read_forward_definitions}
+ PGdkScreen = ^TGdkScreen;
+ TGdkScreen = record
+ parent_instance : TGObject;
+ end;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGdkScreenClass = ^TGdkScreenClass;
+ TGdkScreenClass = record
+ parent_class : TGObjectClass;
+ get_display : function (screen:PGdkScreen):PGdkDisplay; cdecl;
+ get_width : function (screen:PGdkScreen):gint; cdecl;
+ get_height : function (screen:PGdkScreen):gint; cdecl;
+ get_width_mm : function (screen:PGdkScreen):gint; cdecl;
+ get_height_mm : function (screen:PGdkScreen):gint; cdecl;
+ get_root_depth : function (screen:PGdkScreen):gint; cdecl;
+ get_screen_num : function (screen:PGdkScreen):gint; cdecl;
+ get_root_window : function (screen:PGdkScreen):PGdkWindow; cdecl;
+ get_default_colormap : function (screen:PGdkScreen):PGdkColormap; cdecl;
+ set_default_colormap : procedure (screen:PGdkScreen; colormap:PGdkColormap); cdecl;
+ get_window_at_pointer : function (screen:PGdkScreen; win_x:Pgint; win_y:Pgint):PGdkWindow; cdecl;
+ get_n_monitors : function (screen:PGdkScreen):gint; cdecl;
+ get_monitor_geometry : procedure (screen:PGdkScreen; monitor_num:gint; dest:PGdkRectangle); cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GDK_TYPE_SCREEN : GType;
+function GDK_SCREEN(anObject : Pointer) : PGdkScreen;
+function GDK_SCREEN_CLASS(klass : Pointer) : PGdkScreenClass;
+function GDK_IS_SCREEN(anObject : Pointer) : boolean;
+function GDK_IS_SCREEN_CLASS(klass : Pointer) : boolean;
+function GDK_SCREEN_GET_CLASS(obj : Pointer) : PGdkScreenClass;
+
+
+//function gdk_screen_get_type:GType; cdecl; external gdklib;
+function gdk_screen_get_default_colormap(screen:PGdkScreen):PGdkColormap; cdecl; external gdklib;
+procedure gdk_screen_set_default_colormap(screen:PGdkScreen; colormap:PGdkColormap); cdecl; external gdklib;
+function gdk_screen_get_system_colormap(screen:PGdkScreen):PGdkColormap; cdecl; external gdklib;
+function gdk_screen_get_system_visual(screen:PGdkScreen):PGdkVisual; cdecl; external gdklib;
+function gdk_screen_get_rgb_colormap(screen:PGdkScreen):PGdkColormap; cdecl; external gdklib;
+function gdk_screen_get_rgb_visual(screen:PGdkScreen):PGdkVisual; cdecl; external gdklib;
+function gdk_screen_get_root_window(screen:PGdkScreen):PGdkWindow; cdecl; external gdklib;
+function gdk_screen_get_display(screen:PGdkScreen):PGdkDisplay; cdecl; external gdklib;
+function gdk_screen_get_number(screen:PGdkScreen):gint; cdecl; external gdklib;
+function gdk_screen_get_window_at_pointer(screen:PGdkScreen; win_x:Pgint; win_y:Pgint):PGdkWindow; cdecl; external gdklib;
+function gdk_screen_get_width(screen:PGdkScreen):gint; cdecl; external gdklib;
+function gdk_screen_get_height(screen:PGdkScreen):gint; cdecl; external gdklib;
+function gdk_screen_get_width_mm(screen:PGdkScreen):gint; cdecl; external gdklib;
+function gdk_screen_get_height_mm(screen:PGdkScreen):gint; cdecl; external gdklib;
+procedure gdk_screen_close(screen:PGdkScreen); cdecl; external gdklib;
+function gdk_screen_list_visuals(screen:PGdkScreen):PGList; cdecl; external gdklib;
+function gdk_screen_get_toplevel_windows(screen:PGdkScreen):PGList; cdecl; external gdklib;
+function gdk_screen_get_n_monitors(screen:PGdkScreen):gint; cdecl; external gdklib;
+procedure gdk_screen_get_monitor_geometry(screen:PGdkScreen; monitor_num:gint; dest:PGdkRectangle); cdecl; external gdklib;
+function gdk_screen_get_monitor_at_point(screen:PGdkScreen; x:gint; y:gint):gint; cdecl; external gdklib;
+function gdk_screen_get_monitor_at_window(screen:PGdkScreen; window:PGdkWindow):gint; cdecl; external gdklib;
+procedure gdk_screen_broadcast_client_message(screen:PGdkScreen; event:PGdkEvent); cdecl; external gdklib;
+function gdk_get_default_screen:PGdkScreen; cdecl; external gdklib;
+function gdk_screen_get_setting(screen:PGdkScreen; name:Pgchar; value:PGValue):gboolean; cdecl; external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_SCREEN : GType;
+begin
+ GDK_TYPE_SCREEN:=0 //;gdk_screen_get_type;
+end;
+
+function GDK_SCREEN(anObject : Pointer) : PGdkScreen;
+begin
+ GDK_SCREEN:=PGdkScreen(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_SCREEN));
+end;
+
+function GDK_SCREEN_CLASS(klass : Pointer) : PGdkScreenClass;
+begin
+ GDK_SCREEN_CLASS:=PGdkScreenClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ GDK_TYPE_SCREEN));
+end;
+
+function GDK_IS_SCREEN(anObject : Pointer) : boolean;
+begin
+ GDK_IS_SCREEN:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_SCREEN);
+end;
+
+function GDK_IS_SCREEN_CLASS(klass : Pointer) : boolean;
+begin
+ GDK_IS_SCREEN_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_SCREEN);
+end;
+
+function GDK_SCREEN_GET_CLASS(obj : Pointer) : PGdkScreenClass;
+begin
+ GDK_SCREEN_GET_CLASS:=PGdkScreenClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ GDK_TYPE_SCREEN));
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkselection.inc b/packages/gtk2/src/gtk+/gdk/gdkselection.inc
new file mode 100644
index 0000000000..3f8bef3709
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkselection.inc
@@ -0,0 +1,150 @@
+// included by gdk2.pp
+
+{$IFDEF read_interface_types}
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+ PGdkSelection = ^TGdkSelection;
+ TGdkSelection = TGdkAtom;
+
+ PGdkTarget = ^TGdkTarget;
+ TGdkTarget = TGdkAtom;
+
+ PGdkSelectionType = ^TGdkSelectionType;
+ TGdkSelectionType = TGdkAtom;
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{ Predefined atoms relating to selections. In general, one will need to use
+ gdk_intern_atom
+ }
+function GDK_SELECTION_PRIMARY : TGdkAtom;
+function GDK_SELECTION_SECONDARY : TGdkAtom;
+function GDK_SELECTION_CLIPBOARD : TGdkAtom;
+function GDK_TARGET_BITMAP : TGdkAtom;
+function GDK_TARGET_COLORMAP : TGdkAtom;
+function GDK_TARGET_DRAWABLE : TGdkAtom;
+function GDK_TARGET_PIXMAP : TGdkAtom;
+function GDK_TARGET_STRING : TGdkAtom;
+function GDK_SELECTION_TYPE_ATOM : TGdkAtom;
+function GDK_SELECTION_TYPE_BITMAP : TGdkAtom;
+function GDK_SELECTION_TYPE_COLORMAP : TGdkAtom;
+function GDK_SELECTION_TYPE_DRAWABLE : TGdkAtom;
+function GDK_SELECTION_TYPE_INTEGER : TGdkAtom;
+function GDK_SELECTION_TYPE_PIXMAP : TGdkAtom;
+function GDK_SELECTION_TYPE_WINDOW : TGdkAtom;
+function GDK_SELECTION_TYPE_STRING : TGdkAtom;
+
+
+{ Selections }
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_selection_owner_set(owner:PGdkWindow; selection:TGdkAtom; time:guint32; send_event:gboolean):gboolean; cdecl; external gdklib;
+function gdk_selection_owner_get(selection:TGdkAtom):PGdkWindow; cdecl; external gdklib;
+{$endif}
+
+
+{ GDK_MULTIHEAD_SAFE }
+
+function gdk_selection_owner_set_for_display(display:PGdkDisplay; owner:PGdkWindow; selection:TGdkAtom; time:guint32; send_event:gboolean):gboolean; cdecl; external gdklib;
+function gdk_selection_owner_get_for_display(display:PGdkDisplay; selection:TGdkAtom):PGdkWindow; cdecl; external gdklib;
+procedure gdk_selection_convert(requestor:PGdkWindow; selection:TGdkAtom; target:TGdkAtom; time:guint32); cdecl; external gdklib;
+function gdk_selection_property_get(requestor:PGdkWindow; data:PPguchar; prop_type:PGdkAtom; prop_format:Pgint):gboolean; cdecl; external gdklib;
+{$ifndef GDK_MULTIHEAD_SAFE}
+
+procedure gdk_selection_send_notify(requestor:guint32; selection:TGdkAtom; target:TGdkAtom; _property:TGdkAtom; time:guint32); cdecl; external gdklib;
+{$endif}
+{ GDK_MULTIHEAD_SAFE }
+
+procedure gdk_selection_send_notify_for_display(display:PGdkDisplay; requestor:guint32; selection:TGdkAtom; target:TGdkAtom; _property:TGdkAtom;
+ time:guint32); cdecl; external gdklib;
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_SELECTION_PRIMARY : TGdkAtom;
+begin
+ GDK_SELECTION_PRIMARY:=_GDK_MAKE_ATOM(1);
+end;
+
+function GDK_SELECTION_SECONDARY : TGdkAtom;
+begin
+ GDK_SELECTION_SECONDARY:=_GDK_MAKE_ATOM(2);
+end;
+
+function GDK_SELECTION_CLIPBOARD : TGdkAtom;
+begin
+ GDK_SELECTION_CLIPBOARD:=_GDK_MAKE_ATOM(69);
+end;
+
+function GDK_TARGET_BITMAP : TGdkAtom;
+begin
+ GDK_TARGET_BITMAP:=_GDK_MAKE_ATOM(5);
+end;
+
+function GDK_TARGET_COLORMAP : TGdkAtom;
+begin
+ GDK_TARGET_COLORMAP:=_GDK_MAKE_ATOM(7);
+end;
+
+function GDK_TARGET_DRAWABLE : TGdkAtom;
+begin
+ GDK_TARGET_DRAWABLE:=_GDK_MAKE_ATOM(17);
+end;
+
+function GDK_TARGET_PIXMAP : TGdkAtom;
+begin
+ GDK_TARGET_PIXMAP:=_GDK_MAKE_ATOM(20);
+end;
+
+function GDK_TARGET_STRING : TGdkAtom;
+begin
+ GDK_TARGET_STRING:=_GDK_MAKE_ATOM(31);
+end;
+
+function GDK_SELECTION_TYPE_ATOM : TGdkAtom;
+begin
+ GDK_SELECTION_TYPE_ATOM:=_GDK_MAKE_ATOM(4);
+end;
+
+function GDK_SELECTION_TYPE_BITMAP : TGdkAtom;
+begin
+ GDK_SELECTION_TYPE_BITMAP:=_GDK_MAKE_ATOM(5);
+end;
+
+function GDK_SELECTION_TYPE_COLORMAP : TGdkAtom;
+begin
+ GDK_SELECTION_TYPE_COLORMAP:=_GDK_MAKE_ATOM(7);
+end;
+
+function GDK_SELECTION_TYPE_DRAWABLE : TGdkAtom;
+begin
+ GDK_SELECTION_TYPE_DRAWABLE:=_GDK_MAKE_ATOM(17);
+end;
+
+function GDK_SELECTION_TYPE_INTEGER : TGdkAtom;
+begin
+ GDK_SELECTION_TYPE_INTEGER:=_GDK_MAKE_ATOM(19);
+end;
+
+function GDK_SELECTION_TYPE_PIXMAP : TGdkAtom;
+begin
+ GDK_SELECTION_TYPE_PIXMAP:=_GDK_MAKE_ATOM(20);
+end;
+
+function GDK_SELECTION_TYPE_WINDOW : TGdkAtom;
+begin
+ GDK_SELECTION_TYPE_WINDOW:=_GDK_MAKE_ATOM(33);
+end;
+
+function GDK_SELECTION_TYPE_STRING : TGdkAtom;
+begin
+ GDK_SELECTION_TYPE_STRING:=_GDK_MAKE_ATOM(31);
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdktypes.inc b/packages/gtk2/src/gtk+/gdk/gdktypes.inc
new file mode 100644
index 0000000000..f0ca74d0f5
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdktypes.inc
@@ -0,0 +1,168 @@
+// included by gdk2.pp
+
+{$IFDEF read_forward_definitions}
+{ Forward declarations of commonly used types }
+ PGdkInputCondition = ^TGdkInputCondition;
+ TGdkInputCondition = longint; // see below for possible values
+
+ PGdkStatus = ^TGdkStatus;
+ TGdkStatus = longint;
+
+ TGdkPoint = record
+ x : gint;
+ y : gint;
+ end;
+ PGdkPoint = ^TGdkPoint;
+ PPGdkPoint = ^PGdkPoint;
+
+ PGdkSpan = ^TGdkSpan;
+
+{ Note that on some platforms the wchar_t type
+ is not the same as GdkWChar. For instance
+ on Win32, wchar_t is unsigned short.
+ }
+ PGdkWChar = ^TGdkWChar;
+ TGdkWChar = guint32;
+
+ PGdkSegment = ^TGdkSegment;
+ TGdkSegment = record
+ x1 : gint;
+ y1 : gint;
+ x2 : gint;
+ y2 : gint;
+ end;
+
+ PGdkRectangle = ^TGdkRectangle;
+ TGdkRectangle = record
+ x : gint;
+ y : gint;
+ width : gint;
+ height : gint;
+ end;
+
+ PGdkAtom = ^TGdkAtom;
+ // internal type
+ TGdkAtom = PtrUInt;
+
+ PGdkByteOrder = ^TGdkByteOrder;
+ TGdkByteOrder = (
+ GDK_LSB_FIRST,
+ GDK_MSB_FIRST
+ );
+
+{$ifdef GDK_NATIVE_WINDOW_POINTER}
+ PGdkNativeWindow = ^TGdkNativeWindow;
+ TGdkNativeWindow = gpointer;
+{$else}
+ PGdkNativeWindow = ^TGdkNativeWindow;
+ TGdkNativeWindow = guint32;
+{$endif}
+
+{ Types of modifiers. }
+{ The next few modifiers are used by XKB, so we skip to the theEnd }
+ PGdkModifierType = ^TGdkModifierType;
+ TGdkModifierType = gint;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ Type definitions for the basic structures. }
+
+{ We define specific numeric values for these constants,
+ since old application code may depend on them matching the X values
+ We don't actually depend on the matchup ourselves.
+ }
+
+ PGdkGrabStatus = ^TGdkGrabStatus;
+ TGdkGrabStatus = integer; // see below for possible values
+
+ TGdkInputFunction = procedure (data:gpointer; source:gint;
+ condition:TGdkInputCondition); cdecl;
+
+ TGdkDestroyNotify = procedure (data:gpointer); cdecl;
+
+ TGdkSpan = record
+ x : gint;
+ y : gint;
+ width : gint;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+{ some common magic values }
+const
+ GDK_CURRENT_TIME = 0;
+ GDK_PARENT_RELATIVE = 1;
+
+ GDK_OK = 0;
+ GDK_ERROR = -(1);
+ GDK_ERROR_PARAM = -(2);
+ GDK_ERROR_FILE = -(3);
+ GDK_ERROR_MEM = -(4);
+
+ 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 30;
+ GDK_MODIFIER_MASK = ord(GDK_RELEASE_MASK) or $1fff;
+
+ // values for TGdkInputCondition
+ GDK_INPUT_READ = 1 shl 0;
+ GDK_INPUT_WRITE = 1 shl 1;
+ GDK_INPUT_EXCEPTION = 1 shl 2;
+
+ // values for TGdkGrabStatus
+ GDK_GRAB_SUCCESS = 0;
+ GDK_GRAB_ALREADY_GRABBED = 1;
+ GDK_GRAB_INVALID_TIME = 2;
+ GDK_GRAB_NOT_VIEWABLE = 3;
+ GDK_GRAB_FROZEN = 4;
+
+
+function GDK_ATOM_TO_POINTER(atom : TGdkAtom) : Pointer;
+function GDK_POINTER_TO_ATOM(ptr : Pointer) : TGdkAtom;
+function _GDK_MAKE_ATOM(val : guint) : TGdkAtom;
+function GDK_NONE : TGdkAtom;
+
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_ATOM_TO_POINTER(atom : TGdkAtom) : pointer;
+begin
+ GDK_ATOM_TO_POINTER:=Pointer(PtrInt(atom));
+end;
+
+function GDK_POINTER_TO_ATOM(ptr : Pointer) : TGdkAtom;
+begin
+ GDK_POINTER_TO_ATOM:=TGdkAtom(PtrInt(ptr));
+end;
+
+function _GDK_MAKE_ATOM(val : guint) : TGdkAtom;
+begin
+ _GDK_MAKE_ATOM:=TGdkAtom(PtrInt(GUINT_TO_POINTER(val)));
+end;
+
+function GDK_NONE : TGdkAtom;
+begin
+ GDK_NONE:=_GDK_MAKE_ATOM(0);
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkvisual.inc b/packages/gtk2/src/gtk+/gdk/gdkvisual.inc
new file mode 100644
index 0000000000..774e691a15
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkvisual.inc
@@ -0,0 +1,136 @@
+// included by gdk2.pp
+{$IFDEF read_forward_definitions}
+{ Types of visuals.
+ StaticGray:
+ Grayscale:
+ StaticColor:
+ PseudoColor:
+ TrueColor:
+ DirectColor:
+ }
+ PGdkVisualType = ^TGdkVisualType;
+ TGdkVisualType = (
+ GDK_VISUAL_STATIC_GRAY,
+ GDK_VISUAL_GRAYSCALE,
+ GDK_VISUAL_STATIC_COLOR,
+ GDK_VISUAL_PSEUDO_COLOR,
+ GDK_VISUAL_TRUE_COLOR,
+ GDK_VISUAL_DIRECT_COLOR
+ );
+
+{ The visual type.
+ "type" is the type of visual this is (PseudoColor, TrueColor, etc).
+ "depth" is the bit depth of this visual.
+ "colormap_size" is the size of a colormap for this visual.
+ "bits_per_rgb" is the number of significant bits per red, green and blue.
+ The red, green and blue masks, shifts and precisions refer
+ to value needed to calculate pixel values in TrueColor and DirectColor
+ visuals. The "mask" is the significant bits within the pixel. The
+ "shift" is the number of bits left we must shift a primary for it
+ to be in position (according to the "mask"). "prec" refers to how
+ much precision the pixel value contains for a particular primary.
+ }
+ PGdkVisual = ^TGdkVisual;
+ TGdkVisual = record
+ parent_instance : TGObject;
+ 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;
+ screen : PGdkScreen;
+ end;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GDK_TYPE_VISUAL : GType;
+function GDK_VISUAL(anObject : Pointer) : PGdkVisual;
+function GDK_VISUAL_CLASS(klass : Pointer) : PGdkVisualClass;
+function GDK_IS_VISUAL(anObject : Pointer) : boolean;
+function GDK_IS_VISUAL_CLASS(klass : Pointer) : boolean;
+function GDK_VISUAL_GET_CLASS(obj : Pointer) : PGdkVisualClass;
+
+function gdk_visual_get_type:GType; cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_visual_get_best_depth:gint; cdecl; external gdklib;
+function gdk_visual_get_best_type:TGdkVisualType; cdecl; external gdklib;
+function gdk_visual_get_system:PGdkVisual; cdecl; external gdklib;
+function gdk_visual_get_best:PGdkVisual; cdecl; external gdklib;
+function gdk_visual_get_best_with_depth(depth:gint):PGdkVisual; cdecl; external gdklib;
+function gdk_visual_get_best_with_type(visual_type:TGdkVisualType):PGdkVisual; cdecl; external gdklib;
+function gdk_visual_get_best_with_both(depth:gint; visual_type:TGdkVisualType):PGdkVisual; cdecl; external gdklib;
+procedure gdk_query_depths(var depths:Pgint; count:Pgint); cdecl; external gdklib;
+procedure gdk_query_visual_types(var visual_types:PGdkVisualType; count:Pgint); cdecl; external gdklib;
+function gdk_list_visuals:PGList; cdecl; external gdklib;
+{$endif}
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+procedure gdk_visual_ref(v : PGdkVisual);
+procedure gdk_visual_unref(v : PGdkVisual);
+{$endif}
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_VISUAL : GType;
+begin
+ GDK_TYPE_VISUAL:=gdk_visual_get_type;
+end;
+
+function GDK_VISUAL(anObject : Pointer) : PGdkVisual;
+begin
+ GDK_VISUAL:=PGdkVisual(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_VISUAL));
+end;
+
+function GDK_VISUAL_CLASS(klass : Pointer) : PGdkVisualClass;
+begin
+ GDK_VISUAL_CLASS:=PGdkVisualClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ GDK_TYPE_VISUAL));
+end;
+
+function GDK_IS_VISUAL(anObject : Pointer) : boolean;
+begin
+ GDK_IS_VISUAL:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_VISUAL);
+end;
+
+function GDK_IS_VISUAL_CLASS(klass : Pointer) : boolean;
+begin
+ GDK_IS_VISUAL_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_VISUAL);
+end;
+
+function GDK_VISUAL_GET_CLASS(obj : Pointer) : PGdkVisualClass;
+begin
+ GDK_VISUAL_GET_CLASS:=PGdkVisualClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ GDK_TYPE_VISUAL));
+end;
+
+procedure gdk_visual_ref(v : PGdkVisual);
+begin
+ g_object_ref(v);
+end;
+
+procedure gdk_visual_unref(v : PGdkVisual);
+begin
+ g_object_unref(v);
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gdk/gdkwindow.inc b/packages/gtk2/src/gtk+/gdk/gdkwindow.inc
new file mode 100644
index 0000000000..64f75a82da
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gdk/gdkwindow.inc
@@ -0,0 +1,610 @@
+// included by gdk2.pp
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ Classes of windows.
+ InputOutput: Almost every window should be of this type. Such windows
+ receive events and are also displayed on screen.
+ InputOnly: Used only in special circumstances when events need to be
+ stolen from another window or windows. Input only windows
+ have no visible output, so they are handy for placing over
+ top of a group of windows in order to grab the events (or
+ filter the events) from those windows.
+ }
+ PGdkWindowClass = ^TGdkWindowClass;
+ TGdkWindowClass = (
+ GDK_INPUT_OUTPUT,
+ GDK_INPUT_ONLY
+ );
+
+{ Types of windows.
+ Root: There is only 1 root window and it is initialized
+ at startup. Creating a window of type GDK_WINDOW_ROOT
+ is an error.
+ Toplevel: Windows which interact with the window manager.
+ Child: Windows which are children of some other type of window.
+ (Any other type of window). Most windows are child windows.
+ Dialog: A special kind of toplevel window which interacts with
+ the window manager slightly differently than a regular
+ toplevel window. Dialog windows should be used for any
+ transient window.
+ Foreign: A window that actually belongs to another application
+ }
+ PGdkWindowType = ^TGdkWindowType;
+ TGdkWindowType = (
+ GDK_WINDOW_ROOT,
+ GDK_WINDOW_TOPLEVEL,
+ GDK_WINDOW_CHILD,
+ GDK_WINDOW_DIALOG,
+ GDK_WINDOW_TEMP,
+ GDK_WINDOW_FOREIGN
+ );
+
+{ Window attribute mask values.
+ GDK_WA_TITLE: The "title" field is valid.
+ GDK_WA_X: The "x" field is valid.
+ GDK_WA_Y: The "y" field is valid.
+ GDK_WA_CURSOR: The "cursor" field is valid.
+ GDK_WA_COLORMAP: The "colormap" field is valid.
+ GDK_WA_VISUAL: The "visual" field is valid.
+ }
+ PGdkWindowAttributesType = ^TGdkWindowAttributesType;
+ TGdkWindowAttributesType = longint; // see below for possible values
+
+{ Size restriction enumeration. }
+
+ PGdkWindowHints = ^TGdkWindowHints;
+ TGdkWindowHints = longint; // see below for possible values
+
+{ Window type hints.
+ These are hints for the window manager that indicate
+ what type of function the window has. The window manager
+ can use this when determining decoration and behaviour
+ of the window. The hint must be set before mapping the
+ window.
+
+ Normal: Normal toplevel window
+ Dialog: Dialog window
+ Menu: Window used to implement a menu.
+ Toolbar: Window used to implement toolbars.
+ }
+ PGdkWindowTypeHint = ^TGdkWindowTypeHint;
+ TGdkWindowTypeHint = (
+ GDK_WINDOW_TYPE_HINT_NORMAL,
+ GDK_WINDOW_TYPE_HINT_DIALOG,
+ GDK_WINDOW_TYPE_HINT_MENU,
+ GDK_WINDOW_TYPE_HINT_TOOLBAR
+ );
+
+{ The next two enumeration values current match the
+ Motif constants. If this is changed, the implementation
+ of gdk_window_set_decorations/gdk_window_set_functions
+ will need to change as well.
+ }
+
+ PGdkWMDecoration = ^TGdkWMDecoration;
+ TGdkWMDecoration = longint; // see below for possible values
+
+ PGdkWMFunction = ^TGdkWMFunction;
+ TGdkWMFunction = longint; // see below for possible values
+
+{ Currently, these are the same values numerically as in the
+ X protocol. If you change that, gdkwindow-x11.c/gdk_window_set_geometry_hints()
+ will need fixing.
+ }
+ PGdkGravity = ^TGdkGravity;
+ TGdkGravity = integer; // see below for possible values
+
+ PGdkWindowEdge = ^TGdkWindowEdge;
+ TGdkWindowEdge = (
+ GDK_WINDOW_EDGE_NORTH_WEST,
+ GDK_WINDOW_EDGE_NORTH,
+ GDK_WINDOW_EDGE_NORTH_EAST,
+ GDK_WINDOW_EDGE_WEST,
+ GDK_WINDOW_EDGE_EAST,
+ GDK_WINDOW_EDGE_SOUTH_WEST,
+ GDK_WINDOW_EDGE_SOUTH,
+ GDK_WINDOW_EDGE_SOUTH_EAST
+ );
+
+ PGdkWindowAttr = ^TGdkWindowAttr;
+ TGdkWindowAttr = record
+ title : Pgchar;
+ event_mask : gint;
+ x : gint;
+ y : gint;
+ width : gint;
+ height : gint;
+ wclass : TGdkWindowClass;
+ visual : PGdkVisual;
+ colormap : PGdkColormap;
+ window_type : TGdkWindowType;
+ cursor : PGdkCursor;
+ wmclass_name : Pgchar;
+ wmclass_class : Pgchar;
+ 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;
+ win_gravity : TGdkGravity;
+ end;
+
+{ unused for now }
+ PGdkPointerHooks = ^TGdkPointerHooks;
+ TGdkPointerHooks = record
+ get_pointer : function (window:PGdkWindow; x:Pgint; y:Pgint; mask:PGdkModifierType):PGdkWindow; cdecl;
+ window_at_pointer : function (screen:PGdkScreen; win_x:Pgint; win_y:Pgint):PGdkWindow; cdecl;
+ end;
+
+{ window-system-specific delegate anObject }
+ PGdkWindowObject = ^TGdkWindowObject;
+ TGdkWindowObject = record
+ parent_instance : TGdkDrawable;
+ impl : PGdkDrawable;
+ parent : PGdkWindowObject;
+ user_data : gpointer;
+ x : gint;
+ y : gint;
+ extension_events : gint;
+ filters : PGList;
+ children : PGList;
+ bg_color : TGdkColor;
+ bg_pixmap : PGdkPixmap;
+ paint_stack : PGSList;
+ update_area : PGdkRegion;
+ update_freeze_count : guint;
+ window_type : guint8;
+ depth : guint8;
+ resize_count : guint8;
+ state : TGdkWindowState;
+ flag0 : word; { this is a bit combined flag, combining the following:
+ guint guffaw_gravity : 1;
+ guint input_only : 1;
+ guint modal_hint : 1;
+ guint destroyed : 2;
+ use the following functions to access them:
+ GdkWindowObject_guffaw_gravity
+ GdkWindowObject_set_guffaw_gravity
+ GdkWindowObject_input_only
+ GdkWindowObject_set_input_only
+ GdkWindowObject_modal_hint
+ GdkWindowObject_set_modal_hint
+ GdkWindowObject_destroyed
+ GdkWindowObject_set_destroyed
+ }
+ event_mask : TGdkEventMask;
+ end;
+
+ PGdkWindowObjectClass = ^TGdkWindowObjectClass;
+ TGdkWindowObjectClass = record
+ parent_class : TGdkDrawableClass;
+ end;
+
+ gdk_window_invalidate_maybe_recurse_child_func =
+ function (para1:PGdkWindow; para2:gpointer):gboolean;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ // values for TGdkWindowAttributesType
+ 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;
+
+ // values for TGdkWindowHints
+ 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;
+ GDK_HINT_WIN_GRAVITY = 1 shl 6;
+ GDK_HINT_USER_POS = 1 shl 7;
+ GDK_HINT_USER_SIZE = 1 shl 8;
+
+ // values for TGdkWMDecoration
+ 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;
+
+ // values for TGdkWMFunction
+ 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;
+
+ // values for TGdkGravity
+ GDK_GRAVITY_NORTH_WEST = 1;
+ GDK_GRAVITY_NORTH = 2;
+ GDK_GRAVITY_NORTH_EAST = 3;
+ GDK_GRAVITY_WEST = 4;
+ GDK_GRAVITY_CENTER = 5;
+ GDK_GRAVITY_EAST = 6;
+ GDK_GRAVITY_SOUTH_WEST = 7;
+ GDK_GRAVITY_SOUTH = 8;
+ GDK_GRAVITY_SOUTH_EAST = 9;
+ GDK_GRAVITY_STATIC = 10;
+
+
+function GDK_TYPE_WINDOW : GType;
+function GDK_WINDOW(anObject : Pointer) : PGdkWindow;
+function GDK_WINDOW_CLASS(klass : Pointer) : PGdkWindowObjectClass;
+function GDK_IS_WINDOW(anObject : Pointer) : boolean;
+function GDK_IS_WINDOW_CLASS(klass : Pointer) : boolean;
+function GDK_WINDOW_GET_CLASS(obj : Pointer) : PGdkWindowObjectClass;
+
+function GDK_WINDOW_OBJECT(anObject : Pointer) : PGdkWindowObject;
+
+
+// constants and functions to access the bits in a TGdkWindowObject
+const
+ bm_TGdkWindowObject_guffaw_gravity = $1;
+ bp_TGdkWindowObject_guffaw_gravity = 0;
+ bm_TGdkWindowObject_input_only = $2;
+ bp_TGdkWindowObject_input_only = 1;
+ bm_TGdkWindowObject_modal_hint = $4;
+ bp_TGdkWindowObject_modal_hint = 2;
+ bm_TGdkWindowObject_destroyed = $18;
+ bp_TGdkWindowObject_destroyed = 3;
+
+function GdkWindowObject_guffaw_gravity(var a : TGdkWindowObject) : guint;
+procedure GdkWindowObject_set_guffaw_gravity(var a : TGdkWindowObject; __guffaw_gravity : guint);
+function GdkWindowObject_input_only(var a : TGdkWindowObject) : guint;
+procedure GdkWindowObject_set_input_only(var a : TGdkWindowObject; __input_only : guint);
+function GdkWindowObject_modal_hint(var a : TGdkWindowObject) : guint;
+procedure GdkWindowObject_set_modal_hint(var a : TGdkWindowObject; __modal_hint : guint);
+function GdkWindowObject_destroyed(var a : TGdkWindowObject) : guint;
+procedure GdkWindowObject_set_destroyed(var a : TGdkWindowObject; __destroyed : guint);
+
+
+{ Windows }
+
+function gdk_window_object_get_type:GType; cdecl; external gdklib;
+function gdk_window_new(parent:PGdkWindow; attributes:PGdkWindowAttr; attributes_mask:gint):PGdkWindow; cdecl; external gdklib;
+procedure gdk_window_destroy(window:PGdkWindow); cdecl; external gdklib;
+function gdk_window_get_window_type(window:PGdkWindow):TGdkWindowType; cdecl; external gdklib;
+function gdk_window_at_pointer(win_x:Pgint; win_y:Pgint):PGdkWindow; cdecl; external gdklib;
+procedure gdk_window_show(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_hide(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_withdraw(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_show_unraised(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_move(window:PGdkWindow; x:gint; y:gint); cdecl; external gdklib;
+procedure gdk_window_resize(window:PGdkWindow; width:gint; height:gint); cdecl; external gdklib;
+procedure gdk_window_move_resize(window:PGdkWindow; x:gint; y:gint; width:gint; height:gint); cdecl; external gdklib;
+procedure gdk_window_reparent(window:PGdkWindow; new_parent:PGdkWindow; x:gint; y:gint); cdecl; external gdklib;
+procedure gdk_window_clear(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_clear_area(window:PGdkWindow; x:gint; y:gint; width:gint; height:gint); cdecl; external gdklib;
+procedure gdk_window_clear_area_e(window:PGdkWindow; x:gint; y:gint; width:gint; height:gint); cdecl; external gdklib;
+procedure gdk_window_raise(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_lower(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_focus(window:PGdkWindow; timestamp:guint32); cdecl; external gdklib;
+procedure gdk_window_set_user_data(window:PGdkWindow; user_data:gpointer); cdecl; external gdklib;
+procedure gdk_window_set_override_redirect(window:PGdkWindow; override_redirect:gboolean); cdecl; external gdklib;
+procedure gdk_window_add_filter(window:PGdkWindow; _function:TGdkFilterFunc; data:gpointer); cdecl; external gdklib;
+procedure gdk_window_remove_filter(window:PGdkWindow; _function:TGdkFilterFunc; data:gpointer); cdecl; external gdklib;
+procedure gdk_window_scroll(window:PGdkWindow; dx:gint; dy:gint); cdecl; external gdklib;
+
+{
+ This allows for making shaped (partially transparent) windows
+ - cool feature, needed for Drag and Drag for example.
+ The shape_mask can be the mask
+ from gdk_pixmap_create_from_xpm. Stefan Wille
+ }
+procedure gdk_window_shape_combine_mask(window:PGdkWindow; mask:PGdkBitmap; x:gint; y:gint); cdecl; external gdklib;
+procedure gdk_window_shape_combine_region(window:PGdkWindow; shape_region:PGdkRegion; offset_x:gint; offset_y:gint); cdecl; external gdklib;
+
+{
+ This routine allows you to quickly take the shapes of all the child windows
+ of a window and use their shapes as the shape mask for this window - useful
+ for container windows that dont want to look like a big box
+
+ - Raster
+ }
+procedure gdk_window_set_child_shapes(window:PGdkWindow); cdecl; external gdklib;
+
+{
+ This routine allows you to merge (ie ADD) child shapes to your
+ own window's shape keeping its current shape and ADDING the child
+ shapes to it.
+
+ - Raster
+ }
+procedure gdk_window_merge_child_shapes(window:PGdkWindow); cdecl; external gdklib;
+
+{
+ Check if a window has been shown, and whether all its
+ parents up to a toplevel have been shown, respectively.
+ Note that a window that is_viewable below is not necessarily
+ viewable in the X sense.
+ }
+function gdk_window_is_visible(window:PGdkWindow):gboolean; cdecl; external gdklib;
+function gdk_window_is_viewable(window:PGdkWindow):gboolean; cdecl; external gdklib;
+function gdk_window_get_state(window:PGdkWindow):TGdkWindowState; cdecl; external gdklib;
+
+{ Set static bit gravity on the parent, and static
+ window gravity on all children.
+ }
+function gdk_window_set_static_gravities(window:PGdkWindow; use_static:gboolean):gboolean; cdecl; external gdklib;
+
+
+{ Functions to create/lookup windows from their native equivalents }
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_window_foreign_new(anid:TGdkNativeWindow):PGdkWindow; cdecl; external gdklib;
+function gdk_window_lookup(anid:TGdkNativeWindow):PGdkWindow; cdecl; external gdklib;
+{$endif}
+
+function gdk_window_foreign_new_for_display(display:PGdkDisplay; anid:TGdkNativeWindow):PGdkWindow; cdecl; external gdklib;
+function gdk_window_lookup_for_display(display:PGdkDisplay; anid:TGdkNativeWindow):PGdkWindow; cdecl; external gdklib;
+
+
+{ GdkWindow }
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+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 gdklib;
+{$endif}
+procedure gdk_window_set_type_hint(window:PGdkWindow; hint:TGdkWindowTypeHint); cdecl; external gdklib;
+procedure gdk_window_set_modal_hint(window:PGdkWindow; modal:gboolean); cdecl; external gdklib;
+procedure gdk_window_set_geometry_hints(window:PGdkWindow; geometry:PGdkGeometry; geom_mask:TGdkWindowHints); cdecl; external gdklib;
+procedure gdk_set_sm_client_id(sm_client_id:Pgchar); cdecl; external gdklib;
+procedure gdk_window_begin_paint_rect(window:PGdkWindow; rectangle:PGdkRectangle); cdecl; external gdklib;
+procedure gdk_window_begin_paint_region(window:PGdkWindow; region:PGdkRegion); cdecl; external gdklib;
+procedure gdk_window_end_paint(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_set_title(window:PGdkWindow; title:Pgchar); cdecl; external gdklib;
+procedure gdk_window_set_role(window:PGdkWindow; role:Pgchar); cdecl; external gdklib;
+procedure gdk_window_set_transient_for(window:PGdkWindow; parent:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_set_background(window:PGdkWindow; color:PGdkColor); cdecl; external gdklib;
+procedure gdk_window_set_back_pixmap(window:PGdkWindow; pixmap:PGdkPixmap; parent_relative:gboolean); cdecl; external gdklib;
+procedure gdk_window_set_cursor(window:PGdkWindow; cursor:PGdkCursor); cdecl; external gdklib;
+procedure gdk_window_get_user_data(window:PGdkWindow; data:gpointer); cdecl; external gdklib;
+procedure gdk_window_get_geometry(window:PGdkWindow; x:Pgint; y:Pgint; width:Pgint; height:Pgint;
+ depth:Pgint); cdecl; external gdklib;
+procedure gdk_window_get_position(window:PGdkWindow; x:Pgint; y:Pgint); cdecl; external gdklib;
+function gdk_window_get_origin(window:PGdkWindow; x:Pgint; y:Pgint):gint; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+function gdk_window_get_deskrelative_origin(window:PGdkWindow; x:Pgint; y:Pgint):gboolean; cdecl; external gdklib;
+{$endif}
+
+procedure gdk_window_get_root_origin(window:PGdkWindow; x:Pgint; y:Pgint); cdecl; external gdklib;
+procedure gdk_window_get_frame_extents(window:PGdkWindow; rect:PGdkRectangle); cdecl; external gdklib;
+function gdk_window_get_pointer(window:PGdkWindow; x:Pgint; y:Pgint; mask:PGdkModifierType):PGdkWindow; cdecl; external gdklib;
+function gdk_window_get_parent(window:PGdkWindow):PGdkWindow; cdecl; external gdklib;
+function gdk_window_get_toplevel(window:PGdkWindow):PGdkWindow; cdecl; external gdklib;
+function gdk_window_get_children(window:PGdkWindow):PGList; cdecl; external gdklib;
+function gdk_window_peek_children(window:PGdkWindow):PGList; cdecl; external gdklib;
+function gdk_window_get_events(window:PGdkWindow):TGdkEventMask; cdecl; external gdklib;
+procedure gdk_window_set_events(window:PGdkWindow; event_mask:TGdkEventMask); cdecl; external gdklib;
+procedure gdk_window_set_icon_list(window:PGdkWindow; pixbufs:PGList); cdecl; external gdklib;
+procedure gdk_window_set_icon(window:PGdkWindow; icon_window:PGdkWindow; pixmap:PGdkPixmap; mask:PGdkBitmap); cdecl; external gdklib;
+procedure gdk_window_set_icon_name(window:PGdkWindow; name:Pgchar); cdecl; external gdklib;
+procedure gdk_window_set_group(window:PGdkWindow; leader:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_set_decorations(window:PGdkWindow; decorations:TGdkWMDecoration); cdecl; external gdklib;
+function gdk_window_get_decorations(window:PGdkWindow; decorations:PGdkWMDecoration):gboolean; cdecl; external gdklib;
+procedure gdk_window_set_functions(window:PGdkWindow; functions:TGdkWMFunction); cdecl; external gdklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_window_get_toplevels:PGList; cdecl; external gdklib;
+// Already defined: procedure gdk_set_sm_client_id(sm_client_id:Pgchar); cdecl; external gdklib;
+{$endif}
+
+procedure gdk_window_iconify(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_deiconify(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_stick(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_unstick(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_maximize(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_unmaximize(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_register_dnd(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_begin_resize_drag(window:PGdkWindow; edge:TGdkWindowEdge; button:gint; root_x:gint; root_y:gint;
+ timestamp:guint32); cdecl; external gdklib;
+procedure gdk_window_begin_move_drag(window:PGdkWindow; button:gint; root_x:gint; root_y:gint; timestamp:guint32); cdecl; external gdklib;
+
+
+{ Interface for dirty-region queueing }
+
+procedure gdk_window_invalidate_rect(window:PGdkWindow; rect:PGdkRectangle; invalidate_children:gboolean); cdecl; external gdklib;
+procedure gdk_window_invalidate_region(window:PGdkWindow; region:PGdkRegion; invalidate_children:gboolean); cdecl; external gdklib;
+procedure gdk_window_invalidate_maybe_recurse(window:PGdkWindow; region:PGdkRegion; child_func:gdk_window_invalidate_maybe_recurse_child_func; user_data:gpointer); cdecl; external gdklib;
+function gdk_window_get_update_area(window:PGdkWindow):PGdkRegion; cdecl; external gdklib;
+procedure gdk_window_freeze_updates(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_thaw_updates(window:PGdkWindow); cdecl; external gdklib;
+procedure gdk_window_process_all_updates; cdecl; external gdklib;
+procedure gdk_window_process_updates(window:PGdkWindow; update_children:gboolean); cdecl; external gdklib;
+
+
+{ Enable/disable flicker, so you can tell if your code is inefficient. }
+
+procedure gdk_window_set_debug_updates(setting:gboolean); cdecl; external gdklib;
+procedure gdk_window_constrain_size(geometry:PGdkGeometry; flags:guint; width:gint; height:gint; new_width:Pgint;
+ new_height:Pgint); cdecl; external gdklib;
+procedure gdk_window_get_internal_paint_info(window:PGdkWindow; var real_drawable:PGdkDrawable; x_offset:Pgint; y_offset:Pgint); cdecl; external gdklib;
+function gdk_set_pointer_hooks(new_hooks:PGdkPointerHooks):PGdkPointerHooks; cdecl; external gdklib;
+function gdk_get_default_root_window:PGdkWindow; cdecl; external gdklib;
+
+{$ifndef GDK_DISABLE_DEPRECATED}
+function GDK_ROOT_PARENT : PGdkWindow;
+
+procedure gdk_window_get_size(drawable:PGdkDrawable; width:Pgint; height:Pgint);
+function gdk_window_get_type(window:PGdkWindow):TGdkWindowType;
+function gdk_window_get_colormap(drawable:PGdkDrawable):PGdkColormap;
+procedure gdk_window_set_colormap(drawable:PGdkDrawable; colormap:PGdkColormap);
+function gdk_window_get_visual(drawable:PGdkDrawable):PGdkVisual;
+function gdk_window_ref(drawable:PGdkDrawable):PGdkDrawable;
+procedure gdk_window_unref(drawable:PGdkDrawable);
+
+procedure gdk_window_copy_area(drawable:PGdkDrawable; gc:PGdkGC;
+ x,y: gint; source_drawable:PGdkDrawable; source_x,source_y: gint;
+ width,height : gint);
+{$endif}
+{ GDK_DISABLE_DEPRECATED }
+
+{$endif read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GDK_TYPE_WINDOW : GType;
+begin
+ GDK_TYPE_WINDOW:=gdk_window_object_get_type;
+end;
+
+function GDK_WINDOW(anObject : Pointer) : PGdkWindow;
+begin
+ GDK_WINDOW:=PGdkWindow(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_WINDOW));
+end;
+
+function GDK_WINDOW_CLASS(klass : Pointer) : PGdkWindowObjectClass;
+begin
+ GDK_WINDOW_CLASS:=PGdkWindowObjectClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ GDK_TYPE_WINDOW));
+end;
+
+function GDK_IS_WINDOW(anObject : Pointer) : boolean;
+begin
+ GDK_IS_WINDOW:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_WINDOW);
+end;
+
+function GDK_IS_WINDOW_CLASS(klass : Pointer) : boolean;
+begin
+ GDK_IS_WINDOW_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_WINDOW);
+end;
+
+function GDK_WINDOW_GET_CLASS(obj : Pointer) : PGdkWindowObjectClass;
+begin
+ GDK_WINDOW_GET_CLASS:=PGdkWindowObjectClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ GDK_TYPE_WINDOW));
+end;
+
+function GDK_WINDOW_OBJECT(anObject : Pointer) : PGdkWindowObject;
+begin
+ GDK_WINDOW_OBJECT:=PGdkWindowObject(GDK_WINDOW(anObject));
+end;
+
+function GdkWindowObject_guffaw_gravity(var a : TGdkWindowObject) : guint;
+begin
+ GdkWindowObject_guffaw_gravity:=
+ (a.flag0 and bm_TGdkWindowObject_guffaw_gravity)
+ shr bp_TGdkWindowObject_guffaw_gravity;
+end;
+
+procedure GdkWindowObject_set_guffaw_gravity(var a : TGdkWindowObject; __guffaw_gravity : guint);
+begin
+ a.flag0:=
+ a.flag0 or ((__guffaw_gravity shl bp_TGdkWindowObject_guffaw_gravity)
+ and bm_TGdkWindowObject_guffaw_gravity);
+end;
+
+function GdkWindowObject_input_only(var a : TGdkWindowObject) : guint;
+begin
+ GdkWindowObject_input_only:=
+ (a.flag0 and bm_TGdkWindowObject_input_only) shr bp_TGdkWindowObject_input_only;
+end;
+
+procedure GdkWindowObject_set_input_only(var a : TGdkWindowObject; __input_only : guint);
+begin
+ a.flag0:=a.flag0 or ((__input_only shl bp_TGdkWindowObject_input_only)
+ and bm_TGdkWindowObject_input_only);
+end;
+
+function GdkWindowObject_modal_hint(var a : TGdkWindowObject) : guint;
+begin
+ GdkWindowObject_modal_hint:=(a.flag0 and bm_TGdkWindowObject_modal_hint)
+ shr bp_TGdkWindowObject_modal_hint;
+end;
+
+procedure GdkWindowObject_set_modal_hint(var a : TGdkWindowObject; __modal_hint : guint);
+begin
+ a.flag0:=a.flag0 or ((__modal_hint shl bp_TGdkWindowObject_modal_hint)
+ and bm_TGdkWindowObject_modal_hint);
+end;
+
+function GdkWindowObject_destroyed(var a : TGdkWindowObject) : guint;
+begin
+ GdkWindowObject_destroyed:=(a.flag0 and bm_TGdkWindowObject_destroyed)
+ shr bp_TGdkWindowObject_destroyed;
+end;
+
+procedure GdkWindowObject_set_destroyed(var a : TGdkWindowObject; __destroyed : guint);
+begin
+ a.flag0:=a.flag0 or ((__destroyed shl bp_TGdkWindowObject_destroyed)
+ and bm_TGdkWindowObject_destroyed);
+end;
+
+function GDK_ROOT_PARENT : PGdkWindow;
+begin
+ GDK_ROOT_PARENT:=gdk_get_default_root_window;
+end;
+
+procedure gdk_window_get_size(drawable:PGdkDrawable; width:Pgint; height:Pgint);
+begin
+ gdk_drawable_get_size(drawable,width,height);
+end;
+
+function gdk_window_get_type(window:PGdkWindow):TGdkWindowType;
+begin
+ gdk_window_get_type:=gdk_window_get_window_type(window);
+end;
+
+function gdk_window_get_colormap(drawable:PGdkDrawable):PGdkColormap;
+begin
+ gdk_window_get_colormap:=gdk_drawable_get_colormap(drawable);
+end;
+
+procedure gdk_window_set_colormap(drawable:PGdkDrawable; colormap:PGdkColormap);
+begin
+ gdk_drawable_set_colormap(drawable,colormap);
+end;
+
+function gdk_window_get_visual(drawable:PGdkDrawable):PGdkVisual;
+begin
+ gdk_window_get_visual:=gdk_drawable_get_visual(drawable);
+end;
+
+function gdk_window_ref(drawable:PGdkDrawable):PGdkDrawable;
+begin
+ gdk_window_ref:=GDK_DRAWABLE(g_object_ref(G_OBJECT(drawable)));
+end;
+
+procedure gdk_window_unref(drawable:PGdkDrawable);
+begin
+ g_object_unref(G_OBJECT(drawable));
+end;
+
+procedure gdk_window_copy_area(drawable:PGdkDrawable; gc:PGdkGC;
+ x,y: gint; source_drawable:PGdkDrawable; source_x,source_y: gint;
+ width,height : gint);
+begin
+ gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,
+ x,y,width,height);
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/gtk+/gtk/fnmatch.inc b/packages/gtk2/src/gtk+/gtk/fnmatch.inc
new file mode 100644
index 0000000000..f360e92462
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/fnmatch.inc
@@ -0,0 +1,51 @@
+// included gtk2.pas
+
+{$IFDEF read_interface_rest}
+
+function __P(protos : longint) : longint;
+
+{ We #undef these before defining them because some losing systems
+ (HP-UX A.08.07 for example) define these in <unistd.h>. }
+{$undef FNM_PATHNAME}
+{$undef FNM_NOESCAPE}
+{$undef FNM_PERIOD}
+{ Bits set in the FLAGS argument to `fnmatch'. }
+{ No wildcard can ever match `/'. }
+
+const
+ FNM_PATHNAME = 1 shl 0;
+{ Backslashes don't quote special chars. }
+ FNM_NOESCAPE = 1 shl 1;
+{ Leading `.' is matched only explicitly. }
+ FNM_PERIOD = 1 shl 2;
+
+{ Preferred GNU name. }
+const
+ FNM_FILE_NAME = FNM_PATHNAME;
+{ Ignore `/...' after a match. }
+ FNM_LEADING_DIR = 1 shl 3;
+{ Compare without regard to case. }
+ FNM_CASEFOLD = 1 shl 4;
+
+{ Value returned by `fnmatch' if STRING does not match PATTERN. }
+const
+ FNM_NOMATCH = 1;
+
+{ Match STRING against the filename pattern PATTERN,
+ returning zero if it matches, FNM_NOMATCH if not. }
+function fnmatch(__pattern: char; __string: char;
+ __flags: gint): gint; cdecl; external gtklib;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function __P(protos : longint) : longint;
+begin
+ __P:=protos;
+end;
+{$ENDIF read_implementation}
+
+// included gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtk2.pas b/packages/gtk2/src/gtk+/gtk/gtk2.pas
new file mode 100644
index 0000000000..23abcb59b0
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtk2.pas
@@ -0,0 +1,162 @@
+{ GTK - The GIMP Toolkit
+ Copyright (C) 2005 Mattias Gaertner, Olaf Leidinger
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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 gtk2; // keep unit name lowercase for kylix
+
+// default GTK2_8
+{$define GTK2_8}
+
+{ Smartlinking has problems on powerpc-linux because of commandline length, disable
+ it for now }
+{$ifdef powerpc}
+ {$ifdef linux}
+ {$smartlink off}
+ {$endif}
+{$endif}
+
+{$H+}
+{$IFDEF FPC}
+ {$mode objfpc}
+{$ENDIF}
+{$IFDEF VER140}
+ {$DEFINE KYLIX}
+{$ENDIF}
+
+{$IFDEF GTK2_2}
+{$DEFINE HasGTK2_0}
+{$DEFINE HasGTK2_2}
+{$ENDIF}
+
+{$IFDEF GTK2_4}
+{$DEFINE HasGTK2_0}
+{$DEFINE HasGTK2_2}
+{$DEFINE HasGTK2_4}
+{$ENDIF}
+
+{$IFDEF GTK2_6}
+{$DEFINE HasGTK2_0}
+{$DEFINE HasGTK2_2}
+{$DEFINE HasGTK2_4}
+{$DEFINE HasGTK2_6}
+{$ENDIF}
+
+{$IFDEF GTK2_8}
+{$DEFINE HasGTK2_0}
+{$DEFINE HasGTK2_2}
+{$DEFINE HasGTK2_4}
+{$DEFINE HasGTK2_6}
+{$DEFINE HasGTK2_8}
+{$ENDIF}
+
+interface
+
+uses
+ glib2, atk, pango, gdk2pixbuf, gdk2;
+
+const
+// OS dependent defines
+{$ifdef win32}
+ {$DEFINE GTK_WINDOWING_WIN32}
+ gtklib = 'libgtk-win32-2.0-0.dll';
+ {$IFDEF FPC}
+ {$ifndef NO_SMART_LINK}
+ {$smartlink on}
+ {$endif}
+ {$ENDIF}
+{$else}
+ {$IFDEF KYLIX}
+ gtklib = 'libgtk-x11-2.0.so';
+ {$ELSE}
+ {$ifdef darwin}
+ gtklib = 'gtk-x11-2.0';
+ {$linklib gtk-x11-2.0}
+ {$linklib gdk-x11-2.0}
+ {$linklib pango-1.0.0}
+ {$linklib glib-2.0.0}
+ {$linklib gobject-2.0.0}
+ {$linklib gdk_pixbuf-2.0.0}
+ {$linklib atk-1.0.0}
+ {$else}
+ {$ifdef UseCustomLibs}
+ gtklib = '';
+ {$else}
+ gtklib = 'libgtk-x11-2.0.so';
+ {$endif}
+ {$endif}
+ {$ENDIF}
+{$endif}
+
+
+{$IFDEF KYLIX}
+Type
+ PPPchar = PPPgchar;
+{$ENDIF}
+
+
+{$IFNDEF KYLIX}
+ {$PACKRECORDS C}
+{$ELSE}
+ {$ALIGN 4}
+ {$WEAKPACKAGEUNIT}
+ {$WARNINGS OFF}
+{$ENDIF}
+
+const
+ GTK_MAX_COMPOSE_LEN = 7;
+
+type
+{$DEFINE read_forward_definitions}
+{$include gtkincludes.inc}
+{$UNDEF read_forward_definitions}
+
+{$DEFINE read_interface_types}
+{$include gtkincludes.inc}
+{$UNDEF read_interface_types}
+
+{$DEFINE read_interface_rest}
+{$include gtkincludes.inc}
+{$UNDEF read_interface_rest}
+
+implementation
+
+uses
+ SysUtils;
+
+{$IFDEF FPC}
+{ There is a bug in the compiler. If an external variable is not used, it will
+ create code, that can be relocated by the linker.
+ So, use them in this hidden dummy procedure.
+}
+procedure CheckUnusedVariable; [Public];
+begin
+ if (gtk_major_version<>0) then ;
+ if (gtk_minor_version<>0) then ;
+ if (gtk_micro_version<>0) then ;
+ if (gtk_binary_age<>0) then ;
+ if (gtk_interface_age<>0) then ;
+ if (ord(gtk_text_attr_appearance_type)<>0) then ;
+end;
+{$ENDIF}
+
+
+// call implementation parts of header files
+{$DEFINE read_implementation}
+{$include gtkincludes.inc}
+{$UNDEF read_implementation}
+
+end.
diff --git a/packages/gtk2/src/gtk+/gtk/gtkaccelgroup.inc b/packages/gtk2/src/gtk+/gtk/gtkaccelgroup.inc
new file mode 100644
index 0000000000..893929074f
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkaccelgroup.inc
@@ -0,0 +1,167 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ --- accel flags --- }
+{ display in GtkAccelLabel? }
+{ is it removable? }
+ PGtkAccelFlags = ^TGtkAccelFlags;
+ TGtkAccelFlags = longint;
+
+{ --- typedefs & structures --- }
+ PGtkAccelGroup = ^TGtkAccelGroup;
+ PGtkAccelGroupEntry = ^TGtkAccelGroupEntry;
+
+ TGtkAccelGroupActivate = function (accel_group:PGtkAccelGroup; acceleratable:PGObject; keyval:guint; modifier:TGdkModifierType):gboolean; cdecl;
+ TGtkAccelGroup = record
+ parent : TGObject;
+ lock_count : guint;
+ modifier_mask : TGdkModifierType;
+ acceleratables : PGSList;
+ n_accels : guint;
+ priv_accels : PGtkAccelGroupEntry;
+ end;
+
+{ Padding for future expansion }
+ PGtkAccelGroupClass = ^TGtkAccelGroupClass;
+ TGtkAccelGroupClass = record
+ parent_class : TGObjectClass;
+ accel_changed : procedure (accel_group:PGtkAccelGroup; keyval:guint; modifier:TGdkModifierType; accel_closure:PGClosure); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+ PGtkAccelKey = ^TGtkAccelKey;
+ TGtkAccelKey = record
+ accel_key : guint;
+ accel_mods : TGdkModifierType;
+ flag0 : word;
+ end;
+
+ TGtkAccelGroupEntry = record
+ key : TGtkAccelKey;
+ closure : PGClosure;
+ accel_path_quark : TGQuark;
+ end;
+
+ Tgtk_accel_group_find_func = function (key:PGtkAccelKey; closure:PGClosure; data:gpointer):gboolean; cdecl;
+ TGtkAccelGroupFindFunc = Tgtk_accel_group_find_func;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_ACCEL_VISIBLE = 1 shl 0;
+ GTK_ACCEL_LOCKED = 1 shl 1;
+ GTK_ACCEL_MASK = $07;
+
+ bm_TGtkAccelKey_accel_flags = $FFFF;
+ bp_TGtkAccelKey_accel_flags = 0;
+
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_accel_group_ref(AccelGroup: PGtkAccelGroup);
+procedure gtk_accel_group_unref(AccelGroup: PGtkAccelGroup);
+{$endif}
+
+{ --- type macros --- }
+function GTK_TYPE_ACCEL_GROUP : GType;
+function GTK_ACCEL_GROUP(anObject: pointer) : PGtkAccelGroup;
+function GTK_ACCEL_GROUP_CLASS(klass: pointer) : PGtkAccelGroupClass;
+function GTK_IS_ACCEL_GROUP(anObject: pointer) : boolean;
+function GTK_IS_ACCEL_GROUP_CLASS(klass: pointer) : boolean;
+function GTK_ACCEL_GROUP_GET_CLASS(obj: pointer) : PGtkAccelGroupClass;
+
+function accel_flags(var a : TGtkAccelKey) : guint;
+procedure set_accel_flags(var a : TGtkAccelKey; __accel_flags : guint);
+{ -- Accelerator Groups --- }
+
+function gtk_accel_group_get_type:GType; cdecl; external gtklib;
+function gtk_accel_group_new:PGtkAccelGroup; cdecl; external gtklib;
+procedure gtk_accel_group_lock(accel_group:PGtkAccelGroup); cdecl; external gtklib;
+procedure gtk_accel_group_unlock(accel_group:PGtkAccelGroup); cdecl; external gtklib;
+procedure gtk_accel_group_connect(accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType; accel_flags:TGtkAccelFlags; closure:PGClosure); cdecl; external gtklib;
+procedure gtk_accel_group_connect_by_path(accel_group:PGtkAccelGroup; accel_path:Pgchar; closure:PGClosure); cdecl; external gtklib;
+function gtk_accel_group_disconnect(accel_group:PGtkAccelGroup; closure:PGClosure):gboolean; cdecl; external gtklib;
+function gtk_accel_group_disconnect_key(accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType):gboolean; cdecl; external gtklib;
+{ --- GtkActivatable glue --- }
+procedure _gtk_accel_group_attach(accel_group:PGtkAccelGroup; anObject:PGObject); cdecl; external gtklib;
+procedure _gtk_accel_group_detach(accel_group:PGtkAccelGroup; anObject:PGObject); cdecl; external gtklib;
+function gtk_accel_groups_activate(anObject:PGObject; accel_key:guint; accel_mods:TGdkModifierType):gboolean; cdecl; external gtklib;
+function gtk_accel_groups_from_object(anObject:PGObject):PGSList; cdecl; external gtklib;
+function gtk_accel_group_find(accel_group:PGtkAccelGroup; find_func:Tgtk_accel_group_find_func; data:gpointer):PGtkAccelKey; cdecl; external gtklib;
+function gtk_accel_group_from_accel_closure(closure:PGClosure):PGtkAccelGroup; cdecl; external gtklib;
+{ --- Accelerators--- }
+function gtk_accelerator_valid(keyval:guint; modifiers:TGdkModifierType):gboolean; cdecl; external gtklib;
+procedure gtk_accelerator_parse(accelerator:Pgchar; accelerator_key:Pguint; accelerator_mods:PGdkModifierType); cdecl; external gtklib;
+function gtk_accelerator_name(accelerator_key:guint; accelerator_mods:TGdkModifierType):Pgchar; cdecl; external gtklib;
+procedure gtk_accelerator_set_default_mod_mask(default_mod_mask:TGdkModifierType); cdecl; external gtklib;
+function gtk_accelerator_get_default_mod_mask:guint; cdecl; external gtklib;
+
+{ --- internal --- }
+function gtk_accel_group_query(accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType; n_entries:Pguint):PGtkAccelGroupEntry; cdecl; external gtklib;
+procedure _gtk_accel_group_reconnect(accel_group:PGtkAccelGroup; accel_path_quark:TGQuark); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ACCEL_GROUP : GType;
+begin
+ GTK_TYPE_ACCEL_GROUP:=gtk_accel_group_get_type;
+end;
+
+function GTK_ACCEL_GROUP(anObject: pointer) : PGtkAccelGroup;
+begin
+ GTK_ACCEL_GROUP:=PGtkAccelGroup(G_TYPE_CHECK_INSTANCE_CAST(anObject,GTK_TYPE_ACCEL_GROUP));
+end;
+
+function GTK_ACCEL_GROUP_CLASS(klass: pointer) : PGtkAccelGroupClass;
+begin
+ GTK_ACCEL_GROUP_CLASS:=PGtkAccelGroupClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_ACCEL_GROUP));
+end;
+
+function GTK_IS_ACCEL_GROUP(anObject: pointer) : boolean;
+begin
+ GTK_IS_ACCEL_GROUP:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GTK_TYPE_ACCEL_GROUP);
+end;
+
+function GTK_IS_ACCEL_GROUP_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ACCEL_GROUP_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_ACCEL_GROUP);
+end;
+
+function GTK_ACCEL_GROUP_GET_CLASS(obj: pointer) : PGtkAccelGroupClass;
+begin
+ GTK_ACCEL_GROUP_GET_CLASS:=PGtkAccelGroupClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_ACCEL_GROUP));
+end;
+
+function accel_flags(var a : TGtkAccelKey) : guint;
+begin
+ accel_flags:=(a.flag0 and bm_TGtkAccelKey_accel_flags) shr bp_TGtkAccelKey_accel_flags;
+end;
+
+procedure set_accel_flags(var a : TGtkAccelKey; __accel_flags : guint);
+begin
+ a.flag0:=a.flag0 or ((__accel_flags shl bp_TGtkAccelKey_accel_flags) and bm_TGtkAccelKey_accel_flags);
+end;
+
+procedure gtk_accel_group_ref(AccelGroup: PGtkAccelGroup);
+begin
+ g_object_ref(AccelGroup);
+end;
+
+procedure gtk_accel_group_unref(AccelGroup: PGtkAccelGroup);
+begin
+ g_object_unref(AccelGroup);
+end;
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkaccellabel.inc b/packages/gtk2/src/gtk+/gtk/gtkaccellabel.inc
new file mode 100644
index 0000000000..90778a57be
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkaccellabel.inc
@@ -0,0 +1,124 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkAccelLabel = ^TGtkAccelLabel;
+ TGtkAccelLabel = record
+ _label : TGtkLabel;
+ queue_id : guint;
+ accel_padding : guint;
+ accel_widget : PGtkWidget;
+ accel_closure : PGClosure;
+ accel_group : PGtkAccelGroup;
+ accel_string : Pgchar;
+ accel_string_width : guint16;
+ end;
+
+{ Padding for future expansion }
+ 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;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+const
+ bm_TGtkAccelLabelClass_latin1_to_char = $1;
+ bp_TGtkAccelLabelClass_latin1_to_char = 0;
+
+function GTK_TYPE_ACCEL_LABEL : GType;
+function GTK_ACCEL_LABEL(obj: pointer) : PGtkAccelLabel;
+function GTK_ACCEL_LABEL_CLASS(klass: pointer) : PGtkAccelLabelClass;
+function GTK_IS_ACCEL_LABEL(obj: pointer) : boolean;
+function GTK_IS_ACCEL_LABEL_CLASS(klass: pointer) : boolean;
+function GTK_ACCEL_LABEL_GET_CLASS(obj: pointer) : 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_get_type:TGtkType; cdecl; external gtklib;
+function gtk_accel_label_new(_string:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_accel_label_get_accel_widget(accel_label:PGtkAccelLabel):PGtkWidget; cdecl; external gtklib;
+function gtk_accel_label_get_accel_width(accel_label:PGtkAccelLabel):guint; cdecl; external gtklib;
+procedure gtk_accel_label_set_accel_widget(accel_label:PGtkAccelLabel; accel_widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_accel_label_set_accel_closure(accel_label:PGtkAccelLabel; accel_closure:PGClosure); cdecl; external gtklib;
+function gtk_accel_label_refetch(accel_label:PGtkAccelLabel):gboolean; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_accel_label_accelerator_width(accel_label:PGtkAccelLabel):guint;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ACCEL_LABEL : GType;
+begin
+ GTK_TYPE_ACCEL_LABEL:=gtk_accel_label_get_type;
+end;
+
+function GTK_ACCEL_LABEL(obj: pointer) : PGtkAccelLabel;
+begin
+ GTK_ACCEL_LABEL:=PGtkAccelLabel(GTK_CHECK_CAST(obj,GTK_TYPE_ACCEL_LABEL));
+end;
+
+function GTK_ACCEL_LABEL_CLASS(klass: pointer) : PGtkAccelLabelClass;
+begin
+ GTK_ACCEL_LABEL_CLASS:=PGtkAccelLabelClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_ACCEL_LABEL));
+end;
+
+function GTK_IS_ACCEL_LABEL(obj: pointer) : boolean;
+begin
+ GTK_IS_ACCEL_LABEL:=GTK_CHECK_TYPE(obj,GTK_TYPE_ACCEL_LABEL);
+end;
+
+function GTK_IS_ACCEL_LABEL_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ACCEL_LABEL_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_ACCEL_LABEL);
+end;
+
+function GTK_ACCEL_LABEL_GET_CLASS(obj: pointer) : PGtkAccelLabelClass;
+begin
+ GTK_ACCEL_LABEL_GET_CLASS:=PGtkAccelLabelClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_ACCEL_LABEL));
+end;
+
+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_accel_label_accelerator_width(accel_label:PGtkAccelLabel):guint;
+begin
+ gtk_accel_label_accelerator_width:=gtk_accel_label_get_accel_width(accel_label);
+end;
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkaccelmap.inc b/packages/gtk2/src/gtk+/gtk/gtkaccelmap.inc
new file mode 100644
index 0000000000..10a22e2182
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkaccelmap.inc
@@ -0,0 +1,36 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ --- notifier --- }
+ TGtkAccelMapForeach = procedure (data:gpointer; accel_path:Pgchar; accel_key:guint; accel_mods:TGdkModifierType; changed:gboolean); cdecl;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{ --- public API --- }
+procedure gtk_accel_map_add_entry(accel_path:Pgchar; accel_key:guint; accel_mods:TGdkModifierType); cdecl; external gtklib;
+function gtk_accel_map_lookup_entry(accel_path:Pgchar; key:PGtkAccelKey):gboolean; cdecl; external gtklib;
+function gtk_accel_map_change_entry(accel_path:Pgchar; accel_key:guint; accel_mods:TGdkModifierType; replace:gboolean):gboolean; cdecl; external gtklib;
+procedure gtk_accel_map_load(file_name:Pgchar); cdecl; external gtklib;
+procedure gtk_accel_map_save(file_name:Pgchar); cdecl; external gtklib;
+procedure gtk_accel_map_foreach(data:gpointer; foreach_func:TGtkAccelMapForeach); cdecl; external gtklib;
+procedure gtk_accel_map_load_fd(fd:gint); cdecl; external gtklib;
+procedure gtk_accel_map_load_scanner(scanner:PGScanner); cdecl; external gtklib;
+procedure gtk_accel_map_save_fd(fd:gint); cdecl; external gtklib;
+{ --- filter functions --- }
+procedure gtk_accel_map_add_filter(filter_pattern:Pgchar); cdecl; external gtklib;
+procedure gtk_accel_map_foreach_unfiltered(data:gpointer; foreach_func:TGtkAccelMapForeach); cdecl; external gtklib;
+{ --- internal API --- }
+procedure _gtk_accel_map_init; cdecl; external gtklib;
+procedure _gtk_accel_map_add_group(accel_path:Pgchar; accel_group:PGtkAccelGroup); cdecl; external gtklib;
+procedure _gtk_accel_map_remove_group(accel_path:Pgchar; accel_group:PGtkAccelGroup); cdecl; external gtklib;
+function _gtk_accel_path_is_valid(accel_path:Pgchar):gboolean; cdecl; external gtklib;
+{$endif read_interface_rest}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkaccessible.inc b/packages/gtk2/src/gtk+/gtk/gtkaccessible.inc
new file mode 100644
index 0000000000..870ad446c9
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkaccessible.inc
@@ -0,0 +1,87 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{
+ This anObject is a thin wrapper, in the GTK+ namespace, for AtkObject
+ }
+{
+ The GtkWidget whose properties and features are exported via this
+ accessible instance.
+ }
+ PGtkAccessible = ^TGtkAccessible;
+ TGtkAccessible = record
+ parent : TAtkObject;
+ widget : PGtkWidget;
+ end;
+
+{ Padding for future expansion }
+ PGtkAccessibleClass = ^TGtkAccessibleClass;
+ TGtkAccessibleClass = record
+ parent_class : TAtkObjectClass;
+ connect_widget_destroyed : procedure (accessible:PGtkAccessible); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_ACCESSIBLE : GType;
+function GTK_ACCESSIBLE(obj: pointer) : PGtkAccessible;
+function GTK_ACCESSIBLE_CLASS(klass: pointer) : PGtkAccessibleClass;
+function GTK_IS_ACCESSIBLE(obj: pointer) : boolean;
+function GTK_IS_ACCESSIBLE_CLASS(klass: pointer) : boolean;
+function GTK_ACCESSIBLE_GET_CLASS(obj: pointer) : PGtkAccessibleClass;
+
+
+
+function gtk_accessible_get_type:TGtkType; cdecl; external gtklib;
+
+
+procedure gtk_accessible_connect_widget_destroyed(accessible:PGtkAccessible); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ACCESSIBLE : GType;
+begin
+ GTK_TYPE_ACCESSIBLE:=gtk_accessible_get_type;
+end;
+
+function GTK_ACCESSIBLE(obj: pointer) : PGtkAccessible;
+begin
+ GTK_ACCESSIBLE:=PGtkAccessible(GTK_CHECK_CAST(obj,GTK_TYPE_ACCESSIBLE));
+end;
+
+function GTK_ACCESSIBLE_CLASS(klass: pointer) : PGtkAccessibleClass;
+begin
+ GTK_ACCESSIBLE_CLASS:=PGtkAccessibleClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_ACCESSIBLE));
+end;
+
+function GTK_IS_ACCESSIBLE(obj: pointer) : boolean;
+begin
+ GTK_IS_ACCESSIBLE:=GTK_CHECK_TYPE(obj,GTK_TYPE_ACCESSIBLE);
+end;
+
+function GTK_IS_ACCESSIBLE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ACCESSIBLE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_ACCESSIBLE);
+end;
+
+function GTK_ACCESSIBLE_GET_CLASS(obj: pointer) : PGtkAccessibleClass;
+begin
+ GTK_ACCESSIBLE_GET_CLASS:=PGtkAccessibleClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_ACCESSIBLE));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkaction.inc b/packages/gtk2/src/gtk+/gtk/gtkaction.inc
new file mode 100644
index 0000000000..fa5e37c6e2
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkaction.inc
@@ -0,0 +1,115 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkActionPrivate = pointer;
+
+ PGtkAction = ^TGtkAction;
+ TGtkAction = record
+ _object : TGObject;
+ private_data : PGtkActionPrivate;
+ end;
+
+{ activation signal }
+{ widget creation routines (not signals) }
+{ Padding for future expansion }
+ PGtkActionClass = ^TGtkActionClass;
+ TGtkActionClass = record
+ parent_class : TGObjectClass;
+ activate : procedure (action:PGtkAction);cdecl;
+ menu_item_type : GType;
+ toolbar_item_type : GType;
+ create_menu_item : function (action:PGtkAction):PGtkWidget;
+ create_tool_item : function (action:PGtkAction):PGtkWidget;
+ connect_proxy : procedure (action:PGtkAction; proxy:PGtkWidget);
+ disconnect_proxy : procedure (action:PGtkAction; proxy:PGtkWidget);
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ _gtk_reserved4 : procedure ;
+ end;
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+
+function GTK_TYPE_ACTION : GType;
+
+function GTK_ACTION(obj : pointer) : PGtkAction;
+
+function GTK_ACTION_CLASS(klass : pointer) : PGtkActionClass;
+
+function GTK_IS_ACTION(obj : pointer) : gboolean;
+
+function GTK_IS_ACTION_CLASS(klass : pointer) : gboolean;
+
+function GTK_ACTION_GET_CLASS(obj : pointer) : PGtkActionClass;
+
+
+
+function gtk_action_get_type:GType;cdecl;external gtklib name 'gtk_action_get_type';
+function gtk_action_new(name:Pgchar; szLabel:Pgchar; tooltip:Pgchar; stock_id:Pgchar):PGtkAction;cdecl;external gtklib name 'gtk_action_new';
+
+function gtk_action_get_name(action:PGtkAction):Pgchar;cdecl;external gtklib name 'gtk_action_get_name';
+function gtk_action_is_sensitive(action:PGtkAction):gboolean;cdecl;external gtklib name 'gtk_action_is_sensitive';
+function gtk_action_get_sensitive(action:PGtkAction):gboolean;cdecl;external gtklib name 'gtk_action_get_sensitive';
+function gtk_action_is_visible(action:PGtkAction):gboolean;cdecl;external gtklib name 'gtk_action_is_visible';
+function gtk_action_get_visible(action:PGtkAction):gboolean;cdecl;external gtklib name 'gtk_action_get_visible';
+procedure gtk_action_activate(action:PGtkAction);cdecl;external gtklib name 'gtk_action_activate';
+function gtk_action_create_icon(action:PGtkAction; icon_size:TGtkIconSize):PGtkWidget;cdecl;external gtklib name 'gtk_action_create_icon';
+function gtk_action_create_menu_item(action:PGtkAction):PGtkWidget;cdecl;external gtklib name 'gtk_action_create_menu_item';
+function gtk_action_create_tool_item(action:PGtkAction):PGtkWidget;cdecl;external gtklib name 'gtk_action_create_tool_item';
+procedure gtk_action_connect_proxy(action:PGtkAction; proxy:PGtkWidget);cdecl;external gtklib name 'gtk_action_connect_proxy';
+procedure gtk_action_disconnect_proxy(action:PGtkAction; proxy:PGtkWidget);cdecl;external gtklib name 'gtk_action_disconnect_proxy';
+function gtk_action_get_proxies(action:PGtkAction):PGSList;cdecl;external gtklib name 'gtk_action_get_proxies';
+procedure gtk_action_connect_accelerator(action:PGtkAction);cdecl;external gtklib name 'gtk_action_connect_accelerator';
+procedure gtk_action_disconnect_accelerator(action:PGtkAction);cdecl;external gtklib name 'gtk_action_disconnect_accelerator';
+
+{ protected ... for use by child actions }
+procedure gtk_action_block_activate_from(action:PGtkAction; proxy:PGtkWidget);cdecl;external gtklib name 'gtk_action_block_activate_from';
+procedure gtk_action_unblock_activate_from(action:PGtkAction; proxy:PGtkWidget);cdecl;external gtklib name 'gtk_action_unblock_activate_from';
+procedure _gtk_action_emit_activate(action:PGtkAction);cdecl;external gtklib name '_gtk_action_emit_activate';
+
+{ protected ... for use by action groups }
+
+procedure gtk_action_set_accel_path(action:PGtkAction; accel_path:Pgchar);cdecl;external gtklib name 'gtk_action_set_accel_path';
+procedure gtk_action_set_accel_group(action:PGtkAction; accel_group:PGtkAccelGroup);cdecl;external gtklib name 'gtk_action_set_accel_group';
+{$endif read_interface_rest}
+
+
+{$ifdef read_implementation}
+function GTK_TYPE_ACTION : GType;
+begin
+ GTK_TYPE_ACTION:=gtk_action_get_type;
+end;
+
+function GTK_ACTION(obj : pointer) : PGtkAction;
+begin
+ GTK_ACTION:=PGtkAction(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_ACTION));
+end;
+
+function GTK_ACTION_CLASS(klass : pointer) : PGtkActionClass;
+begin
+ GTK_ACTION_CLASS:=G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_ACTION);
+end;
+
+function GTK_IS_ACTION(obj : pointer) : gboolean;
+begin
+ GTK_IS_ACTION:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_ACTION);
+end;
+
+function GTK_IS_ACTION_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_ACTION_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_ACTION);
+end;
+
+function GTK_ACTION_GET_CLASS(obj : pointer) : PGtkActionClass;
+begin
+ GTK_ACTION_GET_CLASS:=PGtkActionClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_ACTION));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkactiongroup.inc b/packages/gtk2/src/gtk+/gtk/gtkactiongroup.inc
new file mode 100644
index 0000000000..d24ac523f8
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkactiongroup.inc
@@ -0,0 +1,141 @@
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkActionGroupPrivate = pointer;
+
+ PGtkActionGroup = ^TGtkActionGroup;
+ TGtkActionGroup = record
+ parent : TGObject;
+ private_data : PGtkActionGroupPrivate;
+ end;
+
+{ Padding for future expansion }
+ PGtkActionGroupClass = ^TGtkActionGroupClass;
+ TGtkActionGroupClass = record
+ parent_class : TGObjectClass;
+ get_action : function (action_group:PGtkActionGroup; action_name:Pgchar):PGtkAction;cdecl;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ _gtk_reserved4 : procedure ;
+ end;
+
+ (* prefixed pgchar types with sz due name conflict with label *)
+ PGtkActionEntry = ^TGtkActionEntry;
+ TGtkActionEntry = record
+ szName : Pgchar;
+ szStock_id : Pgchar;
+ szLabel : Pgchar;
+ szAccelerator : Pgchar;
+ szTooltip : Pgchar;
+ callback : TGCallback;
+ end;
+
+ PGtkToggleActionEntry = ^TGtkToggleActionEntry;
+ TGtkToggleActionEntry = record
+ szName : Pgchar;
+ szStock_id : Pgchar;
+ szLabel : Pgchar;
+ szAccelerator : Pgchar;
+ szTooltip : Pgchar;
+ callback : TGCallback;
+ is_active : gboolean;
+ end;
+
+ PGtkRadioActionEntry = ^TGtkRadioActionEntry;
+ TGtkRadioActionEntry = record
+ szName : Pgchar;
+ szStock_id : Pgchar;
+ szLabel : Pgchar;
+ szAccelerator : Pgchar;
+ szTooltip : Pgchar;
+ value : gint;
+ end;
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_ACTION_GROUP : GType;
+function GTK_ACTION_GROUP(obj : pointer) : PGtkActionGroup;
+function GTK_ACTION_GROUP_CLASS(vtable : pointer) : PGtkActionGroupClass;
+function GTK_IS_ACTION_GROUP(obj : pointer) : gboolean;
+function GTK_IS_ACTION_GROUP_CLASS(vtable : pointer) : gboolean;
+function GTK_ACTION_GROUP_GET_CLASS(inst : pointer) : PGtkActionGroupClass;
+
+
+
+function gtk_action_group_get_type:GType;cdecl;external gtklib name 'gtk_action_group_get_type';
+
+function gtk_action_group_new(name:Pgchar):PGtkActionGroup;cdecl;external gtklib name 'gtk_action_group_new';
+
+function gtk_action_group_get_name(action_group:PGtkActionGroup):Pgchar;cdecl;external gtklib name 'gtk_action_group_get_name';
+function gtk_action_group_get_sensitive(action_group:PGtkActionGroup):gboolean;cdecl;external gtklib name 'gtk_action_group_get_sensitive';
+procedure gtk_action_group_set_sensitive(action_group:PGtkActionGroup; sensitive:gboolean);cdecl;external gtklib name 'gtk_action_group_set_sensitive';
+function gtk_action_group_get_visible(action_group:PGtkActionGroup):gboolean;cdecl;external gtklib name 'gtk_action_group_get_visible';
+procedure gtk_action_group_set_visible(action_group:PGtkActionGroup; visible:gboolean);cdecl;external gtklib name 'gtk_action_group_set_visible';
+
+function gtk_action_group_get_action(action_group:PGtkActionGroup; action_name:Pgchar):PGtkAction;cdecl;external gtklib name 'gtk_action_group_get_action';
+function gtk_action_group_list_actions(action_group:PGtkActionGroup):PGList;cdecl;external gtklib name 'gtk_action_group_list_actions';
+procedure gtk_action_group_add_action(action_group:PGtkActionGroup; action:PGtkAction);cdecl;external gtklib name 'gtk_action_group_add_action';
+
+procedure gtk_action_group_add_action_with_accel(action_group:PGtkActionGroup; action:PGtkAction; accelerator:Pgchar);cdecl;external gtklib name 'gtk_action_group_add_action_with_accel';
+procedure gtk_action_group_remove_action(action_group:PGtkActionGroup; action:PGtkAction);cdecl;external gtklib name 'gtk_action_group_remove_action';
+procedure gtk_action_group_add_actions(action_group:PGtkActionGroup; entries:PGtkActionEntry; n_entries:guint; user_data:gpointer);cdecl;external gtklib name 'gtk_action_group_add_actions';
+procedure gtk_action_group_add_toggle_actions(action_group:PGtkActionGroup; entries:PGtkToggleActionEntry; n_entries:guint; user_data:gpointer);cdecl;external gtklib name 'gtk_action_group_add_toggle_actions';
+procedure gtk_action_group_add_radio_actions(action_group:PGtkActionGroup; entries:PGtkRadioActionEntry; n_entries:guint; value:gint; on_change:TGCallback;
+ user_data:gpointer);cdecl;external gtklib name 'gtk_action_group_add_radio_actions';
+procedure gtk_action_group_add_actions_full(action_group:PGtkActionGroup; entries:PGtkActionEntry; n_entries:guint; user_data:gpointer; destroy:TGDestroyNotify);cdecl;external gtklib name 'gtk_action_group_add_actions_full';
+procedure gtk_action_group_add_toggle_actions_full(action_group:PGtkActionGroup; entries:PGtkToggleActionEntry; n_entries:guint; user_data:gpointer; destroy:TGDestroyNotify);cdecl;external gtklib name 'gtk_action_group_add_toggle_actions_full';
+procedure gtk_action_group_add_radio_actions_full(action_group:PGtkActionGroup; entries:PGtkRadioActionEntry; n_entries:guint; value:gint; on_change:TGCallback;
+ user_data:gpointer; destroy:TGDestroyNotify);cdecl;external gtklib name 'gtk_action_group_add_radio_actions_full';
+
+procedure gtk_action_group_set_translate_func(action_group:PGtkActionGroup; func:TGtkTranslateFunc; data:gpointer; notify:TGtkDestroyNotify);cdecl;external gtklib name 'gtk_action_group_set_translate_func';
+
+procedure gtk_action_group_set_translation_domain(action_group:PGtkActionGroup; domain:Pgchar);cdecl;external gtklib name 'gtk_action_group_set_translation_domain';
+
+
+{ Protected for use by GtkAction }
+procedure _gtk_action_group_emit_connect_proxy(action_group:PGtkActionGroup; action:PGtkAction; proxy:PGtkWidget);cdecl;external gtklib name '_gtk_action_group_emit_connect_proxy';
+procedure _gtk_action_group_emit_disconnect_proxy(action_group:PGtkActionGroup; action:PGtkAction; proxy:PGtkWidget);cdecl;external gtklib name '_gtk_action_group_emit_disconnect_proxy';
+procedure _gtk_action_group_emit_pre_activate(action_group:PGtkActionGroup; action:PGtkAction);cdecl;external gtklib name '_gtk_action_group_emit_pre_activate';
+procedure _gtk_action_group_emit_post_activate(action_group:PGtkActionGroup; action:PGtkAction);cdecl;external gtklib name '_gtk_action_group_emit_post_activate';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GTK_TYPE_ACTION_GROUP : GType;
+begin
+ GTK_TYPE_ACTION_GROUP:=gtk_action_group_get_type;
+end;
+
+function GTK_ACTION_GROUP(obj : pointer) : PGtkActionGroup;
+begin
+ GTK_ACTION_GROUP:=PGtkActionGroup(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_ACTION_GROUP));
+end;
+
+function GTK_ACTION_GROUP_CLASS(vtable : pointer) : PGtkActionGroupClass;
+begin
+ GTK_ACTION_GROUP_CLASS:=PGtkActionGroupClass(G_TYPE_CHECK_CLASS_CAST(vtable,GTK_TYPE_ACTION_GROUP));
+end;
+
+function GTK_IS_ACTION_GROUP(obj : pointer) : gboolean;
+begin
+ GTK_IS_ACTION_GROUP:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_ACTION_GROUP);
+end;
+
+function GTK_IS_ACTION_GROUP_CLASS(vtable : pointer) : gboolean;
+begin
+ GTK_IS_ACTION_GROUP_CLASS:=G_TYPE_CHECK_CLASS_TYPE(vtable,GTK_TYPE_ACTION_GROUP);
+end;
+
+function GTK_ACTION_GROUP_GET_CLASS(inst : pointer) : PGtkActionGroupClass;
+begin
+ GTK_ACTION_GROUP_GET_CLASS:=PGtkActionGroupClass(G_TYPE_INSTANCE_GET_CLASS(inst,GTK_TYPE_ACTION_GROUP));
+end;
+
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkadjustment.inc b/packages/gtk2/src/gtk+/gtk/gtkadjustment.inc
new file mode 100644
index 0000000000..f32cbc0dc1
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkadjustment.inc
@@ -0,0 +1,90 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkAdjustment = ^TGtkAdjustment;
+ TGtkAdjustment = record
+ parent_instance : TGtkObject;
+ lower : gdouble;
+ upper : gdouble;
+ value : gdouble;
+ step_increment : gdouble;
+ page_increment : gdouble;
+ page_size : gdouble;
+ end;
+
+{ Padding for future expansion }
+ PGtkAdjustmentClass = ^TGtkAdjustmentClass;
+ TGtkAdjustmentClass = record
+ parent_class : TGtkObjectClass;
+ changed : procedure (adjustment:PGtkAdjustment); cdecl;
+ value_changed : procedure (adjustment:PGtkAdjustment); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_ADJUSTMENT : GType;
+function GTK_ADJUSTMENT(obj: pointer) : PGtkAdjustment;
+function GTK_ADJUSTMENT_CLASS(klass: pointer) : PGtkAdjustmentClass;
+function GTK_IS_ADJUSTMENT(obj: pointer) : boolean;
+function GTK_IS_ADJUSTMENT_CLASS(klass: pointer) : boolean;
+function GTK_ADJUSTMENT_GET_CLASS(obj: pointer) : PGtkAdjustmentClass;
+
+
+function gtk_adjustment_get_type:TGtkType; cdecl; external gtklib;
+function gtk_adjustment_new(value:gdouble; lower:gdouble; upper:gdouble; step_increment:gdouble; page_increment:gdouble;
+ page_size:gdouble):PGtkObject; cdecl; external gtklib;
+procedure gtk_adjustment_changed(adjustment:PGtkAdjustment); cdecl; external gtklib;
+procedure gtk_adjustment_value_changed(adjustment:PGtkAdjustment); cdecl; external gtklib;
+procedure gtk_adjustment_clamp_page(adjustment:PGtkAdjustment; lower:gdouble; upper:gdouble); cdecl; external gtklib;
+function gtk_adjustment_get_value(adjustment:PGtkAdjustment):gdouble; cdecl; external gtklib;
+procedure gtk_adjustment_set_value(adjustment:PGtkAdjustment; value:gdouble); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ADJUSTMENT : GType;
+begin
+ GTK_TYPE_ADJUSTMENT:=gtk_adjustment_get_type;
+end;
+
+function GTK_ADJUSTMENT(obj: pointer) : PGtkAdjustment;
+begin
+ GTK_ADJUSTMENT:=PGtkAdjustment(GTK_CHECK_CAST(obj,GTK_TYPE_ADJUSTMENT));
+end;
+
+function GTK_ADJUSTMENT_CLASS(klass: pointer) : PGtkAdjustmentClass;
+begin
+ GTK_ADJUSTMENT_CLASS:=PGtkAdjustmentClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_ADJUSTMENT));
+end;
+
+function GTK_IS_ADJUSTMENT(obj: pointer) : boolean;
+begin
+ GTK_IS_ADJUSTMENT:=GTK_CHECK_TYPE(obj,GTK_TYPE_ADJUSTMENT);
+end;
+
+function GTK_IS_ADJUSTMENT_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ADJUSTMENT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_ADJUSTMENT);
+end;
+
+function GTK_ADJUSTMENT_GET_CLASS(obj: pointer) : PGtkAdjustmentClass;
+begin
+ GTK_ADJUSTMENT_GET_CLASS:=PGtkAdjustmentClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_ADJUSTMENT));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkalignment.inc b/packages/gtk2/src/gtk+/gtk/gtkalignment.inc
new file mode 100644
index 0000000000..7fc6e0cd23
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkalignment.inc
@@ -0,0 +1,76 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkAlignment = ^TGtkAlignment;
+ TGtkAlignment = record
+ bin : TGtkBin;
+ xalign : gfloat;
+ yalign : gfloat;
+ xscale : gfloat;
+ yscale : gfloat;
+ end;
+
+ PGtkAlignmentClass = ^TGtkAlignmentClass;
+ TGtkAlignmentClass = record
+ parent_class : TGtkBinClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_ALIGNMENT : GType;
+function GTK_ALIGNMENT(obj: pointer) : PGtkAlignment;
+function GTK_ALIGNMENT_CLASS(klass: pointer) : PGtkAlignmentClass;
+function GTK_IS_ALIGNMENT(obj: pointer) : boolean;
+function GTK_IS_ALIGNMENT_CLASS(klass: pointer) : boolean;
+function GTK_ALIGNMENT_GET_CLASS(obj: pointer) : PGtkAlignmentClass;
+
+
+function gtk_alignment_get_type:TGtkType; cdecl; external gtklib;
+function gtk_alignment_new(xalign:gfloat; yalign:gfloat; xscale:gfloat; yscale:gfloat):PGtkWidget; cdecl; external gtklib;
+procedure gtk_alignment_set(alignment:PGtkAlignment; xalign:gfloat; yalign:gfloat; xscale:gfloat; yscale:gfloat); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ALIGNMENT : GType;
+begin
+ GTK_TYPE_ALIGNMENT:=gtk_alignment_get_type;
+end;
+
+function GTK_ALIGNMENT(obj: pointer) : PGtkAlignment;
+begin
+ GTK_ALIGNMENT:=PGtkAlignment(GTK_CHECK_CAST(obj,GTK_TYPE_ALIGNMENT));
+end;
+
+function GTK_ALIGNMENT_CLASS(klass: pointer) : PGtkAlignmentClass;
+begin
+ GTK_ALIGNMENT_CLASS:=PGtkAlignmentClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_ALIGNMENT));
+end;
+
+function GTK_IS_ALIGNMENT(obj: pointer) : boolean;
+begin
+ GTK_IS_ALIGNMENT:=GTK_CHECK_TYPE(obj,GTK_TYPE_ALIGNMENT);
+end;
+
+function GTK_IS_ALIGNMENT_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ALIGNMENT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_ALIGNMENT);
+end;
+
+function GTK_ALIGNMENT_GET_CLASS(obj: pointer) : PGtkAlignmentClass;
+begin
+ GTK_ALIGNMENT_GET_CLASS:=PGtkAlignmentClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_ALIGNMENT));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkarrow.inc b/packages/gtk2/src/gtk+/gtk/gtkarrow.inc
new file mode 100644
index 0000000000..1e283c2c46
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkarrow.inc
@@ -0,0 +1,74 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkArrow = ^TGtkArrow;
+ TGtkArrow = record
+ misc : TGtkMisc;
+ arrow_type : gint16;
+ shadow_type : gint16;
+ end;
+
+ PGtkArrowClass = ^TGtkArrowClass;
+ TGtkArrowClass = record
+ parent_class : TGtkMiscClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_ARROW : GType;
+function GTK_ARROW(obj: pointer) : PGtkArrow;
+function GTK_ARROW_CLASS(klass: pointer) : PGtkArrowClass;
+function GTK_IS_ARROW(obj: pointer) : boolean;
+function GTK_IS_ARROW_CLASS(klass: pointer) : boolean;
+function GTK_ARROW_GET_CLASS(obj: pointer) : PGtkArrowClass;
+
+
+function gtk_arrow_get_type:TGtkType; cdecl; external gtklib;
+function gtk_arrow_new(arrow_type:TGtkArrowType; shadow_type:TGtkShadowType):PGtkWidget; cdecl; external gtklib;
+procedure gtk_arrow_set(arrow:PGtkArrow; arrow_type:TGtkArrowType; shadow_type:TGtkShadowType); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ARROW : GType;
+begin
+ GTK_TYPE_ARROW:=gtk_arrow_get_type;
+end;
+
+function GTK_ARROW(obj: pointer) : PGtkArrow;
+begin
+ GTK_ARROW:=PGtkArrow(GTK_CHECK_CAST(obj,GTK_TYPE_ARROW));
+end;
+
+function GTK_ARROW_CLASS(klass: pointer) : PGtkArrowClass;
+begin
+ GTK_ARROW_CLASS:=PGtkArrowClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_ARROW));
+end;
+
+function GTK_IS_ARROW(obj: pointer) : boolean;
+begin
+ GTK_IS_ARROW:=GTK_CHECK_TYPE(obj,GTK_TYPE_ARROW);
+end;
+
+function GTK_IS_ARROW_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ARROW_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_ARROW);
+end;
+
+function GTK_ARROW_GET_CLASS(obj: pointer) : PGtkArrowClass;
+begin
+ GTK_ARROW_GET_CLASS:=PGtkArrowClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_ARROW));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkaspectframe.inc b/packages/gtk2/src/gtk+/gtk/gtkaspectframe.inc
new file mode 100644
index 0000000000..a00a91b67f
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkaspectframe.inc
@@ -0,0 +1,77 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkAspectFrame = ^TGtkAspectFrame;
+ TGtkAspectFrame = record
+ frame : TGtkFrame;
+ xalign : gfloat;
+ yalign : gfloat;
+ ratio : gfloat;
+ obey_child : gboolean;
+ center_allocation : TGtkAllocation;
+ end;
+
+ PGtkAspectFrameClass = ^TGtkAspectFrameClass;
+ TGtkAspectFrameClass = record
+ parent_class : TGtkFrameClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_ASPECT_FRAME : GType;
+function GTK_ASPECT_FRAME(obj: pointer) : PGtkAspectFrame;
+function GTK_ASPECT_FRAME_CLASS(klass: pointer) : PGtkAspectFrameClass;
+function GTK_IS_ASPECT_FRAME(obj: pointer) : boolean;
+function GTK_IS_ASPECT_FRAME_CLASS(klass: pointer) : boolean;
+function GTK_ASPECT_FRAME_GET_CLASS(obj: pointer) : PGtkAspectFrameClass;
+
+
+function gtk_aspect_frame_get_type:TGtkType; cdecl; external gtklib;
+function gtk_aspect_frame_new(_label:Pgchar; xalign:gfloat; yalign:gfloat; ratio:gfloat; obey_child:gboolean):PGtkWidget; cdecl; external gtklib;
+procedure gtk_aspect_frame_set(aspect_frame:PGtkAspectFrame; xalign:gfloat; yalign:gfloat; ratio:gfloat; obey_child:gboolean); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ASPECT_FRAME : GType;
+begin
+ GTK_TYPE_ASPECT_FRAME:=gtk_aspect_frame_get_type;
+end;
+
+function GTK_ASPECT_FRAME(obj: pointer) : PGtkAspectFrame;
+begin
+ GTK_ASPECT_FRAME:=PGtkAspectFrame(GTK_CHECK_CAST(obj,GTK_TYPE_ASPECT_FRAME));
+end;
+
+function GTK_ASPECT_FRAME_CLASS(klass: pointer) : PGtkAspectFrameClass;
+begin
+ GTK_ASPECT_FRAME_CLASS:=PGtkAspectFrameClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_ASPECT_FRAME));
+end;
+
+function GTK_IS_ASPECT_FRAME(obj: pointer) : boolean;
+begin
+ GTK_IS_ASPECT_FRAME:=GTK_CHECK_TYPE(obj,GTK_TYPE_ASPECT_FRAME);
+end;
+
+function GTK_IS_ASPECT_FRAME_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ASPECT_FRAME_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_ASPECT_FRAME);
+end;
+
+function GTK_ASPECT_FRAME_GET_CLASS(obj: pointer) : PGtkAspectFrameClass;
+begin
+ GTK_ASPECT_FRAME_GET_CLASS:=PGtkAspectFrameClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_ASPECT_FRAME));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkbbox.inc b/packages/gtk2/src/gtk+/gtk/gtkbbox.inc
new file mode 100644
index 0000000000..d89ca58b94
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkbbox.inc
@@ -0,0 +1,104 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkButtonBox = ^TGtkButtonBox;
+ TGtkButtonBox = record
+ box : TGtkBox;
+ 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;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_BUTTONBOX_DEFAULT = -(1);
+
+function GTK_TYPE_BUTTON_BOX : GType;
+function GTK_BUTTON_BOX(obj: pointer) : PGtkButtonBox;
+function GTK_BUTTON_BOX_CLASS(klass: pointer) : PGtkButtonBoxClass;
+function GTK_IS_BUTTON_BOX(obj: pointer) : boolean;
+function GTK_IS_BUTTON_BOX_CLASS(klass: pointer) : boolean;
+function GTK_BUTTON_BOX_GET_CLASS(obj: pointer) : PGtkButtonBoxClass;
+
+
+function gtk_button_box_get_type:TGtkType; cdecl; external gtklib;
+function gtk_button_box_get_layout(widget:PGtkButtonBox):TGtkButtonBoxStyle; cdecl; external gtklib;
+procedure gtk_button_box_set_layout(widget:PGtkButtonBox; layout_style:TGtkButtonBoxStyle); cdecl; external gtklib;
+procedure gtk_button_box_set_child_secondary(widget:PGtkButtonBox; child:PGtkWidget; is_secondary:gboolean); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_button_box_set_spacing(b: pointer; s : gint);
+function gtk_button_box_get_spacing(b : pointer) : gint;
+
+procedure gtk_button_box_set_child_size(widget:PGtkButtonBox; min_width:gint; min_height:gint); cdecl; external gtklib;
+procedure gtk_button_box_set_child_ipadding(widget:PGtkButtonBox; ipad_x:gint; ipad_y:gint); cdecl; external gtklib;
+procedure gtk_button_box_get_child_size(widget:PGtkButtonBox; min_width:Pgint; min_height:Pgint); cdecl; external gtklib;
+procedure gtk_button_box_get_child_ipadding(widget:PGtkButtonBox; ipad_x:Pgint; ipad_y:Pgint); cdecl; external gtklib;
+{$endif}
+{ Internal method - do not use. }
+
+procedure _gtk_button_box_child_requisition(widget:PGtkWidget; nvis_children:Plongint; nvis_secondaries:Plongint; width:Plongint; height:Plongint); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_BUTTON_BOX : GType;
+begin
+ GTK_TYPE_BUTTON_BOX:=gtk_button_box_get_type;
+end;
+
+function GTK_BUTTON_BOX(obj: pointer) : PGtkButtonBox;
+begin
+ GTK_BUTTON_BOX:=PGtkButtonBox(GTK_CHECK_CAST(obj,GTK_TYPE_BUTTON_BOX));
+end;
+
+function GTK_BUTTON_BOX_CLASS(klass: pointer) : PGtkButtonBoxClass;
+begin
+ GTK_BUTTON_BOX_CLASS:=PGtkButtonBoxClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_BUTTON_BOX));
+end;
+
+function GTK_IS_BUTTON_BOX(obj: pointer) : boolean;
+begin
+ GTK_IS_BUTTON_BOX:=GTK_CHECK_TYPE(obj,GTK_TYPE_BUTTON_BOX);
+end;
+
+function GTK_IS_BUTTON_BOX_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_BUTTON_BOX_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_BUTTON_BOX);
+end;
+
+function GTK_BUTTON_BOX_GET_CLASS(obj: pointer) : PGtkButtonBoxClass;
+begin
+ GTK_BUTTON_BOX_GET_CLASS:=PGtkButtonBoxClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_BUTTON_BOX));
+end;
+
+procedure gtk_button_box_set_spacing(b: pointer; s : gint);
+begin
+ gtk_box_set_spacing(GTK_BOX(b),s);
+end;
+
+function gtk_button_box_get_spacing(b : pointer) : gint;
+begin
+ gtk_button_box_get_spacing:=gtk_box_get_spacing(GTK_BOX(b));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkbin.inc b/packages/gtk2/src/gtk+/gtk/gtkbin.inc
new file mode 100644
index 0000000000..f91c241830
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkbin.inc
@@ -0,0 +1,72 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkBin = ^TGtkBin;
+ TGtkBin = record
+ container : TGtkContainer;
+ child : PGtkWidget;
+ end;
+
+ PGtkBinClass = ^TGtkBinClass;
+ TGtkBinClass = record
+ parent_class : TGtkContainerClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_BIN : GType;
+function GTK_BIN(obj: pointer) : PGtkBin;
+function GTK_BIN_CLASS(klass: pointer) : PGtkBinClass;
+function GTK_IS_BIN(obj: pointer) : boolean;
+function GTK_IS_BIN_CLASS(klass: pointer) : boolean;
+function GTK_BIN_GET_CLASS(obj: pointer) : PGtkBinClass;
+
+
+function gtk_bin_get_type:TGtkType; cdecl; external gtklib;
+function gtk_bin_get_child(bin:PGtkBin):PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_BIN : GType;
+begin
+ GTK_TYPE_BIN:=gtk_bin_get_type;
+end;
+
+function GTK_BIN(obj: pointer) : PGtkBin;
+begin
+ GTK_BIN:=PGtkBin(GTK_CHECK_CAST(obj,GTK_TYPE_BIN));
+end;
+
+function GTK_BIN_CLASS(klass: pointer) : PGtkBinClass;
+begin
+ GTK_BIN_CLASS:=PGtkBinClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_BIN));
+end;
+
+function GTK_IS_BIN(obj: pointer) : boolean;
+begin
+ GTK_IS_BIN:=GTK_CHECK_TYPE(obj,GTK_TYPE_BIN);
+end;
+
+function GTK_IS_BIN_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_BIN_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_BIN);
+end;
+
+function GTK_BIN_GET_CLASS(obj: pointer) : PGtkBinClass;
+begin
+ GTK_BIN_GET_CLASS:=PGtkBinClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_BIN));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkbindings.inc b/packages/gtk2/src/gtk+/gtk/gtkbindings.inc
new file mode 100644
index 0000000000..d8895db0e4
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkbindings.inc
@@ -0,0 +1,143 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkBindingEntry = ^TGtkBindingEntry;
+ PGtkBindingSignal = ^TGtkBindingSignal;
+ PGtkBindingArg = ^TGtkBindingArg;
+
+{ Binding sets }
+{ From RC content }
+ PGtkBindingSet = ^TGtkBindingSet;
+ TGtkBindingSet = record
+ set_name : Pgchar;
+ priority : gint;
+ widget_path_pspecs : PGSList;
+ widget_class_pspecs : PGSList;
+ class_branch_pspecs : PGSList;
+ entries : PGtkBindingEntry;
+ current : PGtkBindingEntry;
+ flag0 : word;
+ end;
+
+{ key portion }
+ TGtkBindingEntry = record
+ keyval : guint;
+ modifiers : TGdkModifierType;
+ 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;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+const
+ bm_TGtkBindingSet_parsed = $1;
+ bp_TGtkBindingSet_parsed = 0;
+
+ bm_TGtkBindingEntry_destroyed = $1;
+ bp_TGtkBindingEntry_destroyed = 0;
+ bm_TGtkBindingEntry_in_emission = $2;
+ bp_TGtkBindingEntry_in_emission = 1;
+
+procedure gtk_binding_entry_add(binding_set:PGtkBindingSet; keyval:guint; modifiers:TGdkModifierType);
+
+function parsed(var a : TGtkBindingSet) : guint;
+procedure set_parsed(var a : TGtkBindingSet; __parsed : guint);
+
+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);
+
+{ Application-level methods }
+function gtk_binding_set_new(set_name:Pgchar):PGtkBindingSet; cdecl; external gtklib;
+function gtk_binding_set_by_class(object_class:gpointer):PGtkBindingSet; cdecl; external gtklib;
+function gtk_binding_set_find(set_name:Pgchar):PGtkBindingSet; cdecl; external gtklib;
+function gtk_bindings_activate(anObject:PGtkObject; keyval:guint; modifiers:TGdkModifierType):gboolean; cdecl; external gtklib;
+function gtk_binding_set_activate(binding_set:PGtkBindingSet; keyval:guint; modifiers:TGdkModifierType; anObject:PGtkObject):gboolean; cdecl; external gtklib;
+
+procedure gtk_binding_entry_clear(binding_set:PGtkBindingSet; keyval:guint; modifiers:TGdkModifierType); cdecl; external gtklib;
+{$IFNDEF KYLIX}
+procedure gtk_binding_entry_add_signal(binding_set:PGtkBindingSet; keyval:guint; modifiers:TGdkModifierType; signal_name:Pgchar; n_args:guint;
+ args:array of const); cdecl; overload; external gtklib;
+procedure gtk_binding_entry_add_signal(binding_set:PGtkBindingSet; keyval:guint; modifiers:TGdkModifierType; signal_name:Pgchar; n_args:guint); cdecl; overload; varargs; external gtklib;
+{$ELSE}
+procedure gtk_binding_entry_add_signal(binding_set:PGtkBindingSet; keyval:guint; modifiers:TGdkModifierType; signal_name:Pgchar; n_args:guint); varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_binding_set_add_path(binding_set:PGtkBindingSet; path_type:TGtkPathType; path_pattern:Pgchar; priority:TGtkPathPriorityType); cdecl; external gtklib;
+{ Non-public methods }
+procedure gtk_binding_entry_remove(binding_set:PGtkBindingSet; keyval:guint; modifiers:TGdkModifierType); cdecl; external gtklib;
+procedure gtk_binding_entry_add_signall(binding_set:PGtkBindingSet; keyval:guint; modifiers:TGdkModifierType; signal_name:Pgchar; binding_args:PGSList); cdecl; external gtklib;
+function gtk_binding_parse_binding(scanner:PGScanner):guint; cdecl; external gtklib;
+function _gtk_bindings_activate_event(anObject:PGtkObject; event:PGdkEventKey):gboolean; cdecl; external gtklib;
+procedure _gtk_binding_reset_parsed; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function parsed(var a : TGtkBindingSet) : guint;
+begin
+ parsed:=(a.flag0 and bm_TGtkBindingSet_parsed) shr bp_TGtkBindingSet_parsed;
+end;
+
+procedure set_parsed(var a : TGtkBindingSet; __parsed : guint);
+begin
+ a.flag0:=a.flag0 or ((__parsed shl bp_TGtkBindingSet_parsed) and bm_TGtkBindingSet_parsed);
+end;
+
+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;
+
+procedure gtk_binding_entry_add(binding_set:PGtkBindingSet; keyval:guint; modifiers:TGdkModifierType);
+begin
+ gtk_binding_entry_clear(binding_set,keyval,modifiers);
+end;
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkbox.inc b/packages/gtk2/src/gtk+/gtk/gtkbox.inc
new file mode 100644
index 0000000000..75ec203ba4
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkbox.inc
@@ -0,0 +1,168 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkBox = ^TGtkBox;
+ TGtkBox = record
+ container : TGtkContainer;
+ children : PGList;
+ spacing : gint16;
+ flag0 : word;
+ end;
+
+ PGtkBoxClass = ^TGtkBoxClass;
+ TGtkBoxClass = record
+ parent_class : TGtkContainerClass;
+ end;
+
+ PGtkBoxChild = ^TGtkBoxChild;
+ TGtkBoxChild = record
+ widget : PGtkWidget;
+ padding : guint16;
+ flag0 : word;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkBox_homogeneous = $1;
+ bp_TGtkBox_homogeneous = 0;
+
+ bm_TGtkBoxChild_expand = $1;
+ bp_TGtkBoxChild_expand = 0;
+ bm_TGtkBoxChild_fill = $2;
+ bp_TGtkBoxChild_fill = 1;
+ bm_TGtkBoxChild_pack = $4;
+ bp_TGtkBoxChild_pack = 2;
+ bm_TGtkBoxChild_is_secondary = $8;
+ bp_TGtkBoxChild_is_secondary = 3;
+
+
+function GTK_TYPE_BOX : GType;
+function GTK_BOX(obj: pointer) : PGtkBox;
+function GTK_BOX_CLASS(klass: pointer) : PGtkBoxClass;
+function GTK_IS_BOX(obj: pointer) : boolean;
+function GTK_IS_BOX_CLASS(klass: pointer) : boolean;
+function GTK_BOX_GET_CLASS(obj: pointer) : PGtkBoxClass;
+
+
+function homogeneous(var a : TGtkBox) : guint; overload;
+procedure set_homogeneous(var a : TGtkBox; __homogeneous : guint); overload;
+
+function expand(var a : TGtkBoxChild) : guint; overload;
+procedure set_expand(var a : TGtkBoxChild; __expand : guint); overload;
+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);
+function is_secondary(var a : TGtkBoxChild) : guint;
+procedure set_is_secondary(var a : TGtkBoxChild; __is_secondary : guint);
+
+function gtk_box_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_box_pack_start(box:PGtkBox; child:PGtkWidget; expand:gboolean; fill:gboolean; padding:guint); cdecl; external gtklib;
+procedure gtk_box_pack_end(box:PGtkBox; child:PGtkWidget; expand:gboolean; fill:gboolean; padding:guint); cdecl; external gtklib;
+procedure gtk_box_pack_start_defaults(box:PGtkBox; widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_box_pack_end_defaults(box:PGtkBox; widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_box_set_homogeneous(box:PGtkBox; homogeneous:gboolean); cdecl; external gtklib;
+function gtk_box_get_homogeneous(box:PGtkBox):gboolean; cdecl; external gtklib;
+procedure gtk_box_set_spacing(box:PGtkBox; spacing:gint); cdecl; external gtklib;
+function gtk_box_get_spacing(box:PGtkBox):gint; cdecl; external gtklib;
+procedure gtk_box_reorder_child(box:PGtkBox; child:PGtkWidget; position:gint); cdecl; external gtklib;
+procedure gtk_box_query_child_packing(box:PGtkBox; child:PGtkWidget; expand:Pgboolean; fill:Pgboolean; padding:Pguint;
+ pack_type:PGtkPackType); cdecl; external gtklib;
+procedure gtk_box_set_child_packing(box:PGtkBox; child:PGtkWidget; expand:gboolean; fill:gboolean; padding:guint;
+ pack_type:TGtkPackType); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_BOX : GType;
+begin
+ GTK_TYPE_BOX:=gtk_box_get_type;
+end;
+
+function GTK_BOX(obj: pointer) : PGtkBox;
+begin
+ GTK_BOX:=PGtkBox(GTK_CHECK_CAST(obj,GTK_TYPE_BOX));
+end;
+
+function GTK_BOX_CLASS(klass: pointer) : PGtkBoxClass;
+begin
+ GTK_BOX_CLASS:=PGtkBoxClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_BOX));
+end;
+
+function GTK_IS_BOX(obj: pointer) : boolean;
+begin
+ GTK_IS_BOX:=GTK_CHECK_TYPE(obj,GTK_TYPE_BOX);
+end;
+
+function GTK_IS_BOX_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_BOX_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_BOX);
+end;
+
+function GTK_BOX_GET_CLASS(obj: pointer) : PGtkBoxClass;
+begin
+ GTK_BOX_GET_CLASS:=PGtkBoxClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_BOX));
+end;
+
+function homogeneous(var a : TGtkBox) : guint;
+begin
+ homogeneous:=(a.flag0 and bm_TGtkBox_homogeneous) shr bp_TGtkBox_homogeneous;
+end;
+
+procedure set_homogeneous(var a : TGtkBox; __homogeneous : guint);
+begin
+ a.flag0:=a.flag0 or ((__homogeneous shl bp_TGtkBox_homogeneous) and bm_TGtkBox_homogeneous);
+end;
+
+function expand(var a : TGtkBoxChild) : guint;
+begin
+ expand:=(a.flag0 and bm_TGtkBoxChild_expand) shr bp_TGtkBoxChild_expand;
+end;
+
+procedure set_expand(var a : TGtkBoxChild; __expand : guint);
+begin
+ a.flag0:=a.flag0 or ((__expand shl bp_TGtkBoxChild_expand) and bm_TGtkBoxChild_expand);
+end;
+
+function fill(var a : TGtkBoxChild) : guint;
+begin
+ fill:=(a.flag0 and bm_TGtkBoxChild_fill) shr bp_TGtkBoxChild_fill;
+end;
+
+procedure set_fill(var a : TGtkBoxChild; __fill : guint);
+begin
+ a.flag0:=a.flag0 or ((__fill shl bp_TGtkBoxChild_fill) and bm_TGtkBoxChild_fill);
+end;
+
+function pack(var a : TGtkBoxChild) : guint;
+begin
+ pack:=(a.flag0 and bm_TGtkBoxChild_pack) shr bp_TGtkBoxChild_pack;
+end;
+
+procedure set_pack(var a : TGtkBoxChild; __pack : guint);
+begin
+ a.flag0:=a.flag0 or ((__pack shl bp_TGtkBoxChild_pack) and bm_TGtkBoxChild_pack);
+end;
+
+function is_secondary(var a : TGtkBoxChild) : guint;
+begin
+ is_secondary:=(a.flag0 and bm_TGtkBoxChild_is_secondary) shr bp_TGtkBoxChild_is_secondary;
+end;
+
+procedure set_is_secondary(var a : TGtkBoxChild; __is_secondary : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_secondary shl bp_TGtkBoxChild_is_secondary) and bm_TGtkBoxChild_is_secondary);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkbutton.inc b/packages/gtk2/src/gtk+/gtk/gtkbutton.inc
new file mode 100644
index 0000000000..ac01886791
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkbutton.inc
@@ -0,0 +1,230 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkButton = ^TGtkButton;
+ TGtkButton = record
+ bin : TGtkBin;
+ event_window : PGdkWindow;
+ label_text : Pgchar;
+ activate_timeout : guint;
+ flag0 : word;
+ end;
+
+{ Padding for future expansion }
+ 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;
+ activate : procedure (button:PGtkButton); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkButton_constructed = $1;
+ bp_TGtkButton_constructed = 0;
+ bm_TGtkButton_in_button = $2;
+ bp_TGtkButton_in_button = 1;
+ bm_TGtkButton_button_down = $4;
+ bp_TGtkButton_button_down = 2;
+ bm_TGtkButton_relief = $18;
+ bp_TGtkButton_relief = 3;
+ bm_TGtkButton_use_underline = $20;
+ bp_TGtkButton_use_underline = 5;
+ bm_TGtkButton_use_stock = $40;
+ bp_TGtkButton_use_stock = 6;
+ bm_TGtkButton_depressed = $80;
+ bp_TGtkButton_depressed = 7;
+ bm_TGtkButton_depress_on_activate = $100;
+ bp_TGtkButton_depress_on_activate = 8;
+
+
+function GTK_TYPE_BUTTON : GType;
+function GTK_BUTTON(obj: pointer) : PGtkButton;
+function GTK_BUTTON_CLASS(klass: pointer) : PGtkButtonClass;
+function GTK_IS_BUTTON(obj: pointer) : boolean;
+function GTK_IS_BUTTON_CLASS(klass: pointer) : boolean;
+function GTK_BUTTON_GET_CLASS(obj: pointer) : PGtkButtonClass;
+
+
+function constructed(var a : TGtkButton) : guint;
+procedure set_constructed(var a : TGtkButton; __constructed : guint);
+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; __relief : guint);
+function use_underline(var a : TGtkButton) : guint; overload;
+procedure set_use_underline(var a : TGtkButton; __use_underline : guint); overload;
+function use_stock(var a : TGtkButton) : guint;
+procedure set_use_stock(var a : TGtkButton; __use_stock : guint);
+function depressed(var a : TGtkButton) : guint;
+procedure set_depressed(var a : TGtkButton; __depressed : guint);
+function depress_on_activate(var a : TGtkButton) : guint;
+procedure set_depress_on_activate(var a : TGtkButton; __depress_on_activate : guint);
+
+
+function gtk_button_get_type:TGtkType; cdecl; external gtklib;
+function gtk_button_new:PGtkWidget; cdecl; external gtklib;
+function gtk_button_new_with_label(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_button_new_from_stock(stock_id:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_button_new_with_mnemonic(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+procedure gtk_button_pressed(button:PGtkButton); cdecl; external gtklib;
+procedure gtk_button_released(button:PGtkButton); cdecl; external gtklib;
+procedure gtk_button_clicked(button:PGtkButton); cdecl; external gtklib;
+procedure gtk_button_enter(button:PGtkButton); cdecl; external gtklib;
+procedure gtk_button_leave(button:PGtkButton); cdecl; external gtklib;
+procedure gtk_button_set_relief(button:PGtkButton; newstyle:TGtkReliefStyle); cdecl; external gtklib;
+function gtk_button_get_relief(button:PGtkButton):TGtkReliefStyle; cdecl; external gtklib;
+procedure gtk_button_set_label(button:PGtkButton; _label:Pgchar); cdecl; external gtklib;
+function gtk_button_get_label(button:PGtkButton):Pgchar; cdecl; external gtklib;
+procedure gtk_button_set_use_underline(button:PGtkButton; use_underline:gboolean); cdecl; external gtklib;
+function gtk_button_get_use_underline(button:PGtkButton):gboolean; cdecl; external gtklib;
+procedure gtk_button_set_use_stock(button:PGtkButton; use_stock:gboolean); cdecl; external gtklib;
+function gtk_button_get_use_stock(button:PGtkButton):gboolean; cdecl; external gtklib;
+procedure _gtk_button_set_depressed(button:PGtkButton; depressed:gboolean); cdecl; external gtklib;
+procedure _gtk_button_paint(button:PGtkButton; area:PGdkRectangle; state_type:TGtkStateType; shadow_type:TGtkShadowType; main_detail:Pgchar;
+ default_detail:Pgchar); cdecl; external gtklib;
+
+{$IFDEF HasGTK2_4}
+function gtk_button_get_focus_on_click(window:PGtkButton):gboolean; cdecl; external gtklib;
+procedure gtk_button_set_focus_on_click(window:PGtkButton; setting:gboolean); cdecl; external gtklib;
+procedure gtk_button_get_alignment(window:PGtkButton; x,y: PGFloat) cdecl; external gtklib;
+procedure gtk_button_set_alignment(window:PGtkButton; x,y: GFloat); cdecl; external gtklib;
+{$ENDIF HasGTK2_4}
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_BUTTON : GType;
+begin
+ GTK_TYPE_BUTTON:=gtk_button_get_type;
+end;
+
+function GTK_BUTTON(obj: pointer) : PGtkButton;
+begin
+ GTK_BUTTON:=PGtkButton(GTK_CHECK_CAST(obj,GTK_TYPE_BUTTON));
+end;
+
+function GTK_BUTTON_CLASS(klass: pointer) : PGtkButtonClass;
+begin
+ GTK_BUTTON_CLASS:=PGtkButtonClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_BUTTON));
+end;
+
+function GTK_IS_BUTTON(obj: pointer) : boolean;
+begin
+ GTK_IS_BUTTON:=GTK_CHECK_TYPE(obj,GTK_TYPE_BUTTON);
+end;
+
+function GTK_IS_BUTTON_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_BUTTON_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_BUTTON);
+end;
+
+function GTK_BUTTON_GET_CLASS(obj: pointer) : PGtkButtonClass;
+begin
+ GTK_BUTTON_GET_CLASS:=PGtkButtonClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_BUTTON));
+end;
+
+function constructed(var a : TGtkButton) : guint;
+begin
+ constructed:=(a.flag0 and bm_TGtkButton_constructed) shr bp_TGtkButton_constructed;
+end;
+
+procedure set_constructed(var a : TGtkButton; __constructed : guint);
+begin
+ a.flag0:=a.flag0 or ((__constructed shl bp_TGtkButton_constructed) and bm_TGtkButton_constructed);
+end;
+
+function in_button(var a : TGtkButton) : guint;
+begin
+ in_button:=(a.flag0 and bm_TGtkButton_in_button) shr bp_TGtkButton_in_button;
+end;
+
+procedure set_in_button(var a : TGtkButton; __in_button : guint);
+begin
+ a.flag0:=a.flag0 or ((__in_button shl bp_TGtkButton_in_button) and bm_TGtkButton_in_button);
+end;
+
+function button_down(var a : TGtkButton) : guint;
+begin
+ button_down:=(a.flag0 and bm_TGtkButton_button_down) shr bp_TGtkButton_button_down;
+end;
+
+procedure set_button_down(var a : TGtkButton; __button_down : guint);
+begin
+ a.flag0:=a.flag0 or ((__button_down shl bp_TGtkButton_button_down) and bm_TGtkButton_button_down);
+end;
+
+function relief(var a : TGtkButton) : guint;
+begin
+ relief:=(a.flag0 and bm_TGtkButton_relief) shr bp_TGtkButton_relief;
+end;
+
+procedure set_relief(var a : TGtkButton; __relief : guint);
+begin
+ a.flag0:=a.flag0 or ((__relief shl bp_TGtkButton_relief) and bm_TGtkButton_relief);
+end;
+
+function use_underline(var a : TGtkButton) : guint;
+begin
+ use_underline:=(a.flag0 and bm_TGtkButton_use_underline) shr bp_TGtkButton_use_underline;
+end;
+
+procedure set_use_underline(var a : TGtkButton; __use_underline : guint);
+begin
+ a.flag0:=a.flag0 or ((__use_underline shl bp_TGtkButton_use_underline) and bm_TGtkButton_use_underline);
+end;
+
+function use_stock(var a : TGtkButton) : guint;
+begin
+ use_stock:=(a.flag0 and bm_TGtkButton_use_stock) shr bp_TGtkButton_use_stock;
+end;
+
+procedure set_use_stock(var a : TGtkButton; __use_stock : guint);
+begin
+ a.flag0:=a.flag0 or ((__use_stock shl bp_TGtkButton_use_stock) and bm_TGtkButton_use_stock);
+end;
+
+function depressed(var a : TGtkButton) : guint;
+begin
+ depressed:=(a.flag0 and bm_TGtkButton_depressed) shr bp_TGtkButton_depressed;
+end;
+
+procedure set_depressed(var a : TGtkButton; __depressed : guint);
+begin
+ a.flag0:=a.flag0 or ((__depressed shl bp_TGtkButton_depressed) and bm_TGtkButton_depressed);
+end;
+
+function depress_on_activate(var a : TGtkButton) : guint;
+begin
+ depress_on_activate:=(a.flag0 and bm_TGtkButton_depress_on_activate) shr bp_TGtkButton_depress_on_activate;
+end;
+
+procedure set_depress_on_activate(var a : TGtkButton; __depress_on_activate : guint);
+begin
+ a.flag0:=a.flag0 or ((__depress_on_activate shl bp_TGtkButton_depress_on_activate) and bm_TGtkButton_depress_on_activate);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcalendar.inc b/packages/gtk2/src/gtk+/gtk/gtkcalendar.inc
new file mode 100644
index 0000000000..327858a988
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcalendar.inc
@@ -0,0 +1,129 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkCalendarDisplayOptions = ^TGtkCalendarDisplayOptions;
+ TGtkCalendarDisplayOptions = longint;
+
+{ Padding for future expansion }
+ 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;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{ Signal handlers }
+ 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;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ 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;
+
+
+function GTK_TYPE_CALENDAR : GType;
+function GTK_CALENDAR(obj: pointer) : PGtkCalendar;
+function GTK_CALENDAR_CLASS(klass: pointer) : PGtkCalendarClass;
+function GTK_IS_CALENDAR(obj: pointer) : boolean;
+function GTK_IS_CALENDAR_CLASS(klass: pointer) : boolean;
+function GTK_CALENDAR_GET_CLASS(obj: pointer) : PGtkCalendarClass;
+
+
+function gtk_calendar_get_type:TGtkType; cdecl; external gtklib;
+function gtk_calendar_new:PGtkWidget; cdecl; external gtklib;
+function gtk_calendar_select_month(calendar:PGtkCalendar; month:guint; year:guint):gboolean; cdecl; external gtklib;
+procedure gtk_calendar_select_day(calendar:PGtkCalendar; day:guint); cdecl; external gtklib;
+function gtk_calendar_mark_day(calendar:PGtkCalendar; day:guint):gboolean; cdecl; external gtklib;
+function gtk_calendar_unmark_day(calendar:PGtkCalendar; day:guint):gboolean; cdecl; external gtklib;
+procedure gtk_calendar_clear_marks(calendar:PGtkCalendar); cdecl; external gtklib;
+procedure gtk_calendar_display_options(calendar:PGtkCalendar; flags:TGtkCalendarDisplayOptions); cdecl; external gtklib;
+procedure gtk_calendar_get_date(calendar:PGtkCalendar; year:Pguint; month:Pguint; day:Pguint); cdecl; external gtklib;
+procedure gtk_calendar_freeze(calendar:PGtkCalendar); cdecl; external gtklib;
+procedure gtk_calendar_thaw(calendar:PGtkCalendar); cdecl; external gtklib;
+
+{$IFDEF HasGTK2_4}
+function gtk_calendar_get_display_options(calendar:PGtkCalendar): TGtkCalendarDisplayOptions; cdecl; external gtklib;
+procedure gtk_calendar_set_display_options(calendar:PGtkCalendar; flags:TGtkCalendarDisplayOptions); cdecl; external gtklib;
+{$ENDIF HasGTK2_4}
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CALENDAR : GType;
+begin
+ GTK_TYPE_CALENDAR:=gtk_calendar_get_type;
+end;
+
+function GTK_CALENDAR(obj: pointer) : PGtkCalendar;
+begin
+ GTK_CALENDAR:=PGtkCalendar(GTK_CHECK_CAST(obj,GTK_TYPE_CALENDAR));
+end;
+
+function GTK_CALENDAR_CLASS(klass: pointer) : PGtkCalendarClass;
+begin
+ GTK_CALENDAR_CLASS:=PGtkCalendarClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_CALENDAR));
+end;
+
+function GTK_IS_CALENDAR(obj: pointer) : boolean;
+begin
+ GTK_IS_CALENDAR:=GTK_CHECK_TYPE(obj,GTK_TYPE_CALENDAR);
+end;
+
+function GTK_IS_CALENDAR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_CALENDAR_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_CALENDAR);
+end;
+
+function GTK_CALENDAR_GET_CLASS(obj: pointer) : PGtkCalendarClass;
+begin
+ GTK_CALENDAR_GET_CLASS:=PGtkCalendarClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_CALENDAR));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcelleditable.inc b/packages/gtk2/src/gtk+/gtk/gtkcelleditable.inc
new file mode 100644
index 0000000000..2a886afcb9
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcelleditable.inc
@@ -0,0 +1,68 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkCellEditable = pointer;
+
+{ signals }
+{ virtual table }
+ PGtkCellEditableIface = ^TGtkCellEditableIface;
+ TGtkCellEditableIface = record
+ g_iface : TGTypeInterface;
+ editing_done : procedure (cell_editable:PGtkCellEditable); cdecl;
+ remove_widget : procedure (cell_editable:PGtkCellEditable); cdecl;
+ start_editing : procedure (cell_editable:PGtkCellEditable; event:PGdkEvent); cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_CELL_EDITABLE : GType;
+function GTK_CELL_EDITABLE(obj: pointer) : PGtkCellEditable;
+function GTK_CELL_EDITABLE_CLASS(obj: pointer) : PGtkCellEditableIface;
+function GTK_IS_CELL_EDITABLE(obj: pointer) : boolean;
+function GTK_CELL_EDITABLE_GET_IFACE(obj: pointer) : PGtkCellEditableIface;
+
+
+function gtk_cell_editable_get_type:GType; cdecl; external gtklib;
+procedure gtk_cell_editable_start_editing(cell_editable:PGtkCellEditable; event:PGdkEvent); cdecl; external gtklib;
+procedure gtk_cell_editable_editing_done(cell_editable:PGtkCellEditable); cdecl; external gtklib;
+procedure gtk_cell_editable_remove_widget(cell_editable:PGtkCellEditable); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CELL_EDITABLE : GType;
+begin
+ GTK_TYPE_CELL_EDITABLE:=gtk_cell_editable_get_type;
+end;
+
+function GTK_CELL_EDITABLE(obj: pointer) : PGtkCellEditable;
+begin
+ GTK_CELL_EDITABLE:=PGtkCellEditable(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_CELL_EDITABLE));
+end;
+
+function GTK_CELL_EDITABLE_CLASS(obj: pointer) : PGtkCellEditableIface;
+begin
+ GTK_CELL_EDITABLE_CLASS:=PGtkCellEditableIface(G_TYPE_CHECK_CLASS_CAST(obj,GTK_TYPE_CELL_EDITABLE));
+end;
+
+function GTK_IS_CELL_EDITABLE(obj: pointer) : boolean;
+begin
+ GTK_IS_CELL_EDITABLE:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_CELL_EDITABLE);
+end;
+
+function GTK_CELL_EDITABLE_GET_IFACE(obj: pointer) : PGtkCellEditableIface;
+begin
+ GTK_CELL_EDITABLE_GET_IFACE:=PGtkCellEditableIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,GTK_TYPE_CELL_EDITABLE));
+end;
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcelllayout.inc b/packages/gtk2/src/gtk+/gtk/gtkcelllayout.inc
new file mode 100644
index 0000000000..e1d5bfaae0
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcelllayout.inc
@@ -0,0 +1,78 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkCellLayout = pointer;
+ PPGtkCellLayout = ^PGtkCellLayout;
+
+ { keep in sync with GtkTreeCellDataFunc }
+ TGtkCellLayoutDataFunc = procedure (cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; tree_model:PGtkTreeModel; iter:PGtkTreeIter; data:gpointer);cdecl;
+{ Virtual Table }
+
+ PGtkCellLayoutIface = ^TGtkCellLayoutIface;
+ TGtkCellLayoutIface = record
+ g_iface : TGTypeInterface;
+ pack_start : procedure (cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; expand:gboolean);
+ pack_end : procedure (cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; expand:gboolean);
+ clear : procedure (cell_layout:PGtkCellLayout);
+ add_attribute : procedure (cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; attribute:Pgchar; column:gint);
+ set_cell_data_func : procedure (cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; func:TGtkCellLayoutDataFunc; func_data:gpointer; destroy:TGDestroyNotify);
+ clear_attributes : procedure (cell_layout:PGtkCellLayout; cell:PGtkCellRenderer);
+ reorder : procedure (cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; position:gint);
+ end;
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_CELL_LAYOUT : GType;
+function GTK_CELL_LAYOUT(obj : pointer) : PGtkCellLayout;
+function GTK_IS_CELL_LAYOUT(obj : pointer) : boolean;
+function GTK_CELL_LAYOUT_GET_IFACE(obj : pointer) : PGtkCellLayoutIface;
+
+function gtk_cell_layout_get_type:GType;cdecl;external gtklib name 'gtk_cell_layout_get_type';
+
+procedure gtk_cell_layout_pack_start(cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; expand:gboolean);cdecl;external gtklib name 'gtk_cell_layout_pack_start';
+procedure gtk_cell_layout_pack_end(cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; expand:gboolean);cdecl;external gtklib name 'gtk_cell_layout_pack_end';
+
+procedure gtk_cell_layout_clear(cell_layout:PGtkCellLayout);cdecl;external gtklib name 'gtk_cell_layout_clear';
+
+procedure gtk_cell_layout_set_attributes(cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; args:array of const);cdecl;overload;external gtklib name 'gtk_cell_layout_set_attributes';
+procedure gtk_cell_layout_set_attributes(cell_layout:PGtkCellLayout; cell:PGtkCellRenderer);cdecl;overload;varargs;external gtklib name 'gtk_cell_layout_set_attributes';
+
+
+procedure gtk_cell_layout_add_attribute(cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; attribute:Pgchar; column:gint);cdecl;external gtklib name 'gtk_cell_layout_add_attribute';
+
+procedure gtk_cell_layout_set_cell_data_func(cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; func:TGtkCellLayoutDataFunc; func_data:gpointer; destroy:TGDestroyNotify);cdecl;external gtklib name 'gtk_cell_layout_set_cell_data_func';
+
+procedure gtk_cell_layout_clear_attributes(cell_layout:PGtkCellLayout; cell:PGtkCellRenderer);cdecl;external gtklib name 'gtk_cell_layout_clear_attributes';
+
+procedure gtk_cell_layout_reorder(cell_layout:PGtkCellLayout; cell:PGtkCellRenderer; position:gint);cdecl;external gtklib name 'gtk_cell_layout_reorder';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+function GTK_TYPE_CELL_LAYOUT : GType;
+begin
+ GTK_TYPE_CELL_LAYOUT:=gtk_cell_layout_get_type;
+end;
+
+function GTK_CELL_LAYOUT(obj : pointer) : PGtkCellLayout;
+begin
+ GTK_CELL_LAYOUT:=PGtkCellLayout(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_CELL_LAYOUT));
+end;
+
+function GTK_IS_CELL_LAYOUT(obj : pointer) : boolean;
+begin
+ GTK_IS_CELL_LAYOUT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_CELL_LAYOUT);
+end;
+
+function GTK_CELL_LAYOUT_GET_IFACE(obj : pointer) : PGtkCellLayoutIface;
+begin
+ GTK_CELL_LAYOUT_GET_IFACE:=PGtkCellLayoutIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,GTK_TYPE_CELL_LAYOUT));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcellrenderer.inc b/packages/gtk2/src/gtk+/gtk/gtkcellrenderer.inc
new file mode 100644
index 0000000000..f0049d0b1b
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcellrenderer.inc
@@ -0,0 +1,193 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ this flag means the cell is in the sort column/row }
+ PGtkCellRendererState = ^TGtkCellRendererState;
+ TGtkCellRendererState = longint;
+
+ PGtkCellRendererMode = ^TGtkCellRendererMode;
+ TGtkCellRendererMode = (
+ GTK_CELL_RENDERER_MODE_INERT,
+ GTK_CELL_RENDERER_MODE_ACTIVATABLE,
+ GTK_CELL_RENDERER_MODE_EDITABLE
+ );
+
+ PGtkCellRenderer = ^TGtkCellRenderer;
+ TGtkCellRenderer = record
+ parent : TGtkObject;
+ xalign : gfloat;
+ yalign : gfloat;
+ width : gint;
+ height : gint;
+ xpad : guint16;
+ ypad : guint16;
+ flag0 : word;
+ end;
+
+{ vtable - not signals }
+{ Padding for future expansion }
+ PGtkCellRendererClass = ^TGtkCellRendererClass;
+ TGtkCellRendererClass = record
+ parent_class : TGtkObjectClass;
+ get_size : procedure (cell:PGtkCellRenderer; widget:PGtkWidget; cell_area:PGdkRectangle; x_offset:Pgint; y_offset:Pgint;
+ width:Pgint; height:Pgint); cdecl;
+ render : procedure (cell:PGtkCellRenderer; window:PGdkWindow; widget:PGtkWidget; background_area:PGdkRectangle; cell_area:PGdkRectangle;
+ expose_area:PGdkRectangle; flags:TGtkCellRendererState); cdecl;
+ activate : function (cell:PGtkCellRenderer; event:PGdkEvent; widget:PGtkWidget; path:Pgchar; background_area:PGdkRectangle;
+ cell_area:PGdkRectangle; flags:TGtkCellRendererState):gboolean; cdecl;
+ start_editing : function (cell:PGtkCellRenderer; event:PGdkEvent; widget:PGtkWidget; path:Pgchar; background_area:PGdkRectangle;
+ cell_area:PGdkRectangle; flags:TGtkCellRendererState):PGtkCellEditable; cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+
+const
+ GTK_CELL_RENDERER_SELECTED = 1 shl 0;
+ GTK_CELL_RENDERER_PRELIT = 1 shl 1;
+ GTK_CELL_RENDERER_INSENSITIVE = 1 shl 2;
+ GTK_CELL_RENDERER_SORTED = 1 shl 3;
+
+
+const
+ bm_TGtkCellRenderer_mode = $3;
+ bp_TGtkCellRenderer_mode = 0;
+ bm_TGtkCellRenderer_visible = $4;
+ bp_TGtkCellRenderer_visible = 2;
+ bm_TGtkCellRenderer_is_expander = $8;
+ bp_TGtkCellRenderer_is_expander = 3;
+ bm_TGtkCellRenderer_is_expanded = $10;
+ bp_TGtkCellRenderer_is_expanded = 4;
+ bm_TGtkCellRenderer_cell_background_set = $20;
+ bp_TGtkCellRenderer_cell_background_set = 5;
+
+function GTK_TYPE_CELL_RENDERER : GType;
+function GTK_CELL_RENDERER(obj: pointer) : PGtkCellRenderer;
+function GTK_CELL_RENDERER_CLASS(klass: pointer) : PGtkCellRendererClass;
+function GTK_IS_CELL_RENDERER(obj: pointer) : boolean;
+function GTK_IS_CELL_RENDERER_CLASS(klass: pointer) : boolean;
+function GTK_CELL_RENDERER_GET_CLASS(obj: pointer) : PGtkCellRendererClass;
+
+
+function mode(var a : TGtkCellRenderer) : guint;
+procedure set_mode(var a : TGtkCellRenderer; __mode : guint);
+function visible(var a : TGtkCellRenderer) : guint; overload;
+procedure set_visible(var a : TGtkCellRenderer; __visible : guint); overload;
+function is_expander(var a : TGtkCellRenderer) : guint;
+procedure set_is_expander(var a : TGtkCellRenderer; __is_expander : guint);
+function is_expanded(var a : TGtkCellRenderer) : guint;
+procedure set_is_expanded(var a : TGtkCellRenderer; __is_expanded : guint);
+function cell_background_set(var a : TGtkCellRenderer) : guint;
+procedure set_cell_background_set(var a : TGtkCellRenderer; __cell_background_set : guint);
+
+function gtk_cell_renderer_get_type:GType; cdecl; external gtklib;
+procedure gtk_cell_renderer_get_size(cell:PGtkCellRenderer; widget:PGtkWidget; cell_area:PGdkRectangle; x_offset:Pgint; y_offset:Pgint;
+ width:Pgint; height:Pgint); cdecl; external gtklib;
+procedure gtk_cell_renderer_render(cell:PGtkCellRenderer; window:PGdkWindow; widget:PGtkWidget; background_area:PGdkRectangle; cell_area:PGdkRectangle;
+ expose_area:PGdkRectangle; flags:TGtkCellRendererState); cdecl; external gtklib;
+function gtk_cell_renderer_activate(cell:PGtkCellRenderer; event:PGdkEvent; widget:PGtkWidget; path:Pgchar; background_area:PGdkRectangle;
+ cell_area:PGdkRectangle; flags:TGtkCellRendererState):gboolean; cdecl; external gtklib;
+function gtk_cell_renderer_start_editing(cell:PGtkCellRenderer; event:PGdkEvent; widget:PGtkWidget; path:Pgchar; background_area:PGdkRectangle;
+ cell_area:PGdkRectangle; flags:TGtkCellRendererState):PGtkCellEditable; cdecl; external gtklib;
+procedure gtk_cell_renderer_set_fixed_size(cell:PGtkCellRenderer; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_cell_renderer_get_fixed_size(cell:PGtkCellRenderer; width:Pgint; height:Pgint); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CELL_RENDERER : GType;
+begin
+ GTK_TYPE_CELL_RENDERER:=gtk_cell_renderer_get_type;
+end;
+
+function GTK_CELL_RENDERER(obj: pointer) : PGtkCellRenderer;
+begin
+ GTK_CELL_RENDERER:=PGtkCellRenderer(GTK_CHECK_CAST(obj,GTK_TYPE_CELL_RENDERER));
+end;
+
+function GTK_CELL_RENDERER_CLASS(klass: pointer) : PGtkCellRendererClass;
+begin
+ GTK_CELL_RENDERER_CLASS:=PGtkCellRendererClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_CELL_RENDERER));
+end;
+
+function GTK_IS_CELL_RENDERER(obj: pointer) : boolean;
+begin
+ GTK_IS_CELL_RENDERER:=GTK_CHECK_TYPE(obj,GTK_TYPE_CELL_RENDERER);
+end;
+
+function GTK_IS_CELL_RENDERER_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_CELL_RENDERER_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_CELL_RENDERER);
+end;
+
+function GTK_CELL_RENDERER_GET_CLASS(obj: pointer) : PGtkCellRendererClass;
+begin
+ GTK_CELL_RENDERER_GET_CLASS:=PGtkCellRendererClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_CELL_RENDERER));
+end;
+
+function mode(var a : TGtkCellRenderer) : guint;
+begin
+ mode:=(a.flag0 and bm_TGtkCellRenderer_mode) shr bp_TGtkCellRenderer_mode;
+end;
+
+procedure set_mode(var a : TGtkCellRenderer; __mode : guint);
+begin
+ a.flag0:=a.flag0 or ((__mode shl bp_TGtkCellRenderer_mode) and bm_TGtkCellRenderer_mode);
+end;
+
+function visible(var a : TGtkCellRenderer) : guint;
+begin
+ visible:=(a.flag0 and bm_TGtkCellRenderer_visible) shr bp_TGtkCellRenderer_visible;
+end;
+
+procedure set_visible(var a : TGtkCellRenderer; __visible : guint);
+begin
+ a.flag0:=a.flag0 or ((__visible shl bp_TGtkCellRenderer_visible) and bm_TGtkCellRenderer_visible);
+end;
+
+function is_expander(var a : TGtkCellRenderer) : guint;
+begin
+ is_expander:=(a.flag0 and bm_TGtkCellRenderer_is_expander) shr bp_TGtkCellRenderer_is_expander;
+end;
+
+procedure set_is_expander(var a : TGtkCellRenderer; __is_expander : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_expander shl bp_TGtkCellRenderer_is_expander) and bm_TGtkCellRenderer_is_expander);
+end;
+
+function is_expanded(var a : TGtkCellRenderer) : guint;
+begin
+ is_expanded:=(a.flag0 and bm_TGtkCellRenderer_is_expanded) shr bp_TGtkCellRenderer_is_expanded;
+end;
+
+procedure set_is_expanded(var a : TGtkCellRenderer; __is_expanded : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_expanded shl bp_TGtkCellRenderer_is_expanded) and bm_TGtkCellRenderer_is_expanded);
+end;
+
+function cell_background_set(var a : TGtkCellRenderer) : guint;
+begin
+ cell_background_set:=(a.flag0 and bm_TGtkCellRenderer_cell_background_set) shr bp_TGtkCellRenderer_cell_background_set;
+end;
+
+procedure set_cell_background_set(var a : TGtkCellRenderer; __cell_background_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__cell_background_set shl bp_TGtkCellRenderer_cell_background_set) and bm_TGtkCellRenderer_cell_background_set);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcellrenderercombo.inc b/packages/gtk2/src/gtk+/gtk/gtkcellrenderercombo.inc
new file mode 100644
index 0000000000..8086639feb
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcellrenderercombo.inc
@@ -0,0 +1,80 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ PGtkCellRendererCombo = ^TGtkCellRendererCombo;
+ TGtkCellRendererCombo = record
+ parent : TGtkCellRendererText;
+ model : PGtkTreeModel;
+ text_column: gint;
+ has_entry: gboolean;
+ {< private >}
+ focus_out_id: guint;
+ end;
+
+ PGtkCellRendererComboClass = ^TGtkCellRendererComboClass;
+ TGtkCellRendererComboClass = record
+ parent_class : TGtkCellRendererTextClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ function GTK_TYPE_CELL_RENDERER_COMBO: GType;
+ function GTK_CELL_RENDERER_COMBO(obj: Pointer): PGtkCellRendererCombo;
+ function GTK_CELL_RENDERER_COMBO_CLASS(klass: pointer): PGtkCellRendererComboClass;
+ function GTK_IS_CELL_RENDERER_COMBO(obj: pointer): boolean;
+ function GTK_IS_CELL_RENDERER_COMBO_CLASS(klass: pointer):boolean;
+ function GTK_CELL_RENDERER_COMBO_GET_CLASS(obj: pointer): PGtkCellRendererComboClass;
+
+ function gtk_cell_renderer_combo_get_type:TGtkType; cdecl; external gtklib;
+ function gtk_cell_renderer_combo_new: PGtkCellRendererCombo; cdecl; external gtklib;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+ function GTK_TYPE_CELL_RENDERER_COMBO: GType;
+ begin
+ Result:= gtk_cell_renderer_combo_get_type ();
+ end;
+
+ function GTK_CELL_RENDERER_COMBO(obj: Pointer): PGtkCellRendererCombo;
+ begin
+ Result:= PGtkCellRendererCombo(GTK_CHECK_CAST(obj, GTK_TYPE_CELL_RENDERER_COMBO));
+ end;
+
+ function GTK_CELL_RENDERER_COMBO_CLASS(klass: pointer): PGtkCellRendererComboClass;
+ begin
+ Result:= PGtkCellRendererComboClass(GTK_CHECK_CLASS_CAST(klass, GTK_TYPE_CELL_RENDERER_COMBO));
+ end;
+
+ function GTK_IS_CELL_RENDERER_COMBO(obj: pointer): boolean;
+ begin
+ Result:= GTK_CHECK_TYPE(obj, GTK_TYPE_CELL_RENDERER_COMBO);
+ end;
+
+ function GTK_IS_CELL_RENDERER_COMBO_CLASS(klass: pointer):boolean;
+ begin
+ Result:= GTK_CHECK_CLASS_TYPE(klass, GTK_TYPE_CELL_RENDERER_COMBO);
+ end;
+
+ function GTK_CELL_RENDERER_COMBO_GET_CLASS(obj: pointer): PGtkCellRendererComboClass;
+ begin
+ Result:= PGtkCellRendererComboClass(GTK_CHECK_GET_CLASS(obj, GTK_TYPE_CELL_RENDERER_COMBO));
+ end;
+
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcellrendererpixbuf.inc b/packages/gtk2/src/gtk+/gtk/gtkcellrendererpixbuf.inc
new file mode 100644
index 0000000000..ec267cf2a4
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcellrendererpixbuf.inc
@@ -0,0 +1,79 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkCellRendererPixbuf = ^TGtkCellRendererPixbuf;
+ TGtkCellRendererPixbuf = record
+ parent : TGtkCellRenderer;
+ pixbuf : PGdkPixbuf;
+ pixbuf_expander_open : PGdkPixbuf;
+ pixbuf_expander_closed : PGdkPixbuf;
+ end;
+
+{ Padding for future expansion }
+ PGtkCellRendererPixbufClass = ^TGtkCellRendererPixbufClass;
+ TGtkCellRendererPixbufClass = record
+ parent_class : TGtkCellRendererClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_CELL_RENDERER_PIXBUF : GType;
+function GTK_CELL_RENDERER_PIXBUF(obj: pointer) : PGtkCellRendererPixbuf;
+function GTK_CELL_RENDERER_PIXBUF_CLASS(klass: pointer) : PGtkCellRendererPixbufClass;
+function GTK_IS_CELL_RENDERER_PIXBUF(obj: pointer) : boolean;
+function GTK_IS_CELL_RENDERER_PIXBUF_CLASS(klass: pointer) : boolean;
+function GTK_CELL_RENDERER_PIXBUF_GET_CLASS(obj: pointer) : PGtkCellRendererPixbufClass;
+
+
+function gtk_cell_renderer_pixbuf_get_type:TGtkType; cdecl; external gtklib;
+function gtk_cell_renderer_pixbuf_new:PGtkCellRenderer; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CELL_RENDERER_PIXBUF : GType;
+begin
+ GTK_TYPE_CELL_RENDERER_PIXBUF:=gtk_cell_renderer_pixbuf_get_type;
+end;
+
+function GTK_CELL_RENDERER_PIXBUF(obj: pointer) : PGtkCellRendererPixbuf;
+begin
+ GTK_CELL_RENDERER_PIXBUF:=PGtkCellRendererPixbuf(GTK_CHECK_CAST(obj,GTK_TYPE_CELL_RENDERER_PIXBUF));
+end;
+
+function GTK_CELL_RENDERER_PIXBUF_CLASS(klass: pointer) : PGtkCellRendererPixbufClass;
+begin
+ GTK_CELL_RENDERER_PIXBUF_CLASS:=PGtkCellRendererPixbufClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_CELL_RENDERER_PIXBUF));
+end;
+
+function GTK_IS_CELL_RENDERER_PIXBUF(obj: pointer) : boolean;
+begin
+ GTK_IS_CELL_RENDERER_PIXBUF:=GTK_CHECK_TYPE(obj,GTK_TYPE_CELL_RENDERER_PIXBUF);
+end;
+
+function GTK_IS_CELL_RENDERER_PIXBUF_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_CELL_RENDERER_PIXBUF_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_CELL_RENDERER_PIXBUF);
+end;
+
+function GTK_CELL_RENDERER_PIXBUF_GET_CLASS(obj: pointer) : PGtkCellRendererPixbufClass;
+begin
+ GTK_CELL_RENDERER_PIXBUF_GET_CLASS:=PGtkCellRendererPixbufClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_CELL_RENDERER_PIXBUF));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcellrenderertext.inc b/packages/gtk2/src/gtk+/gtk/gtkcellrenderertext.inc
new file mode 100644
index 0000000000..620ebfa4f5
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcellrenderertext.inc
@@ -0,0 +1,233 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkCellRendererText = ^TGtkCellRendererText;
+ TGtkCellRendererText = record
+ parent : TGtkCellRenderer;
+ text : Pgchar;
+ font : PPangoFontDescription;
+ font_scale : gdouble;
+ foreground : TPangoColor;
+ background : TPangoColor;
+ extra_attrs : PPangoAttrList;
+ underline_style : TPangoUnderline;
+ rise : gint;
+ fixed_height_rows : gint;
+ flag0 : word;
+ end;
+
+{ Padding for future expansion }
+ PGtkCellRendererTextClass = ^TGtkCellRendererTextClass;
+ TGtkCellRendererTextClass = record
+ parent_class : TGtkCellRendererClass;
+ edited : procedure (cell_renderer_text:PGtkCellRendererText; path:Pgchar; new_text:Pgchar); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+const
+ bm_TGtkCellRendererText_strikethrough = $1;
+ bp_TGtkCellRendererText_strikethrough = 0;
+ bm_TGtkCellRendererText_editable = $2;
+ bp_TGtkCellRendererText_editable = 1;
+ bm_TGtkCellRendererText_scale_set = $4;
+ bp_TGtkCellRendererText_scale_set = 2;
+ bm_TGtkCellRendererText_foreground_set = $8;
+ bp_TGtkCellRendererText_foreground_set = 3;
+ bm_TGtkCellRendererText_background_set = $10;
+ bp_TGtkCellRendererText_background_set = 4;
+ bm_TGtkCellRendererText_underline_set = $20;
+ bp_TGtkCellRendererText_underline_set = 5;
+ bm_TGtkCellRendererText_rise_set = $40;
+ bp_TGtkCellRendererText_rise_set = 6;
+ bm_TGtkCellRendererText_strikethrough_set = $80;
+ bp_TGtkCellRendererText_strikethrough_set = 7;
+ bm_TGtkCellRendererText_editable_set = $100;
+ bp_TGtkCellRendererText_editable_set = 8;
+ bm_TGtkCellRendererText_calc_fixed_height = $200;
+ bp_TGtkCellRendererText_calc_fixed_height = 9;
+
+
+function GTK_TYPE_CELL_RENDERER_TEXT : GType;
+function GTK_CELL_RENDERER_TEXT(obj: pointer) : PGtkCellRendererText;
+function GTK_CELL_RENDERER_TEXT_CLASS(klass: pointer) : PGtkCellRendererTextClass;
+function GTK_IS_CELL_RENDERER_TEXT(obj: pointer) : boolean;
+function GTK_IS_CELL_RENDERER_TEXT_CLASS(klass: pointer) : boolean;
+function GTK_CELL_RENDERER_TEXT_GET_CLASS(obj: pointer) : PGtkCellRendererTextClass;
+
+
+function strikethrough(var a : TGtkCellRendererText) : guint; overload;
+procedure set_strikethrough(var a : TGtkCellRendererText; __strikethrough : guint); overload;
+function editable(var a : TGtkCellRendererText) : guint; overload;
+procedure set_editable(var a : TGtkCellRendererText; __editable : guint); overload;
+function scale_set(var a : TGtkCellRendererText) : guint; overload;
+procedure set_scale_set(var a : TGtkCellRendererText; __scale_set : guint); overload;
+function foreground_set(var a : TGtkCellRendererText) : guint;
+procedure set_foreground_set(var a : TGtkCellRendererText; __foreground_set : guint);
+function background_set(var a : TGtkCellRendererText) : guint;
+procedure set_background_set(var a : TGtkCellRendererText; __background_set : guint);
+function underline_set(var a : TGtkCellRendererText) : guint; overload;
+procedure set_underline_set(var a : TGtkCellRendererText; __underline_set : guint); overload;
+function rise_set(var a : TGtkCellRendererText) : guint; overload;
+procedure set_rise_set(var a : TGtkCellRendererText; __rise_set : guint); overload;
+function strikethrough_set(var a : TGtkCellRendererText) : guint; overload;
+procedure set_strikethrough_set(var a : TGtkCellRendererText; __strikethrough_set : guint); overload;
+function editable_set(var a : TGtkCellRendererText) : guint; overload;
+procedure set_editable_set(var a : TGtkCellRendererText; __editable_set : guint); overload;
+function calc_fixed_height(var a : TGtkCellRendererText) : guint;
+procedure set_calc_fixed_height(var a : TGtkCellRendererText; __calc_fixed_height : guint);
+
+function gtk_cell_renderer_text_get_type:TGtkType; cdecl; external gtklib;
+function gtk_cell_renderer_text_new:PGtkCellRenderer; cdecl; external gtklib;
+procedure gtk_cell_renderer_text_set_fixed_height_from_font(renderer:PGtkCellRendererText; number_of_rows:gint); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CELL_RENDERER_TEXT : GType;
+begin
+ GTK_TYPE_CELL_RENDERER_TEXT:=gtk_cell_renderer_text_get_type;
+end;
+
+function GTK_CELL_RENDERER_TEXT(obj: pointer) : PGtkCellRendererText;
+begin
+ GTK_CELL_RENDERER_TEXT:=PGtkCellRendererText(GTK_CHECK_CAST(obj,GTK_TYPE_CELL_RENDERER_TEXT));
+end;
+
+function GTK_CELL_RENDERER_TEXT_CLASS(klass: pointer) : PGtkCellRendererTextClass;
+begin
+ GTK_CELL_RENDERER_TEXT_CLASS:=PGtkCellRendererTextClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_CELL_RENDERER_TEXT));
+end;
+
+function GTK_IS_CELL_RENDERER_TEXT(obj: pointer) : boolean;
+begin
+ GTK_IS_CELL_RENDERER_TEXT:=GTK_CHECK_TYPE(obj,GTK_TYPE_CELL_RENDERER_TEXT);
+end;
+
+function GTK_IS_CELL_RENDERER_TEXT_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_CELL_RENDERER_TEXT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_CELL_RENDERER_TEXT);
+end;
+
+function GTK_CELL_RENDERER_TEXT_GET_CLASS(obj: pointer) : PGtkCellRendererTextClass;
+begin
+ GTK_CELL_RENDERER_TEXT_GET_CLASS:=PGtkCellRendererTextClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_CELL_RENDERER_TEXT));
+end;
+
+function strikethrough(var a : TGtkCellRendererText) : guint;
+begin
+ strikethrough:=(a.flag0 and bm_TGtkCellRendererText_strikethrough) shr bp_TGtkCellRendererText_strikethrough;
+end;
+
+procedure set_strikethrough(var a : TGtkCellRendererText; __strikethrough : guint);
+begin
+ a.flag0:=a.flag0 or ((__strikethrough shl bp_TGtkCellRendererText_strikethrough) and bm_TGtkCellRendererText_strikethrough);
+end;
+
+function editable(var a : TGtkCellRendererText) : guint;
+begin
+ editable:=(a.flag0 and bm_TGtkCellRendererText_editable) shr bp_TGtkCellRendererText_editable;
+end;
+
+procedure set_editable(var a : TGtkCellRendererText; __editable : guint);
+begin
+ a.flag0:=a.flag0 or ((__editable shl bp_TGtkCellRendererText_editable) and bm_TGtkCellRendererText_editable);
+end;
+
+function scale_set(var a : TGtkCellRendererText) : guint;
+begin
+ scale_set:=(a.flag0 and bm_TGtkCellRendererText_scale_set) shr bp_TGtkCellRendererText_scale_set;
+end;
+
+procedure set_scale_set(var a : TGtkCellRendererText; __scale_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__scale_set shl bp_TGtkCellRendererText_scale_set) and bm_TGtkCellRendererText_scale_set);
+end;
+
+function foreground_set(var a : TGtkCellRendererText) : guint;
+begin
+ foreground_set:=(a.flag0 and bm_TGtkCellRendererText_foreground_set) shr bp_TGtkCellRendererText_foreground_set;
+end;
+
+procedure set_foreground_set(var a : TGtkCellRendererText; __foreground_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__foreground_set shl bp_TGtkCellRendererText_foreground_set) and bm_TGtkCellRendererText_foreground_set);
+end;
+
+function background_set(var a : TGtkCellRendererText) : guint;
+begin
+ background_set:=(a.flag0 and bm_TGtkCellRendererText_background_set) shr bp_TGtkCellRendererText_background_set;
+end;
+
+procedure set_background_set(var a : TGtkCellRendererText; __background_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__background_set shl bp_TGtkCellRendererText_background_set) and bm_TGtkCellRendererText_background_set);
+end;
+
+function underline_set(var a : TGtkCellRendererText) : guint;
+begin
+ underline_set:=(a.flag0 and bm_TGtkCellRendererText_underline_set) shr bp_TGtkCellRendererText_underline_set;
+end;
+
+procedure set_underline_set(var a : TGtkCellRendererText; __underline_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__underline_set shl bp_TGtkCellRendererText_underline_set) and bm_TGtkCellRendererText_underline_set);
+end;
+
+function rise_set(var a : TGtkCellRendererText) : guint;
+begin
+ rise_set:=(a.flag0 and bm_TGtkCellRendererText_rise_set) shr bp_TGtkCellRendererText_rise_set;
+end;
+
+procedure set_rise_set(var a : TGtkCellRendererText; __rise_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__rise_set shl bp_TGtkCellRendererText_rise_set) and bm_TGtkCellRendererText_rise_set);
+end;
+
+function strikethrough_set(var a : TGtkCellRendererText) : guint;
+begin
+ strikethrough_set:=(a.flag0 and bm_TGtkCellRendererText_strikethrough_set) shr bp_TGtkCellRendererText_strikethrough_set;
+end;
+
+procedure set_strikethrough_set(var a : TGtkCellRendererText; __strikethrough_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__strikethrough_set shl bp_TGtkCellRendererText_strikethrough_set) and bm_TGtkCellRendererText_strikethrough_set);
+end;
+
+function editable_set(var a : TGtkCellRendererText) : guint;
+begin
+ editable_set:=(a.flag0 and bm_TGtkCellRendererText_editable_set) shr bp_TGtkCellRendererText_editable_set;
+end;
+
+procedure set_editable_set(var a : TGtkCellRendererText; __editable_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__editable_set shl bp_TGtkCellRendererText_editable_set) and bm_TGtkCellRendererText_editable_set);
+end;
+
+function calc_fixed_height(var a : TGtkCellRendererText) : guint;
+begin
+ calc_fixed_height:=(a.flag0 and bm_TGtkCellRendererText_calc_fixed_height) shr bp_TGtkCellRendererText_calc_fixed_height;
+end;
+
+procedure set_calc_fixed_height(var a : TGtkCellRendererText; __calc_fixed_height : guint);
+begin
+ a.flag0:=a.flag0 or ((__calc_fixed_height shl bp_TGtkCellRendererText_calc_fixed_height) and bm_TGtkCellRendererText_calc_fixed_height);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcellrenderertoggle.inc b/packages/gtk2/src/gtk+/gtk/gtkcellrenderertoggle.inc
new file mode 100644
index 0000000000..5820c9213f
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcellrenderertoggle.inc
@@ -0,0 +1,129 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkCellRendererToggle = ^TGtkCellRendererToggle;
+ TGtkCellRendererToggle = record
+ parent : TGtkCellRenderer;
+ flag0 : word;
+ end;
+
+{ Padding for future expansion }
+ PGtkCellRendererToggleClass = ^TGtkCellRendererToggleClass;
+ TGtkCellRendererToggleClass = record
+ parent_class : TGtkCellRendererClass;
+ toggled : procedure (cell_renderer_toggle:PGtkCellRendererToggle; path:Pgchar); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+const
+ bm_TGtkCellRendererToggle_active = $1;
+ bp_TGtkCellRendererToggle_active = 0;
+ bm_TGtkCellRendererToggle_activatable = $2;
+ bp_TGtkCellRendererToggle_activatable = 1;
+ bm_TGtkCellRendererToggle_radio = $4;
+ bp_TGtkCellRendererToggle_radio = 2;
+
+
+function GTK_TYPE_CELL_RENDERER_TOGGLE : GType;
+function GTK_CELL_RENDERER_TOGGLE(obj: pointer) : PGtkCellRendererToggle;
+function GTK_CELL_RENDERER_TOGGLE_CLASS(klass: pointer) : PGtkCellRendererToggleClass;
+function GTK_IS_CELL_RENDERER_TOGGLE(obj: pointer) : boolean;
+function GTK_IS_CELL_RENDERER_TOGGLE_CLASS(klass: pointer) : boolean;
+function GTK_CELL_RENDERER_TOGGLE_GET_CLASS(obj: pointer) : PGtkCellRendererToggleClass;
+
+
+function active(var a : TGtkCellRendererToggle) : guint; overload;
+procedure set_active(var a : TGtkCellRendererToggle; __active : guint); overload;
+function activatable(var a : TGtkCellRendererToggle) : guint;
+procedure set_activatable(var a : TGtkCellRendererToggle; __activatable : guint);
+function radio(var a : TGtkCellRendererToggle) : guint;
+procedure set_radio(var a : TGtkCellRendererToggle; __radio : guint);
+
+
+function gtk_cell_renderer_toggle_get_type:TGtkType; cdecl; external gtklib;
+function gtk_cell_renderer_toggle_new:PGtkCellRenderer; cdecl; external gtklib;
+function gtk_cell_renderer_toggle_get_radio(toggle:PGtkCellRendererToggle):gboolean; cdecl; external gtklib;
+procedure gtk_cell_renderer_toggle_set_radio(toggle:PGtkCellRendererToggle; radio:gboolean); cdecl; external gtklib;
+function gtk_cell_renderer_toggle_get_active(toggle:PGtkCellRendererToggle):gboolean; cdecl; external gtklib;
+procedure gtk_cell_renderer_toggle_set_active(toggle:PGtkCellRendererToggle; setting:gboolean); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CELL_RENDERER_TOGGLE : GType;
+begin
+ GTK_TYPE_CELL_RENDERER_TOGGLE:=gtk_cell_renderer_toggle_get_type;
+end;
+
+function GTK_CELL_RENDERER_TOGGLE(obj: pointer) : PGtkCellRendererToggle;
+begin
+ GTK_CELL_RENDERER_TOGGLE:=PGtkCellRendererToggle(GTK_CHECK_CAST(obj,GTK_TYPE_CELL_RENDERER_TOGGLE));
+end;
+
+function GTK_CELL_RENDERER_TOGGLE_CLASS(klass: pointer) : PGtkCellRendererToggleClass;
+begin
+ GTK_CELL_RENDERER_TOGGLE_CLASS:=PGtkCellRendererToggleClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_CELL_RENDERER_TOGGLE));
+end;
+
+function GTK_IS_CELL_RENDERER_TOGGLE(obj: pointer) : boolean;
+begin
+ GTK_IS_CELL_RENDERER_TOGGLE:=GTK_CHECK_TYPE(obj,GTK_TYPE_CELL_RENDERER_TOGGLE);
+end;
+
+function GTK_IS_CELL_RENDERER_TOGGLE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_CELL_RENDERER_TOGGLE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_CELL_RENDERER_TOGGLE);
+end;
+
+function GTK_CELL_RENDERER_TOGGLE_GET_CLASS(obj: pointer) : PGtkCellRendererToggleClass;
+begin
+ GTK_CELL_RENDERER_TOGGLE_GET_CLASS:=PGtkCellRendererToggleClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_CELL_RENDERER_TOGGLE));
+end;
+
+function active(var a : TGtkCellRendererToggle) : guint;
+begin
+ active:=(a.flag0 and bm_TGtkCellRendererToggle_active) shr bp_TGtkCellRendererToggle_active;
+end;
+
+procedure set_active(var a : TGtkCellRendererToggle; __active : guint);
+begin
+ a.flag0:=a.flag0 or ((__active shl bp_TGtkCellRendererToggle_active) and bm_TGtkCellRendererToggle_active);
+end;
+
+function activatable(var a : TGtkCellRendererToggle) : guint;
+begin
+ activatable:=(a.flag0 and bm_TGtkCellRendererToggle_activatable) shr bp_TGtkCellRendererToggle_activatable;
+end;
+
+procedure set_activatable(var a : TGtkCellRendererToggle; __activatable : guint);
+begin
+ a.flag0:=a.flag0 or ((__activatable shl bp_TGtkCellRendererToggle_activatable) and bm_TGtkCellRendererToggle_activatable);
+end;
+
+function radio(var a : TGtkCellRendererToggle) : guint;
+begin
+ radio:=(a.flag0 and bm_TGtkCellRendererToggle_radio) shr bp_TGtkCellRendererToggle_radio;
+end;
+
+procedure set_radio(var a : TGtkCellRendererToggle; __radio : guint);
+begin
+ a.flag0:=a.flag0 or ((__radio shl bp_TGtkCellRendererToggle_radio) and bm_TGtkCellRendererToggle_radio);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcheckbutton.inc b/packages/gtk2/src/gtk+/gtk/gtkcheckbutton.inc
new file mode 100644
index 0000000000..2cb1401cc7
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcheckbutton.inc
@@ -0,0 +1,80 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkCheckButton = ^TGtkCheckButton;
+ TGtkCheckButton = record
+ toggle_button : TGtkToggleButton;
+ end;
+
+{ Padding for future expansion }
+ PGtkCheckButtonClass = ^TGtkCheckButtonClass;
+ TGtkCheckButtonClass = record
+ parent_class : TGtkToggleButtonClass;
+ draw_indicator : procedure (check_button:PGtkCheckButton; area:PGdkRectangle); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_CHECK_BUTTON : GType;
+function GTK_CHECK_BUTTON(obj: pointer) : PGtkCheckButton;
+function GTK_CHECK_BUTTON_CLASS(klass: pointer) : PGtkCheckButtonClass;
+function GTK_IS_CHECK_BUTTON(obj: pointer) : boolean;
+function GTK_IS_CHECK_BUTTON_CLASS(klass: pointer) : boolean;
+function GTK_CHECK_BUTTON_GET_CLASS(obj: pointer) : PGtkCheckButtonClass;
+
+
+function gtk_check_button_get_type:TGtkType; cdecl; external gtklib;
+function gtk_check_button_new:PGtkWidget; cdecl; external gtklib;
+function gtk_check_button_new_with_label(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_check_button_new_with_mnemonic(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+procedure _gtk_check_button_get_props(check_button:PGtkCheckButton; indicator_size:Pgint; indicator_spacing:Pgint); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CHECK_BUTTON : GType;
+begin
+ GTK_TYPE_CHECK_BUTTON:=gtk_check_button_get_type;
+end;
+
+function GTK_CHECK_BUTTON(obj: pointer) : PGtkCheckButton;
+begin
+ GTK_CHECK_BUTTON:=PGtkCheckButton(GTK_CHECK_CAST(obj,GTK_TYPE_CHECK_BUTTON));
+end;
+
+function GTK_CHECK_BUTTON_CLASS(klass: pointer) : PGtkCheckButtonClass;
+begin
+ GTK_CHECK_BUTTON_CLASS:=PGtkCheckButtonClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_CHECK_BUTTON));
+end;
+
+function GTK_IS_CHECK_BUTTON(obj: pointer) : boolean;
+begin
+ GTK_IS_CHECK_BUTTON:=GTK_CHECK_TYPE(obj,GTK_TYPE_CHECK_BUTTON);
+end;
+
+function GTK_IS_CHECK_BUTTON_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_CHECK_BUTTON_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_CHECK_BUTTON);
+end;
+
+function GTK_CHECK_BUTTON_GET_CLASS(obj: pointer) : PGtkCheckButtonClass;
+begin
+ GTK_CHECK_BUTTON_GET_CLASS:=PGtkCheckButtonClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_CHECK_BUTTON));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcheckmenuitem.inc b/packages/gtk2/src/gtk+/gtk/gtkcheckmenuitem.inc
new file mode 100644
index 0000000000..207dbe7f63
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcheckmenuitem.inc
@@ -0,0 +1,142 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkCheckMenuItem = ^TGtkCheckMenuItem;
+ TGtkCheckMenuItem = record
+ menu_item : TGtkMenuItem;
+ flag0 : word;
+ end;
+
+{ Padding for future expansion }
+ PGtkCheckMenuItemClass = ^TGtkCheckMenuItemClass;
+ TGtkCheckMenuItemClass = record
+ parent_class : TGtkMenuItemClass;
+ toggled : procedure (check_menu_item:PGtkCheckMenuItem); cdecl;
+ draw_indicator : procedure (check_menu_item:PGtkCheckMenuItem; area:PGdkRectangle); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkCheckMenuItem_active = $1;
+ bp_TGtkCheckMenuItem_active = 0;
+ bm_TGtkCheckMenuItem_always_show_toggle = $2;
+ bp_TGtkCheckMenuItem_always_show_toggle = 1;
+ bm_TGtkCheckMenuItem_inconsistent = $4;
+ bp_TGtkCheckMenuItem_inconsistent = 2;
+function GTK_TYPE_CHECK_MENU_ITEM : GType;
+function GTK_CHECK_MENU_ITEM(obj: pointer) : PGtkCheckMenuItem;
+function GTK_CHECK_MENU_ITEM_CLASS(klass: pointer) : PGtkCheckMenuItemClass;
+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_CLASS(obj: pointer) : PGtkCheckMenuItemClass;
+
+function active(var a : TGtkCheckMenuItem) : guint; overload;
+procedure set_active(var a : TGtkCheckMenuItem; __active : guint); overload;
+function always_show_toggle(var a : TGtkCheckMenuItem) : guint;
+procedure set_always_show_toggle(var a : TGtkCheckMenuItem; __always_show_toggle : guint);
+function inconsistent(var a : TGtkCheckMenuItem) : guint; overload;
+procedure set_inconsistent(var a : TGtkCheckMenuItem; __inconsistent : guint); overload;
+
+
+function gtk_check_menu_item_get_type:TGtkType; cdecl; external gtklib;
+function gtk_check_menu_item_new:PGtkWidget; cdecl; external gtklib;
+function gtk_check_menu_item_new_with_label(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_check_menu_item_new_with_mnemonic(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+procedure gtk_check_menu_item_set_active(check_menu_item:PGtkCheckMenuItem; is_active:gboolean); cdecl; external gtklib;
+function gtk_check_menu_item_get_active(check_menu_item:PGtkCheckMenuItem):gboolean; cdecl; external gtklib;
+procedure gtk_check_menu_item_toggled(check_menu_item:PGtkCheckMenuItem); cdecl; external gtklib;
+procedure gtk_check_menu_item_set_inconsistent(check_menu_item:PGtkCheckMenuItem; setting:gboolean); cdecl; external gtklib;
+function gtk_check_menu_item_get_inconsistent(check_menu_item:PGtkCheckMenuItem):gboolean; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_check_menu_item_set_show_toggle(menu_item:PGtkCheckMenuItem; always:gboolean); cdecl; external gtklib;
+
+procedure gtk_check_menu_item_set_state(check_menu_item:PGtkCheckMenuItem; is_active:gboolean);
+{$endif}
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CHECK_MENU_ITEM : GType;
+begin
+ GTK_TYPE_CHECK_MENU_ITEM:=gtk_check_menu_item_get_type;
+end;
+
+function GTK_CHECK_MENU_ITEM(obj: pointer) : PGtkCheckMenuItem;
+begin
+ GTK_CHECK_MENU_ITEM:=PGtkCheckMenuItem(GTK_CHECK_CAST(obj,GTK_TYPE_CHECK_MENU_ITEM));
+end;
+
+function GTK_CHECK_MENU_ITEM_CLASS(klass: pointer) : PGtkCheckMenuItemClass;
+begin
+ GTK_CHECK_MENU_ITEM_CLASS:=PGtkCheckMenuItemClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_CHECK_MENU_ITEM));
+end;
+
+function GTK_IS_CHECK_MENU_ITEM(obj: pointer) : boolean;
+begin
+ GTK_IS_CHECK_MENU_ITEM:=GTK_CHECK_TYPE(obj,GTK_TYPE_CHECK_MENU_ITEM);
+end;
+
+function GTK_IS_CHECK_MENU_ITEM_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_CHECK_MENU_ITEM_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_CHECK_MENU_ITEM);
+end;
+
+function GTK_CHECK_MENU_ITEM_GET_CLASS(obj: pointer) : PGtkCheckMenuItemClass;
+begin
+ GTK_CHECK_MENU_ITEM_GET_CLASS:=PGtkCheckMenuItemClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_CHECK_MENU_ITEM));
+end;
+
+function active(var a : TGtkCheckMenuItem) : guint;
+begin
+ active:=(a.flag0 and bm_TGtkCheckMenuItem_active) shr bp_TGtkCheckMenuItem_active;
+end;
+
+procedure set_active(var a : TGtkCheckMenuItem; __active : guint);
+begin
+ a.flag0:=a.flag0 or ((__active shl bp_TGtkCheckMenuItem_active) and bm_TGtkCheckMenuItem_active);
+end;
+
+function always_show_toggle(var a : TGtkCheckMenuItem) : guint;
+begin
+ always_show_toggle:=(a.flag0 and bm_TGtkCheckMenuItem_always_show_toggle) shr bp_TGtkCheckMenuItem_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_TGtkCheckMenuItem_always_show_toggle) and bm_TGtkCheckMenuItem_always_show_toggle);
+end;
+
+function inconsistent(var a : TGtkCheckMenuItem) : guint;
+begin
+ inconsistent:=(a.flag0 and bm_TGtkCheckMenuItem_inconsistent) shr bp_TGtkCheckMenuItem_inconsistent;
+end;
+
+procedure set_inconsistent(var a : TGtkCheckMenuItem; __inconsistent : guint);
+begin
+ a.flag0:=a.flag0 or ((__inconsistent shl bp_TGtkCheckMenuItem_inconsistent) and bm_TGtkCheckMenuItem_inconsistent);
+end;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_check_menu_item_set_state(check_menu_item:PGtkCheckMenuItem; is_active:gboolean);
+begin
+ gtk_check_menu_item_set_active(check_menu_item,is_active);
+end;
+{$endif}
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkclipboard.inc b/packages/gtk2/src/gtk+/gtk/gtkclipboard.inc
new file mode 100644
index 0000000000..8923118d5b
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkclipboard.inc
@@ -0,0 +1,50 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkClipboard = pointer;
+
+ TGtkClipboardReceivedFunc = procedure (clipboard:PGtkClipboard; selection_data:PGtkSelectionData; data:gpointer); cdecl;
+
+ TGtkClipboardTextReceivedFunc = procedure (clipboard:PGtkClipboard; text:Pgchar; data:gpointer); cdecl;
+{ Should these functions have GtkClipboard clipboard as the first argument?
+ right now for ClearFunc, you may have trouble determining _which_ clipboard
+ was cleared, if you reuse your ClearFunc for multiple clipboards.
+ }
+
+ TGtkClipboardGetFunc = procedure (clipboard:PGtkClipboard; selection_data:PGtkSelectionData; info:guint; user_data_or_owner:gpointer); cdecl;
+
+ TGtkClipboardClearFunc = procedure (clipboard:PGtkClipboard; user_data_or_owner:gpointer); cdecl;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function gtk_clipboard_get_for_display(display:PGdkDisplay; selection:TGdkAtom):PGtkClipboard; cdecl; external gtklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gtk_clipboard_get(selection:TGdkAtom):PGtkClipboard; cdecl; external gtklib;
+{$endif}
+
+function gtk_clipboard_get_display(clipboard:PGtkClipboard):PGdkDisplay; cdecl; external gtklib;
+function gtk_clipboard_set_with_data(clipboard:PGtkClipboard; targets:PGtkTargetEntry; n_targets:guint; get_func:TGtkClipboardGetFunc; clear_func:TGtkClipboardClearFunc;
+ user_data:gpointer):gboolean; cdecl; external gtklib;
+function gtk_clipboard_set_with_owner(clipboard:PGtkClipboard; targets:PGtkTargetEntry; n_targets:guint; get_func:TGtkClipboardGetFunc; clear_func:TGtkClipboardClearFunc;
+ owner:PGObject):gboolean; cdecl; external gtklib;
+function gtk_clipboard_get_owner(clipboard:PGtkClipboard):PGObject; cdecl; external gtklib;
+procedure gtk_clipboard_clear(clipboard:PGtkClipboard); cdecl; external gtklib;
+procedure gtk_clipboard_set_text(clipboard:PGtkClipboard; text:Pgchar; len:gint); cdecl; external gtklib;
+procedure gtk_clipboard_request_contents(clipboard:PGtkClipboard; target:TGdkAtom; callback:TGtkClipboardReceivedFunc; user_data:gpointer); cdecl; external gtklib;
+procedure gtk_clipboard_request_text(clipboard:PGtkClipboard; callback:TGtkClipboardTextReceivedFunc; user_data:gpointer); cdecl; external gtklib;
+function gtk_clipboard_wait_for_contents(clipboard:PGtkClipboard; target:TGdkAtom):PGtkSelectionData; cdecl; external gtklib;
+function gtk_clipboard_wait_for_text(clipboard:PGtkClipboard):Pgchar; cdecl; external gtklib;
+function gtk_clipboard_wait_is_text_available(clipboard:PGtkClipboard):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkclist.inc b/packages/gtk2/src/gtk+/gtk/gtkclist.inc
new file mode 100644
index 0000000000..05bdc967ad
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkclist.inc
@@ -0,0 +1,726 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkCList = ^TGtkCList;
+ PGtkCListColumn = ^TGtkCListColumn;
+ PGtkCListRow = ^TGtkCListRow;
+ PGtkCell = ^TGtkCell;
+
+{ cell types }
+ PGtkCellType = ^TGtkCellType;
+ TGtkCellType = (
+ GTK_CELL_EMPTY,
+ GTK_CELL_TEXT,
+ GTK_CELL_PIXMAP,
+ GTK_CELL_PIXTEXT,
+ GTK_CELL_WIDGET
+ );
+
+ PGtkCListDragPos = ^TGtkCListDragPos;
+ TGtkCListDragPos = (
+ GTK_CLIST_DRAG_NONE,
+ GTK_CLIST_DRAG_BEFORE,
+ GTK_CLIST_DRAG_INTO,
+ GTK_CLIST_DRAG_AFTER
+ );
+
+ PGtkButtonAction = ^TGtkButtonAction;
+ TGtkButtonAction = longint;
+
+
+ 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;
+
+{ mem chunks }
+{ allocation rectangle after the conatiner_border_width
+ and the width of the shadow border }
+{ rows }
+{ columns }
+{ dynamicly allocated array of column structures }
+{ the scrolling window and its height and width to
+ make things a little speedier }
+{ offsets for scrolling }
+{ border shadow style }
+{ the list's selection mode (gtkenums.h) }
+{ list of selected rows }
+{ mouse buttons }
+{ dnd }
+{ scroll adjustments }
+{ xor GC for the vertical drag line }
+{ gc for drawing unselected cells }
+{ cursor used to indicate dragging }
+{ the current x-pixel location of the xor-drag line }
+{ focus handling }
+{ dragging the selection }
+ TGtkCList = record
+ container : TGtkContainer;
+ flags : guint16;
+ row_mem_chunk : PGMemChunk;
+ cell_mem_chunk : PGMemChunk;
+ freeze_count : guint;
+ internal_allocation : TGdkRectangle;
+ rows : 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;
+ focus_header_column : gint;
+ anchor : gint;
+ anchor_state : TGtkStateType;
+ drag_pos : gint;
+ htimer : gint;
+ vtimer : gint;
+ sort_type : TGtkSortType;
+ compare : TGtkCListCompareFunc;
+ sort_column : gint;
+ drag_highlight_row : gint;
+ drag_highlight_pos : TGtkCListDragPos;
+ end;
+
+ PGtkCListClass = ^TGtkCListClass;
+ 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 : function (clist:PGtkCList; row:gint; text:array of Pgchar):gint; cdecl;
+ remove_row : procedure (clist:PGtkCList; row:gint); cdecl;
+ set_cell_contents : procedure (clist:PGtkCList; clist_row:PGtkCListRow; column:gint; _type: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;
+
+{ Cell Structures }
+ PGtkCellText = ^TGtkCellText;
+ TGtkCellText = record
+ _type : TGtkCellType;
+ vertical : gint16;
+ horizontal : gint16;
+ style : PGtkStyle;
+ text : Pgchar;
+ end;
+
+ PGtkCellPixmap = ^TGtkCellPixmap;
+ TGtkCellPixmap = record
+ _type : TGtkCellType;
+ vertical : gint16;
+ horizontal : gint16;
+ style : PGtkStyle;
+ pixmap : PGdkPixmap;
+ mask : PGdkBitmap;
+ end;
+
+ PGtkCellPixText = ^TGtkCellPixText;
+ TGtkCellPixText = record
+ _type : TGtkCellType;
+ vertical : gint16;
+ horizontal : gint16;
+ style : PGtkStyle;
+ text : Pgchar;
+ spacing : guint8;
+ pixmap : PGdkPixmap;
+ mask : PGdkBitmap;
+ end;
+
+ PGtkCellWidget = ^TGtkCellWidget;
+ TGtkCellWidget = record
+ _type : TGtkCellType;
+ vertical : gint16;
+ horizontal : gint16;
+ style : PGtkStyle;
+ widget : PGtkWidget;
+ end;
+
+ TGtkCell = record
+ _type : 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;
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+{ clist flags }
+ GTK_CLIST_IN_DRAG = 1 shl 0;
+ GTK_CLIST_ROW_HEIGHT_SET = 1 shl 1;
+ GTK_CLIST_SHOW_TITLES = 1 shl 2;
+ GTK_CLIST_ADD_MODE = 1 shl 4;
+ GTK_CLIST_AUTO_SORT = 1 shl 5;
+ GTK_CLIST_AUTO_RESIZE_BLOCKED = 1 shl 6;
+ GTK_CLIST_REORDERABLE = 1 shl 7;
+ GTK_CLIST_USE_DRAG_ICONS = 1 shl 8;
+ GTK_CLIST_DRAW_DRAG_LINE = 1 shl 9;
+ GTK_CLIST_DRAW_DRAG_RECT = 1 shl 10;
+
+ GTK_BUTTON_IGNORED = 0;
+ GTK_BUTTON_SELECTS = 1 shl 0;
+ GTK_BUTTON_DRAGS = 1 shl 1;
+ GTK_BUTTON_EXPANDS = 1 shl 2;
+
+
+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;
+
+ 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 GTK_TYPE_CLIST : GType;
+function GTK_CLIST(obj: pointer) : PGtkCList;
+function GTK_CLIST_CLASS(klass: pointer) : PGtkCListClass;
+function GTK_IS_CLIST(obj: pointer) : boolean;
+function GTK_IS_CLIST_CLASS(klass: pointer) : boolean;
+function GTK_CLIST_GET_CLASS(obj: pointer) : PGtkCListClass;
+function GTK_CLIST_FLAGS(clist : pointer) : guint16;
+
+procedure GTK_CLIST_SET_FLAG(clist: PGtkCList; flag: guint16);
+// (GTK_CLIST_FLAGS (clist) |= (GTK_ ## flag)) }
+procedure GTK_CLIST_UNSET_FLAG(clist: PGtkCList; flag: guint16);
+// (GTK_CLIST_FLAGS (clist) &= ~(GTK_ ## flag)) }
+function GTK_CLIST_IN_DRAG_get(clist : pointer) : boolean;
+function GTK_CLIST_ROW_HEIGHT_SET_get(clist : pointer) : boolean;
+function GTK_CLIST_SHOW_TITLES_get(clist : pointer) : boolean;
+function GTK_CLIST_ADD_MODE_get(clist : pointer) : boolean;
+function GTK_CLIST_AUTO_SORT_get(clist : pointer) : boolean;
+function GTK_CLIST_AUTO_RESIZE_BLOCKED_get(clist : pointer) : boolean;
+function GTK_CLIST_REORDERABLE_get(clist : pointer) : boolean;
+function GTK_CLIST_USE_DRAG_ICONS_get(clist : pointer) : boolean;
+function GTK_CLIST_DRAW_DRAG_LINE_get(clist : pointer) : boolean;
+function GTK_CLIST_DRAW_DRAG_RECT_get(clist : pointer) : boolean;
+function GTK_CLIST_ROW_get(_glist_ : PGList) : PGtkCListRow;
+
+{ pointer casting for cells }
+function GTK_CELL_TEXT_get(cell : pointer) : PGtkCellText;
+function GTK_CELL_PIXMAP_get(cell : pointer) : PGtkCellPixmap;
+function GTK_CELL_PIXTEXT_get(cell : pointer) : PGtkCellPixText;
+function GTK_CELL_WIDGET_get(cell : pointer) : PGtkCellWidget;
+
+
+function visible(var a : TGtkCListColumn) : guint; overload;
+procedure set_visible(var a : TGtkCListColumn; __visible : guint); overload;
+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);
+
+
+function fg_set(var a : TGtkCListRow) : guint;
+procedure set_fg_set(var a : TGtkCListRow; __fg_set : guint);
+function bg_set(var a : TGtkCListRow) : guint;
+procedure set_bg_set(var a : TGtkCListRow; __bg_set : guint);
+function selectable(var a : TGtkCListRow) : guint;
+procedure set_selectable(var a : TGtkCListRow; __selectable : guint);
+
+function gtk_clist_get_type:TGtkType; cdecl; external gtklib;
+{ create a new GtkCList }
+function gtk_clist_new(columns:gint):PGtkWidget; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+function gtk_clist_new_with_titles(columns:gint; titles:array of Pgchar):PGtkWidget; cdecl; external gtklib;
+{$ELSE}
+function gtk_clist_new_with_titles(columns:gint):PGtkWidget; varargs; cdecl; external gtklib;
+{$ENDIF}
+{ set adjustments of clist }
+procedure gtk_clist_set_hadjustment(clist:PGtkCList; adjustment:PGtkAdjustment); cdecl; external gtklib;
+procedure gtk_clist_set_vadjustment(clist:PGtkCList; adjustment:PGtkAdjustment); cdecl; external gtklib;
+{ get adjustments of clist }
+function gtk_clist_get_hadjustment(clist:PGtkCList):PGtkAdjustment; cdecl; external gtklib;
+function gtk_clist_get_vadjustment(clist:PGtkCList):PGtkAdjustment; cdecl; external gtklib;
+{ set the border style of the clist }
+procedure gtk_clist_set_shadow_type(clist:PGtkCList; _type:TGtkShadowType); cdecl; external gtklib;
+{ set the clist's selection mode }
+procedure gtk_clist_set_selection_mode(clist:PGtkCList; mode:TGtkSelectionMode); cdecl; external gtklib;
+{ enable clists reorder ability }
+procedure gtk_clist_set_reorderable(clist:PGtkCList; reorderable:gboolean); cdecl; external gtklib;
+procedure gtk_clist_set_use_drag_icons(clist:PGtkCList; use_icons:gboolean); cdecl; external gtklib;
+procedure gtk_clist_set_button_actions(clist:PGtkCList; button:guint; button_actions:guint8); cdecl; external gtklib;
+{ freeze all visual updates of the list, and then thaw the list after
+ you have made a number of changes and the updates wil occure in a
+ more efficent mannor than if you made them on a unfrozen list
+ }
+procedure gtk_clist_freeze(clist:PGtkCList); cdecl; external gtklib;
+procedure gtk_clist_thaw(clist:PGtkCList); cdecl; external gtklib;
+{ show and hide the column title buttons }
+procedure gtk_clist_column_titles_show(clist:PGtkCList); cdecl; external gtklib;
+procedure gtk_clist_column_titles_hide(clist:PGtkCList); cdecl; external gtklib;
+{ set the column title to be a active title (responds to button presses,
+ prelights, and grabs keyboard focus), or passive where it acts as just
+ a title
+ }
+procedure gtk_clist_column_title_active(clist:PGtkCList; column:gint); cdecl; external gtklib;
+procedure gtk_clist_column_title_passive(clist:PGtkCList; column:gint); cdecl; external gtklib;
+procedure gtk_clist_column_titles_active(clist:PGtkCList); cdecl; external gtklib;
+procedure gtk_clist_column_titles_passive(clist:PGtkCList); cdecl; external gtklib;
+{ set the title in the column title button }
+procedure gtk_clist_set_column_title(clist:PGtkCList; column:gint; title:Pgchar); cdecl; external gtklib;
+{ returns the title of column. Returns NULL if title is not set }
+function gtk_clist_get_column_title(clist:PGtkCList; column:gint):Pgchar; cdecl; external gtklib;
+{ set a widget instead of a title for the column title button }
+procedure gtk_clist_set_column_widget(clist:PGtkCList; column:gint; widget:PGtkWidget); cdecl; external gtklib;
+{ returns the column widget }
+function gtk_clist_get_column_widget(clist:PGtkCList; column:gint):PGtkWidget; cdecl; external gtklib;
+{ set the justification on a column }
+procedure gtk_clist_set_column_justification(clist:PGtkCList; column:gint; justification:TGtkJustification); cdecl; external gtklib;
+{ set visibility of a column }
+procedure gtk_clist_set_column_visibility(clist:PGtkCList; column:gint; visible:gboolean); cdecl; external gtklib;
+{ enable/disable column resize operations by mouse }
+procedure gtk_clist_set_column_resizeable(clist:PGtkCList; column:gint; resizeable:gboolean); cdecl; external gtklib;
+{ resize column automatically to its optimal width }
+procedure gtk_clist_set_column_auto_resize(clist:PGtkCList; column:gint; auto_resize:gboolean); cdecl; external gtklib;
+function gtk_clist_columns_autosize(clist:PGtkCList):gint; cdecl; external gtklib;
+{ return the optimal column width, i.e. maximum of all cell widths }
+function gtk_clist_optimal_column_width(clist:PGtkCList; column:gint):gint; cdecl; external gtklib;
+{ set the pixel width of a column; this is a necessary step in
+ creating a CList because otherwise the column width is chozen from
+ the width of the column title, which will never be right
+ }
+procedure gtk_clist_set_column_width(clist:PGtkCList; column:gint; width:gint); cdecl; external gtklib;
+{ set column minimum/maximum width. min/max_width < 0 => no restriction }
+procedure gtk_clist_set_column_min_width(clist:PGtkCList; column:gint; min_width:gint); cdecl; external gtklib;
+procedure gtk_clist_set_column_max_width(clist:PGtkCList; column:gint; max_width:gint); cdecl; external gtklib;
+{ change the height of the rows, the default (height=0) is
+ the hight of the current font.
+ }
+procedure gtk_clist_set_row_height(clist:PGtkCList; height:guint); cdecl; external gtklib;
+{ scroll the viewing area of the list to the given column and row;
+ row_align and col_align are between 0-1 representing the location the
+ row should appear on the screnn, 0.0 being top or left, 1.0 being
+ bottom or right; if row or column is -1 then then there is no change
+ }
+procedure gtk_clist_moveto(clist:PGtkCList; row:gint; column:gint; row_align:gfloat; col_align:gfloat); cdecl; external gtklib;
+{ returns whether the row is visible }
+function gtk_clist_row_is_visible(clist:PGtkCList; row:gint):TGtkVisibility; cdecl; external gtklib;
+{ returns the cell type }
+function gtk_clist_get_cell_type(clist:PGtkCList; row:gint; column:gint):TGtkCellType; cdecl; external gtklib;
+{ sets a given cell's text, replacing its current contents }
+
+procedure gtk_clist_set_text(clist:PGtkCList; row:gint; column:gint; text:Pgchar); cdecl; external gtklib;
+{ for the "get" functions, any of the return pointer can be
+ NULL if you are not interested
+ }
+function gtk_clist_get_text(clist:PGtkCList; row:gint; column:gint; text:PPgchar):gint; cdecl; external gtklib;
+{ sets a given cell's pixmap, replacing its current contents }
+procedure gtk_clist_set_pixmap(clist:PGtkCList; row:gint; column:gint; pixmap:PGdkPixmap; mask:PGdkBitmap); cdecl; external gtklib;
+function gtk_clist_get_pixmap(clist:PGtkCList; row:gint; column:gint; var pixmap:PGdkPixmap; var mask:PGdkBitmap):gint; cdecl; external gtklib;
+{ sets a given cell's pixmap and text, replacing its current contents }
+
+procedure gtk_clist_set_pixtext(clist:PGtkCList; row:gint; column:gint; text:Pgchar; spacing:guint8;
+ pixmap:PGdkPixmap; mask:PGdkBitmap); cdecl; external gtklib;
+function gtk_clist_get_pixtext(clist:PGtkCList; row:gint; column:gint; text:PPgchar; spacing:Pguint8;
+ var pixmap:PGdkPixmap; var mask:PGdkBitmap):gint; cdecl; external gtklib;
+{ sets the foreground color of a row, the color must already
+ be allocated
+ }
+procedure gtk_clist_set_foreground(clist:PGtkCList; row:gint; color:PGdkColor); cdecl; external gtklib;
+{ sets the background color of a row, the color must already
+ be allocated
+ }
+procedure gtk_clist_set_background(clist:PGtkCList; row:gint; color:PGdkColor); cdecl; external gtklib;
+{ set / get cell styles }
+procedure gtk_clist_set_cell_style(clist:PGtkCList; row:gint; column:gint; style:PGtkStyle); cdecl; external gtklib;
+function gtk_clist_get_cell_style(clist:PGtkCList; row:gint; column:gint):PGtkStyle; cdecl; external gtklib;
+procedure gtk_clist_set_row_style(clist:PGtkCList; row:gint; style:PGtkStyle); cdecl; external gtklib;
+function gtk_clist_get_row_style(clist:PGtkCList; row:gint):PGtkStyle; cdecl; external gtklib;
+{ this sets a horizontal and vertical shift for drawing
+ the contents of a cell; it can be positive or negitive;
+ this is particulary useful for indenting items in a column
+ }
+procedure gtk_clist_set_shift(clist:PGtkCList; row:gint; column:gint; vertical:gint; horizontal:gint); cdecl; external gtklib;
+{ set/get selectable flag of a single row }
+procedure gtk_clist_set_selectable(clist:PGtkCList; row:gint; selectable:gboolean); cdecl; external gtklib;
+function gtk_clist_get_selectable(clist:PGtkCList; row:gint):gboolean; cdecl; external gtklib;
+{ prepend/append returns the index of the row you just added,
+ making it easier to append and modify a row
+ }
+{$IFNDEF KYLIX}
+function gtk_clist_prepend(clist:PGtkCList; text:PPgchar):gint; cdecl; external gtklib;
+function gtk_clist_append(clist:PGtkCList; text:PPgchar):gint; cdecl; external gtklib;
+{$ELSE}
+function gtk_clist_prepend(clist:PGtkCList):gint; varargs; cdecl; external gtklib;
+function gtk_clist_append(clist:PGtkCList):gint; varargs; cdecl; external gtklib;
+{$ENDIF}
+{ inserts a row at index row and returns the row where it was
+ actually inserted (may be different from "row" in auto_sort mode)
+ }
+{$IFNDEF KYLIX}
+function gtk_clist_insert(clist:PGtkCList; row:gint; text:PPgchar):gint; cdecl; external gtklib;
+{$ELSE}
+function gtk_clist_insert(clist:PGtkCList; row:gint):gint; varargs; cdecl; external gtklib;
+{$ENDIF}
+{ removes row at index row }
+procedure gtk_clist_remove(clist:PGtkCList; row:gint); cdecl; external gtklib;
+{ sets a arbitrary data pointer for a given row }
+procedure gtk_clist_set_row_data(clist:PGtkCList; row:gint; data:gpointer); cdecl; external gtklib;
+{ sets a data pointer for a given row with destroy notification }
+procedure gtk_clist_set_row_data_full(clist:PGtkCList; row:gint; data:gpointer; destroy:TGtkDestroyNotify); cdecl; external gtklib;
+{ returns the data set for a row }
+function gtk_clist_get_row_data(clist:PGtkCList; row:gint):gpointer; cdecl; external gtklib;
+{ givin a data pointer, find the first (and hopefully only!)
+ row that points to that data, or -1 if none do
+ }
+function gtk_clist_find_row_from_data(clist:PGtkCList; data:gpointer):gint; cdecl; external gtklib;
+{ force selection of a row }
+procedure gtk_clist_select_row(clist:PGtkCList; row:gint; column:gint); cdecl; external gtklib;
+{ force unselection of a row }
+procedure gtk_clist_unselect_row(clist:PGtkCList; row:gint; column:gint); cdecl; external gtklib;
+{ undo the last select/unselect operation }
+procedure gtk_clist_undo_selection(clist:PGtkCList); cdecl; external gtklib;
+{ clear the entire list -- this is much faster than removing
+ each item with gtk_clist_remove
+ }
+procedure gtk_clist_clear(clist:PGtkCList); cdecl; external gtklib;
+{ return the row column corresponding to the x and y coordinates,
+ the returned values are only valid if the x and y coordinates
+ are respectively to a window == clist->clist_window
+ }
+function gtk_clist_get_selection_info(clist:PGtkCList; x:gint; y:gint; row:Pgint; column:Pgint):gint; cdecl; external gtklib;
+{ in multiple or extended mode, select all rows }
+procedure gtk_clist_select_all(clist:PGtkCList); cdecl; external gtklib;
+{ in all modes except browse mode, deselect all rows }
+procedure gtk_clist_unselect_all(clist:PGtkCList); cdecl; external gtklib;
+{ swap the position of two rows }
+procedure gtk_clist_swap_rows(clist:PGtkCList; row1:gint; row2:gint); cdecl; external gtklib;
+{ move row from source_row position to dest_row position }
+procedure gtk_clist_row_move(clist:PGtkCList; source_row:gint; dest_row:gint); cdecl; external gtklib;
+{ sets a compare function different to the default }
+procedure gtk_clist_set_compare_func(clist:PGtkCList; cmp_func:TGtkCListCompareFunc); cdecl; external gtklib;
+{ the column to sort by }
+procedure gtk_clist_set_sort_column(clist:PGtkCList; column:gint); cdecl; external gtklib;
+{ how to sort : ascending or descending }
+procedure gtk_clist_set_sort_type(clist:PGtkCList; sort_type:TGtkSortType); cdecl; external gtklib;
+{ sort the list with the current compare function }
+procedure gtk_clist_sort(clist:PGtkCList); cdecl; external gtklib;
+{ Automatically sort upon insertion }
+procedure gtk_clist_set_auto_sort(clist:PGtkCList; auto_sort:gboolean); cdecl; external gtklib;
+{ Private function for clist, ctree }
+function _gtk_clist_create_cell_layout(clist:PGtkCList; clist_row:PGtkCListRow; column:gint):PPangoLayout; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CLIST : GType;
+begin
+ GTK_TYPE_CLIST:=gtk_clist_get_type;
+end;
+
+function GTK_CLIST(obj: pointer) : PGtkCList;
+begin
+ GTK_CLIST:=PGtkCList(GTK_CHECK_CAST(obj,GTK_TYPE_CLIST));
+end;
+
+function GTK_CLIST_CLASS(klass: pointer) : PGtkCListClass;
+begin
+ GTK_CLIST_CLASS:=PGtkCListClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_CLIST));
+end;
+
+function GTK_IS_CLIST(obj: pointer) : boolean;
+begin
+ GTK_IS_CLIST:=GTK_CHECK_TYPE(obj,GTK_TYPE_CLIST);
+end;
+
+function GTK_IS_CLIST_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_CLIST_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_CLIST);
+end;
+
+function GTK_CLIST_GET_CLASS(obj: pointer) : PGtkCListClass;
+begin
+ GTK_CLIST_GET_CLASS:=PGtkCListClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_CLIST));
+end;
+
+function GTK_CLIST_FLAGS(clist : pointer) : guint16;
+begin
+ GTK_CLIST_FLAGS:=GTK_CLIST(clist)^.flags;
+end;
+
+procedure GTK_CLIST_SET_FLAG(clist: PGtkCList; flag: guint16);
+begin
+ clist^.flags:=GTK_CLIST(clist)^.flags or flag;
+end;
+
+procedure GTK_CLIST_UNSET_FLAG(clist: PGtkCList; flag: guint16);
+begin
+ clist^.flags:=GTK_CLIST(clist)^.flags and not flag;
+end;
+
+function GTK_CLIST_IN_DRAG_get(clist : pointer) : boolean;
+begin
+ GTK_CLIST_IN_DRAG_get:=((GTK_CLIST_FLAGS(clist)) and GTK_CLIST_IN_DRAG)<>0;
+end;
+
+function GTK_CLIST_ROW_HEIGHT_SET_get(clist : pointer) : boolean;
+begin
+ GTK_CLIST_ROW_HEIGHT_SET_get:=((GTK_CLIST_FLAGS(clist)) and GTK_CLIST_ROW_HEIGHT_SET)<>0;
+end;
+
+function GTK_CLIST_SHOW_TITLES_get(clist : pointer) : boolean;
+begin
+ GTK_CLIST_SHOW_TITLES_get:=((GTK_CLIST_FLAGS(clist)) and GTK_CLIST_SHOW_TITLES)<>0;
+end;
+
+function GTK_CLIST_ADD_MODE_get(clist : pointer) : boolean;
+begin
+ GTK_CLIST_ADD_MODE_get:=((GTK_CLIST_FLAGS(clist)) and GTK_CLIST_ADD_MODE)<>0;
+end;
+
+function GTK_CLIST_AUTO_SORT_get(clist : pointer) : boolean;
+begin
+ GTK_CLIST_AUTO_SORT_get:=((GTK_CLIST_FLAGS(clist)) and GTK_CLIST_AUTO_SORT)<>0;
+end;
+
+function GTK_CLIST_AUTO_RESIZE_BLOCKED_get(clist : pointer) : boolean;
+begin
+ GTK_CLIST_AUTO_RESIZE_BLOCKED_get:=((GTK_CLIST_FLAGS(clist)) and GTK_CLIST_AUTO_RESIZE_BLOCKED)<>0;
+end;
+
+function GTK_CLIST_REORDERABLE_get(clist : pointer) : boolean;
+begin
+ GTK_CLIST_REORDERABLE_get:=((GTK_CLIST_FLAGS(clist)) and GTK_CLIST_REORDERABLE)<>0;
+end;
+
+function GTK_CLIST_USE_DRAG_ICONS_get(clist : pointer) : boolean;
+begin
+ GTK_CLIST_USE_DRAG_ICONS_get:=((GTK_CLIST_FLAGS(clist)) and GTK_CLIST_USE_DRAG_ICONS)<>0;
+end;
+
+function GTK_CLIST_DRAW_DRAG_LINE_get(clist : pointer) : boolean;
+begin
+ GTK_CLIST_DRAW_DRAG_LINE_get:=((GTK_CLIST_FLAGS(clist)) and GTK_CLIST_DRAW_DRAG_LINE)<>0;
+end;
+
+function GTK_CLIST_DRAW_DRAG_RECT_get(clist : pointer) : boolean;
+begin
+ GTK_CLIST_DRAW_DRAG_RECT_get:=((GTK_CLIST_FLAGS(clist)) and GTK_CLIST_DRAW_DRAG_RECT)<>0;
+end;
+
+function GTK_CLIST_ROW_get(_glist_ : PGList) : PGtkCListRow;
+begin
+ GTK_CLIST_ROW_get:=PGtkCListRow(_glist_^.data);
+end;
+
+function GTK_CELL_TEXT_get(cell : pointer) : PGtkCellText;
+begin
+ GTK_CELL_TEXT_get:=PGtkCellText(@(cell));
+end;
+
+function GTK_CELL_PIXMAP_get(cell : pointer) : PGtkCellPixmap;
+begin
+ GTK_CELL_PIXMAP_get:=PGtkCellPixmap(@(cell));
+end;
+
+function GTK_CELL_PIXTEXT_get(cell : pointer) : PGtkCellPixText;
+begin
+ GTK_CELL_PIXTEXT_get:=PGtkCellPixText(@(cell));
+end;
+
+function GTK_CELL_WIDGET_get(cell : pointer) : PGtkCellWidget;
+begin
+ GTK_CELL_WIDGET_get:=PGtkCellWidget(@(cell));
+end;
+
+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;
+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);
+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;
+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);
+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;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcolorbutton.inc b/packages/gtk2/src/gtk+/gtk/gtkcolorbutton.inc
new file mode 100644
index 0000000000..5d50e17e9a
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcolorbutton.inc
@@ -0,0 +1,92 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkColorButtonPrivate = pointer;
+
+ PGtkColorButton = ^TGtkColorButton;
+ TGtkColorButton = record
+ button : TGtkButton;
+ priv : PGtkColorButtonPrivate;
+ end;
+
+{ Padding for future expansion }
+ PGtkColorButtonClass = ^TGtkColorButtonClass;
+ TGtkColorButtonClass = record
+ parent_class : TGtkButtonClass;
+ color_set : procedure (cp:PGtkColorButton);cdecl;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ _gtk_reserved4 : procedure ;
+ end;
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_COLOR_BUTTON : GType;
+function GTK_COLOR_BUTTON(obj : pointer) : PGtkColorButton;
+function GTK_COLOR_BUTTON_CLASS(klass : pointer) : PGtkColorButtonClass;
+function GTK_IS_COLOR_BUTTON(obj : pointer) : gboolean;
+function GTK_IS_COLOR_BUTTON_CLASS(klass : pointer) : gboolean;
+function GTK_COLOR_BUTTON_GET_CLASS(obj : pointer) : PGtkColorButtonClass;
+
+
+
+function gtk_color_button_get_type:GType;cdecl;external gtklib name 'gtk_color_button_get_type';
+function gtk_color_button_new:PGtkWidget;cdecl;external gtklib name 'gtk_color_button_new';
+
+function gtk_color_button_new_with_color(color:PGdkColor):PGtkWidget;cdecl;external gtklib name 'gtk_color_button_new_with_color';
+
+procedure gtk_color_button_set_color(color_button:PGtkColorButton; color:PGdkColor);cdecl;external gtklib name 'gtk_color_button_set_color';
+procedure gtk_color_button_set_alpha(color_button:PGtkColorButton; alpha:guint16);cdecl;external gtklib name 'gtk_color_button_set_alpha';
+procedure gtk_color_button_get_color(color_button:PGtkColorButton; color:PGdkColor);cdecl;external gtklib name 'gtk_color_button_get_color';
+function gtk_color_button_get_alpha(color_button:PGtkColorButton):guint16;cdecl;external gtklib name 'gtk_color_button_get_alpha';
+
+procedure gtk_color_button_set_use_alpha(color_button:PGtkColorButton; use_alpha:gboolean);cdecl;external gtklib name 'gtk_color_button_set_use_alpha';
+function gtk_color_button_get_use_alpha(color_button:PGtkColorButton):gboolean;cdecl;external gtklib name 'gtk_color_button_get_use_alpha';
+
+
+procedure gtk_color_button_set_title(color_button:PGtkColorButton; title:Pgchar);cdecl;external gtklib name 'gtk_color_button_set_title';
+function gtk_color_button_get_title(color_button:PGtkColorButton):Pgchar;cdecl;external gtklib name 'gtk_color_button_get_title';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GTK_TYPE_COLOR_BUTTON : GType;
+begin
+ GTK_TYPE_COLOR_BUTTON:=gtk_color_button_get_type;
+end;
+
+function GTK_COLOR_BUTTON(obj : pointer) : PGtkColorButton;
+begin
+ GTK_COLOR_BUTTON:=PGtkColorButton(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_COLOR_BUTTON));
+end;
+
+function GTK_COLOR_BUTTON_CLASS(klass : pointer) : PGtkColorButtonClass;
+begin
+ GTK_COLOR_BUTTON_CLASS:=PGtkColorButtonClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_COLOR_BUTTON));
+end;
+
+function GTK_IS_COLOR_BUTTON(obj : pointer) : gboolean;
+begin
+ GTK_IS_COLOR_BUTTON:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_COLOR_BUTTON);
+end;
+
+function GTK_IS_COLOR_BUTTON_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_COLOR_BUTTON_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_COLOR_BUTTON);
+end;
+
+function GTK_COLOR_BUTTON_GET_CLASS(obj : pointer) : PGtkColorButtonClass;
+begin
+ GTK_COLOR_BUTTON_GET_CLASS:=PGtkColorButtonClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_COLOR_BUTTON));
+end;
+
+{$endif read_implementation}
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcolorsel.inc b/packages/gtk2/src/gtk+/gtk/gtkcolorsel.inc
new file mode 100644
index 0000000000..85b2c084bc
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcolorsel.inc
@@ -0,0 +1,113 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ TGtkColorSelectionChangePaletteFunc = procedure (colors:PGdkColor; n_colors:gint); cdecl;
+
+ TGtkColorSelectionChangePaletteWithScreenFunc = procedure (screen:PGdkScreen; colors:PGdkColor; n_colors:gint); cdecl;
+{ < private_data > }
+ PGtkColorSelection = ^TGtkColorSelection;
+ TGtkColorSelection = record
+ parent_instance : TGtkVBox;
+ private_data : gpointer;
+ end;
+
+{ Padding for future expansion }
+ PGtkColorSelectionClass = ^TGtkColorSelectionClass;
+ TGtkColorSelectionClass = record
+ parent_class : TGtkVBoxClass;
+ color_changed : procedure (color_selection:PGtkColorSelection); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_COLOR_SELECTION : GType;
+function GTK_COLOR_SELECTION(obj: pointer) : PGtkColorSelection;
+function GTK_COLOR_SELECTION_CLASS(klass: pointer) : PGtkColorSelectionClass;
+function GTK_IS_COLOR_SELECTION(obj: pointer) : boolean;
+function GTK_IS_COLOR_SELECTION_CLASS(klass: pointer) : boolean;
+function GTK_COLOR_SELECTION_GET_CLASS(obj: pointer) : PGtkColorSelectionClass;
+
+
+{ ColorSelection }
+
+function gtk_color_selection_get_type:TGtkType; cdecl; external gtklib;
+function gtk_color_selection_new:PGtkWidget; cdecl; external gtklib;
+function gtk_color_selection_get_has_opacity_control(colorsel:PGtkColorSelection):gboolean; cdecl; external gtklib;
+procedure gtk_color_selection_set_has_opacity_control(colorsel:PGtkColorSelection; has_opacity:gboolean); cdecl; external gtklib;
+function gtk_color_selection_get_has_palette(colorsel:PGtkColorSelection):gboolean; cdecl; external gtklib;
+procedure gtk_color_selection_set_has_palette(colorsel:PGtkColorSelection; has_palette:gboolean); cdecl; external gtklib;
+procedure gtk_color_selection_set_current_color(colorsel:PGtkColorSelection; color:PGdkColor); cdecl; external gtklib;
+procedure gtk_color_selection_set_current_alpha(colorsel:PGtkColorSelection; alpha:guint16); cdecl; external gtklib;
+procedure gtk_color_selection_get_current_color(colorsel:PGtkColorSelection; color:PGdkColor); cdecl; external gtklib;
+function gtk_color_selection_get_current_alpha(colorsel:PGtkColorSelection):guint16; cdecl; external gtklib;
+procedure gtk_color_selection_set_previous_color(colorsel:PGtkColorSelection; color:PGdkColor); cdecl; external gtklib;
+procedure gtk_color_selection_set_previous_alpha(colorsel:PGtkColorSelection; alpha:guint16); cdecl; external gtklib;
+procedure gtk_color_selection_get_previous_color(colorsel:PGtkColorSelection; color:PGdkColor); cdecl; external gtklib;
+function gtk_color_selection_get_previous_alpha(colorsel:PGtkColorSelection):guint16; cdecl; external gtklib;
+function gtk_color_selection_is_adjusting(colorsel:PGtkColorSelection):gboolean; cdecl; external gtklib;
+function gtk_color_selection_palette_from_string(str:Pgchar; var colors:PGdkColor; n_colors:Pgint):gboolean; cdecl; external gtklib;
+function gtk_color_selection_palette_to_string(colors:PGdkColor; n_colors:gint):Pgchar; cdecl; external gtklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gtk_color_selection_set_change_palette_hook(func:TGtkColorSelectionChangePaletteFunc):TGtkColorSelectionChangePaletteFunc; cdecl; external gtklib;
+{$endif}
+
+function gtk_color_selection_set_change_palette_with_screen_hook(func:TGtkColorSelectionChangePaletteWithScreenFunc):TGtkColorSelectionChangePaletteWithScreenFunc; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+{ Deprecated calls: }
+procedure gtk_color_selection_set_color(colorsel:PGtkColorSelection; color:Pgdouble); cdecl; external gtklib;
+procedure gtk_color_selection_get_color(colorsel:PGtkColorSelection; color:Pgdouble); cdecl; external gtklib;
+procedure gtk_color_selection_set_update_policy(colorsel:PGtkColorSelection; policy:TGtkUpdateType); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_COLOR_SELECTION : GType;
+begin
+ GTK_TYPE_COLOR_SELECTION:=gtk_color_selection_get_type;
+end;
+
+function GTK_COLOR_SELECTION(obj: pointer) : PGtkColorSelection;
+begin
+ GTK_COLOR_SELECTION:=PGtkColorSelection(GTK_CHECK_CAST(obj,GTK_TYPE_COLOR_SELECTION));
+end;
+
+function GTK_COLOR_SELECTION_CLASS(klass: pointer) : PGtkColorSelectionClass;
+begin
+ GTK_COLOR_SELECTION_CLASS:=PGtkColorSelectionClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_COLOR_SELECTION));
+end;
+
+function GTK_IS_COLOR_SELECTION(obj: pointer) : boolean;
+begin
+ GTK_IS_COLOR_SELECTION:=GTK_CHECK_TYPE(obj,GTK_TYPE_COLOR_SELECTION);
+end;
+
+function GTK_IS_COLOR_SELECTION_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_COLOR_SELECTION_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_COLOR_SELECTION);
+end;
+
+function GTK_COLOR_SELECTION_GET_CLASS(obj: pointer) : PGtkColorSelectionClass;
+begin
+ GTK_COLOR_SELECTION_GET_CLASS:=PGtkColorSelectionClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_COLOR_SELECTION));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcolorseldialog.inc b/packages/gtk2/src/gtk+/gtk/gtkcolorseldialog.inc
new file mode 100644
index 0000000000..eff4fee983
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcolorseldialog.inc
@@ -0,0 +1,80 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkColorSelectionDialog = ^TGtkColorSelectionDialog;
+ TGtkColorSelectionDialog = record
+ parent_instance : TGtkDialog;
+ colorsel : PGtkWidget;
+ ok_button : PGtkWidget;
+ cancel_button : PGtkWidget;
+ help_button : PGtkWidget;
+ end;
+
+{ Padding for future expansion }
+ PGtkColorSelectionDialogClass = ^TGtkColorSelectionDialogClass;
+ TGtkColorSelectionDialogClass = record
+ parent_class : TGtkDialogClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_COLOR_SELECTION_DIALOG : GType;
+function GTK_COLOR_SELECTION_DIALOG(obj: pointer) : PGtkColorSelectionDialog;
+function GTK_COLOR_SELECTION_DIALOG_CLASS(klass: pointer) : PGtkColorSelectionDialogClass;
+function GTK_IS_COLOR_SELECTION_DIALOG(obj: pointer) : boolean;
+function GTK_IS_COLOR_SELECTION_DIALOG_CLASS(klass: pointer) : boolean;
+function GTK_COLOR_SELECTION_DIALOG_GET_CLASS(obj: pointer) : PGtkColorSelectionDialogClass;
+
+
+{ ColorSelectionDialog }
+
+function gtk_color_selection_dialog_get_type:TGtkType; cdecl; external gtklib;
+function gtk_color_selection_dialog_new(title:Pgchar):PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_COLOR_SELECTION_DIALOG : GType;
+begin
+ GTK_TYPE_COLOR_SELECTION_DIALOG:=gtk_color_selection_dialog_get_type;
+end;
+
+function GTK_COLOR_SELECTION_DIALOG(obj: pointer) : PGtkColorSelectionDialog;
+begin
+ GTK_COLOR_SELECTION_DIALOG:=PGtkColorSelectionDialog(GTK_CHECK_CAST(obj,GTK_TYPE_COLOR_SELECTION_DIALOG));
+end;
+
+function GTK_COLOR_SELECTION_DIALOG_CLASS(klass: pointer) : PGtkColorSelectionDialogClass;
+begin
+ GTK_COLOR_SELECTION_DIALOG_CLASS:=PGtkColorSelectionDialogClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_COLOR_SELECTION_DIALOG));
+end;
+
+function GTK_IS_COLOR_SELECTION_DIALOG(obj: pointer) : boolean;
+begin
+ GTK_IS_COLOR_SELECTION_DIALOG:=GTK_CHECK_TYPE(obj,GTK_TYPE_COLOR_SELECTION_DIALOG);
+end;
+
+function GTK_IS_COLOR_SELECTION_DIALOG_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_COLOR_SELECTION_DIALOG_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_COLOR_SELECTION_DIALOG);
+end;
+
+function GTK_COLOR_SELECTION_DIALOG_GET_CLASS(obj: pointer) : PGtkColorSelectionDialogClass;
+begin
+ GTK_COLOR_SELECTION_DIALOG_GET_CLASS:=PGtkColorSelectionDialogClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_COLOR_SELECTION_DIALOG));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcombo.inc b/packages/gtk2/src/gtk+/gtk/gtkcombo.inc
new file mode 100644
index 0000000000..5a4f419574
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcombo.inc
@@ -0,0 +1,175 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ you should access only the entry and list fields directly }
+ 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;
+
+{ Padding for future expansion }
+ PGtkComboClass = ^TGtkComboClass;
+ TGtkComboClass = record
+ parent_class : TGtkHBoxClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkCombo_value_in_list = $1;
+ bp_TGtkCombo_value_in_list = 0;
+ bm_TGtkCombo_ok_if_empty = $2;
+ bp_TGtkCombo_ok_if_empty = 1;
+ bm_TGtkCombo_case_sensitive = $4;
+ bp_TGtkCombo_case_sensitive = 2;
+ bm_TGtkCombo_use_arrows = $8;
+ bp_TGtkCombo_use_arrows = 3;
+ bm_TGtkCombo_use_arrows_always = $10;
+ bp_TGtkCombo_use_arrows_always = 4;
+
+
+function GTK_TYPE_COMBO : GType;
+function GTK_COMBO(obj: pointer) : PGtkCombo;
+function GTK_COMBO_CLASS(klass: pointer) : PGtkComboClass;
+function GTK_IS_COMBO(obj: pointer) : boolean;
+function GTK_IS_COMBO_CLASS(klass: pointer) : boolean;
+function GTK_COMBO_GET_CLASS(obj: pointer) : PGtkComboClass;
+
+
+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);
+
+function gtk_combo_get_type:TGtkType; cdecl; external gtklib;
+function gtk_combo_new:PGtkWidget; cdecl; external gtklib;
+{ the text in the entry must be or not be in the list }
+procedure gtk_combo_set_value_in_list(combo:PGtkCombo; val:gboolean; ok_if_empty:gboolean); cdecl; external gtklib;
+{ set/unset arrows working for changing the value (can be annoying) }
+procedure gtk_combo_set_use_arrows(combo:PGtkCombo; val:gboolean); cdecl; external gtklib;
+{ up/down arrows change value if current value not in list }
+procedure gtk_combo_set_use_arrows_always(combo:PGtkCombo; val:gboolean); cdecl; external gtklib;
+{ perform case-sensitive compares }
+procedure gtk_combo_set_case_sensitive(combo:PGtkCombo; val:gboolean); cdecl; external gtklib;
+{ call this function on an item if it isn't a label or you
+ want it to have a different value to be displayed in the entry }
+procedure gtk_combo_set_item_string(combo:PGtkCombo; item:PGtkItem; item_value:Pgchar); cdecl; external gtklib;
+{ simple interface }
+procedure gtk_combo_set_popdown_strings(combo:PGtkCombo; strings:PGList); cdecl; external gtklib;
+procedure gtk_combo_disable_activate(combo:PGtkCombo); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_COMBO : GType;
+begin
+ GTK_TYPE_COMBO:=gtk_combo_get_type;
+end;
+
+function GTK_COMBO(obj: pointer) : PGtkCombo;
+begin
+ GTK_COMBO:=PGtkCombo(GTK_CHECK_CAST(obj,GTK_TYPE_COMBO));
+end;
+
+function GTK_COMBO_CLASS(klass: pointer) : PGtkComboClass;
+begin
+ GTK_COMBO_CLASS:=PGtkComboClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_COMBO));
+end;
+
+function GTK_IS_COMBO(obj: pointer) : boolean;
+begin
+ GTK_IS_COMBO:=GTK_CHECK_TYPE(obj,GTK_TYPE_COMBO);
+end;
+
+function GTK_IS_COMBO_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_COMBO_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_COMBO);
+end;
+
+function GTK_COMBO_GET_CLASS(obj: pointer) : PGtkComboClass;
+begin
+ GTK_COMBO_GET_CLASS:=PGtkComboClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_COMBO));
+end;
+
+function value_in_list(var a : TGtkCombo) : guint;
+begin
+ value_in_list:=(a.flag0 and bm_TGtkCombo_value_in_list) shr bp_TGtkCombo_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_TGtkCombo_value_in_list) and bm_TGtkCombo_value_in_list);
+end;
+
+function ok_if_empty(var a : TGtkCombo) : guint;
+begin
+ ok_if_empty:=(a.flag0 and bm_TGtkCombo_ok_if_empty) shr bp_TGtkCombo_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_TGtkCombo_ok_if_empty) and bm_TGtkCombo_ok_if_empty);
+end;
+
+function case_sensitive(var a : TGtkCombo) : guint;
+begin
+ case_sensitive:=(a.flag0 and bm_TGtkCombo_case_sensitive) shr bp_TGtkCombo_case_sensitive;
+end;
+
+procedure set_case_sensitive(var a : TGtkCombo; __case_sensitive : guint);
+begin
+ a.flag0:=a.flag0 or ((__case_sensitive shl bp_TGtkCombo_case_sensitive) and bm_TGtkCombo_case_sensitive);
+end;
+
+function use_arrows(var a : TGtkCombo) : guint;
+begin
+ use_arrows:=(a.flag0 and bm_TGtkCombo_use_arrows) shr bp_TGtkCombo_use_arrows;
+end;
+
+procedure set_use_arrows(var a : TGtkCombo; __use_arrows : guint);
+begin
+ a.flag0:=a.flag0 or ((__use_arrows shl bp_TGtkCombo_use_arrows) and bm_TGtkCombo_use_arrows);
+end;
+
+function use_arrows_always(var a : TGtkCombo) : guint;
+begin
+ use_arrows_always:=(a.flag0 and bm_TGtkCombo_use_arrows_always) shr bp_TGtkCombo_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_TGtkCombo_use_arrows_always) and bm_TGtkCombo_use_arrows_always);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcombobox.inc b/packages/gtk2/src/gtk+/gtk/gtkcombobox.inc
new file mode 100644
index 0000000000..aa8c09fda7
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcombobox.inc
@@ -0,0 +1,108 @@
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkComboBoxPrivate = pointer;
+
+ PGtkComboBox = ^TGtkComboBox;
+ TGtkComboBox = record
+ parent_instance : TGtkBin;
+ priv : PGtkComboBoxPrivate;
+ end;
+
+{ signals }
+{ Padding for future expansion }
+ PGtkComboBoxClass = ^TGtkComboBoxClass;
+ TGtkComboBoxClass = record
+ parent_class : TGtkBinClass;
+ changed : procedure (combo_box:PGtkComboBox);cdecl;
+ _gtk_reserved0 : procedure ;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ end;
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_COMBO_BOX : GType;
+function GTK_COMBO_BOX(obj : pointer) : PGtkComboBox;
+function GTK_COMBO_BOX_CLASS(vtable : pointer) : PGtkComboBoxClass;
+function GTK_IS_COMBO_BOX(obj : pointer) : gboolean;
+function GTK_IS_COMBO_BOX_CLASS(vtable : pointer) : gboolean;
+function GTK_COMBO_BOX_GET_CLASS(inst : pointer) : PGtkComboBoxClass;
+
+
+{ construction }
+
+function gtk_combo_box_get_type:GType;cdecl;external gtklib name 'gtk_combo_box_get_type';
+function gtk_combo_box_new:PGtkWidget;cdecl;external gtklib name 'gtk_combo_box_new';
+function gtk_combo_box_new_with_model(model:PGtkTreeModel):PGtkWidget;cdecl;external gtklib name 'gtk_combo_box_new_with_model';
+
+{ grids }
+procedure gtk_combo_box_set_wrap_width(combo_box:PGtkComboBox; width:gint);cdecl;external gtklib name 'gtk_combo_box_set_wrap_width';
+procedure gtk_combo_box_set_row_span_column(combo_box:PGtkComboBox; row_span:gint);cdecl;external gtklib name 'gtk_combo_box_set_row_span_column';
+procedure gtk_combo_box_set_column_span_column(combo_box:PGtkComboBox; column_span:gint);cdecl;external gtklib name 'gtk_combo_box_set_column_span_column';
+
+{ get/set active item }
+function gtk_combo_box_get_active(combo_box:PGtkComboBox):gint;cdecl;external gtklib name 'gtk_combo_box_get_active';
+procedure gtk_combo_box_set_active(combo_box:PGtkComboBox; index:gint);cdecl;external gtklib name 'gtk_combo_box_set_active';
+function gtk_combo_box_get_active_iter(combo_box:PGtkComboBox; iter:PGtkTreeIter):gboolean;cdecl;external gtklib name 'gtk_combo_box_get_active_iter';
+procedure gtk_combo_box_set_active_iter(combo_box:PGtkComboBox; iter:PGtkTreeIter);cdecl;external gtklib name 'gtk_combo_box_set_active_iter';
+
+
+{ getters and setters }
+procedure gtk_combo_box_set_model(combo_box:PGtkComboBox; model:PGtkTreeModel);cdecl;external gtklib name 'gtk_combo_box_set_model';
+function gtk_combo_box_get_model(combo_box:PGtkComboBox):PGtkTreeModel;cdecl;external gtklib name 'gtk_combo_box_get_model';
+
+
+{ convenience -- text }
+function gtk_combo_box_new_text:PGtkWidget;cdecl;external gtklib name 'gtk_combo_box_new_text';
+
+procedure gtk_combo_box_append_text(combo_box:PGtkComboBox; text:Pgchar);cdecl;external gtklib name 'gtk_combo_box_append_text';
+
+procedure gtk_combo_box_insert_text(combo_box:PGtkComboBox; position:gint; text:Pgchar);cdecl;external gtklib name 'gtk_combo_box_insert_text';
+
+procedure gtk_combo_box_prepend_text(combo_box:PGtkComboBox; text:Pgchar);cdecl;external gtklib name 'gtk_combo_box_prepend_text';
+procedure gtk_combo_box_remove_text(combo_box:PGtkComboBox; position:gint);cdecl;external gtklib name 'gtk_combo_box_remove_text';
+{ programmatic control }
+procedure gtk_combo_box_popup(combo_box:PGtkComboBox);cdecl;external gtklib name 'gtk_combo_box_popup';
+procedure gtk_combo_box_popdown(combo_box:PGtkComboBox);cdecl;external gtklib name 'gtk_combo_box_popdown';
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GTK_TYPE_COMBO_BOX : GType;
+begin
+ GTK_TYPE_COMBO_BOX:=gtk_combo_box_get_type;
+end;
+
+function GTK_COMBO_BOX(obj : pointer) : PGtkComboBox;
+begin
+ GTK_COMBO_BOX:=PGtkComboBox(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_COMBO_BOX));
+end;
+
+function GTK_COMBO_BOX_CLASS(vtable : pointer) : PGtkComboBoxClass;
+begin
+ GTK_COMBO_BOX_CLASS:=PGtkComboBoxClass(G_TYPE_CHECK_CLASS_CAST(vtable,GTK_TYPE_COMBO_BOX));
+end;
+
+function GTK_IS_COMBO_BOX(obj : pointer) : gboolean;
+begin
+ GTK_IS_COMBO_BOX:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_COMBO_BOX);
+end;
+
+
+function GTK_IS_COMBO_BOX_CLASS(vtable : pointer) : gboolean;
+begin
+ GTK_IS_COMBO_BOX_CLASS:=G_TYPE_CHECK_CLASS_TYPE(vtable,GTK_TYPE_COMBO_BOX);
+end;
+
+function GTK_COMBO_BOX_GET_CLASS(inst : pointer) : PGtkComboBoxClass;
+begin
+ GTK_COMBO_BOX_GET_CLASS:=PGtkComboBoxClass(G_TYPE_INSTANCE_GET_CLASS(inst,GTK_TYPE_COMBO_BOX));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcomboboxentry.inc b/packages/gtk2/src/gtk+/gtk/gtkcomboboxentry.inc
new file mode 100644
index 0000000000..b79a278e42
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcomboboxentry.inc
@@ -0,0 +1,78 @@
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkComboBoxEntryPrivate = pointer;
+
+ PGtkComboBoxEntry = ^TGtkComboBoxEntry;
+ TGtkComboBoxEntry = record
+ parent_instance : TGtkComboBox;
+ priv : PGtkComboBoxEntryPrivate;
+ end;
+
+{ Padding for future expansion }
+ PGtkComboBoxEntryClass = ^TGtkComboBoxEntryClass;
+ TGtkComboBoxEntryClass = record
+ parent_class : TGtkComboBoxClass;
+ _gtk_reserved0 : procedure ;cdecl;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ end;
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_COMBO_BOX_ENTRY : GType;
+function GTK_COMBO_BOX_ENTRY(obj : pointer) : PGtkComboBoxEntry;
+function GTK_COMBO_BOX_ENTRY_CLASS(vtable : pointer) : PGtkComboBoxEntryClass;
+function GTK_IS_COMBO_BOX_ENTRY(obj : pointer) : gboolean;
+function GTK_IS_COMBO_BOX_ENTRY_CLASS(vtable : pointer) : gboolean;
+function GTK_COMBO_BOX_ENTRY_GET_CLASS(inst : pointer) : PGtkComboBoxEntryClass;
+
+function gtk_combo_box_entry_get_type:GType;cdecl;external gtklib name 'gtk_combo_box_entry_get_type';
+function gtk_combo_box_entry_new:PGtkWidget;cdecl;external gtklib name 'gtk_combo_box_entry_new';
+function gtk_combo_box_entry_new_with_model(model:PGtkTreeModel; text_column:gint):PGtkWidget;cdecl;external gtklib name 'gtk_combo_box_entry_new_with_model';
+procedure gtk_combo_box_entry_set_text_column(entry_box:PGtkComboBoxEntry; text_column:gint);cdecl;external gtklib name 'gtk_combo_box_entry_set_text_column';
+function gtk_combo_box_entry_get_text_column(entry_box:PGtkComboBoxEntry):gint;cdecl;external gtklib name 'gtk_combo_box_entry_get_text_column';
+
+
+{ convenience -- text }
+function gtk_combo_box_entry_new_text:PGtkWidget;cdecl;external gtklib name 'gtk_combo_box_entry_new_text';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GTK_TYPE_COMBO_BOX_ENTRY : GType;
+begin
+ GTK_TYPE_COMBO_BOX_ENTRY:=gtk_combo_box_entry_get_type;
+end;
+
+function GTK_COMBO_BOX_ENTRY(obj : pointer) : PGtkComboBoxEntry;
+begin
+ GTK_COMBO_BOX_ENTRY:=PGtkComboBoxEntry(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_COMBO_BOX_ENTRY));
+end;
+
+function GTK_COMBO_BOX_ENTRY_CLASS(vtable : pointer) : PGtkComboBoxEntryClass;
+begin
+ GTK_COMBO_BOX_ENTRY_CLASS:=PGtkComboBoxEntryClass(G_TYPE_CHECK_CLASS_CAST(vtable,GTK_TYPE_COMBO_BOX_ENTRY));
+end;
+
+function GTK_IS_COMBO_BOX_ENTRY(obj : pointer) : gboolean;
+begin
+ GTK_IS_COMBO_BOX_ENTRY:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_COMBO_BOX_ENTRY);
+end;
+
+function GTK_IS_COMBO_BOX_ENTRY_CLASS(vtable : pointer) : gboolean;
+begin
+ GTK_IS_COMBO_BOX_ENTRY_CLASS:=G_TYPE_CHECK_CLASS_TYPE(vtable,GTK_TYPE_COMBO_BOX_ENTRY);
+end;
+
+function GTK_COMBO_BOX_ENTRY_GET_CLASS(inst : pointer) : PGtkComboBoxEntryClass;
+begin
+ GTK_COMBO_BOX_ENTRY_GET_CLASS:=PGtkComboBoxEntryClass(G_TYPE_INSTANCE_GET_CLASS(inst,GTK_TYPE_COMBO_BOX_ENTRY));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcontainer.inc b/packages/gtk2/src/gtk+/gtk/gtkcontainer.inc
new file mode 100644
index 0000000000..8c1829a909
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcontainer.inc
@@ -0,0 +1,265 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkContainer = ^TGtkContainer;
+ TGtkContainer = record
+ widget : TGtkWidget;
+ focus_child : PGtkWidget;
+ flag0 : longint;
+ end;
+
+{ Padding for future expansion }
+ PGtkContainerClass = ^TGtkContainerClass;
+ TGtkContainerClass = record
+ parent_class : TGtkWidgetClass;
+ 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; callback_data:gpointer); cdecl;
+ set_focus_child : procedure (container:PGtkContainer; widget:PGtkWidget); cdecl;
+ child_type : function (container:PGtkContainer):TGtkType; cdecl;
+ composite_name : function (container:PGtkContainer; child:PGtkWidget):Pgchar; cdecl;
+ set_child_property : procedure (container:PGtkContainer; child:PGtkWidget; property_id:guint; value:PGValue; pspec:PGParamSpec); cdecl;
+ get_child_property : procedure (container:PGtkContainer; child:PGtkWidget; property_id:guint; value:PGValue; pspec:PGParamSpec); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+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;
+ bm_TGtkContainer_reallocate_redraws = $80000;
+ bp_TGtkContainer_reallocate_redraws = 19;
+ bm_TGtkContainer_has_focus_chain = $100000;
+ bp_TGtkContainer_has_focus_chain = 20;
+
+
+function GTK_TYPE_CONTAINER : GType;
+function GTK_CONTAINER(obj: pointer) : PGtkContainer;
+function GTK_CONTAINER_CLASS(klass: pointer) : PGtkContainerClass;
+function GTK_IS_CONTAINER(obj: pointer) : boolean;
+function GTK_IS_CONTAINER_CLASS(klass: pointer) : boolean;
+function GTK_CONTAINER_GET_CLASS(obj: pointer) : PGtkContainerClass;
+function GTK_IS_RESIZE_CONTAINER(widget : pointer) : boolean;
+
+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(a : PGtkContainer) : guint;
+procedure set_resize_mode(var a : TGtkContainer; __resize_mode : guint);
+function reallocate_redraws(var a : TGtkContainer) : guint;
+procedure set_reallocate_redraws(var a : TGtkContainer; __reallocate_redraws : guint);
+function has_focus_chain(var a : TGtkContainer) : guint;
+procedure set_has_focus_chain(var a : TGtkContainer; __has_focus_chain : guint);
+
+{ Application-level methods }
+
+function gtk_container_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_container_set_border_width(container:PGtkContainer; border_width:guint); cdecl; external gtklib;
+function gtk_container_get_border_width(container:PGtkContainer):guint; cdecl; external gtklib;
+procedure gtk_container_add(container:PGtkContainer; widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_container_remove(container:PGtkContainer; widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_container_set_resize_mode(container:PGtkContainer; resize_mode:TGtkResizeMode); cdecl; external gtklib;
+function gtk_container_get_resize_mode(container:PGtkContainer):TGtkResizeMode; cdecl; external gtklib;
+procedure gtk_container_check_resize(container:PGtkContainer); cdecl; external gtklib;
+procedure gtk_container_foreach(container:PGtkContainer; callback:TGtkCallback; callback_data:gpointer); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_container_foreach_full(container:PGtkContainer; callback:TGtkCallback; marshal:TGtkCallbackMarshal; callback_data:gpointer; notify:TGtkDestroyNotify); cdecl; external gtklib;
+{$endif}
+
+{ GTK_DISABLE_DEPRECATED }
+function gtk_container_get_children(container:PGtkContainer):PGList; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_container_children(container:PGtkContainer):PGList;
+{$endif}
+
+procedure gtk_container_propagate_expose(container:PGtkContainer; child:PGtkWidget; event:PGdkEventExpose); cdecl; external gtklib;
+procedure gtk_container_set_focus_chain(container:PGtkContainer; focusable_widgets:PGList); cdecl; external gtklib;
+function gtk_container_get_focus_chain(container:PGtkContainer; var focusable_widgets:PGList):gboolean; cdecl; external gtklib;
+procedure gtk_container_unset_focus_chain(container:PGtkContainer); cdecl; external gtklib;
+{ Widget-level methods }
+procedure gtk_container_set_reallocate_redraws(container:PGtkContainer; needs_redraws:gboolean); cdecl; external gtklib;
+procedure gtk_container_set_focus_child(container:PGtkContainer; child:PGtkWidget); cdecl; external gtklib;
+procedure gtk_container_set_focus_vadjustment(container:PGtkContainer; adjustment:PGtkAdjustment); cdecl; external gtklib;
+function gtk_container_get_focus_vadjustment(container:PGtkContainer):PGtkAdjustment; cdecl; external gtklib;
+procedure gtk_container_set_focus_hadjustment(container:PGtkContainer; adjustment:PGtkAdjustment); cdecl; external gtklib;
+function gtk_container_get_focus_hadjustment(container:PGtkContainer):PGtkAdjustment; cdecl; external gtklib;
+procedure gtk_container_resize_children(container:PGtkContainer); cdecl; external gtklib;
+function gtk_container_child_type(container:PGtkContainer):TGtkType; cdecl; external gtklib;
+procedure gtk_container_class_install_child_property(cclass:PGtkContainerClass; property_id:guint; pspec:PGParamSpec); cdecl; external gtklib;
+function gtk_container_class_find_child_property(cclass:PGObjectClass; property_name:Pgchar):PGParamSpec; cdecl; external gtklib;
+function gtk_container_class_list_child_properties(cclass:PGObjectClass; n_properties:Pguint):PPGParamSpec; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+procedure gtk_container_add_with_properties(container:PGtkContainer; widget:PGtkWidget; first_prop_name:Pgchar; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_container_add_with_properties(container:PGtkContainer; widget:PGtkWidget; first_prop_name:Pgchar); cdecl; overload; varargs; external gtklib;
+procedure gtk_container_child_set(container:PGtkContainer; child:PGtkWidget; first_prop_name:Pgchar; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_container_child_set(container:PGtkContainer; child:PGtkWidget; first_prop_name:Pgchar); cdecl; overload; varargs; external gtklib;
+procedure gtk_container_child_get(container:PGtkContainer; child:PGtkWidget; first_prop_name:Pgchar; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_container_child_get(container:PGtkContainer; child:PGtkWidget; first_prop_name:Pgchar); overload; cdecl; varargs; external gtklib;
+procedure gtk_container_child_set_valist(container:PGtkContainer; child:PGtkWidget; first_property_name:Pgchar; var_args: array of const); cdecl; external gtklib;
+procedure gtk_container_child_get_valist(container:PGtkContainer; child:PGtkWidget; first_property_name:Pgchar; var_args: array of const); cdecl; external gtklib;
+{$ELSE}
+procedure gtk_container_add_with_properties(container:PGtkContainer; widget:PGtkWidget; first_prop_name:Pgchar); varargs; cdecl; external gtklib;
+procedure gtk_container_child_set(container:PGtkContainer; child:PGtkWidget; first_prop_name:Pgchar); varargs; cdecl; external gtklib;
+procedure gtk_container_child_get(container:PGtkContainer; child:PGtkWidget; first_prop_name:Pgchar); varargs; cdecl; external gtklib;
+procedure gtk_container_child_set_valist(container:PGtkContainer; child:PGtkWidget; first_property_name:Pgchar); varargs; cdecl; external gtklib;
+procedure gtk_container_child_get_valist(container:PGtkContainer; child:PGtkWidget; first_property_name:Pgchar); varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_container_child_set_property(container:PGtkContainer; child:PGtkWidget; property_name:Pgchar; value:PGValue); cdecl; external gtklib;
+procedure gtk_container_child_get_property(container:PGtkContainer; child:PGtkWidget; property_name:Pgchar; value:PGValue); cdecl; external gtklib;
+procedure GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID(anObject: pointer; property_id: guint; pspec : pointer);
+
+procedure gtk_container_forall(container:PGtkContainer; callback:TGtkCallback; callback_data:gpointer); cdecl; external gtklib;
+{ Non-public methods }
+procedure _gtk_container_queue_resize(container:PGtkContainer); cdecl; external gtklib;
+procedure _gtk_container_clear_resize_widgets(container:PGtkContainer); cdecl; external gtklib;
+function _gtk_container_child_composite_name(container:PGtkContainer; child:PGtkWidget):Pgchar; cdecl; external gtklib;
+procedure _gtk_container_dequeue_resize_handler(container:PGtkContainer); cdecl; external gtklib;
+function _gtk_container_focus_sort(container:PGtkContainer; children:PGList; direction:TGtkDirectionType; old_focus:PGtkWidget):PGList; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_container_border_width(container:PGtkContainer; border_width:guint);
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CONTAINER : GType;
+begin
+ GTK_TYPE_CONTAINER:=gtk_container_get_type;
+end;
+
+function GTK_CONTAINER(obj: pointer) : PGtkContainer;
+begin
+ GTK_CONTAINER:=PGtkContainer(GTK_CHECK_CAST(obj,GTK_TYPE_CONTAINER));
+end;
+
+function GTK_CONTAINER_CLASS(klass: pointer) : PGtkContainerClass;
+begin
+ GTK_CONTAINER_CLASS:=PGtkContainerClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_CONTAINER));
+end;
+
+function GTK_IS_CONTAINER(obj: pointer) : boolean;
+begin
+ GTK_IS_CONTAINER:=GTK_CHECK_TYPE(obj,GTK_TYPE_CONTAINER);
+end;
+
+function GTK_IS_CONTAINER_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_CONTAINER_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_CONTAINER);
+end;
+
+function GTK_CONTAINER_GET_CLASS(obj: pointer) : PGtkContainerClass;
+begin
+ GTK_CONTAINER_GET_CLASS:=PGtkContainerClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_CONTAINER));
+end;
+
+function GTK_IS_RESIZE_CONTAINER(widget : pointer) : boolean;
+begin
+ GTK_IS_RESIZE_CONTAINER:=(GTK_IS_CONTAINER(widget))
+ and ((resize_mode(PGtkContainer(widget)))
+ <> ord(GTK_RESIZE_PARENT));
+end;
+
+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(a : PGtkContainer) : 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 reallocate_redraws(var a : TGtkContainer) : guint;
+begin
+ reallocate_redraws:=(a.flag0 and bm_TGtkContainer_reallocate_redraws) shr bp_TGtkContainer_reallocate_redraws;
+end;
+
+procedure set_reallocate_redraws(var a : TGtkContainer; __reallocate_redraws : guint);
+begin
+ a.flag0:=a.flag0 or ((__reallocate_redraws shl bp_TGtkContainer_reallocate_redraws) and bm_TGtkContainer_reallocate_redraws);
+end;
+
+function has_focus_chain(var a : TGtkContainer) : guint;
+begin
+ has_focus_chain:=(a.flag0 and bm_TGtkContainer_has_focus_chain) shr bp_TGtkContainer_has_focus_chain;
+end;
+
+procedure set_has_focus_chain(var a : TGtkContainer; __has_focus_chain : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_focus_chain shl bp_TGtkContainer_has_focus_chain) and bm_TGtkContainer_has_focus_chain);
+end;
+
+{$IFDEF KYLIX}
+function HexStr(Value, Bits: integer): string;
+begin
+ Str(Value, Result);
+end;
+{$ENDIF}
+
+procedure GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID(
+ anObject: pointer; property_id: guint; pspec : pointer);
+begin
+ writeln('invalid child property id ',property_id,' ',
+ HexStr(PtrInt(anObject),8),' ',HexStr(PtrInt(pspec),8));
+ // G_OBJECT_WARN_INVALID_PSPEC(anObject,'child property id',property_id,pspec);
+end;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_container_children(container:PGtkContainer):PGList;
+begin
+ gtk_container_children:=gtk_container_get_children(container);
+end;
+
+procedure gtk_container_border_width(container:PGtkContainer; border_width:guint);
+begin
+ gtk_container_set_border_width(container,border_width);
+end;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkctree.inc b/packages/gtk2/src/gtk+/gtk/gtkctree.inc
new file mode 100644
index 0000000000..9e3a8682d1
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkctree.inc
@@ -0,0 +1,363 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkCTreePos = ^TGtkCTreePos;
+ TGtkCTreePos = (
+ GTK_CTREE_POS_BEFORE,
+ GTK_CTREE_POS_AS_CHILD,
+ GTK_CTREE_POS_AFTER
+ );
+
+ PGtkCTreeLineStyle = ^TGtkCTreeLineStyle;
+ TGtkCTreeLineStyle = (
+ GTK_CTREE_LINES_NONE,
+ GTK_CTREE_LINES_SOLID,
+ GTK_CTREE_LINES_DOTTED,
+ GTK_CTREE_LINES_TABBED
+ );
+
+ PGtkCTreeExpanderStyle = ^TGtkCTreeExpanderStyle;
+ TGtkCTreeExpanderStyle = (
+ GTK_CTREE_EXPANDER_NONE,
+ GTK_CTREE_EXPANDER_SQUARE,
+ GTK_CTREE_EXPANDER_TRIANGLE,
+ GTK_CTREE_EXPANDER_CIRCULAR
+ );
+
+ PGtkCTreeExpansionType = ^TGtkCTreeExpansionType;
+ 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;
+
+ 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;
+
+ PGtkCTreeClass = ^TGtkCTreeClass;
+ 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;
+
+ PGtkCTreeRow = ^TGtkCTreeRow;
+ 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;
+
+ TGtkCTreeNode = record
+ list : TGList;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+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;
+
+ bm_TGtkCTreeRow_is_leaf = $1;
+ bp_TGtkCTreeRow_is_leaf = 0;
+ bm_TGtkCTreeRow_expanded = $2;
+ bp_TGtkCTreeRow_expanded = 1;
+
+
+function GTK_TYPE_CTREE : GType;
+function GTK_CTREE(obj: pointer) : PGtkCTree;
+function GTK_CTREE_CLASS(klass: pointer) : PGtkCTreeClass;
+function GTK_IS_CTREE(obj: pointer) : boolean;
+function GTK_IS_CTREE_CLASS(klass: pointer) : boolean;
+function GTK_CTREE_GET_CLASS(obj: pointer) : PGtkCTreeClass;
+
+function GTK_CTREE_ROW(_node_ : ptrint) : PGtkCTreeRow;
+function GTK_CTREE_NODE(_node_ : ptrint) : PGtkCTreeNode;
+function GTK_CTREE_NODE_NEXT(_nnode_ : ptrint) : PGtkCTreeNode;
+function GTK_CTREE_NODE_PREV(_pnode_ : ptrint) : PGtkCTreeNode;
+function GTK_CTREE_FUNC(_func_ : ptrint) : TGtkCTreeFunc;
+function GTK_TYPE_CTREE_NODE : GType;
+
+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);
+
+function is_leaf(var a : TGtkCTreeRow) : guint;
+procedure set_is_leaf(var a : TGtkCTreeRow; __is_leaf : guint);
+function expanded(var a : TGtkCTreeRow) : guint; overload;
+procedure set_expanded(var a : TGtkCTreeRow; __expanded : guint); overload;
+
+{
+ Creation, insertion, deletion
+ }
+
+function gtk_ctree_get_type:TGtkType; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+function gtk_ctree_new_with_titles(columns:gint; tree_column:gint; titles:array of Pgchar):PGtkWidget; cdecl; external gtklib;
+{$ELSE}
+function gtk_ctree_new_with_titles(columns:gint; tree_column:gint):PGtkWidget; varargs; cdecl; external gtklib;
+{$ENDIF}
+function gtk_ctree_new(columns:gint; tree_column:gint):PGtkWidget; cdecl; external gtklib;
+function gtk_ctree_insert_node(ctree:PGtkCTree; parent:PGtkCTreeNode; sibling:PGtkCTreeNode; text:array of Pgchar; spacing:guint8;
+ pixmap_closed:PGdkPixmap; mask_closed:PGdkBitmap; pixmap_opened:PGdkPixmap; mask_opened:PGdkBitmap; is_leaf:gboolean;
+ expanded:gboolean):PGtkCTreeNode; cdecl; external gtklib;
+procedure gtk_ctree_remove_node(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+function gtk_ctree_insert_gnode(ctree:PGtkCTree; parent:PGtkCTreeNode; sibling:PGtkCTreeNode; gnode:PGNode; func:TGtkCTreeGNodeFunc;
+ data:gpointer):PGtkCTreeNode; cdecl; external gtklib;
+function gtk_ctree_export_to_gnode(ctree:PGtkCTree; parent:PGNode; sibling:PGNode; node:PGtkCTreeNode; func:TGtkCTreeGNodeFunc;
+ data:gpointer):PGNode; cdecl; external gtklib;
+{
+ Generic recursive functions, querying / finding tree
+ information
+ }
+procedure gtk_ctree_post_recursive(ctree:PGtkCTree; node:PGtkCTreeNode; func:TGtkCTreeFunc; data:gpointer); cdecl; external gtklib;
+procedure gtk_ctree_post_recursive_to_depth(ctree:PGtkCTree; node:PGtkCTreeNode; depth:gint; func:TGtkCTreeFunc; data:gpointer); cdecl; external gtklib;
+procedure gtk_ctree_pre_recursive(ctree:PGtkCTree; node:PGtkCTreeNode; func:TGtkCTreeFunc; data:gpointer); cdecl; external gtklib;
+procedure gtk_ctree_pre_recursive_to_depth(ctree:PGtkCTree; node:PGtkCTreeNode; depth:gint; func:TGtkCTreeFunc; data:gpointer); cdecl; external gtklib;
+function gtk_ctree_is_viewable(ctree:PGtkCTree; node:PGtkCTreeNode):gboolean; cdecl; external gtklib;
+function gtk_ctree_last(ctree:PGtkCTree; node:PGtkCTreeNode):PGtkCTreeNode; cdecl; external gtklib;
+function gtk_ctree_find_node_ptr(ctree:PGtkCTree; ctree_row:PGtkCTreeRow):PGtkCTreeNode; cdecl; external gtklib;
+function gtk_ctree_node_nth(ctree:PGtkCTree; row:guint):PGtkCTreeNode; cdecl; external gtklib;
+function gtk_ctree_find(ctree:PGtkCTree; node:PGtkCTreeNode; child:PGtkCTreeNode):gboolean; cdecl; external gtklib;
+function gtk_ctree_is_ancestor(ctree:PGtkCTree; node:PGtkCTreeNode; child:PGtkCTreeNode):gboolean; cdecl; external gtklib;
+function gtk_ctree_find_by_row_data(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer):PGtkCTreeNode; cdecl; external gtklib;
+{ returns a GList of all GtkCTreeNodes with row->data == data. }
+function gtk_ctree_find_all_by_row_data(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer):PGList; cdecl; external gtklib;
+function gtk_ctree_find_by_row_data_custom(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer; func:TGCompareFunc):PGtkCTreeNode; cdecl; external gtklib;
+{ returns a GList of all GtkCTreeNodes with row->data == data. }
+function gtk_ctree_find_all_by_row_data_custom(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer; func:TGCompareFunc):PGList; cdecl; external gtklib;
+function gtk_ctree_is_hot_spot(ctree:PGtkCTree; x:gint; y:gint):gboolean; cdecl; external gtklib;
+{
+ Tree signals : move, expand, collapse, (un)select
+ }
+procedure gtk_ctree_move(ctree:PGtkCTree; node:PGtkCTreeNode; new_parent:PGtkCTreeNode; new_sibling:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_expand(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_expand_recursive(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_expand_to_depth(ctree:PGtkCTree; node:PGtkCTreeNode; depth:gint); cdecl; external gtklib;
+procedure gtk_ctree_collapse(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_collapse_recursive(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_collapse_to_depth(ctree:PGtkCTree; node:PGtkCTreeNode; depth:gint); cdecl; external gtklib;
+procedure gtk_ctree_toggle_expansion(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_toggle_expansion_recursive(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_select(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_select_recursive(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_unselect(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_unselect_recursive(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_real_select_recursive(ctree:PGtkCTree; node:PGtkCTreeNode; state:gint); cdecl; external gtklib;
+{
+ Analogons of GtkCList functions
+ }
+procedure gtk_ctree_node_set_text(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; text:Pgchar); cdecl; external gtklib;
+procedure gtk_ctree_node_set_pixmap(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; pixmap:PGdkPixmap; mask:PGdkBitmap); cdecl; external gtklib;
+procedure gtk_ctree_node_set_pixtext(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; text:Pgchar; spacing:guint8;
+ pixmap:PGdkPixmap; mask:PGdkBitmap); cdecl; external gtklib;
+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 gtklib;
+procedure gtk_ctree_node_set_shift(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; vertical:gint; horizontal:gint); cdecl; external gtklib;
+procedure gtk_ctree_node_set_selectable(ctree:PGtkCTree; node:PGtkCTreeNode; selectable:gboolean); cdecl; external gtklib;
+function gtk_ctree_node_get_selectable(ctree:PGtkCTree; node:PGtkCTreeNode):gboolean; cdecl; external gtklib;
+function gtk_ctree_node_get_cell_type(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint):TGtkCellType; cdecl; external gtklib;
+function gtk_ctree_node_get_text(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; text:PPgchar):gboolean; cdecl; external gtklib;
+function gtk_ctree_node_get_pixmap(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; var pixmap:PGdkPixmap; var mask:PGdkBitmap):gboolean; cdecl; external gtklib;
+function gtk_ctree_node_get_pixtext(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; text:PPgchar; spacing:Pguint8;
+ var pixmap:PGdkPixmap; var mask:PGdkBitmap):gboolean; cdecl; external gtklib;
+function gtk_ctree_get_node_info(ctree:PGtkCTree; node:PGtkCTreeNode; text:PPgchar; spacing:Pguint8; var pixmap_closed:PGdkPixmap;
+ var mask_closed:PGdkBitmap; var pixmap_opened:PGdkPixmap; var mask_opened:PGdkBitmap; is_leaf:Pgboolean; expanded:Pgboolean):gboolean; cdecl; external gtklib;
+procedure gtk_ctree_node_set_row_style(ctree:PGtkCTree; node:PGtkCTreeNode; style:PGtkStyle); cdecl; external gtklib;
+function gtk_ctree_node_get_row_style(ctree:PGtkCTree; node:PGtkCTreeNode):PGtkStyle; cdecl; external gtklib;
+procedure gtk_ctree_node_set_cell_style(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; style:PGtkStyle); cdecl; external gtklib;
+function gtk_ctree_node_get_cell_style(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint):PGtkStyle; cdecl; external gtklib;
+procedure gtk_ctree_node_set_foreground(ctree:PGtkCTree; node:PGtkCTreeNode; color:PGdkColor); cdecl; external gtklib;
+procedure gtk_ctree_node_set_background(ctree:PGtkCTree; node:PGtkCTreeNode; color:PGdkColor); cdecl; external gtklib;
+procedure gtk_ctree_node_set_row_data(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer); cdecl; external gtklib;
+procedure gtk_ctree_node_set_row_data_full(ctree:PGtkCTree; node:PGtkCTreeNode; data:gpointer; destroy:TGtkDestroyNotify); cdecl; external gtklib;
+function gtk_ctree_node_get_row_data(ctree:PGtkCTree; node:PGtkCTreeNode):gpointer; cdecl; external gtklib;
+procedure gtk_ctree_node_moveto(ctree:PGtkCTree; node:PGtkCTreeNode; column:gint; row_align:gfloat; col_align:gfloat); cdecl; external gtklib;
+function gtk_ctree_node_is_visible(ctree:PGtkCTree; node:PGtkCTreeNode):TGtkVisibility; cdecl; external gtklib;
+{
+ GtkCTree specific functions
+ }
+procedure gtk_ctree_set_indent(ctree:PGtkCTree; indent:gint); cdecl; external gtklib;
+procedure gtk_ctree_set_spacing(ctree:PGtkCTree; spacing:gint); cdecl; external gtklib;
+procedure gtk_ctree_set_show_stub(ctree:PGtkCTree; show_stub:gboolean); cdecl; external gtklib;
+procedure gtk_ctree_set_line_style(ctree:PGtkCTree; line_style:TGtkCTreeLineStyle); cdecl; external gtklib;
+procedure gtk_ctree_set_expander_style(ctree:PGtkCTree; expander_style:TGtkCTreeExpanderStyle); cdecl; external gtklib;
+procedure gtk_ctree_set_drag_compare_func(ctree:PGtkCTree; cmp_func:TGtkCTreeCompareDragFunc); cdecl; external gtklib;
+{
+ Tree sorting functions
+ }
+procedure gtk_ctree_sort_node(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_sort_recursive(ctree:PGtkCTree; node:PGtkCTreeNode); cdecl; external gtklib;
+procedure gtk_ctree_set_reorderable(t: pointer; r : boolean);
+
+{ GType for the GtkCTreeNode. This is a boxed type, although it uses
+ no-op's for the copy and free routines. It is defined in order to
+ provide type information for the signal arguments
+ }
+function gtk_ctree_node_get_type:GType; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CTREE : GType;
+begin
+ GTK_TYPE_CTREE:=gtk_ctree_get_type;
+end;
+
+function GTK_CTREE(obj: pointer) : PGtkCTree;
+begin
+ GTK_CTREE:=PGtkCTree(GTK_CHECK_CAST(obj,GTK_TYPE_CTREE));
+end;
+
+function GTK_CTREE_CLASS(klass: pointer) : PGtkCTreeClass;
+begin
+ GTK_CTREE_CLASS:=PGtkCTreeClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_CTREE));
+end;
+
+function GTK_IS_CTREE(obj: pointer) : boolean;
+begin
+ GTK_IS_CTREE:=GTK_CHECK_TYPE(obj,GTK_TYPE_CTREE);
+end;
+
+function GTK_IS_CTREE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_CTREE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_CTREE);
+end;
+
+function GTK_CTREE_GET_CLASS(obj: pointer) : PGtkCTreeClass;
+begin
+ GTK_CTREE_GET_CLASS:=PGtkCTreeClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_CTREE));
+end;
+
+function GTK_CTREE_ROW(_node_ : ptrint) : PGtkCTreeRow;
+begin
+ GTK_CTREE_ROW:=PGtkCTreeRow((PGList(_node_))^.data);
+end;
+
+function GTK_CTREE_NODE(_node_ : ptrint) : PGtkCTreeNode;
+begin
+ GTK_CTREE_NODE:=PGtkCTreeNode(_node_);
+end;
+
+function GTK_CTREE_NODE_NEXT(_nnode_ : ptrint) : PGtkCTreeNode;
+begin
+ GTK_CTREE_NODE_NEXT:=PGtkCTreeNode((PGList(_nnode_))^.next);
+end;
+
+function GTK_CTREE_NODE_PREV(_pnode_ : ptrint) : PGtkCTreeNode;
+begin
+ GTK_CTREE_NODE_PREV:=PGtkCTreeNode((PGList(_pnode_))^.prev);
+end;
+
+function GTK_CTREE_FUNC(_func_ : ptrint) : TGtkCTreeFunc;
+begin
+ GTK_CTREE_FUNC:=TGtkCTreeFunc(_func_);
+end;
+
+function GTK_TYPE_CTREE_NODE : GType;
+begin
+ GTK_TYPE_CTREE_NODE:=gtk_ctree_node_get_type;
+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;
+
+procedure gtk_ctree_set_reorderable(t: pointer; r : boolean);
+begin
+ gtk_clist_set_reorderable(PGtkCList(t),r);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkcurve.inc b/packages/gtk2/src/gtk+/gtk/gtkcurve.inc
new file mode 100644
index 0000000000..46d7a439d6
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkcurve.inc
@@ -0,0 +1,121 @@
+// included by gtk2.pas
+
+{
+ NOTE this widget is considered too specialized/little-used for
+ GTK+, and will in the future be moved to some other package. If
+ your application needs this widget, feel free to use it, as the
+ widget does work and is useful in some applications; it's just not
+ of general interest. However, we are not accepting new features for
+ the widget, and it will eventually move out of the GTK+
+ distribution.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ (cached) graph height in pixels }
+{ point currently grabbed }
+{ (cached) curve points: }
+{ control points: }
+{ number of control points }
+{ array of control points }
+ Tctlpoint = array[0..1] of gfloat;
+ Pctlpoint = ^Tctlpoint;
+
+ 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 : Pctlpoint;
+ end;
+
+{ Padding for future expansion }
+ PGtkCurveClass = ^TGtkCurveClass;
+ TGtkCurveClass = record
+ parent_class : TGtkDrawingAreaClass;
+ curve_type_changed : procedure (curve:PGtkCurve); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_CURVE : GType;
+function GTK_CURVE(obj: pointer) : PGtkCurve;
+function GTK_CURVE_CLASS(klass: pointer) : PGtkCurveClass;
+function GTK_IS_CURVE(obj: pointer) : boolean;
+function GTK_IS_CURVE_CLASS(klass: pointer) : boolean;
+function GTK_CURVE_GET_CLASS(obj: pointer) : PGtkCurveClass;
+
+
+function gtk_curve_get_type:TGtkType; cdecl; external gtklib;
+function gtk_curve_new:PGtkWidget; cdecl; external gtklib;
+procedure gtk_curve_reset(curve:PGtkCurve); cdecl; external gtklib;
+procedure gtk_curve_set_gamma(curve:PGtkCurve; gamma:gfloat); cdecl; external gtklib;
+procedure gtk_curve_set_range(curve:PGtkCurve; min_x:gfloat; max_x:gfloat; min_y:gfloat; max_y:gfloat); cdecl; external gtklib;
+{$IFNDEF KYLIX}
+procedure gtk_curve_get_vector(curve:PGtkCurve; veclen:longint; vector:array of gfloat); cdecl; external gtklib;
+procedure gtk_curve_set_vector(curve:PGtkCurve; veclen:longint; vector:array of gfloat); cdecl; external gtklib;
+{$ELSE}
+procedure gtk_curve_get_vector(curve:PGtkCurve; veclen:longint); varargs; cdecl; external gtklib;
+procedure gtk_curve_set_vector(curve:PGtkCurve; veclen:longint); varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_curve_set_curve_type(curve:PGtkCurve; _type:TGtkCurveType); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_CURVE : GType;
+begin
+ GTK_TYPE_CURVE:=gtk_curve_get_type;
+end;
+
+function GTK_CURVE(obj: pointer) : PGtkCurve;
+begin
+ GTK_CURVE:=PGtkCurve(GTK_CHECK_CAST(obj,GTK_TYPE_CURVE));
+end;
+
+function GTK_CURVE_CLASS(klass: pointer) : PGtkCurveClass;
+begin
+ GTK_CURVE_CLASS:=PGtkCurveClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_CURVE));
+end;
+
+function GTK_IS_CURVE(obj: pointer) : boolean;
+begin
+ GTK_IS_CURVE:=GTK_CHECK_TYPE(obj,GTK_TYPE_CURVE);
+end;
+
+function GTK_IS_CURVE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_CURVE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_CURVE);
+end;
+
+function GTK_CURVE_GET_CLASS(obj: pointer) : PGtkCurveClass;
+begin
+ GTK_CURVE_GET_CLASS:=PGtkCurveClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_CURVE));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkdebug.inc b/packages/gtk2/src/gtk+/gtk/gtkdebug.inc
new file mode 100644
index 0000000000..bf07655314
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkdebug.inc
@@ -0,0 +1,24 @@
+// included by gtk2.pas
+
+{$IFDEF read_interface_rest}
+
+{$ifdef G_ENABLE_DEBUG}
+type
+ PGtkDebugFlag = longint;
+const
+ GTK_DEBUG_MISC := 1 shl 0,
+ GTK_DEBUG_PLUGSOCKET := 1 shl 1,
+ GTK_DEBUG_TEXT := 1 shl 2,
+ GTK_DEBUG_TREE := 1 shl 3,
+ GTK_DEBUG_UPDATES := 1 shl 4,
+ GTK_DEBUG_KEYBINDINGS := 1 shl 5
+{$endif}
+
+{$IFNDEF KYLIX}
+ var
+ gtk_debug_flags : guint;cvar;public;
+{$ENDIF}
+{$ENDIF read_interface_rest}
+
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkdialog.inc b/packages/gtk2/src/gtk+/gtk/gtkdialog.inc
new file mode 100644
index 0000000000..6aec2d3104
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkdialog.inc
@@ -0,0 +1,155 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ Parameters for dialog construction }
+{ call gtk_window_set_modal (win, TRUE) }
+{ call gtk_window_set_destroy_with_parent () }
+{ no separator bar above buttons }
+ PGtkDialogFlags = ^TGtkDialogFlags;
+ TGtkDialogFlags = longint;
+
+
+{ Convenience enum to use for response_id's. Positive values are
+ totally user-interpreted. GTK will sometimes return
+ GTK_RESPONSE_NONE if no response_id is available.
+
+ Typical usage is:
+ if (gtk_dialog_run(dialog) = GTK_RESPONSE_ACCEPT) then
+ DoSomethingOnSuccess;
+ }
+{ GTK returns this if a response widget has no response_id,
+ or if the dialog gets programmatically hidden or destroyed.
+ }
+{ GTK won't return these unless you pass them in
+ as the response for an action widget. They are
+ for your convenience.
+ }
+{ If the dialog is deleted. }
+{ These are returned from GTK dialogs, and you can also use them
+ yourself if you like.
+ }
+
+ PGtkResponseType = ^TGtkResponseType;
+ TGtkResponseType = longint;
+
+
+{< private > }
+ PGtkDialog = ^TGtkDialog;
+ TGtkDialog = record
+ window : TGtkWindow;
+ vbox : PGtkWidget;
+ action_area : PGtkWidget;
+ separator : PGtkWidget;
+ end;
+
+{ Keybinding signals }
+{ Padding for future expansion }
+ PGtkDialogClass = ^TGtkDialogClass;
+ TGtkDialogClass = record
+ parent_class : TGtkWindowClass;
+ response : procedure (dialog:PGtkDialog; response_id:gint); cdecl;
+ close : procedure (dialog:PGtkDialog); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_DIALOG_MODAL = 1 shl 0;
+ GTK_DIALOG_DESTROY_WITH_PARENT = 1 shl 1;
+ GTK_DIALOG_NO_SEPARATOR = 1 shl 2;
+
+ GTK_RESPONSE_NONE = -(1);
+ GTK_RESPONSE_REJECT = -(2);
+ GTK_RESPONSE_ACCEPT = -(3);
+ GTK_RESPONSE_DELETE_EVENT = -(4);
+ GTK_RESPONSE_OK = -(5);
+ GTK_RESPONSE_CANCEL = -(6);
+ GTK_RESPONSE_CLOSE = -(7);
+ GTK_RESPONSE_YES = -(8);
+ GTK_RESPONSE_NO = -(9);
+ GTK_RESPONSE_APPLY = -(10);
+ GTK_RESPONSE_HELP = -(11);
+
+
+function GTK_TYPE_DIALOG : GType;
+function GTK_DIALOG(obj: pointer) : PGtkDialog;
+function GTK_DIALOG_CLASS(klass: pointer) : PGtkDialogClass;
+function GTK_IS_DIALOG(obj: pointer) : boolean;
+function GTK_IS_DIALOG_CLASS(klass: pointer) : boolean;
+function GTK_DIALOG_GET_CLASS(obj: pointer) : PGtkDialogClass;
+
+
+function gtk_dialog_get_type:TGtkType; cdecl; external gtklib;
+function gtk_dialog_new:PGtkWidget; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+function gtk_dialog_new_with_buttons(title:Pgchar; parent:PGtkWindow; flags:TGtkDialogFlags; first_button_text:Pgchar; args:array of const):PGtkWidget; cdecl; overload; external gtklib;
+function gtk_dialog_new_with_buttons(title:Pgchar; parent:PGtkWindow; flags:TGtkDialogFlags; first_button_text:Pgchar):PGtkWidget; cdecl; overload; varargs; external gtklib;
+{$ELSE}
+function gtk_dialog_new_with_buttons(title:Pgchar; parent:PGtkWindow; flags:TGtkDialogFlags; first_button_text:Pgchar):PGtkWidget; varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_dialog_add_action_widget(dialog:PGtkDialog; child:PGtkWidget; response_id:gint); cdecl; external gtklib;
+function gtk_dialog_add_button(dialog:PGtkDialog; button_text:Pgchar; response_id:gint):PGtkWidget; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+procedure gtk_dialog_add_buttons(dialog:PGtkDialog; first_button_text:Pgchar; args:array of const); overload; cdecl; external gtklib;
+procedure gtk_dialog_add_buttons(dialog:PGtkDialog; first_button_text:Pgchar); cdecl; overload; varargs; external gtklib;
+{$ELSE}
+procedure gtk_dialog_add_buttons(dialog:PGtkDialog; first_button_text:Pgchar); varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_dialog_set_response_sensitive(dialog:PGtkDialog; response_id:gint; setting:gboolean); cdecl; external gtklib;
+procedure gtk_dialog_set_default_response(dialog:PGtkDialog; response_id:gint); cdecl; external gtklib;
+procedure gtk_dialog_set_has_separator(dialog:PGtkDialog; setting:gboolean); cdecl; external gtklib;
+function gtk_dialog_get_has_separator(dialog:PGtkDialog):gboolean; cdecl; external gtklib;
+{ Emit response signal }
+procedure gtk_dialog_response(dialog:PGtkDialog; response_id:gint); cdecl; external gtklib;
+{ Returns response_id }
+function gtk_dialog_run(dialog:PGtkDialog):gint; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_DIALOG : GType;
+begin
+ GTK_TYPE_DIALOG:=gtk_dialog_get_type;
+end;
+
+function GTK_DIALOG(obj: pointer) : PGtkDialog;
+begin
+ GTK_DIALOG:=PGtkDialog(GTK_CHECK_CAST(obj,GTK_TYPE_DIALOG));
+end;
+
+function GTK_DIALOG_CLASS(klass: pointer) : PGtkDialogClass;
+begin
+ GTK_DIALOG_CLASS:=PGtkDialogClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_DIALOG));
+end;
+
+function GTK_IS_DIALOG(obj: pointer) : boolean;
+begin
+ GTK_IS_DIALOG:=GTK_CHECK_TYPE(obj,GTK_TYPE_DIALOG);
+end;
+
+function GTK_IS_DIALOG_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_DIALOG_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_DIALOG);
+end;
+
+function GTK_DIALOG_GET_CLASS(obj: pointer) : PGtkDialogClass;
+begin
+ GTK_DIALOG_GET_CLASS:=PGtkDialogClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_DIALOG));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkdnd.inc b/packages/gtk2/src/gtk+/gtk/gtkdnd.inc
new file mode 100644
index 0000000000..b7fa376255
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkdnd.inc
@@ -0,0 +1,78 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ respond to "drag_motion" }
+{ auto-highlight }
+{ respond to "drag_drop" }
+ PGtkDestDefaults = ^TGtkDestDefaults;
+ TGtkDestDefaults = longint;
+{ Flags for the GtkTargetEntry on the destination side
+ }
+{< nick=same-app > }
+{< nick=same-widget > }
+
+ PGtkTargetFlags = ^TGtkTargetFlags;
+ TGtkTargetFlags = longint;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ 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;
+
+ GTK_TARGET_SAME_APP = 1 shl 0;
+ GTK_TARGET_SAME_WIDGET = 1 shl 1;
+
+{ Destination side }
+
+procedure gtk_drag_get_data(widget:PGtkWidget; context:PGdkDragContext; target:TGdkAtom; time:guint32); cdecl; external gtklib;
+procedure gtk_drag_finish(context:PGdkDragContext; success:gboolean; del:gboolean; time:guint32); cdecl; external gtklib;
+function gtk_drag_get_source_widget(context:PGdkDragContext):PGtkWidget; cdecl; external gtklib;
+procedure gtk_drag_highlight(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_drag_unhighlight(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_drag_dest_set(widget:PGtkWidget; flags:TGtkDestDefaults; targets:PGtkTargetEntry; n_targets:gint; actions:TGdkDragAction); cdecl; external gtklib;
+procedure gtk_drag_dest_set_proxy(widget:PGtkWidget; proxy_window:PGdkWindow; protocol:TGdkDragProtocol; use_coordinates:gboolean); cdecl; external gtklib;
+procedure gtk_drag_dest_unset(widget:PGtkWidget); cdecl; external gtklib;
+function gtk_drag_dest_find_target(widget:PGtkWidget; context:PGdkDragContext; target_list:PGtkTargetList):TGdkAtom; cdecl; external gtklib;
+function gtk_drag_dest_get_target_list(widget:PGtkWidget):PGtkTargetList; cdecl; external gtklib;
+procedure gtk_drag_dest_set_target_list(widget:PGtkWidget; target_list:PGtkTargetList); cdecl; external gtklib;
+{ Source side }
+procedure gtk_drag_source_set(widget:PGtkWidget; start_button_mask:TGdkModifierType; targets:PGtkTargetEntry; n_targets:gint; actions:TGdkDragAction); cdecl; external gtklib;
+procedure gtk_drag_source_unset(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_drag_source_set_icon(widget:PGtkWidget; colormap:PGdkColormap; pixmap:PGdkPixmap; mask:PGdkBitmap); cdecl; external gtklib;
+procedure gtk_drag_source_set_icon_pixbuf(widget:PGtkWidget; pixbuf:PGdkPixbuf); cdecl; external gtklib;
+procedure gtk_drag_source_set_icon_stock(widget:PGtkWidget; stock_id:Pgchar); cdecl; external gtklib;
+{ There probably should be functions for setting the targets
+ as a GtkTargetList
+ }
+function gtk_drag_begin(widget:PGtkWidget; targets:PGtkTargetList; actions:TGdkDragAction; button:gint; event:PGdkEvent):PGdkDragContext; cdecl; external gtklib;
+{ Set the image being dragged around
+ }
+procedure gtk_drag_set_icon_widget(context:PGdkDragContext; widget:PGtkWidget; hot_x:gint; hot_y:gint); cdecl; external gtklib;
+procedure gtk_drag_set_icon_pixmap(context:PGdkDragContext; colormap:PGdkColormap; pixmap:PGdkPixmap; mask:PGdkBitmap; hot_x:gint;
+ hot_y:gint); cdecl; external gtklib;
+procedure gtk_drag_set_icon_pixbuf(context:PGdkDragContext; pixbuf:PGdkPixbuf; hot_x:gint; hot_y:gint); cdecl; external gtklib;
+procedure gtk_drag_set_icon_stock(context:PGdkDragContext; stock_id:Pgchar; hot_x:gint; hot_y:gint); cdecl; external gtklib;
+procedure gtk_drag_set_icon_default(context:PGdkDragContext); cdecl; external gtklib;
+function gtk_drag_check_threshold(widget:PGtkWidget; start_x:gint; start_y:gint; current_x:gint; current_y:gint):gboolean; cdecl; external gtklib;
+{ Internal functions }
+procedure _gtk_drag_source_handle_event(widget:PGtkWidget; event:PGdkEvent); cdecl; external gtklib;
+procedure _gtk_drag_dest_handle_event(toplevel:PGtkWidget; event:PGdkEvent); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_drag_set_default_icon(colormap:PGdkColormap; pixmap:PGdkPixmap; mask:PGdkBitmap; hot_x:gint; hot_y:gint); cdecl; external gtklib;
+{$endif}
+{ !GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_rest}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkdrawingarea.inc b/packages/gtk2/src/gtk+/gtk/gtkdrawingarea.inc
new file mode 100644
index 0000000000..f7219974e7
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkdrawingarea.inc
@@ -0,0 +1,83 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkDrawingArea = ^TGtkDrawingArea;
+ TGtkDrawingArea = record
+ widget : TGtkWidget;
+ draw_data : gpointer;
+ end;
+
+{ Padding for future expansion }
+ PGtkDrawingAreaClass = ^TGtkDrawingAreaClass;
+ TGtkDrawingAreaClass = record
+ parent_class : TGtkWidgetClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_DRAWING_AREA : GType;
+function GTK_DRAWING_AREA(obj: pointer) : PGtkDrawingArea;
+function GTK_DRAWING_AREA_CLASS(klass: pointer) : PGtkDrawingAreaClass;
+function GTK_IS_DRAWING_AREA(obj: pointer) : boolean;
+function GTK_IS_DRAWING_AREA_CLASS(klass: pointer) : boolean;
+function GTK_DRAWING_AREA_GET_CLASS(obj: pointer) : PGtkDrawingAreaClass;
+
+
+function gtk_drawing_area_get_type:TGtkType; cdecl; external gtklib;
+function gtk_drawing_area_new:PGtkWidget; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_drawing_area_size(darea:PGtkDrawingArea; width:gint; height:gint); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_DRAWING_AREA : GType;
+begin
+ GTK_TYPE_DRAWING_AREA:=gtk_drawing_area_get_type;
+end;
+
+function GTK_DRAWING_AREA(obj: pointer) : PGtkDrawingArea;
+begin
+ GTK_DRAWING_AREA:=PGtkDrawingArea(GTK_CHECK_CAST(obj,GTK_TYPE_DRAWING_AREA));
+end;
+
+function GTK_DRAWING_AREA_CLASS(klass: pointer) : PGtkDrawingAreaClass;
+begin
+ GTK_DRAWING_AREA_CLASS:=PGtkDrawingAreaClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_DRAWING_AREA));
+end;
+
+function GTK_IS_DRAWING_AREA(obj: pointer) : boolean;
+begin
+ GTK_IS_DRAWING_AREA:=GTK_CHECK_TYPE(obj,GTK_TYPE_DRAWING_AREA);
+end;
+
+function GTK_IS_DRAWING_AREA_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_DRAWING_AREA_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_DRAWING_AREA);
+end;
+
+function GTK_DRAWING_AREA_GET_CLASS(obj: pointer) : PGtkDrawingAreaClass;
+begin
+ GTK_DRAWING_AREA_GET_CLASS:=PGtkDrawingAreaClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_DRAWING_AREA));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkeditable.inc b/packages/gtk2/src/gtk+/gtk/gtkeditable.inc
new file mode 100644
index 0000000000..c0bb80300c
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkeditable.inc
@@ -0,0 +1,93 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkEditable = pointer;
+
+{ signals }
+{ vtable }
+ PGtkEditableClass = ^TGtkEditableClass;
+ TGtkEditableClass = record
+ base_iface : TGTypeInterface;
+ insert_text : procedure (editable:PGtkEditable; text:Pgchar; length:gint; position:Pgint); cdecl;
+ delete_text : procedure (editable:PGtkEditable; start_pos:gint; end_pos:gint); cdecl;
+ changed : procedure (editable:PGtkEditable); cdecl;
+ do_insert_text : procedure (editable:PGtkEditable; text:Pgchar; length:gint; position:Pgint); cdecl;
+ do_delete_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_bounds : procedure (editable:PGtkEditable; start_pos:gint; end_pos:gint); cdecl;
+ get_selection_bounds : function (editable:PGtkEditable; start_pos:Pgint; end_pos:Pgint):gboolean; cdecl;
+ set_position : procedure (editable:PGtkEditable; position:gint); cdecl;
+ get_position : function (editable:PGtkEditable):gint; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_EDITABLE : GType;
+function GTK_EDITABLE(obj: pointer) : PGtkEditable;
+function GTK_EDITABLE_CLASS(vtable : pointer) : PGtkEditableClass;
+function GTK_IS_EDITABLE(obj: pointer) : boolean;
+function GTK_IS_EDITABLE_CLASS(vtable : pointer) : boolean;
+function GTK_EDITABLE_GET_CLASS(inst : pointer) : PGtkEditableClass;
+
+
+function gtk_editable_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_editable_select_region(editable:PGtkEditable; start:gint; theEnd:gint); cdecl; external gtklib;
+function gtk_editable_get_selection_bounds(editable:PGtkEditable; start:Pgint; theEnd:Pgint):gboolean; cdecl; external gtklib;
+procedure gtk_editable_insert_text(editable:PGtkEditable; new_text:Pgchar; new_text_length:gint; position:Pgint); cdecl; external gtklib;
+procedure gtk_editable_delete_text(editable:PGtkEditable; start_pos:gint; end_pos:gint); cdecl; external gtklib;
+function gtk_editable_get_chars(editable:PGtkEditable; start_pos:gint; end_pos:gint):Pgchar; cdecl; external gtklib;
+procedure gtk_editable_cut_clipboard(editable:PGtkEditable); cdecl; external gtklib;
+procedure gtk_editable_copy_clipboard(editable:PGtkEditable); cdecl; external gtklib;
+procedure gtk_editable_paste_clipboard(editable:PGtkEditable); cdecl; external gtklib;
+procedure gtk_editable_delete_selection(editable:PGtkEditable); cdecl; external gtklib;
+procedure gtk_editable_set_position(editable:PGtkEditable; position:gint); cdecl; external gtklib;
+function gtk_editable_get_position(editable:PGtkEditable):gint; cdecl; external gtklib;
+procedure gtk_editable_set_editable(editable:PGtkEditable; is_editable:gboolean); cdecl; external gtklib;
+function gtk_editable_get_editable(editable:PGtkEditable):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_EDITABLE : GType;
+begin
+ GTK_TYPE_EDITABLE:=gtk_editable_get_type;
+end;
+
+function GTK_EDITABLE(obj: pointer) : PGtkEditable;
+begin
+ GTK_EDITABLE:=PGtkEditable(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_EDITABLE));
+end;
+
+function GTK_EDITABLE_CLASS(vtable : pointer) : PGtkEditableClass;
+begin
+ GTK_EDITABLE_CLASS:=PGtkEditableClass(G_TYPE_CHECK_CLASS_CAST(vtable,GTK_TYPE_EDITABLE));
+end;
+
+function GTK_IS_EDITABLE(obj: pointer) : boolean;
+begin
+ GTK_IS_EDITABLE:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_EDITABLE);
+end;
+
+function GTK_IS_EDITABLE_CLASS(vtable : pointer) : boolean;
+begin
+ GTK_IS_EDITABLE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(vtable,GTK_TYPE_EDITABLE);
+end;
+
+function GTK_EDITABLE_GET_CLASS(inst : pointer) : PGtkEditableClass;
+begin
+ GTK_EDITABLE_GET_CLASS:=PGtkEditableClass(G_TYPE_INSTANCE_GET_INTERFACE(inst,GTK_TYPE_EDITABLE));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkentry.inc b/packages/gtk2/src/gtk+/gtk/gtkentry.inc
new file mode 100644
index 0000000000..649ddf2499
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkentry.inc
@@ -0,0 +1,350 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ Dragging within the selection }
+{ length in use, in chars }
+{< private > }
+{ Flag so we don't select all when clicking in entry to focus in }
+{ Only used by GtkCellRendererText }
+{ font ascent, in pango units }
+{ font descent, in pango units }
+{ allocated size, in bytes }
+{ length in use, in bytes }
+{ length of preedit string, in bytes }
+{ offset of cursor within preedit string, in chars }
+{ In chars, -1 == no DND cursor }
+ PGtkEntry = ^TGtkEntry;
+ TGtkEntry = record
+ widget : TGtkWidget;
+ text : Pgchar;
+ flag0 : word;
+ text_length : guint16;
+ text_max_length : guint16;
+ text_area : PGdkWindow;
+ im_context : PGtkIMContext;
+ popup_menu : PGtkWidget;
+ current_pos : gint;
+ selection_bound : gint;
+ cached_layout : PPangoLayout;
+ flag1 : word;
+ button : guint;
+ blink_timeout : guint;
+ recompute_idle : guint;
+ scroll_offset : gint;
+ ascent : gint;
+ descent : gint;
+ text_size : guint16;
+ n_bytes : guint16;
+ preedit_length : guint16;
+ preedit_cursor : guint16;
+ dnd_position : gint;
+ drag_start_x : gint;
+ drag_start_y : gint;
+ invisible_char : gunichar;
+ width_chars : gint;
+ end;
+
+{ Hook to customize right-click popup }
+{ Action signals
+ }
+{ Padding for future expansion }
+ PGtkEntryClass = ^TGtkEntryClass;
+ TGtkEntryClass = record
+ parent_class : TGtkWidgetClass;
+ populate_popup : procedure (entry:PGtkEntry; menu:PGtkMenu); cdecl;
+ activate : procedure (entry:PGtkEntry); cdecl;
+ move_cursor : procedure (entry:PGtkEntry; step:TGtkMovementStep; count:gint; extend_selection:gboolean); cdecl;
+ insert_at_cursor : procedure (entry:PGtkEntry; str:Pgchar); cdecl;
+ delete_from_cursor : procedure (entry:PGtkEntry; _type:TGtkDeleteType; count:gint); cdecl;
+ cut_clipboard : procedure (entry:PGtkEntry); cdecl;
+ copy_clipboard : procedure (entry:PGtkEntry); cdecl;
+ paste_clipboard : procedure (entry:PGtkEntry); cdecl;
+ toggle_overwrite : procedure (entry:PGtkEntry); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkEntry_editable = $1;
+ bp_TGtkEntry_editable = 0;
+ bm_TGtkEntry_visible = $2;
+ bp_TGtkEntry_visible = 1;
+ bm_TGtkEntry_overwrite_mode = $4;
+ bp_TGtkEntry_overwrite_mode = 2;
+ bm_TGtkEntry_in_drag = $8;
+ bp_TGtkEntry_in_drag = 3;
+ bm_TGtkEntry_cache_includes_preedit = $1;
+ bp_TGtkEntry_cache_includes_preedit = 0;
+ bm_TGtkEntry_need_im_reset = $2;
+ bp_TGtkEntry_need_im_reset = 1;
+ bm_TGtkEntry_has_frame = $4;
+ bp_TGtkEntry_has_frame = 2;
+ bm_TGtkEntry_activates_default = $8;
+ bp_TGtkEntry_activates_default = 3;
+ bm_TGtkEntry_cursor_visible = $10;
+ bp_TGtkEntry_cursor_visible = 4;
+ bm_TGtkEntry_in_click = $20;
+ bp_TGtkEntry_in_click = 5;
+ bm_TGtkEntry_is_cell_renderer = $40;
+ bp_TGtkEntry_is_cell_renderer = 6;
+ bm_TGtkEntry_editing_canceled = $80;
+ bp_TGtkEntry_editing_canceled = 7;
+ bm_TGtkEntry_mouse_cursor_obscured = $100;
+ bp_TGtkEntry_mouse_cursor_obscured = 8;
+
+
+function GTK_TYPE_ENTRY : GType;
+function GTK_ENTRY(obj: pointer) : PGtkEntry;
+function GTK_ENTRY_CLASS(klass: pointer) : PGtkEntryClass;
+function GTK_IS_ENTRY(obj: pointer) : boolean;
+function GTK_IS_ENTRY_CLASS(klass: pointer) : boolean;
+function GTK_ENTRY_GET_CLASS(obj: pointer) : PGtkEntryClass;
+
+
+function editable(var a : TGtkEntry) : guint; overload;
+procedure set_editable(var a : TGtkEntry; __editable : guint); overload;
+function visible(var a : TGtkEntry) : guint; overload;
+procedure set_visible(var a : TGtkEntry; __visible : guint); overload;
+function overwrite_mode(var a : TGtkEntry) : guint; overload;
+procedure set_overwrite_mode(var a : TGtkEntry; __overwrite_mode : guint); overload;
+function in_drag(var a : TGtkEntry) : guint; overload;
+procedure set_in_drag(var a : TGtkEntry; __in_drag : guint); overload;
+function cache_includes_preedit(var a : TGtkEntry) : guint;
+procedure set_cache_includes_preedit(var a : TGtkEntry; __cache_includes_preedit : guint);
+function need_im_reset(var a : TGtkEntry) : guint; overload;
+procedure set_need_im_reset(var a : TGtkEntry; __need_im_reset : guint); overload;
+function has_frame(var a : TGtkEntry) : guint; overload;
+procedure set_has_frame(var a : TGtkEntry; __has_frame : guint); overload;
+function activates_default(var a : TGtkEntry) : guint;
+procedure set_activates_default(var a : TGtkEntry; __activates_default : guint);
+function cursor_visible(var a : TGtkEntry) : guint; overload;
+procedure set_cursor_visible(var a : TGtkEntry; __cursor_visible : guint); overload;
+function in_click(var a : TGtkEntry) : guint;
+procedure set_in_click(var a : TGtkEntry; __in_click : guint);
+function is_cell_renderer(var a : TGtkEntry) : guint;
+procedure set_is_cell_renderer(var a : TGtkEntry; __is_cell_renderer : guint);
+function editing_canceled(var a : TGtkEntry) : guint;
+procedure set_editing_canceled(var a : TGtkEntry; __editing_canceled : guint);
+function mouse_cursor_obscured(var a : TGtkEntry) : guint; overload;
+procedure set_mouse_cursor_obscured(var a : TGtkEntry; __mouse_cursor_obscured : guint); overload;
+
+function gtk_entry_get_type:TGtkType; cdecl; external gtklib;
+function gtk_entry_new:PGtkWidget; cdecl; external gtklib;
+procedure gtk_entry_set_visibility(entry:PGtkEntry; visible:gboolean); cdecl; external gtklib;
+function gtk_entry_get_visibility(entry:PGtkEntry):gboolean; cdecl; external gtklib;
+procedure gtk_entry_set_invisible_char(entry:PGtkEntry; ch:gunichar); cdecl; external gtklib;
+function gtk_entry_get_invisible_char(entry:PGtkEntry):gunichar; cdecl; external gtklib;
+procedure gtk_entry_set_has_frame(entry:PGtkEntry; setting:gboolean); cdecl; external gtklib;
+function gtk_entry_get_has_frame(entry:PGtkEntry):gboolean; cdecl; external gtklib;
+{ text is truncated if needed }
+procedure gtk_entry_set_max_length(entry:PGtkEntry; max:gint); cdecl; external gtklib;
+function gtk_entry_get_max_length(entry:PGtkEntry):gint; cdecl; external gtklib;
+procedure gtk_entry_set_activates_default(entry:PGtkEntry; setting:gboolean); cdecl; external gtklib;
+function gtk_entry_get_activates_default(entry:PGtkEntry):gboolean; cdecl; external gtklib;
+procedure gtk_entry_set_width_chars(entry:PGtkEntry; n_chars:gint); cdecl; external gtklib;
+function gtk_entry_get_width_chars(entry:PGtkEntry):gint; cdecl; external gtklib;
+{ Somewhat more convenient than the GtkEditable generic functions
+ }
+procedure gtk_entry_set_text(entry:PGtkEntry; text:Pgchar); cdecl; external gtklib;
+{ returns a reference to the text }
+function gtk_entry_get_text(entry:PGtkEntry):Pgchar; cdecl; external gtklib;
+function gtk_entry_get_layout(entry:PGtkEntry):PPangoLayout; cdecl; external gtklib;
+procedure gtk_entry_get_layout_offsets(entry:PGtkEntry; x:Pgint; y:Pgint); cdecl; external gtklib;
+
+{$IFDEF HasGTK2_4}
+function gtk_entry_get_alignment(window:PGtkEntry): GFloat; cdecl; external gtklib;
+procedure gtk_entry_set_alignment(window:PGtkEntry; xalign: GFloat); cdecl; external gtklib;
+function gtk_entry_get_completion(entry:PGtkEntry): PGtkEntryCompletion; cdecl; external gtklib;
+procedure gtk_entry_set_completion(entry:PGtkEntry; entryCompletion: PGtkEntryCompletion); cdecl; external gtklib;
+{$ENDIF HasGTK2_4}
+
+{ Deprecated compatibility functions }
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_entry_new_with_max_length(max:gint):PGtkWidget; cdecl; external gtklib;
+procedure gtk_entry_append_text(entry:PGtkEntry; text:Pgchar); cdecl; external gtklib;
+procedure gtk_entry_prepend_text(entry:PGtkEntry; text:Pgchar); cdecl; external gtklib;
+procedure gtk_entry_set_position(entry:PGtkEntry; position:gint); cdecl; external gtklib;
+procedure gtk_entry_select_region(entry:PGtkEntry; start:gint; theEnd:gint); cdecl; external gtklib;
+procedure gtk_entry_set_editable(entry:PGtkEntry; editable:gboolean); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ENTRY : GType;
+begin
+ GTK_TYPE_ENTRY:=gtk_entry_get_type;
+end;
+
+function GTK_ENTRY(obj: pointer) : PGtkEntry;
+begin
+ GTK_ENTRY:=PGtkEntry(GTK_CHECK_CAST(obj,GTK_TYPE_ENTRY));
+end;
+
+function GTK_ENTRY_CLASS(klass: pointer) : PGtkEntryClass;
+begin
+ GTK_ENTRY_CLASS:=PGtkEntryClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_ENTRY));
+end;
+
+function GTK_IS_ENTRY(obj: pointer) : boolean;
+begin
+ GTK_IS_ENTRY:=GTK_CHECK_TYPE(obj,GTK_TYPE_ENTRY);
+end;
+
+function GTK_IS_ENTRY_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ENTRY_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_ENTRY);
+end;
+
+function GTK_ENTRY_GET_CLASS(obj: pointer) : PGtkEntryClass;
+begin
+ GTK_ENTRY_GET_CLASS:=PGtkEntryClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_ENTRY));
+end;
+
+function editable(var a : TGtkEntry) : guint;
+begin
+ editable:=(a.flag0 and bm_TGtkEntry_editable) shr bp_TGtkEntry_editable;
+end;
+
+procedure set_editable(var a : TGtkEntry; __editable : guint);
+begin
+ a.flag0:=a.flag0 or ((__editable shl bp_TGtkEntry_editable) and bm_TGtkEntry_editable);
+end;
+
+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 overwrite_mode(var a : TGtkEntry) : guint;
+begin
+ overwrite_mode:=(a.flag0 and bm_TGtkEntry_overwrite_mode) shr bp_TGtkEntry_overwrite_mode;
+end;
+
+procedure set_overwrite_mode(var a : TGtkEntry; __overwrite_mode : guint);
+begin
+ a.flag0:=a.flag0 or ((__overwrite_mode shl bp_TGtkEntry_overwrite_mode) and bm_TGtkEntry_overwrite_mode);
+end;
+
+function in_drag(var a : TGtkEntry) : guint;
+begin
+ in_drag:=(a.flag0 and bm_TGtkEntry_in_drag) shr bp_TGtkEntry_in_drag;
+end;
+
+procedure set_in_drag(var a : TGtkEntry; __in_drag : guint);
+begin
+ a.flag0:=a.flag0 or ((__in_drag shl bp_TGtkEntry_in_drag) and bm_TGtkEntry_in_drag);
+end;
+
+function cache_includes_preedit(var a : TGtkEntry) : guint;
+begin
+ cache_includes_preedit:=(a.flag1 and bm_TGtkEntry_cache_includes_preedit) shr bp_TGtkEntry_cache_includes_preedit;
+end;
+
+procedure set_cache_includes_preedit(var a : TGtkEntry; __cache_includes_preedit : guint);
+begin
+ a.flag1:=a.flag1 or ((__cache_includes_preedit shl bp_TGtkEntry_cache_includes_preedit) and bm_TGtkEntry_cache_includes_preedit);
+end;
+
+function need_im_reset(var a : TGtkEntry) : guint;
+begin
+ need_im_reset:=(a.flag1 and bm_TGtkEntry_need_im_reset) shr bp_TGtkEntry_need_im_reset;
+end;
+
+procedure set_need_im_reset(var a : TGtkEntry; __need_im_reset : guint);
+begin
+ a.flag1:=a.flag1 or ((__need_im_reset shl bp_TGtkEntry_need_im_reset) and bm_TGtkEntry_need_im_reset);
+end;
+
+function has_frame(var a : TGtkEntry) : guint;
+begin
+ has_frame:=(a.flag1 and bm_TGtkEntry_has_frame) shr bp_TGtkEntry_has_frame;
+end;
+
+procedure set_has_frame(var a : TGtkEntry; __has_frame : guint);
+begin
+ a.flag1:=a.flag1 or ((__has_frame shl bp_TGtkEntry_has_frame) and bm_TGtkEntry_has_frame);
+end;
+
+function activates_default(var a : TGtkEntry) : guint;
+begin
+ activates_default:=(a.flag1 and bm_TGtkEntry_activates_default) shr bp_TGtkEntry_activates_default;
+end;
+
+procedure set_activates_default(var a : TGtkEntry; __activates_default : guint);
+begin
+ a.flag1:=a.flag1 or ((__activates_default shl bp_TGtkEntry_activates_default) and bm_TGtkEntry_activates_default);
+end;
+
+function cursor_visible(var a : TGtkEntry) : guint;
+begin
+ cursor_visible:=(a.flag1 and bm_TGtkEntry_cursor_visible) shr bp_TGtkEntry_cursor_visible;
+end;
+
+procedure set_cursor_visible(var a : TGtkEntry; __cursor_visible : guint);
+begin
+ a.flag1:=a.flag1 or ((__cursor_visible shl bp_TGtkEntry_cursor_visible) and bm_TGtkEntry_cursor_visible);
+end;
+
+function in_click(var a : TGtkEntry) : guint;
+begin
+ in_click:=(a.flag1 and bm_TGtkEntry_in_click) shr bp_TGtkEntry_in_click;
+end;
+
+procedure set_in_click(var a : TGtkEntry; __in_click : guint);
+begin
+ a.flag1:=a.flag1 or ((__in_click shl bp_TGtkEntry_in_click) and bm_TGtkEntry_in_click);
+end;
+
+function is_cell_renderer(var a : TGtkEntry) : guint;
+begin
+ is_cell_renderer:=(a.flag1 and bm_TGtkEntry_is_cell_renderer) shr bp_TGtkEntry_is_cell_renderer;
+end;
+
+procedure set_is_cell_renderer(var a : TGtkEntry; __is_cell_renderer : guint);
+begin
+ a.flag1:=a.flag1 or ((__is_cell_renderer shl bp_TGtkEntry_is_cell_renderer) and bm_TGtkEntry_is_cell_renderer);
+end;
+
+function editing_canceled(var a : TGtkEntry) : guint;
+begin
+ editing_canceled:=(a.flag1 and bm_TGtkEntry_editing_canceled) shr bp_TGtkEntry_editing_canceled;
+end;
+
+procedure set_editing_canceled(var a : TGtkEntry; __editing_canceled : guint);
+begin
+ a.flag1:=a.flag1 or ((__editing_canceled shl bp_TGtkEntry_editing_canceled) and bm_TGtkEntry_editing_canceled);
+end;
+
+function mouse_cursor_obscured(var a : TGtkEntry) : guint;
+begin
+ mouse_cursor_obscured:=(a.flag1 and bm_TGtkEntry_mouse_cursor_obscured) shr bp_TGtkEntry_mouse_cursor_obscured;
+end;
+
+procedure set_mouse_cursor_obscured(var a : TGtkEntry; __mouse_cursor_obscured : guint);
+begin
+ a.flag1:=a.flag1 or ((__mouse_cursor_obscured shl bp_TGtkEntry_mouse_cursor_obscured) and bm_TGtkEntry_mouse_cursor_obscured);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkentrycompletion.inc b/packages/gtk2/src/gtk+/gtk/gtkentrycompletion.inc
new file mode 100644
index 0000000000..d520a99981
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkentrycompletion.inc
@@ -0,0 +1,107 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkEntryCompletionPrivate = pointer;
+
+ PGtkEntryCompletion = ^TGtkEntryCompletion;
+ TGtkEntryCompletion = record
+ parent_instance : TGObject;
+ priv : PGtkEntryCompletionPrivate;
+ end;
+
+ TGtkEntryCompletionMatchFunc = function (completion:PGtkEntryCompletion; key:Pgchar; iter:PGtkTreeIter; user_data:gpointer):gboolean;cdecl;
+
+
+{ Padding for future expansion }
+ PGtkEntryCompletionClass = ^TGtkEntryCompletionClass;
+ TGtkEntryCompletionClass = record
+ parent_class : TGObjectClass;
+ match_selected : function (completion:PGtkEntryCompletion; model:PGtkTreeModel; iter:PGtkTreeIter):gboolean;
+ action_activated : procedure (completion:PGtkEntryCompletion; index:gint);
+ _gtk_reserved0 : procedure ;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ end;
+
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_ENTRY_COMPLETION : GType;
+function GTK_ENTRY_COMPLETION(obj : pointer) : PGtkEntryCompletion;
+function GTK_ENTRY_COMPLETION_CLASS(klass : pointer) : PGtkEntryCompletionClass;
+function GTK_IS_ENTRY_COMPLETION(obj : pointer) : gboolean;
+function GTK_IS_ENTRY_COMPLETION_CLASS(klass :pointer) : gboolean;
+function GTK_ENTRY_COMPLETION_GET_CLASS(obj : pointer) : PGtkEntryCompletionClass;
+
+
+{ core }
+
+function gtk_entry_completion_get_type:GType;cdecl;external gtklib name 'gtk_entry_completion_get_type';
+
+function gtk_entry_completion_new:PGtkEntryCompletion;cdecl;external gtklib name 'gtk_entry_completion_new';
+function gtk_entry_completion_get_entry(completion:PGtkEntryCompletion):PGtkWidget;cdecl;external gtklib name 'gtk_entry_completion_get_entry';
+
+procedure gtk_entry_completion_set_model(completion:PGtkEntryCompletion; model:PGtkTreeModel);cdecl;external gtklib name 'gtk_entry_completion_set_model';
+function gtk_entry_completion_get_model(completion:PGtkEntryCompletion):PGtkTreeModel;cdecl;external gtklib name 'gtk_entry_completion_get_model';
+
+procedure gtk_entry_completion_set_match_func(completion:PGtkEntryCompletion; func:TGtkEntryCompletionMatchFunc; func_data:gpointer; func_notify:TGDestroyNotify);cdecl;external gtklib name 'gtk_entry_completion_set_match_func';
+
+procedure gtk_entry_completion_set_minimum_key_length(completion:PGtkEntryCompletion; length:gint);cdecl;external gtklib name 'gtk_entry_completion_set_minimum_key_length';
+function gtk_entry_completion_get_minimum_key_length(completion:PGtkEntryCompletion):gint;cdecl;external gtklib name 'gtk_entry_completion_get_minimum_key_length';
+
+procedure gtk_entry_completion_complete(completion:PGtkEntryCompletion);cdecl;external gtklib name 'gtk_entry_completion_complete';
+
+
+procedure gtk_entry_completion_insert_action_text(completion:PGtkEntryCompletion; index:gint; text:Pgchar);cdecl;external gtklib name 'gtk_entry_completion_insert_action_text';
+
+procedure gtk_entry_completion_insert_action_markup(completion:PGtkEntryCompletion; index:gint; markup:Pgchar);cdecl;external gtklib name 'gtk_entry_completion_insert_action_markup';
+
+procedure gtk_entry_completion_delete_action(completion:PGtkEntryCompletion; index:gint);cdecl;external gtklib name 'gtk_entry_completion_delete_action';
+
+
+{ convenience }
+procedure gtk_entry_completion_set_text_column(completion:PGtkEntryCompletion; column:gint);cdecl;external gtklib name 'gtk_entry_completion_set_text_column';
+
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GTK_TYPE_ENTRY_COMPLETION : GType;
+begin
+ GTK_TYPE_ENTRY_COMPLETION:=gtk_entry_completion_get_type;
+end;
+
+function GTK_ENTRY_COMPLETION(obj : pointer) : PGtkEntryCompletion;
+begin
+ GTK_ENTRY_COMPLETION:=PGtkEntryCompletion(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_ENTRY_COMPLETION));
+end;
+
+function GTK_ENTRY_COMPLETION_CLASS(klass : pointer) : PGtkEntryCompletionClass;
+begin
+ GTK_ENTRY_COMPLETION_CLASS:=PGtkEntryCompletionClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_ENTRY_COMPLETION));
+end;
+
+function GTK_IS_ENTRY_COMPLETION(obj : pointer) : gboolean;
+begin
+ GTK_IS_ENTRY_COMPLETION:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_ENTRY_COMPLETION);
+end;
+
+function GTK_IS_ENTRY_COMPLETION_CLASS(klass :pointer) : gboolean;
+begin
+ GTK_IS_ENTRY_COMPLETION_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_ENTRY_COMPLETION);
+end;
+
+function GTK_ENTRY_COMPLETION_GET_CLASS(obj : pointer) : PGtkEntryCompletionClass;
+begin
+ GTK_ENTRY_COMPLETION_GET_CLASS:=PGtkEntryCompletionClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_ENTRY_COMPLETION));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkenums.inc b/packages/gtk2/src/gtk+/gtk/gtkenums.inc
new file mode 100644
index 0000000000..3bcd0a87d9
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkenums.inc
@@ -0,0 +1,463 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+
+{ Anchor types }
+
+ PGtkAnchorType = ^TGtkAnchorType;
+ TGtkAnchorType = Longint;
+
+{ Arrow types }
+
+ PGtkArrowType = ^TGtkArrowType;
+ TGtkArrowType = Longint;
+
+{ Attach options (for tables) }
+
+ PGtkAttachOptions = ^TGtkAttachOptions;
+ TGtkAttachOptions = Longint;
+
+{ Button box styles }
+
+ PGtkButtonBoxStyle = ^TGtkButtonBoxStyle;
+ TGtkButtonBoxStyle = Longint;
+
+{ Curve types }
+
+ PGtkCurveType = ^TGtkCurveType;
+ TGtkCurveType = Longint;
+
+{ Delete types }
+ PGtkDeleteType = ^TGtkDeleteType;
+ TGtkDeleteType = Longint;
+
+{ Focus movement types }
+
+ PGtkDirectionType = ^TGtkDirectionType;
+ TGtkDirectionType = Longint;
+
+{ Expander styles }
+
+ PGtkExpanderStyle = ^TGtkExpanderStyle;
+ TGtkExpanderStyle = Longint;
+
+{ Built-in stock icon sizes }
+
+ PPGtkIconSize = ^PGtkIconSize;
+ PGtkIconSize = ^TGtkIconSize;
+ TGtkIconSize = Longint;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+
+{ side types }
+
+ PGtkSideType = ^TGtkSideType;
+ TGtkSideType = Longint;
+
+{$endif} { GTK_DISABLE_DEPRECATED }
+
+{ Reading directions for text }
+
+ PGtkTextDirection = ^TGtkTextDirection;
+ TGtkTextDirection = Longint;
+
+{ justification for label and maybe other widgets (text?) }
+
+ PGtkJustification = ^TGtkJustification;
+ TGtkJustification = Longint;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+{ GtkPatternSpec match types }
+{ " A?A " }
+{ " A?AA" }
+{ "AAAA " }
+{ " AAAA" }
+{ "AAAAA" }
+
+ PGtkMatchType = ^TGtkMatchType;
+ TGtkMatchType = Longint;
+
+{$endif} { GTK_DISABLE_DEPRECATED }
+
+{ Menu keyboard movement types }
+
+ PGtkMenuDirectionType = ^TGtkMenuDirectionType;
+ TGtkMenuDirectionType = Longint;
+
+
+ PGtkMetricType = ^TGtkMetricType;
+ TGtkMetricType = Longint;
+
+ PGtkMovementStep = ^TGtkMovementStep;
+ TGtkMovementStep = Longint;
+
+{ Orientation for toolbars, etc. }
+
+ PGtkOrientation = ^TGtkOrientation;
+ TGtkOrientation = Longint;
+
+{ Placement type for scrolled window }
+
+ PGtkCornerType = ^TGtkCornerType;
+ TGtkCornerType = Longint;
+
+{ Packing types (for boxes) }
+
+ PGtkPackType = ^TGtkPackType;
+ TGtkPackType = Longint;
+
+{ priorities for path lookups }
+
+ PGtkPathPriorityType = ^TGtkPathPriorityType;
+ TGtkPathPriorityType = Longint;
+
+{ widget path types }
+
+ PGtkPathType = ^TGtkPathType;
+ TGtkPathType = Longint;
+
+{ Scrollbar policy types (for scrolled windows) }
+
+ PGtkPolicyType = ^TGtkPolicyType;
+ TGtkPolicyType = Longint;
+
+ PGtkPositionType = ^TGtkPositionType;
+ TGtkPositionType = Longint;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+
+ PGtkPreviewType = ^TGtkPreviewType;
+ TGtkPreviewType = Longint;
+
+{$endif} { GTK_DISABLE_DEPRECATED }
+
+{ Style for buttons }
+
+ PGtkReliefStyle = ^TGtkReliefStyle;
+ TGtkReliefStyle = Longint;
+
+ PGtkResizeMode = ^TGtkResizeMode;
+ TGtkResizeMode = Longint;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+
+ PGtkSignalRunType = ^TGtkSignalRunType;
+ TGtkSignalRunType = Longint;
+
+{$endif} { GTK_DISABLE_DEPRECATED }
+
+{ scrolling types }
+
+ PGtkScrollType = ^TGtkScrollType;
+ TGtkScrollType = Longint;
+
+{ list selection modes }
+
+ PGtkSelectionMode = ^TGtkSelectionMode;
+ TGtkSelectionMode = Longint;
+
+{ Shadow types }
+
+ PGtkShadowType = ^TGtkShadowType;
+ TGtkShadowType = Longint;
+
+{ Widget states }
+
+ PGtkStateType = ^TGtkStateType;
+ TGtkStateType = Longint;
+
+{ Directions for submenus }
+
+ PGtkSubmenuDirection = ^TGtkSubmenuDirection;
+ TGtkSubmenuDirection = Longint;
+
+{ Placement of submenus }
+
+ PGtkSubmenuPlacement = ^TGtkSubmenuPlacement;
+ TGtkSubmenuPlacement = Longint;
+
+{ Style for toolbars }
+
+ PGtkToolbarStyle = ^TGtkToolbarStyle;
+ TGtkToolbarStyle = Longint;
+
+{ Data update types (for ranges) }
+
+ PGtkUpdateType = ^TGtkUpdateType;
+ TGtkUpdateType = Longint;
+
+{ Generic visibility flags }
+
+ PGtkVisibility = ^TGtkVisibility;
+ TGtkVisibility = Longint;
+
+{ Window position types }
+
+ PGtkWindowPosition = ^TGtkWindowPosition;
+ TGtkWindowPosition = Longint;
+
+{ Window types }
+
+ PGtkWindowType = ^TGtkWindowType;
+ TGtkWindowType = Longint;
+
+{ Text wrap }
+
+ PGtkWrapMode = ^TGtkWrapMode;
+ TGtkWrapMode = Longint;
+
+{ How to sort }
+
+ PGtkSortType = ^TGtkSortType;
+ TGtkSortType = Longint;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+ Const
+ GTK_ANCHOR_CENTER = 0;
+ GTK_ANCHOR_NORTH = 1;
+ GTK_ANCHOR_NORTH_WEST = 2;
+ GTK_ANCHOR_NORTH_EAST = 3;
+ GTK_ANCHOR_SOUTH = 4;
+ GTK_ANCHOR_SOUTH_WEST = 5;
+ GTK_ANCHOR_SOUTH_EAST = 6;
+ GTK_ANCHOR_WEST = 7;
+ GTK_ANCHOR_EAST = 8;
+ GTK_ANCHOR_N = GTK_ANCHOR_NORTH;
+ GTK_ANCHOR_NW = GTK_ANCHOR_NORTH_WEST;
+ GTK_ANCHOR_NE = GTK_ANCHOR_NORTH_EAST;
+ GTK_ANCHOR_S = GTK_ANCHOR_SOUTH;
+ GTK_ANCHOR_SW = GTK_ANCHOR_SOUTH_WEST;
+ GTK_ANCHOR_SE = GTK_ANCHOR_SOUTH_EAST;
+ GTK_ANCHOR_W = GTK_ANCHOR_WEST;
+ GTK_ANCHOR_E = GTK_ANCHOR_EAST;
+
+ GTK_ARROW_UP = 0;
+ GTK_ARROW_DOWN = 1;
+ GTK_ARROW_LEFT = 2;
+ GTK_ARROW_RIGHT = 3;
+
+ GTK_EXPAND = 1 shl 0;
+ GTK_SHRINK = 1 shl 1;
+ GTK_FILL = 1 shl 2;
+
+ GTK_BUTTONBOX_DEFAULT_STYLE = 0;
+ GTK_BUTTONBOX_SPREAD = 1;
+ GTK_BUTTONBOX_EDGE = 2;
+ GTK_BUTTONBOX_START = 3;
+ GTK_BUTTONBOX_END = 4;
+
+ GTK_CURVE_TYPE_LINEAR = 0; { linear interpolation }
+ GTK_CURVE_TYPE_SPLINE = 1; { spline interpolation }
+ GTK_CURVE_TYPE_FREE = 2; { free form curve }
+
+ GTK_DELETE_CHARS = 0;
+ GTK_DELETE_WORD_ENDS = 1;
+ GTK_DELETE_WORDS = 2;
+ GTK_DELETE_DISPLAY_LINES = 3;
+ GTK_DELETE_DISPLAY_LINE_ENDS = 4;
+ GTK_DELETE_PARAGRAPH_ENDS = 5;
+ GTK_DELETE_PARAGRAPHS = 6;
+ GTK_DELETE_WHITESPACE = 7;
+
+ 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;
+
+ GTK_EXPANDER_COLLAPSED = 0;
+ GTK_EXPANDER_SEMI_COLLAPSED = 1;
+ GTK_EXPANDER_SEMI_EXPANDED = 2;
+ GTK_EXPANDER_EXPANDED = 3;
+
+ GTK_ICON_SIZE_INVALID = 0;
+ GTK_ICON_SIZE_MENU = 1;
+ GTK_ICON_SIZE_SMALL_TOOLBAR = 2;
+ GTK_ICON_SIZE_LARGE_TOOLBAR = 3;
+ GTK_ICON_SIZE_BUTTON = 4;
+ GTK_ICON_SIZE_DND = 5;
+ GTK_ICON_SIZE_DIALOG = 6;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+
+ GTK_SIDE_TOP = 0;
+ GTK_SIDE_BOTTOM = 1;
+ GTK_SIDE_LEFT = 2;
+ GTK_SIDE_RIGHT = 3;
+
+{$endif}
+
+ GTK_TEXT_DIR_NONE = 0;
+ GTK_TEXT_DIR_LTR = 1;
+ GTK_TEXT_DIR_RTL = 2;
+
+ GTK_JUSTIFY_LEFT = 0;
+ GTK_JUSTIFY_RIGHT = 1;
+ GTK_JUSTIFY_CENTER = 2;
+ GTK_JUSTIFY_FILL = 3;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+
+ 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;
+{$endif}
+
+ GTK_MENU_DIR_PARENT = 0;
+ GTK_MENU_DIR_CHILD = 1;
+ GTK_MENU_DIR_NEXT = 2;
+ GTK_MENU_DIR_PREV = 3;
+
+ GTK_PIXELS = 0;
+ GTK_INCHES = 1;
+ GTK_CENTIMETERS = 2;
+
+ GTK_MOVEMENT_LOGICAL_POSITIONS = 0; { move by forw/back graphemes }
+ GTK_MOVEMENT_VISUAL_POSITIONS = 1; { move by left/right graphemes }
+ GTK_MOVEMENT_WORDS = 2; { move by forward/back words }
+ GTK_MOVEMENT_DISPLAY_LINES = 3; { move up/down lines (wrapped lines) }
+ GTK_MOVEMENT_DISPLAY_LINE_ENDS = 4; { move up/down lines (wrapped lines) }
+ GTK_MOVEMENT_PARAGRAPHS = 5; { move up/down paragraphs (newline-ended lines) }
+ GTK_MOVEMENT_PARAGRAPH_ENDS = 6; { move to either end of a paragraph }
+ GTK_MOVEMENT_PAGES = 7; { move by pages }
+ GTK_MOVEMENT_BUFFER_ENDS = 8; { move to ends of the buffer }
+
+ GTK_ORIENTATION_HORIZONTAL = 0;
+ GTK_ORIENTATION_VERTICAL = 1;
+
+ GTK_CORNER_TOP_LEFT = 0;
+ GTK_CORNER_BOTTOM_LEFT = 1;
+ GTK_CORNER_TOP_RIGHT = 2;
+ GTK_CORNER_BOTTOM_RIGHT = 3;
+
+ GTK_PACK_START = 0;
+ GTK_PACK_END = 1;
+
+ GTK_PATH_PRIO_LOWEST = 0;
+ GTK_PATH_PRIO_GTK = 4;
+ GTK_PATH_PRIO_APPLICATION = 8;
+ GTK_PATH_PRIO_THEME = 10;
+ GTK_PATH_PRIO_RC = 12;
+ GTK_PATH_PRIO_HIGHEST = 15;
+
+ GTK_PATH_WIDGET = 0;
+ GTK_PATH_WIDGET_CLASS = 1;
+ GTK_PATH_CLASS = 2;
+
+ GTK_POLICY_ALWAYS = 0;
+ GTK_POLICY_AUTOMATIC = 1;
+ GTK_POLICY_NEVER = 2;
+
+ GTK_POS_LEFT = 0;
+ GTK_POS_RIGHT = 1;
+ GTK_POS_TOP = 2;
+ GTK_POS_BOTTOM = 3;
+
+ GTK_PREVIEW_COLOR = 0;
+ GTK_PREVIEW_GRAYSCALE = 1;
+
+ GTK_RELIEF_NORMAL = 0;
+ GTK_RELIEF_HALF = 1;
+ GTK_RELIEF_NONE = 2;
+
+ GTK_RESIZE_PARENT = 0;
+ GTK_RESIZE_QUEUE = 1;
+ GTK_RESIZE_IMMEDIATE = 2;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+
+ GTK_RUN_FIRST = G_SIGNAL_RUN_FIRST;
+ GTK_RUN_LAST = G_SIGNAL_RUN_LAST;
+ GTK_RUN_BOTH = GTK_RUN_FIRST or GTK_RUN_LAST;
+ GTK_RUN_NO_RECURSE = G_SIGNAL_NO_RECURSE;
+ GTK_RUN_ACTION = G_SIGNAL_ACTION;
+ GTK_RUN_NO_HOOKS = G_SIGNAL_NO_HOOKS;
+
+{$endif} { GTK_DISABLE_DEPRECATED }
+
+ GTK_SCROLL_NONE = 0;
+ GTK_SCROLL_JUMP = 1;
+ GTK_SCROLL_STEP_BACKWARD = 2;
+ GTK_SCROLL_STEP_FORWARD = 3;
+ GTK_SCROLL_PAGE_BACKWARD = 4;
+ GTK_SCROLL_PAGE_FORWARD = 5;
+ GTK_SCROLL_STEP_UP = 6;
+ GTK_SCROLL_STEP_DOWN = 7;
+ GTK_SCROLL_PAGE_UP = 8;
+ GTK_SCROLL_PAGE_DOWN = 9;
+ GTK_SCROLL_STEP_LEFT = 10;
+ GTK_SCROLL_STEP_RIGHT = 11;
+ GTK_SCROLL_PAGE_LEFT = 12;
+ GTK_SCROLL_PAGE_RIGHT = 13;
+ GTK_SCROLL_START = 14;
+ GTK_SCROLL_END = 15;
+
+ GTK_SELECTION_NONE = 0; { Nothing can be selected }
+ GTK_SELECTION_SINGLE = 1;
+ GTK_SELECTION_BROWSE = 2;
+ GTK_SELECTION_MULTIPLE = 3;
+ GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE; { Deprecated }
+
+ GTK_SHADOW_NONE = 0;
+ GTK_SHADOW_IN = 1;
+ GTK_SHADOW_OUT = 2;
+ GTK_SHADOW_ETCHED_IN = 3;
+ GTK_SHADOW_ETCHED_OUT = 4;
+
+ GTK_STATE_NORMAL = 0;
+ GTK_STATE_ACTIVE = 1;
+ GTK_STATE_PRELIGHT = 2;
+ GTK_STATE_SELECTED = 3;
+ GTK_STATE_INSENSITIVE = 4;
+
+ GTK_DIRECTION_LEFT = 0;
+ GTK_DIRECTION_RIGHT = 1;
+
+ GTK_TOP_BOTTOM = 0;
+ GTK_LEFT_RIGHT = 1;
+
+ GTK_TOOLBAR_ICONS = 0;
+ GTK_TOOLBAR_TEXT = 1;
+ GTK_TOOLBAR_BOTH = 2;
+ GTK_TOOLBAR_BOTH_HORIZ = 3;
+
+ GTK_UPDATE_CONTINUOUS = 0;
+ GTK_UPDATE_DISCONTINUOUS = 1;
+ GTK_UPDATE_DELAYED = 2;
+
+ GTK_VISIBILITY_NONE = 0;
+ GTK_VISIBILITY_PARTIAL = 1;
+ GTK_VISIBILITY_FULL = 2;
+
+ GTK_WIN_POS_NONE = 0;
+ GTK_WIN_POS_CENTER = 1;
+ GTK_WIN_POS_MOUSE = 2;
+ GTK_WIN_POS_CENTER_ALWAYS = 3;
+ GTK_WIN_POS_CENTER_ON_PARENT = 4;
+
+ GTK_WINDOW_TOPLEVEL = 0;
+ GTK_WINDOW_POPUP = 1;
+
+ GTK_WRAP_NONE = 0;
+ GTK_WRAP_CHAR = 1;
+ GTK_WRAP_WORD = 2;
+
+ GTK_SORT_ASCENDING = 0;
+ GTK_SORT_DESCENDING = 1;
+
+{$ENDIF read_interface_rest}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkeventbox.inc b/packages/gtk2/src/gtk+/gtk/gtkeventbox.inc
new file mode 100644
index 0000000000..bc6ca0de1c
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkeventbox.inc
@@ -0,0 +1,71 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkEventBox = ^TGtkEventBox;
+ TGtkEventBox = record
+ bin : TGtkBin;
+ end;
+
+ PGtkEventBoxClass = ^TGtkEventBoxClass;
+ TGtkEventBoxClass = record
+ parent_class : TGtkBinClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_EVENT_BOX : GType;
+function GTK_EVENT_BOX(obj: pointer) : PGtkEventBox;
+function GTK_EVENT_BOX_CLASS(klass: pointer) : PGtkEventBoxClass;
+function GTK_IS_EVENT_BOX(obj: pointer) : boolean;
+function GTK_IS_EVENT_BOX_CLASS(klass: pointer) : boolean;
+function GTK_EVENT_BOX_GET_CLASS(obj: pointer) : PGtkEventBoxClass;
+
+
+function gtk_event_box_get_type:TGtkType; cdecl; external gtklib;
+function gtk_event_box_new:PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_EVENT_BOX : GType;
+begin
+ GTK_TYPE_EVENT_BOX:=gtk_event_box_get_type;
+end;
+
+function GTK_EVENT_BOX(obj: pointer) : PGtkEventBox;
+begin
+ GTK_EVENT_BOX:=PGtkEventBox(GTK_CHECK_CAST(obj,GTK_TYPE_EVENT_BOX));
+end;
+
+function GTK_EVENT_BOX_CLASS(klass: pointer) : PGtkEventBoxClass;
+begin
+ GTK_EVENT_BOX_CLASS:=PGtkEventBoxClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_EVENT_BOX));
+end;
+
+function GTK_IS_EVENT_BOX(obj: pointer) : boolean;
+begin
+ GTK_IS_EVENT_BOX:=GTK_CHECK_TYPE(obj,GTK_TYPE_EVENT_BOX);
+end;
+
+function GTK_IS_EVENT_BOX_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_EVENT_BOX_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_EVENT_BOX);
+end;
+
+function GTK_EVENT_BOX_GET_CLASS(obj: pointer) : PGtkEventBoxClass;
+begin
+ GTK_EVENT_BOX_GET_CLASS:=PGtkEventBoxClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_EVENT_BOX));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkexpander.inc b/packages/gtk2/src/gtk+/gtk/gtkexpander.inc
new file mode 100644
index 0000000000..95f751255c
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkexpander.inc
@@ -0,0 +1,97 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkExpanderPrivate = pointer;
+
+ PGtkExpander = ^TGtkExpander;
+ TGtkExpander = record
+ bin : TGtkBin;
+ priv : PGtkExpanderPrivate;
+ end;
+
+{ Key binding signal; to get notification on the expansion
+ state connect to notify:expanded.
+}
+ PGtkExpanderClass = ^TGtkExpanderClass;
+ TGtkExpanderClass = record
+ parent_class : TGtkBinClass;
+ activate : procedure (expander:PGtkExpander);cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_EXPANDER : GType;
+function GTK_EXPANDER(obj : pointer) : PGtkExpander;
+function GTK_EXPANDER_CLASS(klass : pointer) : PGtkExpanderClass;
+function GTK_IS_EXPANDER(obj : pointer) : gboolean;
+function GTK_IS_EXPANDER_CLASS(klass : pointer) : gboolean;
+function GTK_EXPANDER_GET_CLASS(obj : pointer) : PGtkExpanderClass;
+
+
+function gtk_expander_get_type:GType;cdecl;external gtklib name 'gtk_expander_get_type';
+
+function gtk_expander_new(szLabel:Pgchar):PGtkWidget;cdecl;external gtklib name 'gtk_expander_new';
+function gtk_expander_new_with_mnemonic(szLabel:Pgchar):PGtkWidget;cdecl;external gtklib name 'gtk_expander_new_with_mnemonic';
+procedure gtk_expander_set_expanded(expander:PGtkExpander; expanded:gboolean);cdecl;external gtklib name 'gtk_expander_set_expanded';
+function gtk_expander_get_expanded(expander:PGtkExpander):gboolean;cdecl;external gtklib name 'gtk_expander_get_expanded';
+
+
+{ Spacing between the expander/label and the child }
+procedure gtk_expander_set_spacing(expander:PGtkExpander; spacing:gint);cdecl;external gtklib name 'gtk_expander_set_spacing';
+function gtk_expander_get_spacing(expander:PGtkExpander):gint;cdecl;external gtklib name 'gtk_expander_get_spacing';
+
+procedure gtk_expander_set_label(expander:PGtkExpander; szLabel:Pgchar);cdecl;external gtklib name 'gtk_expander_set_label';
+function gtk_expander_get_label(expander:PGtkExpander):Pgchar;cdecl;external gtklib name 'gtk_expander_get_label';
+
+procedure gtk_expander_set_use_underline(expander:PGtkExpander; use_underline:gboolean);cdecl;external gtklib name 'gtk_expander_set_use_underline';
+function gtk_expander_get_use_underline(expander:PGtkExpander):gboolean;cdecl;external gtklib name 'gtk_expander_get_use_underline';
+
+procedure gtk_expander_set_use_markup(expander:PGtkExpander; use_markup:gboolean);cdecl;external gtklib name 'gtk_expander_set_use_markup';
+function gtk_expander_get_use_markup(expander:PGtkExpander):gboolean;cdecl;external gtklib name 'gtk_expander_get_use_markup';
+
+procedure gtk_expander_set_label_widget(expander:PGtkExpander; label_widget:PGtkWidget);cdecl;external gtklib name 'gtk_expander_set_label_widget';
+function gtk_expander_get_label_widget(expander:PGtkExpander):PGtkWidget;cdecl;external gtklib name 'gtk_expander_get_label_widget';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+
+function GTK_TYPE_EXPANDER : GType;
+begin
+ GTK_TYPE_EXPANDER:=gtk_expander_get_type;
+end;
+
+function GTK_EXPANDER(obj : pointer) : PGtkExpander;
+begin
+ GTK_EXPANDER:=PGtkExpander(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_EXPANDER));
+end;
+
+function GTK_EXPANDER_CLASS(klass : pointer) : PGtkExpanderClass;
+begin
+ GTK_EXPANDER_CLASS:=PGtkExpanderClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_EXPANDER));
+end;
+
+
+function GTK_IS_EXPANDER(obj : pointer) : gboolean;
+begin
+ GTK_IS_EXPANDER:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_EXPANDER);
+end;
+
+function GTK_IS_EXPANDER_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_EXPANDER_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_EXPANDER);
+end;
+
+function GTK_EXPANDER_GET_CLASS(obj : pointer) : PGtkExpanderClass;
+begin
+ GTK_EXPANDER_GET_CLASS:=PGtkExpanderClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_EXPANDER));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfilechooser.inc b/packages/gtk2/src/gtk+/gtk/gtkfilechooser.inc
new file mode 100644
index 0000000000..50a91d7cfa
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfilechooser.inc
@@ -0,0 +1,150 @@
+
+{$IFDEF read_forward_definitions}
+{$ENDIF}
+
+{$IFDEF read_interface_types}
+type
+ PGtkFileChooser = pointer;
+ PPGtkFileChooser = ^PGtkFileChooser;
+
+ PGtkFileChooserAction = ^TGtkFileChooserAction;
+ TGtkFileChooserAction = (GTK_FILE_CHOOSER_ACTION_OPEN,
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
+ GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER);
+
+type
+
+ PGtkFileChooserError = ^TGtkFileChooserError;
+ TGtkFileChooserError = (GTK_FILE_CHOOSER_ERROR_NONEXISTENT,
+ GTK_FILE_CHOOSER_ERROR_BAD_FILENAME);
+
+{$ENDIF} {types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_FILE_CHOOSER: GType;
+
+function GTK_FILE_CHOOSER(obj : pointer) : PGtkFileChooser;
+
+function GTK_IS_FILE_CHOOSER(obj : pointer) : gboolean;
+
+function GTK_FILE_CHOOSER_ERROR : TGQuark;
+
+
+
+function gtk_file_chooser_get_type:GType;cdecl;external gtklib name 'gtk_file_chooser_get_type';
+
+
+function gtk_file_chooser_error_quark:TGQuark;cdecl;external gtklib name 'gtk_file_chooser_error_quark';
+
+{ Configuration }
+
+procedure gtk_file_chooser_set_action(chooser:PGtkFileChooser; action:TGtkFileChooserAction);cdecl;external gtklib name 'gtk_file_chooser_set_action';
+function gtk_file_chooser_get_action(chooser:PGtkFileChooser):TGtkFileChooserAction;cdecl;external gtklib name 'gtk_file_chooser_get_action';
+procedure gtk_file_chooser_set_local_only(chooser:PGtkFileChooser; local_only:gboolean);cdecl;external gtklib name 'gtk_file_chooser_set_local_only';
+function gtk_file_chooser_get_local_only(chooser:PGtkFileChooser):gboolean;cdecl;external gtklib name 'gtk_file_chooser_get_local_only';
+procedure gtk_file_chooser_set_select_multiple(chooser:PGtkFileChooser; select_multiple:gboolean);cdecl;external gtklib name 'gtk_file_chooser_set_select_multiple';
+function gtk_file_chooser_get_select_multiple(chooser:PGtkFileChooser):gboolean;cdecl;external gtklib name 'gtk_file_chooser_get_select_multiple';
+
+{ Suggested name for the Save-type actions }
+
+procedure gtk_file_chooser_set_current_name(chooser:PGtkFileChooser; name:Pgchar);cdecl;external gtklib name 'gtk_file_chooser_set_current_name';
+
+
+ { Filename manipulation }
+function gtk_file_chooser_get_filename(chooser:PGtkFileChooser):Pgchar;cdecl;external gtklib name 'gtk_file_chooser_get_filename';
+function gtk_file_chooser_set_filename(chooser:PGtkFileChooser; filename:Pchar):gboolean;cdecl;external gtklib name 'gtk_file_chooser_set_filename';
+
+function gtk_file_chooser_select_filename(chooser:PGtkFileChooser; filename:Pchar):gboolean;cdecl;external gtklib name 'gtk_file_chooser_select_filename';
+procedure gtk_file_chooser_unselect_filename(chooser:PGtkFileChooser; filename:Pchar);cdecl;external gtklib name 'gtk_file_chooser_unselect_filename';
+
+procedure gtk_file_chooser_select_all(chooser:PGtkFileChooser);cdecl;external gtklib name 'gtk_file_chooser_select_all';
+procedure gtk_file_chooser_unselect_all(chooser:PGtkFileChooser);cdecl;external gtklib name 'gtk_file_chooser_unselect_all';
+
+function gtk_file_chooser_get_filenames(chooser:PGtkFileChooser):PGSList;cdecl;external gtklib name 'gtk_file_chooser_get_filenames';
+
+function gtk_file_chooser_set_current_folder(chooser:PGtkFileChooser; filename:Pgchar):gboolean;cdecl;external gtklib name 'gtk_file_chooser_set_current_folder';
+function gtk_file_chooser_get_current_folder(chooser:PGtkFileChooser):Pgchar;cdecl;external gtklib name 'gtk_file_chooser_get_current_folder';
+
+{ URI manipulation }
+function gtk_file_chooser_get_uri(chooser:PGtkFileChooser):Pgchar;cdecl;external gtklib name 'gtk_file_chooser_get_uri';
+function gtk_file_chooser_set_uri(chooser:PGtkFileChooser; uri:Pchar):gboolean;cdecl;external gtklib name 'gtk_file_chooser_set_uri';
+
+function gtk_file_chooser_select_uri(chooser:PGtkFileChooser; uri:Pchar):gboolean;cdecl;external gtklib name 'gtk_file_chooser_select_uri';
+procedure gtk_file_chooser_unselect_uri(chooser:PGtkFileChooser; uri:Pchar);cdecl;external gtklib name 'gtk_file_chooser_unselect_uri';
+
+function gtk_file_chooser_get_uris(chooser:PGtkFileChooser):PGSList;cdecl;external gtklib name 'gtk_file_chooser_get_uris';
+
+function gtk_file_chooser_set_current_folder_uri(chooser:PGtkFileChooser; uri:Pgchar):gboolean;cdecl;external gtklib name 'gtk_file_chooser_set_current_folder_uri';
+function gtk_file_chooser_get_current_folder_uri(chooser:PGtkFileChooser):Pgchar;cdecl;external gtklib name 'gtk_file_chooser_get_current_folder_uri';
+
+
+{ Preview widget }
+
+procedure gtk_file_chooser_set_preview_widget(chooser:PGtkFileChooser; preview_widget:PGtkWidget);cdecl;external gtklib name 'gtk_file_chooser_set_preview_widget';
+function gtk_file_chooser_get_preview_widget(chooser:PGtkFileChooser):PGtkWidget;cdecl;external gtklib name 'gtk_file_chooser_get_preview_widget';
+
+procedure gtk_file_chooser_set_preview_widget_active(chooser:PGtkFileChooser; active:gboolean);cdecl;external gtklib name 'gtk_file_chooser_set_preview_widget_active';
+function gtk_file_chooser_get_preview_widget_active(chooser:PGtkFileChooser):gboolean;cdecl;external gtklib name 'gtk_file_chooser_get_preview_widget_active';
+
+procedure gtk_file_chooser_set_use_preview_label(chooser:PGtkFileChooser; use_label:gboolean);cdecl;external gtklib name 'gtk_file_chooser_set_use_preview_label';
+function gtk_file_chooser_get_use_preview_label(chooser:PGtkFileChooser):gboolean;cdecl;external gtklib name 'gtk_file_chooser_get_use_preview_label';
+
+function gtk_file_chooser_get_preview_filename(chooser:PGtkFileChooser):Pchar;cdecl;external gtklib name 'gtk_file_chooser_get_preview_filename';
+function gtk_file_chooser_get_preview_uri(chooser:PGtkFileChooser):Pchar;cdecl;external gtklib name 'gtk_file_chooser_get_preview_uri';
+
+{ Extra widget }
+procedure gtk_file_chooser_set_extra_widget(chooser:PGtkFileChooser; extra_widget:PGtkWidget);cdecl;external gtklib name 'gtk_file_chooser_set_extra_widget';
+function gtk_file_chooser_get_extra_widget(chooser:PGtkFileChooser):PGtkWidget;cdecl;external gtklib name 'gtk_file_chooser_get_extra_widget';
+
+{ List of user selectable filters }
+procedure gtk_file_chooser_add_filter(chooser:PGtkFileChooser; filter:PGtkFileFilter);cdecl;external gtklib name 'gtk_file_chooser_add_filter';
+procedure gtk_file_chooser_remove_filter(chooser:PGtkFileChooser; filter:PGtkFileFilter);cdecl;external gtklib name 'gtk_file_chooser_remove_filter';
+function gtk_file_chooser_list_filters(chooser:PGtkFileChooser):PGSList;cdecl;external gtklib name 'gtk_file_chooser_list_filters';
+
+{ Current filter }
+procedure gtk_file_chooser_set_filter(chooser:PGtkFileChooser; filter:PGtkFileFilter);cdecl;external gtklib name 'gtk_file_chooser_set_filter';
+function gtk_file_chooser_get_filter(chooser:PGtkFileChooser):PGtkFileFilter;cdecl;external gtklib name 'gtk_file_chooser_get_filter';
+
+{ Per-application shortcut folders }
+function gtk_file_chooser_add_shortcut_folder(chooser:PGtkFileChooser; folder:Pchar; error:PPGError):gboolean;cdecl;external gtklib name 'gtk_file_chooser_add_shortcut_folder';
+function gtk_file_chooser_remove_shortcut_folder(chooser:PGtkFileChooser; folder:Pchar; error:PPGError):gboolean;cdecl;external gtklib name 'gtk_file_chooser_remove_shortcut_folder';
+function gtk_file_chooser_list_shortcut_folders(chooser:PGtkFileChooser):PGSList;cdecl;external gtklib name 'gtk_file_chooser_list_shortcut_folders';
+
+function gtk_file_chooser_add_shortcut_folder_uri(chooser:PGtkFileChooser; uri:Pchar; error:PPGError):gboolean;cdecl;external gtklib name 'gtk_file_chooser_add_shortcut_folder_uri';
+function gtk_file_chooser_remove_shortcut_folder_uri(chooser:PGtkFileChooser; uri:Pchar; error:PPGError):gboolean;cdecl;external gtklib name 'gtk_file_chooser_remove_shortcut_folder_uri';
+function gtk_file_chooser_list_shortcut_folder_uris(chooser:PGtkFileChooser):PGSList;cdecl;external gtklib name 'gtk_file_chooser_list_shortcut_folder_uris';
+
+
+{$endif} {read_interface_rest}
+
+{************************************************}
+
+{$IFDEF read_implementation}
+
+ function GTK_TYPE_FILE_CHOOSER: GType;
+ begin
+ GTK_TYPE_FILE_CHOOSER:=gtk_file_chooser_get_type;
+ end;
+
+ function GTK_FILE_CHOOSER(obj : pointer) : PGtkFileChooser;
+ begin
+ GTK_FILE_CHOOSER:=G_TYPE_CHECK_INSTANCE_CAST(obj, GTK_TYPE_FILE_CHOOSER);
+ end;
+
+
+
+ function GTK_IS_FILE_CHOOSER(obj : pointer) : gboolean;
+ begin
+ GTK_IS_FILE_CHOOSER:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_FILE_CHOOSER);
+ end;
+
+
+ function GTK_FILE_CHOOSER_ERROR : TGQuark;
+
+ begin
+ GTK_FILE_CHOOSER_ERROR:=gtk_file_chooser_error_quark;
+ end;
+
+{$ENDIF} {read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfilechooserdefault.inc b/packages/gtk2/src/gtk+/gtk/gtkfilechooserdefault.inc
new file mode 100644
index 0000000000..badafb75d4
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfilechooserdefault.inc
@@ -0,0 +1,51 @@
+{%MainUnit gtkincludes.inc}
+
+{$IFDEF read_forward_definitions}
+{$ENDIF}
+
+{$IFDEF read_interface_types}
+type
+ PGtkFileChooserDefault = pointer;
+ PPGtkFileChooserDefault = ^PGtkFileChooserDefault;
+
+{$ENDIF}
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_FILE_CHOOSER_DEFAULT : GType;
+
+function GTK_FILE_CHOOSER_DEFAULT(obj : pointer) : PGtkFileChooserDefault;
+
+function GTK_IS_FILE_CHOOSER_DEFAULT(obj : pointer) : gboolean;
+
+
+function _gtk_file_chooser_default_get_type:GType;cdecl;external gtklib name '_gtk_file_chooser_default_get_type';
+
+function _gtk_file_chooser_default_new(file_system:Pchar):PGtkWidget;cdecl;external gtklib name '_gtk_file_chooser_default_new';
+
+{$ENDIF}
+
+
+
+{************************************************}
+
+{$IFDEF read_implementation}
+function GTK_TYPE_FILE_CHOOSER_DEFAULT : GType;
+begin
+ GTK_TYPE_FILE_CHOOSER_DEFAULT:=_gtk_file_chooser_default_get_type;
+end;
+
+
+
+function GTK_FILE_CHOOSER_DEFAULT(obj : pointer) : PGtkFileChooserDefault;
+begin
+ GTK_FILE_CHOOSER_DEFAULT:=G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_FILE_CHOOSER_DEFAULT);
+end;
+
+
+function GTK_IS_FILE_CHOOSER_DEFAULT(obj : pointer) : gboolean;
+begin
+ GTK_IS_FILE_CHOOSER_DEFAULT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_FILE_CHOOSER_DEFAULT);
+end;
+
+
+{$ENDIF} {read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfilechooserdialog.inc b/packages/gtk2/src/gtk+/gtk/gtkfilechooserdialog.inc
new file mode 100644
index 0000000000..ca5d0aac54
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfilechooserdialog.inc
@@ -0,0 +1,81 @@
+
+{$IFDEF read_forward_definitions}
+{$ENDIF}
+
+{$IFDEF read_interface_types}
+type
+ PGtkFileChooserDialogClass = ^TGtkFileChooserDialogClass;
+ TGtkFileChooserDialogClass = record
+ parent_class : TGtkDialogClass;
+ end;
+
+ PGtkFileChooserDialog = ^TGtkFileChooserDialog;
+ TGtkFileChooserDialog = record
+ parent_instance : TGtkDialog;
+ priv : PGtkFileChooserDialogPrivate;
+ end;
+
+{$ENDIF} {types}
+
+{$IFDEF read_interface_rest}
+
+
+function GTK_TYPE_FILE_CHOOSER_DIALOG : GType;
+function GTK_FILE_CHOOSER_DIALOG(obj : pointer) : PGtkFileChooserDialog;
+function GTK_FILE_CHOOSER_DIALOG_CLASS(klass : pointer) : PGtkFileChooserDialogClass;
+function GTK_IS_FILE_CHOOSER_DIALOG(obj : pointer) : gboolean;
+function GTK_IS_FILE_CHOOSER_DIALOG_CLASS(klass : pointer) : gboolean;
+function GTK_FILE_CHOOSER_DIALOG_GET_CLASS(obj : pointer) : PGtkFileChooserDialogClass;
+
+
+
+function gtk_file_chooser_dialog_get_type:GType;cdecl;external gtklib name 'gtk_file_chooser_dialog_get_type';
+
+function gtk_file_chooser_dialog_new(title:Pgchar; parent:PGtkWindow; action:TGtkFileChooserAction; first_button_text:Pgchar; args:array of const):PGtkWidget;cdecl;overload;external gtklib name 'gtk_file_chooser_dialog_new';
+function gtk_file_chooser_dialog_new(title:Pgchar; parent:PGtkWindow; action:TGtkFileChooserAction; first_button_text:Pgchar):PGtkWidget;cdecl;overload;varargs;external gtklib name 'gtk_file_chooser_dialog_new';
+
+function gtk_file_chooser_dialog_new_with_backend(title:Pgchar; parent:PGtkWindow; action:TGtkFileChooserAction; backend:Pgchar; first_button_text:Pgchar;
+ args:array of const):PGtkWidget;cdecl;overload;external gtklib name 'gtk_file_chooser_dialog_new_with_backend';
+function gtk_file_chooser_dialog_new_with_backend(title:Pgchar; parent:PGtkWindow; action:TGtkFileChooserAction; backend:Pgchar; first_button_text:Pgchar):PGtkWidget;cdecl;overload;external gtklib name 'gtk_file_chooser_dialog_new_with_backend';
+
+{$endif} {read_interface_rest}
+
+{************************************************}
+
+{$IFDEF read_implementation}
+
+function GTK_TYPE_FILE_CHOOSER_DIALOG : GType;
+ begin
+ GTK_TYPE_FILE_CHOOSER_DIALOG:=gtk_file_chooser_dialog_get_type;
+ end;
+
+
+
+function GTK_FILE_CHOOSER_DIALOG(obj : pointer) : PGtkFileChooserDialog;
+begin
+ GTK_FILE_CHOOSER_DIALOG:=PGtkFileChooserDialog(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_FILE_CHOOSER_DIALOG));
+end;
+
+function GTK_FILE_CHOOSER_DIALOG_CLASS(klass : pointer) : PGtkFileChooserDialogClass;
+begin
+ GTK_FILE_CHOOSER_DIALOG_CLASS:=G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_FILE_CHOOSER_DIALOG);
+end;
+
+
+function GTK_IS_FILE_CHOOSER_DIALOG(obj : pointer) : gboolean;
+begin
+ GTK_IS_FILE_CHOOSER_DIALOG:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_FILE_CHOOSER_DIALOG);
+end;
+
+function GTK_IS_FILE_CHOOSER_DIALOG_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_FILE_CHOOSER_DIALOG_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_FILE_CHOOSER_DIALOG);
+end;
+
+function GTK_FILE_CHOOSER_DIALOG_GET_CLASS(obj : pointer) : PGtkFileChooserDialogClass;
+begin
+ GTK_FILE_CHOOSER_DIALOG_GET_CLASS:=PGtkFileChooserDialogClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_FILE_CHOOSER_DIALOG));
+end;
+
+
+{$ENDIF} {read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfilechooserembed.inc b/packages/gtk2/src/gtk+/gtk/gtkfilechooserembed.inc
new file mode 100644
index 0000000000..56cec122ef
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfilechooserembed.inc
@@ -0,0 +1,68 @@
+
+{$IFDEF read_forward_definitions}
+{$ENDIF}
+
+{$IFDEF read_interface_types}
+type
+ PGtkFileChooserEmbed = pointer;
+ PPGtkFileChooserEmbed = ^PGtkFileChooserEmbed;
+
+ PGtkFileChooserEmbedIface = ^TGtkFileChooserEmbedIface;
+ TGtkFileChooserEmbedIface = record
+ base_iface : TGTypeInterface;
+ { Methods }
+ get_default_size : procedure (chooser_embed:PGtkFileChooserEmbed; default_width:Pgint; default_height:Pgint);cdecl;
+ get_resizable_hints : procedure (chooser_embed:PGtkFileChooserEmbed; resize_horizontally:Pgboolean; resize_vertically:Pgboolean);
+ { Signals }
+ should_respond : function (chooser_embed:PGtkFileChooserEmbed):gboolean;
+ default_size_changed : procedure (chooser_embed:PGtkFileChooserEmbed);
+ end;
+
+{$ENDIF} {types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_FILE_CHOOSER_EMBED : GType;
+
+function GTK_FILE_CHOOSER_EMBED(obj : pointer) : PGtkFileChooserEmbed;
+
+function GTK_IS_FILE_CHOOSER_EMBED(obj : pointer) : gboolean;
+
+function GTK_FILE_CHOOSER_EMBED_GET_IFACE(obj : pointer) : PGtkFileChooserEmbedIface;
+
+
+
+function _gtk_file_chooser_embed_get_type:GType;cdecl;external gtklib name '_gtk_file_chooser_embed_get_type';
+procedure _gtk_file_chooser_embed_get_default_size(chooser_embed:PGtkFileChooserEmbed; default_width:Pgint; default_height:Pgint);cdecl;external gtklib name '_gtk_file_chooser_embed_get_default_size';
+procedure _gtk_file_chooser_embed_get_resizable_hints(chooser_embed:PGtkFileChooserEmbed; resize_horizontally:Pgboolean; resize_vertically:Pgboolean);cdecl;external gtklib name '_gtk_file_chooser_embed_get_resizable_hints';
+function _gtk_file_chooser_embed_should_respond(chooser_embed:PGtkFileChooserEmbed):gboolean;cdecl;external gtklib name '_gtk_file_chooser_embed_should_respond';
+procedure _gtk_file_chooser_embed_delegate_iface_init(iface:PGtkFileChooserEmbedIface);cdecl;external gtklib name '_gtk_file_chooser_embed_delegate_iface_init';
+procedure _gtk_file_chooser_embed_set_delegate(receiver:PGtkFileChooserEmbed; delegate:PGtkFileChooserEmbed);cdecl;external gtklib name '_gtk_file_chooser_embed_set_delegate';
+{$endif} {read_interface_rest}
+
+{************************************************}
+
+{$IFDEF read_implementation}
+
+function GTK_TYPE_FILE_CHOOSER_EMBED : GType;
+ begin
+ GTK_TYPE_FILE_CHOOSER_EMBED:=_gtk_file_chooser_embed_get_type;
+ end;
+
+
+function GTK_FILE_CHOOSER_EMBED(obj : pointer) : PGtkFileChooserEmbed;
+begin
+ GTK_FILE_CHOOSER_EMBED:=G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_FILE_CHOOSER_EMBED);
+end;
+
+function GTK_IS_FILE_CHOOSER_EMBED(obj : pointer) : gboolean;
+begin
+ GTK_IS_FILE_CHOOSER_EMBED:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_FILE_CHOOSER_EMBED);
+end;
+
+function GTK_FILE_CHOOSER_EMBED_GET_IFACE(obj : pointer) : PGtkFileChooserEmbedIface;
+begin
+ GTK_FILE_CHOOSER_EMBED_GET_IFACE:=G_TYPE_INSTANCE_GET_INTERFACE(obj,GTK_TYPE_FILE_CHOOSER_EMBED);
+end;
+
+{$ENDIF} {read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfilechooserentry.inc b/packages/gtk2/src/gtk+/gtk/gtkfilechooserentry.inc
new file mode 100644
index 0000000000..c647eeb41f
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfilechooserentry.inc
@@ -0,0 +1,54 @@
+
+{$IFDEF read_forward_definitions}
+{$ENDIF}
+
+{$IFDEF read_interface_types}
+type
+ PGtkFileChooserEntry = pointer;
+ PPGtkFileChooserEntry = ^PGtkFileChooserEntry;
+{$ENDIF}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_FILE_CHOOSER_ENTRY : GType;
+
+function GTK_FILE_CHOOSER_ENTRY(obj : pointer) : PGtkFileChooserEntry;
+
+function GTK_IS_FILE_CHOOSER_ENTRY(obj : pointer) : gboolean;
+
+function _gtk_file_chooser_entry_get_type:GType;cdecl;external gtklib name '_gtk_file_chooser_entry_get_type';
+function _gtk_file_chooser_entry_new:PGtkWidget;cdecl;external gtklib name '_gtk_file_chooser_entry_new';
+
+procedure _gtk_file_chooser_entry_set_file_system(chooser_entry:PGtkFileChooserEntry; file_system:PGtkFileSystem);cdecl;external gtklib name '_gtk_file_chooser_entry_set_file_system';
+
+procedure _gtk_file_chooser_entry_set_base_folder(chooser_entry:PGtkFileChooserEntry; path:PGtkFilePath);cdecl;external gtklib name '_gtk_file_chooser_entry_set_base_folder';
+
+procedure _gtk_file_chooser_entry_set_file_part(chooser_entry:PGtkFileChooserEntry; file_part:Pgchar);cdecl;external gtklib name '_gtk_file_chooser_entry_set_file_part';
+
+function _gtk_file_chooser_entry_get_current_folder(chooser_entry:PGtkFileChooserEntry):PGtkFilePath;cdecl;external gtklib name '_gtk_file_chooser_entry_get_current_folder';
+
+function _gtk_file_chooser_entry_get_file_part(chooser_entry:PGtkFileChooserEntry):Pgchar;cdecl;external gtklib name '_gtk_file_chooser_entry_get_file_part';
+
+{$endif} {read_interface_rest}
+
+{************************************************}
+
+{$IFDEF read_implementation}
+
+function GTK_TYPE_FILE_CHOOSER_ENTRY : GType;
+ begin
+ GTK_TYPE_FILE_CHOOSER_ENTRY:=_gtk_file_chooser_entry_get_type;
+ end;
+
+{return type}
+function GTK_FILE_CHOOSER_ENTRY(obj : pointer) : PGtkFileChooserEntry;
+begin
+ GTK_FILE_CHOOSER_ENTRY:=G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_FILE_CHOOSER_ENTRY);
+end;
+
+function GTK_IS_FILE_CHOOSER_ENTRY(obj : pointer) : gboolean;
+begin
+ GTK_IS_FILE_CHOOSER_ENTRY:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_FILE_CHOOSER_ENTRY);
+end;
+
+{$ENDIF} {read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfilechooserprivate.inc b/packages/gtk2/src/gtk+/gtk/gtkfilechooserprivate.inc
new file mode 100644
index 0000000000..18b9fd0bd7
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfilechooserprivate.inc
@@ -0,0 +1,75 @@
+
+{$IFDEF read_forward_definitions}
+{$ENDIF}
+
+{$IFDEF read_interface_types}
+type
+ PGtkFileChooserDialogPrivate = pointer;
+ PPGtkFileChooserDialogPrivate = ^PGtkFileChooserDialogPrivate;
+
+ PGtkFileChooserIface = ^TGtkFileChooserIface;
+ TGtkFileChooserIface = record
+ base_iface : TGTypeInterface;
+ { Methods }
+ set_current_folder : function (chooser:PGtkFileChooser; path:PGtkFilePath; error:PPGError):gboolean;cdecl;
+ get_current_folder : function (chooser:PGtkFileChooser):PGtkFilePath;
+ set_current_name : procedure (chooser:PGtkFileChooser; name:Pgchar);
+ select_path : function (chooser:PGtkFileChooser; path:PGtkFilePath; error:PPGError):gboolean;
+ unselect_path : procedure (chooser:PGtkFileChooser; path:PGtkFilePath);
+ select_all : procedure (chooser:PGtkFileChooser);
+ unselect_all : procedure (chooser:PGtkFileChooser);
+ get_paths : function (chooser:PGtkFileChooser):PGSList;
+ get_preview_path : function (chooser:PGtkFileChooser):PGtkFilePath;
+ get_file_system : function (chooser:PGtkFileChooser):PGtkFileSystem;
+ add_filter : procedure (chooser:PGtkFileChooser; filter:PGtkFileFilter);
+ remove_filter : procedure (chooser:PGtkFileChooser; filter:PGtkFileFilter);
+ list_filters : function (chooser:PGtkFileChooser):PGSList;
+ add_shortcut_folder : function (chooser:PGtkFileChooser; path:PGtkFilePath; error:PPGError):gboolean;
+ remove_shortcut_folder : function (chooser:PGtkFileChooser; path:PGtkFilePath; error:PPGError):gboolean;
+ list_shortcut_folders : function (chooser:PGtkFileChooser):PGSList;
+
+ { Signals }
+ current_folder_changed : procedure (chooser:PGtkFileChooser);
+ selection_changed : procedure (chooser:PGtkFileChooser);
+ update_preview : procedure (chooser:PGtkFileChooser);
+ file_activated : procedure (chooser:PGtkFileChooser);
+ end;
+
+{$ENDIF} {types}
+
+{$IFDEF read_interface_rest}
+
+
+(* Geraten: *)
+function GTK_FILE_CHOOSER_GET_IFACE(inst : PGTypeInstance) : PGtkFileChooserIface;
+
+
+
+function _gtk_file_chooser_get_file_system(chooser:PGtkFileChooser):PGtkFileSystem;cdecl;external gtklib name '_gtk_file_chooser_get_file_system';
+
+function _gtk_file_chooser_set_current_folder_path(chooser:PGtkFileChooser; path:PGtkFilePath; error:PPGError):gboolean;cdecl;external gtklib name '_gtk_file_chooser_set_current_folder_path';
+function _gtk_file_chooser_get_current_folder_path(chooser:PGtkFileChooser):PGtkFilePath;cdecl;external gtklib name '_gtk_file_chooser_get_current_folder_path';
+
+function _gtk_file_chooser_select_path(chooser:PGtkFileChooser; path:PGtkFilePath; error:PPGError):gboolean;cdecl;external gtklib name '_gtk_file_chooser_select_path';
+procedure _gtk_file_chooser_unselect_path(chooser:PGtkFileChooser; path:PGtkFilePath);cdecl;external gtklib name '_gtk_file_chooser_unselect_path';
+
+function _gtk_file_chooser_get_paths(chooser:PGtkFileChooser):PGSList;cdecl;external gtklib name '_gtk_file_chooser_get_paths';
+function _gtk_file_chooser_get_preview_path(chooser:PGtkFileChooser):PGtkFilePath;cdecl;external gtklib name '_gtk_file_chooser_get_preview_path';
+
+function _gtk_file_chooser_add_shortcut_folder(chooser:PGtkFileChooser; path:PGtkFilePath; error:PPGError):gboolean;cdecl;external gtklib name '_gtk_file_chooser_add_shortcut_folder';
+function _gtk_file_chooser_remove_shortcut_folder(chooser:PGtkFileChooser; path:PGtkFilePath; error:PPGError):gboolean;cdecl;external gtklib name '_gtk_file_chooser_remove_shortcut_folder';
+
+{$endif} {interface_rest}
+
+{************************************************}
+
+{$IFDEF read_implementation}
+
+
+function GTK_FILE_CHOOSER_GET_IFACE(inst : PGTypeInstance) : PGtkFileChooserIface;
+
+begin
+ GTK_FILE_CHOOSER_GET_IFACE:=G_TYPE_INSTANCE_GET_INTERFACE(inst,GTK_TYPE_FILE_CHOOSER);
+end;
+
+{$ENDIF} {read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfilechooserutils.inc b/packages/gtk2/src/gtk+/gtk/gtkfilechooserutils.inc
new file mode 100644
index 0000000000..e9a344305a
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfilechooserutils.inc
@@ -0,0 +1,38 @@
+
+{$IFDEF read_forward_definitions}
+{$ENDIF}
+
+{$IFDEF read_interface_types}
+type
+
+ PGtkFileChooserProp = ^TGtkFileChooserProp;
+ TGtkFileChooserProp = (GTK_FILE_CHOOSER_PROP_ACTION := $1000,
+ GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND,
+ GTK_FILE_CHOOSER_PROP_FILTER,
+ GTK_FILE_CHOOSER_PROP_LOCAL_ONLY,
+ GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET,
+ GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET_ACTIVE,
+ GTK_FILE_CHOOSER_PROP_USE_PREVIEW_LABEL,
+ GTK_FILE_CHOOSER_PROP_EXTRA_WIDGET,
+ GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE,
+ GTK_FILE_CHOOSER_PROP_SHOW_HIDDEN);
+const
+ GTK_FILE_CHOOSER_PROP_FIRST = GTK_FILE_CHOOSER_PROP_ACTION;
+ GTK_FILE_CHOOSER_PROP_LAST = GTK_FILE_CHOOSER_PROP_SHOW_HIDDEN;
+
+{$ENDIF} {types}
+
+{$IFDEF read_interface_rest}
+
+
+
+procedure _gtk_file_chooser_install_properties(klass:PGObjectClass);cdecl;external gtklib name '_gtk_file_chooser_install_properties';
+procedure _gtk_file_chooser_delegate_iface_init(iface:PGtkFileChooserIface);cdecl;external gtklib name '_gtk_file_chooser_delegate_iface_init';
+procedure _gtk_file_chooser_set_delegate(receiver:PGtkFileChooser; delegate:PGtkFileChooser);cdecl;external gtklib name '_gtk_file_chooser_set_delegate';
+{$endif}
+
+{************************************************}
+
+{$IFDEF read_implementation}
+
+{$ENDIF}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfilechooserwidget.inc b/packages/gtk2/src/gtk+/gtk/gtkfilechooserwidget.inc
new file mode 100644
index 0000000000..8329fd1f25
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfilechooserwidget.inc
@@ -0,0 +1,78 @@
+
+{$IFDEF read_forward_definitions}
+{$ENDIF}
+
+{$IFDEF read_interface_types}
+type
+ PGtkFileChooserWidgetPrivate = pointer;
+ PPGtkFileChooserWidgetPrivate = ^PGtkFileChooserWidgetPrivate;
+
+ PGtkFileChooserWidgetClass = ^TGtkFileChooserWidgetClass;
+ TGtkFileChooserWidgetClass = record
+ parent_class : TGtkVBoxClass;
+ end;
+
+ PGtkFileChooserWidget = ^TGtkFileChooserWidget;
+ TGtkFileChooserWidget = record
+ parent_instance : TGtkVBox;
+ priv : PGtkFileChooserWidgetPrivate;
+ end;
+
+{$ENDIF} {types }
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_FILE_CHOOSER_WIDGET : GType;
+function GTK_FILE_CHOOSER_WIDGET(obj : pointer) : PGtkFileChooserWidget;
+function GTK_FILE_CHOOSER_WIDGET_CLASS(klass : pointer) : PGtkFileChooserWidget;
+function GTK_IS_FILE_CHOOSER_WIDGET(obj : pointer) : gboolean;
+function GTK_IS_FILE_CHOOSER_WIDGET_CLASS(klass :pointer) : gboolean;
+function GTK_FILE_CHOOSER_WIDGET_GET_CLASS(obj : pointer) : PGtkFileChooserWidgetClass;
+
+
+
+function gtk_file_chooser_widget_get_type:GType;cdecl;external gtklib name 'gtk_file_chooser_widget_get_type';
+function gtk_file_chooser_widget_new(action:TGtkFileChooserAction):PGtkWidget;cdecl;external gtklib name 'gtk_file_chooser_widget_new';
+function gtk_file_chooser_widget_new_with_backend(action:TGtkFileChooserAction; backend:Pgchar):PGtkWidget;cdecl;external gtklib name 'gtk_file_chooser_widget_new_with_backend';
+{$endif} {read_interface_rest}
+
+{$IFDEF read_implementation}
+
+function GTK_TYPE_FILE_CHOOSER_WIDGET : GType;
+ begin
+ GTK_TYPE_FILE_CHOOSER_WIDGET:=gtk_file_chooser_widget_get_type;
+ end;
+
+function GTK_FILE_CHOOSER_WIDGET(obj : pointer) : PGtkFileChooserWidget;
+begin
+ GTK_FILE_CHOOSER_WIDGET:=PGtkFileChooserWidget(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_FILE_CHOOSER_WIDGET));
+end;
+
+{ ToDO:
+ Is the return type right?
+}
+
+function GTK_FILE_CHOOSER_WIDGET_CLASS(klass : pointer) : PGtkFileChooserWidget;
+begin
+ GTK_FILE_CHOOSER_WIDGET_CLASS:=PGtkFileChooserWidget(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_FILE_CHOOSER_WIDGET));
+end;
+
+function GTK_IS_FILE_CHOOSER_WIDGET(obj : pointer) : gboolean;
+begin
+ GTK_IS_FILE_CHOOSER_WIDGET:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_FILE_CHOOSER_WIDGET);
+end;
+
+
+function GTK_IS_FILE_CHOOSER_WIDGET_CLASS(klass :pointer) : gboolean;
+begin
+ GTK_IS_FILE_CHOOSER_WIDGET_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_FILE_CHOOSER_WIDGET);
+end;
+
+
+function GTK_FILE_CHOOSER_WIDGET_GET_CLASS(obj : pointer) : PGtkFileChooserWidgetClass;
+begin
+ GTK_FILE_CHOOSER_WIDGET_GET_CLASS:=PGtkFileChooserWidgetClass (G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_FILE_CHOOSER_WIDGET));
+end;
+
+
+{$ENDIF}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfilefilter.inc b/packages/gtk2/src/gtk+/gtk/gtkfilefilter.inc
new file mode 100644
index 0000000000..f2b96c3036
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfilefilter.inc
@@ -0,0 +1,71 @@
+{$IFDEF read_forward_definitions}
+{$ENDIF}
+
+{$ifdef read_interface_types}
+type
+ PGtkFileFilter = pointer;
+ PPGtkFileFilter = ^PGtkFileFilter;
+
+ PGtkFileFilterFlags = ^TGtkFileFilterFlags;
+ TGtkFileFilterFlags = (GTK_FILE_FILTER_FILENAME := 1 shl 0,
+ GTK_FILE_FILTER_URI := 1 shl 1,
+ GTK_FILE_FILTER_DISPLAY_NAME := 1 shl 2,
+ GTK_FILE_FILTER_MIME_TYPE := 1 shl 3);
+
+ PGtkFileFilterInfo = ^TGtkFileFilterInfo;
+ TGtkFileFilterInfo = record
+ contains : TGtkFileFilterFlags;
+ filename : Pgchar;
+ uri : Pgchar;
+ display_name : Pgchar;
+ mime_type : Pgchar;
+ end;
+
+ TGtkFileFilterFunc = function (filter_info:PGtkFileFilterInfo; data:gpointer):gboolean;cdecl;
+
+{$endif} {read_interface_types}
+
+{$ifdef read_interface_rest}
+
+function GTK_TYPE_FILE_FILTER : GType;
+
+function GTK_FILE_FILTER(obj : pointer) : PGtkFileFilter;
+
+function GTK_IS_FILE_FILTER(obj : pointer) : gboolean;
+
+
+function gtk_file_filter_get_type:GType;cdecl;external gtklib name 'gtk_file_filter_get_type';
+function gtk_file_filter_new:PGtkFileFilter;cdecl;external gtklib name 'gtk_file_filter_new';
+
+procedure gtk_file_filter_set_name(filter:PGtkFileFilter; name:Pgchar);cdecl;external gtklib name 'gtk_file_filter_set_name';
+
+function gtk_file_filter_get_name(filter:PGtkFileFilter):Pgchar;cdecl;external gtklib name 'gtk_file_filter_get_name';
+
+procedure gtk_file_filter_add_mime_type(filter:PGtkFileFilter; mime_type:Pgchar);cdecl;external gtklib name 'gtk_file_filter_add_mime_type';
+
+procedure gtk_file_filter_add_pattern(filter:PGtkFileFilter; pattern:Pgchar);cdecl;external gtklib name 'gtk_file_filter_add_pattern';
+procedure gtk_file_filter_add_custom(filter:PGtkFileFilter; needed:TGtkFileFilterFlags; func:TGtkFileFilterFunc; data:gpointer; notify:TGDestroyNotify);cdecl;external gtklib name 'gtk_file_filter_add_custom';
+function gtk_file_filter_get_needed(filter:PGtkFileFilter):TGtkFileFilterFlags;cdecl;external gtklib name 'gtk_file_filter_get_needed';
+
+function gtk_file_filter_filter(filter:PGtkFileFilter; filter_info:PGtkFileFilterInfo):gboolean;cdecl;external gtklib name 'gtk_file_filter_filter';
+
+{$endif}
+
+{$ifdef read_implementation}
+
+function GTK_TYPE_FILE_FILTER : GType;
+ begin
+ GTK_TYPE_FILE_FILTER:=gtk_file_filter_get_type;
+ end;
+
+function GTK_FILE_FILTER(obj : pointer) : PGtkFileFilter;
+begin
+ GTK_FILE_FILTER:=G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_FILE_FILTER);
+end;
+
+function GTK_IS_FILE_FILTER(obj : pointer) : gboolean;
+begin
+ GTK_IS_FILE_FILTER:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_FILE_FILTER);
+end;
+
+{$endif} {read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfilesel.inc b/packages/gtk2/src/gtk+/gtk/gtkfilesel.inc
new file mode 100644
index 0000000000..f95e963a3c
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfilesel.inc
@@ -0,0 +1,112 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkFileSelection = ^TGtkFileSelection;
+ TGtkFileSelection = record
+ parent_instance : TGtkDialog;
+ 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 : Pgchar;
+ cmpl_state : gpointer;
+ fileop_c_dir : PGtkWidget;
+ fileop_del_file : PGtkWidget;
+ fileop_ren_file : PGtkWidget;
+ button_area : PGtkWidget;
+ action_area : PGtkWidget;
+ selected_names : PGPtrArray;
+ last_selected : Pgchar;
+ end;
+
+{ Padding for future expansion }
+ PGtkFileSelectionClass = ^TGtkFileSelectionClass;
+ TGtkFileSelectionClass = record
+ parent_class : TGtkDialogClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_FILE_SELECTION : GType;
+function GTK_FILE_SELECTION(obj: pointer) : PGtkFileSelection;
+function GTK_FILE_SELECTION_CLASS(klass: pointer) : PGtkFileSelectionClass;
+function GTK_IS_FILE_SELECTION(obj: pointer) : boolean;
+function GTK_IS_FILE_SELECTION_CLASS(klass: pointer) : boolean;
+function GTK_FILE_SELECTION_GET_CLASS(obj: pointer) : PGtkFileSelectionClass;
+
+
+function gtk_file_selection_get_type:TGtkType; cdecl; external gtklib;
+function gtk_file_selection_new(title:Pgchar):PGtkWidget; cdecl; external gtklib;
+procedure gtk_file_selection_set_filename(filesel:PGtkFileSelection; filename:Pgchar); cdecl; external gtklib;
+{ This function returns the selected filename in the C runtime's
+ multibyte string encoding, which may or may not be the same as that
+ used by GDK (UTF-8). To convert to UTF-8, call g_filename_to_utf8().
+ The returned string points to a statically allocated buffer and
+ should be copied away.
+ }
+function gtk_file_selection_get_filename(filesel:PGtkFileSelection):Pgchar; cdecl; external gtklib;
+procedure gtk_file_selection_complete(filesel:PGtkFileSelection; pattern:Pgchar); cdecl; external gtklib;
+procedure gtk_file_selection_show_fileop_buttons(filesel:PGtkFileSelection); cdecl; external gtklib;
+procedure gtk_file_selection_hide_fileop_buttons(filesel:PGtkFileSelection); cdecl; external gtklib;
+function gtk_file_selection_get_selections(filesel:PGtkFileSelection):PPgchar; cdecl; external gtklib;
+procedure gtk_file_selection_set_select_multiple(filesel:PGtkFileSelection; select_multiple:gboolean); cdecl; external gtklib;
+function gtk_file_selection_get_select_multiple(filesel:PGtkFileSelection):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_FILE_SELECTION : GType;
+begin
+ GTK_TYPE_FILE_SELECTION:=gtk_file_selection_get_type;
+end;
+
+function GTK_FILE_SELECTION(obj: pointer) : PGtkFileSelection;
+begin
+ GTK_FILE_SELECTION:=PGtkFileSelection(GTK_CHECK_CAST(obj,GTK_TYPE_FILE_SELECTION));
+end;
+
+function GTK_FILE_SELECTION_CLASS(klass: pointer) : PGtkFileSelectionClass;
+begin
+ GTK_FILE_SELECTION_CLASS:=PGtkFileSelectionClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_FILE_SELECTION));
+end;
+
+function GTK_IS_FILE_SELECTION(obj: pointer) : boolean;
+begin
+ GTK_IS_FILE_SELECTION:=GTK_CHECK_TYPE(obj,GTK_TYPE_FILE_SELECTION);
+end;
+
+function GTK_IS_FILE_SELECTION_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_FILE_SELECTION_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_FILE_SELECTION);
+end;
+
+function GTK_FILE_SELECTION_GET_CLASS(obj: pointer) : PGtkFileSelectionClass;
+begin
+ GTK_FILE_SELECTION_GET_CLASS:=PGtkFileSelectionClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_FILE_SELECTION));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfilesystem.inc b/packages/gtk2/src/gtk+/gtk/gtkfilesystem.inc
new file mode 100644
index 0000000000..41ea6d3c09
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfilesystem.inc
@@ -0,0 +1,341 @@
+
+{ This is a "semi-private" header; it is meant only for
+ alternate GtkFileChooser backend modules; no stability guarantees
+ are made at this point
+ }
+
+
+{$IFDEF read_forward_definitions}
+
+{$ENDIF}
+
+{$IFDEF read_interface_types}
+type
+
+ PGtkFileTime = ^TGtkFileTime;
+ TGtkFileTime = gint64;
+
+ PGtkFileSystem = pointer;
+ PPGtkFileSystem = ^PGtkFileSystem;
+
+ PGtkFilePath = Pgchar; { Seems to be implemented in GTK 2.4 by now }
+ PPGtkFilePath = ^PGtkFilePath;
+
+ PGtkFileSystemVolume = pointer;
+ PPGtkFileSystemVolume = ^PGtkFileSystemVolume;
+
+ PGtkFileFolder = pointer;
+ PPGtkFileFolder = ^PGtkFileFolder;
+
+ PGtkFileInfo = pointer;
+ PPGtkFileInfo = ^PGtkFileInfo;
+
+{ Mask of information about a file, for monitoring and
+ gtk_file_system_get_info()
+ }
+
+ PGtkFileInfoType = ^TGtkFileInfoType;
+ TGtkFileInfoType = (GTK_FILE_INFO_DISPLAY_NAME := 1 shl 0,
+ GTK_FILE_INFO_IS_FOLDER := 1 shl 1,
+ GTK_FILE_INFO_IS_HIDDEN := 1 shl 2,
+ GTK_FILE_INFO_MIME_TYPE := 1 shl 3,
+ GTK_FILE_INFO_MODIFICATION_TIME := 1 shl 4,
+ GTK_FILE_INFO_SIZE := 1 shl 5,
+ GTK_FILE_INFO_ALL := (1 shl 6) - 1 );
+
+type
+
+ PGtkFileSystemError = ^TGtkFileSystemError;
+ TGtkFileSystemError = (GTK_FILE_SYSTEM_ERROR_NONEXISTENT,
+ GTK_FILE_SYSTEM_ERROR_NOT_FOLDER,
+ GTK_FILE_SYSTEM_ERROR_INVALID_URI,
+ GTK_FILE_SYSTEM_ERROR_BAD_FILENAME,
+ GTK_FILE_SYSTEM_ERROR_FAILED,
+ GTK_FILE_SYSTEM_ERROR_ALREADY_EXISTS);
+
+
+type
+ PGtkFileSystemIface = ^TGtkFileSystemIface;
+ TGtkFileSystemIface = record
+ base_iface : TGTypeInterface;
+ { Methods }
+
+ { Volumes }
+ list_volumes : function (file_system:PGtkFileSystem):PGSList;cdecl;
+ get_volume_for_path : function (file_system:PGtkFileSystem; path:PGtkFilePath):PGtkFileSystemVolume;
+ get_folder : function (file_system:PGtkFileSystem; path:PGtkFilePath; types:TGtkFileInfoType; error:PPGError):PGtkFileFolder;
+ create_folder : function (file_system:PGtkFileSystem; path:PGtkFilePath; error:PPGError):gboolean;
+ volume_free : procedure (file_system:PGtkFileSystem; volume:PGtkFileSystemVolume);
+ volume_get_base_path : function (file_system:PGtkFileSystem; volume:PGtkFileSystemVolume):PGtkFilePath;
+ volume_get_is_mounted : function (file_system:PGtkFileSystem; volume:PGtkFileSystemVolume):gboolean;
+ volume_mount : function (file_system:PGtkFileSystem; volume:PGtkFileSystemVolume; error:PPGError):gboolean;
+ volume_get_display_name : function (file_system:PGtkFileSystem; volume:PGtkFileSystemVolume):Pchar;
+ volume_render_icon : function (file_system:PGtkFileSystem; volume:PGtkFileSystemVolume; widget:PGtkWidget; pixel_size:gint; error:PPGError):PGdkPixbuf;
+ get_parent : function (file_system:PGtkFileSystem; path:PGtkFilePath; parent:PPGtkFilePath; error:PPGError):gboolean;
+ make_path : function (file_system:PGtkFileSystem; base_path:PGtkFilePath; display_name:Pgchar; error:PPGError):PGtkFilePath;
+ parse : function (file_system:PGtkFileSystem; base_path:PGtkFilePath; str:Pgchar; folder:PPGtkFilePath; file_part:PPgchar;
+ error:PPGError):gboolean;
+ { Path Manipulation }
+ path_to_uri : function (file_system:PGtkFileSystem; path:PGtkFilePath):Pgchar;
+ path_to_filename : function (file_system:PGtkFileSystem; path:PGtkFilePath):Pgchar;
+ uri_to_path : function (file_system:PGtkFileSystem; uri:Pgchar):PGtkFilePath;
+ filename_to_path : function (file_system:PGtkFileSystem; path:Pgchar):PGtkFilePath;
+
+ { Icons }
+ render_icon : function (file_system:PGtkFileSystem; path:PGtkFilePath; widget:PGtkWidget; pixel_size:gint; error:PPGError):PGdkPixbuf;
+
+ { Bookmarks }
+ insert_bookmark : function (file_system:PGtkFileSystem; path:PGtkFilePath; position:gint; error:PPGError):gboolean;
+ remove_bookmark : function (file_system:PGtkFileSystem; path:PGtkFilePath; error:PPGError):gboolean;
+ list_bookmarks : function (file_system:PGtkFileSystem):PGSList;
+
+ { Signals }
+ volumes_changed : procedure (file_system:PGtkFileSystem);
+ bookmarks_changed : procedure (file_system:PGtkFileSystem);
+ end;
+
+
+type
+ PGtkFileFolderIface = ^TGtkFileFolderIface;
+ TGtkFileFolderIface = record
+ base_iface : TGTypeInterface;
+ { Methods }
+ get_info : function (folder:PGtkFileFolder; path:PGtkFilePath; error:PPGError):PGtkFileInfo;cdecl;
+ list_children : function (folder:PGtkFileFolder; children:PPGSList; error:PPGError):gboolean;
+ { ??? refresh() ??? }
+
+ { Signals }
+ deleted : procedure (monitor:PGtkFileFolder);
+ files_added : procedure (monitor:PGtkFileFolder; paths:PGSList);
+ files_changed : procedure (monitor:PGtkFileFolder; paths:PGSList);
+ files_removed : procedure (monitor:PGtkFileFolder; paths:PGSList);
+ end;
+
+{$ENDIF} {types }
+
+{$IFDEF read_interface_rest}
+
+
+{ GError enumeration for GtkFileSystem }
+
+function GTK_FILE_SYSTEM_ERROR : TGQuark;
+
+
+
+function gtk_file_system_error_quark:TGQuark;cdecl;external gtklib name 'gtk_file_system_error_quark';
+
+
+
+{ Boxed-type for gtk_file_folder_get_info() results }
+
+function GTK_TYPE_FILE_INFO : GType;
+
+function gtk_file_info_get_type:GType;cdecl;external gtklib name 'gtk_file_info_get_type';
+function gtk_file_info_new:PGtkFileInfo;cdecl;external gtklib name 'gtk_file_info_new';
+function gtk_file_info_copy(info:PGtkFileInfo):PGtkFileInfo;cdecl;external gtklib name 'gtk_file_info_copy';
+procedure gtk_file_info_free(info:PGtkFileInfo);cdecl;external gtklib name 'gtk_file_info_free';
+
+function gtk_file_info_get_display_name(info:PGtkFileInfo):Pgchar;cdecl;external gtklib name 'gtk_file_info_get_display_name';
+function gtk_file_info_get_display_key(info:PGtkFileInfo):Pgchar;cdecl;external gtklib name 'gtk_file_info_get_display_key';
+
+procedure gtk_file_info_set_display_name(info:PGtkFileInfo; display_name:Pgchar);cdecl;external gtklib name 'gtk_file_info_set_display_name';
+
+function gtk_file_info_get_is_folder(info:PGtkFileInfo):gboolean;cdecl;external gtklib name 'gtk_file_info_get_is_folder';
+procedure gtk_file_info_set_is_folder(info:PGtkFileInfo; is_folder:gboolean);cdecl;external gtklib name 'gtk_file_info_set_is_folder';
+
+function gtk_file_info_get_is_hidden(info:PGtkFileInfo):gboolean;cdecl;external gtklib name 'gtk_file_info_get_is_hidden';
+procedure gtk_file_info_set_is_hidden(info:PGtkFileInfo; is_hidden:gboolean);cdecl;external gtklib name 'gtk_file_info_set_is_hidden';
+
+function gtk_file_info_get_mime_type(info:PGtkFileInfo):Pgchar;cdecl;external gtklib name 'gtk_file_info_get_mime_type';
+procedure gtk_file_info_set_mime_type(info:PGtkFileInfo; mime_type:Pgchar);cdecl;external gtklib name 'gtk_file_info_set_mime_type';
+
+function gtk_file_info_get_modification_time(info:PGtkFileInfo):TGtkFileTime;cdecl;external gtklib name 'gtk_file_info_get_modification_time';
+procedure gtk_file_info_set_modification_time(info:PGtkFileInfo; modification_time:TGtkFileTime);cdecl;external gtklib name 'gtk_file_info_set_modification_time';
+
+function gtk_file_info_get_size(info:PGtkFileInfo):gint64;cdecl;external gtklib name 'gtk_file_info_get_size';
+procedure gtk_file_info_set_size(info:PGtkFileInfo; size:gint64);cdecl;external gtklib name 'gtk_file_info_set_size';
+
+{ The base GtkFileSystem interface }
+
+function GTK_TYPE_FILE_SYSTEM : GType;
+
+function GTK_FILE_SYSTEM(obj : pointer) : PGtkFileSystem;
+
+function GTK_IS_FILE_SYSTEM(obj : pointer) : gboolean;
+
+function GTK_FILE_SYSTEM_GET_IFACE(inst : pointer) : PGtkFileSystemIface;
+
+
+
+
+function gtk_file_system_get_type:GType;cdecl;external gtklib name 'gtk_file_system_get_type';
+
+function gtk_file_system_list_volumes(file_system:PGtkFileSystem):PGSList;cdecl;external gtklib name 'gtk_file_system_list_volumes';
+function gtk_file_system_get_volume_for_path(file_system:PGtkFileSystem; path:PGtkFilePath):PGtkFileSystemVolume;cdecl;external gtklib name 'gtk_file_system_get_volume_for_path';
+
+procedure gtk_file_system_volume_free(file_system:PGtkFileSystem; volume:PGtkFileSystemVolume);cdecl;external gtklib name 'gtk_file_system_volume_free';
+
+function gtk_file_system_volume_get_base_path(file_system:PGtkFileSystem; volume:PGtkFileSystemVolume):PGtkFilePath;cdecl;external gtklib name 'gtk_file_system_volume_get_base_path';
+
+function gtk_file_system_volume_get_is_mounted(file_system:PGtkFileSystem; volume:PGtkFileSystemVolume):gboolean;cdecl;external gtklib name 'gtk_file_system_volume_get_is_mounted';
+function gtk_file_system_volume_mount(file_system:PGtkFileSystem; volume:PGtkFileSystemVolume; error:PPGError):gboolean;cdecl;external gtklib name 'gtk_file_system_volume_mount';
+
+function gtk_file_system_volume_get_display_name(file_system:PGtkFileSystem; volume:PGtkFileSystemVolume):Pchar;cdecl;external gtklib name 'gtk_file_system_volume_get_display_name';
+
+function gtk_file_system_volume_render_icon(file_system:PGtkFileSystem; volume:PGtkFileSystemVolume; widget:PGtkWidget; pixel_size:gint; error:PPGError):PGdkPixbuf;cdecl;external gtklib name 'gtk_file_system_volume_render_icon';
+
+function gtk_file_system_get_parent(file_system:PGtkFileSystem; path:PGtkFilePath; parent:PPGtkFilePath; error:PPGError):gboolean;cdecl;external gtklib name 'gtk_file_system_get_parent';
+function gtk_file_system_get_folder(file_system:PGtkFileSystem; path:PGtkFilePath; types:TGtkFileInfoType; error:PPGError):PGtkFileFolder;cdecl;external gtklib name 'gtk_file_system_get_folder';
+
+function gtk_file_system_create_folder(file_system:PGtkFileSystem; path:PGtkFilePath; error:PPGError):gboolean;cdecl;external gtklib name 'gtk_file_system_create_folder';
+
+function gtk_file_system_make_path(file_system:PGtkFileSystem; base_path:PGtkFilePath; display_name:Pgchar; error:PPGError):PGtkFilePath;cdecl;external gtklib name 'gtk_file_system_make_path';
+function gtk_file_system_parse(file_system:PGtkFileSystem; base_path:PGtkFilePath; str:Pgchar; folder:PPGtkFilePath; file_part:PPgchar;
+ error:PPGError):gboolean;cdecl;external gtklib name 'gtk_file_system_parse';
+
+function gtk_file_system_path_to_uri(file_system:PGtkFileSystem; path:PGtkFilePath):Pgchar;cdecl;external gtklib name 'gtk_file_system_path_to_uri';
+function gtk_file_system_path_to_filename(file_system:PGtkFileSystem; path:PGtkFilePath):Pgchar;cdecl;external gtklib name 'gtk_file_system_path_to_filename';
+
+function gtk_file_system_uri_to_path(file_system:PGtkFileSystem; uri:Pgchar):PGtkFilePath;cdecl;external gtklib name 'gtk_file_system_uri_to_path';
+function gtk_file_system_filename_to_path(file_system:PGtkFileSystem; filename:Pgchar):PGtkFilePath;cdecl;external gtklib name 'gtk_file_system_filename_to_path';
+
+function gtk_file_system_render_icon(file_system:PGtkFileSystem; path:PGtkFilePath; widget:PGtkWidget; pixel_size:gint; error:PPGError):PGdkPixbuf;cdecl;external gtklib name 'gtk_file_system_render_icon';
+
+function gtk_file_system_insert_bookmark(file_system:PGtkFileSystem; path:PGtkFilePath; position:gint; error:PPGError):gboolean;cdecl;external gtklib name 'gtk_file_system_insert_bookmark';
+
+function gtk_file_system_remove_bookmark(file_system:PGtkFileSystem; path:PGtkFilePath; error:PPGError):gboolean;cdecl;external gtklib name 'gtk_file_system_remove_bookmark';
+function gtk_file_system_list_bookmarks(file_system:PGtkFileSystem):PGSList;cdecl;external gtklib name 'gtk_file_system_list_bookmarks';
+
+{ Detailed information about a particular folder }
+
+function GTK_TYPE_FILE_FOLDER : GType;
+
+
+function GTK_FILE_FOLDER(obj : pointer) : PGtkFileFolder;
+
+function GTK_IS_FILE_FOLDER(obj : pointer) : gboolean;
+
+
+function GTK_FILE_FOLDER_GET_IFACE(inst : pointer) : PGtkFileSystemIface;
+
+
+
+function gtk_file_folder_get_type:GType;cdecl;external gtklib name 'gtk_file_folder_get_type';
+function gtk_file_folder_list_children(folder:PGtkFileFolder; children:PPGSList; error:PPGError):gboolean;cdecl;external gtklib name 'gtk_file_folder_list_children';
+
+function gtk_file_folder_get_info(folder:PGtkFileFolder; path:PGtkFilePath; error:PPGError):PGtkFileInfo;cdecl;external gtklib name 'gtk_file_folder_get_info';
+function gtk_file_path_new_dup(str : Pgchar) : PGtkFilePath;
+function gtk_file_path_new_steal(str : Pgchar) : PGtkFilePath;
+
+function gtk_file_path_get_string(str : PGtkFilePath) : Pgchar;
+
+procedure gtk_file_path_free(path : PGtkFilePath);
+
+function gtk_file_path_copy(path : PGtkFilePath) : PGtkFilePath;
+
+
+function gtk_file_path_compare(path1,path2 : PGtkFilePath) : longint;
+
+function gtk_file_paths_sort(paths:PGSList):PGSList;cdecl;external gtklib name 'gtk_file_paths_sort';
+function gtk_file_paths_copy(paths:PGSList):PGSList;cdecl;external gtklib name 'gtk_file_paths_copy';
+procedure gtk_file_paths_free(paths:PGSList);cdecl;external gtklib name 'gtk_file_paths_free';
+
+
+{ GtkFileSystem modules support }
+
+function _gtk_file_system_create(file_system_name:Pchar):PGtkFileSystem;cdecl;external gtklib name '_gtk_file_system_create';
+{$endif} {read_interface_rest}
+
+
+{$ifdef read_implementation}
+
+function GTK_FILE_SYSTEM_ERROR : TGQuark;
+ begin
+ GTK_FILE_SYSTEM_ERROR:=gtk_file_system_error_quark;
+ end;
+
+
+function GTK_TYPE_FILE_INFO : GType;
+
+ begin
+ GTK_TYPE_FILE_INFO:=gtk_file_info_get_type;
+ end;
+
+
+function GTK_TYPE_FILE_SYSTEM : GType;
+ begin
+ GTK_TYPE_FILE_SYSTEM:=gtk_file_system_get_type;
+ end;
+
+function GTK_FILE_SYSTEM(obj : pointer) : PGtkFileSystem;
+begin
+ GTK_FILE_SYSTEM:=G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_FILE_SYSTEM);
+end;
+
+function GTK_IS_FILE_SYSTEM(obj : pointer) : gboolean;
+begin
+ GTK_IS_FILE_SYSTEM:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_FILE_SYSTEM);
+end;
+
+function GTK_FILE_SYSTEM_GET_IFACE(inst : pointer) : PGtkFileSystemIface;
+begin
+ GTK_FILE_SYSTEM_GET_IFACE:=G_TYPE_INSTANCE_GET_INTERFACE(inst,GTK_TYPE_FILE_SYSTEM);
+end;
+
+
+function GTK_TYPE_FILE_FOLDER : GType;
+ begin
+ GTK_TYPE_FILE_FOLDER:=gtk_file_folder_get_type;
+ end;
+
+
+function GTK_FILE_FOLDER(obj : pointer) : PGtkFileFolder;
+begin
+ GTK_FILE_FOLDER:=G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_FILE_FOLDER);
+end;
+
+
+function GTK_IS_FILE_FOLDER(obj : pointer) : gboolean;
+begin
+ GTK_IS_FILE_FOLDER:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_FILE_FOLDER);
+end;
+
+
+
+function GTK_FILE_FOLDER_GET_IFACE(inst : pointer) : PGtkFileSystemIface;
+begin
+ GTK_FILE_FOLDER_GET_IFACE:=G_TYPE_INSTANCE_GET_INTERFACE(inst,GTK_TYPE_FILE_FOLDER);
+end;
+
+function gtk_file_path_new_dup(str : Pgchar) : PGtkFilePath;
+begin
+ gtk_file_path_new_dup:=PGtkFilePath(g_strdup(str));
+end;
+
+function gtk_file_path_new_steal(str : Pgchar) : PGtkFilePath;
+begin
+ gtk_file_path_new_steal:=PGtkFilePath(str);
+end;
+
+function gtk_file_path_get_string(str : PGtkFilePath) : Pgchar;
+begin
+ gtk_file_path_get_string:=Pgchar(str);
+end;
+
+procedure gtk_file_path_free(path : PGtkFilePath);
+begin
+ g_free( Pgchar(path));
+end;
+
+function gtk_file_path_copy(path : PGtkFilePath) : PGtkFilePath;
+begin
+ gtk_file_path_copy:=gtk_file_path_new_dup(gtk_file_path_get_string(path));
+end;
+
+function gtk_file_path_compare(path1,path2 : PGtkFilePath) : longint;
+begin
+ gtk_file_path_compare:=StrComp(gtk_file_path_get_string(path1),gtk_file_path_get_string(path2));
+end;
+
+
+{$endif} {read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfixed.inc b/packages/gtk2/src/gtk+/gtk/gtkfixed.inc
new file mode 100644
index 0000000000..2c7ee6231c
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfixed.inc
@@ -0,0 +1,83 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkFixed = ^TGtkFixed;
+ TGtkFixed = record
+ container : TGtkContainer;
+ children : PGList;
+ end;
+
+ PGtkFixedClass = ^TGtkFixedClass;
+ TGtkFixedClass = record
+ parent_class : TGtkContainerClass;
+ end;
+
+ PGtkFixedChild = ^TGtkFixedChild;
+ TGtkFixedChild = record
+ widget : PGtkWidget;
+ x : gint;
+ y : gint;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_FIXED : GType;
+function GTK_FIXED(obj: pointer) : PGtkFixed;
+function GTK_FIXED_CLASS(klass: pointer) : PGtkFixedClass;
+function GTK_IS_FIXED(obj: pointer) : boolean;
+function GTK_IS_FIXED_CLASS(klass: pointer) : boolean;
+function GTK_FIXED_GET_CLASS(obj: pointer) : PGtkFixedClass;
+
+
+function gtk_fixed_get_type:TGtkType; cdecl; external gtklib;
+function gtk_fixed_new:PGtkWidget; cdecl; external gtklib;
+procedure gtk_fixed_put(fixed:PGtkFixed; widget:PGtkWidget; x:gint; y:gint); cdecl; external gtklib;
+procedure gtk_fixed_move(fixed:PGtkFixed; widget:PGtkWidget; x:gint; y:gint); cdecl; external gtklib;
+procedure gtk_fixed_set_has_window(fixed:PGtkFixed; has_window:gboolean); cdecl; external gtklib;
+function gtk_fixed_get_has_window(fixed:PGtkFixed):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_FIXED : GType;
+begin
+ GTK_TYPE_FIXED:=gtk_fixed_get_type;
+end;
+
+function GTK_FIXED(obj: pointer) : PGtkFixed;
+begin
+ GTK_FIXED:=PGtkFixed(GTK_CHECK_CAST(obj,GTK_TYPE_FIXED));
+end;
+
+function GTK_FIXED_CLASS(klass: pointer) : PGtkFixedClass;
+begin
+ GTK_FIXED_CLASS:=PGtkFixedClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_FIXED));
+end;
+
+function GTK_IS_FIXED(obj: pointer) : boolean;
+begin
+ GTK_IS_FIXED:=GTK_CHECK_TYPE(obj,GTK_TYPE_FIXED);
+end;
+
+function GTK_IS_FIXED_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_FIXED_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_FIXED);
+end;
+
+function GTK_FIXED_GET_CLASS(obj: pointer) : PGtkFixedClass;
+begin
+ GTK_FIXED_GET_CLASS:=PGtkFixedClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_FIXED));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfontbutton.inc b/packages/gtk2/src/gtk+/gtk/gtkfontbutton.inc
new file mode 100644
index 0000000000..8448f896c6
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfontbutton.inc
@@ -0,0 +1,98 @@
+
+{ GtkFontButton is a button widget that allow user to select a font. }
+
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkFontButtonPrivate = pointer;
+
+ PGtkFontButton = ^TGtkFontButton;
+ TGtkFontButton = record
+ button : TGtkButton;
+ priv : PGtkFontButtonPrivate;
+ end;
+
+{ font_set signal is emitted when font is chosen }
+{ Padding for future expansion }
+ PGtkFontButtonClass = ^TGtkFontButtonClass;
+ TGtkFontButtonClass = record
+ parent_class : TGtkButtonClass;
+ font_set : procedure (gfp:PGtkFontButton);cdecl;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ _gtk_reserved4 : procedure ;
+ end;
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_FONT_BUTTON : GType;
+function GTK_FONT_BUTTON(obj : pointer) : PGtkFontButton;
+function GTK_FONT_BUTTON_CLASS(klass : pointer) : PGtkFontButtonClass;
+function GTK_IS_FONT_BUTTON(obj : pointer) : gboolean;
+function GTK_IS_FONT_BUTTON_CLASS(klass : pointer) : gboolean;
+function GTK_FONT_BUTTON_GET_CLASS(obj : pointer) : PGtkFontButtonClass;
+
+function gtk_font_button_get_type:GType;cdecl;external gtklib name 'gtk_font_button_get_type';
+
+function gtk_font_button_new:PGtkWidget;cdecl;external gtklib name 'gtk_font_button_new';
+function gtk_font_button_new_with_font(fontname:Pgchar):PGtkWidget;cdecl;external gtklib name 'gtk_font_button_new_with_font';
+
+function gtk_font_button_get_title(font_button:PGtkFontButton):Pgchar;cdecl;external gtklib name 'gtk_font_button_get_title';
+procedure gtk_font_button_set_title(font_button:PGtkFontButton; title:Pgchar);cdecl;external gtklib name 'gtk_font_button_set_title';
+
+function gtk_font_button_get_use_font(font_button:PGtkFontButton):gboolean;cdecl;external gtklib name 'gtk_font_button_get_use_font';
+procedure gtk_font_button_set_use_font(font_button:PGtkFontButton; use_font:gboolean);cdecl;external gtklib name 'gtk_font_button_set_use_font';
+
+function gtk_font_button_get_use_size(font_button:PGtkFontButton):gboolean;cdecl;external gtklib name 'gtk_font_button_get_use_size';
+procedure gtk_font_button_set_use_size(font_button:PGtkFontButton; use_size:gboolean);cdecl;external gtklib name 'gtk_font_button_set_use_size';
+
+function gtk_font_button_get_font_name(font_button:PGtkFontButton):Pgchar;cdecl;external gtklib name 'gtk_font_button_get_font_name';
+function gtk_font_button_set_font_name(font_button:PGtkFontButton; fontname:Pgchar):gboolean;cdecl;external gtklib name 'gtk_font_button_set_font_name';
+
+function gtk_font_button_get_show_style(font_button:PGtkFontButton):gboolean;cdecl;external gtklib name 'gtk_font_button_get_show_style';
+procedure gtk_font_button_set_show_style(font_button:PGtkFontButton; show_style:gboolean);cdecl;external gtklib name 'gtk_font_button_set_show_style';
+
+function gtk_font_button_get_show_size(font_button:PGtkFontButton):gboolean;cdecl;external gtklib name 'gtk_font_button_get_show_size';
+procedure gtk_font_button_set_show_size(font_button:PGtkFontButton; show_size:gboolean);cdecl;external gtklib name 'gtk_font_button_set_show_size';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+function GTK_TYPE_FONT_BUTTON : GType;
+begin
+ GTK_TYPE_FONT_BUTTON:=gtk_font_button_get_type;
+end;
+
+function GTK_FONT_BUTTON(obj : pointer) : PGtkFontButton;
+begin
+ GTK_FONT_BUTTON:=PGtkFontButton(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_FONT_BUTTON));
+end;
+
+function GTK_FONT_BUTTON_CLASS(klass : pointer) : PGtkFontButtonClass;
+begin
+ GTK_FONT_BUTTON_CLASS:=PGtkFontButtonClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_FONT_BUTTON));
+end;
+
+function GTK_IS_FONT_BUTTON(obj : pointer) : gboolean;
+begin
+ GTK_IS_FONT_BUTTON:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_FONT_BUTTON);
+end;
+
+function GTK_IS_FONT_BUTTON_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_FONT_BUTTON_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_FONT_BUTTON);
+end;
+
+function GTK_FONT_BUTTON_GET_CLASS(obj : pointer) : PGtkFontButtonClass;
+begin
+ GTK_FONT_BUTTON_GET_CLASS:=PGtkFontButtonClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_FONT_BUTTON));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkfontsel.inc b/packages/gtk2/src/gtk+/gtk/gtkfontsel.inc
new file mode 100644
index 0000000000..af045f2574
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkfontsel.inc
@@ -0,0 +1,206 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ Current family }
+{ Current face }
+{ Cache for gdk_font_selection_get_font, so we can preserve
+ refcounting behavior
+ }
+ PGtkFontSelection = ^TGtkFontSelection;
+ TGtkFontSelection = record
+ parent_instance : TGtkVBox;
+ font_entry : PGtkWidget;
+ family_list : PGtkWidget;
+ font_style_entry : PGtkWidget;
+ face_list : PGtkWidget;
+ size_entry : PGtkWidget;
+ size_list : PGtkWidget;
+ pixels_button : PGtkWidget;
+ points_button : PGtkWidget;
+ filter_button : PGtkWidget;
+ preview_entry : PGtkWidget;
+ family : PPangoFontFamily;
+ face : PPangoFontFace;
+ size : gint;
+ font : PGdkFont;
+ end;
+
+{ Padding for future expansion }
+ PGtkFontSelectionClass = ^TGtkFontSelectionClass;
+ TGtkFontSelectionClass = record
+ parent_class : TGtkVBoxClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{ The 'Apply' button is not shown by default but you can show/hide it. }
+{ If the user changes the width of the dialog, we turn auto-shrink off. }
+ PGtkFontSelectionDialog = ^TGtkFontSelectionDialog;
+ TGtkFontSelectionDialog = record
+ parent_instance : TGtkDialog;
+ fontsel : PGtkWidget;
+ main_vbox : PGtkWidget;
+ action_area : PGtkWidget;
+ ok_button : PGtkWidget;
+ apply_button : PGtkWidget;
+ cancel_button : PGtkWidget;
+ dialog_width : gint;
+ auto_resize : gboolean;
+ end;
+
+{ Padding for future expansion }
+ PGtkFontSelectionDialogClass = ^TGtkFontSelectionDialogClass;
+ TGtkFontSelectionDialogClass = record
+ parent_class : TGtkDialogClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_FONT_SELECTION : GType;
+function GTK_FONT_SELECTION(obj: pointer) : PGtkFontSelection;
+function GTK_FONT_SELECTION_CLASS(klass: pointer) : PGtkFontSelectionClass;
+function GTK_IS_FONT_SELECTION(obj: pointer) : boolean;
+function GTK_IS_FONT_SELECTION_CLASS(klass: pointer) : boolean;
+function GTK_FONT_SELECTION_GET_CLASS(obj: pointer) : PGtkFontSelectionClass;
+
+function GTK_TYPE_FONT_SELECTION_DIALOG : GType;
+function GTK_FONT_SELECTION_DIALOG(obj: pointer) : PGtkFontSelectionDialog;
+function GTK_FONT_SELECTION_DIALOG_CLASS(klass: pointer) : PGtkFontSelectionDialogClass;
+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_CLASS(obj: pointer) : PGtkFontSelectionDialogClass;
+
+
+{
+ GtkFontSelection functions.
+ see the comments in the GtkFontSelectionDialog functions.
+ }
+
+function gtk_font_selection_get_type:TGtkType; cdecl; external gtklib;
+function gtk_font_selection_new:PGtkWidget; cdecl; external gtklib;
+function gtk_font_selection_get_font_name(fontsel:PGtkFontSelection):Pgchar; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_font_selection_get_font(fontsel:PGtkFontSelection):PGdkFont; cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+function gtk_font_selection_set_font_name(fontsel:PGtkFontSelection; fontname:Pgchar):gboolean; cdecl; external gtklib;
+function gtk_font_selection_get_preview_text(fontsel:PGtkFontSelection):Pgchar; cdecl; external gtklib;
+procedure gtk_font_selection_set_preview_text(fontsel:PGtkFontSelection; text:Pgchar); cdecl; external gtklib;
+{
+ GtkFontSelectionDialog functions.
+ most of these functions simply call the corresponding function in the
+ GtkFontSelection.
+ }
+function gtk_font_selection_dialog_get_type:TGtkType; cdecl; external gtklib;
+function gtk_font_selection_dialog_new(title:Pgchar):PGtkWidget; cdecl; external gtklib;
+{ This returns the X Logical Font Description fontname, or NULL if no font
+ is selected. Note that there is a slight possibility that the font might not
+ have been loaded OK. You should call gtk_font_selection_dialog_get_font()
+ to see if it has been loaded OK.
+ You should g_free() the returned font name after you're done with it. }
+function gtk_font_selection_dialog_get_font_name(fsd:PGtkFontSelectionDialog):Pgchar; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+{ This will return the current GdkFont, or NULL if none is selected or there
+ was a problem loading it. Remember to use gdk_font_ref/unref() if you want
+ to use the font (in a style, for example). }
+
+function gtk_font_selection_dialog_get_font(fsd:PGtkFontSelectionDialog):PGdkFont; cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+
+{ This sets the currently displayed font. It should be a valid X Logical
+ Font Description font name (anything else will be ignored), e.g.
+ "-adobe-courier-bold-o-normal--25- - - - - - - "
+ It returns TRUE on success. }
+function gtk_font_selection_dialog_set_font_name(fsd:PGtkFontSelectionDialog; fontname:Pgchar):gboolean; cdecl; external gtklib;
+{ This returns the text in the preview entry. You should copy the returned
+ text if you need it. }
+function gtk_font_selection_dialog_get_preview_text(fsd:PGtkFontSelectionDialog):Pgchar; cdecl; external gtklib;
+{ This sets the text in the preview entry. It will be copied by the entry,
+ so there's no need to g_strdup() it first. }
+procedure gtk_font_selection_dialog_set_preview_text(fsd:PGtkFontSelectionDialog; text:Pgchar); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_FONT_SELECTION : GType;
+begin
+ GTK_TYPE_FONT_SELECTION:=gtk_font_selection_get_type;
+end;
+
+function GTK_FONT_SELECTION(obj: pointer) : PGtkFontSelection;
+begin
+ GTK_FONT_SELECTION:=PGtkFontSelection(GTK_CHECK_CAST(obj,GTK_TYPE_FONT_SELECTION));
+end;
+
+function GTK_FONT_SELECTION_CLASS(klass: pointer) : PGtkFontSelectionClass;
+begin
+ GTK_FONT_SELECTION_CLASS:=PGtkFontSelectionClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_FONT_SELECTION));
+end;
+
+function GTK_IS_FONT_SELECTION(obj: pointer) : boolean;
+begin
+ GTK_IS_FONT_SELECTION:=GTK_CHECK_TYPE(obj,GTK_TYPE_FONT_SELECTION);
+end;
+
+function GTK_IS_FONT_SELECTION_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_FONT_SELECTION_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_FONT_SELECTION);
+end;
+
+function GTK_FONT_SELECTION_GET_CLASS(obj: pointer) : PGtkFontSelectionClass;
+begin
+ GTK_FONT_SELECTION_GET_CLASS:=PGtkFontSelectionClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_FONT_SELECTION));
+end;
+
+function GTK_TYPE_FONT_SELECTION_DIALOG : GType;
+begin
+ GTK_TYPE_FONT_SELECTION_DIALOG:=gtk_font_selection_dialog_get_type;
+end;
+
+function GTK_FONT_SELECTION_DIALOG(obj: pointer) : PGtkFontSelectionDialog;
+begin
+ GTK_FONT_SELECTION_DIALOG:=PGtkFontSelectionDialog(GTK_CHECK_CAST(obj,GTK_TYPE_FONT_SELECTION_DIALOG));
+end;
+
+function GTK_FONT_SELECTION_DIALOG_CLASS(klass: pointer) : PGtkFontSelectionDialogClass;
+begin
+ GTK_FONT_SELECTION_DIALOG_CLASS:=PGtkFontSelectionDialogClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_FONT_SELECTION_DIALOG));
+end;
+
+function GTK_IS_FONT_SELECTION_DIALOG(obj: pointer) : boolean;
+begin
+ GTK_IS_FONT_SELECTION_DIALOG:=GTK_CHECK_TYPE(obj,GTK_TYPE_FONT_SELECTION_DIALOG);
+end;
+
+function GTK_IS_FONT_SELECTION_DIALOG_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_FONT_SELECTION_DIALOG_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_FONT_SELECTION_DIALOG);
+end;
+
+function GTK_FONT_SELECTION_DIALOG_GET_CLASS(obj: pointer) : PGtkFontSelectionDialogClass;
+begin
+ GTK_FONT_SELECTION_DIALOG_GET_CLASS:=PGtkFontSelectionDialogClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_FONT_SELECTION_DIALOG));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkframe.inc b/packages/gtk2/src/gtk+/gtk/gtkframe.inc
new file mode 100644
index 0000000000..d551d402ac
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkframe.inc
@@ -0,0 +1,85 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkFrame = ^TGtkFrame;
+ TGtkFrame = record
+ bin : TGtkBin;
+ label_widget : PGtkWidget;
+ shadow_type : gint16;
+ label_xalign : gfloat;
+ label_yalign : gfloat;
+ child_allocation : TGtkAllocation;
+ end;
+
+ PGtkFrameClass = ^TGtkFrameClass;
+ TGtkFrameClass = record
+ parent_class : TGtkBinClass;
+ compute_child_allocation : procedure (frame:PGtkFrame; allocation:PGtkAllocation); cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_FRAME : GType;
+function GTK_FRAME(obj: pointer) : PGtkFrame;
+function GTK_FRAME_CLASS(klass: pointer) : PGtkFrameClass;
+function GTK_IS_FRAME(obj: pointer) : boolean;
+function GTK_IS_FRAME_CLASS(klass: pointer) : boolean;
+function GTK_FRAME_GET_CLASS(obj: pointer) : PGtkFrameClass;
+
+
+
+function gtk_frame_get_type:TGtkType; cdecl; external gtklib;
+function gtk_frame_new(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+procedure gtk_frame_set_label(frame:PGtkFrame; _label:Pgchar); cdecl; external gtklib;
+function gtk_frame_get_label(frame:PGtkFrame):Pgchar; cdecl; external gtklib;
+procedure gtk_frame_set_label_widget(frame:PGtkFrame; label_widget:PGtkWidget); cdecl; external gtklib;
+function gtk_frame_get_label_widget(frame:PGtkFrame):PGtkWidget; cdecl; external gtklib;
+procedure gtk_frame_set_label_align(frame:PGtkFrame; xalign:gfloat; yalign:gfloat); cdecl; external gtklib;
+procedure gtk_frame_get_label_align(frame:PGtkFrame; xalign:Pgfloat; yalign:Pgfloat); cdecl; external gtklib;
+procedure gtk_frame_set_shadow_type(frame:PGtkFrame; _type:TGtkShadowType); cdecl; external gtklib;
+function gtk_frame_get_shadow_type(frame:PGtkFrame):TGtkShadowType; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_FRAME : GType;
+begin
+ GTK_TYPE_FRAME:=gtk_frame_get_type;
+end;
+
+function GTK_FRAME(obj: pointer) : PGtkFrame;
+begin
+ GTK_FRAME:=PGtkFrame(GTK_CHECK_CAST(obj,GTK_TYPE_FRAME));
+end;
+
+function GTK_FRAME_CLASS(klass: pointer) : PGtkFrameClass;
+begin
+ GTK_FRAME_CLASS:=PGtkFrameClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_FRAME));
+end;
+
+function GTK_IS_FRAME(obj: pointer) : boolean;
+begin
+ GTK_IS_FRAME:=GTK_CHECK_TYPE(obj,GTK_TYPE_FRAME);
+end;
+
+function GTK_IS_FRAME_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_FRAME_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_FRAME);
+end;
+
+function GTK_FRAME_GET_CLASS(obj: pointer) : PGtkFrameClass;
+begin
+ GTK_FRAME_GET_CLASS:=PGtkFrameClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_FRAME));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkgamma.inc b/packages/gtk2/src/gtk+/gtk/gtkgamma.inc
new file mode 100644
index 0000000000..6f7b5639fe
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkgamma.inc
@@ -0,0 +1,93 @@
+// included by gtk2.pas
+
+{
+ NOTE this widget is considered too specialized/little-used for
+ GTK+, and will in the future be moved to some other package. If
+ your application needs this widget, feel free to use it, as the
+ widget does work and is useful in some applications; it's just not
+ of general interest. However, we are not accepting new features for
+ the widget, and it will eventually move out of the GTK+
+ distribution.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ spline, linear, free, gamma, reset }
+ 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;
+
+{ Padding for future expansion }
+ PGtkGammaCurveClass = ^TGtkGammaCurveClass;
+ TGtkGammaCurveClass = record
+ parent_class : TGtkVBoxClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_GAMMA_CURVE : GType;
+function GTK_GAMMA_CURVE(obj: pointer) : PGtkGammaCurve;
+function GTK_GAMMA_CURVE_CLASS(klass: pointer) : PGtkGammaCurveClass;
+function GTK_IS_GAMMA_CURVE(obj: pointer) : boolean;
+function GTK_IS_GAMMA_CURVE_CLASS(klass: pointer) : boolean;
+function GTK_GAMMA_CURVE_GET_CLASS(obj: pointer) : PGtkGammaCurveClass;
+
+
+function gtk_gamma_curve_get_type:TGtkType; cdecl; external gtklib;
+function gtk_gamma_curve_new:PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_GAMMA_CURVE : GType;
+begin
+ GTK_TYPE_GAMMA_CURVE:=gtk_gamma_curve_get_type;
+end;
+
+function GTK_GAMMA_CURVE(obj: pointer) : PGtkGammaCurve;
+begin
+ GTK_GAMMA_CURVE:=PGtkGammaCurve(GTK_CHECK_CAST(obj,GTK_TYPE_GAMMA_CURVE));
+end;
+
+function GTK_GAMMA_CURVE_CLASS(klass: pointer) : PGtkGammaCurveClass;
+begin
+ GTK_GAMMA_CURVE_CLASS:=PGtkGammaCurveClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_GAMMA_CURVE));
+end;
+
+function GTK_IS_GAMMA_CURVE(obj: pointer) : boolean;
+begin
+ GTK_IS_GAMMA_CURVE:=GTK_CHECK_TYPE(obj,GTK_TYPE_GAMMA_CURVE);
+end;
+
+function GTK_IS_GAMMA_CURVE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_GAMMA_CURVE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_GAMMA_CURVE);
+end;
+
+function GTK_GAMMA_CURVE_GET_CLASS(obj: pointer) : PGtkGammaCurveClass;
+begin
+ GTK_GAMMA_CURVE_GET_CLASS:=PGtkGammaCurveClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_GAMMA_CURVE));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkgc.inc b/packages/gtk2/src/gtk+/gtk/gtkgc.inc
new file mode 100644
index 0000000000..63aa844d7b
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkgc.inc
@@ -0,0 +1,17 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function gtk_gc_get(depth:gint; colormap:PGdkColormap; values:PGdkGCValues; values_mask:TGdkGCValuesMask):PGdkGC; cdecl; external gtklib;
+procedure gtk_gc_release(gc:PGdkGC); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkhandlebox.inc b/packages/gtk2/src/gtk+/gtk/gtkhandlebox.inc
new file mode 100644
index 0000000000..938c39d079
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkhandlebox.inc
@@ -0,0 +1,186 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ parent window for children }
+{ -1 == unset }
+{ Variables used during a drag
+ }
+{ Offset between root relative coordinates
+ and deskrelative coordinates }
+ 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;
+
+{ Padding for future expansion }
+ 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;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+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 GTK_TYPE_HANDLE_BOX : GType;
+function GTK_HANDLE_BOX(obj: pointer) : PGtkHandleBox;
+function GTK_HANDLE_BOX_CLASS(klass: pointer) : PGtkHandleBoxClass;
+function GTK_IS_HANDLE_BOX(obj: pointer) : boolean;
+function GTK_IS_HANDLE_BOX_CLASS(klass: pointer) : boolean;
+function GTK_HANDLE_BOX_GET_CLASS(obj: pointer) : PGtkHandleBoxClass;
+
+
+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; overload;
+procedure set_in_drag(var a : TGtkHandleBox; __in_drag : guint); overload;
+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);
+
+function gtk_handle_box_get_type:TGtkType; cdecl; external gtklib;
+function gtk_handle_box_new:PGtkWidget; cdecl; external gtklib;
+procedure gtk_handle_box_set_shadow_type(handle_box:PGtkHandleBox; _type:TGtkShadowType); cdecl; external gtklib;
+function gtk_handle_box_get_shadow_type(handle_box:PGtkHandleBox):TGtkShadowType; cdecl; external gtklib;
+procedure gtk_handle_box_set_handle_position(handle_box:PGtkHandleBox; position:TGtkPositionType); cdecl; external gtklib;
+function gtk_handle_box_get_handle_position(handle_box:PGtkHandleBox):TGtkPositionType; cdecl; external gtklib;
+procedure gtk_handle_box_set_snap_edge(handle_box:PGtkHandleBox; edge:TGtkPositionType); cdecl; external gtklib;
+function gtk_handle_box_get_snap_edge(handle_box:PGtkHandleBox):TGtkPositionType; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_HANDLE_BOX : GType;
+begin
+ GTK_TYPE_HANDLE_BOX:=gtk_handle_box_get_type;
+end;
+
+function GTK_HANDLE_BOX(obj: pointer) : PGtkHandleBox;
+begin
+ GTK_HANDLE_BOX:=PGtkHandleBox(GTK_CHECK_CAST(obj,GTK_TYPE_HANDLE_BOX));
+end;
+
+function GTK_HANDLE_BOX_CLASS(klass: pointer) : PGtkHandleBoxClass;
+begin
+ GTK_HANDLE_BOX_CLASS:=PGtkHandleBoxClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_HANDLE_BOX));
+end;
+
+function GTK_IS_HANDLE_BOX(obj: pointer) : boolean;
+begin
+ GTK_IS_HANDLE_BOX:=GTK_CHECK_TYPE(obj,GTK_TYPE_HANDLE_BOX);
+end;
+
+function GTK_IS_HANDLE_BOX_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_HANDLE_BOX_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_HANDLE_BOX);
+end;
+
+function GTK_HANDLE_BOX_GET_CLASS(obj: pointer) : PGtkHandleBoxClass;
+begin
+ GTK_HANDLE_BOX_GET_CLASS:=PGtkHandleBoxClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_HANDLE_BOX));
+end;
+
+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;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkhbbox.inc b/packages/gtk2/src/gtk+/gtk/gtkhbbox.inc
new file mode 100644
index 0000000000..8cc8db4809
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkhbbox.inc
@@ -0,0 +1,81 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkHButtonBox = ^TGtkHButtonBox;
+ TGtkHButtonBox = record
+ button_box : TGtkButtonBox;
+ end;
+
+ PGtkHButtonBoxClass = ^TGtkHButtonBoxClass;
+ TGtkHButtonBoxClass = record
+ parent_class : TGtkButtonBoxClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_HBUTTON_BOX : GType;
+function GTK_HBUTTON_BOX(obj: pointer) : PGtkHButtonBox;
+function GTK_HBUTTON_BOX_CLASS(klass: pointer) : PGtkHButtonBoxClass;
+function GTK_IS_HBUTTON_BOX(obj: pointer) : boolean;
+function GTK_IS_HBUTTON_BOX_CLASS(klass: pointer) : boolean;
+function GTK_HBUTTON_BOX_GET_CLASS(obj: pointer) : PGtkHButtonBoxClass;
+
+
+function gtk_hbutton_box_get_type:TGtkType; cdecl; external gtklib;
+function gtk_hbutton_box_new:PGtkWidget; cdecl; external gtklib;
+{ buttons can be added by gtk_container_add() }
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_hbutton_box_get_spacing_default:gint; cdecl; external gtklib;
+function gtk_hbutton_box_get_layout_default:TGtkButtonBoxStyle; cdecl; external gtklib;
+procedure gtk_hbutton_box_set_spacing_default(spacing:gint); cdecl; external gtklib;
+procedure gtk_hbutton_box_set_layout_default(layout:TGtkButtonBoxStyle); cdecl; external gtklib;
+{$endif}
+
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_HBUTTON_BOX : GType;
+begin
+ GTK_TYPE_HBUTTON_BOX:=gtk_hbutton_box_get_type;
+end;
+
+function GTK_HBUTTON_BOX(obj: pointer) : PGtkHButtonBox;
+begin
+ GTK_HBUTTON_BOX:=PGtkHButtonBox(GTK_CHECK_CAST(obj,GTK_TYPE_HBUTTON_BOX));
+end;
+
+function GTK_HBUTTON_BOX_CLASS(klass: pointer) : PGtkHButtonBoxClass;
+begin
+ GTK_HBUTTON_BOX_CLASS:=PGtkHButtonBoxClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_HBUTTON_BOX));
+end;
+
+function GTK_IS_HBUTTON_BOX(obj: pointer) : boolean;
+begin
+ GTK_IS_HBUTTON_BOX:=GTK_CHECK_TYPE(obj,GTK_TYPE_HBUTTON_BOX);
+end;
+
+function GTK_IS_HBUTTON_BOX_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_HBUTTON_BOX_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_HBUTTON_BOX);
+end;
+
+function GTK_HBUTTON_BOX_GET_CLASS(obj: pointer) : PGtkHButtonBoxClass;
+begin
+ GTK_HBUTTON_BOX_GET_CLASS:=PGtkHButtonBoxClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_HBUTTON_BOX));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkhbox.inc b/packages/gtk2/src/gtk+/gtk/gtkhbox.inc
new file mode 100644
index 0000000000..27cfcf04c4
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkhbox.inc
@@ -0,0 +1,71 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkHBox = ^TGtkHBox;
+ TGtkHBox = record
+ box : TGtkBox;
+ end;
+
+ PGtkHBoxClass = ^TGtkHBoxClass;
+ TGtkHBoxClass = record
+ parent_class : TGtkBoxClass;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_HBOX : GType;
+function GTK_HBOX(obj: pointer) : PGtkHBox;
+function GTK_HBOX_CLASS(klass: pointer) : PGtkHBoxClass;
+function GTK_IS_HBOX(obj: pointer) : boolean;
+function GTK_IS_HBOX_CLASS(klass: pointer) : boolean;
+function GTK_HBOX_GET_CLASS(obj: pointer) : PGtkHBoxClass;
+
+
+
+function gtk_hbox_get_type:TGtkType; cdecl; external gtklib;
+function gtk_hbox_new(homogeneous:gboolean; spacing:gint):PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_HBOX : GType;
+begin
+ GTK_TYPE_HBOX:=gtk_hbox_get_type;
+end;
+
+function GTK_HBOX(obj: pointer) : PGtkHBox;
+begin
+ GTK_HBOX:=PGtkHBox(GTK_CHECK_CAST(obj,GTK_TYPE_HBOX));
+end;
+
+function GTK_HBOX_CLASS(klass: pointer) : PGtkHBoxClass;
+begin
+ GTK_HBOX_CLASS:=PGtkHBoxClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_HBOX));
+end;
+
+function GTK_IS_HBOX(obj: pointer) : boolean;
+begin
+ GTK_IS_HBOX:=GTK_CHECK_TYPE(obj,GTK_TYPE_HBOX);
+end;
+
+function GTK_IS_HBOX_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_HBOX_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_HBOX);
+end;
+
+function GTK_HBOX_GET_CLASS(obj: pointer) : PGtkHBoxClass;
+begin
+ GTK_HBOX_GET_CLASS:=PGtkHBoxClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_HBOX));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkhpaned.inc b/packages/gtk2/src/gtk+/gtk/gtkhpaned.inc
new file mode 100644
index 0000000000..b8b5c855e7
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkhpaned.inc
@@ -0,0 +1,71 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkHPaned = ^TGtkHPaned;
+ TGtkHPaned = record
+ paned : TGtkPaned;
+ end;
+
+ PGtkHPanedClass = ^TGtkHPanedClass;
+ TGtkHPanedClass = record
+ parent_class : TGtkPanedClass;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_HPANED : GType;
+function GTK_HPANED(obj: pointer) : PGtkHPaned;
+function GTK_HPANED_CLASS(klass: pointer) : PGtkHPanedClass;
+function GTK_IS_HPANED(obj: pointer) : boolean;
+function GTK_IS_HPANED_CLASS(klass: pointer) : boolean;
+function GTK_HPANED_GET_CLASS(obj: pointer) : PGtkHPanedClass;
+
+
+
+function gtk_hpaned_get_type:TGtkType; cdecl; external gtklib;
+function gtk_hpaned_new:PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_HPANED : GType;
+begin
+ GTK_TYPE_HPANED:=gtk_hpaned_get_type;
+end;
+
+function GTK_HPANED(obj: pointer) : PGtkHPaned;
+begin
+ GTK_HPANED:=PGtkHPaned(GTK_CHECK_CAST(obj,GTK_TYPE_HPANED));
+end;
+
+function GTK_HPANED_CLASS(klass: pointer) : PGtkHPanedClass;
+begin
+ GTK_HPANED_CLASS:=PGtkHPanedClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_HPANED));
+end;
+
+function GTK_IS_HPANED(obj: pointer) : boolean;
+begin
+ GTK_IS_HPANED:=GTK_CHECK_TYPE(obj,GTK_TYPE_HPANED);
+end;
+
+function GTK_IS_HPANED_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_HPANED_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_HPANED);
+end;
+
+function GTK_HPANED_GET_CLASS(obj: pointer) : PGtkHPanedClass;
+begin
+ GTK_HPANED_GET_CLASS:=PGtkHPanedClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_HPANED));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkhruler.inc b/packages/gtk2/src/gtk+/gtk/gtkhruler.inc
new file mode 100644
index 0000000000..ff2f4d1e7c
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkhruler.inc
@@ -0,0 +1,81 @@
+// included by gtk2.pas
+
+{
+ NOTE this widget is considered too specialized/little-used for
+ GTK+, and will in the future be moved to some other package. If
+ your application needs this widget, feel free to use it, as the
+ widget does work and is useful in some applications; it's just not
+ of general interest. However, we are not accepting new features for
+ the widget, and it will eventually move out of the GTK+
+ distribution.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkHRuler = ^TGtkHRuler;
+ TGtkHRuler = record
+ ruler : TGtkRuler;
+ end;
+
+ PGtkHRulerClass = ^TGtkHRulerClass;
+ TGtkHRulerClass = record
+ parent_class : TGtkRulerClass;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_HRULER : GType;
+function GTK_HRULER(obj: pointer) : PGtkHRuler;
+function GTK_HRULER_CLASS(klass: pointer) : PGtkHRulerClass;
+function GTK_IS_HRULER(obj: pointer) : boolean;
+function GTK_IS_HRULER_CLASS(klass: pointer) : boolean;
+function GTK_HRULER_GET_CLASS(obj: pointer) : PGtkHRulerClass;
+
+
+
+function gtk_hruler_get_type:TGtkType; cdecl; external gtklib;
+function gtk_hruler_new:PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_HRULER : GType;
+begin
+ GTK_TYPE_HRULER:=gtk_hruler_get_type;
+end;
+
+function GTK_HRULER(obj: pointer) : PGtkHRuler;
+begin
+ GTK_HRULER:=PGtkHRuler(GTK_CHECK_CAST(obj,GTK_TYPE_HRULER));
+end;
+
+function GTK_HRULER_CLASS(klass: pointer) : PGtkHRulerClass;
+begin
+ GTK_HRULER_CLASS:=PGtkHRulerClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_HRULER));
+end;
+
+function GTK_IS_HRULER(obj: pointer) : boolean;
+begin
+ GTK_IS_HRULER:=GTK_CHECK_TYPE(obj,GTK_TYPE_HRULER);
+end;
+
+function GTK_IS_HRULER_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_HRULER_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_HRULER);
+end;
+
+function GTK_HRULER_GET_CLASS(obj: pointer) : PGtkHRulerClass;
+begin
+ GTK_HRULER_GET_CLASS:=PGtkHRulerClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_HRULER));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkhscale.inc b/packages/gtk2/src/gtk+/gtk/gtkhscale.inc
new file mode 100644
index 0000000000..79554a2d78
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkhscale.inc
@@ -0,0 +1,72 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkHScale = ^TGtkHScale;
+ TGtkHScale = record
+ scale : TGtkScale;
+ end;
+
+ PGtkHScaleClass = ^TGtkHScaleClass;
+ TGtkHScaleClass = record
+ parent_class : TGtkScaleClass;
+ end;
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_HSCALE : GType;
+function GTK_HSCALE(obj: pointer) : PGtkHScale;
+function GTK_HSCALE_CLASS(klass: pointer) : PGtkHScaleClass;
+function GTK_IS_HSCALE(obj: pointer) : boolean;
+function GTK_IS_HSCALE_CLASS(klass: pointer) : boolean;
+function GTK_HSCALE_GET_CLASS(obj: pointer) : PGtkHScaleClass;
+
+function gtk_hscale_get_type:TGtkType; cdecl; external gtklib;
+function gtk_hscale_new(adjustment:PGtkAdjustment):PGtkWidget; cdecl; external gtklib;
+function gtk_hscale_new_with_range(min:gdouble; max:gdouble; step:gdouble):PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_HSCALE : GType;
+begin
+ GTK_TYPE_HSCALE:=gtk_hscale_get_type;
+end;
+
+function GTK_HSCALE(obj: pointer) : PGtkHScale;
+begin
+ GTK_HSCALE:=PGtkHScale(GTK_CHECK_CAST(obj,GTK_TYPE_HSCALE));
+end;
+
+function GTK_HSCALE_CLASS(klass: pointer) : PGtkHScaleClass;
+begin
+ GTK_HSCALE_CLASS:=PGtkHScaleClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_HSCALE));
+end;
+
+function GTK_IS_HSCALE(obj: pointer) : boolean;
+begin
+ GTK_IS_HSCALE:=GTK_CHECK_TYPE(obj,GTK_TYPE_HSCALE);
+end;
+
+function GTK_IS_HSCALE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_HSCALE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_HSCALE);
+end;
+
+function GTK_HSCALE_GET_CLASS(obj: pointer) : PGtkHScaleClass;
+begin
+ GTK_HSCALE_GET_CLASS:=PGtkHScaleClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_HSCALE));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkhscrollbar.inc b/packages/gtk2/src/gtk+/gtk/gtkhscrollbar.inc
new file mode 100644
index 0000000000..21636423f8
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkhscrollbar.inc
@@ -0,0 +1,71 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkHScrollbar = ^TGtkHScrollbar;
+ TGtkHScrollbar = record
+ scrollbar : TGtkScrollbar;
+ end;
+
+ PGtkHScrollbarClass = ^TGtkHScrollbarClass;
+ TGtkHScrollbarClass = record
+ parent_class : TGtkScrollbarClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_HSCROLLBAR : GType;
+function GTK_HSCROLLBAR(obj: pointer) : PGtkHScrollbar;
+function GTK_HSCROLLBAR_CLASS(klass: pointer) : PGtkHScrollbarClass;
+function GTK_IS_HSCROLLBAR(obj: pointer) : boolean;
+function GTK_IS_HSCROLLBAR_CLASS(klass: pointer) : boolean;
+function GTK_HSCROLLBAR_GET_CLASS(obj: pointer) : PGtkHScrollbarClass;
+
+
+function gtk_hscrollbar_get_type:TGtkType; cdecl; external gtklib;
+function gtk_hscrollbar_new(adjustment:PGtkAdjustment):PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_HSCROLLBAR : GType;
+begin
+ GTK_TYPE_HSCROLLBAR:=gtk_hscrollbar_get_type;
+end;
+
+function GTK_HSCROLLBAR(obj: pointer) : PGtkHScrollbar;
+begin
+ GTK_HSCROLLBAR:=PGtkHScrollbar(GTK_CHECK_CAST(obj,GTK_TYPE_HSCROLLBAR));
+end;
+
+function GTK_HSCROLLBAR_CLASS(klass: pointer) : PGtkHScrollbarClass;
+begin
+ GTK_HSCROLLBAR_CLASS:=PGtkHScrollbarClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_HSCROLLBAR));
+end;
+
+function GTK_IS_HSCROLLBAR(obj: pointer) : boolean;
+begin
+ GTK_IS_HSCROLLBAR:=GTK_CHECK_TYPE(obj,GTK_TYPE_HSCROLLBAR);
+end;
+
+function GTK_IS_HSCROLLBAR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_HSCROLLBAR_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_HSCROLLBAR);
+end;
+
+function GTK_HSCROLLBAR_GET_CLASS(obj: pointer) : PGtkHScrollbarClass;
+begin
+ GTK_HSCROLLBAR_GET_CLASS:=PGtkHScrollbarClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_HSCROLLBAR));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkhseparator.inc b/packages/gtk2/src/gtk+/gtk/gtkhseparator.inc
new file mode 100644
index 0000000000..5539145a63
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkhseparator.inc
@@ -0,0 +1,71 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkHSeparator = ^TGtkHSeparator;
+ TGtkHSeparator = record
+ separator : TGtkSeparator;
+ end;
+
+ PGtkHSeparatorClass = ^TGtkHSeparatorClass;
+ TGtkHSeparatorClass = record
+ parent_class : TGtkSeparatorClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_HSEPARATOR : GType;
+function GTK_HSEPARATOR(obj: pointer) : PGtkHSeparator;
+function GTK_HSEPARATOR_CLASS(klass: pointer) : PGtkHSeparatorClass;
+function GTK_IS_HSEPARATOR(obj: pointer) : boolean;
+function GTK_IS_HSEPARATOR_CLASS(klass: pointer) : boolean;
+function GTK_HSEPARATOR_GET_CLASS(obj: pointer) : PGtkHSeparatorClass;
+
+
+function gtk_hseparator_get_type:TGtkType; cdecl; external gtklib;
+function gtk_hseparator_new:PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_HSEPARATOR : GType;
+begin
+ GTK_TYPE_HSEPARATOR:=gtk_hseparator_get_type;
+end;
+
+function GTK_HSEPARATOR(obj: pointer) : PGtkHSeparator;
+begin
+ GTK_HSEPARATOR:=PGtkHSeparator(GTK_CHECK_CAST(obj,GTK_TYPE_HSEPARATOR));
+end;
+
+function GTK_HSEPARATOR_CLASS(klass: pointer) : PGtkHSeparatorClass;
+begin
+ GTK_HSEPARATOR_CLASS:=PGtkHSeparatorClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_HSEPARATOR));
+end;
+
+function GTK_IS_HSEPARATOR(obj: pointer) : boolean;
+begin
+ GTK_IS_HSEPARATOR:=GTK_CHECK_TYPE(obj,GTK_TYPE_HSEPARATOR);
+end;
+
+function GTK_IS_HSEPARATOR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_HSEPARATOR_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_HSEPARATOR);
+end;
+
+function GTK_HSEPARATOR_GET_CLASS(obj: pointer) : PGtkHSeparatorClass;
+begin
+ GTK_HSEPARATOR_GET_CLASS:=PGtkHSeparatorClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_HSEPARATOR));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkhsv.inc b/packages/gtk2/src/gtk+/gtk/gtkhsv.inc
new file mode 100644
index 0000000000..0c79c38f26
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkhsv.inc
@@ -0,0 +1,114 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ HSV color selector for GTK+
+
+ Copyright (C) 1999 The Free Software Foundation
+
+ Authors: Simon Budig <Simon.Budig@unix-ag.org> (original code)
+ Federico Mena-Quintero <federico@gimp.org> (cleanup for GTK+)
+ Jonathan Blandford <jrb@redhat.com> (cleanup for GTK+)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+ }
+{$ifndef __GTK_HSV_H__}
+{$define __GTK_HSV_H__}
+{
+ Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
+ file for a list of people on the GTK+ Team. See the ChangeLog
+ files for a list of changes. These files are distributed with
+ GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ }
+{$include gtkcontainer.inc}
+{ C++ extern C conditionnal removed }
+function GTK_TYPE_HSV : GType;
+function GTK_HSV(obj: pointer) : longint;
+function GTK_HSV_CLASS(klass: pointer) : longint;
+function GTK_IS_HSV(obj: pointer) : boolean;
+function GTK_IS_HSV_CLASS(klass: pointer) : boolean;
+function GTK_HSV_GET_CLASS(obj: pointer) : longint;
+
+type
+{ Private data }
+ PGtkHSV = ^TGtkHSV;
+ TGtkHSV = record
+ parent_instance : TGtkWidget;
+ priv : gpointer;
+ end;
+
+{ Notification signals }
+{ Keybindings }
+ PGtkHSVClass = ^TGtkHSVClass;
+ TGtkHSVClass = record
+ parent_class : TGtkWidgetClass;
+ changed : procedure (hsv:PGtkHSV); cdecl;
+ move : procedure (hsv:PGtkHSV; _type:TGtkDirectionType); cdecl;
+ end;
+
+
+function gtk_hsv_get_type:TGtkType; cdecl; external gtklib;
+function gtk_hsv_new:PGtkWidget; cdecl; external gtklib;
+procedure gtk_hsv_set_color(hsv:PGtkHSV; h:Tdouble; s:Tdouble; v:Tdouble); cdecl; external gtklib;
+procedure gtk_hsv_get_color(hsv:PGtkHSV; h:Pgdouble; s:Pgdouble; v:Pgdouble); cdecl; external gtklib;
+procedure gtk_hsv_set_metrics(hsv:PGtkHSV; size:gint; ring_width:gint); cdecl; external gtklib;
+procedure gtk_hsv_get_metrics(hsv:PGtkHSV; size:Pgint; ring_width:Pgint); cdecl; external gtklib;
+function gtk_hsv_is_adjusting(hsv:PGtkHSV):gboolean; cdecl; external gtklib;
+procedure gtk_hsv_to_rgb(h:gdouble; s:gdouble; v:gdouble; r:Pgdouble; g:Pgdouble;
+ b:Pgdouble); cdecl; external gtklib;
+procedure gtk_rgb_to_hsv(r:gdouble; g:gdouble; b:gdouble; h:Pgdouble; s:Pgdouble;
+ v:Pgdouble); cdecl; external gtklib;
+{ C++ end of extern C conditionnal removed }
+{$endif}
+{ __GTK_HSV_H__ }
+function GTK_TYPE_HSV : GType;
+begin
+ GTK_TYPE_HSV:=gtk_hsv_get_type;
+end;
+
+function GTK_HSV(obj: pointer) : PGtkHSV;
+begin
+ GTK_HSV:=PGtkHSV(GTK_CHECK_CAST(obj,GTK_TYPE_HSV));
+end;
+
+function GTK_HSV_CLASS(klass: pointer) : PGtkHSVClass;
+begin
+ GTK_HSV_CLASS:=PGtkHSVClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_HSV));
+end;
+
+function GTK_IS_HSV(obj: pointer) : boolean;
+begin
+ GTK_IS_HSV:=GTK_CHECK_TYPE(obj,GTK_TYPE_HSV);
+end;
+
+function GTK_IS_HSV_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_HSV_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_HSV);
+end;
+
+function GTK_HSV_GET_CLASS(obj: pointer) : PGtkHSVClass;
+begin
+ GTK_HSV_GET_CLASS:=PGtkHSVClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_HSV));
+end;
+
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkiconfactory.inc b/packages/gtk2/src/gtk+/gtk/gtkiconfactory.inc
new file mode 100644
index 0000000000..148046df1a
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkiconfactory.inc
@@ -0,0 +1,147 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkIconFactory = ^TGtkIconFactory;
+ TGtkIconFactory = record
+ parent_instance : TGObject;
+ icons : PGHashTable;
+ end;
+
+{ Padding for future expansion }
+ PGtkIconFactoryClass = ^TGtkIconFactoryClass;
+ TGtkIconFactoryClass = record
+ parent_class : TGObjectClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_ICON_FACTORY : GType;
+function GTK_ICON_FACTORY(anObject: pointer) : PGtkIconFactory;
+function GTK_ICON_FACTORY_CLASS(klass: pointer) : PGtkIconFactoryClass;
+function GTK_IS_ICON_FACTORY(anObject: pointer) : boolean;
+function GTK_IS_ICON_FACTORY_CLASS(klass: pointer) : boolean;
+function GTK_ICON_FACTORY_GET_CLASS(obj: pointer) : PGtkIconFactoryClass;
+
+function GTK_TYPE_ICON_SET : GType;
+function GTK_TYPE_ICON_SOURCE : GType;
+
+function gtk_icon_factory_get_type:GType; cdecl; external gtklib;
+function gtk_icon_factory_new:PGtkIconFactory; cdecl; external gtklib;
+procedure gtk_icon_factory_add(factory:PGtkIconFactory; stock_id:Pgchar; icon_set:PGtkIconSet); cdecl; external gtklib;
+function gtk_icon_factory_lookup(factory:PGtkIconFactory; stock_id:Pgchar):PGtkIconSet; cdecl; external gtklib;
+{ Manage the default icon factory stack }
+procedure gtk_icon_factory_add_default(factory:PGtkIconFactory); cdecl; external gtklib;
+procedure gtk_icon_factory_remove_default(factory:PGtkIconFactory); cdecl; external gtklib;
+function gtk_icon_factory_lookup_default(stock_id:Pgchar):PGtkIconSet; cdecl; external gtklib;
+{ Get preferred real size from registered semantic size. Note that
+ themes SHOULD use this size, but they aren't required to; for size
+ requests and such, you should get the actual pixbuf from the icon
+ set and see what size was rendered.
+
+ This function is intended for people who are scaling icons,
+ rather than for people who are displaying already-scaled icons.
+ That is, if you are displaying an icon, you should get the
+ size from the rendered pixbuf, not from here.
+ }
+function gtk_icon_size_lookup(size:TGtkIconSize; width:Pgint; height:Pgint):gboolean; cdecl; external gtklib;
+function gtk_icon_size_register(name:Pgchar; width:gint; height:gint):TGtkIconSize; cdecl; external gtklib;
+procedure gtk_icon_size_register_alias(alias:Pgchar; target:TGtkIconSize); cdecl; external gtklib;
+function gtk_icon_size_from_name(name:Pgchar):TGtkIconSize; cdecl; external gtklib;
+function gtk_icon_size_get_name(size:TGtkIconSize):Pgchar; cdecl; external gtklib;
+{ Icon sets }
+function gtk_icon_set_get_type:GType; cdecl; external gtklib;
+function gtk_icon_set_new:PGtkIconSet; cdecl; external gtklib;
+function gtk_icon_set_new_from_pixbuf(pixbuf:PGdkPixbuf):PGtkIconSet; cdecl; external gtklib;
+function gtk_icon_set_ref(icon_set:PGtkIconSet):PGtkIconSet; cdecl; external gtklib;
+procedure gtk_icon_set_unref(icon_set:PGtkIconSet); cdecl; external gtklib;
+function gtk_icon_set_copy(icon_set:PGtkIconSet):PGtkIconSet; cdecl; external gtklib;
+{ Get one of the icon variants in the set, creating the variant if
+ necessary.
+ }
+function gtk_icon_set_render_icon(icon_set:PGtkIconSet; style:PGtkStyle; direction:TGtkTextDirection; state:TGtkStateType; size:TGtkIconSize;
+ widget:PGtkWidget; detail:Pchar):PGdkPixbuf; cdecl; external gtklib;
+procedure gtk_icon_set_add_source(icon_set:PGtkIconSet; source:PGtkIconSource); cdecl; external gtklib;
+procedure gtk_icon_set_get_sizes(icon_set:PGtkIconSet; sizes:PPGtkIconSize; n_sizes:pgint); cdecl; external gtklib;
+function gtk_icon_source_get_type:GType; cdecl; external gtklib;
+function gtk_icon_source_new:PGtkIconSource; cdecl; external gtklib;
+function gtk_icon_source_copy(source:PGtkIconSource):PGtkIconSource; cdecl; external gtklib;
+procedure gtk_icon_source_free(source:PGtkIconSource); cdecl; external gtklib;
+procedure gtk_icon_source_set_filename(source:PGtkIconSource; filename:Pgchar); cdecl; external gtklib;
+procedure gtk_icon_source_set_pixbuf(source:PGtkIconSource; pixbuf:PGdkPixbuf); cdecl; external gtklib;
+function gtk_icon_source_get_filename(source:PGtkIconSource):Pgchar; cdecl; external gtklib;
+function gtk_icon_source_get_pixbuf(source:PGtkIconSource):PGdkPixbuf; cdecl; external gtklib;
+procedure gtk_icon_source_set_direction_wildcarded(source:PGtkIconSource; setting:gboolean); cdecl; external gtklib;
+procedure gtk_icon_source_set_state_wildcarded(source:PGtkIconSource; setting:gboolean); cdecl; external gtklib;
+procedure gtk_icon_source_set_size_wildcarded(source:PGtkIconSource; setting:gboolean); cdecl; external gtklib;
+function gtk_icon_source_get_size_wildcarded(source:PGtkIconSource):gboolean; cdecl; external gtklib;
+function gtk_icon_source_get_state_wildcarded(source:PGtkIconSource):gboolean; cdecl; external gtklib;
+function gtk_icon_source_get_direction_wildcarded(source:PGtkIconSource):gboolean; cdecl; external gtklib;
+procedure gtk_icon_source_set_direction(source:PGtkIconSource; direction:TGtkTextDirection); cdecl; external gtklib;
+procedure gtk_icon_source_set_state(source:PGtkIconSource; state:TGtkStateType); cdecl; external gtklib;
+procedure gtk_icon_source_set_size(source:PGtkIconSource; size:TGtkIconSize); cdecl; external gtklib;
+function gtk_icon_source_get_direction(source:PGtkIconSource):TGtkTextDirection; cdecl; external gtklib;
+function gtk_icon_source_get_state(source:PGtkIconSource):TGtkStateType; cdecl; external gtklib;
+function gtk_icon_source_get_size(source:PGtkIconSource):TGtkIconSize; cdecl; external gtklib;
+{ ignore this }
+procedure _gtk_icon_set_invalidate_caches; cdecl; external gtklib;
+function _gtk_icon_factory_list_ids:PGSList; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ICON_FACTORY : GType;
+begin
+ GTK_TYPE_ICON_FACTORY:=gtk_icon_factory_get_type;
+end;
+
+function GTK_ICON_FACTORY(anObject: pointer) : PGtkIconFactory;
+begin
+ GTK_ICON_FACTORY:=PGtkIconFactory(G_TYPE_CHECK_INSTANCE_CAST(anObject,GTK_TYPE_ICON_FACTORY));
+end;
+
+function GTK_ICON_FACTORY_CLASS(klass: pointer) : PGtkIconFactoryClass;
+begin
+ GTK_ICON_FACTORY_CLASS:=PGtkIconFactoryClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_ICON_FACTORY));
+end;
+
+function GTK_IS_ICON_FACTORY(anObject: pointer) : boolean;
+begin
+ GTK_IS_ICON_FACTORY:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GTK_TYPE_ICON_FACTORY);
+end;
+
+function GTK_IS_ICON_FACTORY_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ICON_FACTORY_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_ICON_FACTORY);
+end;
+
+function GTK_ICON_FACTORY_GET_CLASS(obj: pointer) : PGtkIconFactoryClass;
+begin
+ GTK_ICON_FACTORY_GET_CLASS:=PGtkIconFactoryClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_ICON_FACTORY));
+end;
+
+function GTK_TYPE_ICON_SET : GType;
+begin
+ GTK_TYPE_ICON_SET:=gtk_icon_set_get_type;
+end;
+
+function GTK_TYPE_ICON_SOURCE : GType;
+begin
+ GTK_TYPE_ICON_SOURCE:=gtk_icon_source_get_type;
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkicontheme.inc b/packages/gtk2/src/gtk+/gtk/gtkicontheme.inc
new file mode 100644
index 0000000000..d5e866c4a1
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkicontheme.inc
@@ -0,0 +1,165 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkIconThemePrivate = pointer;
+ PGtkIconInfo = pointer;
+ PPGtkIconInfo = ^PGtkIconInfo;
+
+ PGtkIconTheme = ^TGtkIconTheme;
+ TGtkIconTheme = record
+ parent_instance : TGObject;
+ priv : PGtkIconThemePrivate;
+ end;
+
+ PGtkIconThemeClass = ^TGtkIconThemeClass;
+ TGtkIconThemeClass = record
+ parent_class : TGObjectClass;
+ changed : procedure (icon_theme:PGtkIconTheme);cdecl;
+ end;
+
+{
+ GtkIconLookupFlags:
+ @GTK_ICON_LOOKUP_NO_SVG: Never return SVG icons, even if gdk-pixbuf
+ supports them. Cannot be used together with %GTK_ICON_LOOKUP_FORCE_SVG.
+ @GTK_ICON_LOOKUP_FORCE_SVG: Return SVG icons, even if gdk-pixbuf
+ doesn't support them.
+ Cannot be used together with %GTK_ICON_LOOKUP_NO_SVG.
+ @GTK_ICON_LOOKUP_USE_BUILTIN: When passed to
+ gtk_icon_theme_lookup_icon() includes builtin icons
+ as well as files. For a builtin icon, gdk_icon_info_get_filename()
+ returns %NULL and you need to call gdk_icon_info_get_builtin_pixbuf().
+
+ Used to specify options for gtk_icon_theme_lookup_icon()
+ }
+
+ PGtkIconLookupFlags = ^TGtkIconLookupFlags;
+ TGtkIconLookupFlags = (GTK_ICON_LOOKUP_NO_SVG := 1 shl 0,
+ GTK_ICON_LOOKUP_FORCE_SVG := 1 shl 1,
+ GTK_ICON_LOOKUP_USE_BUILTIN := 1 shl 2);
+
+{
+ GtkIconThemeError:
+ @GTK_ICON_THEME_NOT_FOUND: The icon specified does not exist in the theme
+ @GTK_ICON_THEME_FAILED: An unspecified error occurred.
+
+ Error codes for GtkIconTheme operations.
+ }
+type
+
+ PGtkIconThemeError = ^TGtkIconThemeError;
+ TGtkIconThemeError = (GTK_ICON_THEME_NOT_FOUND,
+ GTK_ICON_THEME_FAILED);
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_ICON_INFO : GType;
+function GTK_TYPE_ICON_THEME : GType;
+function GTK_ICON_THEME(obj : pointer) : PGtkIconTheme;
+function GTK_ICON_THEME_CLASS(klass : pointer) : PGtkIconThemeClass;
+function GTK_IS_ICON_THEME(obj : pointer) : gboolean;
+function GTK_IS_ICON_THEME_CLASS(klass : pointer) : gboolean;
+function GTK_ICON_THEME_GET_CLASS(obj : pointer) : PGtkIconThemeClass;
+function GTK_ICON_THEME_ERROR: TGQuark;
+
+
+function gtk_icon_theme_error_quark:TGQuark;cdecl;external gtklib name 'gtk_icon_theme_error_quark';
+
+function gtk_icon_theme_get_type:GType;cdecl;external gtklib name 'gtk_icon_theme_get_type';
+
+function gtk_icon_theme_new:PGtkIconTheme;cdecl;external gtklib name 'gtk_icon_theme_new';
+
+function gtk_icon_theme_get_default:PGtkIconTheme;cdecl;external gtklib name 'gtk_icon_theme_get_default';
+
+function gtk_icon_theme_get_for_screen(screen:PGdkScreen):PGtkIconTheme;cdecl;external gtklib name 'gtk_icon_theme_get_for_screen';
+procedure gtk_icon_theme_set_screen(icon_theme:PGtkIconTheme; screen:PGdkScreen);cdecl;external gtklib name 'gtk_icon_theme_set_screen';
+
+
+procedure gtk_icon_theme_set_search_path(icon_theme:PGtkIconTheme; path:array of Pgchar; n_elements:gint);cdecl;external gtklib name 'gtk_icon_theme_set_search_path';
+procedure gtk_icon_theme_get_search_path(icon_theme:PGtkIconTheme; path:array of PPgchar; n_elements:Pgint);cdecl;external gtklib name 'gtk_icon_theme_get_search_path';
+
+
+procedure gtk_icon_theme_append_search_path(icon_theme:PGtkIconTheme; path:Pgchar);cdecl;external gtklib name 'gtk_icon_theme_append_search_path';
+procedure gtk_icon_theme_prepend_search_path(icon_theme:PGtkIconTheme; path:Pgchar);cdecl;external gtklib name 'gtk_icon_theme_prepend_search_path';
+
+
+procedure gtk_icon_theme_set_custom_theme(icon_theme:PGtkIconTheme; theme_name:Pgchar);cdecl;external gtklib name 'gtk_icon_theme_set_custom_theme';
+
+
+function gtk_icon_theme_has_icon(icon_theme:PGtkIconTheme; icon_name:Pgchar):gboolean;cdecl;external gtklib name 'gtk_icon_theme_has_icon';
+
+function gtk_icon_theme_lookup_icon(icon_theme:PGtkIconTheme; icon_name:Pgchar; size:gint; flags:TGtkIconLookupFlags):PGtkIconInfo;cdecl;external gtklib name 'gtk_icon_theme_lookup_icon';
+
+function gtk_icon_theme_load_icon(icon_theme:PGtkIconTheme; icon_name:Pgchar; size:gint; flags:TGtkIconLookupFlags; error:PPGError):PGdkPixbuf;cdecl;external gtklib name 'gtk_icon_theme_load_icon';
+
+function gtk_icon_theme_list_icons(icon_theme:PGtkIconTheme; context:Pgchar):PGList;cdecl;external gtklib name 'gtk_icon_theme_list_icons';
+
+function gtk_icon_theme_get_example_icon_name(icon_theme:PGtkIconTheme):Pchar;cdecl;external gtklib name 'gtk_icon_theme_get_example_icon_name';
+
+function gtk_icon_theme_rescan_if_needed(icon_theme:PGtkIconTheme):gboolean;cdecl;external gtklib name 'gtk_icon_theme_rescan_if_needed';
+
+procedure gtk_icon_theme_add_builtin_icon(icon_name:Pgchar; size:gint; pixbuf:PGdkPixbuf);cdecl;external gtklib name 'gtk_icon_theme_add_builtin_icon';
+
+function gtk_icon_info_get_type:GType;cdecl;external gtklib name 'gtk_icon_info_get_type';
+function gtk_icon_info_copy(icon_info:PGtkIconInfo):PGtkIconInfo;cdecl;external gtklib name 'gtk_icon_info_copy';
+procedure gtk_icon_info_free(icon_info:PGtkIconInfo);cdecl;external gtklib name 'gtk_icon_info_free';
+function gtk_icon_info_get_base_size(icon_info:PGtkIconInfo):gint;cdecl;external gtklib name 'gtk_icon_info_get_base_size';
+function gtk_icon_info_get_filename(icon_info:PGtkIconInfo):Pgchar;cdecl;external gtklib name 'gtk_icon_info_get_filename';
+function gtk_icon_info_get_builtin_pixbuf(icon_info:PGtkIconInfo):PGdkPixbuf;cdecl;external gtklib name 'gtk_icon_info_get_builtin_pixbuf';
+function gtk_icon_info_load_icon(icon_info:PGtkIconInfo; error:PPGError):PGdkPixbuf;cdecl;external gtklib name 'gtk_icon_info_load_icon';
+procedure gtk_icon_info_set_raw_coordinates(icon_info:PGtkIconInfo; raw_coordinates:gboolean);cdecl;external gtklib name 'gtk_icon_info_set_raw_coordinates';
+function gtk_icon_info_get_embedded_rect(icon_info:PGtkIconInfo; rectangle:PGdkRectangle):gboolean;cdecl;external gtklib name 'gtk_icon_info_get_embedded_rect';
+function gtk_icon_info_get_attach_points(icon_info:PGtkIconInfo; points:PPGdkPoint; n_points:Pgint):gboolean;cdecl;external gtklib name 'gtk_icon_info_get_attach_points';
+function gtk_icon_info_get_display_name(icon_info:PGtkIconInfo):Pgchar;cdecl;external gtklib name 'gtk_icon_info_get_display_name';
+
+{$ENDIF read_interface_rest}
+
+{$ifdef read_implementation}
+function GTK_TYPE_ICON_INFO : GType;
+begin
+ GTK_TYPE_ICON_INFO:=gtk_icon_info_get_type;
+end;
+
+
+function GTK_TYPE_ICON_THEME : GType;
+begin
+ GTK_TYPE_ICON_THEME:=gtk_icon_theme_get_type;
+end;
+
+function GTK_ICON_THEME(obj : pointer) : PGtkIconTheme;
+begin
+ GTK_ICON_THEME:=PGtkIconTheme(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_ICON_THEME));
+end;
+
+function GTK_ICON_THEME_CLASS(klass : pointer) : PGtkIconThemeClass;
+begin
+ GTK_ICON_THEME_CLASS:=PGtkIconThemeClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_ICON_THEME));
+end;
+
+function GTK_IS_ICON_THEME(obj : pointer) : gboolean;
+begin
+ GTK_IS_ICON_THEME:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_ICON_THEME);
+end;
+
+function GTK_IS_ICON_THEME_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_ICON_THEME_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_ICON_THEME);
+end;
+
+
+function GTK_ICON_THEME_GET_CLASS(obj : pointer) : PGtkIconThemeClass;
+begin
+ GTK_ICON_THEME_GET_CLASS:=PGtkIconThemeClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_ICON_THEME));
+end;
+
+
+function GTK_ICON_THEME_ERROR: TGQuark;
+begin
+ GTK_ICON_THEME_ERROR:=gtk_icon_theme_error_quark;
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkiconview.inc b/packages/gtk2/src/gtk+/gtk/gtkiconview.inc
new file mode 100644
index 0000000000..cecf3acf8b
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkiconview.inc
@@ -0,0 +1,124 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+
+
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkIconViewPrivate = gpointer;
+ PGtkIconView = ^TGtkIconView;
+ TGtkIconView = record
+ parent : TGtkContainer;
+ priv : PGtkIconViewPrivate;
+ end;
+
+{ Key Binding signals }
+{ Padding for future expansion }
+ PGtkIconViewClass = ^TGtkIconViewClass;
+ TGtkIconViewClass = record
+ parent_class : TGtkContainerClass;
+ set_scroll_adjustments : procedure (icon_view:PGtkIconView; hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment);cdecl;
+ item_activated : procedure (icon_view:PGtkIconView; path:PGtkTreePath);cdecl;
+ selection_changed : procedure (icon_view:PGtkIconView);cdecl;
+ select_all : procedure (icon_view:PGtkIconView);cdecl;
+ unselect_all : procedure (icon_view:PGtkIconView);cdecl;
+ select_cursor_item : procedure (icon_view:PGtkIconView);cdecl;
+ toggle_cursor_item : procedure (icon_view:PGtkIconView);cdecl;
+ move_cursor : function (icon_view:PGtkIconView; step:TGtkMovementStep; count:gint):gboolean;cdecl;
+ activate_cursor_item : function (icon_view:PGtkIconView):gboolean;cdecl;
+ end;
+
+ TGtkIconViewForeachFunc = procedure (icon_view:PGtkIconView; path:PGtkTreePath; data:gpointer);cdecl;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_ICON_VIEW : GType;
+function GTK_ICON_VIEW(obj: pointer) : PGtkIconView;
+function GTK_ICON_VIEW_CLASS(klass: pointer) : PGtkIconViewClass;
+function GTK_IS_ICON_VIEW(obj: pointer) : boolean;
+function GTK_IS_ICON_VIEW_CLASS(klass: pointer) : boolean;
+function GTK_ICON_VIEW_GET_CLASS(obj: pointer) : PGtkIconViewClass;
+
+{ Creators }
+
+function gtk_icon_view_get_type:TGtkType; cdecl; external gtklib;
+function gtk_icon_view_new:PGtkWidget;cdecl;external gtklib;
+function gtk_icon_view_new_with_model(model:PGtkTreeModel):PGtkWidget;cdecl;external gtklib;
+
+procedure gtk_icon_view_set_model(icon_view:PGtkIconView; model:PGtkTreeModel);cdecl;external gtklib;
+function gtk_icon_view_get_model(icon_view:PGtkIconView):PGtkTreeModel;cdecl;external gtklib;
+procedure gtk_icon_view_set_text_column(icon_view:PGtkIconView; column:gint);cdecl;external gtklib;
+function gtk_icon_view_get_text_column(icon_view:PGtkIconView):gint;cdecl;external gtklib;
+procedure gtk_icon_view_set_markup_column(icon_view:PGtkIconView; column:gint);cdecl;external gtklib;
+function gtk_icon_view_get_markup_column(icon_view:PGtkIconView):gint;cdecl;external gtklib;
+procedure gtk_icon_view_set_pixbuf_column(icon_view:PGtkIconView; column:gint);cdecl;external gtklib;
+function gtk_icon_view_get_pixbuf_column(icon_view:PGtkIconView):gint;cdecl;external gtklib;
+procedure gtk_icon_view_set_orientation(icon_view:PGtkIconView; orientation:TGtkOrientation);cdecl;external gtklib;
+function gtk_icon_view_get_orientation(icon_view:PGtkIconView):TGtkOrientation;cdecl;external gtklib;
+procedure gtk_icon_view_set_columns(icon_view:PGtkIconView; columns:gint);cdecl;external gtklib;
+function gtk_icon_view_get_columns(icon_view:PGtkIconView):gint;cdecl;external gtklib;
+procedure gtk_icon_view_set_item_width(icon_view:PGtkIconView; item_width:gint);cdecl;external gtklib;
+function gtk_icon_view_get_item_width(icon_view:PGtkIconView):gint;cdecl;external gtklib;
+procedure gtk_icon_view_set_spacing(icon_view:PGtkIconView; spacing:gint);cdecl;external gtklib;
+function gtk_icon_view_get_spacing(icon_view:PGtkIconView):gint;cdecl;external gtklib;
+procedure gtk_icon_view_set_row_spacing(icon_view:PGtkIconView; row_spacing:gint);cdecl;external gtklib;
+function gtk_icon_view_get_row_spacing(icon_view:PGtkIconView):gint;cdecl;external gtklib;
+procedure gtk_icon_view_set_column_spacing(icon_view:PGtkIconView; column_spacing:gint);cdecl;external gtklib;
+function gtk_icon_view_get_column_spacing(icon_view:PGtkIconView):gint;cdecl;external gtklib;
+procedure gtk_icon_view_set_margin(icon_view:PGtkIconView; margin:gint);cdecl;external gtklib;
+function gtk_icon_view_get_margin(icon_view:PGtkIconView):gint;cdecl;external gtklib;
+function gtk_icon_view_get_path_at_pos(icon_view:PGtkIconView; x:gint; y:gint):PGtkTreePath;cdecl;external gtklib;
+procedure gtk_icon_view_selected_foreach(icon_view:PGtkIconView; func:TGtkIconViewForeachFunc; data:gpointer);cdecl;external gtklib;
+procedure gtk_icon_view_set_selection_mode(icon_view:PGtkIconView; mode:TGtkSelectionMode);cdecl;external gtklib;
+function gtk_icon_view_get_selection_mode(icon_view:PGtkIconView):TGtkSelectionMode;cdecl;external gtklib;
+procedure gtk_icon_view_select_path(icon_view:PGtkIconView; path:PGtkTreePath);cdecl;external gtklib;
+procedure gtk_icon_view_unselect_path(icon_view:PGtkIconView; path:PGtkTreePath);cdecl;external gtklib;
+function gtk_icon_view_path_is_selected(icon_view:PGtkIconView; path:PGtkTreePath):gboolean;cdecl;external gtklib;
+function gtk_icon_view_get_selected_items(icon_view:PGtkIconView):PGList;cdecl;external gtklib;
+procedure gtk_icon_view_select_all(icon_view:PGtkIconView);cdecl;external gtklib;
+procedure gtk_icon_view_unselect_all(icon_view:PGtkIconView);cdecl;external gtklib;
+procedure gtk_icon_view_item_activated(icon_view:PGtkIconView; path:PGtkTreePath);cdecl;external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ICON_VIEW : GType;
+begin
+ GTK_TYPE_ICON_VIEW:=gtk_icon_view_get_type;
+end;
+
+function GTK_ICON_VIEW(obj: pointer) : PGtkIconView;
+begin
+ GTK_ICON_VIEW:=PGtkIconView(GTK_CHECK_CAST(obj,GTK_TYPE_ICON_VIEW));
+end;
+
+function GTK_ICON_VIEW_CLASS(klass: pointer) : PGtkIconViewClass;
+begin
+ GTK_ICON_VIEW_CLASS:=PGtkIconViewClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_ICON_VIEW));
+end;
+
+function GTK_IS_ICON_VIEW(obj: pointer) : boolean;
+begin
+ GTK_IS_ICON_VIEW:=GTK_CHECK_TYPE(obj,GTK_TYPE_ICON_VIEW);
+end;
+
+function GTK_IS_ICON_VIEW_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ICON_VIEW_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_ICON_VIEW);
+end;
+
+function GTK_ICON_VIEW_GET_CLASS(obj: pointer) : PGtkIconViewClass;
+begin
+ GTK_ICON_VIEW_GET_CLASS:=PGtkIconViewClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_ICON_VIEW));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
diff --git a/packages/gtk2/src/gtk+/gtk/gtkimage.inc b/packages/gtk2/src/gtk+/gtk/gtkimage.inc
new file mode 100644
index 0000000000..43569ecc3d
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkimage.inc
@@ -0,0 +1,166 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkIconSet = pointer;
+
+
+ PGtkImagePixmapData = ^TGtkImagePixmapData;
+ TGtkImagePixmapData = record
+ pixmap : PGdkPixmap;
+ end;
+
+ PGtkImageImageData = ^TGtkImageImageData;
+ TGtkImageImageData = record
+ image : PGdkImage;
+ end;
+
+ PGtkImagePixbufData = ^TGtkImagePixbufData;
+ TGtkImagePixbufData = record
+ pixbuf : PGdkPixbuf;
+ end;
+
+ PGtkImageStockData = ^TGtkImageStockData;
+ TGtkImageStockData = record
+ stock_id : Pgchar;
+ end;
+
+ PGtkImageIconSetData = ^TGtkImageIconSetData;
+ TGtkImageIconSetData = record
+ icon_set : PGtkIconSet;
+ end;
+
+ PGtkImageAnimationData = ^TGtkImageAnimationData;
+ TGtkImageAnimationData = record
+ anim : PGdkPixbufAnimation;
+ iter : PGdkPixbufAnimationIter;
+ frame_timeout : guint;
+ end;
+
+
+ PGtkImageType = ^TGtkImageType;
+ TGtkImageType = (
+ GTK_IMAGE_EMPTY,
+ GTK_IMAGE_PIXMAP,
+ GTK_IMAGE_IMAGE,
+ GTK_IMAGE_PIXBUF,
+ GTK_IMAGE_STOCK,
+ GTK_IMAGE_ICON_SET,
+ GTK_IMAGE_ANIMATION
+ );
+
+{ Only used with GTK_IMAGE_PIXMAP, GTK_IMAGE_IMAGE }
+{ Only used with GTK_IMAGE_STOCK, GTK_IMAGE_ICON_SET }
+ PGtkImage = ^TGtkImage;
+ TGtkImage = record
+ misc : TGtkMisc;
+ storage_type : TGtkImageType;
+ data : record
+ case longint of
+ 0 : ( pixmap : TGtkImagePixmapData );
+ 1 : ( image : TGtkImageImageData );
+ 2 : ( pixbuf : TGtkImagePixbufData );
+ 3 : ( stock : TGtkImageStockData );
+ 4 : ( icon_set : TGtkImageIconSetData );
+ 5 : ( anim : TGtkImageAnimationData );
+ end;
+ mask : PGdkBitmap;
+ icon_size : TGtkIconSize;
+ end;
+
+{ Padding for future expansion }
+ PGtkImageClass = ^TGtkImageClass;
+ TGtkImageClass = record
+ parent_class : TGtkMiscClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_IMAGE : GType;
+function GTK_IMAGE(obj: pointer) : PGtkImage;
+function GTK_IMAGE_CLASS(klass: pointer) : PGtkImageClass;
+function GTK_IS_IMAGE(obj: pointer) : boolean;
+function GTK_IS_IMAGE_CLASS(klass: pointer) : boolean;
+function GTK_IMAGE_GET_CLASS(obj: pointer) : PGtkImageClass;
+
+
+function gtk_image_get_type:TGtkType; cdecl; external gtklib;
+function gtk_image_new:PGtkWidget; cdecl; external gtklib;
+function gtk_image_new_from_pixmap(pixmap:PGdkPixmap; mask:PGdkBitmap):PGtkWidget; cdecl; external gtklib;
+function gtk_image_new_from_image(image:PGdkImage; mask:PGdkBitmap):PGtkWidget; cdecl; external gtklib;
+function gtk_image_new_from_file(filename:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_image_new_from_pixbuf(pixbuf:PGdkPixbuf):PGtkWidget; cdecl; external gtklib;
+function gtk_image_new_from_stock(stock_id:Pgchar; size:TGtkIconSize):PGtkWidget; cdecl; external gtklib;
+function gtk_image_new_from_icon_set(icon_set:PGtkIconSet; size:TGtkIconSize):PGtkWidget; cdecl; external gtklib;
+function gtk_image_new_from_animation(animation:PGdkPixbufAnimation):PGtkWidget; cdecl; external gtklib;
+procedure gtk_image_set_from_pixmap(image:PGtkImage; pixmap:PGdkPixmap; mask:PGdkBitmap); cdecl; external gtklib;
+procedure gtk_image_set_from_image(image:PGtkImage; gdk_image:PGdkImage; mask:PGdkBitmap); cdecl; external gtklib;
+procedure gtk_image_set_from_file(image:PGtkImage; filename:Pgchar); cdecl; external gtklib;
+procedure gtk_image_set_from_pixbuf(image:PGtkImage; pixbuf:PGdkPixbuf); cdecl; external gtklib;
+procedure gtk_image_set_from_stock(image:PGtkImage; stock_id:Pgchar; size:TGtkIconSize); cdecl; external gtklib;
+procedure gtk_image_set_from_icon_set(image:PGtkImage; icon_set:PGtkIconSet; size:TGtkIconSize); cdecl; external gtklib;
+procedure gtk_image_set_from_animation(image:PGtkImage; animation:PGdkPixbufAnimation); cdecl; external gtklib;
+function gtk_image_get_storage_type(image:PGtkImage):TGtkImageType; cdecl; external gtklib;
+procedure gtk_image_get_pixmap(image:PGtkImage; var pixmap:PGdkPixmap; var mask:PGdkBitmap); cdecl; external gtklib;
+procedure gtk_image_get_image(image:PGtkImage; var gdk_image:PGdkImage; var mask:PGdkBitmap); cdecl; external gtklib;
+function gtk_image_get_pixbuf(image:PGtkImage):PGdkPixbuf; cdecl; external gtklib;
+procedure gtk_image_get_stock(image:PGtkImage; stock_id:PPgchar; size:PGtkIconSize); cdecl; external gtklib;
+procedure gtk_image_get_icon_set(image:PGtkImage; var icon_set:PGtkIconSet; size:PGtkIconSize); cdecl; external gtklib;
+function gtk_image_get_animation(image:PGtkImage):PGdkPixbufAnimation; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+{ These three are deprecated }
+procedure gtk_image_set(image:PGtkImage; val:PGdkImage; mask:PGdkBitmap); cdecl; external gtklib;
+procedure gtk_image_get(image:PGtkImage; var val:PGdkImage; var mask:PGdkBitmap); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_IMAGE : GType;
+begin
+ GTK_TYPE_IMAGE:=gtk_image_get_type;
+end;
+
+function GTK_IMAGE(obj: pointer) : PGtkImage;
+begin
+ GTK_IMAGE:=PGtkImage(GTK_CHECK_CAST(obj,GTK_TYPE_IMAGE));
+end;
+
+function GTK_IMAGE_CLASS(klass: pointer) : PGtkImageClass;
+begin
+ GTK_IMAGE_CLASS:=PGtkImageClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_IMAGE));
+end;
+
+function GTK_IS_IMAGE(obj: pointer) : boolean;
+begin
+ GTK_IS_IMAGE:=GTK_CHECK_TYPE(obj,GTK_TYPE_IMAGE);
+end;
+
+function GTK_IS_IMAGE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_IMAGE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_IMAGE);
+end;
+
+function GTK_IMAGE_GET_CLASS(obj: pointer) : PGtkImageClass;
+begin
+ GTK_IMAGE_GET_CLASS:=PGtkImageClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_IMAGE));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkimagemenuitem.inc b/packages/gtk2/src/gtk+/gtk/gtkimagemenuitem.inc
new file mode 100644
index 0000000000..45dfc65d9c
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkimagemenuitem.inc
@@ -0,0 +1,78 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{< private > }
+ PGtkImageMenuItem = ^TGtkImageMenuItem;
+ TGtkImageMenuItem = record
+ menu_item : TGtkMenuItem;
+ image : PGtkWidget;
+ end;
+
+ PGtkImageMenuItemClass = ^TGtkImageMenuItemClass;
+ TGtkImageMenuItemClass = record
+ parent_class : TGtkMenuItemClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_IMAGE_MENU_ITEM : GType;
+function GTK_IMAGE_MENU_ITEM(obj: pointer) : PGtkImageMenuItem;
+function GTK_IMAGE_MENU_ITEM_CLASS(klass: pointer) : PGtkImageMenuItemClass;
+function GTK_IS_IMAGE_MENU_ITEM(obj: pointer) : boolean;
+function GTK_IS_IMAGE_MENU_ITEM_CLASS(klass: pointer) : boolean;
+function GTK_IMAGE_MENU_ITEM_GET_CLASS(obj: pointer) : PGtkImageMenuItemClass;
+
+
+function gtk_image_menu_item_get_type:TGtkType; cdecl; external gtklib;
+function gtk_image_menu_item_new:PGtkWidget; cdecl; external gtklib;
+function gtk_image_menu_item_new_with_label(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_image_menu_item_new_with_mnemonic(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_image_menu_item_new_from_stock(stock_id:Pgchar; accel_group:PGtkAccelGroup):PGtkWidget; cdecl; external gtklib;
+procedure gtk_image_menu_item_set_image(image_menu_item:PGtkImageMenuItem; image:PGtkWidget); cdecl; external gtklib;
+function gtk_image_menu_item_get_image(image_menu_item:PGtkImageMenuItem):PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_IMAGE_MENU_ITEM : GType;
+begin
+ GTK_TYPE_IMAGE_MENU_ITEM:=gtk_image_menu_item_get_type;
+end;
+
+function GTK_IMAGE_MENU_ITEM(obj: pointer) : PGtkImageMenuItem;
+begin
+ GTK_IMAGE_MENU_ITEM:=PGtkImageMenuItem(GTK_CHECK_CAST(obj,GTK_TYPE_IMAGE_MENU_ITEM));
+end;
+
+function GTK_IMAGE_MENU_ITEM_CLASS(klass: pointer) : PGtkImageMenuItemClass;
+begin
+ GTK_IMAGE_MENU_ITEM_CLASS:=PGtkImageMenuItemClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_IMAGE_MENU_ITEM));
+end;
+
+function GTK_IS_IMAGE_MENU_ITEM(obj: pointer) : boolean;
+begin
+ GTK_IS_IMAGE_MENU_ITEM:=GTK_CHECK_TYPE(obj,GTK_TYPE_IMAGE_MENU_ITEM);
+end;
+
+function GTK_IS_IMAGE_MENU_ITEM_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_IMAGE_MENU_ITEM_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_IMAGE_MENU_ITEM);
+end;
+
+function GTK_IMAGE_MENU_ITEM_GET_CLASS(obj: pointer) : PGtkImageMenuItemClass;
+begin
+ GTK_IMAGE_MENU_ITEM_GET_CLASS:=PGtkImageMenuItemClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_IMAGE_MENU_ITEM));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkimcontext.inc b/packages/gtk2/src/gtk+/gtk/gtkimcontext.inc
new file mode 100644
index 0000000000..b8c77b6728
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkimcontext.inc
@@ -0,0 +1,106 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkIMContext = ^TGtkIMContext;
+ TGtkIMContext = record
+ parent_instance : TGObject;
+ end;
+
+{ Signals }
+{ Virtual functions }
+{ Padding for future expansion }
+ PGtkIMContextClass = ^TGtkIMContextClass;
+ TGtkIMContextClass = record
+ parent_class : TGtkObjectClass;
+ preedit_start : procedure (context:PGtkIMContext); cdecl;
+ preedit_end : procedure (context:PGtkIMContext); cdecl;
+ preedit_changed : procedure (context:PGtkIMContext); cdecl;
+ commit : procedure (context:PGtkIMContext; str:Pgchar); cdecl;
+ retrieve_surrounding : function (context:PGtkIMContext):gboolean; cdecl;
+ delete_surrounding : function (context:PGtkIMContext; offset:gint; n_chars:gint):gboolean; cdecl;
+ set_client_window : procedure (context:PGtkIMContext; window:PGdkWindow); cdecl;
+ get_preedit_string : procedure (context:PGtkIMContext; str:PPgchar; var attrs:PPangoAttrList; cursor_pos:Pgint); cdecl;
+ filter_keypress : function (context:PGtkIMContext; event:PGdkEventKey):gboolean; cdecl;
+ focus_in : procedure (context:PGtkIMContext); cdecl;
+ focus_out : procedure (context:PGtkIMContext); cdecl;
+ reset : procedure (context:PGtkIMContext); cdecl;
+ set_cursor_location : procedure (context:PGtkIMContext; area:PGdkRectangle); cdecl;
+ set_use_preedit : procedure (context:PGtkIMContext; use_preedit:gboolean); cdecl;
+ set_surrounding : procedure (context:PGtkIMContext; text:Pgchar; len:gint; cursor_index:gint); cdecl;
+ get_surrounding : function (context:PGtkIMContext; text:PPgchar; cursor_index:Pgint):gboolean; cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ _gtk_reserved5 : procedure ; cdecl;
+ _gtk_reserved6 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_IM_CONTEXT : GType;
+function GTK_IM_CONTEXT(obj: pointer) : PGtkIMContext;
+function GTK_IM_CONTEXT_CLASS(klass: pointer) : PGtkIMContextClass;
+function GTK_IS_IM_CONTEXT(obj: pointer) : boolean;
+function GTK_IS_IM_CONTEXT_CLASS(klass: pointer) : boolean;
+function GTK_IM_CONTEXT_GET_CLASS(obj: pointer) : PGtkIMContextClass;
+
+
+function gtk_im_context_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_im_context_set_client_window(context:PGtkIMContext; window:PGdkWindow); cdecl; external gtklib;
+procedure gtk_im_context_get_preedit_string(context:PGtkIMContext; str:PPgchar; var attrs:PPangoAttrList; cursor_pos:Pgint); cdecl; external gtklib;
+function gtk_im_context_filter_keypress(context:PGtkIMContext; event:PGdkEventKey):gboolean; cdecl; external gtklib;
+procedure gtk_im_context_focus_in(context:PGtkIMContext); cdecl; external gtklib;
+procedure gtk_im_context_focus_out(context:PGtkIMContext); cdecl; external gtklib;
+procedure gtk_im_context_reset(context:PGtkIMContext); cdecl; external gtklib;
+procedure gtk_im_context_set_cursor_location(context:PGtkIMContext; area:PGdkRectangle); cdecl; external gtklib;
+procedure gtk_im_context_set_use_preedit(context:PGtkIMContext; use_preedit:gboolean); cdecl; external gtklib;
+procedure gtk_im_context_set_surrounding(context:PGtkIMContext; text:Pgchar; len:gint; cursor_index:gint); cdecl; external gtklib;
+function gtk_im_context_get_surrounding(context:PGtkIMContext; text:PPgchar; cursor_index:Pgint):gboolean; cdecl; external gtklib;
+function gtk_im_context_delete_surrounding(context:PGtkIMContext; offset:gint; n_chars:gint):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_IM_CONTEXT : GType;
+begin
+ GTK_TYPE_IM_CONTEXT:=gtk_im_context_get_type;
+end;
+
+function GTK_IM_CONTEXT(obj: pointer) : PGtkIMContext;
+begin
+ GTK_IM_CONTEXT:=PGtkIMContext(GTK_CHECK_CAST(obj,GTK_TYPE_IM_CONTEXT));
+end;
+
+function GTK_IM_CONTEXT_CLASS(klass: pointer) : PGtkIMContextClass;
+begin
+ GTK_IM_CONTEXT_CLASS:=PGtkIMContextClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_IM_CONTEXT));
+end;
+
+function GTK_IS_IM_CONTEXT(obj: pointer) : boolean;
+begin
+ GTK_IS_IM_CONTEXT:=GTK_CHECK_TYPE(obj,GTK_TYPE_IM_CONTEXT);
+end;
+
+function GTK_IS_IM_CONTEXT_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_IM_CONTEXT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_IM_CONTEXT);
+end;
+
+function GTK_IM_CONTEXT_GET_CLASS(obj: pointer) : PGtkIMContextClass;
+begin
+ GTK_IM_CONTEXT_GET_CLASS:=PGtkIMContextClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_IM_CONTEXT));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkimcontextsimple.inc b/packages/gtk2/src/gtk+/gtk/gtkimcontextsimple.inc
new file mode 100644
index 0000000000..1f4a6e08fc
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkimcontextsimple.inc
@@ -0,0 +1,94 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkIMContextSimple = ^TGtkIMContextSimple;
+ TGtkIMContextSimple = record
+ anObject : TGtkIMContext;
+ tables : PGSList;
+ compose_buffer : array[0..(GTK_MAX_COMPOSE_LEN + 1)-1] of guint;
+ tentative_match : gunichar;
+ tentative_match_len : gint;
+ flag0 : word;
+ end;
+
+ PGtkIMContextSimpleClass = ^TGtkIMContextSimpleClass;
+ TGtkIMContextSimpleClass = record
+ parent_class : TGtkIMContextClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkIMContextSimple_in_hex_sequence = $1;
+ bp_TGtkIMContextSimple_in_hex_sequence = 0;
+
+
+function GTK_TYPE_IM_CONTEXT_SIMPLE : GType;
+function GTK_IM_CONTEXT_SIMPLE(obj: pointer) : PGtkIMContextSimple;
+function GTK_IM_CONTEXT_SIMPLE_CLASS(klass: pointer) : PGtkIMContextSimpleClass;
+function GTK_IS_IM_CONTEXT_SIMPLE(obj: pointer) : boolean;
+function GTK_IS_IM_CONTEXT_SIMPLE_CLASS(klass: pointer) : boolean;
+function GTK_IM_CONTEXT_SIMPLE_GET_CLASS(obj: pointer) : PGtkIMContextSimpleClass;
+
+function in_hex_sequence(var a : TGtkIMContextSimple) : guint;
+procedure set_in_hex_sequence(var a : TGtkIMContextSimple; __in_hex_sequence : guint);
+
+function gtk_im_context_simple_get_type:TGtkType; cdecl; external gtklib;
+function gtk_im_context_simple_new:PGtkIMContext; cdecl; external gtklib;
+procedure gtk_im_context_simple_add_table(context_simple:PGtkIMContextSimple; data:Pguint16; max_seq_len:gint; n_seqs:gint); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_IM_CONTEXT_SIMPLE : GType;
+begin
+ GTK_TYPE_IM_CONTEXT_SIMPLE:=gtk_im_context_simple_get_type;
+end;
+
+function GTK_IM_CONTEXT_SIMPLE(obj: pointer) : PGtkIMContextSimple;
+begin
+ GTK_IM_CONTEXT_SIMPLE:=PGtkIMContextSimple(GTK_CHECK_CAST(obj,GTK_TYPE_IM_CONTEXT_SIMPLE));
+end;
+
+function GTK_IM_CONTEXT_SIMPLE_CLASS(klass: pointer) : PGtkIMContextSimpleClass;
+begin
+ GTK_IM_CONTEXT_SIMPLE_CLASS:=PGtkIMContextSimpleClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_IM_CONTEXT_SIMPLE));
+end;
+
+function GTK_IS_IM_CONTEXT_SIMPLE(obj: pointer) : boolean;
+begin
+ GTK_IS_IM_CONTEXT_SIMPLE:=GTK_CHECK_TYPE(obj,GTK_TYPE_IM_CONTEXT_SIMPLE);
+end;
+
+function GTK_IS_IM_CONTEXT_SIMPLE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_IM_CONTEXT_SIMPLE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_IM_CONTEXT_SIMPLE);
+end;
+
+function GTK_IM_CONTEXT_SIMPLE_GET_CLASS(obj: pointer) : PGtkIMContextSimpleClass;
+begin
+ GTK_IM_CONTEXT_SIMPLE_GET_CLASS:=PGtkIMContextSimpleClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_IM_CONTEXT_SIMPLE));
+end;
+
+function in_hex_sequence(var a : TGtkIMContextSimple) : guint;
+begin
+ in_hex_sequence:=(a.flag0 and bm_TGtkIMContextSimple_in_hex_sequence) shr bp_TGtkIMContextSimple_in_hex_sequence;
+end;
+
+procedure set_in_hex_sequence(var a : TGtkIMContextSimple; __in_hex_sequence : guint);
+begin
+ a.flag0:=a.flag0 or ((__in_hex_sequence shl bp_TGtkIMContextSimple_in_hex_sequence) and bm_TGtkIMContextSimple_in_hex_sequence);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkimmodule.inc b/packages/gtk2/src/gtk+/gtk/gtkimmodule.inc
new file mode 100644
index 0000000000..12aeae0c63
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkimmodule.inc
@@ -0,0 +1,73 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ GTK - The GIMP Toolkit
+ Copyright (C) 2000 Red Hat Software
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+ }
+{$ifndef __GTK_IM_MODULE_H__}
+{$define __GTK_IM_MODULE_H__}
+{ C++ extern C conditionnal removed }
+{ __cplusplus }
+{$include gtkimcontext.inc}
+type
+
+
+
+
+
+ PGtkIMContextInfo = ^TGtkIMContextInfo;
+ TGtkIMContextInfo = record
+ context_id : Pgchar;
+ context_name : Pgchar;
+ domain : Pgchar;
+ domain_dirname : Pgchar;
+ default_locales : Pgchar;
+ end;
+
+{ Functions for use within GTK+
+ }
+
+
+procedure _gtk_im_module_list(contexts:PPPGtkIMContextInfo; n_contexts:Pguint); cdecl; external gtklib;
+
+function _gtk_im_module_create(context_id:Pgchar):PGtkIMContext; cdecl; external gtklib;
+
+
+function _gtk_im_module_get_default_context_id(lang:Pgchar):Pgchar; cdecl; external gtklib;
+{ The following entry points are exported by each input method module
+ }
+{
+void im_module_list (const GtkIMContextInfo contexts,
+ guint n_contexts);
+void im_module_init (GtkModule module);
+void im_module_exit (void);
+GtkIMContext im_module_create (const gchar context_id);
+ }
+{ C++ end of extern C conditionnal removed }
+{ __cplusplus }
+{$endif}
+{ __GTK_IM_MODULE_H__ }
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkimmulticontext.inc b/packages/gtk2/src/gtk+/gtk/gtkimmulticontext.inc
new file mode 100644
index 0000000000..fc1b1a233c
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkimmulticontext.inc
@@ -0,0 +1,80 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkIMMulticontext = ^TGtkIMMulticontext;
+ TGtkIMMulticontext = record
+ anObject : TGtkIMContext;
+ slave : PGtkIMContext;
+ client_window : PGdkWindow;
+ context_id : Pgchar;
+ end;
+
+{ Padding for future expansion }
+ PGtkIMMulticontextClass = ^TGtkIMMulticontextClass;
+ TGtkIMMulticontextClass = record
+ parent_class : TGtkIMContextClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_IM_MULTICONTEXT : GType;
+function GTK_IM_MULTICONTEXT(obj: pointer) : PGtkIMMulticontext;
+function GTK_IM_MULTICONTEXT_CLASS(klass: pointer) : PGtkIMMulticontextClass;
+function GTK_IS_IM_MULTICONTEXT(obj: pointer) : boolean;
+function GTK_IS_IM_MULTICONTEXT_CLASS(klass: pointer) : boolean;
+function GTK_IM_MULTICONTEXT_GET_CLASS(obj: pointer) : PGtkIMMulticontextClass;
+
+
+function gtk_im_multicontext_get_type:TGtkType; cdecl; external gtklib;
+function gtk_im_multicontext_new:PGtkIMContext; cdecl; external gtklib;
+procedure gtk_im_multicontext_append_menuitems(context:PGtkIMMulticontext; menushell:PGtkMenuShell); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_IM_MULTICONTEXT : GType;
+begin
+ GTK_TYPE_IM_MULTICONTEXT:=gtk_im_multicontext_get_type;
+end;
+
+function GTK_IM_MULTICONTEXT(obj: pointer) : PGtkIMMulticontext;
+begin
+ GTK_IM_MULTICONTEXT:=PGtkIMMulticontext(GTK_CHECK_CAST(obj,GTK_TYPE_IM_MULTICONTEXT));
+end;
+
+function GTK_IM_MULTICONTEXT_CLASS(klass: pointer) : PGtkIMMulticontextClass;
+begin
+ GTK_IM_MULTICONTEXT_CLASS:=PGtkIMMulticontextClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_IM_MULTICONTEXT));
+end;
+
+function GTK_IS_IM_MULTICONTEXT(obj: pointer) : boolean;
+begin
+ GTK_IS_IM_MULTICONTEXT:=GTK_CHECK_TYPE(obj,GTK_TYPE_IM_MULTICONTEXT);
+end;
+
+function GTK_IS_IM_MULTICONTEXT_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_IM_MULTICONTEXT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_IM_MULTICONTEXT);
+end;
+
+function GTK_IM_MULTICONTEXT_GET_CLASS(obj: pointer) : PGtkIMMulticontextClass;
+begin
+ GTK_IM_MULTICONTEXT_GET_CLASS:=PGtkIMMulticontextClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_IM_MULTICONTEXT));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkincludes.inc b/packages/gtk2/src/gtk+/gtk/gtkincludes.inc
new file mode 100644
index 0000000000..2cbc55361d
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkincludes.inc
@@ -0,0 +1,211 @@
+{%MainUnit gtk2.pas}
+{$include gtkobject.inc}
+{$include gtkdebug.inc}
+{$include gtktypeutils.inc}
+{$include gtkwidget.inc}
+{$include gtkmisc.inc}
+{$include gtkaccelgroup.inc}
+{$include gtkcontainer.inc}
+{$include gtkbin.inc}
+{$include gtkwindow.inc}
+{$include gtklabel.inc}
+{$include gtkaccellabel.inc}
+{$include gtkaccelmap.inc}
+{$include gtkaccessible.inc}
+{$include gtkadjustment.inc}
+{$include gtkalignment.inc}
+{$include gtkframe.inc}
+{$include gtkaspectframe.inc}
+{$include gtkarrow.inc}
+{$include gtkbindings.inc}
+{$include gtkbox.inc}
+{$include gtkbbox.inc}
+{$include gtkbutton.inc}
+{$include gtkcalendar.inc}
+{$include gtkcelleditable.inc}
+{$include gtkcellrenderer.inc}
+{$include gtkcellrenderertext.inc}
+{$include gtkcellrenderertoggle.inc}
+{$include gtkcellrendererpixbuf.inc}
+{$include gtkitem.inc}
+{$include gtkmenuitem.inc}
+{$include gtktogglebutton.inc}
+{$include gtkcheckbutton.inc}
+{$include gtkcheckmenuitem.inc}
+{$include gtkclipboard.inc}
+{$include gtkclist.inc}
+{$include gtkdialog.inc}
+{$include gtkvbox.inc}
+{$include gtkcolorsel.inc}
+{$include gtkcolorseldialog.inc}
+{$include gtkhbox.inc}
+{$include gtkcombo.inc}
+{$include gtkctree.inc}
+{$include gtkdrawingarea.inc}
+{$include gtkcurve.inc}
+{$include gtkdnd.inc}
+{$include gtkeditable.inc}
+{$include gtkimcontext.inc}
+{$include gtkmenushell.inc}
+{$include gtkmenu.inc}
+{$include gtkentry.inc}
+{$include gtkenums.inc}
+{$include gtkeventbox.inc}
+{$include fnmatch.inc}
+{$include gtkfilesel.inc}
+{$include gtkfixed.inc}
+{$include gtkfontsel.inc}
+{$include gtkgamma.inc}
+{$include gtkgc.inc}
+{$include gtkhandlebox.inc}
+{$include gtkpaned.inc}
+{$include gtkhbbox.inc}
+{$include gtkhpaned.inc}
+{$include gtkruler.inc}
+{$include gtkhruler.inc}
+{$include gtksettings.inc}
+{$include gtkrc.inc}
+{$include gtkstyle.inc}
+{$include gtkrange.inc}
+{$include gtkscale.inc}
+{$include gtkhscale.inc}
+{$include gtkscrollbar.inc}
+{$include gtkhscrollbar.inc}
+{$include gtkseparator.inc}
+{$include gtkhseparator.inc}
+{$include gtkiconfactory.inc}
+{$include gtkimage.inc}
+{$include gtkimagemenuitem.inc}
+{$include gtkimcontextsimple.inc}
+{$include gtkimmulticontext.inc}
+{$include gtkinputdialog.inc}
+{$include gtkinvisible.inc}
+{$include gtkitemfactory.inc}
+{$include gtklayout.inc}
+{$include gtklist.inc}
+{$include gtklistitem.inc}
+{$include gtktreemodel.inc}
+{$include gtktreesortable.inc}
+{$include gtktreemodelsort.inc}
+{$include gtkliststore.inc}
+{$include gtkmain.inc}
+{$include gtkmenubar.inc}
+{$include gtkmessagedialog.inc}
+{$include gtknotebook.inc}
+{$include gtkoldeditable.inc}
+{$include gtkoptionmenu.inc}
+{$include gtkpixmap.inc}
+{$include gtkplug.inc}
+{$include gtkpreview.inc}
+{$include gtkprogress.inc}
+{$include gtkprogressbar.inc}
+{$include gtkradiobutton.inc}
+{$include gtkradiomenuitem.inc}
+{$include gtkscrolledwindow.inc}
+{$include gtkselection.inc}
+{$include gtkseparatormenuitem.inc}
+{$include gtksignal.inc}
+{$include gtksizegroup.inc}
+{$include gtksocket.inc}
+{$include gtkspinbutton.inc}
+{$include gtkstock.inc}
+{$include gtkstatusbar.inc}
+{$include gtktable.inc}
+{$include gtktearoffmenuitem.inc}
+{$include gtktext.inc}
+{$include gtktextiter.inc}
+{$include gtktexttag.inc}
+{$include gtktexttagtable.inc}
+{$include gtktextmark.inc}
+{$include gtktextmarkprivate.inc}
+{$include gtktextchild.inc}
+{$include gtktextchildprivate.inc}
+{$include gtktextsegment.inc}
+{$include gtktextbtree.inc}
+{$include gtktextbuffer.inc}
+{$include gtktextlayout.inc}
+{$include gtktextview.inc}
+{$include gtktipsquery.inc}
+{$include gtktooltips.inc}
+{$include gtktoolbar.inc}
+{$include gtktree.inc}
+{$include gtktreednd.inc}
+{$include gtktreeitem.inc}
+{$include gtktreeselection.inc}
+{$include gtktreestore.inc}
+{$include gtktreeviewcolumn.inc}
+{$include gtkrbtree.inc}
+{$include gtktreeprivate.inc}
+{$include gtktreeview.inc}
+{$include gtkvbbox.inc}
+{$include gtkviewport.inc}
+{$include gtkvpaned.inc}
+{$include gtkvruler.inc}
+{$include gtkvscale.inc}
+{$include gtkvscrollbar.inc}
+{$include gtkvseparator.inc}
+
+
+{$ifdef HasGTK2_4}
+// new GTK 2.4 + 2.6 + 2.8 code
+
+// GtkFileSystem Code for FileChooser
+{$include gtkfilefilter.inc}
+{$include gtkfilesystem.inc}
+
+// new GtkFileChooser Widget
+{$IFDEF HasGTK2_6}
+{$IFNDEF HasGTK2_8} // These functions are removed from GTK-2.8
+{$include gtkfilechooserdefault.inc}
+{$include gtkfilechooserembed.inc}
+{$include gtkfilechooserentry.inc}
+{$include gtkiconview.inc}
+{$ENDIF HasGTK2_8}
+
+// new GtkCellRendererCombo widget
+{$include gtkcellrenderercombo.inc}
+{$ENDIF HasGTK2_6}
+
+{$IFDEF HasGTK2_8}
+// Put new GTK-2.8 functions here
+{$ENDIF HasGTK2_8}
+
+{$include gtkfilechooser.inc}
+
+{$include gtkfilechooserprivate.inc}
+{$include gtkfilechooserutils.inc}
+{$include gtkfilechooserwidget.inc}
+{$include gtkfilechooserdialog.inc}
+
+// GtkExpander
+{$include gtkexpander.inc}
+
+// GtkActions
+{$include gtkaction.inc}
+{$include gtkactiongroup.inc}
+{$include gtktoggleaction.inc}
+{$include gtkradioaction.inc}
+
+// GtkComboBox
+{$include gtkcombobox.inc}
+{$include gtkcomboboxentry.inc}
+
+// Gtk~ToolButtons and -Item
+{$include gtktoolitem.inc}
+{$include gtktoolbutton.inc}
+{$include gtktoggletoolbutton.inc}
+{$include gtkradiotoolbutton.inc}
+
+// even more
+{$include gtkfontbutton.inc}
+{$include gtkicontheme.inc}
+{$include gtkcolorbutton.inc}
+{$include gtkcelllayout.inc}
+{$include gtkentrycompletion.inc}
+{$include gtkuimanager.inc}
+{$include gtktreemodelfilter.inc}
+
+
+{$endif HasGTK2_4}
+
+// included by gtk2.pas
diff --git a/packages/gtk2/src/gtk+/gtk/gtkinputdialog.inc b/packages/gtk2/src/gtk+/gtk/gtkinputdialog.inc
new file mode 100644
index 0000000000..cb7004e054
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkinputdialog.inc
@@ -0,0 +1,97 @@
+// included by gtk2.pas
+
+{
+ NOTE this widget is considered too specialized/little-used for
+ GTK+, and will in the future be moved to some other package. If
+ your application needs this widget, feel free to use it, as the
+ widget does work and is useful in some applications; it's just not
+ of general interest. However, we are not accepting new features for
+ the widget, and it will eventually move out of the GTK+
+ distribution.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ 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..(GDK_AXIS_LAST)-1] of PGtkWidget;
+ current_device : PGdkDevice;
+ keys_list : PGtkWidget;
+ keys_listbox : PGtkWidget;
+ end;
+
+{ Padding for future expansion }
+ PGtkInputDialogClass = ^TGtkInputDialogClass;
+ TGtkInputDialogClass = record
+ parent_class : TGtkDialogClass;
+ enable_device : procedure (inputd:PGtkInputDialog; device:PGdkDevice); cdecl;
+ disable_device : procedure (inputd:PGtkInputDialog; device:PGdkDevice); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_INPUT_DIALOG : GType;
+function GTK_INPUT_DIALOG(obj: pointer) : PGtkInputDialog;
+function GTK_INPUT_DIALOG_CLASS(klass: pointer) : PGtkInputDialogClass;
+function GTK_IS_INPUT_DIALOG(obj: pointer) : boolean;
+function GTK_IS_INPUT_DIALOG_CLASS(klass: pointer) : boolean;
+function GTK_INPUT_DIALOG_GET_CLASS(obj: pointer) : PGtkInputDialogClass;
+
+
+function gtk_input_dialog_get_type:TGtkType; cdecl; external gtklib;
+function gtk_input_dialog_new:PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_INPUT_DIALOG : GType;
+begin
+ GTK_TYPE_INPUT_DIALOG:=gtk_input_dialog_get_type;
+end;
+
+function GTK_INPUT_DIALOG(obj: pointer) : PGtkInputDialog;
+begin
+ GTK_INPUT_DIALOG:=PGtkInputDialog(GTK_CHECK_CAST(obj,GTK_TYPE_INPUT_DIALOG));
+end;
+
+function GTK_INPUT_DIALOG_CLASS(klass: pointer) : PGtkInputDialogClass;
+begin
+ GTK_INPUT_DIALOG_CLASS:=PGtkInputDialogClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_INPUT_DIALOG));
+end;
+
+function GTK_IS_INPUT_DIALOG(obj: pointer) : boolean;
+begin
+ GTK_IS_INPUT_DIALOG:=GTK_CHECK_TYPE(obj,GTK_TYPE_INPUT_DIALOG);
+end;
+
+function GTK_IS_INPUT_DIALOG_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_INPUT_DIALOG_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_INPUT_DIALOG);
+end;
+
+function GTK_INPUT_DIALOG_GET_CLASS(obj: pointer) : PGtkInputDialogClass;
+begin
+ GTK_INPUT_DIALOG_GET_CLASS:=PGtkInputDialogClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_INPUT_DIALOG));
+end;
+{$ENDIF read_implementation}
+
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkintl.inc b/packages/gtk2/src/gtk+/gtk/gtkintl.inc
new file mode 100644
index 0000000000..57151097ab
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkintl.inc
@@ -0,0 +1,88 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{$ifndef __GTKINTL_H__}
+{$define __GTKINTL_H__}
+{$include "config.h"}
+{$ifdef ENABLE_NLS}
+{$include<libintl.inc}
+function _(_String : longint) : longint;
+
+{$ifdef gettext_noop}
+function N_(_String : longint) : longint;
+
+{$else}
+function N_(_String : longint) : longint;
+
+{$endif}
+{$else}
+{ NLS is disabled }
+function _(_String : longint) : longint;
+function N_(_String : longint) : longint;
+function textdomain(_String : longint) : longint;
+function gettext(_String : longint) : longint;
+function dgettext(Domain,_String : longint) : longint;
+function dcgettext(Domain,_String,_Type : longint) : longint;
+function bindtextdomain(Domain,Directory : longint) : longint;
+
+{$endif}
+{$endif}
+function _(_String : longint) : longint;
+begin
+ _:=dgettext(GETTEXT_PACKAGE,_String);
+end;
+
+function N_(_String : longint) : longint;
+begin
+ N_:=gettext_noop(_String);
+end;
+
+function N_(_String : longint) : longint;
+begin
+ N_:=_String;
+end;
+
+function _(_String : longint) : longint;
+begin
+ _:=_String;
+end;
+
+function N_(_String : longint) : longint;
+begin
+ N_:=_String;
+end;
+
+function textdomain(_String : longint) : longint;
+begin
+ textdomain:=_String;
+end;
+
+function gettext(_String : longint) : longint;
+begin
+ gettext:=_String;
+end;
+
+function dgettext(Domain,_String : longint) : longint;
+begin
+ dgettext:=_String;
+end;
+
+function dcgettext(Domain,_String,_Type : longint) : longint;
+begin
+ dcgettext:=_String;
+end;
+
+function bindtextdomain(Domain,Directory : longint) : longint;
+begin
+ bindtextdomain:=Domain;
+end;
+
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkinvisible.inc b/packages/gtk2/src/gtk+/gtk/gtkinvisible.inc
new file mode 100644
index 0000000000..8f5b0bb8fe
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkinvisible.inc
@@ -0,0 +1,81 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkInvisible = ^TGtkInvisible;
+ TGtkInvisible = record
+ widget : TGtkWidget;
+ has_user_ref_count : gboolean;
+ screen : PGdkScreen;
+ end;
+
+{ Padding for future expansion }
+ PGtkInvisibleClass = ^TGtkInvisibleClass;
+ TGtkInvisibleClass = record
+ parent_class : TGtkWidgetClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_INVISIBLE : GType;
+function GTK_INVISIBLE(obj: pointer) : PGtkInvisible;
+function GTK_INVISIBLE_CLASS(klass: pointer) : PGtkInvisibleClass;
+function GTK_IS_INVISIBLE(obj: pointer) : boolean;
+function GTK_IS_INVISIBLE_CLASS(klass: pointer) : boolean;
+function GTK_INVISIBLE_GET_CLASS(obj: pointer) : PGtkInvisibleClass;
+
+
+function gtk_invisible_get_type:TGtkType; cdecl; external gtklib;
+function gtk_invisible_new:PGtkWidget; cdecl; external gtklib;
+function gtk_invisible_new_for_screen(screen:PGdkScreen):PGtkWidget; cdecl; external gtklib;
+procedure gtk_invisible_set_screen(invisible:PGtkInvisible; screen:PGdkScreen); cdecl; external gtklib;
+function gtk_invisible_get_screen(invisible:PGtkInvisible):PGdkScreen; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_INVISIBLE : GType;
+begin
+ GTK_TYPE_INVISIBLE:=gtk_invisible_get_type;
+end;
+
+function GTK_INVISIBLE(obj: pointer) : PGtkInvisible;
+begin
+ GTK_INVISIBLE:=PGtkInvisible(GTK_CHECK_CAST(obj,GTK_TYPE_INVISIBLE));
+end;
+
+function GTK_INVISIBLE_CLASS(klass: pointer) : PGtkInvisibleClass;
+begin
+ GTK_INVISIBLE_CLASS:=PGtkInvisibleClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_INVISIBLE));
+end;
+
+function GTK_IS_INVISIBLE(obj: pointer) : boolean;
+begin
+ GTK_IS_INVISIBLE:=GTK_CHECK_TYPE(obj,GTK_TYPE_INVISIBLE);
+end;
+
+function GTK_IS_INVISIBLE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_INVISIBLE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_INVISIBLE);
+end;
+
+function GTK_INVISIBLE_GET_CLASS(obj: pointer) : PGtkInvisibleClass;
+begin
+ GTK_INVISIBLE_GET_CLASS:=PGtkInvisibleClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_INVISIBLE));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkitem.inc b/packages/gtk2/src/gtk+/gtk/gtkitem.inc
new file mode 100644
index 0000000000..48315c02a4
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkitem.inc
@@ -0,0 +1,81 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkItem = ^TGtkItem;
+ TGtkItem = record
+ bin : TGtkBin;
+ end;
+
+{ Padding for future expansion }
+ PGtkItemClass = ^TGtkItemClass;
+ TGtkItemClass = record
+ parent_class : TGtkBinClass;
+ select : procedure (item:PGtkItem); cdecl;
+ deselect : procedure (item:PGtkItem); cdecl;
+ toggle : procedure (item:PGtkItem); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_ITEM : GType;
+function GTK_ITEM(obj: pointer) : PGtkItem;
+function GTK_ITEM_CLASS(klass: pointer) : PGtkItemClass;
+function GTK_IS_ITEM(obj: pointer) : boolean;
+function GTK_IS_ITEM_CLASS(klass: pointer) : boolean;
+function GTK_ITEM_GET_CLASS(obj: pointer) : PGtkItemClass;
+
+
+function gtk_item_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_item_select(item:PGtkItem); cdecl; external gtklib;
+procedure gtk_item_deselect(item:PGtkItem); cdecl; external gtklib;
+procedure gtk_item_toggle(item:PGtkItem); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ITEM : GType;
+begin
+ GTK_TYPE_ITEM:=gtk_item_get_type;
+end;
+
+function GTK_ITEM(obj: pointer) : PGtkItem;
+begin
+ GTK_ITEM:=PGtkItem(GTK_CHECK_CAST(obj,GTK_TYPE_ITEM));
+end;
+
+function GTK_ITEM_CLASS(klass: pointer) : PGtkItemClass;
+begin
+ GTK_ITEM_CLASS:=PGtkItemClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_ITEM));
+end;
+
+function GTK_IS_ITEM(obj: pointer) : boolean;
+begin
+ GTK_IS_ITEM:=GTK_CHECK_TYPE(obj,GTK_TYPE_ITEM);
+end;
+
+function GTK_IS_ITEM_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ITEM_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_ITEM);
+end;
+
+function GTK_ITEM_GET_CLASS(obj: pointer) : PGtkItemClass;
+begin
+ GTK_ITEM_GET_CLASS:=PGtkItemClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_ITEM));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkitemfactory.inc b/packages/gtk2/src/gtk+/gtk/gtkitemfactory.inc
new file mode 100644
index 0000000000..5805b4f08a
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkitemfactory.inc
@@ -0,0 +1,180 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ TGtkPrintFunc = procedure (func_data:gpointer; str:Pgchar); cdecl;
+
+ PGtkTranslateFunc = ^TGtkTranslateFunc;
+ TGtkTranslateFunc = gchar;
+
+ TGtkItemFactoryCallback = procedure ; cdecl;
+
+ TGtkItemFactoryCallback1 = procedure (callback_data:gpointer; callback_action:guint; widget:PGtkWidget); cdecl;
+
+ PGtkItemFactory = ^TGtkItemFactory;
+ TGtkItemFactory = record
+ anObject : TGtkObject;
+ path : Pgchar;
+ accel_group : PGtkAccelGroup;
+ widget : PGtkWidget;
+ items : PGSList;
+ translate_func : TGtkTranslateFunc;
+ translate_data : gpointer;
+ translate_notify : TGtkDestroyNotify;
+ end;
+
+{ Padding for future expansion }
+ PGtkItemFactoryClass = ^TGtkItemFactoryClass;
+ TGtkItemFactoryClass = record
+ object_class : TGtkObjectClass;
+ item_ht : PGHashTable;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{ possible values:
+ NULL -> "<Item>"
+ "" -> "<Item>"
+ "<Title>" -> create a title item
+ "<Item>" -> create a simple item
+ "<ImageItem>" -> create an item holding an image
+ "<StockItem>" -> create an item holding a stock image
+ "<CheckItem>" -> create a check item
+ "<ToggleItem>" -> create a toggle item
+ "<RadioItem>" -> create a radio item
+ <path> -> path of a radio item to link against
+ "<Separator>" -> create a separator
+ "<Tearoff>" -> create a tearoff separator
+ "<Branch>" -> create an item to hold sub items
+ "<LastBranch>" -> create a right justified item to hold sub items
+ }
+{ Extra data for some item types:
+ ImageItem -> pointer to inlined pixbuf stream
+ StockItem -> name of stock item
+ }
+ PGtkItemFactoryEntry = ^TGtkItemFactoryEntry;
+ TGtkItemFactoryEntry = record
+ path : Pgchar;
+ accelerator : Pgchar;
+ callback : TGtkItemFactoryCallback;
+ callback_action : guint;
+ item_type : Pgchar;
+ extra_data : gconstpointer;
+ end;
+
+ PGtkItemFactoryItem = ^TGtkItemFactoryItem;
+ TGtkItemFactoryItem = record
+ path : Pgchar;
+ widgets : PGSList;
+ end;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+{ Compatibility functions for deprecated GtkMenuFactory code }
+ TGtkMenuCallback = procedure (widget:PGtkWidget; user_data:gpointer); cdecl;
+
+ PGtkMenuEntry = ^TGtkMenuEntry;
+ TGtkMenuEntry = record
+ path : Pgchar;
+ accelerator : Pgchar;
+ callback : TGtkMenuCallback;
+ callback_data : gpointer;
+ widget : PGtkWidget;
+ end;
+
+ TGtkItemFactoryCallback2 = procedure (widget:PGtkWidget; callback_data:gpointer; callback_action:guint); cdecl;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_ITEM_FACTORY : GType;
+function GTK_ITEM_FACTORY(anObject: pointer) : PGtkItemFactory;
+function GTK_ITEM_FACTORY_CLASS(klass: pointer) : PGtkItemFactoryClass;
+function GTK_IS_ITEM_FACTORY(anObject: pointer) : boolean;
+function GTK_IS_ITEM_FACTORY_CLASS(klass: pointer) : boolean;
+function GTK_ITEM_FACTORY_GET_CLASS(obj: pointer) : PGtkItemFactoryClass;
+
+
+function gtk_item_factory_get_type:TGtkType; cdecl; external gtklib;
+{ `container_type' must be of GTK_TYPE_MENU_BAR, GTK_TYPE_MENU,
+ or GTK_TYPE_OPTION_MENU.
+ }
+function gtk_item_factory_new(container_type:TGtkType; path:Pgchar; accel_group:PGtkAccelGroup):PGtkItemFactory; cdecl; external gtklib;
+procedure gtk_item_factory_construct(ifactory:PGtkItemFactory; container_type:TGtkType; path:Pgchar; accel_group:PGtkAccelGroup); cdecl; external gtklib;
+{ These functions operate on GtkItemFactoryClass basis.
+ }
+procedure gtk_item_factory_add_foreign(accel_widget:PGtkWidget; full_path:Pgchar; accel_group:PGtkAccelGroup; keyval:guint; modifiers:TGdkModifierType); cdecl; external gtklib;
+function gtk_item_factory_from_widget(widget:PGtkWidget):PGtkItemFactory; cdecl; external gtklib;
+function gtk_item_factory_path_from_widget(widget:PGtkWidget):Pgchar; cdecl; external gtklib;
+function gtk_item_factory_get_item(ifactory:PGtkItemFactory; path:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_item_factory_get_widget(ifactory:PGtkItemFactory; path:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_item_factory_get_widget_by_action(ifactory:PGtkItemFactory; action:guint):PGtkWidget; cdecl; external gtklib;
+function gtk_item_factory_get_item_by_action(ifactory:PGtkItemFactory; action:guint):PGtkWidget; cdecl; external gtklib;
+procedure gtk_item_factory_create_item(ifactory:PGtkItemFactory; entry:PGtkItemFactoryEntry; callback_data:gpointer; callback_type:guint); cdecl; external gtklib;
+procedure gtk_item_factory_create_items(ifactory:PGtkItemFactory; n_entries:guint; entries:PGtkItemFactoryEntry; callback_data:gpointer); cdecl; external gtklib;
+procedure gtk_item_factory_delete_item(ifactory:PGtkItemFactory; path:Pgchar); cdecl; external gtklib;
+procedure gtk_item_factory_delete_entry(ifactory:PGtkItemFactory; entry:PGtkItemFactoryEntry); cdecl; external gtklib;
+procedure gtk_item_factory_delete_entries(ifactory:PGtkItemFactory; n_entries:guint; entries:PGtkItemFactoryEntry); cdecl; external gtklib;
+procedure gtk_item_factory_popup(ifactory:PGtkItemFactory; x:guint; y:guint; mouse_button:guint; time:guint32); cdecl; external gtklib;
+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 gtklib;
+function gtk_item_factory_popup_data(ifactory:PGtkItemFactory):gpointer; cdecl; external gtklib;
+function gtk_item_factory_popup_data_from_widget(widget:PGtkWidget):gpointer; cdecl; external gtklib;
+procedure gtk_item_factory_set_translate_func(ifactory:PGtkItemFactory; func:TGtkTranslateFunc; data:gpointer; notify:TGtkDestroyNotify); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_item_factory_from_path(path:Pgchar):PGtkItemFactory; cdecl; external gtklib;
+procedure gtk_item_factory_create_menu_entries(n_entries:guint; entries:PGtkMenuEntry); cdecl; external gtklib;
+procedure gtk_item_factories_path_delete(ifactory_path:Pgchar; path:Pgchar); cdecl; external gtklib;
+
+procedure gtk_item_factory_create_items_ac(ifactory:PGtkItemFactory; n_entries:guint; entries:PGtkItemFactoryEntry; callback_data:gpointer; callback_type:guint); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_ITEM_FACTORY : GType;
+begin
+ GTK_TYPE_ITEM_FACTORY:=gtk_item_factory_get_type;
+end;
+
+function GTK_ITEM_FACTORY(anObject: pointer) : PGtkItemFactory;
+begin
+ GTK_ITEM_FACTORY:=PGtkItemFactory(GTK_CHECK_CAST(anObject,GTK_TYPE_ITEM_FACTORY));
+end;
+
+function GTK_ITEM_FACTORY_CLASS(klass: pointer) : PGtkItemFactoryClass;
+begin
+ GTK_ITEM_FACTORY_CLASS:=PGtkItemFactoryClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_ITEM_FACTORY));
+end;
+
+function GTK_IS_ITEM_FACTORY(anObject: pointer) : boolean;
+begin
+ GTK_IS_ITEM_FACTORY:=GTK_CHECK_TYPE(anObject,GTK_TYPE_ITEM_FACTORY);
+end;
+
+function GTK_IS_ITEM_FACTORY_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_ITEM_FACTORY_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_ITEM_FACTORY);
+end;
+
+function GTK_ITEM_FACTORY_GET_CLASS(obj: pointer) : PGtkItemFactoryClass;
+begin
+ GTK_ITEM_FACTORY_GET_CLASS:=PGtkItemFactoryClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_ITEM_FACTORY));
+end;
+{$ENDIF read_implementation}
+
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkkeyhash.inc b/packages/gtk2/src/gtk+/gtk/gtkkeyhash.inc
new file mode 100644
index 0000000000..0fb4fe559a
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkkeyhash.inc
@@ -0,0 +1,45 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ gtkkeyhash.h: Keymap aware matching of key bindings
+
+ GTK - The GIMP Toolkit
+ Copyright (C) 2002, Red Hat Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+ }
+{$ifndef __GTK_KEY_HASH_H__}
+{$define __GTK_KEY_HASH_H__}
+{$include <gdk/gdk.inc}
+type
+
+function _gtk_key_hash_new(keymap:PGdkKeymap; item_destroy_notify:TGDestroyNotify):PGtkKeyHash; cdecl; external gtklib;
+procedure _gtk_key_hash_add_entry(key_hash:PGtkKeyHash; keyval:guint; modifiers:TGdkModifierType; value:gpointer); cdecl; external gtklib;
+procedure _gtk_key_hash_remove_entry(key_hash:PGtkKeyHash; value:gpointer); cdecl; external gtklib;
+function _gtk_key_hash_lookup(key_hash:PGtkKeyHash; hardware_keycode:guint16; state:TGdkModifierType; group:gint):PGSList; cdecl; external gtklib;
+function _gtk_key_hash_lookup_keyval(key_hash:PGtkKeyHash; keyval:guint; modifiers:TGdkModifierType):PGSList; cdecl; external gtklib;
+procedure _gtk_key_hash_free(key_hash:PGtkKeyHash); cdecl; external gtklib;
+{$endif}
+{ __GTK_KEY_HASH_H__ }
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtklabel.inc b/packages/gtk2/src/gtk+/gtk/gtklabel.inc
new file mode 100644
index 0000000000..0c957e516a
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtklabel.inc
@@ -0,0 +1,203 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ PGtkLabel = ^TGtkLabel;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkLabelSelectionInfo = pointer;
+
+ TGtkLabel = record
+ misc : TGtkMisc;
+ _label : Pgchar;
+ flag0 : word;
+ mnemonic_keyval : guint;
+ text : Pgchar;
+ attrs : PPangoAttrList;
+ effective_attrs : PPangoAttrList;
+ layout : PPangoLayout;
+ mnemonic_widget : PGtkWidget;
+ mnemonic_window : PGtkWindow;
+ select_info : PGtkLabelSelectionInfo;
+ end;
+
+{ Hook to customize right-click popup for selectable labels }
+{ Padding for future expansion }
+ PGtkLabelClass = ^TGtkLabelClass;
+ TGtkLabelClass = record
+ parent_class : TGtkMiscClass;
+ move_cursor : procedure (_label:PGtkLabel; step:TGtkMovementStep; count:gint; extend_selection:gboolean); cdecl;
+ copy_clipboard : procedure (_label:PGtkLabel); cdecl;
+ populate_popup : procedure (_label:PGtkLabel; menu:PGtkMenu); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+const
+ bm_TGtkLabel_jtype = $3;
+ bp_TGtkLabel_jtype = 0;
+ bm_TGtkLabel_wrap = $4;
+ bp_TGtkLabel_wrap = 2;
+ bm_TGtkLabel_use_underline = $8;
+ bp_TGtkLabel_use_underline = 3;
+ bm_TGtkLabel_use_markup = $10;
+ bp_TGtkLabel_use_markup = 4;
+
+
+function GTK_TYPE_LABEL : GType;
+function GTK_LABEL(obj: pointer) : PGtkLabel;
+function GTK_LABEL_CLASS(klass: pointer) : PGtkLabelClass;
+function GTK_IS_LABEL(obj: pointer) : boolean;
+function GTK_IS_LABEL_CLASS(klass: pointer) : boolean;
+function GTK_LABEL_GET_CLASS(obj: pointer) : PGtkLabelClass;
+
+
+function jtype(var a : TGtkLabel) : guint;
+procedure set_jtype(var a : TGtkLabel; __jtype : guint);
+function wrap(var a : TGtkLabel) : guint; overload;
+procedure set_wrap(var a : TGtkLabel; __wrap : guint); overload;
+function use_underline(var a : TGtkLabel) : guint; overload;
+procedure set_use_underline(var a : TGtkLabel; __use_underline : guint); overload;
+function use_markup(var a : TGtkLabel) : guint;
+procedure set_use_markup(var a : TGtkLabel; __use_markup : guint);
+
+
+
+function gtk_label_get_type:TGtkType; cdecl; external gtklib;
+function gtk_label_new(str:Pchar):PGtkWidget; cdecl; external gtklib;
+function gtk_label_new_with_mnemonic(str:Pchar):PGtkWidget; cdecl; external gtklib;
+procedure gtk_label_set_text(_label:PGtkLabel; str:Pchar); cdecl; external gtklib;
+function gtk_label_get_text(_label:PGtkLabel):Pgchar; cdecl; external gtklib;
+procedure gtk_label_set_attributes(_label:PGtkLabel; attrs:PPangoAttrList); cdecl; external gtklib;
+function gtk_label_get_attributes(_label:PGtkLabel):PPangoAttrList; cdecl; external gtklib;
+procedure gtk_label_set_label(_label:PGtkLabel; str:Pgchar); cdecl; external gtklib;
+function gtk_label_get_label(_label:PGtkLabel):Pgchar; cdecl; external gtklib;
+procedure gtk_label_set_markup(_label:PGtkLabel; str:Pgchar); cdecl; external gtklib;
+procedure gtk_label_set_use_markup(_label:PGtkLabel; setting:gboolean); cdecl; external gtklib;
+function gtk_label_get_use_markup(_label:PGtkLabel):gboolean; cdecl; external gtklib;
+procedure gtk_label_set_use_underline(_label:PGtkLabel; setting:gboolean); cdecl; external gtklib;
+function gtk_label_get_use_underline(_label:PGtkLabel):gboolean; cdecl; external gtklib;
+procedure gtk_label_set_markup_with_mnemonic(_label:PGtkLabel; str:Pgchar); cdecl; external gtklib;
+function gtk_label_get_mnemonic_keyval(_label:PGtkLabel):guint; cdecl; external gtklib;
+procedure gtk_label_set_mnemonic_widget(_label:PGtkLabel; widget:PGtkWidget); cdecl; external gtklib;
+function gtk_label_get_mnemonic_widget(_label:PGtkLabel):PGtkWidget; cdecl; external gtklib;
+procedure gtk_label_set_text_with_mnemonic(_label:PGtkLabel; str:Pgchar); cdecl; external gtklib;
+procedure gtk_label_set_justify(_label:PGtkLabel; jtype:TGtkJustification); cdecl; external gtklib;
+function gtk_label_get_justify(_label:PGtkLabel):TGtkJustification; cdecl; external gtklib;
+procedure gtk_label_set_pattern(_label:PGtkLabel; pattern:Pgchar); cdecl; external gtklib;
+procedure gtk_label_set_line_wrap(_label:PGtkLabel; wrap:gboolean); cdecl; external gtklib;
+function gtk_label_get_line_wrap(_label:PGtkLabel):gboolean; cdecl; external gtklib;
+procedure gtk_label_set_selectable(_label:PGtkLabel; setting:gboolean); cdecl; external gtklib;
+function gtk_label_get_selectable(_label:PGtkLabel):gboolean; cdecl; external gtklib;
+procedure gtk_label_select_region(_label:PGtkLabel; start_offset:gint; end_offset:gint); cdecl; external gtklib;
+function gtk_label_get_selection_bounds(_label:PGtkLabel; start:Pgint; theEnd:Pgint):gboolean; cdecl; external gtklib;
+function gtk_label_get_layout(_label:PGtkLabel):PPangoLayout; cdecl; external gtklib;
+procedure gtk_label_get_layout_offsets(_label:PGtkLabel; x:Pgint; y:Pgint); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_label_set(_label:PGtkLabel; str:Pchar);
+
+procedure gtk_label_get(_label:PGtkLabel; str:PPchar); cdecl; external gtklib;
+{ Convenience function to set the name and pattern by parsing
+ a string with embedded underscores, and return the appropriate
+ key symbol for the accelerator.
+ }
+function gtk_label_parse_uline(_label:PGtkLabel; _string:Pgchar):guint; cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_LABEL : GType;
+begin
+ GTK_TYPE_LABEL:=gtk_label_get_type;
+end;
+
+function GTK_LABEL(obj: pointer) : PGtkLabel;
+begin
+ GTK_LABEL:=PGtkLabel(GTK_CHECK_CAST(obj,GTK_TYPE_LABEL));
+end;
+
+function GTK_LABEL_CLASS(klass: pointer) : PGtkLabelClass;
+begin
+ GTK_LABEL_CLASS:=PGtkLabelClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_LABEL));
+end;
+
+function GTK_IS_LABEL(obj: pointer) : boolean;
+begin
+ GTK_IS_LABEL:=GTK_CHECK_TYPE(obj,GTK_TYPE_LABEL);
+end;
+
+function GTK_IS_LABEL_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_LABEL_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_LABEL);
+end;
+
+function GTK_LABEL_GET_CLASS(obj: pointer) : PGtkLabelClass;
+begin
+ GTK_LABEL_GET_CLASS:=PGtkLabelClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_LABEL));
+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 wrap(var a : TGtkLabel) : guint;
+begin
+ wrap:=(a.flag0 and bm_TGtkLabel_wrap) shr bp_TGtkLabel_wrap;
+end;
+
+procedure set_wrap(var a : TGtkLabel; __wrap : guint);
+begin
+ a.flag0:=a.flag0 or ((__wrap shl bp_TGtkLabel_wrap) and bm_TGtkLabel_wrap);
+end;
+
+function use_underline(var a : TGtkLabel) : guint;
+begin
+ use_underline:=(a.flag0 and bm_TGtkLabel_use_underline) shr bp_TGtkLabel_use_underline;
+end;
+
+procedure set_use_underline(var a : TGtkLabel; __use_underline : guint);
+begin
+ a.flag0:=a.flag0 or ((__use_underline shl bp_TGtkLabel_use_underline) and bm_TGtkLabel_use_underline);
+end;
+
+function use_markup(var a : TGtkLabel) : guint;
+begin
+ use_markup:=(a.flag0 and bm_TGtkLabel_use_markup) shr bp_TGtkLabel_use_markup;
+end;
+
+procedure set_use_markup(var a : TGtkLabel; __use_markup : guint);
+begin
+ a.flag0:=a.flag0 or ((__use_markup shl bp_TGtkLabel_use_markup) and bm_TGtkLabel_use_markup);
+end;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_label_set(_label:PGtkLabel; str:Pchar);
+begin
+ gtk_label_set_text(_label,str);
+end;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtklayout.inc b/packages/gtk2/src/gtk+/gtk/gtklayout.inc
new file mode 100644
index 0000000000..17f3e28d0f
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtklayout.inc
@@ -0,0 +1,112 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{< public > }
+{< private > }
+ PGtkLayout = ^TGtkLayout;
+ TGtkLayout = record
+ container : TGtkContainer;
+ children : PGList;
+ width : guint;
+ height : guint;
+ hadjustment : PGtkAdjustment;
+ vadjustment : PGtkAdjustment;
+ bin_window : PGdkWindow;
+ visibility : TGdkVisibilityState;
+ scroll_x : gint;
+ scroll_y : gint;
+ freeze_count : guint;
+ end;
+
+{ Padding for future expansion }
+ PGtkLayoutClass = ^TGtkLayoutClass;
+ TGtkLayoutClass = record
+ parent_class : TGtkContainerClass;
+ set_scroll_adjustments : procedure (layout:PGtkLayout; hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_LAYOUT : GType;
+function GTK_LAYOUT(obj: pointer) : PGtkLayout;
+function GTK_LAYOUT_CLASS(klass: pointer) : PGtkLayoutClass;
+function GTK_IS_LAYOUT(obj: pointer) : boolean;
+function GTK_IS_LAYOUT_CLASS(klass: pointer) : boolean;
+function GTK_LAYOUT_GET_CLASS(obj: pointer) : PGtkLayoutClass;
+
+
+function gtk_layout_get_type:TGtkType; cdecl; external gtklib;
+function gtk_layout_new(hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment):PGtkWidget; cdecl; external gtklib;
+procedure gtk_layout_put(layout:PGtkLayout; child_widget:PGtkWidget; x:gint; y:gint); cdecl; external gtklib;
+procedure gtk_layout_move(layout:PGtkLayout; child_widget:PGtkWidget; x:gint; y:gint); cdecl; external gtklib;
+procedure gtk_layout_set_size(layout:PGtkLayout; width:guint; height:guint); cdecl; external gtklib;
+procedure gtk_layout_get_size(layout:PGtkLayout; width:Pguint; height:Pguint); cdecl; external gtklib;
+function gtk_layout_get_hadjustment(layout:PGtkLayout):PGtkAdjustment; cdecl; external gtklib;
+function gtk_layout_get_vadjustment(layout:PGtkLayout):PGtkAdjustment; cdecl; external gtklib;
+procedure gtk_layout_set_hadjustment(layout:PGtkLayout; adjustment:PGtkAdjustment); cdecl; external gtklib;
+procedure gtk_layout_set_vadjustment(layout:PGtkLayout; adjustment:PGtkAdjustment); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+{ These disable and enable moving and repainting the scrolling window
+ of the GtkLayout, respectively. If you want to update the layout's
+ offsets but do not want it to repaint itself, you should use these
+ functions.
+
+ - I don't understand these are supposed to work, so I suspect
+ - they don't now. OWT 1/20/98
+ }
+
+procedure gtk_layout_freeze(layout:PGtkLayout); cdecl; external gtklib;
+procedure gtk_layout_thaw(layout:PGtkLayout); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_LAYOUT : GType;
+begin
+ GTK_TYPE_LAYOUT:=gtk_layout_get_type;
+end;
+
+function GTK_LAYOUT(obj: pointer) : PGtkLayout;
+begin
+ GTK_LAYOUT:=PGtkLayout(GTK_CHECK_CAST(obj,GTK_TYPE_LAYOUT));
+end;
+
+function GTK_LAYOUT_CLASS(klass: pointer) : PGtkLayoutClass;
+begin
+ GTK_LAYOUT_CLASS:=PGtkLayoutClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_LAYOUT));
+end;
+
+function GTK_IS_LAYOUT(obj: pointer) : boolean;
+begin
+ GTK_IS_LAYOUT:=GTK_CHECK_TYPE(obj,GTK_TYPE_LAYOUT);
+end;
+
+function GTK_IS_LAYOUT_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_LAYOUT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_LAYOUT);
+end;
+
+function GTK_LAYOUT_GET_CLASS(obj: pointer) : PGtkLayoutClass;
+begin
+ GTK_LAYOUT_GET_CLASS:=PGtkLayoutClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_LAYOUT));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtklist.inc b/packages/gtk2/src/gtk+/gtk/gtklist.inc
new file mode 100644
index 0000000000..04a1fef4e1
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtklist.inc
@@ -0,0 +1,157 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ 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;
+
+
+ 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;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+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 GTK_TYPE_LIST : GType;
+function GTK_LIST(obj: pointer) : PGtkList;
+function GTK_LIST_CLASS(klass: pointer) : PGtkListClass;
+function GTK_IS_LIST(obj: pointer) : boolean;
+function GTK_IS_LIST_CLASS(klass: pointer) : boolean;
+function GTK_LIST_GET_CLASS(obj: pointer) : PGtkListClass;
+
+
+function selection_mode(var a : TGtkList) : guint; overload;
+procedure set_selection_mode(var a : TGtkList; __selection_mode : guint); overload;
+function drag_selection(var a : TGtkList) : guint;
+procedure set_drag_selection(var a : TGtkList; __drag_selection : guint);
+function add_mode(var a : TGtkList) : guint;
+procedure set_add_mode(var a : TGtkList; __add_mode : guint);
+
+function gtk_list_get_type:TGtkType; cdecl; external gtklib;
+function gtk_list_new:PGtkWidget; cdecl; external gtklib;
+procedure gtk_list_insert_items(list:PGtkList; items:PGList; position:gint); cdecl; external gtklib;
+procedure gtk_list_append_items(list:PGtkList; items:PGList); cdecl; external gtklib;
+procedure gtk_list_prepend_items(list:PGtkList; items:PGList); cdecl; external gtklib;
+procedure gtk_list_remove_items(list:PGtkList; items:PGList); cdecl; external gtklib;
+procedure gtk_list_remove_items_no_unref(list:PGtkList; items:PGList); cdecl; external gtklib;
+procedure gtk_list_clear_items(list:PGtkList; start:gint; theEnd:gint); cdecl; external gtklib;
+procedure gtk_list_select_item(list:PGtkList; item:gint); cdecl; external gtklib;
+procedure gtk_list_unselect_item(list:PGtkList; item:gint); cdecl; external gtklib;
+procedure gtk_list_select_child(list:PGtkList; child:PGtkWidget); cdecl; external gtklib;
+procedure gtk_list_unselect_child(list:PGtkList; child:PGtkWidget); cdecl; external gtklib;
+function gtk_list_child_position(list:PGtkList; child:PGtkWidget):gint; cdecl; external gtklib;
+procedure gtk_list_set_selection_mode(list:PGtkList; mode:TGtkSelectionMode); cdecl; external gtklib;
+procedure gtk_list_extend_selection(list:PGtkList; scroll_type:TGtkScrollType; position:gfloat; auto_start_selection:gboolean); cdecl; external gtklib;
+procedure gtk_list_start_selection(list:PGtkList); cdecl; external gtklib;
+procedure gtk_list_end_selection(list:PGtkList); cdecl; external gtklib;
+procedure gtk_list_select_all(list:PGtkList); cdecl; external gtklib;
+procedure gtk_list_unselect_all(list:PGtkList); cdecl; external gtklib;
+procedure gtk_list_scroll_horizontal(list:PGtkList; scroll_type:TGtkScrollType; position:gfloat); cdecl; external gtklib;
+procedure gtk_list_scroll_vertical(list:PGtkList; scroll_type:TGtkScrollType; position:gfloat); cdecl; external gtklib;
+procedure gtk_list_toggle_add_mode(list:PGtkList); cdecl; external gtklib;
+procedure gtk_list_toggle_focus_row(list:PGtkList); cdecl; external gtklib;
+procedure gtk_list_toggle_row(list:PGtkList; item:PGtkWidget); cdecl; external gtklib;
+procedure gtk_list_undo_selection(list:PGtkList); cdecl; external gtklib;
+procedure gtk_list_end_drag_selection(list:PGtkList); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_LIST : GType;
+begin
+ GTK_TYPE_LIST:=gtk_list_get_type;
+end;
+
+function GTK_LIST(obj: pointer) : PGtkList;
+begin
+ GTK_LIST:=PGtkList(GTK_CHECK_CAST(obj,GTK_TYPE_LIST));
+end;
+
+function GTK_LIST_CLASS(klass: pointer) : PGtkListClass;
+begin
+ GTK_LIST_CLASS:=PGtkListClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_LIST));
+end;
+
+function GTK_IS_LIST(obj: pointer) : boolean;
+begin
+ GTK_IS_LIST:=GTK_CHECK_TYPE(obj,GTK_TYPE_LIST);
+end;
+
+function GTK_IS_LIST_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_LIST_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_LIST);
+end;
+
+function GTK_LIST_GET_CLASS(obj: pointer) : PGtkListClass;
+begin
+ GTK_LIST_GET_CLASS:=PGtkListClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_LIST));
+end;
+
+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;
+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);
+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;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtklistitem.inc b/packages/gtk2/src/gtk+/gtk/gtklistitem.inc
new file mode 100644
index 0000000000..19e5c6bc71
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtklistitem.inc
@@ -0,0 +1,89 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{$ifndef GTK_DISABLE_DEPRECATED}
+ 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;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{$ifndef GTK_DISABLE_DEPRECATED}
+function GTK_TYPE_LIST_ITEM : GType;
+function GTK_LIST_ITEM(obj: pointer) : PGtkListItem;
+function GTK_LIST_ITEM_CLASS(klass: pointer) : PGtkListItemClass;
+function GTK_IS_LIST_ITEM(obj: pointer) : boolean;
+function GTK_IS_LIST_ITEM_CLASS(klass: pointer) : boolean;
+function GTK_LIST_ITEM_GET_CLASS(obj: pointer) : PGtkListItemClass;
+
+function gtk_list_item_get_type:TGtkType; cdecl; external gtklib;
+function gtk_list_item_new:PGtkWidget; cdecl; external gtklib;
+function gtk_list_item_new_with_label(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+procedure gtk_list_item_select(list_item:PGtkListItem); cdecl; external gtklib;
+procedure gtk_list_item_deselect(list_item:PGtkListItem); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_LIST_ITEM : GType;
+begin
+ GTK_TYPE_LIST_ITEM:=gtk_list_item_get_type;
+end;
+
+function GTK_LIST_ITEM(obj: pointer) : PGtkListItem;
+begin
+ GTK_LIST_ITEM:=PGtkListItem(GTK_CHECK_CAST(obj,GTK_TYPE_LIST_ITEM));
+end;
+
+function GTK_LIST_ITEM_CLASS(klass: pointer) : PGtkListItemClass;
+begin
+ GTK_LIST_ITEM_CLASS:=PGtkListItemClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_LIST_ITEM));
+end;
+
+function GTK_IS_LIST_ITEM(obj: pointer) : boolean;
+begin
+ GTK_IS_LIST_ITEM:=GTK_CHECK_TYPE(obj,GTK_TYPE_LIST_ITEM);
+end;
+
+function GTK_IS_LIST_ITEM_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_LIST_ITEM_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_LIST_ITEM);
+end;
+
+function GTK_LIST_ITEM_GET_CLASS(obj: pointer) : PGtkListItemClass;
+begin
+ GTK_LIST_ITEM_GET_CLASS:=PGtkListItemClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_LIST_ITEM));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkliststore.inc b/packages/gtk2/src/gtk+/gtk/gtkliststore.inc
new file mode 100644
index 0000000000..121c9bd67c
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkliststore.inc
@@ -0,0 +1,129 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{< private > }
+ PGtkListStore = ^TGtkListStore;
+ TGtkListStore = record
+ parent : TGObject;
+ stamp : gint;
+ root : gpointer;
+ tail : gpointer;
+ sort_list : PGList;
+ n_columns : gint;
+ sort_column_id : gint;
+ order : TGtkSortType;
+ column_headers : PGType;
+ length : gint;
+ default_sort_func : TGtkTreeIterCompareFunc;
+ default_sort_data : gpointer;
+ default_sort_destroy : TGtkDestroyNotify;
+ flag0 : word;
+ end;
+
+
+{ Padding for future expansion }
+ PGtkListStoreClass = ^TGtkListStoreClass;
+ TGtkListStoreClass = record
+ parent_class : TGObjectClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkListStore_columns_dirty = $1;
+ bp_TGtkListStore_columns_dirty = 0;
+function GTK_TYPE_LIST_STORE : GType;
+function GTK_LIST_STORE(obj: pointer) : PGtkListStore;
+function GTK_LIST_STORE_CLASS(klass: pointer) : PGtkListStoreClass;
+function GTK_IS_LIST_STORE(obj: pointer) : boolean;
+function GTK_IS_LIST_STORE_CLASS(klass: pointer) : boolean;
+function GTK_LIST_STORE_GET_CLASS(obj: pointer) : PGtkListStoreClass;
+
+
+function columns_dirty(var a : TGtkListStore) : guint; overload;
+procedure set_columns_dirty(var a : TGtkListStore; __columns_dirty : guint); overload;
+function gtk_list_store_get_type:TGtkType; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+function gtk_list_store_new(n_columns:gint; args:array of const):PGtkListStore; cdecl; overload; external gtklib;
+function gtk_list_store_new(n_columns:gint):PGtkListStore; cdecl; overload; varargs; external gtklib;
+{$ELSE}
+function gtk_list_store_new(n_columns:gint):PGtkListStore; varargs; cdecl; external gtklib;
+{$ENDIF}
+function gtk_list_store_newv(n_columns:gint; types:PGType):PGtkListStore; cdecl; external gtklib;
+procedure gtk_list_store_set_column_types(list_store:PGtkListStore; n_columns:gint; types:PGType); cdecl; external gtklib;
+{ NOTE: use gtk_tree_model_get to get values from a GtkListStore }
+procedure gtk_list_store_set_value(list_store:PGtkListStore; iter:PGtkTreeIter; column:gint; value:PGValue); cdecl; external gtklib;
+{$IFNDEF KYLIX}
+procedure gtk_list_store_set(list_store:PGtkListStore; iter:PGtkTreeIter; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_list_store_set(list_store:PGtkListStore; iter:PGtkTreeIter); cdecl; overload; varargs; external gtklib;
+procedure gtk_list_store_set_valist(list_store:PGtkListStore; iter:PGtkTreeIter; var_args:array of const); cdecl; external gtklib;
+{$ELSE}
+procedure gtk_list_store_set(list_store:PGtkListStore; iter:PGtkTreeIter); varargs; cdecl; external gtklib;
+procedure gtk_list_store_set_valist(list_store:PGtkListStore; iter:PGtkTreeIter); varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_list_store_remove(list_store:PGtkListStore; iter:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_list_store_insert(list_store:PGtkListStore; iter:PGtkTreeIter; position:gint); cdecl; external gtklib;
+procedure gtk_list_store_insert_before(list_store:PGtkListStore; iter:PGtkTreeIter; sibling:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_list_store_insert_after(list_store:PGtkListStore; iter:PGtkTreeIter; sibling:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_list_store_prepend(list_store:PGtkListStore; iter:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_list_store_append(list_store:PGtkListStore; iter:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_list_store_clear(list_store:PGtkListStore); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_LIST_STORE : GType;
+begin
+ GTK_TYPE_LIST_STORE:=gtk_list_store_get_type;
+end;
+
+function GTK_LIST_STORE(obj: pointer) : PGtkListStore;
+begin
+ GTK_LIST_STORE:=PGtkListStore(GTK_CHECK_CAST(obj,GTK_TYPE_LIST_STORE));
+end;
+
+function GTK_LIST_STORE_CLASS(klass: pointer) : PGtkListStoreClass;
+begin
+ GTK_LIST_STORE_CLASS:=PGtkListStoreClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_LIST_STORE));
+end;
+
+function GTK_IS_LIST_STORE(obj: pointer) : boolean;
+begin
+ GTK_IS_LIST_STORE:=GTK_CHECK_TYPE(obj,GTK_TYPE_LIST_STORE);
+end;
+
+function GTK_IS_LIST_STORE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_LIST_STORE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_LIST_STORE);
+end;
+
+function GTK_LIST_STORE_GET_CLASS(obj: pointer) : PGtkListStoreClass;
+begin
+ GTK_LIST_STORE_GET_CLASS:=PGtkListStoreClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_LIST_STORE));
+end;
+
+function columns_dirty(var a : TGtkListStore) : guint;
+begin
+ columns_dirty:=(a.flag0 and bm_TGtkListStore_columns_dirty) shr bp_TGtkListStore_columns_dirty;
+end;
+
+procedure set_columns_dirty(var a : TGtkListStore; __columns_dirty : guint);
+begin
+ a.flag0:=a.flag0 or ((__columns_dirty shl bp_TGtkListStore_columns_dirty) and bm_TGtkListStore_columns_dirty);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkmain.inc b/packages/gtk2/src/gtk+/gtk/gtkmain.inc
new file mode 100644
index 0000000000..cac332e317
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkmain.inc
@@ -0,0 +1,142 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ GTK_DISABLE_DEPRECATED }
+ TGtkModuleInitFunc = procedure (argc:Pgint; argv:PPPgchar); cdecl;
+
+ TGtkKeySnoopFunc = function (grab_widget:PGtkWidget; event:PGdkEventKey; func_data:gpointer):gint; cdecl;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{ Priorities for redrawing and resizing }
+
+const
+ GTK_PRIORITY_RESIZE = G_PRIORITY_HIGH_IDLE + 10;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+{ Use GDK_PRIORITY_REDRAW }
+const
+ GTK_PRIORITY_REDRAW = G_PRIORITY_HIGH_IDLE + 20;
+{ Deprecated. Use G_PRIORITY #define's instead
+ }
+ 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;
+{$endif}
+
+{$IFNDEF KYLIX}
+{ Gtk version. }
+var
+ {$IFDEF WIN32}
+ gtk_major_version : guint;external gtklib name 'gtk_major_version';
+ gtk_minor_version : guint;external gtklib name 'gtk_minor_version';
+ gtk_micro_version : guint;external gtklib name 'gtk_micro_version';
+ gtk_binary_age : guint;external gtklib name 'gtk_binary_age';
+ gtk_interface_age : guint;external gtklib name 'gtk_interface_type';
+ {$ELSE}
+ gtk_major_version : guint;cvar;external;
+ gtk_minor_version : guint;cvar;external;
+ gtk_micro_version : guint;cvar;external;
+ gtk_binary_age : guint;cvar;external;
+ gtk_interface_age : guint;cvar;external;
+ {$ENDIF}
+{$ENDIF}
+
+function gtk_check_version(required_major:guint; required_minor:guint; required_micro:guint):Pgchar; cdecl; external gtklib;
+
+{$ifndef G_PLATFORM_WIN32}
+{ Initialization, exit, mainloop and miscellaneous routines }
+procedure gtk_init(argc:Plongint; argv:PPPchar); cdecl; external gtklib;
+function gtk_init_check(argc:Plongint; argv:PPPchar):gboolean; cdecl; external gtklib;
+{$else}
+{ Variants that are used to check for correct struct packing
+ when building GTK+-using code. }
+procedure gtk_init_abi_check(argc:Plongint; argv:PPPchar; num_checks:longint; sizeof_GtkWindow:Tsize_t; sizeof_GtkBox:Tsize_t); cdecl; external gtklib;
+function gtk_init_check_abi_check(argc:Plongint; argv:PPPchar; num_checks:longint; sizeof_GtkWindow:Tsize_t; sizeof_GtkBox:Tsize_t):gboolean; cdecl; external gtklib;
+procedure gtk_init(argc: Plongint; argv : PPPchar);
+function gtk_init_check(argc: Plongint; argv : PPPchar) : gboolean;
+{$endif G_PLATFORM_WIN32}
+
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_exit(error_code:gint); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+procedure gtk_disable_setlocale; cdecl; external gtklib;
+function gtk_set_locale:Pgchar; cdecl; external gtklib;
+function gtk_get_default_language:PPangoLanguage; cdecl; external gtklib;
+function gtk_events_pending:gint; cdecl; external gtklib;
+{ The following is the event func GTK+ registers with GDK
+ we expose it mainly to allow filtering of events between
+ GDK and GTK+.
+ }
+procedure gtk_main_do_event(event:PGdkEvent); cdecl; external gtklib;
+procedure gtk_main; cdecl; external gtklib;
+function gtk_main_level:guint; cdecl; external gtklib;
+procedure gtk_main_quit; cdecl; external gtklib;
+function gtk_main_iteration:gboolean; cdecl; external gtklib;
+{ gtk_main_iteration() calls gtk_main_iteration_do(TRUE) }
+function gtk_main_iteration_do(blocking:gboolean):gboolean; cdecl; external gtklib;
+function gtk_true:gboolean; cdecl; external gtklib;
+function gtk_false:gboolean; cdecl; external gtklib;
+procedure gtk_grab_add(widget:PGtkWidget); cdecl; external gtklib;
+function gtk_grab_get_current:PGtkWidget; cdecl; external gtklib;
+procedure gtk_grab_remove(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_init_add(_function:TGtkFunction; data:gpointer); cdecl; external gtklib;
+procedure gtk_quit_add_destroy(main_level:guint; anObject:PGtkObject); cdecl; external gtklib;
+function gtk_quit_add(main_level:guint; _function:TGtkFunction; data:gpointer):guint; cdecl; external gtklib;
+function gtk_quit_add_full(main_level:guint; _function:TGtkFunction; marshal:TGtkCallbackMarshal; data:gpointer; destroy:TGtkDestroyNotify):guint; cdecl; external gtklib;
+procedure gtk_quit_remove(quit_handler_id:guint); cdecl; external gtklib;
+procedure gtk_quit_remove_by_data(data:gpointer); cdecl; external gtklib;
+function gtk_timeout_add(interval:guint32; _function:TGtkFunction; data:gpointer):guint; cdecl; external gtklib;
+function gtk_timeout_add_full(interval:guint32; _function:TGtkFunction; marshal:TGtkCallbackMarshal; data:gpointer; destroy:TGtkDestroyNotify):guint; cdecl; external gtklib;
+procedure gtk_timeout_remove(timeout_handler_id:guint); cdecl; external gtklib;
+function gtk_idle_add(_function:TGtkFunction; data:gpointer):guint; cdecl; external gtklib;
+function gtk_idle_add_priority(priority:gint; _function:TGtkFunction; data:gpointer):guint; cdecl; external gtklib;
+function gtk_idle_add_full(priority:gint; _function:TGtkFunction; marshal:TGtkCallbackMarshal; data:gpointer; destroy:TGtkDestroyNotify):guint; cdecl; external gtklib;
+procedure gtk_idle_remove(idle_handler_id:guint); cdecl; external gtklib;
+procedure gtk_idle_remove_by_data(data:gpointer); cdecl; external gtklib;
+function gtk_input_add_full(source:gint; condition:TGdkInputCondition; _function:TGdkInputFunction; marshal:TGtkCallbackMarshal; data:gpointer;
+ destroy:TGtkDestroyNotify):guint; cdecl; external gtklib;
+procedure gtk_input_remove(input_handler_id:guint); cdecl; external gtklib;
+function gtk_key_snooper_install(snooper:TGtkKeySnoopFunc; func_data:gpointer):guint; cdecl; external gtklib;
+procedure gtk_key_snooper_remove(snooper_handler_id:guint); cdecl; external gtklib;
+function gtk_get_current_event:PGdkEvent; cdecl; external gtklib;
+function gtk_get_current_event_time:guint32; cdecl; external gtklib;
+function gtk_get_current_event_state(state:PGdkModifierType):gboolean; cdecl; external gtklib;
+function gtk_get_event_widget(event:PGdkEvent):PGtkWidget; cdecl; external gtklib;
+
+{ Private routines internal to GTK+ }
+procedure gtk_propagate_event(widget:PGtkWidget; event:PGdkEvent); cdecl; external gtklib;
+function _gtk_boolean_handled_accumulator(ihint:PGSignalInvocationHint; return_accu:PGValue; handler_return:PGValue; dummy:gpointer):gboolean; cdecl; external gtklib;
+function _gtk_find_module(name:Pgchar; _type:Pgchar):Pgchar; cdecl; external gtklib;
+function _gtk_get_module_path(_type:Pgchar):PPgchar; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+{$ifdef G_PLATFORM_WIN32}
+procedure gtk_init(argc: Plongint; argv : PPPchar);
+begin
+ gtk_init_abi_check(argc,argv,2,sizeof(TGtkWindow),sizeof(TGtkBox));
+end;
+
+function gtk_init_check(argc: Plongint; argv : PPPchar) : gboolean;
+begin
+ gtk_init_check:=gtk_init_check_abi_check(argc,argv,2,sizeof(TGtkWindow),sizeof(TGtkBox));
+end;
+{$endif G_PLATFORM_WIN32}
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkmenu.inc b/packages/gtk2/src/gtk+/gtk/gtkmenu.inc
new file mode 100644
index 0000000000..0b2239b8bf
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkmenu.inc
@@ -0,0 +1,290 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ PGtkMenu = ^TGtkMenu;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ TGtkMenuPositionFunc = procedure (menu:PGtkMenu; x:Pgint; y:Pgint; push_in:Pgboolean; user_data:gpointer); cdecl;
+
+ TGtkMenuDetachFunc = procedure (attach_widget:PGtkWidget; menu:PGtkMenu); cdecl;
+{ Do _not_ touch these widgets directly. We hide the reference
+ count from the toplevel to the menu, so it must be restored
+ before operating on these widgets
+ }
+{ When a submenu of this menu is popped up, motion in this
+ region is ignored
+ }
+{ The tearoff is active when it is torn off and the not-torn-off
+ menu is not popped up.
+ }
+ TGtkMenu = record
+ menu_shell : TGtkMenuShell;
+ parent_menu_item : PGtkWidget;
+ old_active_menu_item : PGtkWidget;
+ accel_group : PGtkAccelGroup;
+ accel_path : Pgchar;
+ position_func : TGtkMenuPositionFunc;
+ position_func_data : gpointer;
+ toggle_size : guint;
+ toplevel : PGtkWidget;
+ tearoff_window : PGtkWidget;
+ tearoff_hbox : PGtkWidget;
+ tearoff_scrollbar : PGtkWidget;
+ tearoff_adjustment : PGtkAdjustment;
+ view_window : PGdkWindow;
+ bin_window : PGdkWindow;
+ scroll_offset : gint;
+ saved_scroll_offset : gint;
+ scroll_step : gint;
+ timeout_id : guint;
+ navigation_region : PGdkRegion;
+ navigation_timeout : guint;
+ flag0 : word;
+ end;
+
+
+{ Padding for future expansion }
+ PGtkMenuClass = ^TGtkMenuClass;
+ TGtkMenuClass = record
+ parent_class : TGtkMenuShellClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkMenu_needs_destruction_ref_count = $1;
+ bp_TGtkMenu_needs_destruction_ref_count = 0;
+ bm_TGtkMenu_torn_off = $2;
+ bp_TGtkMenu_torn_off = 1;
+ bm_TGtkMenu_tearoff_active = $4;
+ bp_TGtkMenu_tearoff_active = 2;
+ bm_TGtkMenu_scroll_fast = $8;
+ bp_TGtkMenu_scroll_fast = 3;
+ bm_TGtkMenu_upper_arrow_visible = $10;
+ bp_TGtkMenu_upper_arrow_visible = 4;
+ bm_TGtkMenu_lower_arrow_visible = $20;
+ bp_TGtkMenu_lower_arrow_visible = 5;
+ bm_TGtkMenu_upper_arrow_prelight = $40;
+ bp_TGtkMenu_upper_arrow_prelight = 6;
+ bm_TGtkMenu_lower_arrow_prelight = $80;
+ bp_TGtkMenu_lower_arrow_prelight = 7;
+
+
+function GTK_TYPE_MENU : GType;
+function GTK_MENU(obj: pointer) : PGtkMenu;
+function GTK_MENU_CLASS(klass: pointer) : PGtkMenuClass;
+function GTK_IS_MENU(obj: pointer) : boolean;
+function GTK_IS_MENU_CLASS(klass: pointer) : boolean;
+function GTK_MENU_GET_CLASS(obj: pointer) : PGtkMenuClass;
+
+
+function needs_destruction_ref_count(var a : TGtkMenu) : guint;
+procedure set_needs_destruction_ref_count(var a : TGtkMenu; __needs_destruction_ref_count : guint);
+function torn_off(var a : TGtkMenu) : guint; overload;
+procedure set_torn_off(var a : TGtkMenu; __torn_off : guint); overload;
+function tearoff_active(var a : TGtkMenu) : guint;
+procedure set_tearoff_active(var a : TGtkMenu; __tearoff_active : guint);
+function scroll_fast(var a : TGtkMenu) : guint;
+procedure set_scroll_fast(var a : TGtkMenu; __scroll_fast : guint);
+function upper_arrow_visible(var a : TGtkMenu) : guint;
+procedure set_upper_arrow_visible(var a : TGtkMenu; __upper_arrow_visible : guint);
+function lower_arrow_visible(var a : TGtkMenu) : guint;
+procedure set_lower_arrow_visible(var a : TGtkMenu; __lower_arrow_visible : guint);
+function upper_arrow_prelight(var a : TGtkMenu) : guint;
+procedure set_upper_arrow_prelight(var a : TGtkMenu; __upper_arrow_prelight : guint);
+function lower_arrow_prelight(var a : TGtkMenu) : guint;
+procedure set_lower_arrow_prelight(var a : TGtkMenu; __lower_arrow_prelight : guint);
+
+function gtk_menu_get_type:TGtkType; cdecl; external gtklib;
+function gtk_menu_new:PGtkWidget; cdecl; external gtklib;
+{ Display the menu onscreen }
+procedure gtk_menu_popup(menu:PGtkMenu; parent_menu_shell:PGtkWidget; parent_menu_item:PGtkWidget; func:TGtkMenuPositionFunc; data:gpointer;
+ button:guint; activate_time:guint32); cdecl; external gtklib;
+{ Position the menu according to its position function. Called
+ from gtkmenuitem.c when a menu-item changes its allocation
+ }
+procedure gtk_menu_reposition(menu:PGtkMenu); cdecl; external gtklib;
+procedure gtk_menu_popdown(menu:PGtkMenu); cdecl; external gtklib;
+{ Keep track of the last menu item selected. (For the purposes
+ of the option menu
+ }
+function gtk_menu_get_active(menu:PGtkMenu):PGtkWidget; cdecl; external gtklib;
+procedure gtk_menu_set_active(menu:PGtkMenu; index:guint); cdecl; external gtklib;
+{ set/get the accelerator group that holds global accelerators (should
+ be added to the corresponding toplevel with gtk_window_add_accel_group().
+ }
+procedure gtk_menu_set_accel_group(menu:PGtkMenu; accel_group:PGtkAccelGroup); cdecl; external gtklib;
+function gtk_menu_get_accel_group(menu:PGtkMenu):PGtkAccelGroup; cdecl; external gtklib;
+procedure gtk_menu_set_accel_path(menu:PGtkMenu; accel_path:Pgchar); cdecl; external gtklib;
+{ A reference count is kept for a widget when it is attached to
+ a particular widget. This is typically a menu item; it may also
+ be a widget with a popup menu - for instance, the Notebook widget.
+ }
+procedure gtk_menu_attach_to_widget(menu:PGtkMenu; attach_widget:PGtkWidget; detacher:TGtkMenuDetachFunc); cdecl; external gtklib;
+procedure gtk_menu_detach(menu:PGtkMenu); cdecl; external gtklib;
+{ This should be dumped in favor of data set when the menu is popped
+ up - that is currently in the ItemFactory code, but should be
+ in the Menu code.
+ }
+function gtk_menu_get_attach_widget(menu:PGtkMenu):PGtkWidget; cdecl; external gtklib;
+procedure gtk_menu_set_tearoff_state(menu:PGtkMenu; torn_off:gboolean); cdecl; external gtklib;
+function gtk_menu_get_tearoff_state(menu:PGtkMenu):gboolean; cdecl; external gtklib;
+{ This sets the window manager title for the window that
+ appears when a menu is torn off
+ }
+procedure gtk_menu_set_title(menu:PGtkMenu; title:Pgchar); cdecl; external gtklib;
+function gtk_menu_get_title(menu:PGtkMenu):Pgchar; cdecl; external gtklib;
+procedure gtk_menu_reorder_child(menu:PGtkMenu; child:PGtkWidget; position:gint); cdecl; external gtklib;
+procedure gtk_menu_set_screen(menu:PGtkMenu; screen:PGdkScreen); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_menu_append(menu,child : PGtkWidget);
+procedure gtk_menu_prepend(menu,child : PGtkWidget);
+procedure gtk_menu_insert(menu,child: PGtkWidget; pos : gint);
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_MENU : GType;
+begin
+ GTK_TYPE_MENU:=gtk_menu_get_type;
+end;
+
+function GTK_MENU(obj: pointer) : PGtkMenu;
+begin
+ GTK_MENU:=PGtkMenu(GTK_CHECK_CAST(obj,GTK_TYPE_MENU));
+end;
+
+function GTK_MENU_CLASS(klass: pointer) : PGtkMenuClass;
+begin
+ GTK_MENU_CLASS:=PGtkMenuClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_MENU));
+end;
+
+function GTK_IS_MENU(obj: pointer) : boolean;
+begin
+ GTK_IS_MENU:=GTK_CHECK_TYPE(obj,GTK_TYPE_MENU);
+end;
+
+function GTK_IS_MENU_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_MENU_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_MENU);
+end;
+
+function GTK_MENU_GET_CLASS(obj: pointer) : PGtkMenuClass;
+begin
+ GTK_MENU_GET_CLASS:=PGtkMenuClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_MENU));
+end;
+
+function needs_destruction_ref_count(var a : TGtkMenu) : guint;
+begin
+ needs_destruction_ref_count:=(a.flag0 and bm_TGtkMenu_needs_destruction_ref_count) shr bp_TGtkMenu_needs_destruction_ref_count;
+end;
+
+procedure set_needs_destruction_ref_count(var a : TGtkMenu; __needs_destruction_ref_count : guint);
+begin
+ a.flag0:=a.flag0 or ((__needs_destruction_ref_count shl bp_TGtkMenu_needs_destruction_ref_count) and bm_TGtkMenu_needs_destruction_ref_count);
+end;
+
+function torn_off(var a : TGtkMenu) : guint;
+begin
+ torn_off:=(a.flag0 and bm_TGtkMenu_torn_off) shr bp_TGtkMenu_torn_off;
+end;
+
+procedure set_torn_off(var a : TGtkMenu; __torn_off : guint);
+begin
+ a.flag0:=a.flag0 or ((__torn_off shl bp_TGtkMenu_torn_off) and bm_TGtkMenu_torn_off);
+end;
+
+function tearoff_active(var a : TGtkMenu) : guint;
+begin
+ tearoff_active:=(a.flag0 and bm_TGtkMenu_tearoff_active) shr bp_TGtkMenu_tearoff_active;
+end;
+
+procedure set_tearoff_active(var a : TGtkMenu; __tearoff_active : guint);
+begin
+ a.flag0:=a.flag0 or ((__tearoff_active shl bp_TGtkMenu_tearoff_active) and bm_TGtkMenu_tearoff_active);
+end;
+
+function scroll_fast(var a : TGtkMenu) : guint;
+begin
+ scroll_fast:=(a.flag0 and bm_TGtkMenu_scroll_fast) shr bp_TGtkMenu_scroll_fast;
+end;
+
+procedure set_scroll_fast(var a : TGtkMenu; __scroll_fast : guint);
+begin
+ a.flag0:=a.flag0 or ((__scroll_fast shl bp_TGtkMenu_scroll_fast) and bm_TGtkMenu_scroll_fast);
+end;
+
+function upper_arrow_visible(var a : TGtkMenu) : guint;
+begin
+ upper_arrow_visible:=(a.flag0 and bm_TGtkMenu_upper_arrow_visible) shr bp_TGtkMenu_upper_arrow_visible;
+end;
+
+procedure set_upper_arrow_visible(var a : TGtkMenu; __upper_arrow_visible : guint);
+begin
+ a.flag0:=a.flag0 or ((__upper_arrow_visible shl bp_TGtkMenu_upper_arrow_visible) and bm_TGtkMenu_upper_arrow_visible);
+end;
+
+function lower_arrow_visible(var a : TGtkMenu) : guint;
+begin
+ lower_arrow_visible:=(a.flag0 and bm_TGtkMenu_lower_arrow_visible) shr bp_TGtkMenu_lower_arrow_visible;
+end;
+
+procedure set_lower_arrow_visible(var a : TGtkMenu; __lower_arrow_visible : guint);
+begin
+ a.flag0:=a.flag0 or ((__lower_arrow_visible shl bp_TGtkMenu_lower_arrow_visible) and bm_TGtkMenu_lower_arrow_visible);
+end;
+
+function upper_arrow_prelight(var a : TGtkMenu) : guint;
+begin
+ upper_arrow_prelight:=(a.flag0 and bm_TGtkMenu_upper_arrow_prelight) shr bp_TGtkMenu_upper_arrow_prelight;
+end;
+
+procedure set_upper_arrow_prelight(var a : TGtkMenu; __upper_arrow_prelight : guint);
+begin
+ a.flag0:=a.flag0 or ((__upper_arrow_prelight shl bp_TGtkMenu_upper_arrow_prelight) and bm_TGtkMenu_upper_arrow_prelight);
+end;
+
+function lower_arrow_prelight(var a : TGtkMenu) : guint;
+begin
+ lower_arrow_prelight:=(a.flag0 and bm_TGtkMenu_lower_arrow_prelight) shr bp_TGtkMenu_lower_arrow_prelight;
+end;
+
+procedure set_lower_arrow_prelight(var a : TGtkMenu; __lower_arrow_prelight : guint);
+begin
+ a.flag0:=a.flag0 or ((__lower_arrow_prelight shl bp_TGtkMenu_lower_arrow_prelight) and bm_TGtkMenu_lower_arrow_prelight);
+end;
+
+procedure gtk_menu_append(menu,child : PGtkWidget);
+begin
+ gtk_menu_shell_append(PGtkMenuShell(menu),child);
+end;
+
+procedure gtk_menu_prepend(menu,child : PGtkWidget);
+begin
+ gtk_menu_shell_prepend(PGtkMenuShell(menu),child);
+end;
+
+procedure gtk_menu_insert(menu,child: PGtkWidget; pos : gint);
+begin
+ gtk_menu_shell_insert(PGtkMenuShell(menu),child,pos);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkmenubar.inc b/packages/gtk2/src/gtk+/gtk/gtkmenubar.inc
new file mode 100644
index 0000000000..09f6980c6f
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkmenubar.inc
@@ -0,0 +1,102 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkMenuBar = ^TGtkMenuBar;
+ TGtkMenuBar = record
+ menu_shell : TGtkMenuShell;
+ end;
+
+{ Padding for future expansion }
+ PGtkMenuBarClass = ^TGtkMenuBarClass;
+ TGtkMenuBarClass = record
+ parent_class : TGtkMenuShellClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_MENU_BAR : GType;
+function GTK_MENU_BAR(obj: pointer) : PGtkMenuBar;
+function GTK_MENU_BAR_CLASS(klass: pointer) : PGtkMenuBarClass;
+function GTK_IS_MENU_BAR(obj: pointer) : boolean;
+function GTK_IS_MENU_BAR_CLASS(klass: pointer) : boolean;
+function GTK_MENU_BAR_GET_CLASS(obj: pointer) : PGtkMenuBarClass;
+
+
+function gtk_menu_bar_get_type:TGtkType; cdecl; external gtklib;
+function gtk_menu_bar_new:PGtkWidget; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_menu_bar_append(menu,child : PGtkWidget);
+procedure gtk_menu_bar_prepend(menu,child : PGtkWidget);
+procedure gtk_menu_bar_insert(menu,child : PGtkWidget; pos: gint);
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+
+{ Private functions }
+procedure _gtk_menu_bar_cycle_focus(menubar:PGtkMenuBar; dir:TGtkDirectionType); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_MENU_BAR : GType;
+begin
+ GTK_TYPE_MENU_BAR:=gtk_menu_bar_get_type;
+end;
+
+function GTK_MENU_BAR(obj: pointer) : PGtkMenuBar;
+begin
+ GTK_MENU_BAR:=PGtkMenuBar(GTK_CHECK_CAST(obj,GTK_TYPE_MENU_BAR));
+end;
+
+function GTK_MENU_BAR_CLASS(klass: pointer) : PGtkMenuBarClass;
+begin
+ GTK_MENU_BAR_CLASS:=PGtkMenuBarClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_MENU_BAR));
+end;
+
+function GTK_IS_MENU_BAR(obj: pointer) : boolean;
+begin
+ GTK_IS_MENU_BAR:=GTK_CHECK_TYPE(obj,GTK_TYPE_MENU_BAR);
+end;
+
+function GTK_IS_MENU_BAR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_MENU_BAR_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_MENU_BAR);
+end;
+
+function GTK_MENU_BAR_GET_CLASS(obj: pointer) : PGtkMenuBarClass;
+begin
+ GTK_MENU_BAR_GET_CLASS:=PGtkMenuBarClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_MENU_BAR));
+end;
+
+procedure gtk_menu_bar_append(menu,child : PGtkWidget);
+begin
+ gtk_menu_shell_append(PGtkMenuShell(menu),child);
+end;
+
+procedure gtk_menu_bar_prepend(menu,child : PGtkWidget);
+begin
+ gtk_menu_shell_prepend(PGtkMenuShell(menu),child);
+end;
+
+procedure gtk_menu_bar_insert(menu,child : PGtkWidget; pos: gint);
+begin
+ gtk_menu_shell_insert(PGtkMenuShell(menu),child,pos);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkmenuitem.inc b/packages/gtk2/src/gtk+/gtk/gtkmenuitem.inc
new file mode 100644
index 0000000000..9eb2807adc
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkmenuitem.inc
@@ -0,0 +1,210 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkMenuItem = ^TGtkMenuItem;
+ TGtkMenuItem = record
+ item : TGtkItem;
+ submenu : PGtkWidget;
+ event_window : PGdkWindow;
+ toggle_size : guint16;
+ accelerator_width : guint16;
+ accel_path : Pgchar;
+ flag0 : word;
+ timer : guint;
+ end;
+
+
+{ Padding for future expansion }
+ PGtkMenuItemClass = ^TGtkMenuItemClass;
+ TGtkMenuItemClass = record
+ parent_class : TGtkItemClass;
+ flag0 : word;
+ activate : procedure (menu_item:PGtkMenuItem); cdecl;
+ activate_item : procedure (menu_item:PGtkMenuItem); cdecl;
+ toggle_size_request : procedure (menu_item:PGtkMenuItem; requisition:Pgint); cdecl;
+ toggle_size_allocate : procedure (menu_item:PGtkMenuItem; allocation:gint); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkMenuItem_show_submenu_indicator = $1;
+ bp_TGtkMenuItem_show_submenu_indicator = 0;
+ bm_TGtkMenuItem_submenu_placement = $2;
+ bp_TGtkMenuItem_submenu_placement = 1;
+ bm_TGtkMenuItem_submenu_direction = $4;
+ bp_TGtkMenuItem_submenu_direction = 2;
+ bm_TGtkMenuItem_right_justify = $8;
+ bp_TGtkMenuItem_right_justify = 3;
+ bm_TGtkMenuItem_timer_from_keypress = $10;
+ bp_TGtkMenuItem_timer_from_keypress = 4;
+
+ bm_TGtkMenuItemClass_hide_on_activate = $1;
+ bp_TGtkMenuItemClass_hide_on_activate = 0;
+
+
+function GTK_TYPE_MENU_ITEM : GType;
+function GTK_MENU_ITEM(obj: pointer) : PGtkMenuItem;
+function GTK_MENU_ITEM_CLASS(klass: pointer) : PGtkMenuItemClass;
+function GTK_IS_MENU_ITEM(obj: pointer) : boolean;
+function GTK_IS_MENU_ITEM_CLASS(klass: pointer) : boolean;
+function GTK_MENU_ITEM_GET_CLASS(obj: pointer) : PGtkMenuItemClass;
+
+
+function show_submenu_indicator(var a : TGtkMenuItem) : guint;
+procedure set_show_submenu_indicator(var a : TGtkMenuItem; __show_submenu_indicator : guint);
+function submenu_placement(var a : TGtkMenuItem) : guint; overload;
+procedure set_submenu_placement(var a : TGtkMenuItem; __submenu_placement : guint); overload;
+function submenu_direction(var a : TGtkMenuItem) : guint;
+procedure set_submenu_direction(var a : TGtkMenuItem; __submenu_direction : guint);
+function right_justify(var a : TGtkMenuItem) : guint;
+procedure set_right_justify(var a : TGtkMenuItem; __right_justify : guint);
+function timer_from_keypress(var a : TGtkMenuItem) : guint;
+procedure set_timer_from_keypress(var a : TGtkMenuItem; __timer_from_keypress : guint);
+{ If the following flag is true, then we should always hide
+ the menu when the MenuItem is activated. Otherwise, the
+ it is up to the caller. For instance, when navigating
+ a menu with the keyboard, <Space> doesn't hide, but
+ <Return> does.
+ }
+function hide_on_activate(var a : TGtkMenuItemClass) : guint;
+procedure set_hide_on_activate(var a : TGtkMenuItemClass; __hide_on_activate : guint);
+
+function gtk_menu_item_get_type:TGtkType; cdecl; external gtklib;
+function gtk_menu_item_new:PGtkWidget; cdecl; external gtklib;
+function gtk_menu_item_new_with_label(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_menu_item_new_with_mnemonic(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+procedure gtk_menu_item_set_submenu(menu_item:PGtkMenuItem; submenu:PGtkWidget); cdecl; external gtklib;
+function gtk_menu_item_get_submenu(menu_item:PGtkMenuItem):PGtkWidget; cdecl; external gtklib;
+procedure gtk_menu_item_remove_submenu(menu_item:PGtkMenuItem); cdecl; external gtklib;
+procedure gtk_menu_item_select(menu_item:PGtkMenuItem); cdecl; external gtklib;
+procedure gtk_menu_item_deselect(menu_item:PGtkMenuItem); cdecl; external gtklib;
+procedure gtk_menu_item_activate(menu_item:PGtkMenuItem); cdecl; external gtklib;
+procedure gtk_menu_item_toggle_size_request(menu_item:PGtkMenuItem; requisition:Pgint); cdecl; external gtklib;
+procedure gtk_menu_item_toggle_size_allocate(menu_item:PGtkMenuItem; allocation:gint); cdecl; external gtklib;
+procedure gtk_menu_item_set_right_justified(menu_item:PGtkMenuItem; right_justified:gboolean); cdecl; external gtklib;
+function gtk_menu_item_get_right_justified(menu_item:PGtkMenuItem):gboolean; cdecl; external gtklib;
+procedure gtk_menu_item_set_accel_path(menu_item:PGtkMenuItem; accel_path:Pgchar); cdecl; external gtklib;
+{ private }
+procedure _gtk_menu_item_refresh_accel_path(menu_item:PGtkMenuItem; prefix:Pgchar; accel_group:PGtkAccelGroup; group_changed:gboolean); cdecl; external gtklib;
+function _gtk_menu_item_is_selectable(menu_item:PGtkWidget):gboolean; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_menu_item_right_justify(menu_item : PGtkMenuItem);
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_MENU_ITEM : GType;
+begin
+ GTK_TYPE_MENU_ITEM:=gtk_menu_item_get_type;
+end;
+
+function GTK_MENU_ITEM(obj: pointer) : PGtkMenuItem;
+begin
+ GTK_MENU_ITEM:=PGtkMenuItem(GTK_CHECK_CAST(obj,GTK_TYPE_MENU_ITEM));
+end;
+
+function GTK_MENU_ITEM_CLASS(klass: pointer) : PGtkMenuItemClass;
+begin
+ GTK_MENU_ITEM_CLASS:=PGtkMenuItemClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_MENU_ITEM));
+end;
+
+function GTK_IS_MENU_ITEM(obj: pointer) : boolean;
+begin
+ GTK_IS_MENU_ITEM:=GTK_CHECK_TYPE(obj,GTK_TYPE_MENU_ITEM);
+end;
+
+function GTK_IS_MENU_ITEM_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_MENU_ITEM_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_MENU_ITEM);
+end;
+
+function GTK_MENU_ITEM_GET_CLASS(obj: pointer) : PGtkMenuItemClass;
+begin
+ GTK_MENU_ITEM_GET_CLASS:=PGtkMenuItemClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_MENU_ITEM));
+end;
+
+function show_submenu_indicator(var a : TGtkMenuItem) : guint;
+begin
+ show_submenu_indicator:=(a.flag0 and bm_TGtkMenuItem_show_submenu_indicator) shr bp_TGtkMenuItem_show_submenu_indicator;
+end;
+
+procedure set_show_submenu_indicator(var a : TGtkMenuItem; __show_submenu_indicator : guint);
+begin
+ a.flag0:=a.flag0 or ((__show_submenu_indicator shl bp_TGtkMenuItem_show_submenu_indicator) and bm_TGtkMenuItem_show_submenu_indicator);
+end;
+
+function submenu_placement(var a : TGtkMenuItem) : guint;
+begin
+ submenu_placement:=(a.flag0 and bm_TGtkMenuItem_submenu_placement) shr bp_TGtkMenuItem_submenu_placement;
+end;
+
+procedure set_submenu_placement(var a : TGtkMenuItem; __submenu_placement : guint);
+begin
+ a.flag0:=a.flag0 or ((__submenu_placement shl bp_TGtkMenuItem_submenu_placement) and bm_TGtkMenuItem_submenu_placement);
+end;
+
+function submenu_direction(var a : TGtkMenuItem) : guint;
+begin
+ submenu_direction:=(a.flag0 and bm_TGtkMenuItem_submenu_direction) shr bp_TGtkMenuItem_submenu_direction;
+end;
+
+procedure set_submenu_direction(var a : TGtkMenuItem; __submenu_direction : guint);
+begin
+ a.flag0:=a.flag0 or ((__submenu_direction shl bp_TGtkMenuItem_submenu_direction) and bm_TGtkMenuItem_submenu_direction);
+end;
+
+function right_justify(var a : TGtkMenuItem) : guint;
+begin
+ right_justify:=(a.flag0 and bm_TGtkMenuItem_right_justify) shr bp_TGtkMenuItem_right_justify;
+end;
+
+procedure set_right_justify(var a : TGtkMenuItem; __right_justify : guint);
+begin
+ a.flag0:=a.flag0 or ((__right_justify shl bp_TGtkMenuItem_right_justify) and bm_TGtkMenuItem_right_justify);
+end;
+
+function timer_from_keypress(var a : TGtkMenuItem) : guint;
+begin
+ timer_from_keypress:=(a.flag0 and bm_TGtkMenuItem_timer_from_keypress) shr bp_TGtkMenuItem_timer_from_keypress;
+end;
+
+procedure set_timer_from_keypress(var a : TGtkMenuItem; __timer_from_keypress : guint);
+begin
+ a.flag0:=a.flag0 or ((__timer_from_keypress shl bp_TGtkMenuItem_timer_from_keypress) and bm_TGtkMenuItem_timer_from_keypress);
+end;
+
+function hide_on_activate(var a : TGtkMenuItemClass) : guint;
+begin
+ hide_on_activate:=(a.flag0 and bm_TGtkMenuItemClass_hide_on_activate) shr bp_TGtkMenuItemClass_hide_on_activate;
+end;
+
+procedure set_hide_on_activate(var a : TGtkMenuItemClass; __hide_on_activate : guint);
+begin
+ a.flag0:=a.flag0 or ((__hide_on_activate shl bp_TGtkMenuItemClass_hide_on_activate) and bm_TGtkMenuItemClass_hide_on_activate);
+end;
+
+procedure gtk_menu_item_right_justify(menu_item : PGtkMenuItem);
+begin
+ gtk_menu_item_set_right_justified(menu_item,true);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkmenushell.inc b/packages/gtk2/src/gtk+/gtk/gtkmenushell.inc
new file mode 100644
index 0000000000..13e63aecc5
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkmenushell.inc
@@ -0,0 +1,206 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkMenuShell = ^TGtkMenuShell;
+ TGtkMenuShell = record
+ container : TGtkContainer;
+ children : PGList;
+ active_menu_item : PGtkWidget;
+ parent_menu_shell : PGtkWidget;
+ button : guint;
+ activate_time : guint32;
+ flag0 : word;
+ end;
+
+{ Padding for future expansion }
+ PGtkMenuShellClass = ^TGtkMenuShellClass;
+ TGtkMenuShellClass = record
+ parent_class : TGtkContainerClass;
+ flag0 : word;
+ deactivate : procedure (menu_shell:PGtkMenuShell); cdecl;
+ selection_done : procedure (menu_shell:PGtkMenuShell); cdecl;
+ move_current : procedure (menu_shell:PGtkMenuShell; direction:TGtkMenuDirectionType); cdecl;
+ activate_current : procedure (menu_shell:PGtkMenuShell; force_hide:gboolean); cdecl;
+ cancel : procedure (menu_shell:PGtkMenuShell); cdecl;
+ select_item : procedure (menu_shell:PGtkMenuShell; menu_item:PGtkWidget); cdecl;
+ insert : procedure (menu_shell:PGtkMenuShell; child:PGtkWidget; position:gint); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkMenuShell_active = $1;
+ bp_TGtkMenuShell_active = 0;
+ bm_TGtkMenuShell_have_grab = $2;
+ bp_TGtkMenuShell_have_grab = 1;
+ bm_TGtkMenuShell_have_xgrab = $4;
+ bp_TGtkMenuShell_have_xgrab = 2;
+ bm_TGtkMenuShell_ignore_leave = $8;
+ bp_TGtkMenuShell_ignore_leave = 3;
+ bm_TGtkMenuShell_menu_flag = $10;
+ bp_TGtkMenuShell_menu_flag = 4;
+ bm_TGtkMenuShell_ignore_enter = $20;
+ bp_TGtkMenuShell_ignore_enter = 5;
+
+ bm_TGtkMenuShellClass_submenu_placement = $1;
+ bp_TGtkMenuShellClass_submenu_placement = 0;
+
+
+function GTK_TYPE_MENU_SHELL : GType;
+function GTK_MENU_SHELL(obj: pointer) : PGtkMenuShell;
+function GTK_MENU_SHELL_CLASS(klass: pointer) : PGtkMenuShellClass;
+function GTK_IS_MENU_SHELL(obj: pointer) : boolean;
+function GTK_IS_MENU_SHELL_CLASS(klass: pointer) : boolean;
+function GTK_MENU_SHELL_GET_CLASS(obj: pointer) : PGtkMenuShellClass;
+
+function active(var a : TGtkMenuShell) : guint; overload;
+procedure set_active(var a : TGtkMenuShell; __active : guint); overload;
+function have_grab(var a : TGtkMenuShell) : guint; overload;
+procedure set_have_grab(var a : TGtkMenuShell; __have_grab : guint); overload;
+function have_xgrab(var a : TGtkMenuShell) : guint;
+procedure set_have_xgrab(var a : TGtkMenuShell; __have_xgrab : guint);
+function ignore_leave(var a : TGtkMenuShell) : guint;
+procedure set_ignore_leave(var a : TGtkMenuShell; __ignore_leave : guint);
+function menu_flag(var a : TGtkMenuShell) : guint;
+procedure set_menu_flag(var a : TGtkMenuShell; __menu_flag : guint);
+function ignore_enter(var a : TGtkMenuShell) : guint;
+procedure set_ignore_enter(var a : TGtkMenuShell; __ignore_enter : guint);
+
+function submenu_placement(var a : TGtkMenuShellClass) : guint; overload;
+procedure set_submenu_placement(var a : TGtkMenuShellClass; __submenu_placement : guint); overload;
+
+function gtk_menu_shell_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_menu_shell_append(menu_shell:PGtkMenuShell; child:PGtkWidget); cdecl; external gtklib;
+procedure gtk_menu_shell_prepend(menu_shell:PGtkMenuShell; child:PGtkWidget); cdecl; external gtklib;
+procedure gtk_menu_shell_insert(menu_shell:PGtkMenuShell; child:PGtkWidget; position:gint); cdecl; external gtklib;
+procedure gtk_menu_shell_deactivate(menu_shell:PGtkMenuShell); cdecl; external gtklib;
+procedure gtk_menu_shell_select_item(menu_shell:PGtkMenuShell; menu_item:PGtkWidget); cdecl; external gtklib;
+procedure gtk_menu_shell_deselect(menu_shell:PGtkMenuShell); cdecl; external gtklib;
+procedure gtk_menu_shell_activate_item(menu_shell:PGtkMenuShell; menu_item:PGtkWidget; force_deactivate:gboolean); cdecl; external gtklib;
+procedure _gtk_menu_shell_select_first(menu_shell:PGtkMenuShell); cdecl; external gtklib;
+procedure _gtk_menu_shell_activate(menu_shell:PGtkMenuShell); cdecl; external gtklib;
+
+{$IFDEF HasGTK2_4}
+procedure gtk_menu_shell_select_first(menu_shell: PGtkMenuShell; search_sensitive: gboolean); cdecl; external gtklib;
+procedure gtk_menu_shell_cancel(menu_shell: PGtkMenuShell); cdecl; external gtklib;
+{$ENDIF HasGTK2_4}
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_MENU_SHELL : GType;
+begin
+ GTK_TYPE_MENU_SHELL:=gtk_menu_shell_get_type;
+end;
+
+function GTK_MENU_SHELL(obj: pointer) : PGtkMenuShell;
+begin
+ GTK_MENU_SHELL:=PGtkMenuShell(GTK_CHECK_CAST(obj,GTK_TYPE_MENU_SHELL));
+end;
+
+function GTK_MENU_SHELL_CLASS(klass: pointer) : PGtkMenuShellClass;
+begin
+ GTK_MENU_SHELL_CLASS:=PGtkMenuShellClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_MENU_SHELL));
+end;
+
+function GTK_IS_MENU_SHELL(obj: pointer) : boolean;
+begin
+ GTK_IS_MENU_SHELL:=GTK_CHECK_TYPE(obj,GTK_TYPE_MENU_SHELL);
+end;
+
+function GTK_IS_MENU_SHELL_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_MENU_SHELL_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_MENU_SHELL);
+end;
+
+function GTK_MENU_SHELL_GET_CLASS(obj: pointer) : PGtkMenuShellClass;
+begin
+ GTK_MENU_SHELL_GET_CLASS:=PGtkMenuShellClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_MENU_SHELL));
+end;
+
+function active(var a : TGtkMenuShell) : guint;
+begin
+ active:=(a.flag0 and bm_TGtkMenuShell_active) shr bp_TGtkMenuShell_active;
+end;
+
+procedure set_active(var a : TGtkMenuShell; __active : guint);
+begin
+ a.flag0:=a.flag0 or ((__active shl bp_TGtkMenuShell_active) and bm_TGtkMenuShell_active);
+end;
+
+function have_grab(var a : TGtkMenuShell) : guint;
+begin
+ have_grab:=(a.flag0 and bm_TGtkMenuShell_have_grab) shr bp_TGtkMenuShell_have_grab;
+end;
+
+procedure set_have_grab(var a : TGtkMenuShell; __have_grab : guint);
+begin
+ a.flag0:=a.flag0 or ((__have_grab shl bp_TGtkMenuShell_have_grab) and bm_TGtkMenuShell_have_grab);
+end;
+
+function have_xgrab(var a : TGtkMenuShell) : guint;
+begin
+ have_xgrab:=(a.flag0 and bm_TGtkMenuShell_have_xgrab) shr bp_TGtkMenuShell_have_xgrab;
+end;
+
+procedure set_have_xgrab(var a : TGtkMenuShell; __have_xgrab : guint);
+begin
+ a.flag0:=a.flag0 or ((__have_xgrab shl bp_TGtkMenuShell_have_xgrab) and bm_TGtkMenuShell_have_xgrab);
+end;
+
+function ignore_leave(var a : TGtkMenuShell) : guint;
+begin
+ ignore_leave:=(a.flag0 and bm_TGtkMenuShell_ignore_leave) shr bp_TGtkMenuShell_ignore_leave;
+end;
+
+procedure set_ignore_leave(var a : TGtkMenuShell; __ignore_leave : guint);
+begin
+ a.flag0:=a.flag0 or ((__ignore_leave shl bp_TGtkMenuShell_ignore_leave) and bm_TGtkMenuShell_ignore_leave);
+end;
+
+function menu_flag(var a : TGtkMenuShell) : guint;
+begin
+ menu_flag:=(a.flag0 and bm_TGtkMenuShell_menu_flag) shr bp_TGtkMenuShell_menu_flag;
+end;
+
+procedure set_menu_flag(var a : TGtkMenuShell; __menu_flag : guint);
+begin
+ a.flag0:=a.flag0 or ((__menu_flag shl bp_TGtkMenuShell_menu_flag) and bm_TGtkMenuShell_menu_flag);
+end;
+
+function ignore_enter(var a : TGtkMenuShell) : guint;
+begin
+ ignore_enter:=(a.flag0 and bm_TGtkMenuShell_ignore_enter) shr bp_TGtkMenuShell_ignore_enter;
+end;
+
+procedure set_ignore_enter(var a : TGtkMenuShell; __ignore_enter : guint);
+begin
+ a.flag0:=a.flag0 or ((__ignore_enter shl bp_TGtkMenuShell_ignore_enter) and bm_TGtkMenuShell_ignore_enter);
+end;
+
+function submenu_placement(var a : TGtkMenuShellClass) : guint;
+begin
+ submenu_placement:=(a.flag0 and bm_TGtkMenuShellClass_submenu_placement) shr bp_TGtkMenuShellClass_submenu_placement;
+end;
+
+procedure set_submenu_placement(var a : TGtkMenuShellClass; __submenu_placement : guint);
+begin
+ a.flag0:=a.flag0 or ((__submenu_placement shl bp_TGtkMenuShellClass_submenu_placement) and bm_TGtkMenuShellClass_submenu_placement);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkmessagedialog.inc b/packages/gtk2/src/gtk+/gtk/gtkmessagedialog.inc
new file mode 100644
index 0000000000..5ec958b2d0
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkmessagedialog.inc
@@ -0,0 +1,109 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkMessageType = ^TGtkMessageType;
+ TGtkMessageType = (
+ GTK_MESSAGE_INFO,
+ GTK_MESSAGE_WARNING,
+ GTK_MESSAGE_QUESTION,
+ GTK_MESSAGE_ERROR
+ );
+
+ PGtkButtonsType = ^TGtkButtonsType;
+ TGtkButtonsType = (
+ GTK_BUTTONS_NONE,
+ GTK_BUTTONS_OK,
+ GTK_BUTTONS_CLOSE,
+ GTK_BUTTONS_CANCEL,
+ GTK_BUTTONS_YES_NO,
+ GTK_BUTTONS_OK_CANCEL
+ );
+
+
+{< private > }
+ PGtkMessageDialog = ^TGtkMessageDialog;
+ TGtkMessageDialog = record
+ parent_instance : TGtkDialog;
+ image : PGtkWidget;
+ _label : PGtkWidget;
+ end;
+
+{ Padding for future expansion }
+ PGtkMessageDialogClass = ^TGtkMessageDialogClass;
+ TGtkMessageDialogClass = record
+ parent_class : TGtkDialogClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_MESSAGE_DIALOG : GType;
+function GTK_MESSAGE_DIALOG(obj: pointer) : PGtkMessageDialog;
+function GTK_MESSAGE_DIALOG_CLASS(klass: pointer) : PGtkMessageDialogClass;
+function GTK_IS_MESSAGE_DIALOG(obj: pointer) : boolean;
+function GTK_IS_MESSAGE_DIALOG_CLASS(klass: pointer) : boolean;
+function GTK_MESSAGE_DIALOG_GET_CLASS(obj: pointer) : PGtkMessageDialogClass;
+
+function gtk_message_dialog_get_type:TGtkType; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+function gtk_message_dialog_new(parent:PGtkWindow; flags:TGtkDialogFlags;
+ _type:TGtkMessageType; buttons:TGtkButtonsType; message_format:Pgchar;
+ args:array of const):PGtkWidget; cdecl; overload; external gtklib;
+function gtk_message_dialog_new(parent:PGtkWindow; flags:TGtkDialogFlags;
+ _type:TGtkMessageType; buttons:TGtkButtonsType;
+ message_format:Pgchar):PGtkWidget; cdecl; overload; varargs; external gtklib;
+{$ELSE}
+function gtk_message_dialog_new(parent:PGtkWindow; flags:TGtkDialogFlags;
+ _type:TGtkMessageType; buttons:TGtkButtonsType;
+ message_format:Pgchar):PGtkWidget; varargs; cdecl; external gtklib;
+{$ENDIF}
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_MESSAGE_DIALOG : GType;
+begin
+ GTK_TYPE_MESSAGE_DIALOG:=gtk_message_dialog_get_type;
+end;
+
+function GTK_MESSAGE_DIALOG(obj: pointer) : PGtkMessageDialog;
+begin
+ GTK_MESSAGE_DIALOG:=PGtkMessageDialog(GTK_CHECK_CAST(obj,GTK_TYPE_MESSAGE_DIALOG));
+end;
+
+function GTK_MESSAGE_DIALOG_CLASS(klass: pointer) : PGtkMessageDialogClass;
+begin
+ GTK_MESSAGE_DIALOG_CLASS:=PGtkMessageDialogClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_MESSAGE_DIALOG));
+end;
+
+function GTK_IS_MESSAGE_DIALOG(obj: pointer) : boolean;
+begin
+ GTK_IS_MESSAGE_DIALOG:=GTK_CHECK_TYPE(obj,GTK_TYPE_MESSAGE_DIALOG);
+end;
+
+function GTK_IS_MESSAGE_DIALOG_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_MESSAGE_DIALOG_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_MESSAGE_DIALOG);
+end;
+
+function GTK_MESSAGE_DIALOG_GET_CLASS(obj: pointer) : PGtkMessageDialogClass;
+begin
+ GTK_MESSAGE_DIALOG_GET_CLASS:=PGtkMessageDialogClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_MESSAGE_DIALOG));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkmisc.inc b/packages/gtk2/src/gtk+/gtk/gtkmisc.inc
new file mode 100644
index 0000000000..210e07a113
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkmisc.inc
@@ -0,0 +1,77 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ PGtkMisc = ^TGtkMisc;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ TGtkMisc = record
+ widget : TGtkWidget;
+ xalign : gfloat;
+ yalign : gfloat;
+ xpad : guint16;
+ ypad : guint16;
+ end;
+
+
+ PGtkMiscClass = ^TGtkMiscClass;
+ TGtkMiscClass = record
+ parent_class : TGtkWidgetClass;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_MISC : GType;
+function GTK_MISC(obj: pointer) : PGtkMisc;
+function GTK_MISC_CLASS(klass: pointer) : PGtkMiscClass;
+function GTK_IS_MISC(obj: pointer) : boolean;
+function GTK_IS_MISC_CLASS(klass: pointer) : boolean;
+function GTK_MISC_GET_CLASS(obj: pointer) : PGtkMiscClass;
+
+function gtk_misc_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_misc_set_alignment(misc:PGtkMisc; xalign:gfloat; yalign:gfloat); cdecl; external gtklib;
+procedure gtk_misc_get_alignment(misc:PGtkMisc; var xalign:Pgfloat; var yalign:Pgfloat); cdecl; external gtklib;
+procedure gtk_misc_set_padding(misc:PGtkMisc; xpad:gint; ypad:gint); cdecl; external gtklib;
+procedure gtk_misc_get_padding(misc:PGtkMisc; var xpad:Pgint; var ypad:Pgint); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_MISC : GType;
+begin
+ GTK_TYPE_MISC:=gtk_misc_get_type;
+end;
+
+function GTK_MISC(obj: pointer) : PGtkMisc;
+begin
+ GTK_MISC:=PGtkMisc(GTK_CHECK_CAST(obj,GTK_TYPE_MISC));
+end;
+
+function GTK_MISC_CLASS(klass: pointer) : PGtkMiscClass;
+begin
+ GTK_MISC_CLASS:=PGtkMiscClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_MISC));
+end;
+
+function GTK_IS_MISC(obj: pointer) : boolean;
+begin
+ GTK_IS_MISC:=GTK_CHECK_TYPE(obj,GTK_TYPE_MISC);
+end;
+
+function GTK_IS_MISC_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_MISC_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_MISC);
+end;
+
+function GTK_MISC_GET_CLASS(obj: pointer) : PGtkMiscClass;
+begin
+ GTK_MISC_GET_CLASS:=PGtkMiscClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_MISC));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtknotebook.inc b/packages/gtk2/src/gtk+/gtk/gtknotebook.inc
new file mode 100644
index 0000000000..eb561d4da4
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtknotebook.inc
@@ -0,0 +1,348 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkNotebookPage = pointer;
+
+ PGtkNotebookTab = ^TGtkNotebookTab;
+ TGtkNotebookTab = (
+ GTK_NOTEBOOK_TAB_FIRST,
+ GTK_NOTEBOOK_TAB_LAST
+ );
+
+{ The first tab visible (for scrolling notebooks) }
+{ Flag used by ::move-focus-out implementation }
+ PGtkNotebook = ^TGtkNotebook;
+ TGtkNotebook = record
+ container : TGtkContainer;
+ cur_page : PGtkNotebookPage;
+ children : PGList;
+ first_tab : PGList;
+ focus_tab : PGList;
+ menu : PGtkWidget;
+ event_window : PGdkWindow;
+ timer : guint32;
+ tab_hborder : guint16;
+ tab_vborder : guint16;
+ flag0 : word;
+ end;
+
+{ Action signals for keybindings }
+{ Padding for future expansion }
+ PGtkNotebookClass = ^TGtkNotebookClass;
+ TGtkNotebookClass = record
+ parent_class : TGtkContainerClass;
+ switch_page : procedure (notebook:PGtkNotebook; page:PGtkNotebookPage; page_num:guint); cdecl;
+ select_page : function (notebook:PGtkNotebook; move_focus:gboolean):gboolean; cdecl;
+ focus_tab : function (notebook:PGtkNotebook; _type:TGtkNotebookTab):gboolean; cdecl;
+ change_current_page : procedure (notebook:PGtkNotebook; offset:gint); cdecl;
+ move_focus_out : procedure (notebook:PGtkNotebook; direction:TGtkDirectionType); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkNotebook_show_tabs = $1;
+ bp_TGtkNotebook_show_tabs = 0;
+ bm_TGtkNotebook_homogeneous = $2;
+ bp_TGtkNotebook_homogeneous = 1;
+ bm_TGtkNotebook_show_border = $4;
+ bp_TGtkNotebook_show_border = 2;
+ bm_TGtkNotebook_tab_pos = $18;
+ bp_TGtkNotebook_tab_pos = 3;
+ bm_TGtkNotebook_scrollable = $20;
+ bp_TGtkNotebook_scrollable = 5;
+ bm_TGtkNotebook_in_child = $C0;
+ bp_TGtkNotebook_in_child = 6;
+ bm_TGtkNotebook_click_child = $300;
+ bp_TGtkNotebook_click_child = 8;
+ bm_TGtkNotebook_button = $C00;
+ bp_TGtkNotebook_button = 10;
+ bm_TGtkNotebook_need_timer = $1000;
+ bp_TGtkNotebook_need_timer = 12;
+ bm_TGtkNotebook_child_has_focus = $2000;
+ bp_TGtkNotebook_child_has_focus = 13;
+ bm_TGtkNotebook_have_visible_child = $4000;
+ bp_TGtkNotebook_have_visible_child = 14;
+ bm_TGtkNotebook_focus_out = $8000;
+ bp_TGtkNotebook_focus_out = 15;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_notebook_current_page(notebook:PGtkNotebook):gint;
+procedure gtk_notebook_set_page(notebook:PGtkNotebook; page_num:gint);
+{$endif}
+
+function GTK_TYPE_NOTEBOOK : GType;
+function GTK_NOTEBOOK(obj: pointer) : PGtkNotebook;
+function GTK_NOTEBOOK_CLASS(klass: pointer) : PGtkNotebookClass;
+function GTK_IS_NOTEBOOK(obj: pointer) : boolean;
+function GTK_IS_NOTEBOOK_CLASS(klass: pointer) : boolean;
+function GTK_NOTEBOOK_GET_CLASS(obj: pointer) : PGtkNotebookClass;
+
+function show_tabs(var a : TGtkNotebook) : guint;
+procedure set_show_tabs(var a : TGtkNotebook; __show_tabs : guint);
+function homogeneous(var a : TGtkNotebook) : guint; overload;
+procedure set_homogeneous(var a : TGtkNotebook; __homogeneous : guint); overload;
+function show_border(var a : TGtkNotebook) : guint;
+procedure set_show_border(var a : TGtkNotebook; __show_border : guint);
+function tab_pos(var a : TGtkNotebook) : guint;
+procedure set_tab_pos(var a : TGtkNotebook; __tab_pos : guint);
+function scrollable(var a : TGtkNotebook) : guint;
+procedure set_scrollable(var a : TGtkNotebook; __scrollable : guint);
+function in_child(var a : TGtkNotebook) : guint; overload;
+procedure set_in_child(var a : TGtkNotebook; __in_child : guint); overload;
+function click_child(var a : TGtkNotebook) : guint; overload;
+procedure set_click_child(var a : TGtkNotebook; __click_child : guint); overload;
+function button(var a : TGtkNotebook) : guint; overload;
+procedure set_button(var a : TGtkNotebook; __button : guint); overload;
+function need_timer(var a : TGtkNotebook) : guint; overload;
+procedure set_need_timer(var a : TGtkNotebook; __need_timer : guint); overload;
+function child_has_focus(var a : TGtkNotebook) : guint;
+procedure set_child_has_focus(var a : TGtkNotebook; __child_has_focus : guint);
+function have_visible_child(var a : TGtkNotebook) : guint;
+procedure set_have_visible_child(var a : TGtkNotebook; __have_visible_child : guint);
+function focus_out(var a : TGtkNotebook) : guint; overload;
+procedure set_focus_out(var a : TGtkNotebook; __focus_out : guint); overload;
+
+{ Creation, insertion, deletion }
+function gtk_notebook_get_type:TGtkType; cdecl; external gtklib;
+function gtk_notebook_new:PGtkWidget; cdecl; external gtklib;
+function gtk_notebook_append_page(notebook:PGtkNotebook; child:PGtkWidget; tab_label:PGtkWidget): gint; cdecl; external gtklib;
+function gtk_notebook_append_page_menu(notebook:PGtkNotebook; child:PGtkWidget; tab_label:PGtkWidget; menu_label:PGtkWidget):gint; cdecl; external gtklib;
+function gtk_notebook_prepend_page(notebook:PGtkNotebook; child:PGtkWidget; tab_label:PGtkWidget):gint; cdecl; external gtklib;
+function gtk_notebook_prepend_page_menu(notebook:PGtkNotebook; child:PGtkWidget; tab_label:PGtkWidget; menu_label:PGtkWidget):gint;cdecl; external gtklib;
+function gtk_notebook_insert_page(notebook:PGtkNotebook; child:PGtkWidget;tab_label:PGtkWidget; position:gint):gint; cdecl; external gtklib;
+function gtk_notebook_insert_page_menu(notebook:PGtkNotebook; child:PGtkWidget; tab_label:PGtkWidget; menu_label:PGtkWidget;position:gint):gint; cdecl; external gtklib;
+procedure gtk_notebook_remove_page(notebook:PGtkNotebook; page_num:gint); cdecl; external gtklib;
+
+{ query, set current NoteebookPage }
+function gtk_notebook_get_current_page(notebook:PGtkNotebook):gint; cdecl; external gtklib;
+function gtk_notebook_get_nth_page(notebook:PGtkNotebook; page_num:gint):PGtkWidget; cdecl; external gtklib;
+function gtk_notebook_page_num(notebook:PGtkNotebook; child:PGtkWidget):gint; cdecl; external gtklib;
+procedure gtk_notebook_set_current_page(notebook:PGtkNotebook; page_num:gint); cdecl; external gtklib;
+procedure gtk_notebook_next_page(notebook:PGtkNotebook); cdecl; external gtklib;
+procedure gtk_notebook_prev_page(notebook:PGtkNotebook); cdecl; external gtklib;
+
+{ set Notebook, NotebookTab style }
+procedure gtk_notebook_set_show_border(notebook:PGtkNotebook; show_border:gboolean); cdecl; external gtklib;
+function gtk_notebook_get_show_border(notebook:PGtkNotebook):gboolean; cdecl; external gtklib;
+procedure gtk_notebook_set_show_tabs(notebook:PGtkNotebook; show_tabs:gboolean); cdecl; external gtklib;
+function gtk_notebook_get_show_tabs(notebook:PGtkNotebook):gboolean; cdecl; external gtklib;
+procedure gtk_notebook_set_tab_pos(notebook:PGtkNotebook; pos:TGtkPositionType); cdecl; external gtklib;
+function gtk_notebook_get_tab_pos(notebook:PGtkNotebook):TGtkPositionType; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_notebook_set_homogeneous_tabs(notebook:PGtkNotebook; homogeneous:gboolean); cdecl; external gtklib;
+procedure gtk_notebook_set_tab_border(notebook:PGtkNotebook; border_width:guint); cdecl; external gtklib;
+procedure gtk_notebook_set_tab_hborder(notebook:PGtkNotebook; tab_hborder:guint); cdecl; external gtklib;
+procedure gtk_notebook_set_tab_vborder(notebook:PGtkNotebook; tab_vborder:guint); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+procedure gtk_notebook_set_scrollable(notebook:PGtkNotebook; scrollable:gboolean); cdecl; external gtklib;
+function gtk_notebook_get_scrollable(notebook:PGtkNotebook):gboolean; cdecl; external gtklib;
+{
+ enable/disable PopupMenu
+ }
+procedure gtk_notebook_popup_enable(notebook:PGtkNotebook); cdecl; external gtklib;
+procedure gtk_notebook_popup_disable(notebook:PGtkNotebook); cdecl; external gtklib;
+{
+ query/set NotebookPage Properties
+ }
+function gtk_notebook_get_tab_label(notebook:PGtkNotebook; child:PGtkWidget):PGtkWidget; cdecl; external gtklib;
+procedure gtk_notebook_set_tab_label(notebook:PGtkNotebook; child:PGtkWidget; tab_label:PGtkWidget); cdecl; external gtklib;
+procedure gtk_notebook_set_tab_label_text(notebook:PGtkNotebook; child:PGtkWidget; tab_text:Pgchar); cdecl; external gtklib;
+function gtk_notebook_get_tab_label_text(notebook:PGtkNotebook; child:PGtkWidget):Pgchar; cdecl; external gtklib;
+function gtk_notebook_get_menu_label(notebook:PGtkNotebook; child:PGtkWidget):PGtkWidget; cdecl; external gtklib;
+procedure gtk_notebook_set_menu_label(notebook:PGtkNotebook; child:PGtkWidget; menu_label:PGtkWidget); cdecl; external gtklib;
+procedure gtk_notebook_set_menu_label_text(notebook:PGtkNotebook; child:PGtkWidget; menu_text:Pgchar); cdecl; external gtklib;
+function gtk_notebook_get_menu_label_text(notebook:PGtkNotebook; child:PGtkWidget):Pgchar; cdecl; external gtklib;
+procedure gtk_notebook_query_tab_label_packing(notebook:PGtkNotebook;child:PGtkWidget;expand:Pgboolean;fill:Pgboolean;pack_type:PGtkPackType); cdecl; external gtklib;
+procedure gtk_notebook_set_tab_label_packing(notebook:PGtkNotebook; child:PGtkWidget; expand:gboolean; fill:gboolean; pack_type:TGtkPackType); cdecl; external gtklib;
+procedure gtk_notebook_reorder_child(notebook:PGtkNotebook; child:PGtkWidget; position:gint); cdecl; external gtklib;
+
+{$IFDEF HasGTK2_4}
+function gtk_notebook_get_n_pages(notebook:PGtkNotebook): integer; cdecl; external gtklib;
+{$ENDIF HasGTK2_4}
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_NOTEBOOK : GType;
+begin
+ GTK_TYPE_NOTEBOOK:=gtk_notebook_get_type;
+end;
+
+function GTK_NOTEBOOK(obj: pointer) : PGtkNotebook;
+begin
+ GTK_NOTEBOOK:=PGtkNotebook(GTK_CHECK_CAST(obj,GTK_TYPE_NOTEBOOK));
+end;
+
+function GTK_NOTEBOOK_CLASS(klass: pointer) : PGtkNotebookClass;
+begin
+ GTK_NOTEBOOK_CLASS:=PGtkNotebookClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_NOTEBOOK));
+end;
+
+function GTK_IS_NOTEBOOK(obj: pointer) : boolean;
+begin
+ GTK_IS_NOTEBOOK:=GTK_CHECK_TYPE(obj,GTK_TYPE_NOTEBOOK);
+end;
+
+function GTK_IS_NOTEBOOK_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_NOTEBOOK_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_NOTEBOOK);
+end;
+
+function GTK_NOTEBOOK_GET_CLASS(obj: pointer) : PGtkNotebookClass;
+begin
+ GTK_NOTEBOOK_GET_CLASS:=PGtkNotebookClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_NOTEBOOK));
+end;
+
+function show_tabs(var a : TGtkNotebook) : guint;
+begin
+ show_tabs:=(a.flag0 and bm_TGtkNotebook_show_tabs) shr bp_TGtkNotebook_show_tabs;
+end;
+
+procedure set_show_tabs(var a : TGtkNotebook; __show_tabs : guint);
+begin
+ a.flag0:=a.flag0 or ((__show_tabs shl bp_TGtkNotebook_show_tabs) and bm_TGtkNotebook_show_tabs);
+end;
+
+function homogeneous(var a : TGtkNotebook) : guint;
+begin
+ homogeneous:=(a.flag0 and bm_TGtkNotebook_homogeneous) shr bp_TGtkNotebook_homogeneous;
+end;
+
+procedure set_homogeneous(var a : TGtkNotebook; __homogeneous : guint);
+begin
+ a.flag0:=a.flag0 or ((__homogeneous shl bp_TGtkNotebook_homogeneous) and bm_TGtkNotebook_homogeneous);
+end;
+
+function show_border(var a : TGtkNotebook) : guint;
+begin
+ show_border:=(a.flag0 and bm_TGtkNotebook_show_border) shr bp_TGtkNotebook_show_border;
+end;
+
+procedure set_show_border(var a : TGtkNotebook; __show_border : guint);
+begin
+ a.flag0:=a.flag0 or ((__show_border shl bp_TGtkNotebook_show_border) and bm_TGtkNotebook_show_border);
+end;
+
+function tab_pos(var a : TGtkNotebook) : guint;
+begin
+ tab_pos:=(a.flag0 and bm_TGtkNotebook_tab_pos) shr bp_TGtkNotebook_tab_pos;
+end;
+
+procedure set_tab_pos(var a : TGtkNotebook; __tab_pos : guint);
+begin
+ a.flag0:=a.flag0 or ((__tab_pos shl bp_TGtkNotebook_tab_pos) and bm_TGtkNotebook_tab_pos);
+end;
+
+function scrollable(var a : TGtkNotebook) : guint;
+begin
+ scrollable:=(a.flag0 and bm_TGtkNotebook_scrollable) shr bp_TGtkNotebook_scrollable;
+end;
+
+procedure set_scrollable(var a : TGtkNotebook; __scrollable : guint);
+begin
+ a.flag0:=a.flag0 or ((__scrollable shl bp_TGtkNotebook_scrollable) and bm_TGtkNotebook_scrollable);
+end;
+
+function in_child(var a : TGtkNotebook) : guint;
+begin
+ in_child:=(a.flag0 and bm_TGtkNotebook_in_child) shr bp_TGtkNotebook_in_child;
+end;
+
+procedure set_in_child(var a : TGtkNotebook; __in_child : guint);
+begin
+ a.flag0:=a.flag0 or ((__in_child shl bp_TGtkNotebook_in_child) and bm_TGtkNotebook_in_child);
+end;
+
+function click_child(var a : TGtkNotebook) : guint;
+begin
+ click_child:=(a.flag0 and bm_TGtkNotebook_click_child) shr bp_TGtkNotebook_click_child;
+end;
+
+procedure set_click_child(var a : TGtkNotebook; __click_child : guint);
+begin
+ a.flag0:=a.flag0 or ((__click_child shl bp_TGtkNotebook_click_child) and bm_TGtkNotebook_click_child);
+end;
+
+function button(var a : TGtkNotebook) : guint;
+begin
+ button:=(a.flag0 and bm_TGtkNotebook_button) shr bp_TGtkNotebook_button;
+end;
+
+procedure set_button(var a : TGtkNotebook; __button : guint);
+begin
+ a.flag0:=a.flag0 or ((__button shl bp_TGtkNotebook_button) and bm_TGtkNotebook_button);
+end;
+
+function need_timer(var a : TGtkNotebook) : guint;
+begin
+ need_timer:=(a.flag0 and bm_TGtkNotebook_need_timer) shr bp_TGtkNotebook_need_timer;
+end;
+
+procedure set_need_timer(var a : TGtkNotebook; __need_timer : guint);
+begin
+ a.flag0:=a.flag0 or ((__need_timer shl bp_TGtkNotebook_need_timer) and bm_TGtkNotebook_need_timer);
+end;
+
+function child_has_focus(var a : TGtkNotebook) : guint;
+begin
+ child_has_focus:=(a.flag0 and bm_TGtkNotebook_child_has_focus) shr bp_TGtkNotebook_child_has_focus;
+end;
+
+procedure set_child_has_focus(var a : TGtkNotebook; __child_has_focus : guint);
+begin
+ a.flag0:=a.flag0 or ((__child_has_focus shl bp_TGtkNotebook_child_has_focus) and bm_TGtkNotebook_child_has_focus);
+end;
+
+function have_visible_child(var a : TGtkNotebook) : guint;
+begin
+ have_visible_child:=(a.flag0 and bm_TGtkNotebook_have_visible_child) shr bp_TGtkNotebook_have_visible_child;
+end;
+
+procedure set_have_visible_child(var a : TGtkNotebook; __have_visible_child : guint);
+begin
+ a.flag0:=a.flag0 or ((__have_visible_child shl bp_TGtkNotebook_have_visible_child) and bm_TGtkNotebook_have_visible_child);
+end;
+
+function focus_out(var a : TGtkNotebook) : guint;
+begin
+ focus_out:=(a.flag0 and bm_TGtkNotebook_focus_out) shr bp_TGtkNotebook_focus_out;
+end;
+
+procedure set_focus_out(var a : TGtkNotebook; __focus_out : guint);
+begin
+ a.flag0:=a.flag0 or ((__focus_out shl bp_TGtkNotebook_focus_out) and bm_TGtkNotebook_focus_out);
+end;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_notebook_current_page(notebook:PGtkNotebook):gint;
+begin
+ gtk_notebook_current_page:=gtk_notebook_get_current_page(notebook);
+end;
+
+procedure gtk_notebook_set_page(notebook:PGtkNotebook; page_num:gint);
+begin
+ gtk_notebook_set_current_page(notebook,page_num);
+end;
+{$endif}
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkobject.inc b/packages/gtk2/src/gtk+/gtk/gtkobject.inc
new file mode 100644
index 0000000000..0187a31bf8
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkobject.inc
@@ -0,0 +1,247 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ PGtkObject = ^TGtkObject;
+ PPGtkObject = ^PGtkObject;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ GtkObject only uses the first 4 bits of the flags field.
+ Derived objects may use the remaining bits. Though this
+ is a kinda nasty break up, it does make the size of
+ derived objects smaller.
+ }
+{ Used internally during dispose }
+
+ PGtkObjectFlags = ^TGtkObjectFlags;
+ TGtkObjectFlags = longint;
+
+
+{ The GtkObject structure is the base of the Gtk+ objects hierarchy,
+ it ``inherits'' from the GtkTypeObject by mirroring its fields,
+ which must always be kept in sync completely. The GtkObject defines
+ the few basic items that all derived classes contain.
+ }
+{ 32 bits of flags. GtkObject only uses 4 of these bits and
+ GtkWidget uses the rest. This is done because structs are
+ aligned on 4 or 8 byte boundaries. If a new bitfield were
+ used in GtkWidget much space would be wasted.
+ }
+ TGtkObject = record
+ parent_instance : TGObject;
+ flags : guint32;
+ end;
+
+{ The GtkObjectClass is the base of the Gtk+ objects classes hierarchy,
+ it ``inherits'' from the GtkTypeClass by mirroring its fields, which
+ must always be kept in sync completely. The GtkObjectClass defines
+ the basic necessities for the anObject inheritance mechanism to work.
+ }
+{ Non overridable class methods to set and get per class arguments }
+{ The function that will theEnd an objects life time. In one way ore
+ another all three of them are defined for all objects. If an
+ anObject class overrides one of the methods in order to perform class
+ specific destruction then it must still invoke its superclass'
+ implementation of the method after it is finished with its
+ own cleanup. (See the destroy function for GtkWidget for
+ an example of how to do this).
+ }
+ PGtkObjectClass = ^TGtkObjectClass;
+ TGtkObjectClass = record
+ parent_class : TGObjectClass;
+ set_arg : procedure (anObject:PGtkObject; arg:PGtkArg; arg_id:guint); cdecl;
+ get_arg : procedure (anObject:PGtkObject; arg:PGtkArg; arg_id:guint); cdecl;
+ destroy : procedure (anObject:PGtkObject); cdecl;
+ end;
+
+{$ifndef GTK_DISABLE_DEPRECATED }
+{ GtkArg flag bits for gtk_object_add_arg_type
+ }
+ PGtkArgFlags = ^TGtkArgFlags;
+ TGtkArgFlags = longint;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_IN_DESTRUCTION = 1 shl 0;
+ GTK_FLOATING = 1 shl 1;
+ GTK_RESERVED_1 = 1 shl 2;
+ GTK_RESERVED_2 = 1 shl 3;
+
+ GTK_ARG_READABLE = G_PARAM_READABLE;
+ GTK_ARG_WRITABLE = G_PARAM_WRITABLE;
+ GTK_ARG_CONSTRUCT = G_PARAM_CONSTRUCT;
+ GTK_ARG_CONSTRUCT_ONLY = G_PARAM_CONSTRUCT_ONLY;
+ GTK_ARG_CHILD_ARG = 1 shl 4;
+
+{ macros for casting a pointer to a GtkObject or GtkObjectClass pointer,
+ and to test whether `anObject' and `klass' are of type GTK_TYPE_OBJECT.
+ these are the standard macros for all GtkObject-derived classes.
+ }
+function GTK_TYPE_OBJECT : GType;
+function GTK_OBJECT(anObject: pointer) : PGtkObject;
+function GTK_OBJECT_CLASS(klass: pointer) : PGtkObjectClass;
+function GTK_IS_OBJECT(anObject: pointer) : boolean;
+function GTK_IS_OBJECT_CLASS(klass: pointer) : boolean;
+function GTK_OBJECT_GET_CLASS(anObject: pointer) : PGtkObjectClass;
+
+{ Macros for extracting various fields from GtkObject and GtkObjectClass.
+ }
+function GTK_OBJECT_TYPE(anObject: pointer) : GType;
+function GTK_OBJECT_TYPE_NAME(anObject: pointer) : PGChar;
+
+{ Macros for extracting the object_flags from GtkObject.
+ }
+function GTK_OBJECT_FLAGS(obj: pointer) : guint32;
+function GTK_OBJECT_FLOATING(obj: pointer) : gboolean;
+
+{ Macros for setting and clearing bits in the object_flags field of GtkObject.
+ }
+procedure GTK_OBJECT_SET_FLAGS(obj: pointer; flag: guint32);
+procedure GTK_OBJECT_UNSET_FLAGS(obj: pointer; flag: guint32);
+
+{ Application-level methods }
+
+function gtk_object_get_type:TGtkType; cdecl; external gtklib;
+function gtk_object_new(_type:TGtkType; first_property_name:Pgchar; args:array of const):PGtkObject; cdecl; overload; external gtklib;
+function gtk_object_new(_type:TGtkType; first_property_name:Pgchar):PGtkObject; cdecl; overload; varargs; external gtklib;
+procedure gtk_object_sink(anObject:PGtkObject); cdecl; external gtklib;
+procedure gtk_object_destroy(anObject:PGtkObject); cdecl; external gtklib;
+{ }
+
+{$ifndef GTK_DISABLE_DEPRECATED }
+function gtk_object_ref(anObject:PGtkObject):PGtkObject; cdecl; external gtklib;
+procedure gtk_object_unref(anObject:PGtkObject); cdecl; external gtklib;
+procedure gtk_object_weakref(anObject:PGtkObject; notify:TGtkDestroyNotify; data:gpointer); cdecl; external gtklib;
+procedure gtk_object_weakunref(anObject:PGtkObject; notify:TGtkDestroyNotify; data:gpointer); cdecl; external gtklib;
+{ Set 'data' to the "object_data" field of the anObject. The
+ data is indexed by the "key". If there is already data
+ associated with "key" then the new data will replace it.
+ If 'data' is NULL then this call is equivalent to
+ 'gtk_object_remove_data'.
+ The gtk_object_set_data_full variant acts just the same,
+ but takes an additional argument which is a function to
+ be called when the data is removed.
+ `gtk_object_remove_data' is equivalent to the above,
+ where 'data' is NULL
+ `gtk_object_get_data' gets the data associated with "key".
+ }
+procedure gtk_object_set_data(anObject:PGtkObject; key:Pgchar; data:gpointer); cdecl; external gtklib;
+procedure gtk_object_set_data_full(anObject:PGtkObject; key:Pgchar; data:gpointer; destroy:TGtkDestroyNotify); cdecl; external gtklib;
+procedure gtk_object_remove_data(anObject:PGtkObject; key:Pgchar); cdecl; external gtklib;
+function gtk_object_get_data(anObject:PGtkObject; key:Pgchar):gpointer; cdecl; external gtklib;
+procedure gtk_object_remove_no_notify(anObject:PGtkObject; key:Pgchar); cdecl; external gtklib;
+{ Set/get the "user_data" anObject data field of "anObject". It should
+ be noted that these functions are no different than calling
+ `gtk_object_set_data'/`gtk_object_get_data' with a key of "user_data".
+ They are merely provided as a convenience.
+ }
+procedure gtk_object_set_user_data(anObject:PGtkObject; data:gpointer); cdecl; external gtklib;
+function gtk_object_get_user_data(anObject:PGtkObject):gpointer; cdecl; external gtklib;
+{ Object-level methods }
+{ Object data method variants that operate on key ids. }
+procedure gtk_object_set_data_by_id(anObject:PGtkObject; data_id:TGQuark; data:gpointer); cdecl; external gtklib;
+procedure gtk_object_set_data_by_id_full(anObject:PGtkObject; data_id:TGQuark; data:gpointer; destroy:TGtkDestroyNotify); cdecl; external gtklib;
+function gtk_object_get_data_by_id(anObject:PGtkObject; data_id:TGQuark):gpointer; cdecl; external gtklib;
+procedure gtk_object_remove_data_by_id(anObject:PGtkObject; data_id:TGQuark); cdecl; external gtklib;
+procedure gtk_object_remove_no_notify_by_id(anObject:PGtkObject; key_id:TGQuark); cdecl; external gtklib;
+
+function gtk_object_data_try_key(_string:Pgchar):TGQuark;
+function gtk_object_data_force_id(_string:Pgchar):TGQuark;
+
+const
+ GTK_ARG_READWRITE = GTK_ARG_READABLE or GTK_ARG_WRITABLE;
+
+procedure gtk_object_get(anObject:PGtkObject; first_property_name:Pgchar; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_object_get(anObject:PGtkObject; first_property_name:Pgchar); cdecl; overload; varargs; external gtklib;
+procedure gtk_object_set(anObject:PGtkObject; first_property_name:Pgchar; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_object_set(anObject:PGtkObject; first_property_name:Pgchar); cdecl; overload; varargs; external gtklib;
+procedure gtk_object_add_arg_type(arg_name:Pgchar; arg_type:TGtkType; arg_flags:guint; arg_id:guint); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_OBJECT : GType;
+begin
+ GTK_TYPE_OBJECT:=gtk_object_get_type;
+end;
+
+function GTK_OBJECT(anObject: pointer) : PGtkObject;
+begin
+ GTK_OBJECT:=PGtkObject(GTK_CHECK_CAST(anObject,GTK_TYPE_OBJECT));
+end;
+
+function GTK_OBJECT_CLASS(klass: pointer) : PGtkObjectClass;
+begin
+ GTK_OBJECT_CLASS:=PGtkObjectClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_OBJECT));
+end;
+
+function GTK_IS_OBJECT(anObject: pointer) : boolean;
+begin
+ GTK_IS_OBJECT:=GTK_CHECK_TYPE(anObject,GTK_TYPE_OBJECT);
+end;
+
+function GTK_IS_OBJECT_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_OBJECT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_OBJECT);
+end;
+
+function GTK_OBJECT_GET_CLASS(anObject: pointer) : PGtkObjectClass;
+begin
+ GTK_OBJECT_GET_CLASS:=PGtkObjectClass(GTK_CHECK_GET_CLASS(anObject,GTK_TYPE_OBJECT));
+end;
+
+function GTK_OBJECT_TYPE(anObject: pointer) : GType;
+begin
+ GTK_OBJECT_TYPE:=G_TYPE_FROM_INSTANCE(anObject);
+end;
+
+function GTK_OBJECT_TYPE_NAME(anObject: pointer) : PGChar;
+begin
+ GTK_OBJECT_TYPE_NAME:=g_type_name(GTK_OBJECT_TYPE(anObject));
+end;
+
+function GTK_OBJECT_FLAGS(obj: pointer) : guint32;
+begin
+ GTK_OBJECT_FLAGS:=(GTK_OBJECT(obj))^.flags;
+end;
+
+function GTK_OBJECT_FLOATING(obj: pointer) : gboolean;
+begin
+ GTK_OBJECT_FLOATING:=((GTK_OBJECT_FLAGS(obj)) and GTK_FLOATING) <> 0;
+end;
+
+procedure GTK_OBJECT_SET_FLAGS(obj: pointer; flag: guint32);
+begin
+ GTK_OBJECT(obj)^.flags:=GTK_OBJECT(obj)^.flags or flag;
+end;
+
+procedure GTK_OBJECT_UNSET_FLAGS(obj: pointer; flag: guint32);
+begin
+ GTK_OBJECT(obj)^.flags:=GTK_OBJECT(obj)^.flags and not flag;
+end;
+
+function gtk_object_data_try_key(_string:Pgchar):TGQuark;
+begin
+ gtk_object_data_try_key:=g_quark_try_string(_string);
+end;
+
+function gtk_object_data_force_id(_string:Pgchar):TGQuark;
+begin
+ gtk_object_data_force_id:=g_quark_from_string(_string);
+end;
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkoldeditable.inc b/packages/gtk2/src/gtk+/gtk/gtkoldeditable.inc
new file mode 100644
index 0000000000..786a6870e9
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkoldeditable.inc
@@ -0,0 +1,148 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{< public > }
+{< private > }
+ PGtkOldEditable = ^TGtkOldEditable;
+ TGtkOldEditable = record
+ widget : TGtkWidget;
+ current_pos : guint;
+ selection_start_pos : guint;
+ selection_end_pos : guint;
+ flag0 : word;
+ clipboard_text : Pgchar;
+ end;
+
+ TGtkTextFunction = procedure (editable:PGtkOldEditable; time:guint32); cdecl;
+
+{ Bindings actions }
+{ Virtual functions. get_chars is in paricular not a signal because
+ it returns malloced memory. The others are not signals because
+ they would not be particularly useful as such. (All changes to
+ selection and position do not go through these functions)
+ }
+ PGtkOldEditableClass = ^TGtkOldEditableClass;
+ TGtkOldEditableClass = record
+ parent_class : TGtkWidgetClass;
+ activate : procedure (editable:PGtkOldEditable); cdecl;
+ set_editable : procedure (editable:PGtkOldEditable; is_editable:gboolean); cdecl;
+ move_cursor : procedure (editable:PGtkOldEditable; x:gint; y:gint); cdecl;
+ move_word : procedure (editable:PGtkOldEditable; n:gint); cdecl;
+ move_page : procedure (editable:PGtkOldEditable; x:gint; y:gint); cdecl;
+ move_to_row : procedure (editable:PGtkOldEditable; row:gint); cdecl;
+ move_to_column : procedure (editable:PGtkOldEditable; row:gint); cdecl;
+ kill_char : procedure (editable:PGtkOldEditable; direction:gint); cdecl;
+ kill_word : procedure (editable:PGtkOldEditable; direction:gint); cdecl;
+ kill_line : procedure (editable:PGtkOldEditable; direction:gint); cdecl;
+ cut_clipboard : procedure (editable:PGtkOldEditable); cdecl;
+ copy_clipboard : procedure (editable:PGtkOldEditable); cdecl;
+ paste_clipboard : procedure (editable:PGtkOldEditable); cdecl;
+ update_text : procedure (editable:PGtkOldEditable; start_pos:gint; end_pos:gint); cdecl;
+ get_chars : function (editable:PGtkOldEditable; start_pos:gint; end_pos:gint):Pgchar; cdecl;
+ set_selection : procedure (editable:PGtkOldEditable; start_pos:gint; end_pos:gint); cdecl;
+ set_position : procedure (editable:PGtkOldEditable; position:gint); cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkOldEditable_has_selection = $1;
+ bp_TGtkOldEditable_has_selection = 0;
+ bm_TGtkOldEditable_editable = $2;
+ bp_TGtkOldEditable_editable = 1;
+ bm_TGtkOldEditable_visible = $4;
+ bp_TGtkOldEditable_visible = 2;
+
+function GTK_TYPE_OLD_EDITABLE : GType;
+function GTK_OLD_EDITABLE(obj: pointer) : PGtkOldEditable;
+function GTK_OLD_EDITABLE_CLASS(klass: pointer) : PGtkOldEditableClass;
+function GTK_IS_OLD_EDITABLE(obj: pointer) : boolean;
+function GTK_IS_OLD_EDITABLE_CLASS(klass: pointer) : boolean;
+function GTK_OLD_EDITABLE_GET_CLASS(obj: pointer) : PGtkOldEditableClass;
+
+function has_selection(var a : TGtkOldEditable) : guint;
+procedure set_has_selection(var a : TGtkOldEditable; __has_selection : guint);
+function editable(var a : TGtkOldEditable) : guint; overload;
+procedure set_editable(var a : TGtkOldEditable; __editable : guint); overload;
+function visible(var a : TGtkOldEditable) : guint; overload;
+procedure set_visible(var a : TGtkOldEditable; __visible : guint); overload;
+
+function gtk_old_editable_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_old_editable_claim_selection(old_editable:PGtkOldEditable; claim:gboolean; time:guint32); cdecl; external gtklib;
+procedure gtk_old_editable_changed(old_editable:PGtkOldEditable); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_OLD_EDITABLE : GType;
+begin
+ GTK_TYPE_OLD_EDITABLE:=gtk_old_editable_get_type;
+end;
+
+function GTK_OLD_EDITABLE(obj: pointer) : PGtkOldEditable;
+begin
+ GTK_OLD_EDITABLE:=PGtkOldEditable(GTK_CHECK_CAST(obj,GTK_TYPE_OLD_EDITABLE));
+end;
+
+function GTK_OLD_EDITABLE_CLASS(klass: pointer) : PGtkOldEditableClass;
+begin
+ GTK_OLD_EDITABLE_CLASS:=PGtkOldEditableClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_OLD_EDITABLE));
+end;
+
+function GTK_IS_OLD_EDITABLE(obj: pointer) : boolean;
+begin
+ GTK_IS_OLD_EDITABLE:=GTK_CHECK_TYPE(obj,GTK_TYPE_OLD_EDITABLE);
+end;
+
+function GTK_IS_OLD_EDITABLE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_OLD_EDITABLE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_OLD_EDITABLE);
+end;
+
+function GTK_OLD_EDITABLE_GET_CLASS(obj: pointer) : PGtkOldEditableClass;
+begin
+ GTK_OLD_EDITABLE_GET_CLASS:=PGtkOldEditableClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_OLD_EDITABLE));
+end;
+
+function has_selection(var a : TGtkOldEditable) : guint;
+begin
+ has_selection:=(a.flag0 and bm_TGtkOldEditable_has_selection) shr bp_TGtkOldEditable_has_selection;
+end;
+
+procedure set_has_selection(var a : TGtkOldEditable; __has_selection : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_selection shl bp_TGtkOldEditable_has_selection) and bm_TGtkOldEditable_has_selection);
+end;
+
+function editable(var a : TGtkOldEditable) : guint;
+begin
+ editable:=(a.flag0 and bm_TGtkOldEditable_editable) shr bp_TGtkOldEditable_editable;
+end;
+
+procedure set_editable(var a : TGtkOldEditable; __editable : guint);
+begin
+ a.flag0:=a.flag0 or ((__editable shl bp_TGtkOldEditable_editable) and bm_TGtkOldEditable_editable);
+end;
+
+function visible(var a : TGtkOldEditable) : guint;
+begin
+ visible:=(a.flag0 and bm_TGtkOldEditable_visible) shr bp_TGtkOldEditable_visible;
+end;
+
+procedure set_visible(var a : TGtkOldEditable; __visible : guint);
+begin
+ a.flag0:=a.flag0 or ((__visible shl bp_TGtkOldEditable_visible) and bm_TGtkOldEditable_visible);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkoptionmenu.inc b/packages/gtk2/src/gtk+/gtk/gtkoptionmenu.inc
new file mode 100644
index 0000000000..bf3874639e
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkoptionmenu.inc
@@ -0,0 +1,86 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkOptionMenu = ^TGtkOptionMenu;
+ TGtkOptionMenu = record
+ button : TGtkButton;
+ menu : PGtkWidget;
+ menu_item : PGtkWidget;
+ width : guint16;
+ height : guint16;
+ end;
+
+{ Padding for future expansion }
+ PGtkOptionMenuClass = ^TGtkOptionMenuClass;
+ TGtkOptionMenuClass = record
+ parent_class : TGtkButtonClass;
+ changed : procedure (option_menu:PGtkOptionMenu); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_OPTION_MENU : GType;
+function GTK_OPTION_MENU(obj: pointer) : PGtkOptionMenu;
+function GTK_OPTION_MENU_CLASS(klass: pointer) : PGtkOptionMenuClass;
+function GTK_IS_OPTION_MENU(obj: pointer) : boolean;
+function GTK_IS_OPTION_MENU_CLASS(klass: pointer) : boolean;
+function GTK_OPTION_MENU_GET_CLASS(obj: pointer) : PGtkOptionMenuClass;
+
+
+function gtk_option_menu_get_type:TGtkType; cdecl; external gtklib;
+function gtk_option_menu_new:PGtkWidget; cdecl; external gtklib;
+function gtk_option_menu_get_menu(option_menu:PGtkOptionMenu):PGtkWidget; cdecl; external gtklib;
+procedure gtk_option_menu_set_menu(option_menu:PGtkOptionMenu; menu:PGtkWidget); cdecl; external gtklib;
+procedure gtk_option_menu_remove_menu(option_menu:PGtkOptionMenu); cdecl; external gtklib;
+function gtk_option_menu_get_history(option_menu:PGtkOptionMenu):gint; cdecl; external gtklib;
+procedure gtk_option_menu_set_history(option_menu:PGtkOptionMenu; index:guint); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_OPTION_MENU : GType;
+begin
+ GTK_TYPE_OPTION_MENU:=gtk_option_menu_get_type;
+end;
+
+function GTK_OPTION_MENU(obj: pointer) : PGtkOptionMenu;
+begin
+ GTK_OPTION_MENU:=PGtkOptionMenu(GTK_CHECK_CAST(obj,GTK_TYPE_OPTION_MENU));
+end;
+
+function GTK_OPTION_MENU_CLASS(klass: pointer) : PGtkOptionMenuClass;
+begin
+ GTK_OPTION_MENU_CLASS:=PGtkOptionMenuClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_OPTION_MENU));
+end;
+
+function GTK_IS_OPTION_MENU(obj: pointer) : boolean;
+begin
+ GTK_IS_OPTION_MENU:=GTK_CHECK_TYPE(obj,GTK_TYPE_OPTION_MENU);
+end;
+
+function GTK_IS_OPTION_MENU_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_OPTION_MENU_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_OPTION_MENU);
+end;
+
+function GTK_OPTION_MENU_GET_CLASS(obj: pointer) : PGtkOptionMenuClass;
+begin
+ GTK_OPTION_MENU_GET_CLASS:=PGtkOptionMenuClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_OPTION_MENU));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkpaned.inc b/packages/gtk2/src/gtk+/gtk/gtkpaned.inc
new file mode 100644
index 0000000000..76544fe2a3
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkpaned.inc
@@ -0,0 +1,255 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{< private > }
+ PGtkPaned = ^TGtkPaned;
+ TGtkPaned = record
+ container : TGtkContainer;
+ child1 : PGtkWidget;
+ child2 : PGtkWidget;
+ handle : PGdkWindow;
+ xor_gc : PGdkGC;
+ cursor_type : TGdkCursorType;
+ handle_pos : TGdkRectangle;
+ child1_size : gint;
+ last_allocation : gint;
+ min_position : gint;
+ max_position : gint;
+ flag0 : word;
+ last_child1_focus : PGtkWidget;
+ last_child2_focus : PGtkWidget;
+ saved_focus : PGtkWidget;
+ drag_pos : gint;
+ original_position : gint;
+ end;
+
+{ Padding for future expansion }
+ PGtkPanedClass = ^TGtkPanedClass;
+ TGtkPanedClass = record
+ parent_class : TGtkContainerClass;
+ cycle_child_focus : function (paned:PGtkPaned; reverse:gboolean):gboolean; cdecl;
+ toggle_handle_focus : function (paned:PGtkPaned):gboolean; cdecl;
+ move_handle : function (paned:PGtkPaned; scroll:TGtkScrollType):gboolean; cdecl;
+ cycle_handle_focus : function (paned:PGtkPaned; reverse:gboolean):gboolean; cdecl;
+ accept_position : function (paned:PGtkPaned):gboolean; cdecl;
+ cancel_position : function (paned:PGtkPaned):gboolean; cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkPaned_position_set = $1;
+ bp_TGtkPaned_position_set = 0;
+ bm_TGtkPaned_in_drag = $2;
+ bp_TGtkPaned_in_drag = 1;
+ bm_TGtkPaned_child1_shrink = $4;
+ bp_TGtkPaned_child1_shrink = 2;
+ bm_TGtkPaned_child1_resize = $8;
+ bp_TGtkPaned_child1_resize = 3;
+ bm_TGtkPaned_child2_shrink = $10;
+ bp_TGtkPaned_child2_shrink = 4;
+ bm_TGtkPaned_child2_resize = $20;
+ bp_TGtkPaned_child2_resize = 5;
+ bm_TGtkPaned_orientation = $40;
+ bp_TGtkPaned_orientation = 6;
+ bm_TGtkPaned_in_recursion = $80;
+ bp_TGtkPaned_in_recursion = 7;
+ bm_TGtkPaned_handle_prelit = $100;
+ bp_TGtkPaned_handle_prelit = 8;
+
+
+function GTK_TYPE_PANED : GType;
+function GTK_PANED(obj: pointer) : PGtkPaned;
+function GTK_PANED_CLASS(klass: pointer) : PGtkPanedClass;
+function GTK_IS_PANED(obj: pointer) : boolean;
+function GTK_IS_PANED_CLASS(klass: pointer) : boolean;
+function GTK_PANED_GET_CLASS(obj: pointer) : PGtkPanedClass;
+
+function position_set(var a : TGtkPaned) : guint;
+procedure set_position_set(var a : TGtkPaned; __position_set : guint);
+function in_drag(var a : TGtkPaned) : guint; overload;
+procedure set_in_drag(var a : TGtkPaned; __in_drag : guint); overload;
+function child1_shrink(var a : TGtkPaned) : guint;
+procedure set_child1_shrink(var a : TGtkPaned; __child1_shrink : guint);
+function child1_resize(var a : TGtkPaned) : guint;
+procedure set_child1_resize(var a : TGtkPaned; __child1_resize : guint);
+function child2_shrink(var a : TGtkPaned) : guint;
+procedure set_child2_shrink(var a : TGtkPaned; __child2_shrink : guint);
+function child2_resize(var a : TGtkPaned) : guint;
+procedure set_child2_resize(var a : TGtkPaned; __child2_resize : guint);
+function orientation(var a : TGtkPaned) : guint;
+procedure set_orientation(var a : TGtkPaned; __orientation : guint);
+function in_recursion(var a : TGtkPaned) : guint;
+procedure set_in_recursion(var a : TGtkPaned; __in_recursion : guint);
+function handle_prelit(var a : TGtkPaned) : guint;
+procedure set_handle_prelit(var a : TGtkPaned; __handle_prelit : guint);
+
+function gtk_paned_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_paned_add1(paned:PGtkPaned; child:PGtkWidget); cdecl; external gtklib;
+procedure gtk_paned_add2(paned:PGtkPaned; child:PGtkWidget); cdecl; external gtklib;
+procedure gtk_paned_pack1(paned:PGtkPaned; child:PGtkWidget; resize:gboolean; shrink:gboolean); cdecl; external gtklib;
+procedure gtk_paned_pack2(paned:PGtkPaned; child:PGtkWidget; resize:gboolean; shrink:gboolean); cdecl; external gtklib;
+function gtk_paned_get_position(paned:PGtkPaned):gint; cdecl; external gtklib;
+procedure gtk_paned_set_position(paned:PGtkPaned; position:gint); cdecl; external gtklib;
+
+{ Internal function }
+procedure gtk_paned_compute_position(paned:PGtkPaned; allocation:gint; child1_req:gint; child2_req:gint); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_paned_gutter_size(p : pointer; s: gint);
+procedure gtk_paned_set_gutter_size(p: pointer; s : gint);
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_PANED : GType;
+begin
+ GTK_TYPE_PANED:=gtk_paned_get_type;
+end;
+
+function GTK_PANED(obj: pointer) : PGtkPaned;
+begin
+ GTK_PANED:=PGtkPaned(GTK_CHECK_CAST(obj,GTK_TYPE_PANED));
+end;
+
+function GTK_PANED_CLASS(klass: pointer) : PGtkPanedClass;
+begin
+ GTK_PANED_CLASS:=PGtkPanedClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_PANED));
+end;
+
+function GTK_IS_PANED(obj: pointer) : boolean;
+begin
+ GTK_IS_PANED:=GTK_CHECK_TYPE(obj,GTK_TYPE_PANED);
+end;
+
+function GTK_IS_PANED_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_PANED_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_PANED);
+end;
+
+function GTK_PANED_GET_CLASS(obj: pointer) : PGtkPanedClass;
+begin
+ GTK_PANED_GET_CLASS:=PGtkPanedClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_PANED));
+end;
+
+function position_set(var a : TGtkPaned) : guint;
+begin
+ position_set:=(a.flag0 and bm_TGtkPaned_position_set) shr bp_TGtkPaned_position_set;
+end;
+
+procedure set_position_set(var a : TGtkPaned; __position_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__position_set shl bp_TGtkPaned_position_set) and bm_TGtkPaned_position_set);
+end;
+
+function in_drag(var a : TGtkPaned) : guint;
+begin
+ in_drag:=(a.flag0 and bm_TGtkPaned_in_drag) shr bp_TGtkPaned_in_drag;
+end;
+
+procedure set_in_drag(var a : TGtkPaned; __in_drag : guint);
+begin
+ a.flag0:=a.flag0 or ((__in_drag shl bp_TGtkPaned_in_drag) and bm_TGtkPaned_in_drag);
+end;
+
+function child1_shrink(var a : TGtkPaned) : guint;
+begin
+ child1_shrink:=(a.flag0 and bm_TGtkPaned_child1_shrink) shr bp_TGtkPaned_child1_shrink;
+end;
+
+procedure set_child1_shrink(var a : TGtkPaned; __child1_shrink : guint);
+begin
+ a.flag0:=a.flag0 or ((__child1_shrink shl bp_TGtkPaned_child1_shrink) and bm_TGtkPaned_child1_shrink);
+end;
+
+function child1_resize(var a : TGtkPaned) : guint;
+begin
+ child1_resize:=(a.flag0 and bm_TGtkPaned_child1_resize) shr bp_TGtkPaned_child1_resize;
+end;
+
+procedure set_child1_resize(var a : TGtkPaned; __child1_resize : guint);
+begin
+ a.flag0:=a.flag0 or ((__child1_resize shl bp_TGtkPaned_child1_resize) and bm_TGtkPaned_child1_resize);
+end;
+
+function child2_shrink(var a : TGtkPaned) : guint;
+begin
+ child2_shrink:=(a.flag0 and bm_TGtkPaned_child2_shrink) shr bp_TGtkPaned_child2_shrink;
+end;
+
+procedure set_child2_shrink(var a : TGtkPaned; __child2_shrink : guint);
+begin
+ a.flag0:=a.flag0 or ((__child2_shrink shl bp_TGtkPaned_child2_shrink) and bm_TGtkPaned_child2_shrink);
+end;
+
+function child2_resize(var a : TGtkPaned) : guint;
+begin
+ child2_resize:=(a.flag0 and bm_TGtkPaned_child2_resize) shr bp_TGtkPaned_child2_resize;
+end;
+
+procedure set_child2_resize(var a : TGtkPaned; __child2_resize : guint);
+begin
+ a.flag0:=a.flag0 or ((__child2_resize shl bp_TGtkPaned_child2_resize) and bm_TGtkPaned_child2_resize);
+end;
+
+function orientation(var a : TGtkPaned) : guint;
+begin
+ orientation:=(a.flag0 and bm_TGtkPaned_orientation) shr bp_TGtkPaned_orientation;
+end;
+
+procedure set_orientation(var a : TGtkPaned; __orientation : guint);
+begin
+ a.flag0:=a.flag0 or ((__orientation shl bp_TGtkPaned_orientation) and bm_TGtkPaned_orientation);
+end;
+
+function in_recursion(var a : TGtkPaned) : guint;
+begin
+ in_recursion:=(a.flag0 and bm_TGtkPaned_in_recursion) shr bp_TGtkPaned_in_recursion;
+end;
+
+procedure set_in_recursion(var a : TGtkPaned; __in_recursion : guint);
+begin
+ a.flag0:=a.flag0 or ((__in_recursion shl bp_TGtkPaned_in_recursion) and bm_TGtkPaned_in_recursion);
+end;
+
+function handle_prelit(var a : TGtkPaned) : guint;
+begin
+ handle_prelit:=(a.flag0 and bm_TGtkPaned_handle_prelit) shr bp_TGtkPaned_handle_prelit;
+end;
+
+procedure set_handle_prelit(var a : TGtkPaned; __handle_prelit : guint);
+begin
+ a.flag0:=a.flag0 or ((__handle_prelit shl bp_TGtkPaned_handle_prelit) and bm_TGtkPaned_handle_prelit);
+end;
+
+procedure gtk_paned_gutter_size(p : pointer; s: gint);
+begin
+ // Dummy statement
+ if (p<>nil) and (s<>0) then ;
+end;
+
+procedure gtk_paned_set_gutter_size(p: pointer; s : gint);
+begin
+ // Dummy statement
+ if (p<>nil) and (s<>0) then ;
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkpixmap.inc b/packages/gtk2/src/gtk+/gtk/gtkpixmap.inc
new file mode 100644
index 0000000000..70e5f14e7c
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkpixmap.inc
@@ -0,0 +1,95 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkPixmap = ^TGtkPixmap;
+ TGtkPixmap = record
+ misc : TGtkMisc;
+ pixmap : PGdkPixmap;
+ mask : PGdkBitmap;
+ pixmap_insensitive : PGdkPixmap;
+ flag0 : word;
+ end;
+
+ PGtkPixmapClass = ^TGtkPixmapClass;
+ TGtkPixmapClass = record
+ parent_class : TGtkMiscClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkPixmap_build_insensitive = $1;
+ bp_TGtkPixmap_build_insensitive = 0;
+
+
+function GTK_TYPE_PIXMAP : GType;
+function GTK_PIXMAP(obj: pointer) : PGtkPixmap;
+function GTK_PIXMAP_CLASS(klass: pointer) : PGtkPixmapClass;
+function GTK_IS_PIXMAP(obj: pointer) : boolean;
+function GTK_IS_PIXMAP_CLASS(klass: pointer) : boolean;
+function GTK_PIXMAP_GET_CLASS(obj: pointer) : PGtkPixmapClass;
+
+function build_insensitive(var a : TGtkPixmap) : guint;
+procedure set_build_insensitive(var a : TGtkPixmap; __build_insensitive : guint);
+
+function gtk_pixmap_get_type:TGtkType; cdecl; external gtklib;
+function gtk_pixmap_new(pixmap:PGdkPixmap; mask:PGdkBitmap):PGtkWidget; cdecl; external gtklib;
+procedure gtk_pixmap_set(pixmap:PGtkPixmap; val:PGdkPixmap; mask:PGdkBitmap); cdecl; external gtklib;
+procedure gtk_pixmap_get(pixmap:PGtkPixmap; var val:PGdkPixmap; var mask:PGdkBitmap); cdecl; external gtklib;
+procedure gtk_pixmap_set_build_insensitive(pixmap:PGtkPixmap; build:gboolean); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_PIXMAP : GType;
+begin
+ GTK_TYPE_PIXMAP:=gtk_pixmap_get_type;
+end;
+
+function GTK_PIXMAP(obj: pointer) : PGtkPixmap;
+begin
+ GTK_PIXMAP:=PGtkPixmap(GTK_CHECK_CAST(obj,GTK_TYPE_PIXMAP));
+end;
+
+function GTK_PIXMAP_CLASS(klass: pointer) : PGtkPixmapClass;
+begin
+ GTK_PIXMAP_CLASS:=PGtkPixmapClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_PIXMAP));
+end;
+
+function GTK_IS_PIXMAP(obj: pointer) : boolean;
+begin
+ GTK_IS_PIXMAP:=GTK_CHECK_TYPE(obj,GTK_TYPE_PIXMAP);
+end;
+
+function GTK_IS_PIXMAP_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_PIXMAP_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_PIXMAP);
+end;
+
+function GTK_PIXMAP_GET_CLASS(obj: pointer) : PGtkPixmapClass;
+begin
+ GTK_PIXMAP_GET_CLASS:=PGtkPixmapClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_PIXMAP));
+end;
+
+function build_insensitive(var a : TGtkPixmap) : guint;
+begin
+ build_insensitive:=(a.flag0 and bm_TGtkPixmap_build_insensitive) shr bp_TGtkPixmap_build_insensitive;
+end;
+
+procedure set_build_insensitive(var a : TGtkPixmap; __build_insensitive : guint);
+begin
+ a.flag0:=a.flag0 or ((__build_insensitive shl bp_TGtkPixmap_build_insensitive) and bm_TGtkPixmap_build_insensitive);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkplug.inc b/packages/gtk2/src/gtk+/gtk/gtkplug.inc
new file mode 100644
index 0000000000..bf52302c96
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkplug.inc
@@ -0,0 +1,107 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkPlug = ^TGtkPlug;
+ TGtkPlug = record
+ window : TGtkWindow;
+ socket_window : PGdkWindow;
+ modality_window : PGtkWidget;
+ modality_group : PGtkWindowGroup;
+ grabbed_keys : PGHashTable;
+ flag0 : word;
+ end;
+
+{ Padding for future expansion }
+ PGtkPlugClass = ^TGtkPlugClass;
+ TGtkPlugClass = record
+ parent_class : TGtkWindowClass;
+ embedded : procedure (plug:PGtkPlug); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkPlug_same_app = $1;
+ bp_TGtkPlug_same_app = 0;
+function GTK_TYPE_PLUG : GType;
+function GTK_PLUG(obj: pointer) : PGtkPlug;
+function GTK_PLUG_CLASS(klass: pointer) : PGtkPlugClass;
+function GTK_IS_PLUG(obj: pointer) : boolean;
+function GTK_IS_PLUG_CLASS(klass: pointer) : boolean;
+function GTK_PLUG_GET_CLASS(obj: pointer) : PGtkPlugClass;
+
+function same_app(var a : TGtkPlug) : guint; overload;
+procedure set_same_app(var a : TGtkPlug; __same_app : guint); overload;
+
+
+function gtk_plug_get_type:TGtkType; cdecl; external gtklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+procedure gtk_plug_construct(plug:PGtkPlug; socket_id:TGdkNativeWindow); cdecl; external gtklib;
+function gtk_plug_new(socket_id:TGdkNativeWindow):PGtkWidget; cdecl; external gtklib;
+{$endif}
+
+procedure gtk_plug_construct_for_display(plug:PGtkPlug; display:PGdkDisplay; socket_id:TGdkNativeWindow); cdecl; external gtklib;
+function gtk_plug_new_for_display(display:PGdkDisplay; socket_id:TGdkNativeWindow):PGtkWidget; cdecl; external gtklib;
+function gtk_plug_get_id(plug:PGtkPlug):TGdkNativeWindow; cdecl; external gtklib;
+procedure _gtk_plug_add_to_socket(plug:PGtkPlug; socket:PGtkSocket); cdecl; external gtklib;
+procedure _gtk_plug_remove_from_socket(plug:PGtkPlug; socket:PGtkSocket); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_PLUG : GType;
+begin
+ GTK_TYPE_PLUG:=gtk_plug_get_type;
+end;
+
+function GTK_PLUG(obj: pointer) : PGtkPlug;
+begin
+ GTK_PLUG:=PGtkPlug(GTK_CHECK_CAST(obj,GTK_TYPE_PLUG));
+end;
+
+function GTK_PLUG_CLASS(klass: pointer) : PGtkPlugClass;
+begin
+ GTK_PLUG_CLASS:=PGtkPlugClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_PLUG));
+end;
+
+function GTK_IS_PLUG(obj: pointer) : boolean;
+begin
+ GTK_IS_PLUG:=GTK_CHECK_TYPE(obj,GTK_TYPE_PLUG);
+end;
+
+function GTK_IS_PLUG_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_PLUG_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_PLUG);
+end;
+
+function GTK_PLUG_GET_CLASS(obj: pointer) : PGtkPlugClass;
+begin
+ GTK_PLUG_GET_CLASS:=PGtkPlugClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_PLUG));
+end;
+
+function same_app(var a : TGtkPlug) : guint;
+begin
+ same_app:=(a.flag0 and bm_TGtkPlug_same_app) shr bp_TGtkPlug_same_app;
+end;
+
+procedure set_same_app(var a : TGtkPlug; __same_app : guint);
+begin
+ a.flag0:=a.flag0 or ((__same_app shl bp_TGtkPlug_same_app) and bm_TGtkPlug_same_app);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkpreview.inc b/packages/gtk2/src/gtk+/gtk/gtkpreview.inc
new file mode 100644
index 0000000000..a5599fa44a
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkpreview.inc
@@ -0,0 +1,147 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkPreview = ^TGtkPreview;
+ TGtkPreview = record
+ widget : TGtkWidget;
+ buffer : Pguchar;
+ buffer_width : guint16;
+ buffer_height : guint16;
+ bpp : guint16;
+ rowstride : guint16;
+ dither : TGdkRgbDither;
+ flag0 : word;
+ end;
+
+ PGtkPreviewInfo = ^TGtkPreviewInfo;
+ TGtkPreviewInfo = record
+ lookup : Pguchar;
+ gamma : gdouble;
+ end;
+
+ PGtkDitherInfo = ^TGtkDitherInfo;
+ TGtkDitherInfo = record
+ case longint of
+ 0 : ( s : array[0..1] of gushort );
+ 1 : ( c : array[0..3] of guchar );
+ end;
+
+ PGtkPreviewClass = ^TGtkPreviewClass;
+ TGtkPreviewClass = record
+ parent_class : TGtkWidgetClass;
+ info : TGtkPreviewInfo;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkPreview_type = $1;
+ bp_TGtkPreview_type = 0;
+ bm_TGtkPreview_expand = $2;
+ bp_TGtkPreview_expand = 1;
+
+
+function GTK_TYPE_PREVIEW : GType;
+function GTK_PREVIEW(obj: pointer) : PGtkPreview;
+function GTK_PREVIEW_CLASS(klass: pointer) : PGtkPreviewClass;
+function GTK_IS_PREVIEW(obj: pointer) : boolean;
+function GTK_IS_PREVIEW_CLASS(klass: pointer) : boolean;
+function GTK_PREVIEW_GET_CLASS(obj: pointer) : PGtkPreviewClass;
+
+function get_type(var a : TGtkPreview) : guint; overload;
+procedure set_type(var a : TGtkPreview; __type : guint); overload;
+function get_expand(var a : TGtkPreview) : guint; overload;
+procedure set_expand(var a : TGtkPreview; __expand : guint); overload;
+
+function gtk_preview_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_preview_uninit; cdecl; external gtklib;
+function gtk_preview_new(_type:TGtkPreviewType):PGtkWidget; cdecl; external gtklib;
+procedure gtk_preview_size(preview:PGtkPreview; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_preview_put(preview:PGtkPreview; window:PGdkWindow; gc:PGdkGC; srcx:gint; srcy:gint;
+ destx:gint; desty:gint; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_preview_draw_row(preview:PGtkPreview; data:Pguchar; x:gint; y:gint; w:gint); cdecl; external gtklib;
+procedure gtk_preview_set_expand(preview:PGtkPreview; expand:gboolean); cdecl; external gtklib;
+procedure gtk_preview_set_gamma(gamma:double); cdecl; external gtklib;
+procedure gtk_preview_set_color_cube(nred_shades:guint; ngreen_shades:guint; nblue_shades:guint; ngray_shades:guint); cdecl; external gtklib;
+procedure gtk_preview_set_install_cmap(install_cmap:gint); cdecl; external gtklib;
+procedure gtk_preview_set_reserved(nreserved:gint); cdecl; external gtklib;
+procedure gtk_preview_set_dither(preview:PGtkPreview; dither:TGdkRgbDither); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_preview_get_visual:PGdkVisual; cdecl; external gtklib;
+function gtk_preview_get_cmap:PGdkColormap; cdecl; external gtklib;
+{$endif}
+
+function gtk_preview_get_info:PGtkPreviewInfo; cdecl; external gtklib;
+{ This function reinitializes the preview colormap and visual from
+ the current gamma/color_cube/install_cmap settings. It must only
+ be called if there are no previews or users's of the preview
+ colormap in existence.
+ }
+procedure gtk_preview_reset; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_PREVIEW : GType;
+begin
+ GTK_TYPE_PREVIEW:=gtk_preview_get_type;
+end;
+
+function GTK_PREVIEW(obj: pointer) : PGtkPreview;
+begin
+ GTK_PREVIEW:=PGtkPreview(GTK_CHECK_CAST(obj,GTK_TYPE_PREVIEW));
+end;
+
+function GTK_PREVIEW_CLASS(klass: pointer) : PGtkPreviewClass;
+begin
+ GTK_PREVIEW_CLASS:=PGtkPreviewClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_PREVIEW));
+end;
+
+function GTK_IS_PREVIEW(obj: pointer) : boolean;
+begin
+ GTK_IS_PREVIEW:=GTK_CHECK_TYPE(obj,GTK_TYPE_PREVIEW);
+end;
+
+function GTK_IS_PREVIEW_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_PREVIEW_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_PREVIEW);
+end;
+
+function GTK_PREVIEW_GET_CLASS(obj: pointer) : PGtkPreviewClass;
+begin
+ GTK_PREVIEW_GET_CLASS:=PGtkPreviewClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_PREVIEW));
+end;
+
+function get_type(var a : TGtkPreview) : guint;
+begin
+ get_type:=(a.flag0 and bm_TGtkPreview_type) shr bp_TGtkPreview_type;
+end;
+
+procedure set_type(var a : TGtkPreview; __type : guint);
+begin
+ a.flag0:=a.flag0 or ((__type shl bp_TGtkPreview_type) and bm_TGtkPreview_type);
+end;
+
+function get_expand(var a : TGtkPreview) : guint;
+begin
+ get_expand:=(a.flag0 and bm_TGtkPreview_expand) shr bp_TGtkPreview_expand;
+end;
+
+procedure set_expand(var a : TGtkPreview; __expand : guint);
+begin
+ a.flag0:=a.flag0 or ((__expand shl bp_TGtkPreview_expand) and bm_TGtkPreview_expand);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkprogress.inc b/packages/gtk2/src/gtk+/gtk/gtkprogress.inc
new file mode 100644
index 0000000000..e506f9efe4
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkprogress.inc
@@ -0,0 +1,152 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkProgress = ^TGtkProgress;
+ TGtkProgress = record
+ widget : TGtkWidget;
+ adjustment : PGtkAdjustment;
+ offscreen_pixmap : PGdkPixmap;
+ format : Pgchar;
+ x_align : gfloat;
+ y_align : gfloat;
+ flag0 : word;
+ end;
+
+{ Padding for future expansion }
+ PGtkProgressClass = ^TGtkProgressClass;
+ TGtkProgressClass = record
+ parent_class : TGtkWidgetClass;
+ paint : procedure (progress:PGtkProgress); cdecl;
+ update : procedure (progress:PGtkProgress); cdecl;
+ act_mode_enter : procedure (progress:PGtkProgress); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkProgress_show_text = $1;
+ bp_TGtkProgress_show_text = 0;
+ bm_TGtkProgress_activity_mode = $2;
+ bp_TGtkProgress_activity_mode = 1;
+ bm_TGtkProgress_use_text_format = $4;
+ bp_TGtkProgress_use_text_format = 2;
+
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function GTK_TYPE_PROGRESS : GType;
+function GTK_PROGRESS(obj: pointer) : PGtkProgress;
+function GTK_PROGRESS_CLASS(klass: pointer) : PGtkProgressClass;
+function GTK_IS_PROGRESS(obj: pointer) : boolean;
+function GTK_IS_PROGRESS_CLASS(klass: pointer) : boolean;
+function GTK_PROGRESS_GET_CLASS(obj: pointer) : PGtkProgressClass;
+
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+function show_text(var a : TGtkProgress) : guint;
+procedure set_show_text(var a : TGtkProgress; __show_text : guint);
+function activity_mode(var a : TGtkProgress) : guint;
+procedure set_activity_mode(var a : TGtkProgress; __activity_mode : guint);
+function use_text_format(var a : TGtkProgress) : guint;
+procedure set_use_text_format(var a : TGtkProgress; __use_text_format : guint);
+
+{ This entire interface is deprecated. Use GtkProgressBar
+ directly.
+ }
+{$ifndef GTK_DISABLE_DEPRECATED}
+
+function gtk_progress_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_progress_set_show_text(progress:PGtkProgress; show_text:gboolean); cdecl; external gtklib;
+procedure gtk_progress_set_text_alignment(progress:PGtkProgress; x_align:gfloat; y_align:gfloat); cdecl; external gtklib;
+procedure gtk_progress_set_format_string(progress:PGtkProgress; format:Pgchar); cdecl; external gtklib;
+procedure gtk_progress_set_adjustment(progress:PGtkProgress; adjustment:PGtkAdjustment); cdecl; external gtklib;
+procedure gtk_progress_configure(progress:PGtkProgress; value:gdouble; min:gdouble; max:gdouble); cdecl; external gtklib;
+procedure gtk_progress_set_percentage(progress:PGtkProgress; percentage:gdouble); cdecl; external gtklib;
+procedure gtk_progress_set_value(progress:PGtkProgress; value:gdouble); cdecl; external gtklib;
+function gtk_progress_get_value(progress:PGtkProgress):gdouble; cdecl; external gtklib;
+procedure gtk_progress_set_activity_mode(progress:PGtkProgress; activity_mode:gboolean); cdecl; external gtklib;
+function gtk_progress_get_current_text(progress:PGtkProgress):Pgchar; cdecl; external gtklib;
+function gtk_progress_get_text_from_value(progress:PGtkProgress; value:gdouble):Pgchar; cdecl; external gtklib;
+function gtk_progress_get_current_percentage(progress:PGtkProgress):gdouble; cdecl; external gtklib;
+function gtk_progress_get_percentage_from_value(progress:PGtkProgress; value:gdouble):gdouble; cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_PROGRESS : GType;
+begin
+ GTK_TYPE_PROGRESS:=gtk_progress_get_type;
+end;
+
+function GTK_PROGRESS(obj: pointer) : PGtkProgress;
+begin
+ GTK_PROGRESS:=PGtkProgress(GTK_CHECK_CAST(obj,GTK_TYPE_PROGRESS));
+end;
+
+function GTK_PROGRESS_CLASS(klass: pointer) : PGtkProgressClass;
+begin
+ GTK_PROGRESS_CLASS:=PGtkProgressClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_PROGRESS));
+end;
+
+function GTK_IS_PROGRESS(obj: pointer) : boolean;
+begin
+ GTK_IS_PROGRESS:=GTK_CHECK_TYPE(obj,GTK_TYPE_PROGRESS);
+end;
+
+function GTK_IS_PROGRESS_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_PROGRESS_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_PROGRESS);
+end;
+
+function GTK_PROGRESS_GET_CLASS(obj: pointer) : PGtkProgressClass;
+begin
+ GTK_PROGRESS_GET_CLASS:=PGtkProgressClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_PROGRESS));
+end;
+
+function show_text(var a : TGtkProgress) : guint;
+begin
+ show_text:=(a.flag0 and bm_TGtkProgress_show_text) shr bp_TGtkProgress_show_text;
+end;
+
+procedure set_show_text(var a : TGtkProgress; __show_text : guint);
+begin
+ a.flag0:=a.flag0 or ((__show_text shl bp_TGtkProgress_show_text) and bm_TGtkProgress_show_text);
+end;
+
+function activity_mode(var a : TGtkProgress) : guint;
+begin
+ activity_mode:=(a.flag0 and bm_TGtkProgress_activity_mode) shr bp_TGtkProgress_activity_mode;
+end;
+
+procedure set_activity_mode(var a : TGtkProgress; __activity_mode : guint);
+begin
+ a.flag0:=a.flag0 or ((__activity_mode shl bp_TGtkProgress_activity_mode) and bm_TGtkProgress_activity_mode);
+end;
+
+function use_text_format(var a : TGtkProgress) : guint;
+begin
+ use_text_format:=(a.flag0 and bm_TGtkProgress_use_text_format) shr bp_TGtkProgress_use_text_format;
+end;
+
+procedure set_use_text_format(var a : TGtkProgress; __use_text_format : guint);
+begin
+ a.flag0:=a.flag0 or ((__use_text_format shl bp_TGtkProgress_use_text_format) and bm_TGtkProgress_use_text_format);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkprogressbar.inc b/packages/gtk2/src/gtk+/gtk/gtkprogressbar.inc
new file mode 100644
index 0000000000..d47a883477
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkprogressbar.inc
@@ -0,0 +1,167 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkProgressBarStyle = ^TGtkProgressBarStyle;
+ TGtkProgressBarStyle = (
+ GTK_PROGRESS_CONTINUOUS,
+ GTK_PROGRESS_DISCRETE
+ );
+
+ PGtkProgressBarOrientation = ^TGtkProgressBarOrientation;
+ TGtkProgressBarOrientation = (
+ GTK_PROGRESS_LEFT_TO_RIGHT,
+ GTK_PROGRESS_RIGHT_TO_LEFT,
+ GTK_PROGRESS_BOTTOM_TO_TOP,
+ GTK_PROGRESS_TOP_TO_BOTTOM
+ );
+
+ PGtkProgressBar = ^TGtkProgressBar;
+ TGtkProgressBar = record
+ progress : TGtkProgress;
+ bar_style : TGtkProgressBarStyle;
+ orientation : TGtkProgressBarOrientation;
+ blocks : guint;
+ in_block : gint;
+ activity_pos : gint;
+ activity_step : guint;
+ activity_blocks : guint;
+ pulse_fraction : gdouble;
+ flag0 : word;
+ end;
+
+{ Padding for future expansion }
+ PGtkProgressBarClass = ^TGtkProgressBarClass;
+ TGtkProgressBarClass = record
+ parent_class : TGtkProgressClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkProgressBar_activity_dir = $1;
+ bp_TGtkProgressBar_activity_dir = 0;
+
+
+function GTK_TYPE_PROGRESS_BAR : GType;
+function GTK_PROGRESS_BAR(obj: pointer) : PGtkProgressBar;
+function GTK_PROGRESS_BAR_CLASS(klass: pointer) : PGtkProgressBarClass;
+function GTK_IS_PROGRESS_BAR(obj: pointer) : boolean;
+function GTK_IS_PROGRESS_BAR_CLASS(klass: pointer) : boolean;
+function GTK_PROGRESS_BAR_GET_CLASS(obj: pointer) : PGtkProgressBarClass;
+
+function activity_dir(var a : TGtkProgressBar) : guint;
+procedure set_activity_dir(var a : TGtkProgressBar; __activity_dir : guint);
+
+function gtk_progress_bar_get_type:TGtkType; cdecl; external gtklib;
+function gtk_progress_bar_new:PGtkWidget; cdecl; external gtklib;
+{
+ GtkProgress/GtkProgressBar had serious problems in GTK 1.2.
+
+ - Only 3 or 4 functions are really needed for 95% of progress
+ interfaces; GtkProgress[Bar] had about 25 functions, and
+ didn't even include these 3 or 4.
+ - In activity mode, the API involves setting the adjustment
+ to any random value, just to have the side effect of
+ calling the progress bar update function - the adjustment
+ is totally ignored in activity mode
+ - You set the activity step as a pixel value, which means to
+ set the activity step you basically need to connect to
+ size_allocate
+ - There are ctree_set_expander_style()-functions, to randomly
+ change look-and-feel for no good reason
+ - The split between GtkProgress and GtkProgressBar makes no sense
+ to me whatsoever.
+
+ This was a big wart on GTK and made people waste lots of time,
+ both learning and using the interface.
+
+ So, I have added what I feel is the correct API, and marked all the
+ rest deprecated. However, the changes are 100% backward-compatible and
+ should break no existing code.
+
+ The following 9 functions are the new programming interface.
+ }
+procedure gtk_progress_bar_pulse(pbar:PGtkProgressBar); cdecl; external gtklib;
+procedure gtk_progress_bar_set_text(pbar:PGtkProgressBar; text:Pgchar); cdecl; external gtklib;
+procedure gtk_progress_bar_set_fraction(pbar:PGtkProgressBar; fraction:gdouble); cdecl; external gtklib;
+procedure gtk_progress_bar_set_pulse_step(pbar:PGtkProgressBar; fraction:gdouble); cdecl; external gtklib;
+procedure gtk_progress_bar_set_orientation(pbar:PGtkProgressBar; orientation:TGtkProgressBarOrientation); cdecl; external gtklib;
+function gtk_progress_bar_get_text(pbar:PGtkProgressBar):Pgchar; cdecl; external gtklib;
+function gtk_progress_bar_get_fraction(pbar:PGtkProgressBar):gdouble; cdecl; external gtklib;
+function gtk_progress_bar_get_pulse_step(pbar:PGtkProgressBar):gdouble; cdecl; external gtklib;
+function gtk_progress_bar_get_orientation(pbar:PGtkProgressBar):TGtkProgressBarOrientation; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+{ Everything below here is deprecated }
+function gtk_progress_bar_new_with_adjustment(adjustment:PGtkAdjustment):PGtkWidget; cdecl; external gtklib;
+procedure gtk_progress_bar_set_bar_style(pbar:PGtkProgressBar; style:TGtkProgressBarStyle); cdecl; external gtklib;
+procedure gtk_progress_bar_set_discrete_blocks(pbar:PGtkProgressBar; blocks:guint); cdecl; external gtklib;
+{ set_activity_step() is not only deprecated, it doesn't even work.
+ (Of course, it wasn't usable anyway, you had to set it from a size_allocate
+ handler or something)
+ }
+procedure gtk_progress_bar_set_activity_step(pbar:PGtkProgressBar; step:guint); cdecl; external gtklib;
+procedure gtk_progress_bar_set_activity_blocks(pbar:PGtkProgressBar; blocks:guint); cdecl; external gtklib;
+procedure gtk_progress_bar_update(pbar:PGtkProgressBar; percentage:gdouble); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_PROGRESS_BAR : GType;
+begin
+ GTK_TYPE_PROGRESS_BAR:=gtk_progress_bar_get_type;
+end;
+
+function GTK_PROGRESS_BAR(obj: pointer) : PGtkProgressBar;
+begin
+ GTK_PROGRESS_BAR:=PGtkProgressBar(GTK_CHECK_CAST(obj,GTK_TYPE_PROGRESS_BAR));
+end;
+
+function GTK_PROGRESS_BAR_CLASS(klass: pointer) : PGtkProgressBarClass;
+begin
+ GTK_PROGRESS_BAR_CLASS:=PGtkProgressBarClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_PROGRESS_BAR));
+end;
+
+function GTK_IS_PROGRESS_BAR(obj: pointer) : boolean;
+begin
+ GTK_IS_PROGRESS_BAR:=GTK_CHECK_TYPE(obj,GTK_TYPE_PROGRESS_BAR);
+end;
+
+function GTK_IS_PROGRESS_BAR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_PROGRESS_BAR_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_PROGRESS_BAR);
+end;
+
+function GTK_PROGRESS_BAR_GET_CLASS(obj: pointer) : PGtkProgressBarClass;
+begin
+ GTK_PROGRESS_BAR_GET_CLASS:=PGtkProgressBarClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_PROGRESS_BAR));
+end;
+
+function activity_dir(var a : TGtkProgressBar) : guint;
+begin
+ activity_dir:=(a.flag0 and bm_TGtkProgressBar_activity_dir) shr bp_TGtkProgressBar_activity_dir;
+end;
+
+procedure set_activity_dir(var a : TGtkProgressBar; __activity_dir : guint);
+begin
+ a.flag0:=a.flag0 or ((__activity_dir shl bp_TGtkProgressBar_activity_dir) and bm_TGtkProgressBar_activity_dir);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkradioaction.inc b/packages/gtk2/src/gtk+/gtk/gtkradioaction.inc
new file mode 100644
index 0000000000..1fa7447b70
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkradioaction.inc
@@ -0,0 +1,86 @@
+
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkRadioActionPrivate = pointer;
+
+ PGtkRadioAction = ^TGtkRadioAction;
+ TGtkRadioAction = record
+ parent : TGtkToggleAction;
+ private_data : PGtkRadioActionPrivate;
+ end;
+
+{ Padding for future expansion }
+ PGtkRadioActionClass = ^TGtkRadioActionClass;
+ TGtkRadioActionClass = record
+ parent_class : TGtkToggleActionClass;
+ changed : procedure (action:PGtkRadioAction; current:PGtkRadioAction);cdecl;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ _gtk_reserved4 : procedure ;
+ end;
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_RADIO_ACTION : GType;
+
+function GTK_RADIO_ACTION(obj : pointer) : PGtkRadioAction;
+
+function GTK_RADIO_ACTION_CLASS(klass : pointer) : PGtkRadioActionClass;
+
+function GTK_IS_RADIO_ACTION(obj : pointer) : gboolean;
+
+function GTK_IS_RADIO_ACTION_CLASS(klass : pointer) : gboolean;
+
+function GTK_RADIO_ACTION_GET_CLASS(obj : pointer) : PGtkRadioActionClass;
+
+function gtk_radio_action_get_type:GType;cdecl;external gtklib name 'gtk_radio_action_get_type';
+
+function gtk_radio_action_new(name:Pgchar; szLabel:Pgchar; tooltip:Pgchar; stock_id:Pgchar; value:gint):PGtkRadioAction;cdecl;external gtklib name 'gtk_radio_action_new';
+
+function gtk_radio_action_get_group(action:PGtkRadioAction):PGSList;cdecl;external gtklib name 'gtk_radio_action_get_group';
+
+procedure gtk_radio_action_set_group(action:PGtkRadioAction; group:PGSList);cdecl;external gtklib name 'gtk_radio_action_set_group';
+
+function gtk_radio_action_get_current_value(action:PGtkRadioAction):gint;cdecl;external gtklib name 'gtk_radio_action_get_current_value';
+
+{$ENDIF read_interface_rest}
+
+{$IFDEF read_implementation}
+function GTK_TYPE_RADIO_ACTION : GType;
+ begin
+ GTK_TYPE_RADIO_ACTION:=gtk_radio_action_get_type;
+ end;
+
+function GTK_RADIO_ACTION(obj : pointer) : PGtkRadioAction;
+begin
+ GTK_RADIO_ACTION:=PGtkRadioAction(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_RADIO_ACTION));
+end;
+
+function GTK_RADIO_ACTION_CLASS(klass : pointer) : PGtkRadioActionClass;
+begin
+ GTK_RADIO_ACTION_CLASS:=PGtkRadioActionClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_RADIO_ACTION));
+end;
+
+function GTK_IS_RADIO_ACTION(obj : pointer) : gboolean;
+begin
+ GTK_IS_RADIO_ACTION:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_RADIO_ACTION);
+end;
+
+function GTK_IS_RADIO_ACTION_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_RADIO_ACTION_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_RADIO_ACTION);
+end;
+
+function GTK_RADIO_ACTION_GET_CLASS(obj : pointer) : PGtkRadioActionClass;
+begin
+ GTK_RADIO_ACTION_GET_CLASS:=PGtkRadioActionClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_RADIO_ACTION));
+end;
+
+{$ENDIF read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkradiobutton.inc b/packages/gtk2/src/gtk+/gtk/gtkradiobutton.inc
new file mode 100644
index 0000000000..b1a3c8e938
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkradiobutton.inc
@@ -0,0 +1,95 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkRadioButton = ^TGtkRadioButton;
+ TGtkRadioButton = record
+ check_button : TGtkCheckButton;
+ group : PGSList;
+ end;
+
+{ Padding for future expansion }
+ PGtkRadioButtonClass = ^TGtkRadioButtonClass;
+ TGtkRadioButtonClass = record
+ parent_class : TGtkCheckButtonClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_RADIO_BUTTON : GType;
+function GTK_RADIO_BUTTON(obj: pointer) : PGtkRadioButton;
+function GTK_RADIO_BUTTON_CLASS(klass: pointer) : PGtkRadioButtonClass;
+function GTK_IS_RADIO_BUTTON(obj: pointer) : boolean;
+function GTK_IS_RADIO_BUTTON_CLASS(klass: pointer) : boolean;
+function GTK_RADIO_BUTTON_GET_CLASS(obj: pointer) : PGtkRadioButtonClass;
+
+
+function gtk_radio_button_get_type:TGtkType; cdecl; external gtklib;
+function gtk_radio_button_new(group:PGSList):PGtkWidget; cdecl; external gtklib;
+function gtk_radio_button_new_from_widget(group:PGtkRadioButton):PGtkWidget; cdecl; external gtklib;
+function gtk_radio_button_new_with_label(group:PGSList; _label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_radio_button_new_with_label_from_widget(group:PGtkRadioButton; _label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_radio_button_new_with_mnemonic(group:PGSList; _label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_radio_button_new_with_mnemonic_from_widget(group:PGtkRadioButton; _label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_radio_button_get_group(radio_button:PGtkRadioButton):PGSList; cdecl; external gtklib;
+procedure gtk_radio_button_set_group(radio_button:PGtkRadioButton; group:PGSList); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_radio_button_group(radio_button:PGtkRadioButton):PGSList;
+{$endif}
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_RADIO_BUTTON : GType;
+begin
+ GTK_TYPE_RADIO_BUTTON:=gtk_radio_button_get_type;
+end;
+
+function GTK_RADIO_BUTTON(obj: pointer) : PGtkRadioButton;
+begin
+ GTK_RADIO_BUTTON:=PGtkRadioButton(GTK_CHECK_CAST(obj,GTK_TYPE_RADIO_BUTTON));
+end;
+
+function GTK_RADIO_BUTTON_CLASS(klass: pointer) : PGtkRadioButtonClass;
+begin
+ GTK_RADIO_BUTTON_CLASS:=PGtkRadioButtonClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_RADIO_BUTTON));
+end;
+
+function GTK_IS_RADIO_BUTTON(obj: pointer) : boolean;
+begin
+ GTK_IS_RADIO_BUTTON:=GTK_CHECK_TYPE(obj,GTK_TYPE_RADIO_BUTTON);
+end;
+
+function GTK_IS_RADIO_BUTTON_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_RADIO_BUTTON_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_RADIO_BUTTON);
+end;
+
+function GTK_RADIO_BUTTON_GET_CLASS(obj: pointer) : PGtkRadioButtonClass;
+begin
+ GTK_RADIO_BUTTON_GET_CLASS:=PGtkRadioButtonClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_RADIO_BUTTON));
+end;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_radio_button_group(radio_button:PGtkRadioButton):PGSList;
+begin
+ gtk_radio_button_group:=gtk_radio_button_get_group(radio_button);
+end;
+{$endif}
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkradiomenuitem.inc b/packages/gtk2/src/gtk+/gtk/gtkradiomenuitem.inc
new file mode 100644
index 0000000000..e8aee4f7e5
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkradiomenuitem.inc
@@ -0,0 +1,93 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkRadioMenuItem = ^TGtkRadioMenuItem;
+ TGtkRadioMenuItem = record
+ check_menu_item : TGtkCheckMenuItem;
+ group : PGSList;
+ end;
+
+{ Padding for future expansion }
+ PGtkRadioMenuItemClass = ^TGtkRadioMenuItemClass;
+ TGtkRadioMenuItemClass = record
+ parent_class : TGtkCheckMenuItemClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_RADIO_MENU_ITEM : GType;
+function GTK_RADIO_MENU_ITEM(obj: pointer) : PGtkRadioMenuItem;
+function GTK_RADIO_MENU_ITEM_CLASS(klass: pointer) : PGtkRadioMenuItemClass;
+function GTK_IS_RADIO_MENU_ITEM(obj: pointer) : boolean;
+function GTK_IS_RADIO_MENU_ITEM_CLASS(klass: pointer) : boolean;
+function GTK_RADIO_MENU_ITEM_GET_CLASS(obj: pointer) : PGtkRadioMenuItemClass;
+
+
+function gtk_radio_menu_item_get_type:TGtkType; cdecl; external gtklib;
+function gtk_radio_menu_item_new(group:PGSList):PGtkWidget; cdecl; external gtklib;
+function gtk_radio_menu_item_new_with_label(group:PGSList; _label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_radio_menu_item_new_with_mnemonic(group:PGSList; _label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_radio_menu_item_get_group(radio_menu_item:PGtkRadioMenuItem):PGSList; cdecl; external gtklib;
+procedure gtk_radio_menu_item_set_group(radio_menu_item:PGtkRadioMenuItem; group:PGSList); cdecl; external gtklib;
+
+{$ifndef G_DISABLE_DEPRECATED}
+function gtk_radio_menu_item_group(radio_menu_item:PGtkRadioMenuItem):PGSList;
+{$endif}
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_RADIO_MENU_ITEM : GType;
+begin
+ GTK_TYPE_RADIO_MENU_ITEM:=gtk_radio_menu_item_get_type;
+end;
+
+function GTK_RADIO_MENU_ITEM(obj: pointer) : PGtkRadioMenuItem;
+begin
+ GTK_RADIO_MENU_ITEM:=PGtkRadioMenuItem(GTK_CHECK_CAST(obj,GTK_TYPE_RADIO_MENU_ITEM));
+end;
+
+function GTK_RADIO_MENU_ITEM_CLASS(klass: pointer) : PGtkRadioMenuItemClass;
+begin
+ GTK_RADIO_MENU_ITEM_CLASS:=PGtkRadioMenuItemClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_RADIO_MENU_ITEM));
+end;
+
+function GTK_IS_RADIO_MENU_ITEM(obj: pointer) : boolean;
+begin
+ GTK_IS_RADIO_MENU_ITEM:=GTK_CHECK_TYPE(obj,GTK_TYPE_RADIO_MENU_ITEM);
+end;
+
+function GTK_IS_RADIO_MENU_ITEM_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_RADIO_MENU_ITEM_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_RADIO_MENU_ITEM);
+end;
+
+function GTK_RADIO_MENU_ITEM_GET_CLASS(obj: pointer) : PGtkRadioMenuItemClass;
+begin
+ GTK_RADIO_MENU_ITEM_GET_CLASS:=PGtkRadioMenuItemClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_RADIO_MENU_ITEM));
+end;
+
+{$ifndef G_DISABLE_DEPRECATED}
+function gtk_radio_menu_item_group(radio_menu_item:PGtkRadioMenuItem):PGSList;
+begin
+ gtk_radio_menu_item_group:=gtk_radio_menu_item_get_group(radio_menu_item);
+end;
+{$endif}
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkradiotoolbutton.inc b/packages/gtk2/src/gtk+/gtk/gtkradiotoolbutton.inc
new file mode 100644
index 0000000000..70903be9db
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkradiotoolbutton.inc
@@ -0,0 +1,79 @@
+
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkRadioToolButton = ^TGtkRadioToolButton;
+ TGtkRadioToolButton = record
+ parent : TGtkToggleToolButton;
+ end;
+
+{ Padding for future expansion }
+ PGtkRadioToolButtonClass = ^TGtkRadioToolButtonClass;
+ TGtkRadioToolButtonClass = record
+ parent_class : TGtkToggleToolButtonClass;
+ _gtk_reserved1 : procedure ;cdecl;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ _gtk_reserved4 : procedure ;
+ end;
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_RADIO_TOOL_BUTTON : GType;
+function GTK_RADIO_TOOL_BUTTON(obj : pointer) : PGtkRadioToolButton;
+function GTK_RADIO_TOOL_BUTTON_CLASS(klass : pointer) : PGtkRadioToolButtonClass;
+function GTK_IS_RADIO_TOOL_BUTTON(obj : pointer) : gboolean;
+function GTK_IS_RADIO_TOOL_BUTTON_CLASS(klass : pointer) : gboolean;
+function GTK_RADIO_TOOL_BUTTON_GET_CLASS(obj : pointer) : PGtkRadioToolButtonClass;
+
+
+function gtk_radio_tool_button_get_type:GType;cdecl;external gtklib name 'gtk_radio_tool_button_get_type';
+function gtk_radio_tool_button_new(group:PGSList):PGtkToolItem;cdecl;external gtklib name 'gtk_radio_tool_button_new';
+
+function gtk_radio_tool_button_new_from_stock(group:PGSList; stock_id:Pgchar):PGtkToolItem;cdecl;external gtklib name 'gtk_radio_tool_button_new_from_stock';
+function gtk_radio_tool_button_new_from_widget(group:PGtkRadioToolButton):PGtkToolItem;cdecl;external gtklib name 'gtk_radio_tool_button_new_from_widget';
+
+function gtk_radio_tool_button_new_with_stock_from_widget(group:PGtkRadioToolButton; stock_id:Pgchar):PGtkToolItem;cdecl;external gtklib name 'gtk_radio_tool_button_new_with_stock_from_widget';
+function gtk_radio_tool_button_get_group(button:PGtkRadioToolButton):PGSList;cdecl;external gtklib name 'gtk_radio_tool_button_get_group';
+procedure gtk_radio_tool_button_set_group(button:PGtkRadioToolButton; group:PGSList);cdecl;external gtklib name 'gtk_radio_tool_button_set_group';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GTK_TYPE_RADIO_TOOL_BUTTON : GType;
+begin
+ GTK_TYPE_RADIO_TOOL_BUTTON:=gtk_radio_tool_button_get_type;
+end;
+
+function GTK_RADIO_TOOL_BUTTON(obj : pointer) : PGtkRadioToolButton;
+begin
+ GTK_RADIO_TOOL_BUTTON:=PGtkRadioToolButton(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_RADIO_TOOL_BUTTON));
+end;
+
+function GTK_RADIO_TOOL_BUTTON_CLASS(klass : pointer) : PGtkRadioToolButtonClass;
+begin
+ GTK_RADIO_TOOL_BUTTON_CLASS:=PGtkRadioToolButtonClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_RADIO_TOOL_BUTTON));
+end;
+
+function GTK_IS_RADIO_TOOL_BUTTON(obj : pointer) : gboolean;
+begin
+ GTK_IS_RADIO_TOOL_BUTTON:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_RADIO_TOOL_BUTTON);
+end;
+
+function GTK_IS_RADIO_TOOL_BUTTON_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_RADIO_TOOL_BUTTON_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_RADIO_TOOL_BUTTON);
+end;
+
+
+function GTK_RADIO_TOOL_BUTTON_GET_CLASS(obj : pointer) : PGtkRadioToolButtonClass;
+begin
+ GTK_RADIO_TOOL_BUTTON_GET_CLASS:=PGtkRadioToolButtonClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_RADIO_TOOL_BUTTON));
+end;
+
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkrange.inc b/packages/gtk2/src/gtk+/gtk/gtkrange.inc
new file mode 100644
index 0000000000..0306673c96
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkrange.inc
@@ -0,0 +1,268 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkRangeLayout = pointer;
+ // internal type
+ PGtkRangeStepTimer = pointer;
+
+{ These two are private/opaque types, ignore }
+{< protected > }
+{ Steppers are: < > ---- < >
+ a b c d }
+{ Area of entire stepper + trough assembly in widget->window coords }
+{ Slider range along the long dimension, in widget->window coords }
+{ Round off value to this many digits, -1 for no rounding }
+{< private > }
+{ trough click was on the forward side of slider }
+{ need to emit value_changed }
+ PGtkRange = ^TGtkRange;
+ TGtkRange = record
+ widget : TGtkWidget;
+ adjustment : PGtkAdjustment;
+ update_policy : TGtkUpdateType;
+ flag0 : word;
+ min_slider_size : gint;
+ orientation : TGtkOrientation;
+ range_rect : TGdkRectangle;
+ slider_start : gint;
+ slider_end : gint;
+ round_digits : gint;
+ flag1 : word;
+ layout : PGtkRangeLayout;
+ timer : PGtkRangeStepTimer;
+ slide_initial_slider_position : gint;
+ slide_initial_coordinate : gint;
+ update_timeout_id : guint;
+ event_window : PGdkWindow;
+ end;
+
+{ what detail to pass to GTK drawing functions }
+{ action signals for keybindings }
+{ Virtual functions }
+{ Padding for future expansion }
+ PGtkRangeClass = ^TGtkRangeClass;
+ TGtkRangeClass = record
+ parent_class : TGtkWidgetClass;
+ slider_detail : Pgchar;
+ stepper_detail : Pgchar;
+ value_changed : procedure (range:PGtkRange); cdecl;
+ adjust_bounds : procedure (range:PGtkRange; new_value:gdouble); cdecl;
+ move_slider : procedure (range:PGtkRange; scroll:TGtkScrollType); cdecl;
+ get_range_border : procedure (range:PGtkRange; border:PGtkBorder); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkRange_inverted = $1;
+ bp_TGtkRange_inverted = 0;
+ bm_TGtkRange_flippable = $2;
+ bp_TGtkRange_flippable = 1;
+ bm_TGtkRange_has_stepper_a = $4;
+ bp_TGtkRange_has_stepper_a = 2;
+ bm_TGtkRange_has_stepper_b = $8;
+ bp_TGtkRange_has_stepper_b = 3;
+ bm_TGtkRange_has_stepper_c = $10;
+ bp_TGtkRange_has_stepper_c = 4;
+ bm_TGtkRange_has_stepper_d = $20;
+ bp_TGtkRange_has_stepper_d = 5;
+ bm_TGtkRange_need_recalc = $40;
+ bp_TGtkRange_need_recalc = 6;
+ bm_TGtkRange_slider_size_fixed = $80;
+ bp_TGtkRange_slider_size_fixed = 7;
+ bm_TGtkRange_trough_click_forward = $1;
+ bp_TGtkRange_trough_click_forward = 0;
+ bm_TGtkRange_update_pending = $2;
+ bp_TGtkRange_update_pending = 1;
+
+
+function GTK_TYPE_RANGE : GType;
+function GTK_RANGE(obj: pointer) : PGtkRange;
+function GTK_RANGE_CLASS(klass: pointer) : PGtkRangeClass;
+function GTK_IS_RANGE(obj: pointer) : boolean;
+function GTK_IS_RANGE_CLASS(klass: pointer) : boolean;
+function GTK_RANGE_GET_CLASS(obj: pointer) : PGtkRangeClass;
+
+function inverted(var a : TGtkRange) : guint;
+procedure set_inverted(var a : TGtkRange; __inverted : guint);
+function flippable(var a : TGtkRange) : guint;
+procedure set_flippable(var a : TGtkRange; __flippable : guint);
+function has_stepper_a(var a : TGtkRange) : guint;
+procedure set_has_stepper_a(var a : TGtkRange; __has_stepper_a : guint);
+function has_stepper_b(var a : TGtkRange) : guint;
+procedure set_has_stepper_b(var a : TGtkRange; __has_stepper_b : guint);
+function has_stepper_c(var a : TGtkRange) : guint;
+procedure set_has_stepper_c(var a : TGtkRange; __has_stepper_c : guint);
+function has_stepper_d(var a : TGtkRange) : guint;
+procedure set_has_stepper_d(var a : TGtkRange; __has_stepper_d : guint);
+function need_recalc(var a : TGtkRange) : guint;
+procedure set_need_recalc(var a : TGtkRange; __need_recalc : guint);
+function slider_size_fixed(var a : TGtkRange) : guint;
+procedure set_slider_size_fixed(var a : TGtkRange; __slider_size_fixed : guint);
+function trough_click_forward(var a : TGtkRange) : guint;
+procedure set_trough_click_forward(var a : TGtkRange; __trough_click_forward : guint);
+function update_pending(var a : TGtkRange) : guint;
+procedure set_update_pending(var a : TGtkRange; __update_pending : guint);
+
+function gtk_range_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_range_set_update_policy(range:PGtkRange; policy:TGtkUpdateType); cdecl; external gtklib;
+function gtk_range_get_update_policy(range:PGtkRange):TGtkUpdateType; cdecl; external gtklib;
+procedure gtk_range_set_adjustment(range:PGtkRange; adjustment:PGtkAdjustment); cdecl; external gtklib;
+function gtk_range_get_adjustment(range:PGtkRange):PGtkAdjustment; cdecl; external gtklib;
+procedure gtk_range_set_inverted(range:PGtkRange; setting:gboolean); cdecl; external gtklib;
+function gtk_range_get_inverted(range:PGtkRange):gboolean; cdecl; external gtklib;
+procedure gtk_range_set_increments(range:PGtkRange; step:gdouble; page:gdouble); cdecl; external gtklib;
+procedure gtk_range_set_range(range:PGtkRange; min:gdouble; max:gdouble); cdecl; external gtklib;
+procedure gtk_range_set_value(range:PGtkRange; value:gdouble); cdecl; external gtklib;
+function gtk_range_get_value(range:PGtkRange):gdouble; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_RANGE : GType;
+begin
+ GTK_TYPE_RANGE:=gtk_range_get_type;
+end;
+
+function GTK_RANGE(obj: pointer) : PGtkRange;
+begin
+ GTK_RANGE:=PGtkRange(GTK_CHECK_CAST(obj,GTK_TYPE_RANGE));
+end;
+
+function GTK_RANGE_CLASS(klass: pointer) : PGtkRangeClass;
+begin
+ GTK_RANGE_CLASS:=PGtkRangeClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_RANGE));
+end;
+
+function GTK_IS_RANGE(obj: pointer) : boolean;
+begin
+ GTK_IS_RANGE:=GTK_CHECK_TYPE(obj,GTK_TYPE_RANGE);
+end;
+
+function GTK_IS_RANGE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_RANGE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_RANGE);
+end;
+
+function GTK_RANGE_GET_CLASS(obj: pointer) : PGtkRangeClass;
+begin
+ GTK_RANGE_GET_CLASS:=PGtkRangeClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_RANGE));
+end;
+
+function inverted(var a : TGtkRange) : guint;
+begin
+ inverted:=(a.flag0 and bm_TGtkRange_inverted) shr bp_TGtkRange_inverted;
+end;
+
+procedure set_inverted(var a : TGtkRange; __inverted : guint);
+begin
+ a.flag0:=a.flag0 or ((__inverted shl bp_TGtkRange_inverted) and bm_TGtkRange_inverted);
+end;
+
+function flippable(var a : TGtkRange) : guint;
+begin
+ flippable:=(a.flag0 and bm_TGtkRange_flippable) shr bp_TGtkRange_flippable;
+end;
+
+procedure set_flippable(var a : TGtkRange; __flippable : guint);
+begin
+ a.flag0:=a.flag0 or ((__flippable shl bp_TGtkRange_flippable) and bm_TGtkRange_flippable);
+end;
+
+function has_stepper_a(var a : TGtkRange) : guint;
+begin
+ has_stepper_a:=(a.flag0 and bm_TGtkRange_has_stepper_a) shr bp_TGtkRange_has_stepper_a;
+end;
+
+procedure set_has_stepper_a(var a : TGtkRange; __has_stepper_a : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_stepper_a shl bp_TGtkRange_has_stepper_a) and bm_TGtkRange_has_stepper_a);
+end;
+
+function has_stepper_b(var a : TGtkRange) : guint;
+begin
+ has_stepper_b:=(a.flag0 and bm_TGtkRange_has_stepper_b) shr bp_TGtkRange_has_stepper_b;
+end;
+
+procedure set_has_stepper_b(var a : TGtkRange; __has_stepper_b : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_stepper_b shl bp_TGtkRange_has_stepper_b) and bm_TGtkRange_has_stepper_b);
+end;
+
+function has_stepper_c(var a : TGtkRange) : guint;
+begin
+ has_stepper_c:=(a.flag0 and bm_TGtkRange_has_stepper_c) shr bp_TGtkRange_has_stepper_c;
+end;
+
+procedure set_has_stepper_c(var a : TGtkRange; __has_stepper_c : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_stepper_c shl bp_TGtkRange_has_stepper_c) and bm_TGtkRange_has_stepper_c);
+end;
+
+function has_stepper_d(var a : TGtkRange) : guint;
+begin
+ has_stepper_d:=(a.flag0 and bm_TGtkRange_has_stepper_d) shr bp_TGtkRange_has_stepper_d;
+end;
+
+procedure set_has_stepper_d(var a : TGtkRange; __has_stepper_d : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_stepper_d shl bp_TGtkRange_has_stepper_d) and bm_TGtkRange_has_stepper_d);
+end;
+
+function need_recalc(var a : TGtkRange) : guint;
+begin
+ need_recalc:=(a.flag0 and bm_TGtkRange_need_recalc) shr bp_TGtkRange_need_recalc;
+end;
+
+procedure set_need_recalc(var a : TGtkRange; __need_recalc : guint);
+begin
+ a.flag0:=a.flag0 or ((__need_recalc shl bp_TGtkRange_need_recalc) and bm_TGtkRange_need_recalc);
+end;
+
+function slider_size_fixed(var a : TGtkRange) : guint;
+begin
+ slider_size_fixed:=(a.flag0 and bm_TGtkRange_slider_size_fixed) shr bp_TGtkRange_slider_size_fixed;
+end;
+
+procedure set_slider_size_fixed(var a : TGtkRange; __slider_size_fixed : guint);
+begin
+ a.flag0:=a.flag0 or ((__slider_size_fixed shl bp_TGtkRange_slider_size_fixed) and bm_TGtkRange_slider_size_fixed);
+end;
+
+function trough_click_forward(var a : TGtkRange) : guint;
+begin
+ trough_click_forward:=(a.flag1 and bm_TGtkRange_trough_click_forward) shr bp_TGtkRange_trough_click_forward;
+end;
+
+procedure set_trough_click_forward(var a : TGtkRange; __trough_click_forward : guint);
+begin
+ a.flag1:=a.flag1 or ((__trough_click_forward shl bp_TGtkRange_trough_click_forward) and bm_TGtkRange_trough_click_forward);
+end;
+
+function update_pending(var a : TGtkRange) : guint;
+begin
+ update_pending:=(a.flag1 and bm_TGtkRange_update_pending) shr bp_TGtkRange_update_pending;
+end;
+
+procedure set_update_pending(var a : TGtkRange; __update_pending : guint);
+begin
+ a.flag1:=a.flag1 or ((__update_pending shl bp_TGtkRange_update_pending) and bm_TGtkRange_update_pending);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkrbtree.inc b/packages/gtk2/src/gtk+/gtk/gtkrbtree.inc
new file mode 100644
index 0000000000..af4f7afc37
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkrbtree.inc
@@ -0,0 +1,198 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkRBNodeColor = ^TGtkRBNodeColor;
+ TGtkRBNodeColor = longint;
+
+ PGtkRBTree = ^TGtkRBTree;
+ PGtkRBNode = ^TGtkRBNode;
+
+ TGtkRBTreeTraverseFunc = procedure (tree:PGtkRBTree; node:PGtkRBNode; data:gpointer); cdecl;
+ TGtkRBTree = record
+ root : PGtkRBNode;
+ _nil : PGtkRBNode;
+ parent_tree : PGtkRBTree;
+ parent_node : PGtkRBNode;
+ end;
+
+{ We keep track of whether the aggregate count of children plus 1
+ for the node itself comes to an even number. The parity flag is
+ the total count of children mod 2, where the total count of
+ children gets computed in the same way that the total offset gets
+ computed. i.e. not the same as the "count" field below which
+ doesn't include children. We could replace parity with a
+ full-size int field here, and then take % 2 to get the parity flag,
+ but that would use extra memory.
+ }
+{ count is the number of nodes beneath us, plus 1 for ourselves.
+ i.e. node->left->count + node->right->count + 1
+ }
+{ this is the total of sizes of
+ node->left, node->right, our own height, and the height
+ of all trees in ->children, iff children exists because
+ the thing is expanded.
+ }
+{ Child trees }
+ TGtkRBNode = record
+ flag0 : word;
+ left : PGtkRBNode;
+ right : PGtkRBNode;
+ parent : PGtkRBNode;
+ count : gint;
+ offset : gint;
+ children : PGtkRBTree;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_RBNODE_BLACK = 1 shl 0;
+ GTK_RBNODE_RED = 1 shl 1;
+ GTK_RBNODE_IS_PARENT = 1 shl 2;
+ GTK_RBNODE_IS_SELECTED = 1 shl 3;
+ GTK_RBNODE_IS_PRELIT = 1 shl 4;
+ GTK_RBNODE_IS_SEMI_COLLAPSED = 1 shl 5;
+ GTK_RBNODE_IS_SEMI_EXPANDED = 1 shl 6;
+ GTK_RBNODE_INVALID = 1 shl 7;
+ GTK_RBNODE_COLUMN_INVALID = 1 shl 8;
+ GTK_RBNODE_DESCENDANTS_INVALID = 1 shl 9;
+ GTK_RBNODE_NON_COLORS = GTK_RBNODE_IS_PARENT
+ or GTK_RBNODE_IS_SELECTED
+ or GTK_RBNODE_IS_PRELIT
+ or GTK_RBNODE_IS_SEMI_COLLAPSED
+ or GTK_RBNODE_IS_SEMI_EXPANDED
+ or GTK_RBNODE_INVALID
+ or GTK_RBNODE_COLUMN_INVALID
+ or GTK_RBNODE_DESCENDANTS_INVALID;
+
+const
+ bm_TGtkRBNode_flags = $3FFF;
+ bp_TGtkRBNode_flags = 0;
+ bm_TGtkRBNode_parity = $4000;
+ bp_TGtkRBNode_parity = 14;
+
+function flags(a : PGtkRBNode) : guint;
+procedure set_flags(a : PGtkRBNode; __flags : guint);
+function parity(a : PGtkRBNode) : guint;
+procedure set_parity(a : PGtkRBNode; __parity : guint);
+function GTK_RBNODE_GET_COLOR(node: PGtkRBNode) : guint;
+procedure GTK_RBNODE_SET_COLOR(node: PGtkRBNode; color: guint);
+function GTK_RBNODE_GET_HEIGHT(node: PGtkRBNode) : gint;
+
+procedure GTK_RBNODE_SET_FLAG(node: PGtkRBNode; flag: word);
+procedure GTK_RBNODE_UNSET_FLAG(node: PGtkRBNode; flag: word);
+function GTK_RBNODE_FLAG_SET(node: PGtkRBNode; flag : guint) : boolean;
+
+procedure _gtk_rbtree_push_allocator(allocator:PGAllocator); cdecl; external gtklib;
+procedure _gtk_rbtree_pop_allocator; cdecl; external gtklib;
+function _gtk_rbtree_new:PGtkRBTree; cdecl; external gtklib;
+procedure _gtk_rbtree_free(tree:PGtkRBTree); cdecl; external gtklib;
+procedure _gtk_rbtree_remove(tree:PGtkRBTree); cdecl; external gtklib;
+procedure _gtk_rbtree_destroy(tree:PGtkRBTree); cdecl; external gtklib;
+function _gtk_rbtree_insert_before(tree:PGtkRBTree; node:PGtkRBNode; height:gint; valid:gboolean):PGtkRBNode; cdecl; external gtklib;
+function _gtk_rbtree_insert_after(tree:PGtkRBTree; node:PGtkRBNode; height:gint; valid:gboolean):PGtkRBNode; cdecl; external gtklib;
+procedure _gtk_rbtree_remove_node(tree:PGtkRBTree; node:PGtkRBNode); cdecl; external gtklib;
+procedure _gtk_rbtree_reorder(tree:PGtkRBTree; new_order:Pgint; length:gint); cdecl; external gtklib;
+function _gtk_rbtree_find_count(tree:PGtkRBTree; count:gint):PGtkRBNode; cdecl; external gtklib;
+procedure _gtk_rbtree_node_set_height(tree:PGtkRBTree; node:PGtkRBNode; height:gint); cdecl; external gtklib;
+procedure _gtk_rbtree_node_mark_invalid(tree:PGtkRBTree; node:PGtkRBNode); cdecl; external gtklib;
+procedure _gtk_rbtree_node_mark_valid(tree:PGtkRBTree; node:PGtkRBNode); cdecl; external gtklib;
+procedure _gtk_rbtree_column_invalid(tree:PGtkRBTree); cdecl; external gtklib;
+procedure _gtk_rbtree_mark_invalid(tree:PGtkRBTree); cdecl; external gtklib;
+procedure _gtk_rbtree_set_fixed_height(tree:PGtkRBTree; height:gint); cdecl; external gtklib;
+function _gtk_rbtree_node_find_offset(tree:PGtkRBTree; node:PGtkRBNode):gint; cdecl; external gtklib;
+function _gtk_rbtree_node_find_parity(tree:PGtkRBTree; node:PGtkRBNode):gint; cdecl; external gtklib;
+function _gtk_rbtree_find_offset(tree:PGtkRBTree; offset:gint; var new_tree:PGtkRBTree; var new_node:PGtkRBNode):gint; cdecl; external gtklib;
+procedure _gtk_rbtree_traverse(tree:PGtkRBTree; node:PGtkRBNode; order:TGTraverseType; func:TGtkRBTreeTraverseFunc; data:gpointer); cdecl; external gtklib;
+function _gtk_rbtree_next(tree:PGtkRBTree; node:PGtkRBNode):PGtkRBNode; cdecl; external gtklib;
+function _gtk_rbtree_prev(tree:PGtkRBTree; node:PGtkRBNode):PGtkRBNode; cdecl; external gtklib;
+procedure _gtk_rbtree_next_full(tree:PGtkRBTree; node:PGtkRBNode; var new_tree:PGtkRBTree; var new_node:PGtkRBNode); cdecl; external gtklib;
+procedure _gtk_rbtree_prev_full(tree:PGtkRBTree; node:PGtkRBNode; var new_tree:PGtkRBTree; var new_node:PGtkRBNode); cdecl; external gtklib;
+function _gtk_rbtree_get_depth(tree:PGtkRBTree):gint; cdecl; external gtklib;
+{ This func checks the integrity of the tree }
+{$ifdef G_ENABLE_DEBUG }
+procedure _gtk_rbtree_test(where:Pgchar; tree:PGtkRBTree); cdecl; external gtklib;
+procedure _gtk_rbtree_debug_spew(tree:PGtkRBTree); cdecl; external gtklib;
+{$endif}
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function flags(a : PGtkRBNode) : guint;
+begin
+ flags:=(a^.flag0 and bm_TGtkRBNode_flags) shr bp_TGtkRBNode_flags;
+end;
+
+procedure set_flags(a : PGtkRBNode; __flags : guint);
+begin
+ a^.flag0:=a^.flag0 or ((__flags shl bp_TGtkRBNode_flags) and bm_TGtkRBNode_flags);
+end;
+
+function parity(a : PGtkRBNode) : guint;
+begin
+ parity:=(a^.flag0 and bm_TGtkRBNode_parity) shr bp_TGtkRBNode_parity;
+end;
+
+procedure set_parity(a : PGtkRBNode; __parity : guint);
+begin
+ a^.flag0:=a^.flag0 or ((__parity shl bp_TGtkRBNode_parity) and bm_TGtkRBNode_parity);
+end;
+
+function GTK_RBNODE_GET_COLOR(node : PGtkRBNode) : guint;
+begin
+ if node=nil then
+ Result:=GTK_RBNODE_BLACK
+ else
+ if (flags(node) and GTK_RBNODE_RED) = GTK_RBNODE_RED then
+ Result:=GTK_RBNODE_RED
+ else
+ Result:=GTK_RBNODE_BLACK;
+end;
+
+procedure GTK_RBNODE_SET_COLOR(node : PGtkRBNode; color: guint);
+begin
+ if node=nil then exit;
+ if ((flags(node) and color)<>color) then
+ set_flags(node,flags(node) xor (GTK_RBNODE_RED or GTK_RBNODE_BLACK));
+end;
+
+function GTK_RBNODE_GET_HEIGHT(node : PGtkRBNode) : gint;
+var
+ if_local1 : gint;
+begin
+ if node^.children<>nil then
+ if_local1:=node^.children^.root^.offset
+ else
+ if_local1:=0;
+ GTK_RBNODE_GET_HEIGHT:=node^.offset -
+ (node^.left^.offset + node^.right^.offset + if_local1);
+end;
+
+function GTK_RBNODE_FLAG_SET(node: PGtkRBNode; flag : guint) : boolean;
+begin
+ GTK_RBNODE_FLAG_SET:=(node<>nil) and ((flags(node) and flag) = flag);
+end;
+
+procedure GTK_RBNODE_SET_FLAG(node: PGtkRBNode; flag: word);
+begin
+ set_flags(node,flag or flags(node));
+end;
+
+procedure GTK_RBNODE_UNSET_FLAG(node: PGtkRBNode; flag: word);
+begin
+ set_flags(node,(not flag) and flags(node));
+end;
+
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkrc.inc b/packages/gtk2/src/gtk+/gtk/gtkrc.inc
new file mode 100644
index 0000000000..4d91a9491f
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkrc.inc
@@ -0,0 +1,231 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkRcFlags = ^TGtkRcFlags;
+ TGtkRcFlags = longint;
+
+{< public > }
+{< private > }
+{ list of RC style lists including this RC style }
+{ The RC file specified the engine }
+ PGtkRcStyle = ^TGtkRcStyle;
+ TGtkRcStyle = record
+ parent_instance : TGObject;
+ name : Pgchar;
+ bg_pixmap_name : array[0..4] of Pgchar;
+ font_desc : PPangoFontDescription;
+ color_flags : array[0..4] of TGtkRcFlags;
+ fg : array[0..4] of TGdkColor;
+ bg : array[0..4] of TGdkColor;
+ text : array[0..4] of TGdkColor;
+ base : array[0..4] of TGdkColor;
+ xthickness : gint;
+ ythickness : gint;
+ rc_properties : PGArray;
+ rc_style_lists : PGSList;
+ icon_factories : PGSList;
+ flag0 : word;
+ end;
+
+{ Create an empty RC style of the same type as this RC style.
+ The default implementation, which does
+ g_object_new (G_OBJECT_TYPE (style), NULL);
+ should work in most cases.
+ }
+{ Fill in engine specific parts of GtkRcStyle by parsing contents
+ of brackets. Returns G_TOKEN_NONE if succesful, otherwise returns
+ the token it expected but didn't get.
+ }
+{ Combine RC style data from src into dest. If overriden, this
+ function should chain to the parent.
+ }
+{ Create an empty style suitable to this RC style
+ }
+{ Padding for future expansion }
+ PGtkRcStyleClass = ^TGtkRcStyleClass;
+ TGtkRcStyleClass = record
+ parent_class : TGObjectClass;
+ create_rc_style : function (rc_style:PGtkRcStyle):PGtkRcStyle; cdecl;
+ parse : function (rc_style:PGtkRcStyle; settings:PGtkSettings; scanner:PGScanner):guint; cdecl;
+ merge : procedure (dest:PGtkRcStyle; src:PGtkRcStyle); cdecl;
+ create_style : function (rc_style:PGtkRcStyle):PGtkStyle; cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{ private functions/definitions }
+ PGtkRcTokenType = ^TGtkRcTokenType;
+ TGtkRcTokenType = (
+ GTK_RC_TOKEN_INVALID {:= G_TOKEN_LAST},
+ GTK_RC_TOKEN_INCLUDE,
+ GTK_RC_TOKEN_NORMAL,
+ GTK_RC_TOKEN_ACTIVE,
+ GTK_RC_TOKEN_PRELIGHT,
+ GTK_RC_TOKEN_SELECTED,
+ GTK_RC_TOKEN_INSENSITIVE,
+ GTK_RC_TOKEN_FG,
+ GTK_RC_TOKEN_BG,
+ GTK_RC_TOKEN_TEXT,
+ GTK_RC_TOKEN_BASE,
+ GTK_RC_TOKEN_XTHICKNESS,
+ GTK_RC_TOKEN_YTHICKNESS,
+ GTK_RC_TOKEN_FONT,
+ GTK_RC_TOKEN_FONTSET,
+ GTK_RC_TOKEN_FONT_NAME,
+ GTK_RC_TOKEN_BG_PIXMAP,
+ GTK_RC_TOKEN_PIXMAP_PATH,
+ GTK_RC_TOKEN_STYLE,
+ GTK_RC_TOKEN_BINDING,
+ GTK_RC_TOKEN_BIND,
+ GTK_RC_TOKEN_WIDGET,
+ GTK_RC_TOKEN_WIDGET_CLASS,
+ GTK_RC_TOKEN_CLASS,
+ GTK_RC_TOKEN_LOWEST,
+ GTK_RC_TOKEN_GTK,
+ GTK_RC_TOKEN_APPLICATION,
+ GTK_RC_TOKEN_THEME,
+ GTK_RC_TOKEN_RC,
+ GTK_RC_TOKEN_HIGHEST,
+ GTK_RC_TOKEN_ENGINE,
+ GTK_RC_TOKEN_MODULE_PATH,
+ GTK_RC_TOKEN_IM_MODULE_PATH,
+ GTK_RC_TOKEN_IM_MODULE_FILE,
+ GTK_RC_TOKEN_STOCK,
+ GTK_RC_TOKEN_LTR,
+ GTK_RC_TOKEN_RTL,
+ GTK_RC_TOKEN_LAST
+ );
+
+{ rc properties
+ (structure forward declared in gtkstyle.h)
+ }
+{ quark-ified property identifier like "GtkScrollbar::spacing" }
+{ fields similar to GtkSettingsValue }
+ PGtkRcProperty = ^TGtkRcProperty;
+ TGtkRcProperty = record
+ type_name : TGQuark;
+ property_name : TGQuark;
+ origin : Pgchar;
+ value : TGValue;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_RC_FG = 1 shl 0;
+ GTK_RC_BG = 1 shl 1;
+ GTK_RC_TEXT = 1 shl 2;
+ GTK_RC_BASE = 1 shl 3;
+
+
+const
+ bm_TGtkRcStyle_engine_specified = $1;
+ bp_TGtkRcStyle_engine_specified = 0;
+
+
+function GTK_TYPE_RC_STYLE : GType;
+function GTK_RC_STYLE_get(anObject: pointer) : PGtkRcStyle;
+function GTK_RC_STYLE_CLASS(klass: pointer) : PGtkRcStyleClass;
+function GTK_IS_RC_STYLE(anObject: pointer) : boolean;
+function GTK_IS_RC_STYLE_CLASS(klass: pointer) : boolean;
+function GTK_RC_STYLE_GET_CLASS(obj: pointer) : PGtkRcStyleClass;
+
+function engine_specified(var a : TGtkRcStyle) : guint;
+procedure set_engine_specified(var a : TGtkRcStyle; __engine_specified : guint);
+
+procedure _gtk_rc_init; cdecl; external gtklib;
+procedure gtk_rc_add_default_file(filename:Pgchar); cdecl; external gtklib;
+procedure gtk_rc_set_default_files(filenames:PPgchar); cdecl; external gtklib;
+function gtk_rc_get_default_files:PPgchar; cdecl; external gtklib;
+function gtk_rc_get_style(widget:PGtkWidget):PGtkStyle; cdecl; external gtklib;
+function gtk_rc_get_style_by_paths(settings:PGtkSettings; widget_path:Pchar; class_path:Pchar; _type:GType):PGtkStyle; cdecl; external gtklib;
+function gtk_rc_reparse_all_for_settings(settings:PGtkSettings; force_load:gboolean):gboolean; cdecl; external gtklib;
+function gtk_rc_find_pixmap_in_path(settings:PGtkSettings; scanner:PGScanner; pixmap_file:Pgchar):Pgchar; cdecl; external gtklib;
+procedure gtk_rc_parse(filename:Pgchar); cdecl; external gtklib;
+procedure gtk_rc_parse_string(rc_string:Pgchar); cdecl; external gtklib;
+function gtk_rc_reparse_all:gboolean; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_rc_add_widget_name_style(rc_style:PGtkRcStyle; pattern:Pgchar); cdecl; external gtklib;
+procedure gtk_rc_add_widget_class_style(rc_style:PGtkRcStyle; pattern:Pgchar); cdecl; external gtklib;
+procedure gtk_rc_add_class_style(rc_style:PGtkRcStyle; pattern:Pgchar); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+function gtk_rc_style_get_type:GType; cdecl; external gtklib;
+function gtk_rc_style_new:PGtkRcStyle; cdecl; external gtklib;
+function gtk_rc_style_copy(orig:PGtkRcStyle):PGtkRcStyle; cdecl; external gtklib;
+procedure gtk_rc_style_ref(rc_style:PGtkRcStyle); cdecl; external gtklib;
+procedure gtk_rc_style_unref(rc_style:PGtkRcStyle); cdecl; external gtklib;
+function gtk_rc_find_module_in_path(module_file:Pgchar):Pgchar; cdecl; external gtklib;
+function gtk_rc_get_theme_dir:Pgchar; cdecl; external gtklib;
+function gtk_rc_get_module_dir:Pgchar; cdecl; external gtklib;
+function gtk_rc_get_im_module_path:Pgchar; cdecl; external gtklib;
+function gtk_rc_get_im_module_file:Pgchar; cdecl; external gtklib;
+
+
+function gtk_rc_scanner_new:PGScanner; cdecl; external gtklib;
+function gtk_rc_parse_color(scanner:PGScanner; color:PGdkColor):guint; cdecl; external gtklib;
+function gtk_rc_parse_state(scanner:PGScanner; state:PGtkStateType):guint; cdecl; external gtklib;
+function gtk_rc_parse_priority(scanner:PGScanner; priority:PGtkPathPriorityType):guint; cdecl; external gtklib;
+
+function _gtk_rc_style_lookup_rc_property(rc_style:PGtkRcStyle; type_name:TGQuark; property_name:TGQuark):PGtkRcProperty; cdecl; external gtklib;
+function _gtk_rc_context_get_default_font_name(settings:PGtkSettings):Pgchar; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_RC_STYLE : GType;
+begin
+ GTK_TYPE_RC_STYLE:=gtk_rc_style_get_type;
+end;
+
+function GTK_RC_STYLE_get(anObject: pointer) : PGtkRcStyle;
+begin
+ GTK_RC_STYLE_get:=PGtkRcStyle(G_TYPE_CHECK_INSTANCE_CAST(anObject,GTK_TYPE_RC_STYLE));
+end;
+
+function GTK_RC_STYLE_CLASS(klass: pointer) : PGtkRcStyleClass;
+begin
+ GTK_RC_STYLE_CLASS:=PGtkRcStyleClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_RC_STYLE));
+end;
+
+function GTK_IS_RC_STYLE(anObject: pointer) : boolean;
+begin
+ GTK_IS_RC_STYLE:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GTK_TYPE_RC_STYLE);
+end;
+
+function GTK_IS_RC_STYLE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_RC_STYLE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_RC_STYLE);
+end;
+
+function GTK_RC_STYLE_GET_CLASS(obj: pointer) : PGtkRcStyleClass;
+begin
+ GTK_RC_STYLE_GET_CLASS:=PGtkRcStyleClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_RC_STYLE));
+end;
+
+function engine_specified(var a : TGtkRcStyle) : guint;
+begin
+ engine_specified:=(a.flag0 and bm_TGtkRcStyle_engine_specified) shr bp_TGtkRcStyle_engine_specified;
+end;
+
+procedure set_engine_specified(var a : TGtkRcStyle; __engine_specified : guint);
+begin
+ a.flag0:=a.flag0 or ((__engine_specified shl bp_TGtkRcStyle_engine_specified) and bm_TGtkRcStyle_engine_specified);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkruler.inc b/packages/gtk2/src/gtk+/gtk/gtkruler.inc
new file mode 100644
index 0000000000..ec9d4c1870
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkruler.inc
@@ -0,0 +1,124 @@
+// included by gtk2.pas
+
+
+{
+ NOTE this widget is considered too specialized/little-used for
+ GTK+, and will in the future be moved to some other package. If
+ your application needs this widget, feel free to use it, as the
+ widget does work and is useful in some applications; it's just not
+ of general interest. However, we are not accepting new features for
+ the widget, and it will eventually move out of the GTK+
+ distribution.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkRulerMetric = ^TGtkRulerMetric;
+
+{ All distances below are in 1/72nd's of an inch. (According to
+ Adobe that's a point, but points are really 1/72.27 in.)
+ }
+{ The upper limit of the ruler (in points) }
+{ The lower limit of the ruler }
+{ The position of the mark on the ruler }
+{ The maximum size of the ruler }
+ PGtkRuler = ^TGtkRuler;
+ TGtkRuler = record
+ widget : TGtkWidget;
+ backing_store : PGdkPixmap;
+ non_gr_exp_gc : PGdkGC;
+ metric : PGtkRulerMetric;
+ xsrc : gint;
+ ysrc : gint;
+ slider_size : gint;
+ lower : gdouble;
+ upper : gdouble;
+ position : gdouble;
+ max_size : gdouble;
+ end;
+
+{ Padding for future expansion }
+ PGtkRulerClass = ^TGtkRulerClass;
+ TGtkRulerClass = record
+ parent_class : TGtkWidgetClass;
+ draw_ticks : procedure (ruler:PGtkRuler); cdecl;
+ draw_pos : procedure (ruler:PGtkRuler); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{ This should be points_per_unit. This is the size of the unit
+ in 1/72nd's of an inch and has nothing to do with screen pixels }
+{ five possible modes of subdivision }
+ TGtkRulerMetric = record
+ metric_name : Pgchar;
+ abbrev : Pgchar;
+ pixels_per_unit : gdouble;
+ ruler_scale : array[0..9] of gdouble;
+ subdivide : array[0..4] of gint;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_RULER : GType;
+function GTK_RULER(obj: pointer) : PGtkRuler;
+function GTK_RULER_CLASS(klass: pointer) : PGtkRulerClass;
+function GTK_IS_RULER(obj: pointer) : boolean;
+function GTK_IS_RULER_CLASS(klass: pointer) : boolean;
+function GTK_RULER_GET_CLASS(obj: pointer) : PGtkRulerClass;
+
+
+function gtk_ruler_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_ruler_set_metric(ruler:PGtkRuler; metric:TGtkMetricType); cdecl; external gtklib;
+procedure gtk_ruler_set_range(ruler:PGtkRuler; lower:gdouble; upper:gdouble; position:gdouble; max_size:gdouble); cdecl; external gtklib;
+procedure gtk_ruler_draw_ticks(ruler:PGtkRuler); cdecl; external gtklib;
+procedure gtk_ruler_draw_pos(ruler:PGtkRuler); cdecl; external gtklib;
+function gtk_ruler_get_metric(ruler:PGtkRuler):TGtkMetricType; cdecl; external gtklib;
+procedure gtk_ruler_get_range(ruler:PGtkRuler; lower:Pgdouble; upper:Pgdouble; position:Pgdouble; max_size:Pgdouble); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_RULER : GType;
+begin
+ GTK_TYPE_RULER:=gtk_ruler_get_type;
+end;
+
+function GTK_RULER(obj: pointer) : PGtkRuler;
+begin
+ GTK_RULER:=PGtkRuler(GTK_CHECK_CAST(obj,GTK_TYPE_RULER));
+end;
+
+function GTK_RULER_CLASS(klass: pointer) : PGtkRulerClass;
+begin
+ GTK_RULER_CLASS:=PGtkRulerClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_RULER));
+end;
+
+function GTK_IS_RULER(obj: pointer) : boolean;
+begin
+ GTK_IS_RULER:=GTK_CHECK_TYPE(obj,GTK_TYPE_RULER);
+end;
+
+function GTK_IS_RULER_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_RULER_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_RULER);
+end;
+
+function GTK_RULER_GET_CLASS(obj: pointer) : PGtkRulerClass;
+begin
+ GTK_RULER_GET_CLASS:=PGtkRulerClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_RULER));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkscale.inc b/packages/gtk2/src/gtk+/gtk/gtkscale.inc
new file mode 100644
index 0000000000..a6c7d6f166
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkscale.inc
@@ -0,0 +1,120 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkScale = ^TGtkScale;
+ TGtkScale = record
+ range : TGtkRange;
+ digits : gint;
+ flag0 : word;
+ end;
+
+
+{ Padding for future expansion }
+ PGtkScaleClass = ^TGtkScaleClass;
+ TGtkScaleClass = record
+ parent_class : TGtkRangeClass;
+ format_value : function (scale:PGtkScale; value:gdouble):Pgchar; cdecl;
+ draw_value : procedure (scale:PGtkScale); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkScale_draw_value = $1;
+ bp_TGtkScale_draw_value = 0;
+ bm_TGtkScale_value_pos = $6;
+ bp_TGtkScale_value_pos = 1;
+
+
+function GTK_TYPE_SCALE : GType;
+function GTK_SCALE(obj: pointer) : PGtkScale;
+function GTK_SCALE_CLASS(klass: pointer) : PGtkScaleClass;
+function GTK_IS_SCALE(obj: pointer) : boolean;
+function GTK_IS_SCALE_CLASS(klass: pointer) : boolean;
+function GTK_SCALE_GET_CLASS(obj: pointer) : PGtkScaleClass;
+
+
+function draw_value(var a : TGtkScale) : guint;
+procedure set_draw_value(var a : TGtkScale; __draw_value : guint);
+function value_pos(var a : TGtkScale) : guint;
+procedure set_value_pos(var a : TGtkScale; __value_pos : guint);
+
+function gtk_scale_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_scale_set_digits(scale:PGtkScale; digits:gint); cdecl; external gtklib;
+function gtk_scale_get_digits(scale:PGtkScale):gint; cdecl; external gtklib;
+procedure gtk_scale_set_draw_value(scale:PGtkScale; draw_value:gboolean); cdecl; external gtklib;
+function gtk_scale_get_draw_value(scale:PGtkScale):gboolean; cdecl; external gtklib;
+procedure gtk_scale_set_value_pos(scale:PGtkScale; pos:TGtkPositionType); cdecl; external gtklib;
+function gtk_scale_get_value_pos(scale:PGtkScale):TGtkPositionType; cdecl; external gtklib;
+procedure _gtk_scale_get_value_size(scale:PGtkScale; width:Pgint; height:Pgint); cdecl; external gtklib;
+function _gtk_scale_format_value(scale:PGtkScale; value:gdouble):Pgchar; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_SCALE : GType;
+begin
+ GTK_TYPE_SCALE:=gtk_scale_get_type;
+end;
+
+function GTK_SCALE(obj: pointer) : PGtkScale;
+begin
+ GTK_SCALE:=PGtkScale(GTK_CHECK_CAST(obj,GTK_TYPE_SCALE));
+end;
+
+function GTK_SCALE_CLASS(klass: pointer) : PGtkScaleClass;
+begin
+ GTK_SCALE_CLASS:=PGtkScaleClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SCALE));
+end;
+
+function GTK_IS_SCALE(obj: pointer) : boolean;
+begin
+ GTK_IS_SCALE:=GTK_CHECK_TYPE(obj,GTK_TYPE_SCALE);
+end;
+
+function GTK_IS_SCALE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_SCALE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SCALE);
+end;
+
+function GTK_SCALE_GET_CLASS(obj: pointer) : PGtkScaleClass;
+begin
+ GTK_SCALE_GET_CLASS:=PGtkScaleClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SCALE));
+end;
+
+function draw_value(var a : TGtkScale) : guint;
+begin
+ draw_value:=(a.flag0 and bm_TGtkScale_draw_value) shr bp_TGtkScale_draw_value;
+end;
+
+procedure set_draw_value(var a : TGtkScale; __draw_value : guint);
+begin
+ a.flag0:=a.flag0 or ((__draw_value shl bp_TGtkScale_draw_value) and bm_TGtkScale_draw_value);
+end;
+
+function value_pos(var a : TGtkScale) : guint;
+begin
+ value_pos:=(a.flag0 and bm_TGtkScale_value_pos) shr bp_TGtkScale_value_pos;
+end;
+
+procedure set_value_pos(var a : TGtkScale; __value_pos : guint);
+begin
+ a.flag0:=a.flag0 or ((__value_pos shl bp_TGtkScale_value_pos) and bm_TGtkScale_value_pos);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkscrollbar.inc b/packages/gtk2/src/gtk+/gtk/gtkscrollbar.inc
new file mode 100644
index 0000000000..ef85739f07
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkscrollbar.inc
@@ -0,0 +1,75 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkScrollbar = ^TGtkScrollbar;
+ TGtkScrollbar = record
+ range : TGtkRange;
+ end;
+
+{ Padding for future expansion }
+ PGtkScrollbarClass = ^TGtkScrollbarClass;
+ TGtkScrollbarClass = record
+ parent_class : TGtkRangeClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_SCROLLBAR : GType;
+function GTK_SCROLLBAR(obj: pointer) : PGtkScrollbar;
+function GTK_SCROLLBAR_CLASS(klass: pointer) : PGtkScrollbarClass;
+function GTK_IS_SCROLLBAR(obj: pointer) : boolean;
+function GTK_IS_SCROLLBAR_CLASS(klass: pointer) : boolean;
+function GTK_SCROLLBAR_GET_CLASS(obj: pointer) : PGtkScrollbarClass;
+
+
+function gtk_scrollbar_get_type:TGtkType; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_SCROLLBAR : GType;
+begin
+ GTK_TYPE_SCROLLBAR:=gtk_scrollbar_get_type;
+end;
+
+function GTK_SCROLLBAR(obj: pointer) : PGtkScrollbar;
+begin
+ GTK_SCROLLBAR:=PGtkScrollbar(GTK_CHECK_CAST(obj,GTK_TYPE_SCROLLBAR));
+end;
+
+function GTK_SCROLLBAR_CLASS(klass: pointer) : PGtkScrollbarClass;
+begin
+ GTK_SCROLLBAR_CLASS:=PGtkScrollbarClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SCROLLBAR));
+end;
+
+function GTK_IS_SCROLLBAR(obj: pointer) : boolean;
+begin
+ GTK_IS_SCROLLBAR:=GTK_CHECK_TYPE(obj,GTK_TYPE_SCROLLBAR);
+end;
+
+function GTK_IS_SCROLLBAR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_SCROLLBAR_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SCROLLBAR);
+end;
+
+function GTK_SCROLLBAR_GET_CLASS(obj: pointer) : PGtkScrollbarClass;
+begin
+ GTK_SCROLLBAR_GET_CLASS:=PGtkScrollbarClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SCROLLBAR));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkscrolledwindow.inc b/packages/gtk2/src/gtk+/gtk/gtkscrolledwindow.inc
new file mode 100644
index 0000000000..2eba92b532
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkscrolledwindow.inc
@@ -0,0 +1,189 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ Flag used by ::move-focus-out implementation }
+ PGtkScrolledWindow = ^TGtkScrolledWindow;
+ TGtkScrolledWindow = record
+ container : TGtkBin;
+ hscrollbar : PGtkWidget;
+ vscrollbar : PGtkWidget;
+ flag0 : {$ifdef win32}longint{$else}word{$endif};
+ shadow_type : guint16;
+ end;
+
+{ Action signals for keybindings. Do not connect to these signals
+ }
+{ Unfortunately, GtkScrollType is deficient in that there is
+ no horizontal/vertical variants for GTK_SCROLL_START/END,
+ so we have to add an additional boolean flag.
+ }
+{ Padding for future expansion }
+ PGtkScrolledWindowClass = ^TGtkScrolledWindowClass;
+ TGtkScrolledWindowClass = record
+ parent_class : TGtkBinClass;
+ scrollbar_spacing : gint;
+ scroll_child : procedure (scrolled_window:PGtkScrolledWindow; scroll:TGtkScrollType; horizontal:gboolean); cdecl;
+ move_focus_out : procedure (scrolled_window:PGtkScrolledWindow; direction:TGtkDirectionType); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkScrolledWindow_hscrollbar_policy = $3;
+ bp_TGtkScrolledWindow_hscrollbar_policy = 0;
+ bm_TGtkScrolledWindow_vscrollbar_policy = $C;
+ bp_TGtkScrolledWindow_vscrollbar_policy = 2;
+ bm_TGtkScrolledWindow_hscrollbar_visible = $10;
+ bp_TGtkScrolledWindow_hscrollbar_visible = 4;
+ bm_TGtkScrolledWindow_vscrollbar_visible = $20;
+ bp_TGtkScrolledWindow_vscrollbar_visible = 5;
+ bm_TGtkScrolledWindow_window_placement = $C0;
+ bp_TGtkScrolledWindow_window_placement = 6;
+ bm_TGtkScrolledWindow_focus_out = $100;
+ bp_TGtkScrolledWindow_focus_out = 8;
+
+
+function GTK_TYPE_SCROLLED_WINDOW : GType;
+function GTK_SCROLLED_WINDOW(obj: pointer) : PGtkScrolledWindow;
+function GTK_SCROLLED_WINDOW_CLASS(klass: pointer) : PGtkScrolledWindowClass;
+function GTK_IS_SCROLLED_WINDOW(obj: pointer) : boolean;
+function GTK_IS_SCROLLED_WINDOW_CLASS(klass: pointer) : boolean;
+function GTK_SCROLLED_WINDOW_GET_CLASS(obj: pointer) : PGtkScrolledWindowClass;
+
+function hscrollbar_policy(var a : TGtkScrolledWindow) : guint;
+procedure set_hscrollbar_policy(var a : TGtkScrolledWindow; __hscrollbar_policy : guint);
+function vscrollbar_policy(var a : TGtkScrolledWindow) : guint;
+procedure set_vscrollbar_policy(var a : TGtkScrolledWindow; __vscrollbar_policy : guint);
+function hscrollbar_visible(var a : TGtkScrolledWindow) : guint;
+procedure set_hscrollbar_visible(var a : TGtkScrolledWindow; __hscrollbar_visible : guint);
+function vscrollbar_visible(var a : TGtkScrolledWindow) : guint;
+procedure set_vscrollbar_visible(var a : TGtkScrolledWindow; __vscrollbar_visible : guint);
+function window_placement(var a : TGtkScrolledWindow) : guint;
+procedure set_window_placement(var a : TGtkScrolledWindow; __window_placement : guint);
+function focus_out(var a : TGtkScrolledWindow) : guint; overload;
+procedure set_focus_out(var a : TGtkScrolledWindow; __focus_out : guint); overload;
+
+function gtk_scrolled_window_get_type:TGtkType; cdecl; external gtklib;
+function gtk_scrolled_window_new(hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment):PGtkWidget; cdecl; external gtklib;
+procedure gtk_scrolled_window_set_hadjustment(scrolled_window:PGtkScrolledWindow; hadjustment:PGtkAdjustment); cdecl; external gtklib;
+procedure gtk_scrolled_window_set_vadjustment(scrolled_window:PGtkScrolledWindow; hadjustment:PGtkAdjustment); cdecl; external gtklib;
+function gtk_scrolled_window_get_hadjustment(scrolled_window:PGtkScrolledWindow):PGtkAdjustment; cdecl; external gtklib;
+function gtk_scrolled_window_get_vadjustment(scrolled_window:PGtkScrolledWindow):PGtkAdjustment; cdecl; external gtklib;
+procedure gtk_scrolled_window_set_policy(scrolled_window:PGtkScrolledWindow; hscrollbar_policy:TGtkPolicyType; vscrollbar_policy:TGtkPolicyType); cdecl; external gtklib;
+procedure gtk_scrolled_window_get_policy(scrolled_window:PGtkScrolledWindow; hscrollbar_policy:PGtkPolicyType; vscrollbar_policy:PGtkPolicyType); cdecl; external gtklib;
+procedure gtk_scrolled_window_set_placement(scrolled_window:PGtkScrolledWindow; window_placement:TGtkCornerType); cdecl; external gtklib;
+function gtk_scrolled_window_get_placement(scrolled_window:PGtkScrolledWindow):TGtkCornerType; cdecl; external gtklib;
+procedure gtk_scrolled_window_set_shadow_type(scrolled_window:PGtkScrolledWindow; _type:TGtkShadowType); cdecl; external gtklib;
+function gtk_scrolled_window_get_shadow_type(scrolled_window:PGtkScrolledWindow):TGtkShadowType; cdecl; external gtklib;
+procedure gtk_scrolled_window_add_with_viewport(scrolled_window:PGtkScrolledWindow; child:PGtkWidget); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_SCROLLED_WINDOW : GType;
+begin
+ GTK_TYPE_SCROLLED_WINDOW:=gtk_scrolled_window_get_type;
+end;
+
+function GTK_SCROLLED_WINDOW(obj: pointer) : PGtkScrolledWindow;
+begin
+ GTK_SCROLLED_WINDOW:=PGtkScrolledWindow(GTK_CHECK_CAST(obj,GTK_TYPE_SCROLLED_WINDOW));
+end;
+
+function GTK_SCROLLED_WINDOW_CLASS(klass: pointer) : PGtkScrolledWindowClass;
+begin
+ GTK_SCROLLED_WINDOW_CLASS:=PGtkScrolledWindowClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SCROLLED_WINDOW));
+end;
+
+function GTK_IS_SCROLLED_WINDOW(obj: pointer) : boolean;
+begin
+ GTK_IS_SCROLLED_WINDOW:=GTK_CHECK_TYPE(obj,GTK_TYPE_SCROLLED_WINDOW);
+end;
+
+function GTK_IS_SCROLLED_WINDOW_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_SCROLLED_WINDOW_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SCROLLED_WINDOW);
+end;
+
+function GTK_SCROLLED_WINDOW_GET_CLASS(obj: pointer) : PGtkScrolledWindowClass;
+begin
+ GTK_SCROLLED_WINDOW_GET_CLASS:=PGtkScrolledWindowClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SCROLLED_WINDOW));
+end;
+
+function hscrollbar_policy(var a : TGtkScrolledWindow) : guint;
+begin
+ hscrollbar_policy:=(a.flag0 and bm_TGtkScrolledWindow_hscrollbar_policy) shr bp_TGtkScrolledWindow_hscrollbar_policy;
+end;
+
+procedure set_hscrollbar_policy(var a : TGtkScrolledWindow; __hscrollbar_policy : guint);
+begin
+ a.flag0:=a.flag0 or ((__hscrollbar_policy shl bp_TGtkScrolledWindow_hscrollbar_policy) and bm_TGtkScrolledWindow_hscrollbar_policy);
+end;
+
+function vscrollbar_policy(var a : TGtkScrolledWindow) : guint;
+begin
+ vscrollbar_policy:=(a.flag0 and bm_TGtkScrolledWindow_vscrollbar_policy) shr bp_TGtkScrolledWindow_vscrollbar_policy;
+end;
+
+procedure set_vscrollbar_policy(var a : TGtkScrolledWindow; __vscrollbar_policy : guint);
+begin
+ a.flag0:=a.flag0 or ((__vscrollbar_policy shl bp_TGtkScrolledWindow_vscrollbar_policy) and bm_TGtkScrolledWindow_vscrollbar_policy);
+end;
+
+function hscrollbar_visible(var a : TGtkScrolledWindow) : guint;
+begin
+ hscrollbar_visible:=(a.flag0 and bm_TGtkScrolledWindow_hscrollbar_visible) shr bp_TGtkScrolledWindow_hscrollbar_visible;
+end;
+
+procedure set_hscrollbar_visible(var a : TGtkScrolledWindow; __hscrollbar_visible : guint);
+begin
+ a.flag0:=a.flag0 or ((__hscrollbar_visible shl bp_TGtkScrolledWindow_hscrollbar_visible) and bm_TGtkScrolledWindow_hscrollbar_visible);
+end;
+
+function vscrollbar_visible(var a : TGtkScrolledWindow) : guint;
+begin
+ vscrollbar_visible:=(a.flag0 and bm_TGtkScrolledWindow_vscrollbar_visible) shr bp_TGtkScrolledWindow_vscrollbar_visible;
+end;
+
+procedure set_vscrollbar_visible(var a : TGtkScrolledWindow; __vscrollbar_visible : guint);
+begin
+ a.flag0:=a.flag0 or ((__vscrollbar_visible shl bp_TGtkScrolledWindow_vscrollbar_visible) and bm_TGtkScrolledWindow_vscrollbar_visible);
+end;
+
+function window_placement(var a : TGtkScrolledWindow) : guint;
+begin
+ window_placement:=(a.flag0 and bm_TGtkScrolledWindow_window_placement) shr bp_TGtkScrolledWindow_window_placement;
+end;
+
+procedure set_window_placement(var a : TGtkScrolledWindow; __window_placement : guint);
+begin
+ a.flag0:=a.flag0 or ((__window_placement shl bp_TGtkScrolledWindow_window_placement) and bm_TGtkScrolledWindow_window_placement);
+end;
+
+function focus_out(var a : TGtkScrolledWindow) : guint;
+begin
+ focus_out:=(a.flag0 and bm_TGtkScrolledWindow_focus_out) shr bp_TGtkScrolledWindow_focus_out;
+end;
+
+procedure set_focus_out(var a : TGtkScrolledWindow; __focus_out : guint);
+begin
+ a.flag0:=a.flag0 or ((__focus_out shl bp_TGtkScrolledWindow_focus_out) and bm_TGtkScrolledWindow_focus_out);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkselection.inc b/packages/gtk2/src/gtk+/gtk/gtkselection.inc
new file mode 100644
index 0000000000..de1fa83bb9
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkselection.inc
@@ -0,0 +1,103 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ PGtkSelectionData = ^TGtkSelectionData;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ The contents of a selection are returned in a GtkSelectionData
+ structure. selection/target identify the request. type specifies
+ the type of the return; if length < 0, and the data should be
+ ignored. This structure has anObject semantics - no fields should be
+ modified directly, they should not be created directly, and
+ pointers to them should not be stored beyond the duration of a
+ callback. (If the last is changed, we'll need to add reference
+ counting.) The time field gives the timestamp at which the data was
+ sent.
+ }
+ TGtkSelectionData = record
+ selection : TGdkAtom;
+ target : TGdkAtom;
+ _type : TGdkAtom;
+ format : gint;
+ data : Pguchar;
+ length : gint;
+ display : PGdkDisplay;
+ end;
+
+ PGtkTargetEntry = ^TGtkTargetEntry;
+ TGtkTargetEntry = record
+ target : Pgchar;
+ flags : guint;
+ info : guint;
+ end;
+
+{ These structures not public, and are here only for the convenience of
+ gtkdnd.c
+ }
+{ This structure is a list of destinations, and associated guint id's }
+ PGtkTargetList = ^TGtkTargetList;
+ TGtkTargetList = record
+ list : PGList;
+ ref_count : guint;
+ end;
+
+ PGtkTargetPair = ^TGtkTargetPair;
+ TGtkTargetPair = record
+ target : TGdkAtom;
+ flags : guint;
+ info : guint;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_SELECTION_DATA : GType;
+
+function gtk_target_list_new(targets:PGtkTargetEntry; ntargets:guint):PGtkTargetList; cdecl; external gtklib;
+procedure gtk_target_list_ref(list:PGtkTargetList); cdecl; external gtklib;
+procedure gtk_target_list_unref(list:PGtkTargetList); cdecl; external gtklib;
+procedure gtk_target_list_add(list:PGtkTargetList; target:TGdkAtom; flags:guint; info:guint); cdecl; external gtklib;
+procedure gtk_target_list_add_table(list:PGtkTargetList; targets:PGtkTargetEntry; ntargets:guint); cdecl; external gtklib;
+procedure gtk_target_list_remove(list:PGtkTargetList; target:TGdkAtom); cdecl; external gtklib;
+function gtk_target_list_find(list:PGtkTargetList; target:TGdkAtom; info:Pguint):gboolean; cdecl; external gtklib;
+{ Public interface }
+function gtk_selection_owner_set(widget:PGtkWidget; selection:TGdkAtom; time:guint32):gboolean; cdecl; external gtklib;
+function gtk_selection_owner_set_for_display(display:PGdkDisplay; widget:PGtkWidget; selection:TGdkAtom; time:guint32):gboolean; cdecl; external gtklib;
+procedure gtk_selection_add_target(widget:PGtkWidget; selection:TGdkAtom; target:TGdkAtom; info:guint); cdecl; external gtklib;
+procedure gtk_selection_add_targets(widget:PGtkWidget; selection:TGdkAtom; targets:PGtkTargetEntry; ntargets:guint); cdecl; external gtklib;
+procedure gtk_selection_clear_targets(widget:PGtkWidget; selection:TGdkAtom); cdecl; external gtklib;
+function gtk_selection_convert(widget:PGtkWidget; selection:TGdkAtom; target:TGdkAtom; time:guint32):gboolean; cdecl; external gtklib;
+procedure gtk_selection_data_set(selection_data:PGtkSelectionData; _type:TGdkAtom; format:gint; data:Pguchar; length:gint); cdecl; external gtklib;
+function gtk_selection_data_set_text(selection_data:PGtkSelectionData; str:Pgchar; len:gint):gboolean; cdecl; external gtklib;
+function gtk_selection_data_get_text(selection_data:PGtkSelectionData):Pguchar; cdecl; external gtklib;
+function gtk_selection_data_get_targets(selection_data:PGtkSelectionData; var targets:PGdkAtom; var n_atoms:gint):gboolean; cdecl; external gtklib;
+function gtk_selection_data_targets_include_text(selection_data:PGtkSelectionData):gboolean; cdecl; external gtklib;
+{ Called when a widget is destroyed }
+procedure gtk_selection_remove_all(widget:PGtkWidget); cdecl; external gtklib;
+{ Event handlers }
+function gtk_selection_clear(widget:PGtkWidget; event:PGdkEventSelection):gboolean; cdecl; external gtklib;
+function gtk_selection_request(widget:PGtkWidget; event:PGdkEventSelection):gboolean; cdecl; external gtklib;
+function gtk_selection_incr_event(window:PGdkWindow; event:PGdkEventProperty):gboolean; cdecl; external gtklib;
+function gtk_selection_notify(widget:PGtkWidget; event:PGdkEventSelection):gboolean; cdecl; external gtklib;
+function gtk_selection_property_notify(widget:PGtkWidget; event:PGdkEventProperty):gboolean; cdecl; external gtklib;
+function gtk_selection_data_get_type:GType; cdecl; external gtklib;
+function gtk_selection_data_copy(data:PGtkSelectionData):PGtkSelectionData; cdecl; external gtklib;
+procedure gtk_selection_data_free(data:PGtkSelectionData); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_SELECTION_DATA : GType;
+begin
+ GTK_TYPE_SELECTION_DATA:=gtk_selection_data_get_type;
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkseparator.inc b/packages/gtk2/src/gtk+/gtk/gtkseparator.inc
new file mode 100644
index 0000000000..c3a2183ae7
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkseparator.inc
@@ -0,0 +1,70 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkSeparator = ^TGtkSeparator;
+ TGtkSeparator = record
+ widget : TGtkWidget;
+ end;
+
+ PGtkSeparatorClass = ^TGtkSeparatorClass;
+ TGtkSeparatorClass = record
+ parent_class : TGtkWidgetClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_SEPARATOR : GType;
+function GTK_SEPARATOR(obj: pointer) : PGtkSeparator;
+function GTK_SEPARATOR_CLASS(klass: pointer) : PGtkSeparatorClass;
+function GTK_IS_SEPARATOR(obj: pointer) : boolean;
+function GTK_IS_SEPARATOR_CLASS(klass: pointer) : boolean;
+function GTK_SEPARATOR_GET_CLASS(obj: pointer) : PGtkSeparatorClass;
+
+
+function gtk_separator_get_type:TGtkType; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_SEPARATOR : GType;
+begin
+ GTK_TYPE_SEPARATOR:=gtk_separator_get_type;
+end;
+
+function GTK_SEPARATOR(obj: pointer) : PGtkSeparator;
+begin
+ GTK_SEPARATOR:=PGtkSeparator(GTK_CHECK_CAST(obj,GTK_TYPE_SEPARATOR));
+end;
+
+function GTK_SEPARATOR_CLASS(klass: pointer) : PGtkSeparatorClass;
+begin
+ GTK_SEPARATOR_CLASS:=PGtkSeparatorClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SEPARATOR));
+end;
+
+function GTK_IS_SEPARATOR(obj: pointer) : boolean;
+begin
+ GTK_IS_SEPARATOR:=GTK_CHECK_TYPE(obj,GTK_TYPE_SEPARATOR);
+end;
+
+function GTK_IS_SEPARATOR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_SEPARATOR_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SEPARATOR);
+end;
+
+function GTK_SEPARATOR_GET_CLASS(obj: pointer) : PGtkSeparatorClass;
+begin
+ GTK_SEPARATOR_GET_CLASS:=PGtkSeparatorClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SEPARATOR));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkseparatormenuitem.inc b/packages/gtk2/src/gtk+/gtk/gtkseparatormenuitem.inc
new file mode 100644
index 0000000000..d04d2e0df6
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkseparatormenuitem.inc
@@ -0,0 +1,71 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkSeparatorMenuItem = ^TGtkSeparatorMenuItem;
+ TGtkSeparatorMenuItem = record
+ menu_item : TGtkMenuItem;
+ end;
+
+ PGtkSeparatorMenuItemClass = ^TGtkSeparatorMenuItemClass;
+ TGtkSeparatorMenuItemClass = record
+ parent_class : TGtkMenuItemClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_SEPARATOR_MENU_ITEM : GType;
+function GTK_SEPARATOR_MENU_ITEM(obj: pointer) : PGtkSeparatorMenuItem;
+function GTK_SEPARATOR_MENU_ITEM_CLASS(klass: pointer) : PGtkSeparatorMenuItemClass;
+function GTK_IS_SEPARATOR_MENU_ITEM(obj: pointer) : boolean;
+function GTK_IS_SEPARATOR_MENU_ITEM_CLASS(klass: pointer) : boolean;
+function GTK_SEPARATOR_MENU_ITEM_GET_CLASS(obj: pointer) : PGtkSeparatorMenuItemClass;
+
+
+function gtk_separator_menu_item_get_type:GType; cdecl; external gtklib;
+function gtk_separator_menu_item_new:PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_SEPARATOR_MENU_ITEM : GType;
+begin
+ GTK_TYPE_SEPARATOR_MENU_ITEM:=gtk_separator_menu_item_get_type;
+end;
+
+function GTK_SEPARATOR_MENU_ITEM(obj: pointer) : PGtkSeparatorMenuItem;
+begin
+ GTK_SEPARATOR_MENU_ITEM:=PGtkSeparatorMenuItem(GTK_CHECK_CAST(obj,GTK_TYPE_SEPARATOR_MENU_ITEM));
+end;
+
+function GTK_SEPARATOR_MENU_ITEM_CLASS(klass: pointer) : PGtkSeparatorMenuItemClass;
+begin
+ GTK_SEPARATOR_MENU_ITEM_CLASS:=PGtkSeparatorMenuItemClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SEPARATOR_MENU_ITEM));
+end;
+
+function GTK_IS_SEPARATOR_MENU_ITEM(obj: pointer) : boolean;
+begin
+ GTK_IS_SEPARATOR_MENU_ITEM:=GTK_CHECK_TYPE(obj,GTK_TYPE_SEPARATOR_MENU_ITEM);
+end;
+
+function GTK_IS_SEPARATOR_MENU_ITEM_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_SEPARATOR_MENU_ITEM_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SEPARATOR_MENU_ITEM);
+end;
+
+function GTK_SEPARATOR_MENU_ITEM_GET_CLASS(obj: pointer) : PGtkSeparatorMenuItemClass;
+begin
+ GTK_SEPARATOR_MENU_ITEM_GET_CLASS:=PGtkSeparatorMenuItemClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SEPARATOR_MENU_ITEM));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtksettings.inc b/packages/gtk2/src/gtk+/gtk/gtksettings.inc
new file mode 100644
index 0000000000..ea5bc374a4
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtksettings.inc
@@ -0,0 +1,115 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // find PGtkRcContext
+ PGtkRcContext = pointer;
+
+{ --- structures --- }
+{ of type GtkSettingsValue }
+ PGtkSettings = ^TGtkSettings;
+ TGtkSettings = record
+ parent_instance : TGObject;
+ queued_settings : PGData;
+ property_values : PGValue;
+ rc_context : PGtkRcContext;
+ screen : PGdkScreen;
+ end;
+
+ PGtkSettingsClass = ^TGtkSettingsClass;
+ TGtkSettingsClass = record
+ parent_class : TGObjectClass;
+ end;
+
+{ origin should be something like "filename:linenumber" for rc files,
+ or e.g. "XProperty" for other sources
+ }
+{ valid types are LONG, DOUBLE and STRING corresponding to the token parsed,
+ or a GSTRING holding an unparsed statement
+ }
+ PGtkSettingsValue = ^TGtkSettingsValue;
+ TGtkSettingsValue = record
+ origin : Pgchar;
+ value : TGValue;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_SETTINGS : GType;
+function GTK_SETTINGS(obj: pointer) : PGtkSettings;
+function GTK_SETTINGS_CLASS(klass: pointer) : PGtkSettingsClass;
+function GTK_IS_SETTINGS(obj: pointer) : boolean;
+function GTK_IS_SETTINGS_CLASS(klass: pointer) : boolean;
+function GTK_SETTINGS_GET_CLASS(obj: pointer) : PGtkSettingsClass;
+
+
+{ --- functions --- }
+
+function gtk_settings_get_type:GType; cdecl; external gtklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gtk_settings_get_default:PGtkSettings; cdecl; external gtklib;
+{$endif}
+
+function gtk_settings_get_for_screen(screen:PGdkScreen):PGtkSettings; cdecl; external gtklib;
+procedure gtk_settings_install_property(pspec:PGParamSpec); cdecl; external gtklib;
+procedure gtk_settings_install_property_parser(pspec:PGParamSpec; parser:TGtkRcPropertyParser); cdecl; external gtklib;
+{ --- precoded parsing functions --- }
+function gtk_rc_property_parse_color(pspec:PGParamSpec; gstring:PGString; property_value:PGValue):gboolean; cdecl; external gtklib;
+function gtk_rc_property_parse_enum(pspec:PGParamSpec; gstring:PGString; property_value:PGValue):gboolean; cdecl; external gtklib;
+function gtk_rc_property_parse_flags(pspec:PGParamSpec; gstring:PGString; property_value:PGValue):gboolean; cdecl; external gtklib;
+function gtk_rc_property_parse_requisition(pspec:PGParamSpec; gstring:PGString; property_value:PGValue):gboolean; cdecl; external gtklib;
+function gtk_rc_property_parse_border(pspec:PGParamSpec; gstring:PGString; property_value:PGValue):gboolean; cdecl; external gtklib;
+{< private > }
+procedure gtk_settings_set_property_value(settings:PGtkSettings; name:Pgchar; svalue:PGtkSettingsValue); cdecl; external gtklib;
+procedure gtk_settings_set_string_property(settings:PGtkSettings; name:Pgchar; v_string:Pgchar; origin:Pgchar); cdecl; external gtklib;
+procedure gtk_settings_set_long_property(settings:PGtkSettings; name:Pgchar; v_long:glong; origin:Pgchar); cdecl; external gtklib;
+procedure gtk_settings_set_double_property(settings:PGtkSettings; name:Pgchar; v_double:gdouble; origin:Pgchar); cdecl; external gtklib;
+{ implementation details }
+procedure _gtk_settings_handle_event(event:PGdkEventSetting); cdecl; external gtklib;
+function _gtk_rc_property_parser_from_type(_type:GType):TGtkRcPropertyParser; cdecl; external gtklib;
+function _gtk_settings_parse_convert(parser:TGtkRcPropertyParser; src_value:PGValue; pspec:PGParamSpec; dest_value:PGValue):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_SETTINGS : GType;
+begin
+ GTK_TYPE_SETTINGS:=gtk_settings_get_type;
+end;
+
+function GTK_SETTINGS(obj: pointer) : PGtkSettings;
+begin
+ GTK_SETTINGS:=PGtkSettings(GTK_CHECK_CAST(obj,GTK_TYPE_SETTINGS));
+end;
+
+function GTK_SETTINGS_CLASS(klass: pointer) : PGtkSettingsClass;
+begin
+ GTK_SETTINGS_CLASS:=PGtkSettingsClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SETTINGS));
+end;
+
+function GTK_IS_SETTINGS(obj: pointer) : boolean;
+begin
+ GTK_IS_SETTINGS:=GTK_CHECK_TYPE(obj,GTK_TYPE_SETTINGS);
+end;
+
+function GTK_IS_SETTINGS_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_SETTINGS_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SETTINGS);
+end;
+
+function GTK_SETTINGS_GET_CLASS(obj: pointer) : PGtkSettingsClass;
+begin
+ GTK_SETTINGS_GET_CLASS:=PGtkSettingsClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SETTINGS));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtksignal.inc b/packages/gtk2/src/gtk+/gtk/gtksignal.inc
new file mode 100644
index 0000000000..330afa66ae
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtksignal.inc
@@ -0,0 +1,212 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_signal_default_marshaller(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer); cdecl;
+
+{ --- compat defines --- }
+function gtk_signal_lookup(name:Pgchar; object_type:GType):guint;
+function gtk_signal_name(signal_id:guint):Pgchar;
+procedure gtk_signal_emit_stop(instance:gpointer; signal_id:guint; detail:TGQuark);
+function gtk_signal_connect(anObject:PGtkObject; name:Pgchar; func:TGtkSignalFunc;
+ func_data:gpointer):gulong;
+function gtk_signal_connect_after(anObject:PGtkObject; name:Pgchar; func:TGtkSignalFunc;
+ func_data:gpointer):gulong;
+function gtk_signal_connect_object(anObject:PGtkObject; name:Pgchar; func:TGtkSignalFunc;
+ slot_object:gpointer):gulong;
+function gtk_signal_connect_object_after(anObject:PGtkObject; name:Pgchar; func:TGtkSignalFunc;
+ slot_object:gpointer):gulong;
+procedure gtk_signal_disconnect(anObject: gpointer; handler_id : gulong);
+procedure gtk_signal_handler_block(anObject: gpointer; handler_id : gulong);
+procedure gtk_signal_handler_unblock(anObject: gpointer; handler_id : gulong);
+
+procedure gtk_signal_disconnect_by_func(anObject:PGtkObject;
+ func: TGtkSignalFunc; data: gpointer);
+procedure gtk_signal_disconnect_by_data(anObject:PGtkObject; data : gpointer);
+
+procedure gtk_signal_handler_block_by_func(anObject:PGtkObject;
+ func: TGtkSignalFunc; data: gpointer);
+procedure gtk_signal_handler_block_by_data(anObject:PGtkObject; data : gpointer);
+procedure gtk_signal_handler_unblock_by_func(anObject:PGtkObject;
+ func: TGtkSignalFunc; data: gpointer);
+procedure gtk_signal_handler_unblock_by_data(anObject:PGtkObject; data : gpointer);
+function gtk_signal_handler_pending(anObject:PGtkObject; signal_id: guint;
+ may_be_blocked: gboolean): gboolean;
+function gtk_signal_handler_pending_by_func(anObject:PGtkObject;
+ signal_id: guint; may_be_blocked: gboolean; func: TGtkSignalFunc;
+ data: gpointer): gboolean;
+
+{ --- compat functions --- }
+function gtk_signal_newv(name:Pgchar; signal_flags:TGtkSignalRunType; object_type:TGtkType; function_offset:guint; marshaller:TGtkSignalMarshaller;
+ return_val:TGtkType; n_args:guint; args:PGtkType):guint; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+function gtk_signal_new(name:Pgchar; signal_flags:TGtkSignalRunType; object_type:TGtkType; function_offset:guint; marshaller:TGtkSignalMarshaller;
+ return_val:TGtkType; n_args:guint; args:array of const):guint; cdecl; overload; external gtklib;
+function gtk_signal_new(name:Pgchar; signal_flags:TGtkSignalRunType; object_type:TGtkType; function_offset:guint; marshaller:TGtkSignalMarshaller;
+ return_val:TGtkType; n_args:guint):guint; cdecl; varargs; overload; external gtklib;
+{$ELSE}
+function gtk_signal_new(name:Pgchar; signal_flags:TGtkSignalRunType; object_type:TGtkType; function_offset:guint; marshaller:TGtkSignalMarshaller;
+ return_val:TGtkType; n_args:guint):guint; varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_signal_emit_stop_by_name(anObject:PGtkObject; name:Pgchar); cdecl; external gtklib;
+procedure gtk_signal_connect_object_while_alive(anObject:PGtkObject; name:Pgchar; func:TGtkSignalFunc; alive_object:PGtkObject); cdecl; external gtklib;
+procedure gtk_signal_connect_while_alive(anObject:PGtkObject; name:Pgchar; func:TGtkSignalFunc; func_data:gpointer; alive_object:PGtkObject); cdecl; external gtklib;
+function gtk_signal_connect_full(anObject:PGtkObject; name:Pgchar; func:TGtkSignalFunc; unsupported:TGtkCallbackMarshal; data:gpointer;
+ destroy_func:TGtkDestroyNotify; object_signal:gint; after:gint):gulong; cdecl; external gtklib;
+procedure gtk_signal_emitv(anObject:PGtkObject; signal_id:guint; args:PGtkArg); cdecl; external gtklib;
+{$IFNDEF KYLIX}
+procedure gtk_signal_emit(anObject:PGtkObject; signal_id:guint; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_signal_emit(anObject:PGtkObject; signal_id:guint); cdecl; overload; varargs; external gtklib;
+procedure gtk_signal_emit_by_name(anObject:PGtkObject; name:Pgchar; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_signal_emit_by_name(anObject:PGtkObject; name:Pgchar); cdecl; overload; varargs; external gtklib;
+{$ELSE}
+procedure gtk_signal_emit(anObject:PGtkObject; signal_id:guint); varargs; cdecl; external gtklib;
+procedure gtk_signal_emit_by_name(anObject:PGtkObject; name:Pgchar); varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_signal_emitv_by_name(anObject:PGtkObject; name:Pgchar; args:PGtkArg); cdecl; external gtklib;
+procedure gtk_signal_compat_matched(anObject:PGtkObject; func:TGtkSignalFunc; data:gpointer; match:TGSignalMatchType; action:guint); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function gtk_signal_lookup(name:Pgchar; object_type:GType):guint;
+begin
+ gtk_signal_lookup:=g_signal_lookup(name,object_type);
+end;
+
+function gtk_signal_name(signal_id:guint):Pgchar;
+begin
+ gtk_signal_name:=g_signal_name(signal_id);
+end;
+
+procedure gtk_signal_emit_stop(instance:gpointer; signal_id:guint; detail:TGQuark);
+begin
+ if detail<>0 then ;// dummy statement
+ g_signal_stop_emission(instance,signal_id,0);
+end;
+
+function gtk_signal_connect(anObject:PGtkObject; name:Pgchar; func:TGtkSignalFunc;
+ func_data:gpointer):gulong;
+begin
+ gtk_signal_connect:=gtk_signal_connect_full(anObject,name,func,nil,func_data,nil,0,0);
+end;
+
+function gtk_signal_connect_after(anObject:PGtkObject; name:Pgchar; func:TGtkSignalFunc;
+ func_data:gpointer):gulong;
+begin
+ gtk_signal_connect_after:=gtk_signal_connect_full(anObject,name,func,nil,func_data,nil,0,1);
+end;
+
+function gtk_signal_connect_object(anObject:PGtkObject; name:Pgchar; func:TGtkSignalFunc;
+ slot_object:gpointer):gulong;
+begin
+ gtk_signal_connect_object:=gtk_signal_connect_full(anObject,name,func,nil,slot_object,nil,1,0);
+end;
+
+function gtk_signal_connect_object_after(anObject:PGtkObject; name:Pgchar; func:TGtkSignalFunc;
+ slot_object:gpointer):gulong;
+begin
+ gtk_signal_connect_object_after:=gtk_signal_connect_full(anObject,name,func,nil,slot_object,nil,1,1);
+end;
+
+procedure gtk_signal_disconnect(anObject: gpointer; handler_id : gulong);
+begin
+ g_signal_handler_disconnect(anObject,handler_id);
+end;
+
+procedure gtk_signal_handler_block(anObject: gpointer; handler_id : gulong);
+begin
+ g_signal_handler_block(anObject,handler_id);
+end;
+
+procedure gtk_signal_handler_unblock(anObject: gpointer; handler_id : gulong);
+begin
+ g_signal_handler_unblock(anObject,handler_id);
+end;
+
+procedure gtk_signal_disconnect_by_data(anObject:PGtkObject; data : gpointer);
+begin
+ gtk_signal_compat_matched(anObject,nil,data,G_SIGNAL_MATCH_DATA,0);
+end;
+
+procedure gtk_signal_disconnect_by_func(anObject:PGtkObject;
+ func: TGtkSignalFunc; data: gpointer);
+begin
+ gtk_signal_compat_matched (anObject,func,data,
+ TGSignalMatchType(G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA),0);
+end;
+
+procedure gtk_signal_handler_block_by_func(anObject:PGtkObject;
+ func: TGtkSignalFunc; data: gpointer);
+begin
+ gtk_signal_compat_matched (anObject,func,data,
+ TGSignalMatchType(G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA),0);
+end;
+
+procedure gtk_signal_handler_block_by_data(anObject:PGtkObject; data : gpointer);
+begin
+ gtk_signal_compat_matched(anObject,nil,data,G_SIGNAL_MATCH_DATA,1);
+end;
+
+procedure gtk_signal_handler_unblock_by_func(anObject:PGtkObject;
+ func: TGtkSignalFunc; data: gpointer);
+begin
+ gtk_signal_compat_matched(anObject,func,data,
+ TGSignalMatchType(G_SIGNAL_MATCH_FUNC or G_SIGNAL_MATCH_DATA),0);
+end;
+
+procedure gtk_signal_handler_unblock_by_data(anObject:PGtkObject; data : gpointer);
+begin
+ gtk_signal_compat_matched(anObject,nil,data,G_SIGNAL_MATCH_DATA,2);
+end;
+
+function gtk_signal_handler_pending(anObject:PGtkObject; signal_id: guint;
+ may_be_blocked: gboolean): gboolean;
+begin
+ Result:=g_signal_has_handler_pending(anObject,signal_id,0,may_be_blocked);
+end;
+
+function gtk_signal_handler_pending_by_func(anObject:PGtkObject;
+ signal_id: guint; may_be_blocked: gboolean; func: TGtkSignalFunc;
+ data: gpointer): gboolean;
+var
+ t: TGSignalMatchType;
+begin
+ t:=TGSignalMatchType(G_SIGNAL_MATCH_ID or G_SIGNAL_MATCH_FUNC
+ or G_SIGNAL_MATCH_DATA);
+ if not may_be_blocked then
+ t:=t or TGSignalMatchType(G_SIGNAL_MATCH_UNBLOCKED);
+ Result := g_signal_handler_find(anObject,t,signal_id,0,nil,@func,data)<>0;
+end;
+
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_signal_default_marshaller(closure:PGClosure; return_value:PGValue;
+ n_param_values:GUInt; param_values:PGValue; invocation_hint:GPointer;
+ marshal_data:GPointer); cdecl;
+begin
+ g_cclosure_marshal_VOID__VOID(closure,return_value,
+ n_param_values,param_values,invocation_hint,
+ marshal_data);
+end;
+{$endif GTK_DISABLE_DEPRECATED}
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtksizegroup.inc b/packages/gtk2/src/gtk+/gtk/gtksizegroup.inc
new file mode 100644
index 0000000000..73d2afdcc0
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtksizegroup.inc
@@ -0,0 +1,137 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkSizeGroup = ^TGtkSizeGroup;
+ TGtkSizeGroup = record
+ parent_instance : TGObject;
+ widgets : PGSList;
+ mode : guint8;
+ flag0 : word;
+ requisition : TGtkRequisition;
+ end;
+
+{ Padding for future expansion }
+ PGtkSizeGroupClass = ^TGtkSizeGroupClass;
+ TGtkSizeGroupClass = record
+ parent_class : TGObjectClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{
+ GtkSizeGroupMode:
+ @GTK_SIZE_GROUP_NONE: group has no effect
+ @GTK_SIZE_GROUP_HORIZONTAL: group effects horizontal requisition
+ @GTK_SIZE_GROUP_VERTICAL: group effects vertical requisition
+ @GTK_SIZE_GROUP_BOTH: group effects both horizontal and vertical requisition
+
+ The mode of the size group determines the directions in which the size
+ group effects the requested sizes of its component widgets.
+ }
+
+ PGtkSizeGroupMode = ^TGtkSizeGroupMode;
+ TGtkSizeGroupMode = (
+ GTK_SIZE_GROUP_NONE,
+ GTK_SIZE_GROUP_HORIZONTAL,
+ GTK_SIZE_GROUP_VERTICAL,
+ GTK_SIZE_GROUP_BOTH
+ );
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkSizeGroup_have_width = $1;
+ bp_TGtkSizeGroup_have_width = 0;
+ bm_TGtkSizeGroup_have_height = $2;
+ bp_TGtkSizeGroup_have_height = 1;
+
+
+function GTK_TYPE_SIZE_GROUP : GType;
+function GTK_SIZE_GROUP(obj: pointer) : PGtkSizeGroup;
+function GTK_SIZE_GROUP_CLASS(klass: pointer) : PGtkSizeGroupClass;
+function GTK_IS_SIZE_GROUP(obj: pointer) : boolean;
+function GTK_IS_SIZE_GROUP_CLASS(klass: pointer) : boolean;
+function GTK_SIZE_GROUP_GET_CLASS(obj: pointer) : PGtkSizeGroupClass;
+
+function have_width(var a : TGtkSizeGroup) : guint;
+procedure set_have_width(var a : TGtkSizeGroup; __have_width : guint);
+function have_height(var a : TGtkSizeGroup) : guint;
+procedure set_have_height(var a : TGtkSizeGroup; __have_height : guint);
+
+function gtk_size_group_get_type:GType; cdecl; external gtklib;
+function gtk_size_group_new(mode:TGtkSizeGroupMode):PGtkSizeGroup; cdecl; external gtklib;
+procedure gtk_size_group_set_mode(size_group:PGtkSizeGroup; mode:TGtkSizeGroupMode); cdecl; external gtklib;
+function gtk_size_group_get_mode(size_group:PGtkSizeGroup):TGtkSizeGroupMode; cdecl; external gtklib;
+procedure gtk_size_group_add_widget(size_group:PGtkSizeGroup; widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_size_group_remove_widget(size_group:PGtkSizeGroup; widget:PGtkWidget); cdecl; external gtklib;
+procedure _gtk_size_group_get_child_requisition(widget:PGtkWidget; requisition:PGtkRequisition); cdecl; external gtklib;
+procedure _gtk_size_group_compute_requisition(widget:PGtkWidget; requisition:PGtkRequisition); cdecl; external gtklib;
+procedure _gtk_size_group_queue_resize(widget:PGtkWidget); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_SIZE_GROUP : GType;
+begin
+ GTK_TYPE_SIZE_GROUP:=gtk_size_group_get_type;
+end;
+
+function GTK_SIZE_GROUP(obj: pointer) : PGtkSizeGroup;
+begin
+ GTK_SIZE_GROUP:=PGtkSizeGroup(GTK_CHECK_CAST(obj,GTK_TYPE_SIZE_GROUP));
+end;
+
+function GTK_SIZE_GROUP_CLASS(klass: pointer) : PGtkSizeGroupClass;
+begin
+ GTK_SIZE_GROUP_CLASS:=PGtkSizeGroupClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SIZE_GROUP));
+end;
+
+function GTK_IS_SIZE_GROUP(obj: pointer) : boolean;
+begin
+ GTK_IS_SIZE_GROUP:=GTK_CHECK_TYPE(obj,GTK_TYPE_SIZE_GROUP);
+end;
+
+function GTK_IS_SIZE_GROUP_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_SIZE_GROUP_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SIZE_GROUP);
+end;
+
+function GTK_SIZE_GROUP_GET_CLASS(obj: pointer) : PGtkSizeGroupClass;
+begin
+ GTK_SIZE_GROUP_GET_CLASS:=PGtkSizeGroupClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SIZE_GROUP));
+end;
+
+function have_width(var a : TGtkSizeGroup) : guint;
+begin
+ have_width:=(a.flag0 and bm_TGtkSizeGroup_have_width) shr bp_TGtkSizeGroup_have_width;
+end;
+
+procedure set_have_width(var a : TGtkSizeGroup; __have_width : guint);
+begin
+ a.flag0:=a.flag0 or ((__have_width shl bp_TGtkSizeGroup_have_width) and bm_TGtkSizeGroup_have_width);
+end;
+
+function have_height(var a : TGtkSizeGroup) : guint;
+begin
+ have_height:=(a.flag0 and bm_TGtkSizeGroup_have_height) shr bp_TGtkSizeGroup_have_height;
+end;
+
+procedure set_have_height(var a : TGtkSizeGroup; __have_height : guint);
+begin
+ a.flag0:=a.flag0 or ((__have_height shl bp_TGtkSizeGroup_have_height) and bm_TGtkSizeGroup_have_height);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtksocket.inc b/packages/gtk2/src/gtk+/gtk/gtksocket.inc
new file mode 100644
index 0000000000..3c6566fbc0
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtksocket.inc
@@ -0,0 +1,172 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ -1 == not xembed }
+ PGtkSocket = ^TGtkSocket;
+ TGtkSocket = record
+ container : TGtkContainer;
+ request_width : guint16;
+ request_height : guint16;
+ current_width : guint16;
+ current_height : guint16;
+ plug_window : PGdkWindow;
+ plug_widget : PGtkWidget;
+ xembed_version : gshort;
+ flag0 : word;
+ accel_group : PGtkAccelGroup;
+ toplevel : PGtkWidget;
+ end;
+
+
+{ Padding for future expansion }
+ PGtkSocketClass = ^TGtkSocketClass;
+ TGtkSocketClass = record
+ parent_class : TGtkContainerClass;
+ plug_added : procedure (socket:PGtkSocket); cdecl;
+ plug_removed : function (socket:PGtkSocket):gboolean; cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkSocket_same_app = $1;
+ bp_TGtkSocket_same_app = 0;
+ bm_TGtkSocket_focus_in = $2;
+ bp_TGtkSocket_focus_in = 1;
+ bm_TGtkSocket_have_size = $4;
+ bp_TGtkSocket_have_size = 2;
+ bm_TGtkSocket_need_map = $8;
+ bp_TGtkSocket_need_map = 3;
+ bm_TGtkSocket_is_mapped = $10;
+ bp_TGtkSocket_is_mapped = 4;
+
+
+function GTK_TYPE_SOCKET : GType;
+function GTK_SOCKET(obj: pointer) : PGtkSocket;
+function GTK_SOCKET_CLASS(klass: pointer) : PGtkSocketClass;
+function GTK_IS_SOCKET(obj: pointer) : boolean;
+function GTK_IS_SOCKET_CLASS(klass: pointer) : boolean;
+function GTK_SOCKET_GET_CLASS(obj: pointer) : PGtkSocketClass;
+
+
+function same_app(var a : TGtkSocket) : guint; overload;
+procedure set_same_app(var a : TGtkSocket; __same_app : guint); overload;
+function focus_in(var a : TGtkSocket) : guint;
+procedure set_focus_in(var a : TGtkSocket; __focus_in : guint);
+function have_size(var a : TGtkSocket) : guint;
+procedure set_have_size(var a : TGtkSocket; __have_size : guint);
+function need_map(var a : TGtkSocket) : guint;
+procedure set_need_map(var a : TGtkSocket; __need_map : guint);
+function is_mapped(var a : TGtkSocket) : guint;
+procedure set_is_mapped(var a : TGtkSocket; __is_mapped : guint);
+
+function gtk_socket_new:PGtkWidget; cdecl; external gtklib;
+function gtk_socket_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_socket_add_id(socket:PGtkSocket; window_id:TGdkNativeWindow); cdecl; external gtklib;
+function gtk_socket_get_id(socket:PGtkSocket):TGdkNativeWindow; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_socket_steal(socket:PGtkSocket; wid:TGdkNativeWindow); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_SOCKET : GType;
+begin
+ GTK_TYPE_SOCKET:=gtk_socket_get_type;
+end;
+
+function GTK_SOCKET(obj: pointer) : PGtkSocket;
+begin
+ GTK_SOCKET:=PGtkSocket(GTK_CHECK_CAST(obj,GTK_TYPE_SOCKET));
+end;
+
+function GTK_SOCKET_CLASS(klass: pointer) : PGtkSocketClass;
+begin
+ GTK_SOCKET_CLASS:=PGtkSocketClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SOCKET));
+end;
+
+function GTK_IS_SOCKET(obj: pointer) : boolean;
+begin
+ GTK_IS_SOCKET:=GTK_CHECK_TYPE(obj,GTK_TYPE_SOCKET);
+end;
+
+function GTK_IS_SOCKET_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_SOCKET_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SOCKET);
+end;
+
+function GTK_SOCKET_GET_CLASS(obj: pointer) : PGtkSocketClass;
+begin
+ GTK_SOCKET_GET_CLASS:=PGtkSocketClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SOCKET));
+end;
+
+function same_app(var a : TGtkSocket) : guint;
+begin
+ same_app:=(a.flag0 and bm_TGtkSocket_same_app) shr bp_TGtkSocket_same_app;
+end;
+
+procedure set_same_app(var a : TGtkSocket; __same_app : guint);
+begin
+ a.flag0:=a.flag0 or ((__same_app shl bp_TGtkSocket_same_app) and bm_TGtkSocket_same_app);
+end;
+
+function focus_in(var a : TGtkSocket) : guint;
+begin
+ focus_in:=(a.flag0 and bm_TGtkSocket_focus_in) shr bp_TGtkSocket_focus_in;
+end;
+
+procedure set_focus_in(var a : TGtkSocket; __focus_in : guint);
+begin
+ a.flag0:=a.flag0 or ((__focus_in shl bp_TGtkSocket_focus_in) and bm_TGtkSocket_focus_in);
+end;
+
+function have_size(var a : TGtkSocket) : guint;
+begin
+ have_size:=(a.flag0 and bm_TGtkSocket_have_size) shr bp_TGtkSocket_have_size;
+end;
+
+procedure set_have_size(var a : TGtkSocket; __have_size : guint);
+begin
+ a.flag0:=a.flag0 or ((__have_size shl bp_TGtkSocket_have_size) and bm_TGtkSocket_have_size);
+end;
+
+function need_map(var a : TGtkSocket) : guint;
+begin
+ need_map:=(a.flag0 and bm_TGtkSocket_need_map) shr bp_TGtkSocket_need_map;
+end;
+
+procedure set_need_map(var a : TGtkSocket; __need_map : guint);
+begin
+ a.flag0:=a.flag0 or ((__need_map shl bp_TGtkSocket_need_map) and bm_TGtkSocket_need_map);
+end;
+
+function is_mapped(var a : TGtkSocket) : guint;
+begin
+ is_mapped:=(a.flag0 and bm_TGtkSocket_is_mapped) shr bp_TGtkSocket_is_mapped;
+end;
+
+procedure set_is_mapped(var a : TGtkSocket; __is_mapped : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_mapped shl bp_TGtkSocket_is_mapped) and bm_TGtkSocket_is_mapped);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkspinbutton.inc b/packages/gtk2/src/gtk+/gtk/gtkspinbutton.inc
new file mode 100644
index 0000000000..9d30d3923e
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkspinbutton.inc
@@ -0,0 +1,273 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkSpinButtonUpdatePolicy = ^TGtkSpinButtonUpdatePolicy;
+ TGtkSpinButtonUpdatePolicy = (
+ GTK_UPDATE_ALWAYS,
+ GTK_UPDATE_IF_VALID
+ );
+
+ PGtkSpinType = ^TGtkSpinType;
+ TGtkSpinType = (
+ GTK_SPIN_STEP_FORWARD,
+ GTK_SPIN_STEP_BACKWARD,
+ GTK_SPIN_PAGE_FORWARD,
+ GTK_SPIN_PAGE_BACKWARD,
+ GTK_SPIN_HOME,
+ GTK_SPIN_END,
+ GTK_SPIN_USER_DEFINED
+ );
+
+{ valid: GTK_ARROW_UP=0, GTK_ARROW_DOWN=1 or 2=NONE/BOTH }
+ PGtkSpinButton = ^TGtkSpinButton;
+ TGtkSpinButton = record
+ entry : TGtkEntry;
+ adjustment : PGtkAdjustment;
+ panel : PGdkWindow;
+ timer : guint32;
+ climb_rate : gdouble;
+ timer_step : gdouble;
+ update_policy : TGtkSpinButtonUpdatePolicy;
+ flag0 : longint;
+ end;
+
+{ Action signals for keybindings, do not connect to these }
+{ Padding for future expansion }
+ PGtkSpinButtonClass = ^TGtkSpinButtonClass;
+ TGtkSpinButtonClass = record
+ parent_class : TGtkEntryClass;
+ input : function (spin_button:PGtkSpinButton; new_value:Pgdouble):gint; cdecl;
+ output : function (spin_button:PGtkSpinButton):gint; cdecl;
+ value_changed : procedure (spin_button:PGtkSpinButton); cdecl;
+ change_value : procedure (spin_button:PGtkSpinButton; scroll:TGtkScrollType); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_INPUT_ERROR = -(1);
+
+ bm_TGtkSpinButton_in_child = $3;
+ bp_TGtkSpinButton_in_child = 0;
+ bm_TGtkSpinButton_click_child = $C;
+ bp_TGtkSpinButton_click_child = 2;
+ bm_TGtkSpinButton_button = $30;
+ bp_TGtkSpinButton_button = 4;
+ bm_TGtkSpinButton_need_timer = $40;
+ bp_TGtkSpinButton_need_timer = 6;
+ bm_TGtkSpinButton_timer_calls = $380;
+ bp_TGtkSpinButton_timer_calls = 7;
+ bm_TGtkSpinButton_digits = $FFC00;
+ bp_TGtkSpinButton_digits = 10;
+ bm_TGtkSpinButton_numeric = $100000;
+ bp_TGtkSpinButton_numeric = 20;
+ bm_TGtkSpinButton_wrap = $200000;
+ bp_TGtkSpinButton_wrap = 21;
+ bm_TGtkSpinButton_snap_to_ticks = $400000;
+ bp_TGtkSpinButton_snap_to_ticks = 22;
+
+
+function GTK_TYPE_SPIN_BUTTON : GType;
+function GTK_SPIN_BUTTON(obj: pointer) : PGtkSpinButton;
+function GTK_SPIN_BUTTON_CLASS(klass: pointer) : PGtkSpinButtonClass;
+function GTK_IS_SPIN_BUTTON(obj: pointer) : boolean;
+function GTK_IS_SPIN_BUTTON_CLASS(klass: pointer) : boolean;
+function GTK_SPIN_BUTTON_GET_CLASS(obj: pointer) : PGtkSpinButtonClass;
+
+
+function in_child(var a : TGtkSpinButton) : guint; overload;
+procedure set_in_child(var a : TGtkSpinButton; __in_child : guint); overload;
+function click_child(var a : TGtkSpinButton) : guint; overload;
+procedure set_click_child(var a : TGtkSpinButton; __click_child : guint); overload;
+function button(var a : TGtkSpinButton) : guint; overload;
+procedure set_button(var a : TGtkSpinButton; __button : guint); overload;
+function need_timer(var a : TGtkSpinButton) : guint; overload;
+procedure set_need_timer(var a : TGtkSpinButton; __need_timer : guint); overload;
+function timer_calls(var a : TGtkSpinButton) : guint;
+procedure set_timer_calls(var a : TGtkSpinButton; __timer_calls : guint);
+function digits(var a : TGtkSpinButton) : guint;
+procedure set_digits(var a : TGtkSpinButton; __digits : guint);
+function numeric(var a : TGtkSpinButton) : guint;
+procedure set_numeric(var a : TGtkSpinButton; __numeric : guint);
+function wrap(var a : TGtkSpinButton) : guint; overload;
+procedure set_wrap(var a : TGtkSpinButton; __wrap : guint); overload;
+function snap_to_ticks(var a : TGtkSpinButton) : guint;
+procedure set_snap_to_ticks(var a : TGtkSpinButton; __snap_to_ticks : guint);
+
+function gtk_spin_button_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_spin_button_configure(spin_button:PGtkSpinButton; adjustment:PGtkAdjustment; climb_rate:gdouble; digits:guint); cdecl; external gtklib;
+function gtk_spin_button_new(adjustment:PGtkAdjustment; climb_rate:gdouble; digits:guint):PGtkWidget; cdecl; external gtklib;
+function gtk_spin_button_new_with_range(min:gdouble; max:gdouble; step:gdouble):PGtkWidget; cdecl; external gtklib;
+procedure gtk_spin_button_set_adjustment(spin_button:PGtkSpinButton; adjustment:PGtkAdjustment); cdecl; external gtklib;
+function gtk_spin_button_get_adjustment(spin_button:PGtkSpinButton):PGtkAdjustment; cdecl; external gtklib;
+procedure gtk_spin_button_set_digits(spin_button:PGtkSpinButton; digits:guint); cdecl; external gtklib;
+function gtk_spin_button_get_digits(spin_button:PGtkSpinButton):guint; cdecl; external gtklib;
+procedure gtk_spin_button_set_increments(spin_button:PGtkSpinButton; step:gdouble; page:gdouble); cdecl; external gtklib;
+procedure gtk_spin_button_get_increments(spin_button:PGtkSpinButton; step:Pgdouble; page:Pgdouble); cdecl; external gtklib;
+procedure gtk_spin_button_set_range(spin_button:PGtkSpinButton; min:gdouble; max:gdouble); cdecl; external gtklib;
+procedure gtk_spin_button_get_range(spin_button:PGtkSpinButton; min:Pgdouble; max:Pgdouble); cdecl; external gtklib;
+function gtk_spin_button_get_value(spin_button:PGtkSpinButton):gdouble; cdecl; external gtklib;
+function gtk_spin_button_get_value_as_int(spin_button:PGtkSpinButton):gint; cdecl; external gtklib;
+procedure gtk_spin_button_set_value(spin_button:PGtkSpinButton; value:gdouble); cdecl; external gtklib;
+procedure gtk_spin_button_set_update_policy(spin_button:PGtkSpinButton; policy:TGtkSpinButtonUpdatePolicy); cdecl; external gtklib;
+function gtk_spin_button_get_update_policy(spin_button:PGtkSpinButton):TGtkSpinButtonUpdatePolicy; cdecl; external gtklib;
+procedure gtk_spin_button_set_numeric(spin_button:PGtkSpinButton; numeric:gboolean); cdecl; external gtklib;
+function gtk_spin_button_get_numeric(spin_button:PGtkSpinButton):gboolean; cdecl; external gtklib;
+procedure gtk_spin_button_spin(spin_button:PGtkSpinButton; direction:TGtkSpinType; increment:gdouble); cdecl; external gtklib;
+procedure gtk_spin_button_set_wrap(spin_button:PGtkSpinButton; wrap:gboolean); cdecl; external gtklib;
+function gtk_spin_button_get_wrap(spin_button:PGtkSpinButton):gboolean; cdecl; external gtklib;
+procedure gtk_spin_button_set_snap_to_ticks(spin_button:PGtkSpinButton; snap_to_ticks:gboolean); cdecl; external gtklib;
+function gtk_spin_button_get_snap_to_ticks(spin_button:PGtkSpinButton):gboolean; cdecl; external gtklib;
+procedure gtk_spin_button_update(spin_button:PGtkSpinButton); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_spin_button_get_value_as_float(spin_button:PGtkSpinButton):gdouble;
+{$endif}
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_SPIN_BUTTON : GType;
+begin
+ GTK_TYPE_SPIN_BUTTON:=gtk_spin_button_get_type;
+end;
+
+function GTK_SPIN_BUTTON(obj: pointer) : PGtkSpinButton;
+begin
+ GTK_SPIN_BUTTON:=PGtkSpinButton(GTK_CHECK_CAST(obj,GTK_TYPE_SPIN_BUTTON));
+end;
+
+function GTK_SPIN_BUTTON_CLASS(klass: pointer) : PGtkSpinButtonClass;
+begin
+ GTK_SPIN_BUTTON_CLASS:=PGtkSpinButtonClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_SPIN_BUTTON));
+end;
+
+function GTK_IS_SPIN_BUTTON(obj: pointer) : boolean;
+begin
+ GTK_IS_SPIN_BUTTON:=GTK_CHECK_TYPE(obj,GTK_TYPE_SPIN_BUTTON);
+end;
+
+function GTK_IS_SPIN_BUTTON_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_SPIN_BUTTON_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_SPIN_BUTTON);
+end;
+
+function GTK_SPIN_BUTTON_GET_CLASS(obj: pointer) : PGtkSpinButtonClass;
+begin
+ GTK_SPIN_BUTTON_GET_CLASS:=PGtkSpinButtonClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_SPIN_BUTTON));
+end;
+
+function in_child(var a : TGtkSpinButton) : guint;
+begin
+ in_child:=(a.flag0 and bm_TGtkSpinButton_in_child) shr bp_TGtkSpinButton_in_child;
+end;
+
+procedure set_in_child(var a : TGtkSpinButton; __in_child : guint);
+begin
+ a.flag0:=a.flag0 or ((__in_child shl bp_TGtkSpinButton_in_child) and bm_TGtkSpinButton_in_child);
+end;
+
+function click_child(var a : TGtkSpinButton) : guint;
+begin
+ click_child:=(a.flag0 and bm_TGtkSpinButton_click_child) shr bp_TGtkSpinButton_click_child;
+end;
+
+procedure set_click_child(var a : TGtkSpinButton; __click_child : guint);
+begin
+ a.flag0:=a.flag0 or ((__click_child shl bp_TGtkSpinButton_click_child) and bm_TGtkSpinButton_click_child);
+end;
+
+function button(var a : TGtkSpinButton) : guint;
+begin
+ button:=(a.flag0 and bm_TGtkSpinButton_button) shr bp_TGtkSpinButton_button;
+end;
+
+procedure set_button(var a : TGtkSpinButton; __button : guint);
+begin
+ a.flag0:=a.flag0 or ((__button shl bp_TGtkSpinButton_button) and bm_TGtkSpinButton_button);
+end;
+
+function need_timer(var a : TGtkSpinButton) : guint;
+begin
+ need_timer:=(a.flag0 and bm_TGtkSpinButton_need_timer) shr bp_TGtkSpinButton_need_timer;
+end;
+
+procedure set_need_timer(var a : TGtkSpinButton; __need_timer : guint);
+begin
+ a.flag0:=a.flag0 or ((__need_timer shl bp_TGtkSpinButton_need_timer) and bm_TGtkSpinButton_need_timer);
+end;
+
+function timer_calls(var a : TGtkSpinButton) : guint;
+begin
+ timer_calls:=(a.flag0 and bm_TGtkSpinButton_timer_calls) shr bp_TGtkSpinButton_timer_calls;
+end;
+
+procedure set_timer_calls(var a : TGtkSpinButton; __timer_calls : guint);
+begin
+ a.flag0:=a.flag0 or ((__timer_calls shl bp_TGtkSpinButton_timer_calls) and bm_TGtkSpinButton_timer_calls);
+end;
+
+function digits(var a : TGtkSpinButton) : guint;
+begin
+ digits:=(a.flag0 and bm_TGtkSpinButton_digits) shr bp_TGtkSpinButton_digits;
+end;
+
+procedure set_digits(var a : TGtkSpinButton; __digits : guint);
+begin
+ a.flag0:=a.flag0 or ((__digits shl bp_TGtkSpinButton_digits) and bm_TGtkSpinButton_digits);
+end;
+
+function numeric(var a : TGtkSpinButton) : guint;
+begin
+ numeric:=(a.flag0 and bm_TGtkSpinButton_numeric) shr bp_TGtkSpinButton_numeric;
+end;
+
+procedure set_numeric(var a : TGtkSpinButton; __numeric : guint);
+begin
+ a.flag0:=a.flag0 or ((__numeric shl bp_TGtkSpinButton_numeric) and bm_TGtkSpinButton_numeric);
+end;
+
+function wrap(var a : TGtkSpinButton) : guint;
+begin
+ wrap:=(a.flag0 and bm_TGtkSpinButton_wrap) shr bp_TGtkSpinButton_wrap;
+end;
+
+procedure set_wrap(var a : TGtkSpinButton; __wrap : guint);
+begin
+ a.flag0:=a.flag0 or ((__wrap shl bp_TGtkSpinButton_wrap) and bm_TGtkSpinButton_wrap);
+end;
+
+function snap_to_ticks(var a : TGtkSpinButton) : guint;
+begin
+ snap_to_ticks:=(a.flag0 and bm_TGtkSpinButton_snap_to_ticks) shr bp_TGtkSpinButton_snap_to_ticks;
+end;
+
+procedure set_snap_to_ticks(var a : TGtkSpinButton; __snap_to_ticks : guint);
+begin
+ a.flag0:=a.flag0 or ((__snap_to_ticks shl bp_TGtkSpinButton_snap_to_ticks) and bm_TGtkSpinButton_snap_to_ticks);
+end;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_spin_button_get_value_as_float(spin_button:PGtkSpinButton):gdouble;
+begin
+ gtk_spin_button_get_value_as_float:=gtk_spin_button_get_value(spin_button);
+end;
+{$endif}
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkstatusbar.inc b/packages/gtk2/src/gtk+/gtk/gtkstatusbar.inc
new file mode 100644
index 0000000000..1a88eabbad
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkstatusbar.inc
@@ -0,0 +1,112 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkStatusbar = ^TGtkStatusbar;
+ TGtkStatusbar = record
+ parent_widget : TGtkHBox;
+ frame : PGtkWidget;
+ _label : PGtkWidget;
+ messages : PGSList;
+ keys : PGSList;
+ seq_context_id : guint;
+ seq_message_id : guint;
+ grip_window : PGdkWindow;
+ flag0 : word;
+ end;
+
+{ Padding for future expansion }
+ PGtkStatusbarClass = ^TGtkStatusbarClass;
+ TGtkStatusbarClass = record
+ parent_class : TGtkHBoxClass;
+ messages_mem_chunk : PGMemChunk;
+ text_pushed : procedure (statusbar:PGtkStatusbar; context_id:guint; text:Pgchar); cdecl;
+ text_popped : procedure (statusbar:PGtkStatusbar; context_id:guint; text:Pgchar); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_STATUSBAR : GType;
+function GTK_STATUSBAR(obj: pointer) : PGtkStatusbar;
+function GTK_STATUSBAR_CLASS(klass: pointer) : PGtkStatusbarClass;
+function GTK_IS_STATUSBAR(obj: pointer) : boolean;
+function GTK_IS_STATUSBAR_CLASS(klass: pointer) : boolean;
+function GTK_STATUSBAR_GET_CLASS(obj: pointer) : PGtkStatusbarClass;
+
+const
+ bm_TGtkStatusbar_has_resize_grip = $1;
+ bp_TGtkStatusbar_has_resize_grip = 0;
+function has_resize_grip(var a : TGtkStatusbar) : guint;
+procedure set_has_resize_grip(var a : TGtkStatusbar; __has_resize_grip : guint);
+
+function gtk_statusbar_get_type:TGtkType; cdecl; external gtklib;
+function gtk_statusbar_new:PGtkWidget; cdecl; external gtklib;
+{ If you don't want to use contexts, 0 is a predefined global
+ context_id you can pass to push/pop/remove
+ }
+function gtk_statusbar_get_context_id(statusbar:PGtkStatusbar; context_description:Pgchar):guint; cdecl; external gtklib;
+{ Returns message_id used for gtk_statusbar_remove }
+function gtk_statusbar_push(statusbar:PGtkStatusbar; context_id:guint; text:Pgchar):guint; cdecl; external gtklib;
+procedure gtk_statusbar_pop(statusbar:PGtkStatusbar; context_id:guint); cdecl; external gtklib;
+procedure gtk_statusbar_remove(statusbar:PGtkStatusbar; context_id:guint; message_id:guint); cdecl; external gtklib;
+procedure gtk_statusbar_set_has_resize_grip(statusbar:PGtkStatusbar; setting:gboolean); cdecl; external gtklib;
+function gtk_statusbar_get_has_resize_grip(statusbar:PGtkStatusbar):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_STATUSBAR : GType;
+begin
+ GTK_TYPE_STATUSBAR:=gtk_statusbar_get_type;
+end;
+
+function GTK_STATUSBAR(obj: pointer) : PGtkStatusbar;
+begin
+ GTK_STATUSBAR:=PGtkStatusbar(GTK_CHECK_CAST(obj,GTK_TYPE_STATUSBAR));
+end;
+
+function GTK_STATUSBAR_CLASS(klass: pointer) : PGtkStatusbarClass;
+begin
+ GTK_STATUSBAR_CLASS:=PGtkStatusbarClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_STATUSBAR));
+end;
+
+function GTK_IS_STATUSBAR(obj: pointer) : boolean;
+begin
+ GTK_IS_STATUSBAR:=GTK_CHECK_TYPE(obj,GTK_TYPE_STATUSBAR);
+end;
+
+function GTK_IS_STATUSBAR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_STATUSBAR_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_STATUSBAR);
+end;
+
+function GTK_STATUSBAR_GET_CLASS(obj: pointer) : PGtkStatusbarClass;
+begin
+ GTK_STATUSBAR_GET_CLASS:=PGtkStatusbarClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_STATUSBAR));
+end;
+
+function has_resize_grip(var a : TGtkStatusbar) : guint;
+begin
+ has_resize_grip:=(a.flag0 and bm_TGtkStatusbar_has_resize_grip) shr bp_TGtkStatusbar_has_resize_grip;
+end;
+
+procedure set_has_resize_grip(var a : TGtkStatusbar; __has_resize_grip : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_resize_grip shl bp_TGtkStatusbar_has_resize_grip) and bm_TGtkStatusbar_has_resize_grip);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkstock.inc b/packages/gtk2/src/gtk+/gtk/gtkstock.inc
new file mode 100644
index 0000000000..c1400a6524
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkstock.inc
@@ -0,0 +1,118 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkStockItem = ^TGtkStockItem;
+ TGtkStockItem = record
+ stock_id : Pgchar;
+ _label : Pgchar;
+ modifier : TGdkModifierType;
+ keyval : guint;
+ translation_domain : Pgchar;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_STOCK_DIALOG_INFO = 'gtk-dialog-info';
+ GTK_STOCK_DIALOG_WARNING = 'gtk-dialog-warning';
+ GTK_STOCK_DIALOG_ERROR = 'gtk-dialog-error';
+ GTK_STOCK_DIALOG_QUESTION = 'gtk-dialog-question';
+ GTK_STOCK_DND = 'gtk-dnd';
+ GTK_STOCK_DND_MULTIPLE = 'gtk-dnd-multiple';
+ GTK_STOCK_ABOUT = 'gtk-about';
+ GTK_STOCK_ADD_name = 'gtk-add';
+ GTK_STOCK_APPLY = 'gtk-apply';
+ GTK_STOCK_BOLD = 'gtk-bold';
+ GTK_STOCK_CANCEL = 'gtk-cancel';
+ GTK_STOCK_CDROM = 'gtk-cdrom';
+ GTK_STOCK_CLEAR = 'gtk-clear';
+ GTK_STOCK_CLOSE = 'gtk-close';
+ GTK_STOCK_COLOR_PICKER = 'gtk-color-picker';
+ GTK_STOCK_CONVERT = 'gtk-convert';
+ GTK_STOCK_CONNECT = 'gtk-connect';
+ GTK_STOCK_COPY = 'gtk-copy';
+ GTK_STOCK_CUT = 'gtk-cut';
+ GTK_STOCK_DELETE = 'gtk-delete';
+ GTK_STOCK_EXECUTE = 'gtk-execute';
+ GTK_STOCK_FIND = 'gtk-find';
+ GTK_STOCK_FIND_AND_REPLACE = 'gtk-find-and-replace';
+ GTK_STOCK_FLOPPY = 'gtk-floppy';
+ GTK_STOCK_GOTO_BOTTOM = 'gtk-goto-bottom';
+ GTK_STOCK_GOTO_FIRST = 'gtk-goto-first';
+ GTK_STOCK_GOTO_LAST = 'gtk-goto-last';
+ GTK_STOCK_GOTO_TOP = 'gtk-goto-top';
+ GTK_STOCK_GO_BACK = 'gtk-go-back';
+ GTK_STOCK_GO_DOWN = 'gtk-go-down';
+ GTK_STOCK_GO_FORWARD = 'gtk-go-forward';
+ GTK_STOCK_GO_UP = 'gtk-go-up';
+ GTK_STOCK_HELP = 'gtk-help';
+ GTK_STOCK_HOME = 'gtk-home';
+ GTK_STOCK_INDEX = 'gtk-index';
+ GTK_STOCK_ITALIC = 'gtk-italic';
+ GTK_STOCK_JUMP_TO = 'gtk-jump-to';
+ GTK_STOCK_JUSTIFY_CENTER = 'gtk-justify-center';
+ GTK_STOCK_JUSTIFY_FILL = 'gtk-justify-fill';
+ GTK_STOCK_JUSTIFY_LEFT = 'gtk-justify-left';
+ GTK_STOCK_JUSTIFY_RIGHT = 'gtk-justify-right';
+ GTK_STOCK_MEDIA_FORWARD = 'gtk-media-forward';
+ GTK_STOCK_MEDIA_NEXT = 'gtk-media-next';
+ GTK_STOCK_MEDIA_PAUSE = 'gtk-media-pause';
+ GTK_STOCK_MEDIA_PLAY = 'gtk-media-play';
+ GTK_STOCK_MEDIA_PREVIOUS = 'gtk-media-previous';
+ GTK_STOCK_MEDIA_RECORD = 'gtk-media-record';
+ GTK_STOCK_MEDIA_REWIND = 'gtk-media-rewind';
+ GTK_STOCK_MEDIA_STOP = 'gtk-media-stop';
+ GTK_STOCK_MISSING_IMAGE = 'gtk-missing-image';
+ GTK_STOCK_NEW = 'gtk-new';
+ GTK_STOCK_NO = 'gtk-no';
+ GTK_STOCK_OK = 'gtk-ok';
+ GTK_STOCK_OPEN = 'gtk-open';
+ GTK_STOCK_PASTE = 'gtk-paste';
+ GTK_STOCK_PREFERENCES = 'gtk-preferences';
+ GTK_STOCK_PRINT = 'gtk-print';
+ GTK_STOCK_PRINT_PREVIEW = 'gtk-print-preview';
+ GTK_STOCK_PROPERTIES = 'gtk-properties';
+ GTK_STOCK_QUIT = 'gtk-quit';
+ GTK_STOCK_REDO = 'gtk-redo';
+ GTK_STOCK_REFRESH = 'gtk-refresh';
+ GTK_STOCK_REMOVE = 'gtk-remove';
+ GTK_STOCK_REVERT_TO_SAVED = 'gtk-revert-to-saved';
+ GTK_STOCK_SAVE = 'gtk-save';
+ GTK_STOCK_SAVE_AS = 'gtk-save-as';
+ GTK_STOCK_SELECT_COLOR = 'gtk-select-color';
+ GTK_STOCK_SELECT_FONT = 'gtk-select-font';
+ GTK_STOCK_SORT_ASCENDING = 'gtk-sort-ascending';
+ GTK_STOCK_SORT_DESCENDING = 'gtk-sort-descending';
+ GTK_STOCK_SPELL_CHECK = 'gtk-spell-check';
+ GTK_STOCK_STOP = 'gtk-stop';
+ GTK_STOCK_STRIKETHROUGH = 'gtk-strikethrough';
+ GTK_STOCK_UNDELETE = 'gtk-undelete';
+ GTK_STOCK_UNDERLINE = 'gtk-underline';
+ GTK_STOCK_UNDO = 'gtk-undo';
+ GTK_STOCK_YES = 'gtk-yes';
+ GTK_STOCK_ZOOM_100 = 'gtk-zoom-100';
+ GTK_STOCK_ZOOM_FIT = 'gtk-zoom-fit';
+ GTK_STOCK_ZOOM_IN = 'gtk-zoom-in';
+ GTK_STOCK_ZOOM_OUT = 'gtk-zoom-out';
+
+procedure gtk_stock_add(items:PGtkStockItem; n_items:guint); cdecl; external gtklib;
+procedure gtk_stock_add_static(items:PGtkStockItem; n_items:guint); cdecl; external gtklib;
+function gtk_stock_lookup(stock_id:Pgchar; item:PGtkStockItem):gboolean; cdecl; external gtklib;
+{ Should free the list (and free each string in it also).
+ This function is only useful for GUI builders and such.
+ }
+function gtk_stock_list_ids:PGSList; cdecl; external gtklib;
+function gtk_stock_item_copy(item:PGtkStockItem):PGtkStockItem; cdecl; external gtklib;
+procedure gtk_stock_item_free(item:PGtkStockItem); cdecl; external gtklib;
+{ Stock IDs (not all are stock items; some are images only) }
+
+{$ENDIF read_interface_rest}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkstyle.inc b/packages/gtk2/src/gtk+/gtk/gtkstyle.inc
new file mode 100644
index 0000000000..b6f562fdd3
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkstyle.inc
@@ -0,0 +1,393 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ PGtkStyle = ^TGtkStyle;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkIconSource = pointer;
+
+
+{ Some forward declarations needed to rationalize the header
+ files.
+ }
+ TGtkRcPropertyParser = function (pspec:PGParamSpec; rc_string:PGString; property_value:PGValue):gboolean; cdecl;
+{ We make this forward declaration here, since we pass
+ GtkWidget's to the draw functions.
+ }
+
+
+{< public > }
+{ Halfway between text/base }
+{< private > }
+{ Font description for style->private_font or %NULL }
+{ the RcStyle from which this style was created }
+{ of type GtkStyle }
+{ of type GtkIconFactory }
+ TGtkStyle = record
+ parent_instance : TGObject;
+ fg : array[0..4] of TGdkColor;
+ bg : array[0..4] of TGdkColor;
+ light : array[0..4] of TGdkColor;
+ dark : array[0..4] of TGdkColor;
+ mid : array[0..4] of TGdkColor;
+ text : array[0..4] of TGdkColor;
+ base : array[0..4] of TGdkColor;
+ text_aa : array[0..4] of TGdkColor;
+ black : TGdkColor;
+ white : TGdkColor;
+ font_desc : PPangoFontDescription;
+ xthickness : gint;
+ ythickness : gint;
+ fg_gc : array[0..4] of PGdkGC;
+ bg_gc : array[0..4] of PGdkGC;
+ light_gc : array[0..4] of PGdkGC;
+ dark_gc : array[0..4] of PGdkGC;
+ mid_gc : array[0..4] of PGdkGC;
+ text_gc : array[0..4] of PGdkGC;
+ base_gc : array[0..4] of PGdkGC;
+ text_aa_gc : array[0..4] of PGdkGC;
+ black_gc : PGdkGC;
+ white_gc : PGdkGC;
+ bg_pixmap : array[0..4] of PGdkPixmap;
+ attach_count : gint;
+ depth : gint;
+ colormap : PGdkColormap;
+ private_font : PGdkFont;
+ private_font_desc : PPangoFontDescription;
+ rc_style : PGtkRcStyle;
+ styles : PGSList;
+ property_cache : PGArray;
+ icon_factories : PGSList;
+ end;
+
+{ Initialize for a particular colormap/depth
+ combination. style->colormap/style->depth will have
+ been set at this point. Will typically chain to parent.
+ }
+{ Clean up for a particular colormap/depth combination. Will
+ typically chain to parent.
+ }
+{ Make style an exact duplicate of src.
+ }
+{ Create an empty style of the same type as this style.
+ The default implementation, which does
+ g_object_new (G_OBJECT_TYPE (style), NULL);
+ should work in most cases.
+ }
+{ Initialize the GtkStyle with the values in the GtkRcStyle.
+ should chain to the parent implementation.
+ }
+{ Drawing functions
+ }
+{ Padding for future expansion }
+ PGtkStyleClass = ^TGtkStyleClass;
+ TGtkStyleClass = record
+ parent_class : TGObjectClass;
+ realize : procedure (style:PGtkStyle); cdecl;
+ unrealize : procedure (style:PGtkStyle); cdecl;
+ copy : procedure (style:PGtkStyle; src:PGtkStyle); cdecl;
+ clone : function (style:PGtkStyle):PGtkStyle; cdecl;
+ init_from_rc : procedure (style:PGtkStyle; rc_style:PGtkRcStyle); cdecl;
+ set_background : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType); cdecl;
+ render_icon : function (style:PGtkStyle; source:PGtkIconSource; direction:TGtkTextDirection; state:TGtkStateType; size:TGtkIconSize;
+ widget:PGtkWidget; detail:Pgchar):PGdkPixbuf; cdecl;
+ draw_hline : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; x1:gint; x2:gint; y:gint); cdecl;
+ draw_vline : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; y1:gint; y2:gint; x:gint); cdecl;
+ draw_shadow : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl;
+ draw_polygon : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; point:PGdkPoint; npoints:gint; fill:gboolean); cdecl;
+ draw_arrow : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; arrow_type:TGtkArrowType; fill:gboolean; x:gint;
+ y:gint; width:gint; height:gint); cdecl;
+ draw_diamond : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl;
+ draw_string : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; x:gint; y:gint; _string:Pgchar); cdecl;
+ draw_box : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl;
+ draw_flat_box : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl;
+ draw_check : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl;
+ draw_option : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl;
+ draw_tab : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl;
+ draw_shadow_gap : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint; gap_side:TGtkPositionType; gap_x:gint; gap_width:gint); cdecl;
+ draw_box_gap : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint; gap_side:TGtkPositionType; gap_x:gint; gap_width:gint); cdecl;
+ draw_extension : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint; gap_side:TGtkPositionType); cdecl;
+ draw_focus : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; x:gint; y:gint; width:gint; height:gint); cdecl;
+ draw_slider : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint; orientation:TGtkOrientation); cdecl;
+ draw_handle : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint; orientation:TGtkOrientation); cdecl;
+ draw_expander : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; x:gint; y:gint; expander_style:TGtkExpanderStyle); cdecl;
+ draw_layout : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; use_text:gboolean; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; layout:PPangoLayout); cdecl;
+ draw_resize_grip : procedure (style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; edge:TGdkWindowEdge; x:gint; y:gint; width:gint;
+ height:gint); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ _gtk_reserved5 : procedure ; cdecl;
+ _gtk_reserved6 : procedure ; cdecl;
+ _gtk_reserved7 : procedure ; cdecl;
+ _gtk_reserved8 : procedure ; cdecl;
+ _gtk_reserved9 : procedure ; cdecl;
+ _gtk_reserved10 : procedure ; cdecl;
+ _gtk_reserved11 : procedure ; cdecl;
+ _gtk_reserved12 : procedure ; cdecl;
+ end;
+
+ PGtkBorder = ^TGtkBorder;
+ TGtkBorder = record
+ left : gint;
+ right : gint;
+ top : gint;
+ bottom : gint;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_STYLE : GType;
+function GTK_STYLE(anObject: pointer) : PGtkStyle;
+function GTK_STYLE_CLASS(klass: pointer) : PGtkStyleClass;
+function GTK_IS_STYLE(anObject: pointer) : boolean;
+function GTK_IS_STYLE_CLASS(klass: pointer) : boolean;
+function GTK_STYLE_GET_CLASS(obj: pointer) : PGtkStyleClass;
+function GTK_TYPE_BORDER : GType;
+function GTK_STYLE_ATTACHED(style : pointer) : boolean;
+
+
+function gtk_style_get_type:GType; cdecl; external gtklib;
+function gtk_style_new:PGtkStyle; cdecl; external gtklib;
+function gtk_style_copy(style:PGtkStyle):PGtkStyle; cdecl; external gtklib;
+function gtk_style_attach(style:PGtkStyle; window:PGdkWindow):PGtkStyle; cdecl; external gtklib;
+procedure gtk_style_detach(style:PGtkStyle); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_style_ref(style:PGtkStyle):PGtkStyle; cdecl; external gtklib;
+procedure gtk_style_unref(style:PGtkStyle); cdecl; external gtklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gtk_style_get_font(style:PGtkStyle):PGdkFont; cdecl; external gtklib;
+{$endif}
+
+function gtk_style_get_font_for_display(display:PGdkDisplay; style:PGtkStyle):PGdkFont; cdecl; external gtklib;
+procedure gtk_style_set_font(style:PGtkStyle; font:PGdkFont); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+procedure gtk_style_set_background(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType); cdecl; external gtklib;
+procedure gtk_style_apply_default_background(style:PGtkStyle; window:PGdkWindow; set_bg:gboolean; state_type:TGtkStateType; area:PGdkRectangle;
+ x:gint; y:gint; width:gint; height:gint); cdecl; external gtklib;
+function gtk_style_lookup_icon_set(style:PGtkStyle; stock_id:Pgchar):PGtkIconSet; cdecl; external gtklib;
+function gtk_style_render_icon(style:PGtkStyle; source:PGtkIconSource; direction:TGtkTextDirection; state:TGtkStateType; size:TGtkIconSize;
+ widget:PGtkWidget; detail:Pgchar):PGdkPixbuf; cdecl; external gtklib;
+{$ifndef GTK_DISABLE_DEPRECATED}
+
+procedure gtk_draw_hline(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; x1:gint; x2:gint;
+ y:gint); cdecl; external gtklib;
+procedure gtk_draw_vline(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; y1:gint; y2:gint;
+ x:gint); cdecl; external gtklib;
+procedure gtk_draw_shadow(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_draw_polygon(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; points:PGdkPoint;
+ npoints:gint; fill:gboolean); cdecl; external gtklib;
+procedure gtk_draw_arrow(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; arrow_type:TGtkArrowType;
+ fill:gboolean; x:gint; y:gint; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_draw_diamond(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_draw_box(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_draw_flat_box(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_draw_check(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_draw_option(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_draw_tab(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_draw_shadow_gap(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint; gap_side:TGtkPositionType; gap_x:gint;
+ gap_width:gint); cdecl; external gtklib;
+procedure gtk_draw_box_gap(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint; gap_side:TGtkPositionType; gap_x:gint;
+ gap_width:gint); cdecl; external gtklib;
+procedure gtk_draw_extension(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint; gap_side:TGtkPositionType); cdecl; external gtklib;
+procedure gtk_draw_focus(style:PGtkStyle; window:PGdkWindow; x:gint; y:gint; width:gint;
+ height:gint); cdecl; external gtklib;
+procedure gtk_draw_slider(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint; orientation:TGtkOrientation); cdecl; external gtklib;
+procedure gtk_draw_handle(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; x:gint;
+ y:gint; width:gint; height:gint; orientation:TGtkOrientation); cdecl; external gtklib;
+procedure gtk_draw_expander(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; x:gint; y:gint;
+ expander_style:TGtkExpanderStyle); cdecl; external gtklib;
+procedure gtk_draw_layout(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; use_text:gboolean; x:gint;
+ y:gint; layout:PPangoLayout); cdecl; external gtklib;
+procedure gtk_draw_resize_grip(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; edge:TGdkWindowEdge; x:gint;
+ y:gint; width:gint; height:gint); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+procedure gtk_paint_hline(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; x1:gint; x2:gint; y:gint); cdecl; external gtklib;
+procedure gtk_paint_vline(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; y1:gint; y2:gint; x:gint); cdecl; external gtklib;
+procedure gtk_paint_shadow(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl; external gtklib;
+procedure gtk_paint_polygon(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; points:PGdkPoint; npoints:gint; fill:gboolean); cdecl; external gtklib;
+procedure gtk_paint_arrow(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; arrow_type:TGtkArrowType; fill:gboolean; x:gint;
+ y:gint; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_paint_diamond(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl; external gtklib;
+procedure gtk_paint_box(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl; external gtklib;
+procedure gtk_paint_flat_box(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl; external gtklib;
+procedure gtk_paint_check(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl; external gtklib;
+procedure gtk_paint_option(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl; external gtklib;
+procedure gtk_paint_tab(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint); cdecl; external gtklib;
+procedure gtk_paint_shadow_gap(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint; gap_side:TGtkPositionType; gap_x:gint; gap_width:gint); cdecl; external gtklib;
+procedure gtk_paint_box_gap(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint; gap_side:TGtkPositionType; gap_x:gint; gap_width:gint); cdecl; external gtklib;
+procedure gtk_paint_extension(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint; gap_side:TGtkPositionType); cdecl; external gtklib;
+procedure gtk_paint_focus(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; x:gint; y:gint; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_paint_slider(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint; orientation:TGtkOrientation); cdecl; external gtklib;
+procedure gtk_paint_handle(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; shadow_type:TGtkShadowType; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; width:gint;
+ height:gint; orientation:TGtkOrientation); cdecl; external gtklib;
+procedure gtk_paint_expander(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; x:gint; y:gint; expander_style:TGtkExpanderStyle); cdecl; external gtklib;
+procedure gtk_paint_layout(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; use_text:gboolean; area:PGdkRectangle;
+ widget:PGtkWidget; detail:Pgchar; x:gint; y:gint; layout:PPangoLayout); cdecl; external gtklib;
+procedure gtk_paint_resize_grip(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; edge:TGdkWindowEdge; x:gint; y:gint; width:gint;
+ height:gint); cdecl; external gtklib;
+function gtk_border_get_type:GType; cdecl; external gtklib;
+function gtk_border_copy(border:PGtkBorder):PGtkBorder; cdecl; external gtklib;
+procedure gtk_border_free(border:PGtkBorder); cdecl; external gtklib;
+{ --- private API --- }
+function _gtk_style_peek_property_value(style:PGtkStyle; widget_type:GType; pspec:PGParamSpec; parser:TGtkRcPropertyParser):PGValue; cdecl; external gtklib;
+
+{ deprecated }
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_style_apply_default_pixmap(style:PGtkStyle; window:PGdkWindow;
+ state_type:TGtkStateType; area:PGdkRectangle;
+ x:gint; y:gint; width:gint; height:gint);
+
+procedure gtk_draw_string(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; x:gint; y:gint;
+ _string:Pgchar); cdecl; external gtklib;
+procedure gtk_paint_string(style:PGtkStyle; window:PGdkWindow; state_type:TGtkStateType; area:PGdkRectangle; widget:PGtkWidget;
+ detail:Pgchar; x:gint; y:gint; _string:Pgchar); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+function _gtk_get_insertion_cursor_gc(widget:PGtkWidget; is_primary:gboolean):PGdkGC; cdecl; external gtklib;
+procedure _gtk_draw_insertion_cursor(widget:PGtkWidget; drawable:PGdkDrawable; gc:PGdkGC; location:PGdkRectangle; direction:TGtkTextDirection;
+ draw_arrow:gboolean); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_STYLE : GType;
+begin
+ GTK_TYPE_STYLE:=gtk_style_get_type;
+end;
+
+function GTK_STYLE(anObject: pointer) : PGtkStyle;
+begin
+ GTK_STYLE:=PGtkStyle(G_TYPE_CHECK_INSTANCE_CAST(anObject,GTK_TYPE_STYLE));
+end;
+
+function GTK_STYLE_CLASS(klass: pointer) : PGtkStyleClass;
+begin
+ GTK_STYLE_CLASS:=PGtkStyleClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_STYLE));
+end;
+
+function GTK_IS_STYLE(anObject: pointer) : boolean;
+begin
+ GTK_IS_STYLE:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GTK_TYPE_STYLE);
+end;
+
+function GTK_IS_STYLE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_STYLE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_STYLE);
+end;
+
+function GTK_STYLE_GET_CLASS(obj: pointer) : PGtkStyleClass;
+begin
+ GTK_STYLE_GET_CLASS:=PGtkStyleClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_STYLE));
+end;
+
+function GTK_TYPE_BORDER : GType;
+begin
+ GTK_TYPE_BORDER:=gtk_border_get_type;
+end;
+
+function GTK_STYLE_ATTACHED(style : pointer) : boolean;
+begin
+ GTK_STYLE_ATTACHED:=((GTK_STYLE(style))^.attach_count) > 0;
+end;
+
+procedure gtk_style_apply_default_pixmap(style:PGtkStyle; window:PGdkWindow;
+ state_type:TGtkStateType; area:PGdkRectangle;
+ x:gint; y:gint; width:gint; height:gint);
+begin
+ gtk_style_apply_default_background(style,window,true,state_type,area,x,y,width,height);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktable.inc b/packages/gtk2/src/gtk+/gtk/gtktable.inc
new file mode 100644
index 0000000000..81e922f6f8
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktable.inc
@@ -0,0 +1,289 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkTableRowCol = ^TGtkTableRowCol;
+
+ PGtkTable = ^TGtkTable;
+ TGtkTable = record
+ container : TGtkContainer;
+ children : PGList;
+ rows : PGtkTableRowCol;
+ cols : PGtkTableRowCol;
+ nrows : guint16;
+ ncols : guint16;
+ column_spacing : guint16;
+ row_spacing : guint16;
+ flag0 : word;
+ end;
+
+ PGtkTableClass = ^TGtkTableClass;
+ TGtkTableClass = record
+ parent_class : TGtkContainerClass;
+ end;
+
+ PGtkTableChild = ^TGtkTableChild;
+ TGtkTableChild = record
+ widget : PGtkWidget;
+ left_attach : guint16;
+ right_attach : guint16;
+ top_attach : guint16;
+ bottom_attach : guint16;
+ xpadding : guint16;
+ ypadding : guint16;
+ flag0 : word;
+ end;
+
+ TGtkTableRowCol = record
+ requisition : guint16;
+ allocation : guint16;
+ spacing : guint16;
+ flag0 : word;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkTable_homogeneous = $1;
+ bp_TGtkTable_homogeneous = 0;
+
+ bm_TGtkTableChild_xexpand = $1;
+ bp_TGtkTableChild_xexpand = 0;
+ bm_TGtkTableChild_yexpand = $2;
+ bp_TGtkTableChild_yexpand = 1;
+ bm_TGtkTableChild_xshrink = $4;
+ bp_TGtkTableChild_xshrink = 2;
+ bm_TGtkTableChild_yshrink = $8;
+ bp_TGtkTableChild_yshrink = 3;
+ bm_TGtkTableChild_xfill = $10;
+ bp_TGtkTableChild_xfill = 4;
+ bm_TGtkTableChild_yfill = $20;
+ bp_TGtkTableChild_yfill = 5;
+
+ bm_TGtkTableRowCol_need_expand = $1;
+ bp_TGtkTableRowCol_need_expand = 0;
+ bm_TGtkTableRowCol_need_shrink = $2;
+ bp_TGtkTableRowCol_need_shrink = 1;
+ bm_TGtkTableRowCol_expand = $4;
+ bp_TGtkTableRowCol_expand = 2;
+ bm_TGtkTableRowCol_shrink = $8;
+ bp_TGtkTableRowCol_shrink = 3;
+ bm_TGtkTableRowCol_empty = $10;
+ bp_TGtkTableRowCol_empty = 4;
+
+
+function GTK_TYPE_TABLE : GType;
+function GTK_TABLE(obj: pointer) : PGtkTable;
+function GTK_TABLE_CLASS(klass: pointer) : PGtkTableClass;
+function GTK_IS_TABLE(obj: pointer) : boolean;
+function GTK_IS_TABLE_CLASS(klass: pointer) : boolean;
+function GTK_TABLE_GET_CLASS(obj: pointer) : PGtkTableClass;
+
+function homogeneous(var a : TGtkTable) : guint; overload;
+procedure set_homogeneous(var a : TGtkTable; __homogeneous : guint); overload;
+
+function xexpand(var a : TGtkTableChild) : guint;
+procedure set_xexpand(var a : TGtkTableChild; __xexpand : guint);
+function yexpand(var a : TGtkTableChild) : guint;
+procedure set_yexpand(var a : TGtkTableChild; __yexpand : guint);
+function xshrink(var a : TGtkTableChild) : guint;
+procedure set_xshrink(var a : TGtkTableChild; __xshrink : guint);
+function yshrink(var a : TGtkTableChild) : guint;
+procedure set_yshrink(var a : TGtkTableChild; __yshrink : guint);
+function xfill(var a : TGtkTableChild) : guint;
+procedure set_xfill(var a : TGtkTableChild; __xfill : guint);
+function yfill(var a : TGtkTableChild) : guint;
+procedure set_yfill(var a : TGtkTableChild; __yfill : guint);
+
+function need_expand(var a : TGtkTableRowCol) : guint;
+procedure set_need_expand(var a : TGtkTableRowCol; __need_expand : guint);
+function need_shrink(var a : TGtkTableRowCol) : guint;
+procedure set_need_shrink(var a : TGtkTableRowCol; __need_shrink : guint);
+function expand(var a : TGtkTableRowCol) : guint; overload;
+procedure set_expand(var a : TGtkTableRowCol; __expand : guint); overload;
+function shrink(var a : TGtkTableRowCol) : guint;
+procedure set_shrink(var a : TGtkTableRowCol; __shrink : guint);
+function empty(var a : TGtkTableRowCol) : guint;
+procedure set_empty(var a : TGtkTableRowCol; __empty : guint);
+
+function gtk_table_get_type:TGtkType; cdecl; external gtklib;
+function gtk_table_new(rows:guint; columns:guint; homogeneous:gboolean):PGtkWidget; cdecl; external gtklib;
+procedure gtk_table_resize(table:PGtkTable; rows:guint; columns:guint); cdecl; external gtklib;
+procedure gtk_table_attach(table:PGtkTable; child:PGtkWidget; left_attach:guint; right_attach:guint; top_attach:guint;
+ bottom_attach:guint; xoptions:TGtkAttachOptions; yoptions:TGtkAttachOptions; xpadding:guint; ypadding:guint); cdecl; external gtklib;
+procedure gtk_table_attach_defaults(table:PGtkTable; widget:PGtkWidget; left_attach:guint; right_attach:guint; top_attach:guint;
+ bottom_attach:guint); cdecl; external gtklib;
+procedure gtk_table_set_row_spacing(table:PGtkTable; row:guint; spacing:guint); cdecl; external gtklib;
+function gtk_table_get_row_spacing(table:PGtkTable; row:guint):guint; cdecl; external gtklib;
+procedure gtk_table_set_col_spacing(table:PGtkTable; column:guint; spacing:guint); cdecl; external gtklib;
+function gtk_table_get_col_spacing(table:PGtkTable; column:guint):guint; cdecl; external gtklib;
+procedure gtk_table_set_row_spacings(table:PGtkTable; spacing:guint); cdecl; external gtklib;
+function gtk_table_get_default_row_spacing(table:PGtkTable):guint; cdecl; external gtklib;
+procedure gtk_table_set_col_spacings(table:PGtkTable; spacing:guint); cdecl; external gtklib;
+function gtk_table_get_default_col_spacing(table:PGtkTable):guint; cdecl; external gtklib;
+procedure gtk_table_set_homogeneous(table:PGtkTable; homogeneous:gboolean); cdecl; external gtklib;
+function gtk_table_get_homogeneous(table:PGtkTable):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TABLE : GType;
+begin
+ GTK_TYPE_TABLE:=gtk_table_get_type;
+end;
+
+function GTK_TABLE(obj: pointer) : PGtkTable;
+begin
+ GTK_TABLE:=PGtkTable(GTK_CHECK_CAST(obj,GTK_TYPE_TABLE));
+end;
+
+function GTK_TABLE_CLASS(klass: pointer) : PGtkTableClass;
+begin
+ GTK_TABLE_CLASS:=PGtkTableClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TABLE));
+end;
+
+function GTK_IS_TABLE(obj: pointer) : boolean;
+begin
+ GTK_IS_TABLE:=GTK_CHECK_TYPE(obj,GTK_TYPE_TABLE);
+end;
+
+function GTK_IS_TABLE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TABLE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TABLE);
+end;
+
+function GTK_TABLE_GET_CLASS(obj: pointer) : PGtkTableClass;
+begin
+ GTK_TABLE_GET_CLASS:=PGtkTableClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TABLE));
+end;
+
+function homogeneous(var a : TGtkTable) : guint;
+begin
+ homogeneous:=(a.flag0 and bm_TGtkTable_homogeneous) shr bp_TGtkTable_homogeneous;
+end;
+
+procedure set_homogeneous(var a : TGtkTable; __homogeneous : guint);
+begin
+ a.flag0:=a.flag0 or ((__homogeneous shl bp_TGtkTable_homogeneous) and bm_TGtkTable_homogeneous);
+end;
+
+function xexpand(var a : TGtkTableChild) : guint;
+begin
+ xexpand:=(a.flag0 and bm_TGtkTableChild_xexpand) shr bp_TGtkTableChild_xexpand;
+end;
+
+procedure set_xexpand(var a : TGtkTableChild; __xexpand : guint);
+begin
+ a.flag0:=a.flag0 or ((__xexpand shl bp_TGtkTableChild_xexpand) and bm_TGtkTableChild_xexpand);
+end;
+
+function yexpand(var a : TGtkTableChild) : guint;
+begin
+ yexpand:=(a.flag0 and bm_TGtkTableChild_yexpand) shr bp_TGtkTableChild_yexpand;
+end;
+
+procedure set_yexpand(var a : TGtkTableChild; __yexpand : guint);
+begin
+ a.flag0:=a.flag0 or ((__yexpand shl bp_TGtkTableChild_yexpand) and bm_TGtkTableChild_yexpand);
+end;
+
+function xshrink(var a : TGtkTableChild) : guint;
+begin
+ xshrink:=(a.flag0 and bm_TGtkTableChild_xshrink) shr bp_TGtkTableChild_xshrink;
+end;
+
+procedure set_xshrink(var a : TGtkTableChild; __xshrink : guint);
+begin
+ a.flag0:=a.flag0 or ((__xshrink shl bp_TGtkTableChild_xshrink) and bm_TGtkTableChild_xshrink);
+end;
+
+function yshrink(var a : TGtkTableChild) : guint;
+begin
+ yshrink:=(a.flag0 and bm_TGtkTableChild_yshrink) shr bp_TGtkTableChild_yshrink;
+end;
+
+procedure set_yshrink(var a : TGtkTableChild; __yshrink : guint);
+begin
+ a.flag0:=a.flag0 or ((__yshrink shl bp_TGtkTableChild_yshrink) and bm_TGtkTableChild_yshrink);
+end;
+
+function xfill(var a : TGtkTableChild) : guint;
+begin
+ xfill:=(a.flag0 and bm_TGtkTableChild_xfill) shr bp_TGtkTableChild_xfill;
+end;
+
+procedure set_xfill(var a : TGtkTableChild; __xfill : guint);
+begin
+ a.flag0:=a.flag0 or ((__xfill shl bp_TGtkTableChild_xfill) and bm_TGtkTableChild_xfill);
+end;
+
+function yfill(var a : TGtkTableChild) : guint;
+begin
+ yfill:=(a.flag0 and bm_TGtkTableChild_yfill) shr bp_TGtkTableChild_yfill;
+end;
+
+procedure set_yfill(var a : TGtkTableChild; __yfill : guint);
+begin
+ a.flag0:=a.flag0 or ((__yfill shl bp_TGtkTableChild_yfill) and bm_TGtkTableChild_yfill);
+end;
+
+function need_expand(var a : TGtkTableRowCol) : guint;
+begin
+ need_expand:=(a.flag0 and bm_TGtkTableRowCol_need_expand) shr bp_TGtkTableRowCol_need_expand;
+end;
+
+procedure set_need_expand(var a : TGtkTableRowCol; __need_expand : guint);
+begin
+ a.flag0:=a.flag0 or ((__need_expand shl bp_TGtkTableRowCol_need_expand) and bm_TGtkTableRowCol_need_expand);
+end;
+
+function need_shrink(var a : TGtkTableRowCol) : guint;
+begin
+ need_shrink:=(a.flag0 and bm_TGtkTableRowCol_need_shrink) shr bp_TGtkTableRowCol_need_shrink;
+end;
+
+procedure set_need_shrink(var a : TGtkTableRowCol; __need_shrink : guint);
+begin
+ a.flag0:=a.flag0 or ((__need_shrink shl bp_TGtkTableRowCol_need_shrink) and bm_TGtkTableRowCol_need_shrink);
+end;
+
+function expand(var a : TGtkTableRowCol) : guint;
+begin
+ expand:=(a.flag0 and bm_TGtkTableRowCol_expand) shr bp_TGtkTableRowCol_expand;
+end;
+
+procedure set_expand(var a : TGtkTableRowCol; __expand : guint);
+begin
+ a.flag0:=a.flag0 or ((__expand shl bp_TGtkTableRowCol_expand) and bm_TGtkTableRowCol_expand);
+end;
+
+function shrink(var a : TGtkTableRowCol) : guint;
+begin
+ shrink:=(a.flag0 and bm_TGtkTableRowCol_shrink) shr bp_TGtkTableRowCol_shrink;
+end;
+
+procedure set_shrink(var a : TGtkTableRowCol; __shrink : guint);
+begin
+ a.flag0:=a.flag0 or ((__shrink shl bp_TGtkTableRowCol_shrink) and bm_TGtkTableRowCol_shrink);
+end;
+
+function empty(var a : TGtkTableRowCol) : guint;
+begin
+ empty:=(a.flag0 and bm_TGtkTableRowCol_empty) shr bp_TGtkTableRowCol_empty;
+end;
+
+procedure set_empty(var a : TGtkTableRowCol; __empty : guint);
+begin
+ a.flag0:=a.flag0 or ((__empty shl bp_TGtkTableRowCol_empty) and bm_TGtkTableRowCol_empty);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktearoffmenuitem.inc b/packages/gtk2/src/gtk+/gtk/gtktearoffmenuitem.inc
new file mode 100644
index 0000000000..6f4782a306
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktearoffmenuitem.inc
@@ -0,0 +1,94 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkTearoffMenuItem = ^TGtkTearoffMenuItem;
+ TGtkTearoffMenuItem = record
+ menu_item : TGtkMenuItem;
+ flag0 : word;
+ end;
+
+
+{ Padding for future expansion }
+ PGtkTearoffMenuItemClass = ^TGtkTearoffMenuItemClass;
+ TGtkTearoffMenuItemClass = record
+ parent_class : TGtkMenuItemClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkTearoffMenuItem_torn_off = $1;
+ bp_TGtkTearoffMenuItem_torn_off = 0;
+function GTK_TYPE_TEAROFF_MENU_ITEM : GType;
+function GTK_TEAROFF_MENU_ITEM(obj: pointer) : PGtkTearoffMenuItem;
+function GTK_TEAROFF_MENU_ITEM_CLASS(klass: pointer) : PGtkTearoffMenuItemClass;
+function GTK_IS_TEAROFF_MENU_ITEM(obj: pointer) : boolean;
+function GTK_IS_TEAROFF_MENU_ITEM_CLASS(klass: pointer) : boolean;
+function GTK_TEAROFF_MENU_ITEM_GET_CLASS(obj: pointer) : PGtkTearoffMenuItemClass;
+
+
+function torn_off(var a : TGtkTearoffMenuItem) : guint; overload;
+procedure set_torn_off(var a : TGtkTearoffMenuItem; __torn_off : guint); overload;
+
+function gtk_tearoff_menu_item_get_type:TGtkType; cdecl; external gtklib;
+function gtk_tearoff_menu_item_new:PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TEAROFF_MENU_ITEM : GType;
+begin
+ GTK_TYPE_TEAROFF_MENU_ITEM:=gtk_tearoff_menu_item_get_type;
+end;
+
+function GTK_TEAROFF_MENU_ITEM(obj: pointer) : PGtkTearoffMenuItem;
+begin
+ GTK_TEAROFF_MENU_ITEM:=PGtkTearoffMenuItem(GTK_CHECK_CAST(obj,GTK_TYPE_TEAROFF_MENU_ITEM));
+end;
+
+function GTK_TEAROFF_MENU_ITEM_CLASS(klass: pointer) : PGtkTearoffMenuItemClass;
+begin
+ GTK_TEAROFF_MENU_ITEM_CLASS:=PGtkTearoffMenuItemClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TEAROFF_MENU_ITEM));
+end;
+
+function GTK_IS_TEAROFF_MENU_ITEM(obj: pointer) : boolean;
+begin
+ GTK_IS_TEAROFF_MENU_ITEM:=GTK_CHECK_TYPE(obj,GTK_TYPE_TEAROFF_MENU_ITEM);
+end;
+
+function GTK_IS_TEAROFF_MENU_ITEM_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TEAROFF_MENU_ITEM_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TEAROFF_MENU_ITEM);
+end;
+
+function GTK_TEAROFF_MENU_ITEM_GET_CLASS(obj: pointer) : PGtkTearoffMenuItemClass;
+begin
+ GTK_TEAROFF_MENU_ITEM_GET_CLASS:=PGtkTearoffMenuItemClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TEAROFF_MENU_ITEM));
+end;
+
+function torn_off(var a : TGtkTearoffMenuItem) : guint;
+begin
+ torn_off:=(a.flag0 and bm_TGtkTearoffMenuItem_torn_off) shr bp_TGtkTearoffMenuItem_torn_off;
+end;
+
+procedure set_torn_off(var a : TGtkTearoffMenuItem; __torn_off : guint);
+begin
+ a.flag0:=a.flag0 or ((__torn_off shl bp_TGtkTearoffMenuItem_torn_off) and bm_TGtkTearoffMenuItem_torn_off);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktext.inc b/packages/gtk2/src/gtk+/gtk/gtktext.inc
new file mode 100644
index 0000000000..de7444b23e
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktext.inc
@@ -0,0 +1,277 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkTextFont = pointer;
+
+{ Position in list. }
+{ Offset into that property. }
+{ Current index. }
+ PGtkPropertyMark = ^TGtkPropertyMark;
+ TGtkPropertyMark = record
+ _property : PGList;
+ offset : guint;
+ index : guint;
+ end;
+
+{ GAPPED TEXT SEGMENT }
+{ The text, a single segment of text a'la emacs, with a gap
+ where insertion occurs. }
+{ The allocated length of the text segment. }
+{ The gap position, index into address where a char
+ should be inserted. }
+{ The gap size, s.t. (text + gap_position + gap_size) is
+ the first valid character following the gap. }
+{ The last character position, index into address where a
+ character should be appeneded. Thus, text_end - gap_size
+ is the length of the actual data. }
+{ LINE START CACHE }
+{ A cache of line-start information. Data is a LineParam . }
+{ Index to the start of the first visible line. }
+{ The number of pixels cut off of the top line. }
+{ First visible horizontal pixel. }
+{ First visible vertical pixel. }
+{ FLAGS }
+{ True iff this buffer is wrapping lines, otherwise it is using a
+ horizontal scrollbar. }
+{ If a fontset is supplied for the widget, use_wchar become true,
+ and we use GdkWchar as the encoding of text. }
+{ Frozen, don't do updates. @@@ fixme }
+{ TEXT PROPERTIES }
+{ A doubly-linked-list containing TextProperty objects. }
+{ The theEnd of this list. }
+{ The first node before or on the point along with its offset to
+ the point and the buffer's current point. This is the only
+ PropertyMark whose index is guaranteed to remain correct
+ following a buffer insertion or deletion. }
+{ SCRATCH AREA }
+{ SCROLLING }
+{ CURSOR }
+{ Position of cursor. }
+{ Baseline of line cursor is drawn on. }
+{ Where it is in the buffer. }
+{ Character to redraw. }
+{ Distance from baseline of the font. }
+{ Where it would be if it could be. }
+{ How many people have undrawn. }
+{ Current Line }
+{ Tab Stops }
+{ Text font for current style }
+{ Timer used for auto-scrolling off ends }
+{ currently pressed mouse button }
+{ gc for drawing background pixmap }
+ PGtkText = ^TGtkText;
+ TGtkText = record
+ old_editable : TGtkOldEditable;
+ text_area : PGdkWindow;
+ hadj : PGtkAdjustment;
+ vadj : PGtkAdjustment;
+ gc : PGdkGC;
+ line_wrap_bitmap : PGdkPixmap;
+ line_arrow_bitmap : PGdkPixmap;
+ text : record
+ case longint of
+ 0 : ( wc : PGdkWChar );
+ 1 : ( ch : Pguchar );
+ end;
+ text_len : guint;
+ gap_position : guint;
+ gap_size : guint;
+ text_end : guint;
+ line_start_cache : PGList;
+ first_line_start_index : guint;
+ first_cut_pixels : guint;
+ first_onscreen_hor_pixel : guint;
+ first_onscreen_ver_pixel : guint;
+ flag0 : word;
+ freeze_count : guint;
+ text_properties : PGList;
+ text_properties_end : PGList;
+ point : TGtkPropertyMark;
+ scratch_buffer : record
+ case longint of
+ 0 : ( wc : PGdkWChar );
+ 1 : ( ch : Pguchar );
+ end;
+ scratch_buffer_len : guint;
+ last_ver_value : gint;
+ cursor_pos_x : gint;
+ cursor_pos_y : gint;
+ cursor_mark : TGtkPropertyMark;
+ cursor_char : TGdkWChar;
+ cursor_char_offset : gchar;
+ cursor_virtual_x : gint;
+ cursor_drawn_level : gint;
+ current_line : PGList;
+ tab_stops : PGList;
+ default_tab_width : gint;
+ current_font : PGtkTextFont;
+ timer : gint;
+ button : guint;
+ bg_gc : PGdkGC;
+ end;
+
+
+ PGtkTextClass = ^TGtkTextClass;
+ TGtkTextClass = record
+ parent_class : TGtkOldEditableClass;
+ set_scroll_adjustments : procedure (text:PGtkText; hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment); cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkText_line_wrap = $1;
+ bp_TGtkText_line_wrap = 0;
+ bm_TGtkText_word_wrap = $2;
+ bp_TGtkText_word_wrap = 1;
+ bm_TGtkText_use_wchar = $4;
+ bp_TGtkText_use_wchar = 2;
+function GTK_TYPE_TEXT : GType;
+function GTK_TEXT(obj: pointer) : PGtkText;
+function GTK_TEXT_CLASS(klass: pointer) : PGtkTextClass;
+function GTK_IS_TEXT(obj: pointer) : boolean;
+function GTK_IS_TEXT_CLASS(klass: pointer) : boolean;
+function GTK_TEXT_GET_CLASS(obj: pointer) : PGtkTextClass;
+
+
+function line_wrap(a : PGtkText) : guint;
+procedure set_line_wrap(a : PGtkText; __line_wrap : guint);
+function word_wrap(a : PGtkText) : guint;
+procedure set_word_wrap(a : PGtkText; __word_wrap : guint);
+function use_wchar(a : PGtkText) : gboolean;
+procedure set_use_wchar(a : PGtkText; __use_wchar : gboolean);
+
+
+function gtk_text_get_type:TGtkType; cdecl; external gtklib;
+function gtk_text_new(hadj:PGtkAdjustment; vadj:PGtkAdjustment):PGtkWidget; cdecl; external gtklib;
+procedure gtk_text_set_editable(text:PGtkText; editable:gboolean); cdecl; external gtklib;
+procedure gtk_text_set_word_wrap(text:PGtkText; word_wrap:gboolean); cdecl; external gtklib;
+procedure gtk_text_set_line_wrap(text:PGtkText; line_wrap:gboolean); cdecl; external gtklib;
+procedure gtk_text_set_adjustments(text:PGtkText; hadj:PGtkAdjustment; vadj:PGtkAdjustment); cdecl; external gtklib;
+procedure gtk_text_set_point(text:PGtkText; index:guint); cdecl; external gtklib;
+function gtk_text_get_point(text:PGtkText):guint; cdecl; external gtklib;
+function gtk_text_get_length(text:PGtkText):guint; cdecl; external gtklib;
+procedure gtk_text_freeze(text:PGtkText); cdecl; external gtklib;
+procedure gtk_text_thaw(text:PGtkText); cdecl; external gtklib;
+
+procedure gtk_text_insert(text:PGtkText; font:PGdkFont; fore:PGdkColor; back:PGdkColor; chars:Pchar;
+ length:gint); cdecl; external gtklib;
+function gtk_text_backward_delete(text:PGtkText; nchars:guint):gboolean; cdecl; external gtklib;
+function gtk_text_forward_delete(text:PGtkText; nchars:guint):gboolean; cdecl; external gtklib;
+
+function GTK_TEXT_INDEX_WCHAR(t: PGtkText; index: guint): guint32;
+function GTK_TEXT_INDEX_UCHAR(t: PGtkText; index: guint): GUChar;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TEXT : GType;
+begin
+ GTK_TYPE_TEXT:=gtk_text_get_type;
+end;
+
+function GTK_TEXT(obj: pointer) : PGtkText;
+begin
+ GTK_TEXT:=PGtkText(GTK_CHECK_CAST(obj,GTK_TYPE_TEXT));
+end;
+
+function GTK_TEXT_CLASS(klass: pointer) : PGtkTextClass;
+begin
+ GTK_TEXT_CLASS:=PGtkTextClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TEXT));
+end;
+
+function GTK_IS_TEXT(obj: pointer) : boolean;
+begin
+ GTK_IS_TEXT:=GTK_CHECK_TYPE(obj,GTK_TYPE_TEXT);
+end;
+
+function GTK_IS_TEXT_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TEXT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TEXT);
+end;
+
+function GTK_TEXT_GET_CLASS(obj: pointer) : PGtkTextClass;
+begin
+ GTK_TEXT_GET_CLASS:=PGtkTextClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TEXT));
+end;
+
+function line_wrap(a : PGtkText) : guint;
+begin
+ line_wrap:=(a^.flag0 and bm_TGtkText_line_wrap) shr bp_TGtkText_line_wrap;
+end;
+
+procedure set_line_wrap(a : PGtkText; __line_wrap : guint);
+begin
+ a^.flag0:=a^.flag0 or ((__line_wrap shl bp_TGtkText_line_wrap)
+ and bm_TGtkText_line_wrap);
+end;
+
+function word_wrap(a : PGtkText) : guint;
+begin
+ word_wrap:=(a^.flag0 and bm_TGtkText_word_wrap) shr bp_TGtkText_word_wrap;
+end;
+
+procedure set_word_wrap(a : PGtkText; __word_wrap : guint);
+begin
+ a^.flag0:=a^.flag0 or ((__word_wrap shl bp_TGtkText_word_wrap)
+ and bm_TGtkText_word_wrap);
+end;
+
+function use_wchar(a : PGtkText) : gboolean;
+begin
+ use_wchar:=((a^.flag0 and bm_TGtkText_use_wchar) shr bp_TGtkText_use_wchar)>0;
+end;
+
+procedure set_use_wchar(a : PGtkText; __use_wchar : gboolean);
+begin
+ if __use_wchar then
+ a^.flag0:=a^.flag0 or bm_TGtkText_use_wchar
+ else
+ a^.flag0:=a^.flag0 and not bm_TGtkText_use_wchar;
+end;
+
+function GTK_TEXT_INDEX_WCHAR(t: PGtkText; index: guint): guint32;
+begin
+{$IFNDEF KYLIX}
+ if Use_WChar(t) then begin
+ if index < t^.gap_position then begin
+ Result:=t^.text.wc[index];
+ end else begin
+ Result:=t^.text.wc[index+t^.gap_size];
+ end;
+ end else begin
+ writeln('GTK_TEXT_INDEX_WCHAR ERROR: t does not use wide char');
+ Result:=0;
+ end;
+{$ENDIF}
+end;
+
+function GTK_TEXT_INDEX_UCHAR(t: PGtkText; index: guint): GUChar;
+begin
+{$IFNDEF KYLIX}
+ if Use_WChar(t) then begin
+ writeln('GTK_TEXT_INDEX_WCHAR ERROR: t does not use unsigned char');
+ Result:=0;
+ end else begin
+ if index < t^.gap_position then begin
+ Result:=t^.text.ch[index];
+ end else begin
+ Result:=t^.text.ch[index+t^.gap_size];
+ end;
+ end;
+{$ENDIF}
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextbtree.inc b/packages/gtk2/src/gtk+/gtk/gtktextbtree.inc
new file mode 100644
index 0000000000..064e374371
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextbtree.inc
@@ -0,0 +1,205 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ // internal type
+ PGtkTextBTreeNode = pointer;
+
+ // internal type
+ PGtkTextBTree = pointer;
+
+ PGtkTextLine = ^TGtkTextLine;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+{ Lines }
+{ Chunk of data associated with a line; views can use this to store
+ info at the line. They should "subclass" the header struct here. }
+ PGtkTextLineData = ^TGtkTextLineData;
+ TGtkTextLineData = record
+ view_id : gpointer;
+ next : PGtkTextLineData;
+ height : gint;
+ flag0 : longint;
+ end;
+
+{
+ The data structure below defines a single line of text (from newline
+ to newline, not necessarily what appears on one line of the screen).
+
+ You can consider this line a "paragraph" also
+ }
+{ Pointer to parent node containing
+ line. }
+{ Next in linked list of lines with
+ same parent node in B-tree. NULL
+ means theEnd of list. }
+{ First in ordered list of segments
+ that make up the line. }
+{ data stored here by views }
+ TGtkTextLine = record
+ parent : PGtkTextBTreeNode;
+ next : PGtkTextLine;
+ segments : PGtkTextLineSegment;
+ views : PGtkTextLineData;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function _gtk_text_btree_new(table:PGtkTextTagTable; buffer:PGtkTextBuffer):PGtkTextBTree; cdecl; external gtklib;
+procedure _gtk_text_btree_ref(tree:PGtkTextBTree); cdecl; external gtklib;
+procedure _gtk_text_btree_unref(tree:PGtkTextBTree); cdecl; external gtklib;
+function _gtk_text_btree_get_buffer(tree:PGtkTextBTree):PGtkTextBuffer; cdecl; external gtklib;
+function _gtk_text_btree_get_chars_changed_stamp(tree:PGtkTextBTree):guint; cdecl; external gtklib;
+function _gtk_text_btree_get_segments_changed_stamp(tree:PGtkTextBTree):guint; cdecl; external gtklib;
+procedure _gtk_text_btree_segments_changed(tree:PGtkTextBTree); cdecl; external gtklib;
+function _gtk_text_btree_is_end(tree:PGtkTextBTree; line:PGtkTextLine; seg:PGtkTextLineSegment; byte_index:longint; char_offset:longint):gboolean; cdecl; external gtklib;
+
+{ Indexable segment mutation }
+procedure _gtk_text_btree_delete(start:PGtkTextIter; theEnd:PGtkTextIter); cdecl; external gtklib;
+
+procedure _gtk_text_btree_insert(iter:PGtkTextIter; text:Pgchar; len:gint); cdecl; external gtklib;
+procedure _gtk_text_btree_insert_pixbuf(iter:PGtkTextIter; pixbuf:PGdkPixbuf); cdecl; external gtklib;
+procedure _gtk_text_btree_insert_child_anchor(iter:PGtkTextIter; anchor:PGtkTextChildAnchor); cdecl; external gtklib;
+procedure _gtk_text_btree_unregister_child_anchor(anchor:PGtkTextChildAnchor); cdecl; external gtklib;
+
+{ View stuff }
+function _gtk_text_btree_find_line_by_y(tree:PGtkTextBTree; view_id:gpointer; ypixel:gint; line_top_y:Pgint):PGtkTextLine; cdecl; external gtklib;
+function _gtk_text_btree_find_line_top(tree:PGtkTextBTree; line:PGtkTextLine; view_id:gpointer):gint; cdecl; external gtklib;
+procedure _gtk_text_btree_add_view(tree:PGtkTextBTree; layout:PGtkTextLayout); cdecl; external gtklib;
+procedure _gtk_text_btree_remove_view(tree:PGtkTextBTree; view_id:gpointer); cdecl; external gtklib;
+
+procedure _gtk_text_btree_invalidate_region(tree:PGtkTextBTree; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl; external gtklib;
+procedure _gtk_text_btree_get_view_size(tree:PGtkTextBTree; view_id:gpointer; width:Pgint; height:Pgint); cdecl; external gtklib;
+function _gtk_text_btree_is_valid(tree:PGtkTextBTree; view_id:gpointer):gboolean; cdecl; external gtklib;
+function _gtk_text_btree_validate(tree:PGtkTextBTree; view_id:gpointer; max_pixels:gint; y:Pgint; old_height:Pgint;
+ new_height:Pgint):gboolean; cdecl; external gtklib;
+procedure _gtk_text_btree_validate_line(tree:PGtkTextBTree; line:PGtkTextLine; view_id:gpointer); cdecl; external gtklib;
+{ Tag }
+procedure _gtk_text_btree_tag(start:PGtkTextIter; theEnd:PGtkTextIter; tag:PGtkTextTag; apply:gboolean); cdecl; external gtklib;
+{ "Getters" }
+function _gtk_text_btree_get_line(tree:PGtkTextBTree; line_number:gint; real_line_number:Pgint):PGtkTextLine; cdecl; external gtklib;
+function _gtk_text_btree_get_line_no_last(tree:PGtkTextBTree; line_number:gint; real_line_number:Pgint):PGtkTextLine; cdecl; external gtklib;
+function _gtk_text_btree_get_end_iter_line(tree:PGtkTextBTree):PGtkTextLine; cdecl; external gtklib;
+function _gtk_text_btree_get_line_at_char(tree:PGtkTextBTree; char_index:gint; line_start_index:Pgint; real_char_index:Pgint):PGtkTextLine; cdecl; external gtklib;
+function _gtk_text_btree_get_tags(iter:PGtkTextIter; num_tags:Pgint):PPGtkTextTag; cdecl; external gtklib;
+function _gtk_text_btree_get_text(start:PGtkTextIter; theEnd:PGtkTextIter; include_hidden:gboolean; include_nonchars:gboolean):Pgchar; cdecl; external gtklib;
+function _gtk_text_btree_line_count(tree:PGtkTextBTree):gint; cdecl; external gtklib;
+function _gtk_text_btree_char_count(tree:PGtkTextBTree):gint; cdecl; external gtklib;
+
+function _gtk_text_btree_char_is_invisible(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+{ Get iterators (these are implemented in gtktextiter.c) }
+procedure _gtk_text_btree_get_iter_at_char(tree:PGtkTextBTree; iter:PGtkTextIter; char_index:gint); cdecl; external gtklib;
+procedure _gtk_text_btree_get_iter_at_line_char(tree:PGtkTextBTree; iter:PGtkTextIter; line_number:gint; char_index:gint); cdecl; external gtklib;
+procedure _gtk_text_btree_get_iter_at_line_byte(tree:PGtkTextBTree; iter:PGtkTextIter; line_number:gint; byte_index:gint); cdecl; external gtklib;
+
+function _gtk_text_btree_get_iter_from_string(tree:PGtkTextBTree; iter:PGtkTextIter; _string:Pgchar):gboolean; cdecl; external gtklib;
+
+function _gtk_text_btree_get_iter_at_mark_name(tree:PGtkTextBTree; iter:PGtkTextIter; mark_name:Pgchar):gboolean; cdecl; external gtklib;
+procedure _gtk_text_btree_get_iter_at_mark(tree:PGtkTextBTree; iter:PGtkTextIter; mark:PGtkTextMark); cdecl; external gtklib;
+procedure _gtk_text_btree_get_end_iter(tree:PGtkTextBTree; iter:PGtkTextIter); cdecl; external gtklib;
+procedure _gtk_text_btree_get_iter_at_line(tree:PGtkTextBTree; iter:PGtkTextIter; line:PGtkTextLine; byte_offset:gint); cdecl; external gtklib;
+function _gtk_text_btree_get_iter_at_first_toggle(tree:PGtkTextBTree; iter:PGtkTextIter; tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+function _gtk_text_btree_get_iter_at_last_toggle(tree:PGtkTextBTree; iter:PGtkTextIter; tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+procedure _gtk_text_btree_get_iter_at_child_anchor(tree:PGtkTextBTree; iter:PGtkTextIter; anchor:PGtkTextChildAnchor); cdecl; external gtklib;
+{ Manipulate marks }
+function _gtk_text_btree_set_mark(tree:PGtkTextBTree; existing_mark:PGtkTextMark; name:Pgchar; left_gravity:gboolean; index:PGtkTextIter;
+ should_exist:gboolean):PGtkTextMark; cdecl; external gtklib;
+
+procedure _gtk_text_btree_remove_mark_by_name(tree:PGtkTextBTree; name:Pgchar); cdecl; external gtklib;
+procedure _gtk_text_btree_remove_mark(tree:PGtkTextBTree; segment:PGtkTextMark); cdecl; external gtklib;
+function _gtk_text_btree_get_selection_bounds(tree:PGtkTextBTree; start:PGtkTextIter; theEnd:PGtkTextIter):gboolean; cdecl; external gtklib;
+
+procedure _gtk_text_btree_place_cursor(tree:PGtkTextBTree; where:PGtkTextIter); cdecl; external gtklib;
+function _gtk_text_btree_mark_is_insert(tree:PGtkTextBTree; segment:PGtkTextMark):gboolean; cdecl; external gtklib;
+function _gtk_text_btree_mark_is_selection_bound(tree:PGtkTextBTree; segment:PGtkTextMark):gboolean; cdecl; external gtklib;
+
+function _gtk_text_btree_get_mark_by_name(tree:PGtkTextBTree; name:Pgchar):PGtkTextMark; cdecl; external gtklib;
+function _gtk_text_btree_first_could_contain_tag(tree:PGtkTextBTree; tag:PGtkTextTag):PGtkTextLine; cdecl; external gtklib;
+function _gtk_text_btree_last_could_contain_tag(tree:PGtkTextBTree; tag:PGtkTextTag):PGtkTextLine; cdecl; external gtklib;
+
+const
+ bm_TGtkTextLineData_width = $FFFFFF;
+ bp_TGtkTextLineData_width = 0;
+ bm_TGtkTextLineData_valid = $FF000000;
+ bp_TGtkTextLineData_valid = 24;
+
+function width(a : PGtkTextLineData) : gint;
+procedure set_width(a : PGtkTextLineData; NewWidth : gint);
+function valid(a : PGtkTextLineData) : gint;
+procedure set_valid(a : PGtkTextLineData; __valid : gint);
+
+function _gtk_text_line_get_number(line:PGtkTextLine):gint; cdecl; external gtklib;
+function _gtk_text_line_char_has_tag(line:PGtkTextLine; tree:PGtkTextBTree; char_in_line:gint; tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+function _gtk_text_line_byte_has_tag(line:PGtkTextLine; tree:PGtkTextBTree; byte_in_line:gint; tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+function _gtk_text_line_is_last(line:PGtkTextLine; tree:PGtkTextBTree):gboolean; cdecl; external gtklib;
+function _gtk_text_line_contains_end_iter(line:PGtkTextLine; tree:PGtkTextBTree):gboolean; cdecl; external gtklib;
+function _gtk_text_line_next(line:PGtkTextLine):PGtkTextLine; cdecl; external gtklib;
+function _gtk_text_line_next_excluding_last(line:PGtkTextLine):PGtkTextLine; cdecl; external gtklib;
+function _gtk_text_line_previous(line:PGtkTextLine):PGtkTextLine; cdecl; external gtklib;
+procedure _gtk_text_line_add_data(line:PGtkTextLine; data:PGtkTextLineData); cdecl; external gtklib;
+function _gtk_text_line_remove_data(line:PGtkTextLine; view_id:gpointer):gpointer; cdecl; external gtklib;
+function _gtk_text_line_get_data(line:PGtkTextLine; view_id:gpointer):gpointer; cdecl; external gtklib;
+procedure _gtk_text_line_invalidate_wrap(line:PGtkTextLine; ld:PGtkTextLineData); cdecl; external gtklib;
+function _gtk_text_line_char_count(line:PGtkTextLine):gint; cdecl; external gtklib;
+function _gtk_text_line_byte_count(line:PGtkTextLine):gint; cdecl; external gtklib;
+function _gtk_text_line_char_index(line:PGtkTextLine):gint; cdecl; external gtklib;
+function _gtk_text_line_byte_to_segment(line:PGtkTextLine; byte_offset:gint; seg_offset:Pgint):PGtkTextLineSegment; cdecl; external gtklib;
+function _gtk_text_line_char_to_segment(line:PGtkTextLine; char_offset:gint; seg_offset:Pgint):PGtkTextLineSegment; cdecl; external gtklib;
+function _gtk_text_line_byte_locate(line:PGtkTextLine; byte_offset:gint; var segment:PGtkTextLineSegment; var any_segment:PGtkTextLineSegment; var seg_byte_offset:gint;
+ line_byte_offset:Pgint):gboolean; cdecl; external gtklib;
+function _gtk_text_line_char_locate(line:PGtkTextLine; char_offset:gint; var segment:PGtkTextLineSegment; var any_segment:PGtkTextLineSegment; var seg_char_offset:gint;
+ line_char_offset:Pgint):gboolean; cdecl; external gtklib;
+procedure _gtk_text_line_byte_to_char_offsets(line:PGtkTextLine; byte_offset:gint; line_char_offset:Pgint; seg_char_offset:Pgint); cdecl; external gtklib;
+procedure _gtk_text_line_char_to_byte_offsets(line:PGtkTextLine; char_offset:gint; line_byte_offset:Pgint; seg_byte_offset:Pgint); cdecl; external gtklib;
+function _gtk_text_line_byte_to_any_segment(line:PGtkTextLine; byte_offset:gint; seg_offset:Pgint):PGtkTextLineSegment; cdecl; external gtklib;
+function _gtk_text_line_char_to_any_segment(line:PGtkTextLine; char_offset:gint; seg_offset:Pgint):PGtkTextLineSegment; cdecl; external gtklib;
+function _gtk_text_line_byte_to_char(line:PGtkTextLine; byte_offset:gint):gint; cdecl; external gtklib;
+function _gtk_text_line_char_to_byte(line:PGtkTextLine; char_offset:gint):gint; cdecl; external gtklib;
+function _gtk_text_line_next_could_contain_tag(line:PGtkTextLine; tree:PGtkTextBTree; tag:PGtkTextTag):PGtkTextLine; cdecl; external gtklib;
+function _gtk_text_line_previous_could_contain_tag(line:PGtkTextLine; tree:PGtkTextBTree; tag:PGtkTextTag):PGtkTextLine; cdecl; external gtklib;
+function _gtk_text_line_data_new(layout:PGtkTextLayout; line:PGtkTextLine):PGtkTextLineData; cdecl; external gtklib;
+{ Debug }
+procedure _gtk_text_btree_check(tree:PGtkTextBTree); cdecl; external gtklib;
+procedure _gtk_text_btree_spew(tree:PGtkTextBTree); cdecl; external gtklib;
+
+{ ignore, exported only for gtktextsegment.c }
+procedure _gtk_toggle_segment_check_func(segPtr:PGtkTextLineSegment; line:PGtkTextLine); cdecl; external gtklib;
+procedure _gtk_change_node_toggle_count(node:PGtkTextBTreeNode; info:PGtkTextTagInfo; delta:gint); cdecl; external gtklib;
+{ for gtktextmark.c }
+procedure _gtk_text_btree_release_mark_segment(tree:PGtkTextBTree; segment:PGtkTextLineSegment); cdecl; external gtklib;
+{ for coordination with the tag table }
+procedure _gtk_text_btree_notify_will_remove_tag(tree:PGtkTextBTree; tag:PGtkTextTag); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function width(a : PGtkTextLineData) : gint;
+begin
+ width:=a^.flag0 and bm_TGtkTextLineData_width;
+end;
+
+procedure set_width(a : PGtkTextLineData; NewWidth : gint);
+begin
+ a^.flag0:=(bm_TGtkTextLineData_width and NewWidth) or a^.flag0;
+end;
+
+function valid(a : PGtkTextLineData) : gint;
+begin
+ valid:=(a^.flag0 and bm_TGtkTextLineData_valid) shr bp_TGtkTextLineData_valid;
+end;
+
+procedure set_valid(a : PGtkTextLineData; __valid : gint);
+begin
+ a^.flag0:=a^.flag0 or ((__valid shl bp_TGtkTextLineData_valid) and bm_TGtkTextLineData_valid);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextbuffer.inc b/packages/gtk2/src/gtk+/gtk/gtktextbuffer.inc
new file mode 100644
index 0000000000..66d86f2aea
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextbuffer.inc
@@ -0,0 +1,226 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkTextLogAttrCache = pointer;
+
+{ Whether the buffer has been modified since last save }
+ PGtkTextBuffer = ^TGtkTextBuffer;
+ TGtkTextBuffer = record
+ parent_instance : TGObject;
+ tag_table : PGtkTextTagTable;
+ btree : PGtkTextBTree;
+ clipboard_contents_buffers : PGSList;
+ selection_clipboards : PGSList;
+ log_attr_cache : PGtkTextLogAttrCache;
+ user_action_count : guint;
+ flag0 : word;
+ end;
+
+{ Only for text/widgets/pixbuf changed, marks/tags don't cause this
+ to be emitted
+ }
+{ New value for the modified flag }
+{ Mark moved or created }
+{ Called at the start and theEnd of an atomic user action }
+{ Padding for future expansion }
+ PGtkTextBufferClass = ^TGtkTextBufferClass;
+ TGtkTextBufferClass = record
+ parent_class : TGObjectClass;
+ insert_text : procedure (buffer:PGtkTextBuffer; pos:PGtkTextIter; text:Pgchar; length:gint); cdecl;
+ insert_pixbuf : procedure (buffer:PGtkTextBuffer; pos:PGtkTextIter; pixbuf:PGdkPixbuf); cdecl;
+ insert_child_anchor : procedure (buffer:PGtkTextBuffer; pos:PGtkTextIter; anchor:PGtkTextChildAnchor); cdecl;
+ delete_range : procedure (buffer:PGtkTextBuffer; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl;
+ changed : procedure (buffer:PGtkTextBuffer); cdecl;
+ modified_changed : procedure (buffer:PGtkTextBuffer); cdecl;
+ mark_set : procedure (buffer:PGtkTextBuffer; location:PGtkTextIter; mark:PGtkTextMark); cdecl;
+ mark_deleted : procedure (buffer:PGtkTextBuffer; mark:PGtkTextMark); cdecl;
+ apply_tag : procedure (buffer:PGtkTextBuffer; tag:PGtkTextTag; start_char:PGtkTextIter; end_char:PGtkTextIter); cdecl;
+ remove_tag : procedure (buffer:PGtkTextBuffer; tag:PGtkTextTag; start_char:PGtkTextIter; end_char:PGtkTextIter); cdecl;
+ begin_user_action : procedure (buffer:PGtkTextBuffer); cdecl;
+ end_user_action : procedure (buffer:PGtkTextBuffer); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ _gtk_reserved5 : procedure ; cdecl;
+ _gtk_reserved6 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkTextBuffer_modified = $1;
+ bp_TGtkTextBuffer_modified = 0;
+
+
+{
+ This is the PUBLIC representation of a text buffer.
+ GtkTextBTree is the PRIVATE internal representation of it.
+ }
+function GTK_TYPE_TEXT_BUFFER : GType;
+function GTK_TEXT_BUFFER(obj: pointer) : PGtkTextBuffer;
+function GTK_TEXT_BUFFER_CLASS(klass: pointer) : PGtkTextBufferClass;
+function GTK_IS_TEXT_BUFFER(obj: pointer) : boolean;
+function GTK_IS_TEXT_BUFFER_CLASS(klass: pointer) : boolean;
+function GTK_TEXT_BUFFER_GET_CLASS(obj: pointer) : PGtkTextBufferClass;
+
+function modified(var a : TGtkTextBuffer) : guint;
+procedure set_modified(var a : TGtkTextBuffer; __modified : guint);
+
+function gtk_text_buffer_get_type:GType; cdecl; external gtklib;
+{ table is NULL to create a new one }
+function gtk_text_buffer_new(table:PGtkTextTagTable):PGtkTextBuffer; cdecl; external gtklib;
+function gtk_text_buffer_get_line_count(buffer:PGtkTextBuffer):gint; cdecl; external gtklib;
+function gtk_text_buffer_get_char_count(buffer:PGtkTextBuffer):gint; cdecl; external gtklib;
+function gtk_text_buffer_get_tag_table(buffer:PGtkTextBuffer):PGtkTextTagTable; cdecl; external gtklib;
+{ Delete whole buffer, then insert }
+procedure gtk_text_buffer_set_text(buffer:PGtkTextBuffer; text:Pgchar; len:gint); cdecl; external gtklib;
+{ Insert into the buffer }
+procedure gtk_text_buffer_insert(buffer:PGtkTextBuffer; iter:PGtkTextIter; text:Pgchar; len:gint); cdecl; external gtklib;
+procedure gtk_text_buffer_insert_at_cursor(buffer:PGtkTextBuffer; text:Pgchar; len:gint); cdecl; external gtklib;
+function gtk_text_buffer_insert_interactive(buffer:PGtkTextBuffer; iter:PGtkTextIter; text:Pgchar; len:gint; default_editable:gboolean):gboolean; cdecl; external gtklib;
+function gtk_text_buffer_insert_interactive_at_cursor(buffer:PGtkTextBuffer; text:Pgchar; len:gint; default_editable:gboolean):gboolean; cdecl; external gtklib;
+procedure gtk_text_buffer_insert_range(buffer:PGtkTextBuffer; iter:PGtkTextIter; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl; external gtklib;
+function gtk_text_buffer_insert_range_interactive(buffer:PGtkTextBuffer; iter:PGtkTextIter; start:PGtkTextIter; theEnd:PGtkTextIter; default_editable:gboolean):gboolean; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+procedure gtk_text_buffer_insert_with_tags(buffer:PGtkTextBuffer; iter:PGtkTextIter; text:Pgchar; len:gint; first_tag:PGtkTextTag;
+ args:array of const); cdecl; overload; external gtklib;
+procedure gtk_text_buffer_insert_with_tags(buffer:PGtkTextBuffer; iter:PGtkTextIter; text:Pgchar; len:gint; first_tag:PGtkTextTag); cdecl; overload; varargs; external gtklib;
+procedure gtk_text_buffer_insert_with_tags_by_name(buffer:PGtkTextBuffer; iter:PGtkTextIter; text:Pgchar; len:gint; first_tag_name:Pgchar;
+ args:array of const); cdecl; overload; external gtklib;
+procedure gtk_text_buffer_insert_with_tags_by_name(buffer:PGtkTextBuffer; iter:PGtkTextIter; text:Pgchar; len:gint; first_tag_name:Pgchar); cdecl; overload; varargs; external gtklib;
+{$ELSE}
+procedure gtk_text_buffer_insert_with_tags(buffer:PGtkTextBuffer; iter:PGtkTextIter; text:Pgchar; len:gint; first_tag:PGtkTextTag); varargs; cdecl; external gtklib;
+procedure gtk_text_buffer_insert_with_tags_by_name(buffer:PGtkTextBuffer; iter:PGtkTextIter; text:Pgchar; len:gint; first_tag_name:Pgchar); varargs; cdecl; external gtklib;
+{$ENDIF}
+{ Delete from the buffer }
+procedure gtk_text_buffer_delete(buffer:PGtkTextBuffer; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl; external gtklib;
+function gtk_text_buffer_delete_interactive(buffer:PGtkTextBuffer; start_iter:PGtkTextIter; end_iter:PGtkTextIter; default_editable:gboolean):gboolean; cdecl; external gtklib;
+{ Obtain strings from the buffer }
+function gtk_text_buffer_get_text(buffer:PGtkTextBuffer; start:PGtkTextIter; theEnd:PGtkTextIter; include_hidden_chars:gboolean):Pgchar; cdecl; external gtklib;
+function gtk_text_buffer_get_slice(buffer:PGtkTextBuffer; start:PGtkTextIter; theEnd:PGtkTextIter; include_hidden_chars:gboolean):Pgchar; cdecl; external gtklib;
+{ Insert a pixbuf }
+procedure gtk_text_buffer_insert_pixbuf(buffer:PGtkTextBuffer; iter:PGtkTextIter; pixbuf:PGdkPixbuf); cdecl; external gtklib;
+{ Insert a child anchor }
+procedure gtk_text_buffer_insert_child_anchor(buffer:PGtkTextBuffer; iter:PGtkTextIter; anchor:PGtkTextChildAnchor); cdecl; external gtklib;
+{ Convenience, create and insert a child anchor }
+function gtk_text_buffer_create_child_anchor(buffer:PGtkTextBuffer; iter:PGtkTextIter):PGtkTextChildAnchor; cdecl; external gtklib;
+{ Mark manipulation }
+function gtk_text_buffer_create_mark(buffer:PGtkTextBuffer; mark_name:Pgchar; where:PGtkTextIter; left_gravity:gboolean):PGtkTextMark; cdecl; external gtklib;
+procedure gtk_text_buffer_move_mark(buffer:PGtkTextBuffer; mark:PGtkTextMark; where:PGtkTextIter); cdecl; external gtklib;
+procedure gtk_text_buffer_delete_mark(buffer:PGtkTextBuffer; mark:PGtkTextMark); cdecl; external gtklib;
+function gtk_text_buffer_get_mark(buffer:PGtkTextBuffer; name:Pgchar):PGtkTextMark; cdecl; external gtklib;
+procedure gtk_text_buffer_move_mark_by_name(buffer:PGtkTextBuffer; name:Pgchar; where:PGtkTextIter); cdecl; external gtklib;
+procedure gtk_text_buffer_delete_mark_by_name(buffer:PGtkTextBuffer; name:Pgchar); cdecl; external gtklib;
+function gtk_text_buffer_get_insert(buffer:PGtkTextBuffer):PGtkTextMark; cdecl; external gtklib;
+function gtk_text_buffer_get_selection_bound(buffer:PGtkTextBuffer):PGtkTextMark; cdecl; external gtklib;
+{ efficiently move insert and selection_bound to same location }
+procedure gtk_text_buffer_place_cursor(buffer:PGtkTextBuffer; where:PGtkTextIter); cdecl; external gtklib;
+{ Tag manipulation }
+procedure gtk_text_buffer_apply_tag(buffer:PGtkTextBuffer; tag:PGtkTextTag; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl; external gtklib;
+procedure gtk_text_buffer_remove_tag(buffer:PGtkTextBuffer; tag:PGtkTextTag; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl; external gtklib;
+procedure gtk_text_buffer_apply_tag_by_name(buffer:PGtkTextBuffer; name:Pgchar; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl; external gtklib;
+procedure gtk_text_buffer_remove_tag_by_name(buffer:PGtkTextBuffer; name:Pgchar; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl; external gtklib;
+procedure gtk_text_buffer_remove_all_tags(buffer:PGtkTextBuffer; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl; external gtklib;
+{ You can either ignore the return value, or use it to
+ set the attributes of the tag. tag_name can be NULL
+ }
+{$IFNDEF KYLIX}
+function gtk_text_buffer_create_tag(buffer:PGtkTextBuffer; tag_name:Pgchar; first_property_name:Pgchar; args:array of const):PGtkTextTag; cdecl; overload; external gtklib;
+function gtk_text_buffer_create_tag(buffer:PGtkTextBuffer; tag_name:Pgchar; first_property_name:Pgchar):PGtkTextTag; cdecl; overload; external gtklib;
+{$ELSE}
+function gtk_text_buffer_create_tag(buffer:PGtkTextBuffer; tag_name:Pgchar; first_property_name:Pgchar):PGtkTextTag; varargs; cdecl; external gtklib;
+{$ENDIF}
+{ Obtain iterators pointed at various places, then you can move the
+ iterator around using the GtkTextIter operators
+ }
+procedure gtk_text_buffer_get_iter_at_line_offset(buffer:PGtkTextBuffer; iter:PGtkTextIter; line_number:gint; char_offset:gint); cdecl; external gtklib;
+procedure gtk_text_buffer_get_iter_at_line_index(buffer:PGtkTextBuffer; iter:PGtkTextIter; line_number:gint; byte_index:gint); cdecl; external gtklib;
+procedure gtk_text_buffer_get_iter_at_offset(buffer:PGtkTextBuffer; iter:PGtkTextIter; char_offset:gint); cdecl; external gtklib;
+procedure gtk_text_buffer_get_iter_at_line(buffer:PGtkTextBuffer; iter:PGtkTextIter; line_number:gint); cdecl; external gtklib;
+procedure gtk_text_buffer_get_start_iter(buffer:PGtkTextBuffer; iter:PGtkTextIter); cdecl; external gtklib;
+procedure gtk_text_buffer_get_end_iter(buffer:PGtkTextBuffer; iter:PGtkTextIter); cdecl; external gtklib;
+procedure gtk_text_buffer_get_bounds(buffer:PGtkTextBuffer; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl; external gtklib;
+procedure gtk_text_buffer_get_iter_at_mark(buffer:PGtkTextBuffer; iter:PGtkTextIter; mark:PGtkTextMark); cdecl; external gtklib;
+procedure gtk_text_buffer_get_iter_at_child_anchor(buffer:PGtkTextBuffer; iter:PGtkTextIter; anchor:PGtkTextChildAnchor); cdecl; external gtklib;
+{ There's no get_first_iter because you just get the iter for
+ line or char 0 }
+{ Used to keep track of whether the buffer needs saving; anytime the
+ buffer contents change, the modified flag is turned on. Whenever
+ you save, turn it off. Tags and marks do not affect the modified
+ flag, but if you would like them to you can connect a handler to
+ the tag/mark signals and call set_modified in your handler }
+function gtk_text_buffer_get_modified(buffer:PGtkTextBuffer):gboolean; cdecl; external gtklib;
+procedure gtk_text_buffer_set_modified(buffer:PGtkTextBuffer; setting:gboolean); cdecl; external gtklib;
+procedure gtk_text_buffer_add_selection_clipboard(buffer:PGtkTextBuffer; clipboard:PGtkClipboard); cdecl; external gtklib;
+procedure gtk_text_buffer_remove_selection_clipboard(buffer:PGtkTextBuffer; clipboard:PGtkClipboard); cdecl; external gtklib;
+procedure gtk_text_buffer_cut_clipboard(buffer:PGtkTextBuffer; clipboard:PGtkClipboard; default_editable:gboolean); cdecl; external gtklib;
+procedure gtk_text_buffer_copy_clipboard(buffer:PGtkTextBuffer; clipboard:PGtkClipboard); cdecl; external gtklib;
+procedure gtk_text_buffer_paste_clipboard(buffer:PGtkTextBuffer; clipboard:PGtkClipboard; override_location:PGtkTextIter; default_editable:gboolean); cdecl; external gtklib;
+function gtk_text_buffer_get_selection_bounds(buffer:PGtkTextBuffer; start:PGtkTextIter; theEnd:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_buffer_delete_selection(buffer:PGtkTextBuffer; interactive:gboolean; default_editable:gboolean):gboolean; cdecl; external gtklib;
+{ Called to specify atomic user actions, used to implement undo }
+procedure gtk_text_buffer_begin_user_action(buffer:PGtkTextBuffer); cdecl; external gtklib;
+procedure gtk_text_buffer_end_user_action(buffer:PGtkTextBuffer); cdecl; external gtklib;
+{ INTERNAL private stuff }
+procedure _gtk_text_buffer_spew(buffer:PGtkTextBuffer); cdecl; external gtklib;
+function _gtk_text_buffer_get_btree(buffer:PGtkTextBuffer):PGtkTextBTree; cdecl; external gtklib;
+function _gtk_text_buffer_get_line_log_attrs(buffer:PGtkTextBuffer; anywhere_in_line:PGtkTextIter; char_len:Pgint):PPangoLogAttr; cdecl; external gtklib;
+procedure _gtk_text_buffer_notify_will_remove_tag(buffer:PGtkTextBuffer; tag:PGtkTextTag); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TEXT_BUFFER : GType;
+begin
+ GTK_TYPE_TEXT_BUFFER:=gtk_text_buffer_get_type;
+end;
+
+function GTK_TEXT_BUFFER(obj: pointer) : PGtkTextBuffer;
+begin
+ GTK_TEXT_BUFFER:=PGtkTextBuffer(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TEXT_BUFFER));
+end;
+
+function GTK_TEXT_BUFFER_CLASS(klass: pointer) : PGtkTextBufferClass;
+begin
+ GTK_TEXT_BUFFER_CLASS:=PGtkTextBufferClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_TEXT_BUFFER));
+end;
+
+function GTK_IS_TEXT_BUFFER(obj: pointer) : boolean;
+begin
+ GTK_IS_TEXT_BUFFER:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TEXT_BUFFER);
+end;
+
+function GTK_IS_TEXT_BUFFER_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TEXT_BUFFER_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_TEXT_BUFFER);
+end;
+
+function GTK_TEXT_BUFFER_GET_CLASS(obj: pointer) : PGtkTextBufferClass;
+begin
+ GTK_TEXT_BUFFER_GET_CLASS:=PGtkTextBufferClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_TEXT_BUFFER));
+end;
+
+function modified(var a : TGtkTextBuffer) : guint;
+begin
+ modified:=(a.flag0 and bm_TGtkTextBuffer_modified) shr bp_TGtkTextBuffer_modified;
+end;
+
+procedure set_modified(var a : TGtkTextBuffer; __modified : guint);
+begin
+ a.flag0:=a.flag0 or ((__modified shl bp_TGtkTextBuffer_modified) and bm_TGtkTextBuffer_modified);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextchild.inc b/packages/gtk2/src/gtk+/gtk/gtktextchild.inc
new file mode 100644
index 0000000000..e6a152a098
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextchild.inc
@@ -0,0 +1,84 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ A GtkTextChildAnchor is a spot in the buffer where child widgets
+ can be "anchored" (inserted inline, as if they were characters).
+ The anchor can have multiple widgets anchored, to allow for multiple
+ views.
+ }
+ PGtkTextChildAnchor = ^TGtkTextChildAnchor;
+ TGtkTextChildAnchor = record
+ parent_instance : TGObject;
+ segment : gpointer;
+ end;
+
+{ Padding for future expansion }
+ PGtkTextChildAnchorClass = ^TGtkTextChildAnchorClass;
+ TGtkTextChildAnchorClass = record
+ parent_class : TGObjectClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_TEXT_CHILD_ANCHOR : GType;
+function GTK_TEXT_CHILD_ANCHOR(anObject: pointer) : PGtkTextChildAnchor;
+function GTK_TEXT_CHILD_ANCHOR_CLASS(klass: pointer) : PGtkTextChildAnchorClass;
+function GTK_IS_TEXT_CHILD_ANCHOR(anObject: pointer) : boolean;
+function GTK_IS_TEXT_CHILD_ANCHOR_CLASS(klass: pointer) : boolean;
+function GTK_TEXT_CHILD_ANCHOR_GET_CLASS(obj: pointer) : PGtkTextChildAnchorClass;
+
+
+function gtk_text_child_anchor_get_type:GType; cdecl; external gtklib;
+function gtk_text_child_anchor_new:PGtkTextChildAnchor; cdecl; external gtklib;
+function gtk_text_child_anchor_get_widgets(anchor:PGtkTextChildAnchor):PGList; cdecl; external gtklib;
+function gtk_text_child_anchor_get_deleted(anchor:PGtkTextChildAnchor):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TEXT_CHILD_ANCHOR : GType;
+begin
+ GTK_TYPE_TEXT_CHILD_ANCHOR:=gtk_text_child_anchor_get_type;
+end;
+
+function GTK_TEXT_CHILD_ANCHOR(anObject: pointer) : PGtkTextChildAnchor;
+begin
+ GTK_TEXT_CHILD_ANCHOR:=PGtkTextChildAnchor(G_TYPE_CHECK_INSTANCE_CAST(anObject,GTK_TYPE_TEXT_CHILD_ANCHOR));
+end;
+
+function GTK_TEXT_CHILD_ANCHOR_CLASS(klass: pointer) : PGtkTextChildAnchorClass;
+begin
+ GTK_TEXT_CHILD_ANCHOR_CLASS:=PGtkTextChildAnchorClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_TEXT_CHILD_ANCHOR));
+end;
+
+function GTK_IS_TEXT_CHILD_ANCHOR(anObject: pointer) : boolean;
+begin
+ GTK_IS_TEXT_CHILD_ANCHOR:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GTK_TYPE_TEXT_CHILD_ANCHOR);
+end;
+
+function GTK_IS_TEXT_CHILD_ANCHOR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TEXT_CHILD_ANCHOR_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_TEXT_CHILD_ANCHOR);
+end;
+
+function GTK_TEXT_CHILD_ANCHOR_GET_CLASS(obj: pointer) : PGtkTextChildAnchorClass;
+begin
+ GTK_TEXT_CHILD_ANCHOR_GET_CLASS:=PGtkTextChildAnchorClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_TEXT_CHILD_ANCHOR));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextchildprivate.inc b/packages/gtk2/src/gtk+/gtk/gtktextchildprivate.inc
new file mode 100644
index 0000000000..aa5f80f8e2
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextchildprivate.inc
@@ -0,0 +1,37 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkTextPixbuf = ^TGtkTextPixbuf;
+ TGtkTextPixbuf = record
+ pixbuf : PGdkPixbuf;
+ end;
+
+ PGtkTextChildBody = ^TGtkTextChildBody;
+ TGtkTextChildBody = record
+ obj : PGtkTextChildAnchor;
+ widgets : PGSList;
+ tree : PGtkTextBTree;
+ line : PGtkTextLine;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+function _gtk_pixbuf_segment_new(pixbuf:PGdkPixbuf):PGtkTextLineSegment; cdecl; external gtklib;
+
+function _gtk_widget_segment_new(anchor:PGtkTextChildAnchor):PGtkTextLineSegment; cdecl; external gtklib;
+procedure _gtk_widget_segment_add(widget_segment:PGtkTextLineSegment; child:PGtkWidget); cdecl; external gtklib;
+procedure _gtk_widget_segment_remove(widget_segment:PGtkTextLineSegment; child:PGtkWidget); cdecl; external gtklib;
+procedure _gtk_widget_segment_ref(widget_segment:PGtkTextLineSegment); cdecl; external gtklib;
+procedure _gtk_widget_segment_unref(widget_segment:PGtkTextLineSegment); cdecl; external gtklib;
+function _gtk_anchored_child_get_layout(child:PGtkWidget):PGtkTextLayout; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextdisplay.inc b/packages/gtk2/src/gtk+/gtk/gtktextdisplay.inc
new file mode 100644
index 0000000000..16a356b2db
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextdisplay.inc
@@ -0,0 +1,112 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ gtktextdisplay.c - display layed-out text
+
+ Copyright (c) 1992-1994 The Regents of the University of California.
+ Copyright (c) 1994-1997 Sun Microsystems, Inc.
+ Copyright (c) 2000 Red Hat, Inc.
+ Tk->Gtk port by Havoc Pennington
+
+ This file can be used under your choice of two licenses, the LGPL
+ and the original Tk license.
+
+ LGPL:
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ Original Tk license:
+
+ This software is copyrighted by the Regents of the University of
+ California, Sun Microsystems, Inc., and other parties. The
+ following terms apply to all files associated with the software
+ unless explicitly disclaimed in individual files.
+
+ The authors hereby grant permission to use, copy, modify,
+ distribute, and license this software and its documentation for any
+ purpose, provided that existing copyright notices are retained in
+ all copies and that this notice is included verbatim in any
+ distributions. No written agreement, license, or royalty fee is
+ required for any of the authorized uses. Modifications to this
+ software may be copyrighted by their authors and need not follow
+ the licensing terms described here, provided that the new terms are
+ clearly indicated on the first page of each file where they apply.
+
+ IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY
+ PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
+ DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION,
+ OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
+ NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
+ AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
+ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+ GOVERNMENT USE: If you are acquiring this software on behalf of the
+ U.S. government, the Government shall have only "Restricted Rights"
+ in the software and related documentation as defined in the Federal
+ Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
+ are acquiring the software on behalf of the Department of Defense,
+ the software shall be classified as "Commercial Computer Software"
+ and the Government shall have only "Restricted Rights" as defined
+ in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the
+ foregoing, the authors grant the U.S. Government and others acting
+ in its behalf permission to use and distribute the software in
+ accordance with the terms specified in this license.
+
+ }
+{
+ Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
+ file for a list of people on the GTK+ Team. See the ChangeLog
+ files for a list of changes. These files are distributed with
+ GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ }
+{$ifndef GTK_TEXT_DISPLAY_H}
+{$define GTK_TEXT_DISPLAY_H}
+{$include gtktextlayout.inc}
+{ C++ extern C conditionnal removed }
+{ __cplusplus }
+{ A semi-public header intended for use by code that also
+ uses GtkTextLayout
+ }
+{ The drawable should be pre-initialized to your preferred background.
+ widget - Widget to grab some style info from
+ drawable - Drawable to render to
+ cursor_gc - Graphics context to use for cursor
+ x_offset/y_offset - Position of the drawable in layout coordinates
+ x/y/width/height - Region of the layout to render. x,y must be inside
+ the drawable.
+ widgets - list of widgets that need exposing
+ }
+
+procedure gtk_text_layout_draw(layout:PGtkTextLayout; widget:PGtkWidget; drawable:PGdkDrawable; cursor_gc:PGdkGC; x_offset:gint;
+ y_offset:gint; x:gint; y:gint; width:gint; height:gint;
+ widgets:PPGList); cdecl; external gtklib;
+{ C++ end of extern C conditionnal removed }
+{ __cplusplus }
+{$endif}
+{ GTK_TEXT_DISPLAY_H }
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextiter.inc b/packages/gtk2/src/gtk+/gtk/gtktextiter.inc
new file mode 100644
index 0000000000..3740d26993
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextiter.inc
@@ -0,0 +1,187 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ Possible future plans: SEARCH_CASE_INSENSITIVE, SEARCH_REGEXP }
+ PGtkTextSearchFlags = ^TGtkTextSearchFlags;
+ TGtkTextSearchFlags = longint;
+
+{ GtkTextIter is an opaque datatype; ignore all these fields.
+ Initialize the iter with gtk_text_buffer_get_iter_
+ functions
+ }
+{< private > }
+{ padding }
+ PGtkTextIter = ^TGtkTextIter;
+ TGtkTextIter = record
+ dummy1 : gpointer;
+ dummy2 : gpointer;
+ dummy3 : gint;
+ dummy4 : gint;
+ dummy5 : gint;
+ dummy6 : gint;
+ dummy7 : gint;
+ dummy8 : gint;
+ dummy9 : gpointer;
+ dummy10 : gpointer;
+ dummy11 : gint;
+ dummy12 : gint;
+ dummy13 : gint;
+ dummy14 : gpointer;
+ end;
+
+ TGtkTextCharPredicate = function (ch:gunichar; user_data:gpointer):gboolean; cdecl;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+const
+ GTK_TEXT_SEARCH_VISIBLE_ONLY = 0; (* values of TGtkTextSearchFlags *)
+ GTK_TEXT_SEARCH_TEXT_ONLY = 1;
+
+{
+ Iter: represents a location in the text. Becomes invalid if the
+ characters/pixmaps/widgets (indexable objects) in the text buffer
+ are changed.
+ }
+function GTK_TYPE_TEXT_ITER : GType;
+
+{ This is primarily intended for language bindings that want to avoid
+ a "buffer" argument to text insertions, deletions, etc. }
+function gtk_text_iter_get_buffer(iter:PGtkTextIter):PGtkTextBuffer; cdecl; external gtklib;
+{
+ Life cycle
+ }
+function gtk_text_iter_copy(iter:PGtkTextIter):PGtkTextIter; cdecl; external gtklib;
+procedure gtk_text_iter_free(iter:PGtkTextIter); cdecl; external gtklib;
+function gtk_text_iter_get_type:GType; cdecl; external gtklib;
+{
+ Convert to different kinds of index
+ }
+function gtk_text_iter_get_offset(iter:PGtkTextIter):gint; cdecl; external gtklib;
+function gtk_text_iter_get_line(iter:PGtkTextIter):gint; cdecl; external gtklib;
+function gtk_text_iter_get_line_offset(iter:PGtkTextIter):gint; cdecl; external gtklib;
+function gtk_text_iter_get_line_index(iter:PGtkTextIter):gint; cdecl; external gtklib;
+function gtk_text_iter_get_visible_line_offset(iter:PGtkTextIter):gint; cdecl; external gtklib;
+function gtk_text_iter_get_visible_line_index(iter:PGtkTextIter):gint; cdecl; external gtklib;
+{
+ "Dereference" operators
+ }
+
+function gtk_text_iter_get_char(iter:PGtkTextIter):gunichar; cdecl; external gtklib;
+
+{ includes the 0xFFFC char for pixmaps/widgets, so char offsets
+ into the returned string map properly into buffer char offsets
+ }
+function gtk_text_iter_get_slice(start:PGtkTextIter; theEnd:PGtkTextIter):Pgchar; cdecl; external gtklib;
+
+{ includes only text, no 0xFFFC }
+function gtk_text_iter_get_text(start:PGtkTextIter; theEnd:PGtkTextIter):Pgchar; cdecl; external gtklib;
+
+{ exclude invisible chars }
+function gtk_text_iter_get_visible_slice(start:PGtkTextIter; theEnd:PGtkTextIter):Pgchar; cdecl; external gtklib;
+function gtk_text_iter_get_visible_text(start:PGtkTextIter; theEnd:PGtkTextIter):Pgchar; cdecl; external gtklib;
+function gtk_text_iter_get_pixbuf(iter:PGtkTextIter):PGdkPixbuf; cdecl; external gtklib;
+function gtk_text_iter_get_marks(iter:PGtkTextIter):PGSList; cdecl; external gtklib;
+function gtk_text_iter_get_child_anchor(iter:PGtkTextIter):PGtkTextChildAnchor; cdecl; external gtklib;
+{ Return list of tags toggled at this point (toggled_on determines
+ whether the list is of on-toggles or off-toggles)
+ }
+function gtk_text_iter_get_toggled_tags(iter:PGtkTextIter; toggled_on:gboolean):PGSList; cdecl; external gtklib;
+function gtk_text_iter_begins_tag(iter:PGtkTextIter; tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+function gtk_text_iter_ends_tag(iter:PGtkTextIter; tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+function gtk_text_iter_toggles_tag(iter:PGtkTextIter; tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+function gtk_text_iter_has_tag(iter:PGtkTextIter; tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+function gtk_text_iter_get_tags(iter:PGtkTextIter):PGSList; cdecl; external gtklib;
+function gtk_text_iter_editable(iter:PGtkTextIter; default_setting:gboolean):gboolean; cdecl; external gtklib;
+function gtk_text_iter_can_insert(iter:PGtkTextIter; default_editability:gboolean):gboolean; cdecl; external gtklib;
+function gtk_text_iter_starts_word(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_ends_word(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_inside_word(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_starts_sentence(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_ends_sentence(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_inside_sentence(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_starts_line(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_ends_line(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_is_cursor_position(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_get_chars_in_line(iter:PGtkTextIter):gint; cdecl; external gtklib;
+function gtk_text_iter_get_bytes_in_line(iter:PGtkTextIter):gint; cdecl; external gtklib;
+function gtk_text_iter_get_attributes(iter:PGtkTextIter; values:PGtkTextAttributes):gboolean; cdecl; external gtklib;
+function gtk_text_iter_get_language(iter:PGtkTextIter):PPangoLanguage; cdecl; external gtklib;
+function gtk_text_iter_is_end(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_is_start(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+{
+ Moving around the buffer
+ }
+function gtk_text_iter_forward_char(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_char(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_forward_chars(iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_chars(iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+function gtk_text_iter_forward_line(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_line(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_forward_lines(iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_lines(iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+function gtk_text_iter_forward_word_end(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_word_start(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_forward_word_ends(iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_word_starts(iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+function gtk_text_iter_forward_sentence_end(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_sentence_start(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_forward_sentence_ends(iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_sentence_starts(iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+{ cursor positions are almost equivalent to chars, but not quite;
+ in some languages, you can't put the cursor between certain
+ chars. Also, you can't put the cursor between \r\n at the theEnd
+ of a line.
+ }
+function gtk_text_iter_forward_cursor_position(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_cursor_position(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_forward_cursor_positions(iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_cursor_positions(iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+procedure gtk_text_iter_set_offset(iter:PGtkTextIter; char_offset:gint); cdecl; external gtklib;
+procedure gtk_text_iter_set_line(iter:PGtkTextIter; line_number:gint); cdecl; external gtklib;
+procedure gtk_text_iter_set_line_offset(iter:PGtkTextIter; char_on_line:gint); cdecl; external gtklib;
+procedure gtk_text_iter_set_line_index(iter:PGtkTextIter; byte_on_line:gint); cdecl; external gtklib;
+procedure gtk_text_iter_forward_to_end(iter:PGtkTextIter); cdecl; external gtklib;
+function gtk_text_iter_forward_to_line_end(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+procedure gtk_text_iter_set_visible_line_offset(iter:PGtkTextIter; char_on_line:gint); cdecl; external gtklib;
+procedure gtk_text_iter_set_visible_line_index(iter:PGtkTextIter; byte_on_line:gint); cdecl; external gtklib;
+{ returns TRUE if a toggle was found; NULL for the tag pointer
+ means "any tag toggle", otherwise the next toggle of the
+ specified tag is located.
+ }
+function gtk_text_iter_forward_to_tag_toggle(iter:PGtkTextIter; tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_to_tag_toggle(iter:PGtkTextIter; tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+function gtk_text_iter_forward_find_char(iter:PGtkTextIter; pred:TGtkTextCharPredicate; user_data:gpointer; limit:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_find_char(iter:PGtkTextIter; pred:TGtkTextCharPredicate; user_data:gpointer; limit:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_forward_search(iter:PGtkTextIter; str:Pgchar; flags:TGtkTextSearchFlags; match_start:PGtkTextIter; match_end:PGtkTextIter;
+ limit:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_backward_search(iter:PGtkTextIter; str:Pgchar; flags:TGtkTextSearchFlags; match_start:PGtkTextIter; match_end:PGtkTextIter;
+ limit:PGtkTextIter):gboolean; cdecl; external gtklib;
+{
+ Comparisons
+ }
+function gtk_text_iter_equal(lhs:PGtkTextIter; rhs:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_iter_compare(lhs:PGtkTextIter; rhs:PGtkTextIter):gint; cdecl; external gtklib;
+function gtk_text_iter_in_range(iter:PGtkTextIter; start:PGtkTextIter; theEnd:PGtkTextIter):gboolean; cdecl; external gtklib;
+{ Put these two in ascending order }
+procedure gtk_text_iter_order(first:PGtkTextIter; second:PGtkTextIter); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TEXT_ITER : GType;
+begin
+ GTK_TYPE_TEXT_ITER:=gtk_text_iter_get_type;
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextiterprivate.inc b/packages/gtk2/src/gtk+/gtk/gtktextiterprivate.inc
new file mode 100644
index 0000000000..989a341ee2
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextiterprivate.inc
@@ -0,0 +1,40 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{$ifndef GTK_TEXT_ITER_PRIVATE_H}
+{$define GTK_TEXT_ITER_PRIVATE_H}
+{$include gtktextiter.inc}
+{ C++ extern C conditionnal removed }
+{ __cplusplus }
+{$include gtktextiter.inc}
+{$include gtktextbtree.inc}
+
+
+function _gtk_text_iter_get_indexable_segment(iter:PGtkTextIter):PGtkTextLineSegment; cdecl; external gtklib;
+
+function _gtk_text_iter_get_any_segment(iter:PGtkTextIter):PGtkTextLineSegment; cdecl; external gtklib;
+
+function _gtk_text_iter_get_text_line(iter:PGtkTextIter):PGtkTextLine; cdecl; external gtklib;
+
+function _gtk_text_iter_get_btree(iter:PGtkTextIter):PGtkTextBTree; cdecl; external gtklib;
+function _gtk_text_iter_forward_indexable_segment(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function _gtk_text_iter_backward_indexable_segment(iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+
+function _gtk_text_iter_get_segment_byte(iter:PGtkTextIter):gint; cdecl; external gtklib;
+
+function _gtk_text_iter_get_segment_char(iter:PGtkTextIter):gint; cdecl; external gtklib;
+{ debug }
+
+procedure _gtk_text_iter_check(iter:PGtkTextIter); cdecl; external gtklib;
+{ C++ end of extern C conditionnal removed }
+{ __cplusplus }
+{$endif}
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextlayout.inc b/packages/gtk2/src/gtk+/gtk/gtktextlayout.inc
new file mode 100644
index 0000000000..fce51ef227
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextlayout.inc
@@ -0,0 +1,318 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkTextLineDisplay = ^TGtkTextLineDisplay;
+
+
+{ This is a "semi-private" header; it is intended for
+ use by the text widget, and the text canvas item,
+ but that's all. We may have to install it so the
+ canvas item can use it, but users are not supposed
+ to use it.
+ }
+{ forward declarations that have to be here to avoid including
+ gtktextbtree.h
+ }
+{ width of the display area on-screen,
+ i.e. pixels we should wrap to fit inside. }
+{ width/height of the total logical area being layed out }
+{ Pixel offsets from the left and from the top to be used when we
+ draw; these allow us to create left/top margins. We don't need
+ anything special for bottom/right margins, because those don't
+ affect drawing.
+ }
+{ gint left_edge; }
+{ gint top_edge; }
+{ Default style used if no tags override it }
+{ Pango contexts used for creating layouts }
+{ A cache of one style; this is used to ensure
+ we don't constantly regenerate the style
+ over long runs with the same style. }
+{ A cache of one line display. Getting the same line
+ many times in a row is the most common case.
+ }
+{ Whether we are allowed to wrap right now }
+{ Whether to show the insertion cursor }
+{ For what GtkTextDirection to draw cursor GTK_TEXT_DIR_NONE -
+ means draw both cursors.
+ }
+{ The preedit string and attributes, if any }
+ PGtkTextLayout = ^TGtkTextLayout;
+ TGtkTextLayout = record
+ parent_instance : TGObject;
+ screen_width : gint;
+ width : gint;
+ height : gint;
+ buffer : PGtkTextBuffer;
+ default_style : PGtkTextAttributes;
+ ltr_context : PPangoContext;
+ rtl_context : PPangoContext;
+ one_style_cache : PGtkTextAttributes;
+ one_display_cache : PGtkTextLineDisplay;
+ wrap_loop_count : gint;
+ flag0 : word;
+ preedit_string : Pgchar;
+ preedit_attrs : PPangoAttrList;
+ preedit_len : gint;
+ preedit_cursor : gint;
+ end;
+
+
+{ Some portion of the layout was invalidated
+ }
+{ A range of the layout changed appearance and possibly height
+ }
+{ may be NULL }
+
+
+{ Padding for future expansion }
+ PGtkTextLayoutClass = ^TGtkTextLayoutClass;
+ TGtkTextLayoutClass = record
+ parent_class : TGObjectClass;
+ invalidated : procedure (layout:PGtkTextLayout); cdecl;
+ changed : procedure (layout:PGtkTextLayout; y:gint; old_height:gint; new_height:gint); cdecl;
+ wrap : function (layout:PGtkTextLayout; line:PGtkTextLine; line_data:PGtkTextLineData):PGtkTextLineData; cdecl;
+ get_log_attrs : procedure (layout:PGtkTextLayout; line:PGtkTextLine; var attrs:PPangoLogAttr; n_attrs:Pgint); cdecl;
+ invalidate : procedure (layout:PGtkTextLayout; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl;
+ free_line_data : procedure (layout:PGtkTextLayout; line:PGtkTextLine; line_data:PGtkTextLineData); cdecl;
+ allocate_child : procedure (layout:PGtkTextLayout; child:PGtkWidget; x:gint; y:gint); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+ PGtkTextAttrAppearance = ^TGtkTextAttrAppearance;
+ TGtkTextAttrAppearance = record
+ attr : TPangoAttribute;
+ appearance : TGtkTextAppearance;
+ end;
+
+ PGtkTextCursorDisplay = ^TGtkTextCursorDisplay;
+ TGtkTextCursorDisplay = record
+ x : gint;
+ y : gint;
+ height : gint;
+ flag0 : word;
+ end;
+
+
+{ Width of layout }
+{ width - margins, if no width set on layout, if width set on layout, -1 }
+{ Amount layout is shifted from left edge - this is the left margin
+ plus any other factors, such as alignment or indentation.
+ }
+{ Byte index of insert cursor within para or -1 }
+ TGtkTextLineDisplay = record
+ layout : PPangoLayout;
+ cursors : PGSList;
+ shaped_objects : PGSList;
+ direction : TGtkTextDirection;
+ width : gint;
+ total_width : gint;
+ height : gint;
+ x_offset : gint;
+ left_margin : gint;
+ right_margin : gint;
+ top_margin : gint;
+ bottom_margin : gint;
+ insert_index : gint;
+ size_only : gboolean;
+ line : PGtkTextLine;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+{$IFNDEF KYLIX}
+var
+ {$IFDEF WIN32}
+ gtk_text_attr_appearance_type : TPangoAttrType; external gtklib name 'gtk_text_attr_appearance_type';
+ {$ELSE}
+ gtk_text_attr_appearance_type : TPangoAttrType;cvar; external;
+ {$ENDIF}
+{$ENDIF}
+
+
+function GTK_TYPE_TEXT_LAYOUT : GType;
+function GTK_TEXT_LAYOUT(obj: pointer) : PGtkTextLayout;
+function GTK_TEXT_LAYOUT_CLASS(klass: pointer) : PGtkTextLayoutClass;
+function GTK_IS_TEXT_LAYOUT(obj: pointer) : boolean;
+function GTK_IS_TEXT_LAYOUT_CLASS(klass: pointer) : boolean;
+function GTK_TEXT_LAYOUT_GET_CLASS(obj: pointer) : PGtkTextLayoutClass;
+
+
+const
+ bm_TGtkTextLayout_cursor_visible = $1;
+ bp_TGtkTextLayout_cursor_visible = 0;
+ bm_TGtkTextLayout_cursor_direction = $6;
+ bp_TGtkTextLayout_cursor_direction = 1;
+
+function cursor_visible(var a : TGtkTextLayout) : guint; overload;
+procedure set_cursor_visible(var a : TGtkTextLayout; __cursor_visible : guint); overload;
+function cursor_direction(var a : TGtkTextLayout) : gint;
+procedure set_cursor_direction(var a : TGtkTextLayout; __cursor_direction : gint);
+
+const
+ bm_TGtkTextCursorDisplay_is_strong = $1;
+ bp_TGtkTextCursorDisplay_is_strong = 0;
+ bm_TGtkTextCursorDisplay_is_weak = $2;
+ bp_TGtkTextCursorDisplay_is_weak = 1;
+
+function is_strong(var a : TGtkTextCursorDisplay) : guint;
+procedure set_is_strong(var a : TGtkTextCursorDisplay; __is_strong : guint);
+function is_weak(var a : TGtkTextCursorDisplay) : guint;
+procedure set_is_weak(var a : TGtkTextCursorDisplay; __is_weak : guint);
+
+function gtk_text_layout_get_type:GType; cdecl; external gtklib;
+function gtk_text_layout_new:PGtkTextLayout; cdecl; external gtklib;
+procedure gtk_text_layout_set_buffer(layout:PGtkTextLayout; buffer:PGtkTextBuffer); cdecl; external gtklib;
+function gtk_text_layout_get_buffer(layout:PGtkTextLayout):PGtkTextBuffer; cdecl; external gtklib;
+procedure gtk_text_layout_set_default_style(layout:PGtkTextLayout; values:PGtkTextAttributes); cdecl; external gtklib;
+procedure gtk_text_layout_set_contexts(layout:PGtkTextLayout; ltr_context:PPangoContext; rtl_context:PPangoContext); cdecl; external gtklib;
+procedure gtk_text_layout_set_cursor_direction(layout:PGtkTextLayout; direction:TGtkTextDirection); cdecl; external gtklib;
+procedure gtk_text_layout_default_style_changed(layout:PGtkTextLayout); cdecl; external gtklib;
+procedure gtk_text_layout_set_screen_width(layout:PGtkTextLayout; width:gint); cdecl; external gtklib;
+
+procedure gtk_text_layout_set_preedit_string(layout:PGtkTextLayout; preedit_string:Pgchar; preedit_attrs:PPangoAttrList; cursor_pos:gint); cdecl; external gtklib;
+procedure gtk_text_layout_set_cursor_visible(layout:PGtkTextLayout; cursor_visible:gboolean); cdecl; external gtklib;
+function gtk_text_layout_get_cursor_visible(layout:PGtkTextLayout):gboolean; cdecl; external gtklib;
+{ Getting the size or the lines potentially results in a call to
+ recompute, which is pretty massively expensive. Thus it should
+ basically only be done in an idle handler.
+
+ Long-term, we would really like to be able to do these without
+ a full recompute so they may get cheaper over time.
+ }
+procedure gtk_text_layout_get_size(layout:PGtkTextLayout; width:Pgint; height:Pgint); cdecl; external gtklib;
+{ [top_y, bottom_y) }
+function gtk_text_layout_get_lines(layout:PGtkTextLayout; top_y:gint; bottom_y:gint; first_line_y:Pgint):PGSList; cdecl; external gtklib;
+procedure gtk_text_layout_wrap_loop_start(layout:PGtkTextLayout); cdecl; external gtklib;
+procedure gtk_text_layout_wrap_loop_end(layout:PGtkTextLayout); cdecl; external gtklib;
+function gtk_text_layout_get_line_display(layout:PGtkTextLayout; line:PGtkTextLine; size_only:gboolean):PGtkTextLineDisplay; cdecl; external gtklib;
+procedure gtk_text_layout_free_line_display(layout:PGtkTextLayout; display:PGtkTextLineDisplay); cdecl; external gtklib;
+procedure gtk_text_layout_get_line_at_y(layout:PGtkTextLayout; target_iter:PGtkTextIter; y:gint; line_top:Pgint); cdecl; external gtklib;
+procedure gtk_text_layout_get_iter_at_pixel(layout:PGtkTextLayout; iter:PGtkTextIter; x:gint; y:gint); cdecl; external gtklib;
+
+
+procedure gtk_text_layout_invalidate(layout:PGtkTextLayout; start:PGtkTextIter; theEnd:PGtkTextIter); cdecl; external gtklib;
+procedure gtk_text_layout_free_line_data(layout:PGtkTextLayout; line:PGtkTextLine; line_data:PGtkTextLineData); cdecl; external gtklib;
+function gtk_text_layout_is_valid(layout:PGtkTextLayout):gboolean; cdecl; external gtklib;
+procedure gtk_text_layout_validate_yrange(layout:PGtkTextLayout; anchor_line:PGtkTextIter; y0:gint; y1:gint); cdecl; external gtklib;
+procedure gtk_text_layout_validate(layout:PGtkTextLayout; max_pixels:gint); cdecl; external gtklib;
+{ This function should return the passed-in line data,
+ OR remove the existing line data from the line, and
+ return a NEW line data after adding it to the line.
+ That is, invariant after calling the callback is that
+ there should be exactly one line data for this view
+ stored on the btree line.
+ }
+function gtk_text_layout_wrap(layout:PGtkTextLayout; line:PGtkTextLine; line_data:PGtkTextLineData):PGtkTextLineData; cdecl; external gtklib;
+{ may be NULL }
+procedure gtk_text_layout_changed(layout:PGtkTextLayout; y:gint; old_height:gint; new_height:gint); cdecl; external gtklib;
+procedure gtk_text_layout_get_iter_location(layout:PGtkTextLayout; iter:PGtkTextIter; rect:PGdkRectangle); cdecl; external gtklib;
+procedure gtk_text_layout_get_line_yrange(layout:PGtkTextLayout; iter:PGtkTextIter; y:Pgint; height:Pgint); cdecl; external gtklib;
+procedure _gtk_text_layout_get_line_xrange(layout:PGtkTextLayout; iter:PGtkTextIter; x:Pgint; width:Pgint); cdecl; external gtklib;
+procedure gtk_text_layout_get_cursor_locations(layout:PGtkTextLayout; iter:PGtkTextIter; strong_pos:PGdkRectangle; weak_pos:PGdkRectangle); cdecl; external gtklib;
+function gtk_text_layout_clamp_iter_to_vrange(layout:PGtkTextLayout; iter:PGtkTextIter; top:gint; bottom:gint):gboolean; cdecl; external gtklib;
+function gtk_text_layout_move_iter_to_line_end(layout:PGtkTextLayout; iter:PGtkTextIter; direction:gint):gboolean; cdecl; external gtklib;
+function gtk_text_layout_move_iter_to_previous_line(layout:PGtkTextLayout; iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_layout_move_iter_to_next_line(layout:PGtkTextLayout; iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+procedure gtk_text_layout_move_iter_to_x(layout:PGtkTextLayout; iter:PGtkTextIter; x:gint); cdecl; external gtklib;
+function gtk_text_layout_move_iter_visually(layout:PGtkTextLayout; iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+function gtk_text_layout_iter_starts_line(layout:PGtkTextLayout; iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+procedure gtk_text_layout_get_iter_at_line(layout:PGtkTextLayout; iter:PGtkTextIter; line:PGtkTextLine; byte_offset:gint); cdecl; external gtklib;
+{ Don't use these. Use gtk_text_view_add_child_at_anchor().
+ These functions are defined in gtktextchild.c, but here
+ since they are semi-public and require GtkTextLayout to
+ be declared.
+ }
+procedure gtk_text_child_anchor_register_child(anchor:PGtkTextChildAnchor; child:PGtkWidget; layout:PGtkTextLayout); cdecl; external gtklib;
+procedure gtk_text_child_anchor_unregister_child(anchor:PGtkTextChildAnchor; child:PGtkWidget); cdecl; external gtklib;
+procedure gtk_text_child_anchor_queue_resize(anchor:PGtkTextChildAnchor; layout:PGtkTextLayout); cdecl; external gtklib;
+procedure gtk_text_anchored_child_set_layout(child:PGtkWidget; layout:PGtkTextLayout); cdecl; external gtklib;
+procedure gtk_text_layout_spew(layout:PGtkTextLayout); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TEXT_LAYOUT : GType;
+begin
+ GTK_TYPE_TEXT_LAYOUT:=gtk_text_layout_get_type;
+end;
+
+function GTK_TEXT_LAYOUT(obj: pointer) : PGtkTextLayout;
+begin
+ GTK_TEXT_LAYOUT:=PGtkTextLayout(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TEXT_LAYOUT));
+end;
+
+function GTK_TEXT_LAYOUT_CLASS(klass: pointer) : PGtkTextLayoutClass;
+begin
+ GTK_TEXT_LAYOUT_CLASS:=PGtkTextLayoutClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_TEXT_LAYOUT));
+end;
+
+function GTK_IS_TEXT_LAYOUT(obj: pointer) : boolean;
+begin
+ GTK_IS_TEXT_LAYOUT:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TEXT_LAYOUT);
+end;
+
+function GTK_IS_TEXT_LAYOUT_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TEXT_LAYOUT_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_TEXT_LAYOUT);
+end;
+
+function GTK_TEXT_LAYOUT_GET_CLASS(obj: pointer) : PGtkTextLayoutClass;
+begin
+ GTK_TEXT_LAYOUT_GET_CLASS:=PGtkTextLayoutClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_TEXT_LAYOUT));
+end;
+
+function cursor_visible(var a : TGtkTextLayout) : guint;
+begin
+ cursor_visible:=(a.flag0 and bm_TGtkTextLayout_cursor_visible) shr bp_TGtkTextLayout_cursor_visible;
+end;
+
+procedure set_cursor_visible(var a : TGtkTextLayout; __cursor_visible : guint);
+begin
+ a.flag0:=a.flag0 or ((__cursor_visible shl bp_TGtkTextLayout_cursor_visible) and bm_TGtkTextLayout_cursor_visible);
+end;
+
+function cursor_direction(var a : TGtkTextLayout) : gint;
+begin
+ cursor_direction:=(a.flag0 and bm_TGtkTextLayout_cursor_direction) shr bp_TGtkTextLayout_cursor_direction;
+end;
+
+procedure set_cursor_direction(var a : TGtkTextLayout; __cursor_direction : gint);
+begin
+ a.flag0:=a.flag0 or ((__cursor_direction shl bp_TGtkTextLayout_cursor_direction) and bm_TGtkTextLayout_cursor_direction);
+end;
+
+function is_strong(var a : TGtkTextCursorDisplay) : guint;
+begin
+ is_strong:=(a.flag0 and bm_TGtkTextCursorDisplay_is_strong) shr bp_TGtkTextCursorDisplay_is_strong;
+end;
+
+procedure set_is_strong(var a : TGtkTextCursorDisplay; __is_strong : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_strong shl bp_TGtkTextCursorDisplay_is_strong) and bm_TGtkTextCursorDisplay_is_strong);
+end;
+
+function is_weak(var a : TGtkTextCursorDisplay) : guint;
+begin
+ is_weak:=(a.flag0 and bm_TGtkTextCursorDisplay_is_weak) shr bp_TGtkTextCursorDisplay_is_weak;
+end;
+
+procedure set_is_weak(var a : TGtkTextCursorDisplay; __is_weak : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_weak shl bp_TGtkTextCursorDisplay_is_weak) and bm_TGtkTextCursorDisplay_is_weak);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextmark.inc b/packages/gtk2/src/gtk+/gtk/gtktextmark.inc
new file mode 100644
index 0000000000..f2d83ff702
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextmark.inc
@@ -0,0 +1,81 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ The GtkTextMark data type }
+ PGtkTextMark = ^TGtkTextMark;
+ TGtkTextMark = record
+ parent_instance : TGObject;
+ segment : gpointer;
+ end;
+
+{ Padding for future expansion }
+ PGtkTextMarkClass = ^TGtkTextMarkClass;
+ TGtkTextMarkClass = record
+ parent_class : TGObjectClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_TEXT_MARK : GType;
+function GTK_TEXT_MARK(anObject: pointer) : PGtkTextMark;
+function GTK_TEXT_MARK_CLASS(klass: pointer) : PGtkTextMarkClass;
+function GTK_IS_TEXT_MARK(anObject: pointer) : boolean;
+function GTK_IS_TEXT_MARK_CLASS(klass: pointer) : boolean;
+function GTK_TEXT_MARK_GET_CLASS(obj: pointer) : PGtkTextMarkClass;
+
+function gtk_text_mark_get_type:GType; cdecl; external gtklib;
+procedure gtk_text_mark_set_visible(mark:PGtkTextMark; setting:gboolean); cdecl; external gtklib;
+function gtk_text_mark_get_visible(mark:PGtkTextMark):gboolean; cdecl; external gtklib;
+function gtk_text_mark_get_name(mark:PGtkTextMark):Pgchar; cdecl; external gtklib;
+function gtk_text_mark_get_deleted(mark:PGtkTextMark):gboolean; cdecl; external gtklib;
+function gtk_text_mark_get_buffer(mark:PGtkTextMark):PGtkTextBuffer; cdecl; external gtklib;
+function gtk_text_mark_get_left_gravity(mark:PGtkTextMark):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TEXT_MARK : GType;
+begin
+ GTK_TYPE_TEXT_MARK:=gtk_text_mark_get_type;
+end;
+
+function GTK_TEXT_MARK(anObject: pointer) : PGtkTextMark;
+begin
+ GTK_TEXT_MARK:=PGtkTextMark(G_TYPE_CHECK_INSTANCE_CAST(anObject,GTK_TYPE_TEXT_MARK));
+end;
+
+function GTK_TEXT_MARK_CLASS(klass: pointer) : PGtkTextMarkClass;
+begin
+ GTK_TEXT_MARK_CLASS:=PGtkTextMarkClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_TEXT_MARK));
+end;
+
+function GTK_IS_TEXT_MARK(anObject: pointer) : boolean;
+begin
+ GTK_IS_TEXT_MARK:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GTK_TYPE_TEXT_MARK);
+end;
+
+function GTK_IS_TEXT_MARK_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TEXT_MARK_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_TEXT_MARK);
+end;
+
+function GTK_TEXT_MARK_GET_CLASS(obj: pointer) : PGtkTextMarkClass;
+begin
+ GTK_TEXT_MARK_GET_CLASS:=PGtkTextMarkClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_TEXT_MARK));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextmarkprivate.inc b/packages/gtk2/src/gtk+/gtk/gtktextmarkprivate.inc
new file mode 100644
index 0000000000..c113392e3d
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextmarkprivate.inc
@@ -0,0 +1,66 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{
+ The data structure below defines line segments that represent
+ marks. There is one of these for each mark in the text.
+ }
+ PGtkTextMarkBody = ^TGtkTextMarkBody;
+ TGtkTextMarkBody = record
+ obj : PGtkTextMark;
+ name : Pgchar;
+ tree : PGtkTextBTree;
+ line : PGtkTextLine;
+ flag0 : word;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkTextMarkBody_visible = $1;
+ bp_TGtkTextMarkBody_visible = 0;
+ bm_TGtkTextMarkBody_not_deleteable = $2;
+ bp_TGtkTextMarkBody_not_deleteable = 1;
+
+function visible(var a : TGtkTextMarkBody) : guint; overload;
+procedure set_visible(var a : TGtkTextMarkBody; __visible : guint); overload;
+function not_deleteable(var a : TGtkTextMarkBody) : guint;
+procedure set_not_deleteable(var a : TGtkTextMarkBody; __not_deleteable : guint);
+
+
+function _gtk_mark_segment_new(tree:PGtkTextBTree; left_gravity:gboolean; name:Pgchar):PGtkTextLineSegment; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function visible(var a : TGtkTextMarkBody) : guint;
+begin
+ visible:=(a.flag0 and bm_TGtkTextMarkBody_visible) shr bp_TGtkTextMarkBody_visible;
+end;
+
+procedure set_visible(var a : TGtkTextMarkBody; __visible : guint);
+begin
+ a.flag0:=a.flag0 or ((__visible shl bp_TGtkTextMarkBody_visible) and bm_TGtkTextMarkBody_visible);
+end;
+
+function not_deleteable(var a : TGtkTextMarkBody) : guint;
+begin
+ not_deleteable:=(a.flag0 and bm_TGtkTextMarkBody_not_deleteable) shr bp_TGtkTextMarkBody_not_deleteable;
+end;
+
+procedure set_not_deleteable(var a : TGtkTextMarkBody; __not_deleteable : guint);
+begin
+ a.flag0:=a.flag0 or ((__not_deleteable shl bp_TGtkTextMarkBody_not_deleteable) and bm_TGtkTextMarkBody_not_deleteable);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextsegment.inc b/packages/gtk2/src/gtk+/gtk/gtktextsegment.inc
new file mode 100644
index 0000000000..b16f9fdb43
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextsegment.inc
@@ -0,0 +1,149 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkTextLineSegment = ^TGtkTextLineSegment;
+ PGtkTextLineSegmentClass = ^TGtkTextLineSegmentClass;
+
+{
+ Segments: each line is divided into one or more segments, where each
+ segment is one of several things, such as a group of characters, a
+ tag toggle, a mark, or an embedded widget. Each segment starts with
+ a standard header followed by a body that varies from type to type.
+ }
+{ This header has the segment type, and two specific segments
+ (character and toggle segments) }
+{ Information a BTree stores about a tag. }
+{ highest-level node containing the tag }
+{ total toggles of this tag below tag_root }
+ PGtkTextTagInfo = ^TGtkTextTagInfo;
+ TGtkTextTagInfo = record
+ tag : PGtkTextTag;
+ tag_root : PGtkTextBTreeNode;
+ toggle_count : gint;
+ end;
+
+{ Body of a segment that toggles a tag on or off }
+{ Tag that starts or ends here. }
+{ TRUE means this toggle has been
+ accounted for in node toggle
+ counts; FALSE means it hasn't, yet. }
+ PGtkTextToggleBody = ^TGtkTextToggleBody;
+ TGtkTextToggleBody = record
+ info : PGtkTextTagInfo;
+ inNodeCounts : gboolean;
+ end;
+
+{
+ The data structure below defines line segments.
+ }
+{ Pointer to record describing
+ segment's type. }
+{ Next in list of segments for this
+ line, or NULL for theEnd of list. }
+{ # of chars of index space occupied }
+{ Size of this segment (# of bytes
+ of index space it occupies). }
+{ Characters that make up character
+ info. Actual length varies to
+ hold as many characters as needed. }
+{ Information about tag toggle. }
+{ Information about mark. }
+{ Child pixbuf }
+{ Child widget }
+ TGtkTextLineSegment = record
+ _type : PGtkTextLineSegmentClass;
+ next : PGtkTextLineSegment;
+ char_count : longint;
+ byte_count : longint;
+ body : record
+ case longint of
+ 0 : ( chars : array[0..3] of char );
+ 1 : ( toggle : TGtkTextToggleBody );
+ 2 : ( mark : TGtkTextMarkBody );
+ 3 : ( pixbuf : TGtkTextPixbuf );
+ 4 : ( child : TGtkTextChildBody );
+ end;
+ end;
+
+
+{ Class struct for segments }
+{ Split seg at index, returning list of two new segments, and freeing seg }
+
+ PGtkTextSegSplitFunc = ^TGtkTextSegSplitFunc;
+ TGtkTextSegSplitFunc = TGtkTextLineSegment;
+{ Delete seg which is contained in line; if tree_gone, the tree is being
+ freed in its entirety, which may matter for some reason (?)
+ Return TRUE if the segment is not deleteable, e.g. a mark.
+ }
+
+ TGtkTextSegDeleteFunc = function (seg:PGtkTextLineSegment; line:PGtkTextLine; tree_gone:gboolean):gboolean; cdecl;
+{ Called after segment structure of line changes, so segments can
+ cleanup (e.g. merge with adjacent segments). Returns a segment list
+ to replace the original segment list with. The line argument is
+ the current line.
+ }
+
+ PGtkTextSegCleanupFunc = ^TGtkTextSegCleanupFunc;
+ TGtkTextSegCleanupFunc = TGtkTextLineSegment;
+{ Called when a segment moves from one line to another. CleanupFunc is also
+ called in that case, so many segments just use CleanupFunc, I'm not sure
+ what's up with that (this function may not be needed...)
+ }
+
+ TGtkTextSegLineChangeFunc = procedure (seg:PGtkTextLineSegment; line:PGtkTextLine); cdecl;
+{ Called to do debug checks on the segment. }
+
+ TGtkTextSegCheckFunc = procedure (seg:PGtkTextLineSegment; line:PGtkTextLine); cdecl;
+{ Name of this kind of segment. }
+{ If a segment has zero size (e.g. a
+ mark or tag toggle), does it
+ attach to character to its left
+ or right? 1 means left, 0 means
+ right. }
+{ Procedure to split large segment
+ into two smaller ones. }
+{ Procedure to call to delete
+ segment. }
+{ After any change to a line, this
+ procedure is invoked for all
+ segments left in the line to
+ perform any cleanup they wish
+ (e.g. joining neighboring
+ segments). }
+{ Invoked when a segment is about
+ to be moved from its current line
+ to an earlier line because of
+ a deletion. The line is that
+ for the segment's old line.
+ CleanupFunc will be invoked after
+ the deletion is finished. }
+{ Called during consistency checks
+ to check internal consistency of
+ segment. }
+ TGtkTextLineSegmentClass = record
+ name : Pchar;
+ leftGravity : gboolean;
+ splitFunc : TGtkTextSegSplitFunc;
+ deleteFunc : TGtkTextSegDeleteFunc;
+ cleanupFunc : TGtkTextSegCleanupFunc;
+ lineChangeFunc : TGtkTextSegLineChangeFunc;
+ checkFunc : TGtkTextSegCheckFunc;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function gtk_text_line_segment_split(iter:PGtkTextIter):PGtkTextLineSegment; cdecl; external gtklib;
+function _gtk_char_segment_new(text:Pgchar; len:guint):PGtkTextLineSegment; cdecl; external gtklib;
+
+function _gtk_char_segment_new_from_two_strings(text1:Pgchar; len1:guint; text2:Pgchar; len2:guint):PGtkTextLineSegment; cdecl; external gtklib;
+function _gtk_toggle_segment_new(info:PGtkTextTagInfo; StateOn:gboolean):PGtkTextLineSegment; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktexttag.inc b/packages/gtk2/src/gtk+/gtk/gtktexttag.inc
new file mode 100644
index 0000000000..c7629556d9
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktexttag.inc
@@ -0,0 +1,770 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkTextTagClass = ^TGtkTextTagClass;
+ PGtkTextAttributes = ^TGtkTextAttributes;
+
+{ Name of this tag. This field is actually
+ a pointer to the key from the entry in
+ tkxt->tagTable, so it needn't be freed
+ explicitly. }
+{ Priority of this tag within widget. 0
+ means lowest priority. Exactly one tag
+ has each integer value between 0 and
+ numTags-1. }
+{
+ Information for displaying text with this tag. The information
+ belows acts as an override on information specified by lower-priority
+ tags. If no value is specified, then the next-lower-priority tag
+ on the text determins the value. The text widget itself provides
+ defaults if no tag specifies an override.
+ }
+{ Flags for whether a given value is set; if a value is unset, then
+ this tag does not affect it.
+ }
+ PGtkTextTag = ^TGtkTextTag;
+ PPGtkTextTag = ^PGtkTextTag;
+ TGtkTextTag = record
+ parent_instance : TGObject;
+ table : PGtkTextTagTable;
+ name : Pchar;
+ priority : longint;
+ values : PGtkTextAttributes;
+ flag0 : longint;
+ end;
+
+
+{ widget, canvas item, whatever }
+{ the event itself }
+
+{ location of event in buffer }
+{ Padding for future expansion }
+ TGtkTextTagClass = record
+ parent_class : TGObjectClass;
+ event : function (tag:PGtkTextTag; event_object:PGObject; event:PGdkEvent; iter:PGtkTextIter):gboolean; cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{
+ Style anObject created by folding a set of tags together
+ }
+{ super/subscript rise, can be negative }
+{ I'm not sure this can really be used without breaking some things
+ an app might do :-/
+ }
+{ PangoUnderline }
+{ Whether to use background-related values; this is irrelevant for
+ the values struct when in a tag, but is used for the composite
+ values struct; it's true if any of the tags being composited
+ had background stuff set.
+ }
+{ These are only used when we are actually laying out and rendering
+ a paragraph; not when a GtkTextAppearance is part of a
+ GtkTextAttributes.
+ }
+ PGtkTextAppearance = ^TGtkTextAppearance;
+ TGtkTextAppearance = record
+ bg_color : TGdkColor;
+ fg_color : TGdkColor;
+ bg_stipple : PGdkBitmap;
+ fg_stipple : PGdkBitmap;
+ rise : gint;
+ padding1 : gpointer;
+ flag0 : word;
+ end;
+
+{ Individual chunks of this can be set/unset as a group }
+{ How to handle wrap-around for this tag.
+ Must be GTK_WRAPMODE_CHAR,
+ GTK_WRAPMODE_NONE, GTK_WRAPMODE_WORD
+ }
+{ I'm not sure this can really be used without breaking some things
+ an app might do :-/
+ }
+{ hide the text }
+{ Background is fit to full line height rather than
+ baseline +/- ascent/descent (font height)
+ }
+{ can edit this text }
+{ colors are allocated etc. }
+ TGtkTextAttributes = record
+ refcount : guint;
+ appearance : TGtkTextAppearance;
+ justification : TGtkJustification;
+ direction : TGtkTextDirection;
+ font : PPangoFontDescription;
+ font_scale : gdouble;
+ left_margin : gint;
+ indent : gint;
+ right_margin : gint;
+ pixels_above_lines : gint;
+ pixels_below_lines : gint;
+ pixels_inside_wrap : gint;
+ tabs : PPangoTabArray;
+ wrap_mode : TGtkWrapMode;
+ language : PPangoLanguage;
+ padding1 : gpointer;
+ flag0 : word;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_TEXT_TAG : GType;
+function GTK_TEXT_TAG(obj: pointer) : PGtkTextTag;
+function GTK_TEXT_TAG_CLASS(klass: pointer) : PGtkTextTagClass;
+function GTK_IS_TEXT_TAG(obj: pointer) : boolean;
+function GTK_IS_TEXT_TAG_CLASS(klass: pointer) : boolean;
+function GTK_TEXT_TAG_GET_CLASS(obj: pointer) : PGtkTextTagClass;
+function GTK_TYPE_TEXT_ATTRIBUTES : GType;
+
+function gtk_text_tag_get_type:GType; cdecl; external gtklib;
+
+function gtk_text_tag_new(name:Pgchar):PGtkTextTag; cdecl; external gtklib;
+function gtk_text_tag_get_priority(tag:PGtkTextTag):gint; cdecl; external gtklib;
+procedure gtk_text_tag_set_priority(tag:PGtkTextTag; priority:gint); cdecl; external gtklib;
+
+function gtk_text_tag_event(tag:PGtkTextTag; event_object:PGObject; event:PGdkEvent; iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+
+function gtk_text_attributes_new:PGtkTextAttributes; cdecl; external gtklib;
+function gtk_text_attributes_copy(src:PGtkTextAttributes):PGtkTextAttributes; cdecl; external gtklib;
+procedure gtk_text_attributes_copy_values(src:PGtkTextAttributes; dest:PGtkTextAttributes); cdecl; external gtklib;
+procedure gtk_text_attributes_unref(values:PGtkTextAttributes); cdecl; external gtklib;
+procedure gtk_text_attributes_ref(values:PGtkTextAttributes); cdecl; external gtklib;
+function gtk_text_attributes_get_type:GType; cdecl; external gtklib;
+
+const
+ bm_TGtkTextTag_bg_color_set = $1;
+ bp_TGtkTextTag_bg_color_set = 0;
+ bm_TGtkTextTag_bg_stipple_set = $2;
+ bp_TGtkTextTag_bg_stipple_set = 1;
+ bm_TGtkTextTag_fg_color_set = $4;
+ bp_TGtkTextTag_fg_color_set = 2;
+ bm_TGtkTextTag_scale_set = $8;
+ bp_TGtkTextTag_scale_set = 3;
+ bm_TGtkTextTag_fg_stipple_set = $10;
+ bp_TGtkTextTag_fg_stipple_set = 4;
+ bm_TGtkTextTag_justification_set = $20;
+ bp_TGtkTextTag_justification_set = 5;
+ bm_TGtkTextTag_left_margin_set = $40;
+ bp_TGtkTextTag_left_margin_set = 6;
+ bm_TGtkTextTag_indent_set = $80;
+ bp_TGtkTextTag_indent_set = 7;
+ bm_TGtkTextTag_rise_set = $100;
+ bp_TGtkTextTag_rise_set = 8;
+ bm_TGtkTextTag_strikethrough_set = $200;
+ bp_TGtkTextTag_strikethrough_set = 9;
+ bm_TGtkTextTag_right_margin_set = $400;
+ bp_TGtkTextTag_right_margin_set = 10;
+ bm_TGtkTextTag_pixels_above_lines_set = $800;
+ bp_TGtkTextTag_pixels_above_lines_set = 11;
+ bm_TGtkTextTag_pixels_below_lines_set = $1000;
+ bp_TGtkTextTag_pixels_below_lines_set = 12;
+ bm_TGtkTextTag_pixels_inside_wrap_set = $2000;
+ bp_TGtkTextTag_pixels_inside_wrap_set = 13;
+ bm_TGtkTextTag_tabs_set = $4000;
+ bp_TGtkTextTag_tabs_set = 14;
+ bm_TGtkTextTag_underline_set = $8000;
+ bp_TGtkTextTag_underline_set = 15;
+ bm_TGtkTextTag_wrap_mode_set = $10000;
+ bp_TGtkTextTag_wrap_mode_set = 16;
+ bm_TGtkTextTag_bg_full_height_set = $20000;
+ bp_TGtkTextTag_bg_full_height_set = 17;
+ bm_TGtkTextTag_invisible_set = $40000;
+ bp_TGtkTextTag_invisible_set = 18;
+ bm_TGtkTextTag_editable_set = $80000;
+ bp_TGtkTextTag_editable_set = 19;
+ bm_TGtkTextTag_language_set = $100000;
+ bp_TGtkTextTag_language_set = 20;
+ bm_TGtkTextTag_pad1 = $200000;
+ bp_TGtkTextTag_pad1 = 21;
+ bm_TGtkTextTag_pad2 = $400000;
+ bp_TGtkTextTag_pad2 = 22;
+ bm_TGtkTextTag_pad3 = $800000;
+ bp_TGtkTextTag_pad3 = 23;
+
+function bg_color_set(var a : TGtkTextTag) : guint;
+procedure set_bg_color_set(var a : TGtkTextTag; __bg_color_set : guint);
+function bg_stipple_set(var a : TGtkTextTag) : guint;
+procedure set_bg_stipple_set(var a : TGtkTextTag; __bg_stipple_set : guint);
+function fg_color_set(var a : TGtkTextTag) : guint;
+procedure set_fg_color_set(var a : TGtkTextTag; __fg_color_set : guint);
+function scale_set(var a : TGtkTextTag) : guint; overload;
+procedure set_scale_set(var a : TGtkTextTag; __scale_set : guint); overload;
+function fg_stipple_set(var a : TGtkTextTag) : guint;
+procedure set_fg_stipple_set(var a : TGtkTextTag; __fg_stipple_set : guint);
+function justification_set(var a : TGtkTextTag) : guint;
+procedure set_justification_set(var a : TGtkTextTag; __justification_set : guint);
+function left_margin_set(var a : TGtkTextTag) : guint;
+procedure set_left_margin_set(var a : TGtkTextTag; __left_margin_set : guint);
+function indent_set(var a : TGtkTextTag) : guint;
+procedure set_indent_set(var a : TGtkTextTag; __indent_set : guint);
+function rise_set(var a : TGtkTextTag) : guint; overload;
+procedure set_rise_set(var a : TGtkTextTag; __rise_set : guint); overload;
+function strikethrough_set(var a : TGtkTextTag) : guint; overload;
+procedure set_strikethrough_set(var a : TGtkTextTag; __strikethrough_set : guint); overload;
+function right_margin_set(var a : TGtkTextTag) : guint;
+procedure set_right_margin_set(var a : TGtkTextTag; __right_margin_set : guint);
+function pixels_above_lines_set(var a : TGtkTextTag) : guint;
+procedure set_pixels_above_lines_set(var a : TGtkTextTag; __pixels_above_lines_set : guint);
+function pixels_below_lines_set(var a : TGtkTextTag) : guint;
+procedure set_pixels_below_lines_set(var a : TGtkTextTag; __pixels_below_lines_set : guint);
+function pixels_inside_wrap_set(var a : TGtkTextTag) : guint;
+procedure set_pixels_inside_wrap_set(var a : TGtkTextTag; __pixels_inside_wrap_set : guint);
+function tabs_set(var a : TGtkTextTag) : guint;
+procedure set_tabs_set(var a : TGtkTextTag; __tabs_set : guint);
+function underline_set(var a : TGtkTextTag) : guint; overload;
+procedure set_underline_set(var a : TGtkTextTag; __underline_set : guint); overload;
+function wrap_mode_set(var a : TGtkTextTag) : guint;
+procedure set_wrap_mode_set(var a : TGtkTextTag; __wrap_mode_set : guint);
+function bg_full_height_set(var a : TGtkTextTag) : guint;
+procedure set_bg_full_height_set(var a : TGtkTextTag; __bg_full_height_set : guint);
+function invisible_set(var a : TGtkTextTag) : guint;
+procedure set_invisible_set(var a : TGtkTextTag; __invisible_set : guint);
+function editable_set(var a : TGtkTextTag) : guint; overload;
+procedure set_editable_set(var a : TGtkTextTag; __editable_set : guint); overload;
+function language_set(var a : TGtkTextTag) : guint;
+procedure set_language_set(var a : TGtkTextTag; __language_set : guint);
+function pad1(var a : TGtkTextTag) : guint; overload;
+procedure set_pad1(var a : TGtkTextTag; __pad1 : guint); overload;
+function pad2(var a : TGtkTextTag) : guint; overload;
+procedure set_pad2(var a : TGtkTextTag; __pad2 : guint); overload;
+function pad3(var a : TGtkTextTag) : guint; overload;
+procedure set_pad3(var a : TGtkTextTag; __pad3 : guint); overload;
+
+const
+ bm_TGtkTextAppearance_underline = $F;
+ bp_TGtkTextAppearance_underline = 0;
+ bm_TGtkTextAppearance_strikethrough = $10;
+ bp_TGtkTextAppearance_strikethrough = 4;
+ bm_TGtkTextAppearance_draw_bg = $20;
+ bp_TGtkTextAppearance_draw_bg = 5;
+ bm_TGtkTextAppearance_inside_selection = $40;
+ bp_TGtkTextAppearance_inside_selection = 6;
+ bm_TGtkTextAppearance_is_text = $80;
+ bp_TGtkTextAppearance_is_text = 7;
+ bm_TGtkTextAppearance_pad1 = $100;
+ bp_TGtkTextAppearance_pad1 = 8;
+ bm_TGtkTextAppearance_pad2 = $200;
+ bp_TGtkTextAppearance_pad2 = 9;
+ bm_TGtkTextAppearance_pad3 = $400;
+ bp_TGtkTextAppearance_pad3 = 10;
+ bm_TGtkTextAppearance_pad4 = $800;
+ bp_TGtkTextAppearance_pad4 = 11;
+
+function underline(var a : TGtkTextAppearance) : guint;
+procedure set_underline(var a : TGtkTextAppearance; __underline : guint);
+function strikethrough(var a : TGtkTextAppearance) : guint; overload;
+procedure set_strikethrough(var a : TGtkTextAppearance; __strikethrough : guint); overload;
+function draw_bg(var a : TGtkTextAppearance) : guint;
+procedure set_draw_bg(var a : TGtkTextAppearance; __draw_bg : guint);
+function inside_selection(var a : TGtkTextAppearance) : guint;
+procedure set_inside_selection(var a : TGtkTextAppearance; __inside_selection : guint);
+function is_text(var a : TGtkTextAppearance) : guint;
+procedure set_is_text(var a : TGtkTextAppearance; __is_text : guint);
+function pad1(var a : TGtkTextAppearance) : guint; overload;
+procedure set_pad1(var a : TGtkTextAppearance; __pad1 : guint); overload;
+function pad2(var a : TGtkTextAppearance) : guint; overload;
+procedure set_pad2(var a : TGtkTextAppearance; __pad2 : guint); overload;
+function pad3(var a : TGtkTextAppearance) : guint; overload;
+procedure set_pad3(var a : TGtkTextAppearance; __pad3 : guint); overload;
+function pad4(var a : TGtkTextAppearance) : guint; overload;
+procedure set_pad4(var a : TGtkTextAppearance; __pad4 : guint); overload;
+
+const
+ bm_TGtkTextAttributes_invisible = $1;
+ bp_TGtkTextAttributes_invisible = 0;
+ bm_TGtkTextAttributes_bg_full_height = $2;
+ bp_TGtkTextAttributes_bg_full_height = 1;
+ bm_TGtkTextAttributes_editable = $4;
+ bp_TGtkTextAttributes_editable = 2;
+ bm_TGtkTextAttributes_realized = $8;
+ bp_TGtkTextAttributes_realized = 3;
+ bm_TGtkTextAttributes_pad1 = $10;
+ bp_TGtkTextAttributes_pad1 = 4;
+ bm_TGtkTextAttributes_pad2 = $20;
+ bp_TGtkTextAttributes_pad2 = 5;
+ bm_TGtkTextAttributes_pad3 = $40;
+ bp_TGtkTextAttributes_pad3 = 6;
+ bm_TGtkTextAttributes_pad4 = $80;
+ bp_TGtkTextAttributes_pad4 = 7;
+
+function invisible(var a : TGtkTextAttributes) : guint;
+procedure set_invisible(var a : TGtkTextAttributes; __invisible : guint);
+function bg_full_height(var a : TGtkTextAttributes) : guint;
+procedure set_bg_full_height(var a : TGtkTextAttributes; __bg_full_height : guint);
+function editable(var a : TGtkTextAttributes) : guint; overload;
+procedure set_editable(var a : TGtkTextAttributes; __editable : guint); overload;
+function realized(var a : TGtkTextAttributes) : guint;
+procedure set_realized(var a : TGtkTextAttributes; __realized : guint);
+function pad1(var a : TGtkTextAttributes) : guint; overload;
+procedure set_pad1(var a : TGtkTextAttributes; __pad1 : guint); overload;
+function pad2(var a : TGtkTextAttributes) : guint; overload;
+procedure set_pad2(var a : TGtkTextAttributes; __pad2 : guint); overload;
+function pad3(var a : TGtkTextAttributes) : guint; overload;
+procedure set_pad3(var a : TGtkTextAttributes; __pad3 : guint); overload;
+function pad4(var a : TGtkTextAttributes) : guint; overload;
+procedure set_pad4(var a : TGtkTextAttributes; __pad4 : guint); overload;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TEXT_TAG : GType;
+begin
+ GTK_TYPE_TEXT_TAG:=gtk_text_tag_get_type;
+end;
+
+function GTK_TEXT_TAG(obj: pointer) : PGtkTextTag;
+begin
+ GTK_TEXT_TAG:=PGtkTextTag(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TEXT_TAG));
+end;
+
+function GTK_TEXT_TAG_CLASS(klass: pointer) : PGtkTextTagClass;
+begin
+ GTK_TEXT_TAG_CLASS:=PGtkTextTagClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_TEXT_TAG));
+end;
+
+function GTK_IS_TEXT_TAG(obj: pointer) : boolean;
+begin
+ GTK_IS_TEXT_TAG:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TEXT_TAG);
+end;
+
+function GTK_IS_TEXT_TAG_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TEXT_TAG_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_TEXT_TAG);
+end;
+
+function GTK_TEXT_TAG_GET_CLASS(obj: pointer) : PGtkTextTagClass;
+begin
+ GTK_TEXT_TAG_GET_CLASS:=PGtkTextTagClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_TEXT_TAG));
+end;
+
+function GTK_TYPE_TEXT_ATTRIBUTES : GType;
+begin
+ GTK_TYPE_TEXT_ATTRIBUTES:=gtk_text_attributes_get_type;
+end;
+
+function bg_color_set(var a : TGtkTextTag) : guint;
+begin
+ bg_color_set:=(a.flag0 and bm_TGtkTextTag_bg_color_set) shr bp_TGtkTextTag_bg_color_set;
+end;
+
+procedure set_bg_color_set(var a : TGtkTextTag; __bg_color_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__bg_color_set shl bp_TGtkTextTag_bg_color_set) and bm_TGtkTextTag_bg_color_set);
+end;
+
+function bg_stipple_set(var a : TGtkTextTag) : guint;
+begin
+ bg_stipple_set:=(a.flag0 and bm_TGtkTextTag_bg_stipple_set) shr bp_TGtkTextTag_bg_stipple_set;
+end;
+
+procedure set_bg_stipple_set(var a : TGtkTextTag; __bg_stipple_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__bg_stipple_set shl bp_TGtkTextTag_bg_stipple_set) and bm_TGtkTextTag_bg_stipple_set);
+end;
+
+function fg_color_set(var a : TGtkTextTag) : guint;
+begin
+ fg_color_set:=(a.flag0 and bm_TGtkTextTag_fg_color_set) shr bp_TGtkTextTag_fg_color_set;
+end;
+
+procedure set_fg_color_set(var a : TGtkTextTag; __fg_color_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__fg_color_set shl bp_TGtkTextTag_fg_color_set) and bm_TGtkTextTag_fg_color_set);
+end;
+
+function scale_set(var a : TGtkTextTag) : guint;
+begin
+ scale_set:=(a.flag0 and bm_TGtkTextTag_scale_set) shr bp_TGtkTextTag_scale_set;
+end;
+
+procedure set_scale_set(var a : TGtkTextTag; __scale_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__scale_set shl bp_TGtkTextTag_scale_set) and bm_TGtkTextTag_scale_set);
+end;
+
+function fg_stipple_set(var a : TGtkTextTag) : guint;
+begin
+ fg_stipple_set:=(a.flag0 and bm_TGtkTextTag_fg_stipple_set) shr bp_TGtkTextTag_fg_stipple_set;
+end;
+
+procedure set_fg_stipple_set(var a : TGtkTextTag; __fg_stipple_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__fg_stipple_set shl bp_TGtkTextTag_fg_stipple_set) and bm_TGtkTextTag_fg_stipple_set);
+end;
+
+function justification_set(var a : TGtkTextTag) : guint;
+begin
+ justification_set:=(a.flag0 and bm_TGtkTextTag_justification_set) shr bp_TGtkTextTag_justification_set;
+end;
+
+procedure set_justification_set(var a : TGtkTextTag; __justification_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__justification_set shl bp_TGtkTextTag_justification_set) and bm_TGtkTextTag_justification_set);
+end;
+
+function left_margin_set(var a : TGtkTextTag) : guint;
+begin
+ left_margin_set:=(a.flag0 and bm_TGtkTextTag_left_margin_set) shr bp_TGtkTextTag_left_margin_set;
+end;
+
+procedure set_left_margin_set(var a : TGtkTextTag; __left_margin_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__left_margin_set shl bp_TGtkTextTag_left_margin_set) and bm_TGtkTextTag_left_margin_set);
+end;
+
+function indent_set(var a : TGtkTextTag) : guint;
+begin
+ indent_set:=(a.flag0 and bm_TGtkTextTag_indent_set) shr bp_TGtkTextTag_indent_set;
+end;
+
+procedure set_indent_set(var a : TGtkTextTag; __indent_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__indent_set shl bp_TGtkTextTag_indent_set) and bm_TGtkTextTag_indent_set);
+end;
+
+function rise_set(var a : TGtkTextTag) : guint;
+begin
+ rise_set:=(a.flag0 and bm_TGtkTextTag_rise_set) shr bp_TGtkTextTag_rise_set;
+end;
+
+procedure set_rise_set(var a : TGtkTextTag; __rise_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__rise_set shl bp_TGtkTextTag_rise_set) and bm_TGtkTextTag_rise_set);
+end;
+
+function strikethrough_set(var a : TGtkTextTag) : guint;
+begin
+ strikethrough_set:=(a.flag0 and bm_TGtkTextTag_strikethrough_set) shr bp_TGtkTextTag_strikethrough_set;
+end;
+
+procedure set_strikethrough_set(var a : TGtkTextTag; __strikethrough_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__strikethrough_set shl bp_TGtkTextTag_strikethrough_set) and bm_TGtkTextTag_strikethrough_set);
+end;
+
+function right_margin_set(var a : TGtkTextTag) : guint;
+begin
+ right_margin_set:=(a.flag0 and bm_TGtkTextTag_right_margin_set) shr bp_TGtkTextTag_right_margin_set;
+end;
+
+procedure set_right_margin_set(var a : TGtkTextTag; __right_margin_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__right_margin_set shl bp_TGtkTextTag_right_margin_set) and bm_TGtkTextTag_right_margin_set);
+end;
+
+function pixels_above_lines_set(var a : TGtkTextTag) : guint;
+begin
+ pixels_above_lines_set:=(a.flag0 and bm_TGtkTextTag_pixels_above_lines_set) shr bp_TGtkTextTag_pixels_above_lines_set;
+end;
+
+procedure set_pixels_above_lines_set(var a : TGtkTextTag; __pixels_above_lines_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__pixels_above_lines_set shl bp_TGtkTextTag_pixels_above_lines_set) and bm_TGtkTextTag_pixels_above_lines_set);
+end;
+
+function pixels_below_lines_set(var a : TGtkTextTag) : guint;
+begin
+ pixels_below_lines_set:=(a.flag0 and bm_TGtkTextTag_pixels_below_lines_set) shr bp_TGtkTextTag_pixels_below_lines_set;
+end;
+
+procedure set_pixels_below_lines_set(var a : TGtkTextTag; __pixels_below_lines_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__pixels_below_lines_set shl bp_TGtkTextTag_pixels_below_lines_set) and bm_TGtkTextTag_pixels_below_lines_set);
+end;
+
+function pixels_inside_wrap_set(var a : TGtkTextTag) : guint;
+begin
+ pixels_inside_wrap_set:=(a.flag0 and bm_TGtkTextTag_pixels_inside_wrap_set) shr bp_TGtkTextTag_pixels_inside_wrap_set;
+end;
+
+procedure set_pixels_inside_wrap_set(var a : TGtkTextTag; __pixels_inside_wrap_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__pixels_inside_wrap_set shl bp_TGtkTextTag_pixels_inside_wrap_set) and bm_TGtkTextTag_pixels_inside_wrap_set);
+end;
+
+function tabs_set(var a : TGtkTextTag) : guint;
+begin
+ tabs_set:=(a.flag0 and bm_TGtkTextTag_tabs_set) shr bp_TGtkTextTag_tabs_set;
+end;
+
+procedure set_tabs_set(var a : TGtkTextTag; __tabs_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__tabs_set shl bp_TGtkTextTag_tabs_set) and bm_TGtkTextTag_tabs_set);
+end;
+
+function underline_set(var a : TGtkTextTag) : guint;
+begin
+ underline_set:=(a.flag0 and bm_TGtkTextTag_underline_set) shr bp_TGtkTextTag_underline_set;
+end;
+
+procedure set_underline_set(var a : TGtkTextTag; __underline_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__underline_set shl bp_TGtkTextTag_underline_set) and bm_TGtkTextTag_underline_set);
+end;
+
+function wrap_mode_set(var a : TGtkTextTag) : guint;
+begin
+ wrap_mode_set:=(a.flag0 and bm_TGtkTextTag_wrap_mode_set) shr bp_TGtkTextTag_wrap_mode_set;
+end;
+
+procedure set_wrap_mode_set(var a : TGtkTextTag; __wrap_mode_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__wrap_mode_set shl bp_TGtkTextTag_wrap_mode_set) and bm_TGtkTextTag_wrap_mode_set);
+end;
+
+function bg_full_height_set(var a : TGtkTextTag) : guint;
+begin
+ bg_full_height_set:=(a.flag0 and bm_TGtkTextTag_bg_full_height_set) shr bp_TGtkTextTag_bg_full_height_set;
+end;
+
+procedure set_bg_full_height_set(var a : TGtkTextTag; __bg_full_height_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__bg_full_height_set shl bp_TGtkTextTag_bg_full_height_set) and bm_TGtkTextTag_bg_full_height_set);
+end;
+
+function invisible_set(var a : TGtkTextTag) : guint;
+begin
+ invisible_set:=(a.flag0 and bm_TGtkTextTag_invisible_set) shr bp_TGtkTextTag_invisible_set;
+end;
+
+procedure set_invisible_set(var a : TGtkTextTag; __invisible_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__invisible_set shl bp_TGtkTextTag_invisible_set) and bm_TGtkTextTag_invisible_set);
+end;
+
+function editable_set(var a : TGtkTextTag) : guint;
+begin
+ editable_set:=(a.flag0 and bm_TGtkTextTag_editable_set) shr bp_TGtkTextTag_editable_set;
+end;
+
+procedure set_editable_set(var a : TGtkTextTag; __editable_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__editable_set shl bp_TGtkTextTag_editable_set) and bm_TGtkTextTag_editable_set);
+end;
+
+function language_set(var a : TGtkTextTag) : guint;
+begin
+ language_set:=(a.flag0 and bm_TGtkTextTag_language_set) shr bp_TGtkTextTag_language_set;
+end;
+
+procedure set_language_set(var a : TGtkTextTag; __language_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__language_set shl bp_TGtkTextTag_language_set) and bm_TGtkTextTag_language_set);
+end;
+
+function pad1(var a : TGtkTextTag) : guint;
+begin
+ pad1:=(a.flag0 and bm_TGtkTextTag_pad1) shr bp_TGtkTextTag_pad1;
+end;
+
+procedure set_pad1(var a : TGtkTextTag; __pad1 : guint);
+begin
+ a.flag0:=a.flag0 or ((__pad1 shl bp_TGtkTextTag_pad1) and bm_TGtkTextTag_pad1);
+end;
+
+function pad2(var a : TGtkTextTag) : guint;
+begin
+ pad2:=(a.flag0 and bm_TGtkTextTag_pad2) shr bp_TGtkTextTag_pad2;
+end;
+
+procedure set_pad2(var a : TGtkTextTag; __pad2 : guint);
+begin
+ a.flag0:=a.flag0 or ((__pad2 shl bp_TGtkTextTag_pad2) and bm_TGtkTextTag_pad2);
+end;
+
+function pad3(var a : TGtkTextTag) : guint;
+begin
+ pad3:=(a.flag0 and bm_TGtkTextTag_pad3) shr bp_TGtkTextTag_pad3;
+end;
+
+procedure set_pad3(var a : TGtkTextTag; __pad3 : guint);
+begin
+ a.flag0:=a.flag0 or ((__pad3 shl bp_TGtkTextTag_pad3) and bm_TGtkTextTag_pad3);
+end;
+
+function underline(var a : TGtkTextAppearance) : guint;
+begin
+ underline:=(a.flag0 and bm_TGtkTextAppearance_underline) shr bp_TGtkTextAppearance_underline;
+end;
+
+procedure set_underline(var a : TGtkTextAppearance; __underline : guint);
+begin
+ a.flag0:=a.flag0 or ((__underline shl bp_TGtkTextAppearance_underline) and bm_TGtkTextAppearance_underline);
+end;
+
+function strikethrough(var a : TGtkTextAppearance) : guint;
+begin
+ strikethrough:=(a.flag0 and bm_TGtkTextAppearance_strikethrough) shr bp_TGtkTextAppearance_strikethrough;
+end;
+
+procedure set_strikethrough(var a : TGtkTextAppearance; __strikethrough : guint);
+begin
+ a.flag0:=a.flag0 or ((__strikethrough shl bp_TGtkTextAppearance_strikethrough) and bm_TGtkTextAppearance_strikethrough);
+end;
+
+function draw_bg(var a : TGtkTextAppearance) : guint;
+begin
+ draw_bg:=(a.flag0 and bm_TGtkTextAppearance_draw_bg) shr bp_TGtkTextAppearance_draw_bg;
+end;
+
+procedure set_draw_bg(var a : TGtkTextAppearance; __draw_bg : guint);
+begin
+ a.flag0:=a.flag0 or ((__draw_bg shl bp_TGtkTextAppearance_draw_bg) and bm_TGtkTextAppearance_draw_bg);
+end;
+
+function inside_selection(var a : TGtkTextAppearance) : guint;
+begin
+ inside_selection:=(a.flag0 and bm_TGtkTextAppearance_inside_selection) shr bp_TGtkTextAppearance_inside_selection;
+end;
+
+procedure set_inside_selection(var a : TGtkTextAppearance; __inside_selection : guint);
+begin
+ a.flag0:=a.flag0 or ((__inside_selection shl bp_TGtkTextAppearance_inside_selection) and bm_TGtkTextAppearance_inside_selection);
+end;
+
+function is_text(var a : TGtkTextAppearance) : guint;
+begin
+ is_text:=(a.flag0 and bm_TGtkTextAppearance_is_text) shr bp_TGtkTextAppearance_is_text;
+end;
+
+procedure set_is_text(var a : TGtkTextAppearance; __is_text : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_text shl bp_TGtkTextAppearance_is_text) and bm_TGtkTextAppearance_is_text);
+end;
+
+function pad1(var a : TGtkTextAppearance) : guint;
+begin
+ pad1:=(a.flag0 and bm_TGtkTextAppearance_pad1) shr bp_TGtkTextAppearance_pad1;
+end;
+
+procedure set_pad1(var a : TGtkTextAppearance; __pad1 : guint);
+begin
+ a.flag0:=a.flag0 or ((__pad1 shl bp_TGtkTextAppearance_pad1) and bm_TGtkTextAppearance_pad1);
+end;
+
+function pad2(var a : TGtkTextAppearance) : guint;
+begin
+ pad2:=(a.flag0 and bm_TGtkTextAppearance_pad2) shr bp_TGtkTextAppearance_pad2;
+end;
+
+procedure set_pad2(var a : TGtkTextAppearance; __pad2 : guint);
+begin
+ a.flag0:=a.flag0 or ((__pad2 shl bp_TGtkTextAppearance_pad2) and bm_TGtkTextAppearance_pad2);
+end;
+
+function pad3(var a : TGtkTextAppearance) : guint;
+begin
+ pad3:=(a.flag0 and bm_TGtkTextAppearance_pad3) shr bp_TGtkTextAppearance_pad3;
+end;
+
+procedure set_pad3(var a : TGtkTextAppearance; __pad3 : guint);
+begin
+ a.flag0:=a.flag0 or ((__pad3 shl bp_TGtkTextAppearance_pad3) and bm_TGtkTextAppearance_pad3);
+end;
+
+function pad4(var a : TGtkTextAppearance) : guint;
+begin
+ pad4:=(a.flag0 and bm_TGtkTextAppearance_pad4) shr bp_TGtkTextAppearance_pad4;
+end;
+
+procedure set_pad4(var a : TGtkTextAppearance; __pad4 : guint);
+begin
+ a.flag0:=a.flag0 or ((__pad4 shl bp_TGtkTextAppearance_pad4) and bm_TGtkTextAppearance_pad4);
+end;
+
+function invisible(var a : TGtkTextAttributes) : guint;
+begin
+ invisible:=(a.flag0 and bm_TGtkTextAttributes_invisible) shr bp_TGtkTextAttributes_invisible;
+end;
+
+procedure set_invisible(var a : TGtkTextAttributes; __invisible : guint);
+begin
+ a.flag0:=a.flag0 or ((__invisible shl bp_TGtkTextAttributes_invisible) and bm_TGtkTextAttributes_invisible);
+end;
+
+function bg_full_height(var a : TGtkTextAttributes) : guint;
+begin
+ bg_full_height:=(a.flag0 and bm_TGtkTextAttributes_bg_full_height) shr bp_TGtkTextAttributes_bg_full_height;
+end;
+
+procedure set_bg_full_height(var a : TGtkTextAttributes; __bg_full_height : guint);
+begin
+ a.flag0:=a.flag0 or ((__bg_full_height shl bp_TGtkTextAttributes_bg_full_height) and bm_TGtkTextAttributes_bg_full_height);
+end;
+
+function editable(var a : TGtkTextAttributes) : guint;
+begin
+ editable:=(a.flag0 and bm_TGtkTextAttributes_editable) shr bp_TGtkTextAttributes_editable;
+end;
+
+procedure set_editable(var a : TGtkTextAttributes; __editable : guint);
+begin
+ a.flag0:=a.flag0 or ((__editable shl bp_TGtkTextAttributes_editable) and bm_TGtkTextAttributes_editable);
+end;
+
+function realized(var a : TGtkTextAttributes) : guint;
+begin
+ realized:=(a.flag0 and bm_TGtkTextAttributes_realized) shr bp_TGtkTextAttributes_realized;
+end;
+
+procedure set_realized(var a : TGtkTextAttributes; __realized : guint);
+begin
+ a.flag0:=a.flag0 or ((__realized shl bp_TGtkTextAttributes_realized) and bm_TGtkTextAttributes_realized);
+end;
+
+function pad1(var a : TGtkTextAttributes) : guint;
+begin
+ pad1:=(a.flag0 and bm_TGtkTextAttributes_pad1) shr bp_TGtkTextAttributes_pad1;
+end;
+
+procedure set_pad1(var a : TGtkTextAttributes; __pad1 : guint);
+begin
+ a.flag0:=a.flag0 or ((__pad1 shl bp_TGtkTextAttributes_pad1) and bm_TGtkTextAttributes_pad1);
+end;
+
+function pad2(var a : TGtkTextAttributes) : guint;
+begin
+ pad2:=(a.flag0 and bm_TGtkTextAttributes_pad2) shr bp_TGtkTextAttributes_pad2;
+end;
+
+procedure set_pad2(var a : TGtkTextAttributes; __pad2 : guint);
+begin
+ a.flag0:=a.flag0 or ((__pad2 shl bp_TGtkTextAttributes_pad2) and bm_TGtkTextAttributes_pad2);
+end;
+
+function pad3(var a : TGtkTextAttributes) : guint;
+begin
+ pad3:=(a.flag0 and bm_TGtkTextAttributes_pad3) shr bp_TGtkTextAttributes_pad3;
+end;
+
+procedure set_pad3(var a : TGtkTextAttributes; __pad3 : guint);
+begin
+ a.flag0:=a.flag0 or ((__pad3 shl bp_TGtkTextAttributes_pad3) and bm_TGtkTextAttributes_pad3);
+end;
+
+function pad4(var a : TGtkTextAttributes) : guint;
+begin
+ pad4:=(a.flag0 and bm_TGtkTextAttributes_pad4) shr bp_TGtkTextAttributes_pad4;
+end;
+
+procedure set_pad4(var a : TGtkTextAttributes; __pad4 : guint);
+begin
+ a.flag0:=a.flag0 or ((__pad4 shl bp_TGtkTextAttributes_pad4) and bm_TGtkTextAttributes_pad4);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktexttagprivate.inc b/packages/gtk2/src/gtk+/gtk/gtktexttagprivate.inc
new file mode 100644
index 0000000000..8ed898c552
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktexttagprivate.inc
@@ -0,0 +1,30 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{$ifndef GTK_TEXT_TAG_PRIVATE_H}
+{$define GTK_TEXT_TAG_PRIVATE_H}
+{$include gtktexttag.inc}
+type
+{ values should already have desired defaults; this function will override
+ the defaults with settings in the given tags, which should be sorted in
+ ascending order of priority
+ }
+
+procedure _gtk_text_attributes_fill_from_tags(values:PGtkTextAttributes; tags:PPGtkTextTag; n_tags:guint); cdecl; external gtklib;
+procedure _gtk_text_tag_array_sort(tag_array_p:PPGtkTextTag; len:guint); cdecl; external gtklib;
+{ ensure colors are allocated, etc. for drawing }
+procedure _gtk_text_attributes_realize(values:PGtkTextAttributes; cmap:PGdkColormap; visual:PGdkVisual); cdecl; external gtklib;
+{ free the stuff again }
+procedure _gtk_text_attributes_unrealize(values:PGtkTextAttributes; cmap:PGdkColormap; visual:PGdkVisual); cdecl; external gtklib;
+function _gtk_text_tag_affects_size(tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+function _gtk_text_tag_affects_nonsize_appearance(tag:PGtkTextTag):gboolean; cdecl; external gtklib;
+{$endif}
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktexttagtable.inc b/packages/gtk2/src/gtk+/gtk/gtktexttagtable.inc
new file mode 100644
index 0000000000..6b32f4e997
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktexttagtable.inc
@@ -0,0 +1,94 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ PGtkTextTagTable = ^TGtkTextTagTable;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ TGtkTextTagTableForeach = procedure (tag:PGtkTextTag; data:gpointer); cdecl;
+
+ TGtkTextTagTable = record
+ parent_instance : TGObject;
+ hash : PGHashTable;
+ anonymous : PGSList;
+ anon_count : gint;
+ buffers : PGSList;
+ end;
+
+{ Padding for future expansion }
+ PGtkTextTagTableClass = ^TGtkTextTagTableClass;
+ TGtkTextTagTableClass = record
+ parent_class : TGObjectClass;
+ tag_changed : procedure (table:PGtkTextTagTable; tag:PGtkTextTag; size_changed:gboolean); cdecl;
+ tag_added : procedure (table:PGtkTextTagTable; tag:PGtkTextTag); cdecl;
+ tag_removed : procedure (table:PGtkTextTagTable; tag:PGtkTextTag); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_TEXT_TAG_TABLE : GType;
+function GTK_TEXT_TAG_TABLE(obj: pointer) : PGtkTextTagTable;
+function GTK_TEXT_TAG_TABLE_CLASS(klass: pointer) : PGtkTextTagTableClass;
+function GTK_IS_TEXT_TAG_TABLE(obj: pointer) : boolean;
+function GTK_IS_TEXT_TAG_TABLE_CLASS(klass: pointer) : boolean;
+function GTK_TEXT_TAG_TABLE_GET_CLASS(obj: pointer) : PGtkTextTagTableClass;
+
+function gtk_text_tag_table_get_type:GType; cdecl; external gtklib;
+function gtk_text_tag_table_new:PGtkTextTagTable; cdecl; external gtklib;
+procedure gtk_text_tag_table_add(table:PGtkTextTagTable; tag:PGtkTextTag); cdecl; external gtklib;
+procedure gtk_text_tag_table_remove(table:PGtkTextTagTable; tag:PGtkTextTag); cdecl; external gtklib;
+
+function gtk_text_tag_table_lookup(table:PGtkTextTagTable; name:Pgchar):PGtkTextTag; cdecl; external gtklib;
+procedure gtk_text_tag_table_foreach(table:PGtkTextTagTable; func:TGtkTextTagTableForeach; data:gpointer); cdecl; external gtklib;
+function gtk_text_tag_table_get_size(table:PGtkTextTagTable):gint; cdecl; external gtklib;
+{ INTERNAL private stuff - not even exported from the library on
+ many platforms
+ }
+procedure _gtk_text_tag_table_add_buffer(table:PGtkTextTagTable; buffer:gpointer); cdecl; external gtklib;
+procedure _gtk_text_tag_table_remove_buffer(table:PGtkTextTagTable; buffer:gpointer); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TEXT_TAG_TABLE : GType;
+begin
+ GTK_TYPE_TEXT_TAG_TABLE:=gtk_text_tag_table_get_type;
+end;
+
+function GTK_TEXT_TAG_TABLE(obj: pointer) : PGtkTextTagTable;
+begin
+ GTK_TEXT_TAG_TABLE:=PGtkTextTagTable(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TEXT_TAG_TABLE));
+end;
+
+function GTK_TEXT_TAG_TABLE_CLASS(klass: pointer) : PGtkTextTagTableClass;
+begin
+ GTK_TEXT_TAG_TABLE_CLASS:=PGtkTextTagTableClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_TEXT_TAG_TABLE));
+end;
+
+function GTK_IS_TEXT_TAG_TABLE(obj: pointer) : boolean;
+begin
+ GTK_IS_TEXT_TAG_TABLE:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TEXT_TAG_TABLE);
+end;
+
+function GTK_IS_TEXT_TAG_TABLE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TEXT_TAG_TABLE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_TEXT_TAG_TABLE);
+end;
+
+function GTK_TEXT_TAG_TABLE_GET_CLASS(obj: pointer) : PGtkTextTagTableClass;
+begin
+ GTK_TEXT_TAG_TABLE_GET_CLASS:=PGtkTextTagTableClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_TEXT_TAG_TABLE));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktexttypes.inc b/packages/gtk2/src/gtk+/gtk/gtktexttypes.inc
new file mode 100644
index 0000000000..83968bc876
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktexttypes.inc
@@ -0,0 +1,49 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{$ifndef GTK_TEXT_TYPES_H}
+{$define GTK_TEXT_TYPES_H}
+{ C++ extern C conditionnal removed }
+{ __cplusplus }
+
+{$include gtktextbuffer.inc}
+{$include gtktexttagprivate.inc}
+type
+{
+ Declarations for variables shared among the text-related files:
+ }
+{ In gtktextbtree.c }
+ var
+ gtk_text_char_type : TGtkTextLineSegmentClass;cvar; external gtklib;
+ gtk_text_toggle_on_type : TGtkTextLineSegmentClass;cvar; external gtklib;
+ gtk_text_toggle_off_type : TGtkTextLineSegmentClass;cvar; external gtklib;
+{ In gtktextmark.c }
+ gtk_text_left_mark_type : TGtkTextLineSegmentClass;cvar; external gtklib;
+ gtk_text_right_mark_type : TGtkTextLineSegmentClass;cvar; external gtklib;
+{ In gtktextchild.c }
+ gtk_text_pixbuf_type : TGtkTextLineSegmentClass;cvar; external gtklib;
+ gtk_text_child_type : TGtkTextLineSegmentClass;cvar; external gtklib;
+{
+ UTF 8 Stubs
+ }
+
+const
+ GTK_TEXT_UNKNOWN_CHAR = $FFFC;
+
+ var
+ gtk_text_unknown_char_utf8 : array of gchar;cvar;public;
+
+
+function gtk_text_byte_begins_utf8_char(byte:Pgchar):gboolean; cdecl; external gtklib;
+{ C++ end of extern C conditionnal removed }
+{ __cplusplus }
+{$endif}
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextutil.inc b/packages/gtk2/src/gtk+/gtk/gtktextutil.inc
new file mode 100644
index 0000000000..63cebd0b5d
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextutil.inc
@@ -0,0 +1,53 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ 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 Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+ }
+{
+ Modified by the GTK+ Team and others 1997-2001. See the AUTHORS
+ file for a list of people on the GTK+ Team. See the ChangeLog
+ files for a list of changes. These files are distributed with
+ GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ }
+{$ifndef __GTK_TEXT_UTIL_H__}
+{$define __GTK_TEXT_UTIL_H__}
+{$include gtkwidget.inc}
+{$include gtkmenushell.inc}
+{ C++ extern C conditionnal removed }
+{ __cplusplus }
+{ This is a private uninstalled header shared between GtkTextView and GtkEntry }
+
+type
+
+ TGtkTextUtilCharChosenFunc = procedure (text:Pchar; data:gpointer); cdecl;
+
+procedure _gtk_text_util_append_special_char_menuitems(menushell:PGtkMenuShell; func:TGtkTextUtilCharChosenFunc; data:gpointer); cdecl; external gtklib;
+{ C++ end of extern C conditionnal removed }
+{ __cplusplus }
+{$endif}
+{ __GTK_TEXT_UTIL_H__ }
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktextview.inc b/packages/gtk2/src/gtk+/gtk/gtktextview.inc
new file mode 100644
index 0000000000..6c15efcc77
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktextview.inc
@@ -0,0 +1,370 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkTextWindow = pointer;
+ // internal type
+ PGtkTextPendingScroll = pointer;
+
+ PGtkTextWindowType = ^TGtkTextWindowType;
+ TGtkTextWindowType = (
+ GTK_TEXT_WINDOW_PRIVATE,
+ GTK_TEXT_WINDOW_WIDGET,
+ GTK_TEXT_WINDOW_TEXT,
+ GTK_TEXT_WINDOW_LEFT,
+ GTK_TEXT_WINDOW_RIGHT,
+ GTK_TEXT_WINDOW_TOP,
+ GTK_TEXT_WINDOW_BOTTOM
+ );
+
+{ Internal private types. }
+{ Default style settings }
+{ If we have reset the IM since the last character entered }
+{ just selected a word or line via double/triple click }
+{ disable scrolling to cursor on focus }
+{ debug flag - means that we've validated onscreen since the
+ last "invalidate" signal from the layout
+ }
+{ Offsets between widget coordinates and buffer coordinates }
+{ Width and height of the buffer }
+{ The virtual cursor position is normally the same as the
+ actual (strong) cursor position, except in two circumstances:
+
+ a) When the cursor is moved vertically with the keyboard
+ b) When the text view is scrolled with the keyboard
+
+ In case a), virtual_cursor_x is preserved, but not virtual_cursor_y
+ In case b), both virtual_cursor_x and virtual_cursor_y are preserved.
+ }
+{ -1 means use actual cursor position }
+{ -1 means use actual cursor position }
+{ Mark at the beginning of the first onscreen paragraph }
+{ Offset of top of screen in the first onscreen paragraph }
+{ Idle to revalidate onscreen portion, runs before resize }
+{ Idle to revalidate offscreen portions, runs after redraw }
+ PGtkTextView = ^TGtkTextView;
+ TGtkTextView = record
+ parent_instance : TGtkContainer;
+ layout : PGtkTextLayout;
+ buffer : PGtkTextBuffer;
+ selection_drag_handler : guint;
+ scroll_timeout : guint;
+ pixels_above_lines : gint;
+ pixels_below_lines : gint;
+ pixels_inside_wrap : gint;
+ wrap_mode : TGtkWrapMode;
+ justify : TGtkJustification;
+ left_margin : gint;
+ right_margin : gint;
+ indent : gint;
+ tabs : PPangoTabArray;
+ flag0 : word;
+ text_window : PGtkTextWindow;
+ left_window : PGtkTextWindow;
+ right_window : PGtkTextWindow;
+ top_window : PGtkTextWindow;
+ bottom_window : PGtkTextWindow;
+ hadjustment : PGtkAdjustment;
+ vadjustment : PGtkAdjustment;
+ xoffset : gint;
+ yoffset : gint;
+ width : gint;
+ height : gint;
+ virtual_cursor_x : gint;
+ virtual_cursor_y : gint;
+ first_para_mark : PGtkTextMark;
+ first_para_pixels : gint;
+ dnd_mark : PGtkTextMark;
+ blink_timeout : guint;
+ first_validate_idle : guint;
+ incremental_validate_idle : guint;
+ im_context : PGtkIMContext;
+ popup_menu : PGtkWidget;
+ drag_start_x : gint;
+ drag_start_y : gint;
+ children : PGSList;
+ pending_scroll : PGtkTextPendingScroll;
+ pending_place_cursor_button : gint;
+ end;
+
+{ These are all RUN_ACTION signals for keybindings }
+{ move insertion point }
+{ FIXME should be deprecated in favor of adding GTK_MOVEMENT_HORIZONTAL_PAGES
+ or something in GTK 2.2, was put in to avoid adding enum values during
+ the freeze.
+ }
+{ move the "anchor" (what Emacs calls the mark) to the cursor position }
+{ Edits }
+{ cut copy paste }
+{ overwrite }
+{ propagates to GtkWindow move_focus }
+{ Padding for future expansion }
+ PGtkTextViewClass = ^TGtkTextViewClass;
+ TGtkTextViewClass = record
+ parent_class : TGtkContainerClass;
+ set_scroll_adjustments : procedure (text_view:PGtkTextView; hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment); cdecl;
+ populate_popup : procedure (text_view:PGtkTextView; menu:PGtkMenu); cdecl;
+ move_cursor : procedure (text_view:PGtkTextView; step:TGtkMovementStep; count:gint; extend_selection:gboolean); cdecl;
+ page_horizontally : procedure (text_view:PGtkTextView; count:gint; extend_selection:gboolean); cdecl;
+ set_anchor : procedure (text_view:PGtkTextView); cdecl;
+ insert_at_cursor : procedure (text_view:PGtkTextView; str:Pgchar); cdecl;
+ delete_from_cursor : procedure (text_view:PGtkTextView; _type:TGtkDeleteType; count:gint); cdecl;
+ cut_clipboard : procedure (text_view:PGtkTextView); cdecl;
+ copy_clipboard : procedure (text_view:PGtkTextView); cdecl;
+ paste_clipboard : procedure (text_view:PGtkTextView); cdecl;
+ toggle_overwrite : procedure (text_view:PGtkTextView); cdecl;
+ move_focus : procedure (text_view:PGtkTextView; direction:TGtkDirectionType); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ _gtk_reserved5 : procedure ; cdecl;
+ _gtk_reserved6 : procedure ; cdecl;
+ _gtk_reserved7 : procedure ; cdecl;
+ _gtk_reserved8 : procedure ; cdecl;
+ end;
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_TEXT_VIEW_PRIORITY_VALIDATE = GDK_PRIORITY_REDRAW + 5;
+
+ bm_TGtkTextView_editable = $1;
+ bp_TGtkTextView_editable = 0;
+ bm_TGtkTextView_overwrite_mode = $2;
+ bp_TGtkTextView_overwrite_mode = 1;
+ bm_TGtkTextView_cursor_visible = $4;
+ bp_TGtkTextView_cursor_visible = 2;
+ bm_TGtkTextView_need_im_reset = $8;
+ bp_TGtkTextView_need_im_reset = 3;
+ bm_TGtkTextView_just_selected_element = $10;
+ bp_TGtkTextView_just_selected_element = 4;
+ bm_TGtkTextView_disable_scroll_on_focus = $20;
+ bp_TGtkTextView_disable_scroll_on_focus = 5;
+ bm_TGtkTextView_onscreen_validated = $40;
+ bp_TGtkTextView_onscreen_validated = 6;
+ bm_TGtkTextView_mouse_cursor_obscured = $80;
+ bp_TGtkTextView_mouse_cursor_obscured = 7;
+
+
+function GTK_TYPE_TEXT_VIEW : GType;
+function GTK_TEXT_VIEW(obj: pointer) : PGtkTextView;
+function GTK_TEXT_VIEW_CLASS(klass: pointer) : PGtkTextViewClass;
+function GTK_IS_TEXT_VIEW(obj: pointer) : boolean;
+function GTK_IS_TEXT_VIEW_CLASS(klass: pointer) : boolean;
+function GTK_TEXT_VIEW_GET_CLASS(obj: pointer) : PGtkTextViewClass;
+
+function editable(var a : TGtkTextView) : guint; overload;
+procedure set_editable(var a : TGtkTextView; __editable : guint); overload;
+function overwrite_mode(var a : TGtkTextView) : guint; overload;
+procedure set_overwrite_mode(var a : TGtkTextView; __overwrite_mode : guint); overload;
+function cursor_visible(var a : TGtkTextView) : guint; overload;
+procedure set_cursor_visible(var a : TGtkTextView; __cursor_visible : guint); overload;
+function need_im_reset(var a : TGtkTextView) : guint; overload;
+procedure set_need_im_reset(var a : TGtkTextView; __need_im_reset : guint); overload;
+function just_selected_element(var a : TGtkTextView) : guint;
+procedure set_just_selected_element(var a : TGtkTextView; __just_selected_element : guint);
+function disable_scroll_on_focus(var a : TGtkTextView) : guint;
+procedure set_disable_scroll_on_focus(var a : TGtkTextView; __disable_scroll_on_focus : guint);
+function onscreen_validated(var a : TGtkTextView) : guint;
+procedure set_onscreen_validated(var a : TGtkTextView; __onscreen_validated : guint);
+function mouse_cursor_obscured(var a : TGtkTextView) : guint; overload;
+procedure set_mouse_cursor_obscured(var a : TGtkTextView; __mouse_cursor_obscured : guint); overload;
+
+function gtk_text_view_get_type:TGtkType; cdecl; external gtklib;
+function gtk_text_view_new:PGtkWidget; cdecl; external gtklib;
+function gtk_text_view_new_with_buffer(buffer:PGtkTextBuffer):PGtkWidget; cdecl; external gtklib;
+procedure gtk_text_view_set_buffer(text_view:PGtkTextView; buffer:PGtkTextBuffer); cdecl; external gtklib;
+function gtk_text_view_get_buffer(text_view:PGtkTextView):PGtkTextBuffer; cdecl; external gtklib;
+function gtk_text_view_scroll_to_iter(text_view:PGtkTextView; iter:PGtkTextIter; within_margin:gdouble; use_align:gboolean; xalign:gdouble;
+ yalign:gdouble):gboolean; cdecl; external gtklib;
+procedure gtk_text_view_scroll_to_mark(text_view:PGtkTextView; mark:PGtkTextMark; within_margin:gdouble; use_align:gboolean; xalign:gdouble;
+ yalign:gdouble); cdecl; external gtklib;
+procedure gtk_text_view_scroll_mark_onscreen(text_view:PGtkTextView; mark:PGtkTextMark); cdecl; external gtklib;
+function gtk_text_view_move_mark_onscreen(text_view:PGtkTextView; mark:PGtkTextMark):gboolean; cdecl; external gtklib;
+function gtk_text_view_place_cursor_onscreen(text_view:PGtkTextView):gboolean; cdecl; external gtklib;
+procedure gtk_text_view_get_visible_rect(text_view:PGtkTextView; visible_rect:PGdkRectangle); cdecl; external gtklib;
+procedure gtk_text_view_set_cursor_visible(text_view:PGtkTextView; setting:gboolean); cdecl; external gtklib;
+function gtk_text_view_get_cursor_visible(text_view:PGtkTextView):gboolean; cdecl; external gtklib;
+procedure gtk_text_view_get_iter_location(text_view:PGtkTextView; iter:PGtkTextIter; location:PGdkRectangle); cdecl; external gtklib;
+procedure gtk_text_view_get_iter_at_location(text_view:PGtkTextView; iter:PGtkTextIter; x:gint; y:gint); cdecl; external gtklib;
+procedure gtk_text_view_get_line_yrange(text_view:PGtkTextView; iter:PGtkTextIter; y:Pgint; height:Pgint); cdecl; external gtklib;
+procedure gtk_text_view_get_line_at_y(text_view:PGtkTextView; target_iter:PGtkTextIter; y:gint; line_top:Pgint); cdecl; external gtklib;
+procedure gtk_text_view_buffer_to_window_coords(text_view:PGtkTextView; win:TGtkTextWindowType; buffer_x:gint; buffer_y:gint; window_x:Pgint;
+ window_y:Pgint); cdecl; external gtklib;
+procedure gtk_text_view_window_to_buffer_coords(text_view:PGtkTextView; win:TGtkTextWindowType; window_x:gint; window_y:gint; buffer_x:Pgint;
+ buffer_y:Pgint); cdecl; external gtklib;
+function gtk_text_view_get_window(text_view:PGtkTextView; win:TGtkTextWindowType):PGdkWindow; cdecl; external gtklib;
+function gtk_text_view_get_window_type(text_view:PGtkTextView; window:PGdkWindow):TGtkTextWindowType; cdecl; external gtklib;
+procedure gtk_text_view_set_border_window_size(text_view:PGtkTextView; _type:TGtkTextWindowType; size:gint); cdecl; external gtklib;
+function gtk_text_view_get_border_window_size(text_view:PGtkTextView; _type:TGtkTextWindowType):gint; cdecl; external gtklib;
+function gtk_text_view_forward_display_line(text_view:PGtkTextView; iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_view_backward_display_line(text_view:PGtkTextView; iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_view_forward_display_line_end(text_view:PGtkTextView; iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_view_backward_display_line_start(text_view:PGtkTextView; iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_view_starts_display_line(text_view:PGtkTextView; iter:PGtkTextIter):gboolean; cdecl; external gtklib;
+function gtk_text_view_move_visually(text_view:PGtkTextView; iter:PGtkTextIter; count:gint):gboolean; cdecl; external gtklib;
+{ Adding child widgets }
+procedure gtk_text_view_add_child_at_anchor(text_view:PGtkTextView; child:PGtkWidget; anchor:PGtkTextChildAnchor); cdecl; external gtklib;
+{ window coordinates }
+procedure gtk_text_view_add_child_in_window(text_view:PGtkTextView; child:PGtkWidget; which_window:TGtkTextWindowType; xpos:gint; ypos:gint); cdecl; external gtklib;
+{ window coordinates }
+procedure gtk_text_view_move_child(text_view:PGtkTextView; child:PGtkWidget; xpos:gint; ypos:gint); cdecl; external gtklib;
+{ Default style settings (fallbacks if no tag affects the property) }
+procedure gtk_text_view_set_wrap_mode(text_view:PGtkTextView; wrap_mode:TGtkWrapMode); cdecl; external gtklib;
+function gtk_text_view_get_wrap_mode(text_view:PGtkTextView):TGtkWrapMode; cdecl; external gtklib;
+procedure gtk_text_view_set_editable(text_view:PGtkTextView; setting:gboolean); cdecl; external gtklib;
+function gtk_text_view_get_editable(text_view:PGtkTextView):gboolean; cdecl; external gtklib;
+procedure gtk_text_view_set_pixels_above_lines(text_view:PGtkTextView; pixels_above_lines:gint); cdecl; external gtklib;
+function gtk_text_view_get_pixels_above_lines(text_view:PGtkTextView):gint; cdecl; external gtklib;
+procedure gtk_text_view_set_pixels_below_lines(text_view:PGtkTextView; pixels_below_lines:gint); cdecl; external gtklib;
+function gtk_text_view_get_pixels_below_lines(text_view:PGtkTextView):gint; cdecl; external gtklib;
+procedure gtk_text_view_set_pixels_inside_wrap(text_view:PGtkTextView; pixels_inside_wrap:gint); cdecl; external gtklib;
+function gtk_text_view_get_pixels_inside_wrap(text_view:PGtkTextView):gint; cdecl; external gtklib;
+procedure gtk_text_view_set_justification(text_view:PGtkTextView; justification:TGtkJustification); cdecl; external gtklib;
+function gtk_text_view_get_justification(text_view:PGtkTextView):TGtkJustification; cdecl; external gtklib;
+procedure gtk_text_view_set_left_margin(text_view:PGtkTextView; left_margin:gint); cdecl; external gtklib;
+function gtk_text_view_get_left_margin(text_view:PGtkTextView):gint; cdecl; external gtklib;
+procedure gtk_text_view_set_right_margin(text_view:PGtkTextView; right_margin:gint); cdecl; external gtklib;
+function gtk_text_view_get_right_margin(text_view:PGtkTextView):gint; cdecl; external gtklib;
+procedure gtk_text_view_set_indent(text_view:PGtkTextView; indent:gint); cdecl; external gtklib;
+function gtk_text_view_get_indent(text_view:PGtkTextView):gint; cdecl; external gtklib;
+procedure gtk_text_view_set_tabs(text_view:PGtkTextView; tabs:PPangoTabArray); cdecl; external gtklib;
+function gtk_text_view_get_tabs(text_view:PGtkTextView):PPangoTabArray; cdecl; external gtklib;
+{ note that the return value of this changes with the theme }
+function gtk_text_view_get_default_attributes(text_view:PGtkTextView):PGtkTextAttributes; cdecl; external gtklib;
+
+{$IFDEF HasGTK2_4}
+procedure gtk_text_view_set_overwrite(text_view: PGtkTextView; overwrite: gboolean ); cdecl; external gtklib;
+function gtk_text_view_get_overwrite(text_view: PGtkTextView):gboolean; cdecl; external gtklib;
+procedure gtk_text_view_set_accepts_tab(text_view: PGtkTextView; accepts_tab: gboolean ); cdecl; external gtklib;
+function gtk_text_view_get_accepts_tab(text_view: PGtkTextView): gboolean; cdecl; external gtklib;
+{$ENDIF HasGTK2_4}
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TEXT_VIEW : GType;
+begin
+ GTK_TYPE_TEXT_VIEW:=gtk_text_view_get_type;
+end;
+
+function GTK_TEXT_VIEW(obj: pointer) : PGtkTextView;
+begin
+ GTK_TEXT_VIEW:=PGtkTextView(GTK_CHECK_CAST(obj,GTK_TYPE_TEXT_VIEW));
+end;
+
+function GTK_TEXT_VIEW_CLASS(klass: pointer) : PGtkTextViewClass;
+begin
+ GTK_TEXT_VIEW_CLASS:=PGtkTextViewClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TEXT_VIEW));
+end;
+
+function GTK_IS_TEXT_VIEW(obj: pointer) : boolean;
+begin
+ GTK_IS_TEXT_VIEW:=GTK_CHECK_TYPE(obj,GTK_TYPE_TEXT_VIEW);
+end;
+
+function GTK_IS_TEXT_VIEW_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TEXT_VIEW_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TEXT_VIEW);
+end;
+
+function GTK_TEXT_VIEW_GET_CLASS(obj: pointer) : PGtkTextViewClass;
+begin
+ GTK_TEXT_VIEW_GET_CLASS:=PGtkTextViewClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TEXT_VIEW));
+end;
+
+function editable(var a : TGtkTextView) : guint;
+begin
+ editable:=(a.flag0 and bm_TGtkTextView_editable) shr bp_TGtkTextView_editable;
+end;
+
+procedure set_editable(var a : TGtkTextView; __editable : guint);
+begin
+ a.flag0:=a.flag0 or ((__editable shl bp_TGtkTextView_editable) and bm_TGtkTextView_editable);
+end;
+
+function overwrite_mode(var a : TGtkTextView) : guint;
+begin
+ overwrite_mode:=(a.flag0 and bm_TGtkTextView_overwrite_mode) shr bp_TGtkTextView_overwrite_mode;
+end;
+
+procedure set_overwrite_mode(var a : TGtkTextView; __overwrite_mode : guint);
+begin
+ a.flag0:=a.flag0 or ((__overwrite_mode shl bp_TGtkTextView_overwrite_mode) and bm_TGtkTextView_overwrite_mode);
+end;
+
+function cursor_visible(var a : TGtkTextView) : guint;
+begin
+ cursor_visible:=(a.flag0 and bm_TGtkTextView_cursor_visible) shr bp_TGtkTextView_cursor_visible;
+end;
+
+procedure set_cursor_visible(var a : TGtkTextView; __cursor_visible : guint);
+begin
+ a.flag0:=a.flag0 or ((__cursor_visible shl bp_TGtkTextView_cursor_visible) and bm_TGtkTextView_cursor_visible);
+end;
+
+function need_im_reset(var a : TGtkTextView) : guint;
+begin
+ need_im_reset:=(a.flag0 and bm_TGtkTextView_need_im_reset) shr bp_TGtkTextView_need_im_reset;
+end;
+
+procedure set_need_im_reset(var a : TGtkTextView; __need_im_reset : guint);
+begin
+ a.flag0:=a.flag0 or ((__need_im_reset shl bp_TGtkTextView_need_im_reset) and bm_TGtkTextView_need_im_reset);
+end;
+
+function just_selected_element(var a : TGtkTextView) : guint;
+begin
+ just_selected_element:=(a.flag0 and bm_TGtkTextView_just_selected_element) shr bp_TGtkTextView_just_selected_element;
+end;
+
+procedure set_just_selected_element(var a : TGtkTextView; __just_selected_element : guint);
+begin
+ a.flag0:=a.flag0 or ((__just_selected_element shl bp_TGtkTextView_just_selected_element) and bm_TGtkTextView_just_selected_element);
+end;
+
+function disable_scroll_on_focus(var a : TGtkTextView) : guint;
+begin
+ disable_scroll_on_focus:=(a.flag0 and bm_TGtkTextView_disable_scroll_on_focus) shr bp_TGtkTextView_disable_scroll_on_focus;
+end;
+
+procedure set_disable_scroll_on_focus(var a : TGtkTextView; __disable_scroll_on_focus : guint);
+begin
+ a.flag0:=a.flag0 or ((__disable_scroll_on_focus shl bp_TGtkTextView_disable_scroll_on_focus) and bm_TGtkTextView_disable_scroll_on_focus);
+end;
+
+function onscreen_validated(var a : TGtkTextView) : guint;
+begin
+ onscreen_validated:=(a.flag0 and bm_TGtkTextView_onscreen_validated) shr bp_TGtkTextView_onscreen_validated;
+end;
+
+procedure set_onscreen_validated(var a : TGtkTextView; __onscreen_validated : guint);
+begin
+ a.flag0:=a.flag0 or ((__onscreen_validated shl bp_TGtkTextView_onscreen_validated) and bm_TGtkTextView_onscreen_validated);
+end;
+
+function mouse_cursor_obscured(var a : TGtkTextView) : guint;
+begin
+ mouse_cursor_obscured:=(a.flag0 and bm_TGtkTextView_mouse_cursor_obscured) shr bp_TGtkTextView_mouse_cursor_obscured;
+end;
+
+procedure set_mouse_cursor_obscured(var a : TGtkTextView; __mouse_cursor_obscured : guint);
+begin
+ a.flag0:=a.flag0 or ((__mouse_cursor_obscured shl bp_TGtkTextView_mouse_cursor_obscured) and bm_TGtkTextView_mouse_cursor_obscured);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkthemes.inc b/packages/gtk2/src/gtk+/gtk/gtkthemes.inc
new file mode 100644
index 0000000000..d5fe72f78f
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkthemes.inc
@@ -0,0 +1,71 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ GTK - The GIMP Toolkit
+ Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+
+ Themes added by The Rasterman <raster@redhat.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ }
+{
+ Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
+ file for a list of people on the GTK+ Team. See the ChangeLog
+ files for a list of changes. These files are distributed with
+ GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ }
+{$ifndef __GTK_THEMES_H__}
+{$define __GTK_THEMES_H__}
+{$include <gdk/gdk.inc}
+{$include gtkstyle.inc}
+{$include gtkwidget.inc}
+{ C++ extern C conditionnal removed }
+{ __cplusplus }
+function GTK_TYPE_THEME_ENGINE : GType;
+function GTK_THEME_ENGINE(theme_engine : longint) : longint;
+function GTK_IS_THEME_ENGINE(theme_engine : longint) : boolean;
+
+function gtk_theme_engine_get_type:GType; cdecl; external gtklib;
+
+function gtk_theme_engine_get(name:Pgchar):PGtkThemeEngine; cdecl; external gtklib;
+function gtk_theme_engine_create_rc_style(engine:PGtkThemeEngine):PGtkRcStyle; cdecl; external gtklib;
+{ C++ end of extern C conditionnal removed }
+{ __cplusplus }
+{$endif}
+{ __GTK_THEMES_H__ }
+function GTK_TYPE_THEME_ENGINE : GType;
+begin
+ GTK_TYPE_THEME_ENGINE:=gtk_theme_engine_get_type;
+end;
+
+function GTK_THEME_ENGINE(theme_engine : longint) : longint;
+begin
+ GTK_THEME_ENGINE:=PGtkThemeEngine(G_TYPE_CHECK_INSTANCE_CAST(theme_engine,GTK_TYPE_THEME_ENGINE));
+end;
+
+function GTK_IS_THEME_ENGINE(theme_engine : longint) : boolean;
+begin
+ GTK_IS_THEME_ENGINE:=G_TYPE_CHECK_INSTANCE_TYPE(theme_engine,GTK_TYPE_THEME_ENGINE);
+end;
+
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktipsquery.inc b/packages/gtk2/src/gtk+/gtk/gtktipsquery.inc
new file mode 100644
index 0000000000..708292179b
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktipsquery.inc
@@ -0,0 +1,123 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ --- structures --- }
+ PGtkTipsQuery = ^TGtkTipsQuery;
+ TGtkTipsQuery = record
+ _label : TGtkLabel;
+ flag0 : word;
+ label_inactive : Pgchar;
+ label_no_tip : Pgchar;
+ caller : PGtkWidget;
+ last_crossed : PGtkWidget;
+ query_cursor : PGdkCursor;
+ end;
+
+{ Padding for future expansion }
+ PGtkTipsQueryClass = ^TGtkTipsQueryClass;
+ TGtkTipsQueryClass = record
+ parent_class : TGtkLabelClass;
+ start_query : procedure (tips_query:PGtkTipsQuery); cdecl;
+ stop_query : procedure (tips_query:PGtkTipsQuery); cdecl;
+ widget_entered : procedure (tips_query:PGtkTipsQuery; widget:PGtkWidget; tip_text:Pgchar; tip_private:Pgchar); cdecl;
+ widget_selected : function (tips_query:PGtkTipsQuery; widget:PGtkWidget; tip_text:Pgchar; tip_private:Pgchar; event:PGdkEventButton):gint; cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkTipsQuery_emit_always = $1;
+ bp_TGtkTipsQuery_emit_always = 0;
+ bm_TGtkTipsQuery_in_query = $2;
+ bp_TGtkTipsQuery_in_query = 1;
+
+
+function GTK_TYPE_TIPS_QUERY : GType;
+function GTK_TIPS_QUERY(obj: pointer) : PGtkTipsQuery;
+function GTK_TIPS_QUERY_CLASS(klass: pointer) : PGtkTipsQueryClass;
+function GTK_IS_TIPS_QUERY(obj: pointer) : boolean;
+function GTK_IS_TIPS_QUERY_CLASS(klass: pointer) : boolean;
+function GTK_TIPS_QUERY_GET_CLASS(obj: pointer) : PGtkTipsQueryClass;
+
+function emit_always(var a : TGtkTipsQuery) : guint;
+procedure set_emit_always(var a : TGtkTipsQuery; __emit_always : guint);
+function in_query(var a : TGtkTipsQuery) : guint;
+procedure set_in_query(var a : TGtkTipsQuery; __in_query : guint);
+
+{ --- prototypes --- }
+
+function gtk_tips_query_get_type:TGtkType; cdecl; external gtklib;
+function gtk_tips_query_new:PGtkWidget; cdecl; external gtklib;
+procedure gtk_tips_query_start_query(tips_query:PGtkTipsQuery); cdecl; external gtklib;
+procedure gtk_tips_query_stop_query(tips_query:PGtkTipsQuery); cdecl; external gtklib;
+procedure gtk_tips_query_set_caller(tips_query:PGtkTipsQuery; caller:PGtkWidget); cdecl; external gtklib;
+procedure gtk_tips_query_set_labels(tips_query:PGtkTipsQuery; label_inactive:Pgchar; label_no_tip:Pgchar); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TIPS_QUERY : GType;
+begin
+ GTK_TYPE_TIPS_QUERY:=gtk_tips_query_get_type;
+end;
+
+function GTK_TIPS_QUERY(obj: pointer) : PGtkTipsQuery;
+begin
+ GTK_TIPS_QUERY:=PGtkTipsQuery(GTK_CHECK_CAST(obj,GTK_TYPE_TIPS_QUERY));
+end;
+
+function GTK_TIPS_QUERY_CLASS(klass: pointer) : PGtkTipsQueryClass;
+begin
+ GTK_TIPS_QUERY_CLASS:=PGtkTipsQueryClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TIPS_QUERY));
+end;
+
+function GTK_IS_TIPS_QUERY(obj: pointer) : boolean;
+begin
+ GTK_IS_TIPS_QUERY:=GTK_CHECK_TYPE(obj,GTK_TYPE_TIPS_QUERY);
+end;
+
+function GTK_IS_TIPS_QUERY_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TIPS_QUERY_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TIPS_QUERY);
+end;
+
+function GTK_TIPS_QUERY_GET_CLASS(obj: pointer) : PGtkTipsQueryClass;
+begin
+ GTK_TIPS_QUERY_GET_CLASS:=PGtkTipsQueryClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TIPS_QUERY));
+end;
+
+function emit_always(var a : TGtkTipsQuery) : guint;
+begin
+ emit_always:=(a.flag0 and bm_TGtkTipsQuery_emit_always) shr bp_TGtkTipsQuery_emit_always;
+end;
+
+procedure set_emit_always(var a : TGtkTipsQuery; __emit_always : guint);
+begin
+ a.flag0:=a.flag0 or ((__emit_always shl bp_TGtkTipsQuery_emit_always) and bm_TGtkTipsQuery_emit_always);
+end;
+
+function in_query(var a : TGtkTipsQuery) : guint;
+begin
+ in_query:=(a.flag0 and bm_TGtkTipsQuery_in_query) shr bp_TGtkTipsQuery_in_query;
+end;
+
+procedure set_in_query(var a : TGtkTipsQuery; __in_query : guint);
+begin
+ a.flag0:=a.flag0 or ((__in_query shl bp_TGtkTipsQuery_in_query) and bm_TGtkTipsQuery_in_query);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktoggleaction.inc b/packages/gtk2/src/gtk+/gtk/gtktoggleaction.inc
new file mode 100644
index 0000000000..d005d33b97
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktoggleaction.inc
@@ -0,0 +1,81 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkToggleActionPrivate = pointer;
+
+ PGtkToggleAction = ^TGtkToggleAction;
+ TGtkToggleAction = record
+ parent : TGtkAction;
+ private_data : PGtkToggleActionPrivate;
+ end;
+
+{ Padding for future expansion }
+ PGtkToggleActionClass = ^TGtkToggleActionClass;
+ TGtkToggleActionClass = record
+ parent_class : TGtkActionClass;
+ toggled : procedure (action:PGtkToggleAction);cdecl;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ _gtk_reserved4 : procedure ;
+ end;
+
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_TOGGLE_ACTION : GType;
+function GTK_TOGGLE_ACTION(obj : pointer) : PGtkToggleAction;
+function GTK_TOGGLE_ACTION_CLASS(klass : pointer) : PGtkToggleActionClass;
+function GTK_IS_TOGGLE_ACTION(obj : pointer) : gboolean;
+function GTK_IS_TOGGLE_ACTION_CLASS(klass : pointer) : gboolean;
+function GTK_TOGGLE_ACTION_GET_CLASS(obj : pointer) : PGtkToggleActionClass;
+
+
+function gtk_toggle_action_get_type:GType;cdecl;external gtklib name 'gtk_toggle_action_get_type';
+
+function gtk_toggle_action_new(name:Pgchar; szLabel:Pgchar; tooltip:Pgchar; stock_id:Pgchar):PGtkToggleAction;cdecl;external gtklib name 'gtk_toggle_action_new';
+procedure gtk_toggle_action_toggled(action:PGtkToggleAction);cdecl;external gtklib name 'gtk_toggle_action_toggled';
+procedure gtk_toggle_action_set_active(action:PGtkToggleAction; is_active:gboolean);cdecl;external gtklib name 'gtk_toggle_action_set_active';
+function gtk_toggle_action_get_active(action:PGtkToggleAction):gboolean;cdecl;external gtklib name 'gtk_toggle_action_get_active';
+procedure gtk_toggle_action_set_draw_as_radio(action:PGtkToggleAction; draw_as_radio:gboolean);cdecl;external gtklib name 'gtk_toggle_action_set_draw_as_radio';
+function gtk_toggle_action_get_draw_as_radio(action:PGtkToggleAction):gboolean;cdecl;external gtklib name 'gtk_toggle_action_get_draw_as_radio';
+{$ENDIF read_interface_rest}
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TOGGLE_ACTION : GType;
+begin
+ Result:=gtk_toggle_action_get_type;
+end;
+
+function GTK_TOGGLE_ACTION(obj : pointer) : PGtkToggleAction;
+begin
+ Result:=PGtkToggleAction(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TOGGLE_ACTION));
+end;
+
+function GTK_TOGGLE_ACTION_CLASS(klass : pointer) : PGtkToggleActionClass;
+begin
+ Result:=PGtkToggleActionClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_TOGGLE_ACTION));
+end;
+
+function GTK_IS_TOGGLE_ACTION(obj : pointer) : gboolean;
+begin
+ Result:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TOGGLE_ACTION);
+end;
+
+function GTK_IS_TOGGLE_ACTION_CLASS(klass : pointer) : gboolean;
+begin
+ Result:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_TOGGLE_ACTION);
+end;
+
+function GTK_TOGGLE_ACTION_GET_CLASS(obj : pointer) : PGtkToggleActionClass;
+begin
+ Result:=PGtkToggleActionClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_TOGGLE_ACTION));
+end;
+
+{$ENDIF read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtktogglebutton.inc b/packages/gtk2/src/gtk+/gtk/gtktogglebutton.inc
new file mode 100644
index 0000000000..cae9653c1f
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktogglebutton.inc
@@ -0,0 +1,144 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkToggleButton = ^TGtkToggleButton;
+ TGtkToggleButton = record
+ button : TGtkButton;
+ flag0 : word;
+ end;
+
+{ Padding for future expansion }
+ PGtkToggleButtonClass = ^TGtkToggleButtonClass;
+ TGtkToggleButtonClass = record
+ parent_class : TGtkButtonClass;
+ toggled : procedure (toggle_button:PGtkToggleButton); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkToggleButton_active = $1;
+ bp_TGtkToggleButton_active = 0;
+ bm_TGtkToggleButton_draw_indicator = $2;
+ bp_TGtkToggleButton_draw_indicator = 1;
+ bm_TGtkToggleButton_inconsistent = $4;
+ bp_TGtkToggleButton_inconsistent = 2;
+
+function GTK_TYPE_TOGGLE_BUTTON : GType;
+function GTK_TOGGLE_BUTTON(obj: pointer) : PGtkToggleButton;
+function GTK_TOGGLE_BUTTON_CLASS(klass: pointer) : PGtkToggleButtonClass;
+function GTK_IS_TOGGLE_BUTTON(obj: pointer) : boolean;
+function GTK_IS_TOGGLE_BUTTON_CLASS(klass: pointer) : boolean;
+function GTK_TOGGLE_BUTTON_GET_CLASS(obj: pointer) : PGtkToggleButtonClass;
+
+function active(var a : TGtkToggleButton) : guint; overload;
+procedure set_active(var a : TGtkToggleButton; __active : guint); overload;
+function draw_indicator(var a : TGtkToggleButton) : guint;
+procedure set_draw_indicator(var a : TGtkToggleButton; __draw_indicator : guint);
+function inconsistent(var a : TGtkToggleButton) : guint; overload;
+procedure set_inconsistent(var a : TGtkToggleButton; __inconsistent : guint); overload;
+
+
+function gtk_toggle_button_get_type:TGtkType; cdecl; external gtklib;
+function gtk_toggle_button_new:PGtkWidget; cdecl; external gtklib;
+function gtk_toggle_button_new_with_label(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+function gtk_toggle_button_new_with_mnemonic(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+procedure gtk_toggle_button_set_mode(toggle_button:PGtkToggleButton; draw_indicator:gboolean); cdecl; external gtklib;
+function gtk_toggle_button_get_mode(toggle_button:PGtkToggleButton):gboolean; cdecl; external gtklib;
+procedure gtk_toggle_button_set_active(toggle_button:PGtkToggleButton; is_active:gboolean); cdecl; external gtklib;
+function gtk_toggle_button_get_active(toggle_button:PGtkToggleButton):gboolean; cdecl; external gtklib;
+procedure gtk_toggle_button_toggled(toggle_button:PGtkToggleButton); cdecl; external gtklib;
+procedure gtk_toggle_button_set_inconsistent(toggle_button:PGtkToggleButton; setting:gboolean); cdecl; external gtklib;
+function gtk_toggle_button_get_inconsistent(toggle_button:PGtkToggleButton):gboolean; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_toggle_button_set_state(toggle_button:PGtkToggleButton; is_active:gboolean);
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TOGGLE_BUTTON : GType;
+begin
+ GTK_TYPE_TOGGLE_BUTTON:=gtk_toggle_button_get_type;
+end;
+
+function GTK_TOGGLE_BUTTON(obj: pointer) : PGtkToggleButton;
+begin
+ GTK_TOGGLE_BUTTON:=PGtkToggleButton(GTK_CHECK_CAST(obj,GTK_TYPE_TOGGLE_BUTTON));
+end;
+
+function GTK_TOGGLE_BUTTON_CLASS(klass: pointer) : PGtkToggleButtonClass;
+begin
+ GTK_TOGGLE_BUTTON_CLASS:=PGtkToggleButtonClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TOGGLE_BUTTON));
+end;
+
+function GTK_IS_TOGGLE_BUTTON(obj: pointer) : boolean;
+begin
+ GTK_IS_TOGGLE_BUTTON:=GTK_CHECK_TYPE(obj,GTK_TYPE_TOGGLE_BUTTON);
+end;
+
+function GTK_IS_TOGGLE_BUTTON_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TOGGLE_BUTTON_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TOGGLE_BUTTON);
+end;
+
+function GTK_TOGGLE_BUTTON_GET_CLASS(obj: pointer) : PGtkToggleButtonClass;
+begin
+ GTK_TOGGLE_BUTTON_GET_CLASS:=PGtkToggleButtonClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TOGGLE_BUTTON));
+end;
+
+function active(var a : TGtkToggleButton) : guint;
+begin
+ active:=(a.flag0 and bm_TGtkToggleButton_active) shr bp_TGtkToggleButton_active;
+end;
+
+procedure set_active(var a : TGtkToggleButton; __active : guint);
+begin
+ a.flag0:=a.flag0 or ((__active shl bp_TGtkToggleButton_active) and bm_TGtkToggleButton_active);
+end;
+
+function draw_indicator(var a : TGtkToggleButton) : guint;
+begin
+ draw_indicator:=(a.flag0 and bm_TGtkToggleButton_draw_indicator) shr bp_TGtkToggleButton_draw_indicator;
+end;
+
+procedure set_draw_indicator(var a : TGtkToggleButton; __draw_indicator : guint);
+begin
+ a.flag0:=a.flag0 or ((__draw_indicator shl bp_TGtkToggleButton_draw_indicator) and bm_TGtkToggleButton_draw_indicator);
+end;
+
+function inconsistent(var a : TGtkToggleButton) : guint;
+begin
+ inconsistent:=(a.flag0 and bm_TGtkToggleButton_inconsistent) shr bp_TGtkToggleButton_inconsistent;
+end;
+
+procedure set_inconsistent(var a : TGtkToggleButton; __inconsistent : guint);
+begin
+ a.flag0:=a.flag0 or ((__inconsistent shl bp_TGtkToggleButton_inconsistent) and bm_TGtkToggleButton_inconsistent);
+end;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_toggle_button_set_state(toggle_button:PGtkToggleButton; is_active:gboolean);
+begin
+ gtk_toggle_button_set_active(toggle_button,is_active);
+end;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktoggletoolbutton.inc b/packages/gtk2/src/gtk+/gtk/gtktoggletoolbutton.inc
new file mode 100644
index 0000000000..0af8c5b1fb
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktoggletoolbutton.inc
@@ -0,0 +1,78 @@
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkToggleToolButtonPrivate = pointer;
+
+ PGtkToggleToolButton = ^TGtkToggleToolButton;
+ TGtkToggleToolButton = record
+ parent : TGtkToolButton;
+ priv : PGtkToggleToolButtonPrivate;
+ end;
+
+{ signal }
+{ Padding for future expansion }
+ PGtkToggleToolButtonClass = ^TGtkToggleToolButtonClass;
+ TGtkToggleToolButtonClass = record
+ parent_class : TGtkToolButtonClass;
+ toggled : procedure (button:PGtkToggleToolButton);cdecl;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ _gtk_reserved4 : procedure ;
+ end;
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_TOGGLE_TOOL_BUTTON : GType;
+function GTK_TOGGLE_TOOL_BUTTON(obj : pointer) : PGtkToggleToolButton;
+function GTK_TOGGLE_TOOL_BUTTON_CLASS(klass : pointer) : PGtkToggleToolButtonClass;
+function GTK_IS_TOGGLE_TOOL_BUTTON(obj : pointer) : gboolean;
+function GTK_IS_TOGGLE_TOOL_BUTTON_CLASS(klass : pointer) : gboolean;
+function GTK_TOGGLE_TOOL_BUTTON_GET_CLASS(obj : pointer) : PGtkToggleToolButtonClass;
+
+
+function gtk_toggle_tool_button_get_type:GType;cdecl;external gtklib name 'gtk_toggle_tool_button_get_type';
+function gtk_toggle_tool_button_new:PGtkToolItem;cdecl;external gtklib name 'gtk_toggle_tool_button_new';
+(* Const before type ignored *)
+function gtk_toggle_tool_button_new_from_stock(stock_id:Pgchar):PGtkToolItem;cdecl;external gtklib name 'gtk_toggle_tool_button_new_from_stock';
+procedure gtk_toggle_tool_button_set_active(button:PGtkToggleToolButton; is_active:gboolean);cdecl;external gtklib name 'gtk_toggle_tool_button_set_active';
+function gtk_toggle_tool_button_get_active(button:PGtkToggleToolButton):gboolean;cdecl;external gtklib name 'gtk_toggle_tool_button_get_active';
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GTK_TYPE_TOGGLE_TOOL_BUTTON : GType;
+begin
+ GTK_TYPE_TOGGLE_TOOL_BUTTON:=gtk_toggle_tool_button_get_type;
+end;
+
+function GTK_TOGGLE_TOOL_BUTTON(obj : pointer) : PGtkToggleToolButton;
+begin
+ GTK_TOGGLE_TOOL_BUTTON:=PGtkToggleToolButton(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TOGGLE_TOOL_BUTTON));
+end;
+
+function GTK_TOGGLE_TOOL_BUTTON_CLASS(klass : pointer) : PGtkToggleToolButtonClass;
+begin
+ GTK_TOGGLE_TOOL_BUTTON_CLASS:=PGtkToggleToolButtonClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_TOGGLE_TOOL_BUTTON));
+end;
+
+function GTK_IS_TOGGLE_TOOL_BUTTON(obj : pointer) : gboolean;
+begin
+ GTK_IS_TOGGLE_TOOL_BUTTON:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TOGGLE_TOOL_BUTTON);
+end;
+
+function GTK_IS_TOGGLE_TOOL_BUTTON_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_TOGGLE_TOOL_BUTTON_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_TOGGLE_TOOL_BUTTON);
+end;
+
+function GTK_TOGGLE_TOOL_BUTTON_GET_CLASS(obj : pointer) : PGtkToggleToolButtonClass;
+begin
+ GTK_TOGGLE_TOOL_BUTTON_GET_CLASS:=PGtkToggleToolButtonClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_TOGGLE_TOOL_BUTTON));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtktoolbar.inc b/packages/gtk2/src/gtk+/gtk/gtktoolbar.inc
new file mode 100644
index 0000000000..1ab396469f
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktoolbar.inc
@@ -0,0 +1,193 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkToolbarChildType = ^TGtkToolbarChildType;
+ TGtkToolbarChildType = (
+ GTK_TOOLBAR_CHILD_SPACE,
+ GTK_TOOLBAR_CHILD_BUTTON,
+ GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
+ GTK_TOOLBAR_CHILD_RADIOBUTTON,
+ GTK_TOOLBAR_CHILD_WIDGET
+ );
+
+ PGtkToolbarSpaceStyle = ^TGtkToolbarSpaceStyle;
+ TGtkToolbarSpaceStyle = (
+ GTK_TOOLBAR_SPACE_EMPTY,
+ GTK_TOOLBAR_SPACE_LINE
+ );
+
+ PGtkToolbarChild = ^TGtkToolbarChild;
+ TGtkToolbarChild = record
+ _type : TGtkToolbarChildType;
+ widget : PGtkWidget;
+ icon : PGtkWidget;
+ _label : PGtkWidget;
+ end;
+
+ PGtkToolbar = ^TGtkToolbar;
+ TGtkToolbar = record
+ container : TGtkContainer;
+ num_children : gint;
+ children : PGList;
+ orientation : TGtkOrientation;
+ style : TGtkToolbarStyle;
+ icon_size : TGtkIconSize;
+ tooltips : PGtkTooltips;
+ button_maxw : gint;
+ button_maxh : gint;
+ style_set_connection : guint;
+ icon_size_connection : guint;
+ flag0 : word;
+ end;
+
+{ Padding for future expansion }
+ PGtkToolbarClass = ^TGtkToolbarClass;
+ TGtkToolbarClass = record
+ parent_class : TGtkContainerClass;
+ orientation_changed : procedure (toolbar:PGtkToolbar; orientation:TGtkOrientation); cdecl;
+ style_changed : procedure (toolbar:PGtkToolbar; style:TGtkToolbarStyle); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkToolbar_style_set = $1;
+ bp_TGtkToolbar_style_set = 0;
+ bm_TGtkToolbar_icon_size_set = $2;
+ bp_TGtkToolbar_icon_size_set = 1;
+
+
+function GTK_TYPE_TOOLBAR : GType;
+function GTK_TOOLBAR(obj: pointer) : PGtkToolbar;
+function GTK_TOOLBAR_CLASS(klass: pointer) : PGtkToolbarClass;
+function GTK_IS_TOOLBAR(obj: pointer) : boolean;
+function GTK_IS_TOOLBAR_CLASS(klass: pointer) : boolean;
+function GTK_TOOLBAR_GET_CLASS(obj: pointer) : PGtkToolbarClass;
+
+function style_set(var a : TGtkToolbar) : guint;
+procedure set_style_set(var a : TGtkToolbar; __style_set : guint);
+function icon_size_set(var a : TGtkToolbar) : guint;
+procedure set_icon_size_set(var a : TGtkToolbar; __icon_size_set : guint);
+
+
+function gtk_toolbar_get_type:TGtkType; cdecl; external gtklib;
+function gtk_toolbar_new:PGtkWidget; cdecl; external gtklib;
+{ Simple button items }
+function gtk_toolbar_append_item(toolbar:PGtkToolbar; text:Pchar; tooltip_text:Pchar; tooltip_private_text:Pchar; icon:PGtkWidget;
+ callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget; cdecl; external gtklib;
+function gtk_toolbar_prepend_item(toolbar:PGtkToolbar; text:Pchar; tooltip_text:Pchar; tooltip_private_text:Pchar; icon:PGtkWidget;
+ callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget; cdecl; external gtklib;
+function gtk_toolbar_insert_item(toolbar:PGtkToolbar; text:Pchar; tooltip_text:Pchar; tooltip_private_text:Pchar; icon:PGtkWidget;
+ callback:TGtkSignalFunc; user_data:gpointer; position:gint):PGtkWidget; cdecl; external gtklib;
+{ Stock Items }
+function gtk_toolbar_insert_stock(toolbar:PGtkToolbar; stock_id:Pgchar; tooltip_text:Pchar; tooltip_private_text:Pchar; callback:TGtkSignalFunc;
+ user_data:gpointer; position:gint):PGtkWidget; cdecl; external gtklib;
+{ Space Items }
+procedure gtk_toolbar_append_space(toolbar:PGtkToolbar); cdecl; external gtklib;
+procedure gtk_toolbar_prepend_space(toolbar:PGtkToolbar); cdecl; external gtklib;
+procedure gtk_toolbar_insert_space(toolbar:PGtkToolbar; position:gint); cdecl; external gtklib;
+procedure gtk_toolbar_remove_space(toolbar:PGtkToolbar; position:gint); cdecl; external gtklib;
+{ Any element type }
+function gtk_toolbar_append_element(toolbar:PGtkToolbar; _type:TGtkToolbarChildType; widget:PGtkWidget; text:Pchar; tooltip_text:Pchar;
+ tooltip_private_text:Pchar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget; cdecl; external gtklib;
+function gtk_toolbar_prepend_element(toolbar:PGtkToolbar; _type:TGtkToolbarChildType; widget:PGtkWidget; text:Pchar; tooltip_text:Pchar;
+ tooltip_private_text:Pchar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget; cdecl; external gtklib;
+function gtk_toolbar_insert_element(toolbar:PGtkToolbar; _type:TGtkToolbarChildType; widget:PGtkWidget; text:Pchar; tooltip_text:Pchar;
+ tooltip_private_text:Pchar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer; position:gint):PGtkWidget; cdecl; external gtklib;
+{ Generic Widgets }
+procedure gtk_toolbar_append_widget(toolbar:PGtkToolbar; widget:PGtkWidget; tooltip_text:Pchar; tooltip_private_text:Pchar); cdecl; external gtklib;
+procedure gtk_toolbar_prepend_widget(toolbar:PGtkToolbar; widget:PGtkWidget; tooltip_text:Pchar; tooltip_private_text:Pchar); cdecl; external gtklib;
+procedure gtk_toolbar_insert_widget(toolbar:PGtkToolbar; widget:PGtkWidget; tooltip_text:Pchar; tooltip_private_text:Pchar; position:gint); cdecl; external gtklib;
+{ Style functions }
+procedure gtk_toolbar_set_orientation(toolbar:PGtkToolbar; orientation:TGtkOrientation); cdecl; external gtklib;
+procedure gtk_toolbar_set_style(toolbar:PGtkToolbar; style:TGtkToolbarStyle); cdecl; external gtklib;
+procedure gtk_toolbar_set_icon_size(toolbar:PGtkToolbar; icon_size:TGtkIconSize); cdecl; external gtklib;
+procedure gtk_toolbar_set_tooltips(toolbar:PGtkToolbar; enable:gboolean); cdecl; external gtklib;
+procedure gtk_toolbar_unset_style(toolbar:PGtkToolbar); cdecl; external gtklib;
+procedure gtk_toolbar_unset_icon_size(toolbar:PGtkToolbar); cdecl; external gtklib;
+function gtk_toolbar_get_orientation(toolbar:PGtkToolbar):TGtkOrientation; cdecl; external gtklib;
+function gtk_toolbar_get_style(toolbar:PGtkToolbar):TGtkToolbarStyle; cdecl; external gtklib;
+function gtk_toolbar_get_icon_size(toolbar:PGtkToolbar):TGtkIconSize; cdecl; external gtklib;
+function gtk_toolbar_get_tooltips(toolbar:PGtkToolbar):gboolean; cdecl; external gtklib;
+
+{$IFDEF HasGTK2_4}
+function gtk_separator_tool_item_get_type:TGtkType; cdecl; external gtklib;
+function GTK_TYPE_SEPARATOR_TOOL_ITEM : GType;
+{$ENDIF HasGTK2_4}
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TOOLBAR : GType;
+begin
+ GTK_TYPE_TOOLBAR:=gtk_toolbar_get_type;
+end;
+
+function GTK_TOOLBAR(obj: pointer) : PGtkToolbar;
+begin
+ GTK_TOOLBAR:=PGtkToolbar(GTK_CHECK_CAST(obj,GTK_TYPE_TOOLBAR));
+end;
+
+function GTK_TOOLBAR_CLASS(klass: pointer) : PGtkToolbarClass;
+begin
+ GTK_TOOLBAR_CLASS:=PGtkToolbarClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TOOLBAR));
+end;
+
+function GTK_IS_TOOLBAR(obj: pointer) : boolean;
+begin
+ GTK_IS_TOOLBAR:=GTK_CHECK_TYPE(obj,GTK_TYPE_TOOLBAR);
+end;
+
+function GTK_IS_TOOLBAR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TOOLBAR_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TOOLBAR);
+end;
+
+function GTK_TOOLBAR_GET_CLASS(obj: pointer) : PGtkToolbarClass;
+begin
+ GTK_TOOLBAR_GET_CLASS:=PGtkToolbarClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TOOLBAR));
+end;
+
+function style_set(var a : TGtkToolbar) : guint;
+begin
+ style_set:=(a.flag0 and bm_TGtkToolbar_style_set) shr bp_TGtkToolbar_style_set;
+end;
+
+procedure set_style_set(var a : TGtkToolbar; __style_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__style_set shl bp_TGtkToolbar_style_set) and bm_TGtkToolbar_style_set);
+end;
+
+function icon_size_set(var a : TGtkToolbar) : guint;
+begin
+ icon_size_set:=(a.flag0 and bm_TGtkToolbar_icon_size_set) shr bp_TGtkToolbar_icon_size_set;
+end;
+
+procedure set_icon_size_set(var a : TGtkToolbar; __icon_size_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__icon_size_set shl bp_TGtkToolbar_icon_size_set) and bm_TGtkToolbar_icon_size_set);
+end;
+
+{$IFDEF HasGTK2_4}
+function GTK_TYPE_SEPARATOR_TOOL_ITEM : GType;
+begin
+ GTK_TYPE_SEPARATOR_TOOL_ITEM:=gtk_separator_tool_item_get_type;
+end;
+{$ENDIF HasGTK2_4}
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktoolbutton.inc b/packages/gtk2/src/gtk+/gtk/gtktoolbutton.inc
new file mode 100644
index 0000000000..49c3cb8ae5
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktoolbutton.inc
@@ -0,0 +1,98 @@
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkToolButtonPrivate = pointer;
+
+ PGtkToolButton = ^TGtkToolButton;
+ TGtkToolButton = record
+ parent : TGtkToolItem;
+ priv : PGtkToolButtonPrivate;
+ end;
+
+{ signal }
+{ Padding for future expansion }
+ PGtkToolButtonClass = ^TGtkToolButtonClass;
+ TGtkToolButtonClass = record
+ parent_class : TGtkToolItemClass;
+ button_type : GType;
+ clicked : procedure (tool_item:PGtkToolButton);cdecl;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ _gtk_reserved4 : procedure ;
+ end;
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_TOOL_BUTTON : GType;
+function GTK_TOOL_BUTTON(obj : pointer) : PGtkToolButton;
+function GTK_TOOL_BUTTON_CLASS(klass : pointer) : PGtkToolButtonClass;
+function GTK_IS_TOOL_BUTTON(obj : pointer) : gboolean;
+function GTK_IS_TOOL_BUTTON_CLASS(klass : pointer) : gboolean;
+function GTK_TOOL_BUTTON_GET_CLASS(obj : pointer) : PGtkToolButtonClass;
+
+
+function gtk_tool_button_get_type:GType;cdecl;external gtklib name 'gtk_tool_button_get_type';
+
+function gtk_tool_button_new(icon_widget:PGtkWidget; szLabel:Pgchar):PGtkToolItem;cdecl;external gtklib name 'gtk_tool_button_new';
+function gtk_tool_button_new_from_stock(stock_id:Pgchar):PGtkToolItem;cdecl;external gtklib name 'gtk_tool_button_new_from_stock';
+
+procedure gtk_tool_button_set_label(button:PGtkToolButton; szLabel:Pgchar);cdecl;external gtklib name 'gtk_tool_button_set_label';
+function gtk_tool_button_get_label(button:PGtkToolButton):Pgchar;cdecl;external gtklib name 'gtk_tool_button_get_label';
+
+procedure gtk_tool_button_set_use_underline(button:PGtkToolButton; use_underline:gboolean);cdecl;external gtklib name 'gtk_tool_button_set_use_underline';
+function gtk_tool_button_get_use_underline(button:PGtkToolButton):gboolean;cdecl;external gtklib name 'gtk_tool_button_get_use_underline';
+
+
+procedure gtk_tool_button_set_stock_id(button:PGtkToolButton; stock_id:Pgchar);cdecl;external gtklib name 'gtk_tool_button_set_stock_id';
+function gtk_tool_button_get_stock_id(button:PGtkToolButton):Pgchar;cdecl;external gtklib name 'gtk_tool_button_get_stock_id';
+
+procedure gtk_tool_button_set_icon_widget(button:PGtkToolButton; icon_widget:PGtkWidget);cdecl;external gtklib name 'gtk_tool_button_set_icon_widget';
+function gtk_tool_button_get_icon_widget(button:PGtkToolButton):PGtkWidget;cdecl;external gtklib name 'gtk_tool_button_get_icon_widget';
+
+procedure gtk_tool_button_set_label_widget(button:PGtkToolButton; label_widget:PGtkWidget);cdecl;external gtklib name 'gtk_tool_button_set_label_widget';
+function gtk_tool_button_get_label_widget(button:PGtkToolButton):PGtkWidget;cdecl;external gtklib name 'gtk_tool_button_get_label_widget';
+
+{ internal function }
+function _gtk_tool_button_get_button(button:PGtkToolButton):PGtkWidget;cdecl;external gtklib name '_gtk_tool_button_get_button';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GTK_TYPE_TOOL_BUTTON : GType;
+begin
+ GTK_TYPE_TOOL_BUTTON:=gtk_tool_button_get_type;
+end;
+
+function GTK_TOOL_BUTTON(obj : pointer) : PGtkToolButton;
+begin
+ GTK_TOOL_BUTTON:=PGtkToolButton(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TOOL_BUTTON));
+end;
+
+function GTK_TOOL_BUTTON_CLASS(klass : pointer) : PGtkToolButtonClass;
+begin
+ GTK_TOOL_BUTTON_CLASS:=PGtkToolButtonClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_TOOL_BUTTON));
+end;
+
+function GTK_IS_TOOL_BUTTON(obj : pointer) : gboolean;
+begin
+ GTK_IS_TOOL_BUTTON:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TOOL_BUTTON);
+end;
+
+function GTK_IS_TOOL_BUTTON_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_TOOL_BUTTON_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_TOOL_BUTTON);
+end;
+
+function GTK_TOOL_BUTTON_GET_CLASS(obj : pointer) : PGtkToolButtonClass;
+begin
+ GTK_TOOL_BUTTON_GET_CLASS:=PGtkToolButtonClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_TOOL_BUTTON));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtktoolitem.inc b/packages/gtk2/src/gtk+/gtk/gtktoolitem.inc
new file mode 100644
index 0000000000..16cedc1186
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktoolitem.inc
@@ -0,0 +1,118 @@
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkToolItemPrivate = pointer;
+
+ PGtkToolItem = ^TGtkToolItem;
+ TGtkToolItem = record
+ parent : TGtkBin;
+ priv : PGtkToolItemPrivate;
+ end;
+
+{ signals }
+
+{ Padding for future expansion }
+ PGtkToolItemClass = ^TGtkToolItemClass;
+ TGtkToolItemClass = record
+ parent_class : TGtkBinClass;
+ create_menu_proxy : function (tool_item:PGtkToolItem):gboolean;cdecl;
+ toolbar_reconfigured : procedure (tool_item:PGtkToolItem);
+ set_tooltip : function (tool_item:PGtkToolItem; tooltips:PGtkTooltips; tip_text:Pgchar; tip_private:Pgchar):gboolean;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ _gtk_reserved4 : procedure ;
+ end;
+
+{$ENDIF read_interface_types}
+
+{$ifdef read_interface_rest}
+function GTK_TYPE_TOOL_ITEM : GType;
+function GTK_TOOL_ITEM(o : pointer) : PGtkToolItem;
+function GTK_TOOL_ITEM_CLASS(klass : pointer) : PGtkToolItemClass;
+function GTK_IS_TOOL_ITEM(o : pointer) : gboolean;
+function GTK_IS_TOOL_ITEM_CLASS(klass : pointer) : gboolean;
+function GTK_TOOL_ITEM_GET_CLASS(o : pointer) : PGtkToolItemClass;
+
+
+function gtk_tool_item_get_type:GType;cdecl;external gtklib name 'gtk_tool_item_get_type';
+
+function gtk_tool_item_new:PGtkToolItem;cdecl;external gtklib name 'gtk_tool_item_new';
+
+procedure gtk_tool_item_set_homogeneous(tool_item:PGtkToolItem; homogeneous:gboolean);cdecl;external gtklib name 'gtk_tool_item_set_homogeneous';
+function gtk_tool_item_get_homogeneous(tool_item:PGtkToolItem):gboolean;cdecl;external gtklib name 'gtk_tool_item_get_homogeneous';
+
+procedure gtk_tool_item_set_expand(tool_item:PGtkToolItem; expand:gboolean);cdecl;external gtklib name 'gtk_tool_item_set_expand';
+function gtk_tool_item_get_expand(tool_item:PGtkToolItem):gboolean;cdecl;external gtklib name 'gtk_tool_item_get_expand';
+
+procedure gtk_tool_item_set_tooltip(tool_item:PGtkToolItem; tooltips:PGtkTooltips; tip_text:Pgchar; tip_private:Pgchar);cdecl;external gtklib name 'gtk_tool_item_set_tooltip';
+
+procedure gtk_tool_item_set_use_drag_window(toolitem:PGtkToolItem; use_drag_window:gboolean);cdecl;external gtklib name 'gtk_tool_item_set_use_drag_window';
+function gtk_tool_item_get_use_drag_window(toolitem:PGtkToolItem):gboolean;cdecl;external gtklib name 'gtk_tool_item_get_use_drag_window';
+
+procedure gtk_tool_item_set_visible_horizontal(toolitem:PGtkToolItem; visible_horizontal:gboolean);cdecl;external gtklib name 'gtk_tool_item_set_visible_horizontal';
+function gtk_tool_item_get_visible_horizontal(toolitem:PGtkToolItem):gboolean;cdecl;external gtklib name 'gtk_tool_item_get_visible_horizontal';
+
+procedure gtk_tool_item_set_visible_vertical(toolitem:PGtkToolItem; visible_vertical:gboolean);cdecl;external gtklib name 'gtk_tool_item_set_visible_vertical';
+function gtk_tool_item_get_visible_vertical(toolitem:PGtkToolItem):gboolean;cdecl;external gtklib name 'gtk_tool_item_get_visible_vertical';
+
+function gtk_tool_item_get_is_important(tool_item:PGtkToolItem):gboolean;cdecl;external gtklib name 'gtk_tool_item_get_is_important';
+procedure gtk_tool_item_set_is_important(tool_item:PGtkToolItem; is_important:gboolean);cdecl;external gtklib name 'gtk_tool_item_set_is_important';
+
+function gtk_tool_item_get_icon_size(tool_item:PGtkToolItem):TGtkIconSize;cdecl;external gtklib name 'gtk_tool_item_get_icon_size';
+
+function gtk_tool_item_get_orientation(tool_item:PGtkToolItem):TGtkOrientation;cdecl;external gtklib name 'gtk_tool_item_get_orientation';
+
+function gtk_tool_item_get_toolbar_style(tool_item:PGtkToolItem):TGtkToolbarStyle;cdecl;external gtklib name 'gtk_tool_item_get_toolbar_style';
+
+function gtk_tool_item_get_relief_style(tool_item:PGtkToolItem):TGtkReliefStyle;cdecl;external gtklib name 'gtk_tool_item_get_relief_style';
+
+function gtk_tool_item_retrieve_proxy_menu_item(tool_item:PGtkToolItem):PGtkWidget;cdecl;external gtklib name 'gtk_tool_item_retrieve_proxy_menu_item';
+
+
+function gtk_tool_item_get_proxy_menu_item(tool_item:PGtkToolItem; menu_item_id:Pgchar):PGtkWidget;cdecl;external gtklib name 'gtk_tool_item_get_proxy_menu_item';
+
+
+procedure gtk_tool_item_set_proxy_menu_item(tool_item:PGtkToolItem; menu_item_id:Pgchar; menu_item:PGtkWidget);cdecl;external gtklib name 'gtk_tool_item_set_proxy_menu_item';
+
+{ internal function }
+procedure _gtk_tool_item_toolbar_reconfigured(tool_item:PGtkToolItem);cdecl;external gtklib name '_gtk_tool_item_toolbar_reconfigured';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GTK_TYPE_TOOL_ITEM : GType;
+begin
+ GTK_TYPE_TOOL_ITEM:=gtk_tool_item_get_type;
+end;
+
+function GTK_TOOL_ITEM(o : pointer) : PGtkToolItem;
+begin
+ GTK_TOOL_ITEM:=PGtkToolItem(G_TYPE_CHECK_INSTANCE_CAST(o,GTK_TYPE_TOOL_ITEM));
+end;
+
+function GTK_TOOL_ITEM_CLASS(klass : pointer) : PGtkToolItemClass;
+begin
+ GTK_TOOL_ITEM_CLASS:=PGtkToolItemClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_TOOL_ITEM));
+end;
+
+function GTK_IS_TOOL_ITEM(o : pointer) : gboolean;
+begin
+ GTK_IS_TOOL_ITEM:=G_TYPE_CHECK_INSTANCE_TYPE(o,GTK_TYPE_TOOL_ITEM);
+end;
+
+function GTK_IS_TOOL_ITEM_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_TOOL_ITEM_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_TOOL_ITEM);
+end;
+
+function GTK_TOOL_ITEM_GET_CLASS(o : pointer) : PGtkToolItemClass;
+begin
+ GTK_TOOL_ITEM_GET_CLASS:=PGtkToolItemClass(G_TYPE_INSTANCE_GET_CLASS(o,GTK_TYPE_TOOL_ITEM));
+end;
+
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtktooltips.inc b/packages/gtk2/src/gtk+/gtk/gtktooltips.inc
new file mode 100644
index 0000000000..6c1624a1c0
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktooltips.inc
@@ -0,0 +1,164 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkTooltips = ^TGtkTooltips;
+
+ PGtkTooltipsData = ^TGtkTooltipsData;
+ TGtkTooltipsData = record
+ tooltips : PGtkTooltips;
+ widget : PGtkWidget;
+ tip_text : Pgchar;
+ tip_private : Pgchar;
+ end;
+
+ TGtkTooltips = record
+ parent_instance : TGtkObject;
+ tip_window : PGtkWidget;
+ tip_label : PGtkWidget;
+ active_tips_data : PGtkTooltipsData;
+ tips_data_list : PGList;
+ flag0 : longint;
+ flag1 : word;
+ timer_tag : gint;
+ last_popdown : TGTimeVal;
+ end;
+
+{ Padding for future expansion }
+ PGtkTooltipsClass = ^TGtkTooltipsClass;
+ TGtkTooltipsClass = record
+ parent_class : TGtkObjectClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkTooltips_delay = $3FFFFFFF;
+ bp_TGtkTooltips_delay = 0;
+ bm_TGtkTooltips_enabled = $40000000;
+ bp_TGtkTooltips_enabled = 30;
+ bm_TGtkTooltips_have_grab = $80000000;
+ bp_TGtkTooltips_have_grab = 31;
+ bm_TGtkTooltips_use_sticky_delay = $1;
+ bp_TGtkTooltips_use_sticky_delay = 0;
+
+
+function GTK_TYPE_TOOLTIPS : GType;
+function GTK_TOOLTIPS(obj: pointer) : PGtkTooltips;
+function GTK_TOOLTIPS_CLASS(klass: pointer) : PGtkTooltipsClass;
+function GTK_IS_TOOLTIPS(obj: pointer) : boolean;
+function GTK_IS_TOOLTIPS_CLASS(klass: pointer) : boolean;
+function GTK_TOOLTIPS_GET_CLASS(obj: pointer) : PGtkTooltipsClass;
+
+function delay(var a : TGtkTooltips) : guint;
+procedure set_delay(var a : TGtkTooltips; __delay : guint);
+function enabled(var a : TGtkTooltips) : guint;
+procedure set_enabled(var a : TGtkTooltips; __enabled : guint);
+function have_grab(var a : TGtkTooltips) : guint; overload;
+procedure set_have_grab(var a : TGtkTooltips; __have_grab : guint); overload;
+function use_sticky_delay(var a : TGtkTooltips) : guint;
+procedure set_use_sticky_delay(var a : TGtkTooltips; __use_sticky_delay : guint);
+
+function gtk_tooltips_get_type:TGtkType; cdecl; external gtklib;
+function gtk_tooltips_new:PGtkTooltips; cdecl; external gtklib;
+procedure gtk_tooltips_enable(tooltips:PGtkTooltips); cdecl; external gtklib;
+procedure gtk_tooltips_disable(tooltips:PGtkTooltips); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_tooltips_set_delay(tooltips:PGtkTooltips; delay:guint); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+procedure gtk_tooltips_set_tip(tooltips:PGtkTooltips; widget:PGtkWidget; tip_text:Pgchar; tip_private:Pgchar); cdecl; external gtklib;
+function gtk_tooltips_data_get(widget:PGtkWidget):PGtkTooltipsData; cdecl; external gtklib;
+procedure gtk_tooltips_force_window(tooltips:PGtkTooltips); cdecl; external gtklib;
+procedure _gtk_tooltips_toggle_keyboard_mode(widget:PGtkWidget); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TOOLTIPS : GType;
+begin
+ GTK_TYPE_TOOLTIPS:=gtk_tooltips_get_type;
+end;
+
+function GTK_TOOLTIPS(obj: pointer) : PGtkTooltips;
+begin
+ GTK_TOOLTIPS:=PGtkTooltips(GTK_CHECK_CAST(obj,GTK_TYPE_TOOLTIPS));
+end;
+
+function GTK_TOOLTIPS_CLASS(klass: pointer) : PGtkTooltipsClass;
+begin
+ GTK_TOOLTIPS_CLASS:=PGtkTooltipsClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TOOLTIPS));
+end;
+
+function GTK_IS_TOOLTIPS(obj: pointer) : boolean;
+begin
+ GTK_IS_TOOLTIPS:=GTK_CHECK_TYPE(obj,GTK_TYPE_TOOLTIPS);
+end;
+
+function GTK_IS_TOOLTIPS_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TOOLTIPS_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TOOLTIPS);
+end;
+
+function GTK_TOOLTIPS_GET_CLASS(obj: pointer) : PGtkTooltipsClass;
+begin
+ GTK_TOOLTIPS_GET_CLASS:=PGtkTooltipsClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TOOLTIPS));
+end;
+
+function delay(var a : TGtkTooltips) : guint;
+begin
+ delay:=(a.flag0 and bm_TGtkTooltips_delay) shr bp_TGtkTooltips_delay;
+end;
+
+procedure set_delay(var a : TGtkTooltips; __delay : guint);
+begin
+ a.flag0:=a.flag0 or ((__delay shl bp_TGtkTooltips_delay) and bm_TGtkTooltips_delay);
+end;
+
+function enabled(var a : TGtkTooltips) : guint;
+begin
+ enabled:=(a.flag0 and bm_TGtkTooltips_enabled) shr bp_TGtkTooltips_enabled;
+end;
+
+procedure set_enabled(var a : TGtkTooltips; __enabled : guint);
+begin
+ a.flag0:=a.flag0 or ((__enabled shl bp_TGtkTooltips_enabled) and bm_TGtkTooltips_enabled);
+end;
+
+function have_grab(var a : TGtkTooltips) : guint;
+begin
+ have_grab:=(a.flag0 and bm_TGtkTooltips_have_grab) shr bp_TGtkTooltips_have_grab;
+end;
+
+procedure set_have_grab(var a : TGtkTooltips; __have_grab : guint);
+begin
+ a.flag0:=a.flag0 or ((__have_grab shl bp_TGtkTooltips_have_grab) and bm_TGtkTooltips_have_grab);
+end;
+
+function use_sticky_delay(var a : TGtkTooltips) : guint;
+begin
+ use_sticky_delay:=(a.flag0 and bm_TGtkTooltips_use_sticky_delay) shr bp_TGtkTooltips_use_sticky_delay;
+end;
+
+procedure set_use_sticky_delay(var a : TGtkTooltips; __use_sticky_delay : guint);
+begin
+ a.flag0:=a.flag0 or ((__use_sticky_delay shl bp_TGtkTooltips_use_sticky_delay) and bm_TGtkTooltips_use_sticky_delay);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktree.inc b/packages/gtk2/src/gtk+/gtk/gtktree.inc
new file mode 100644
index 0000000000..c960078b15
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktree.inc
@@ -0,0 +1,170 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ default view mode }
+ PGtkTreeViewMode = ^TGtkTreeViewMode;
+ TGtkTreeViewMode = (
+ GTK_TREE_VIEW_LINE,
+ GTK_TREE_VIEW_ITEM
+ );
+
+{ owner of selection list }
+ PGtkTree = ^TGtkTree;
+ TGtkTree = record
+ container : TGtkContainer;
+ children : PGList;
+ root_tree : PGtkTree;
+ tree_owner : PGtkWidget;
+ selection : PGList;
+ level : guint;
+ indent_value : guint;
+ current_indent : guint;
+ flag0 : word;
+ end;
+
+ PGtkTreeClass = ^TGtkTreeClass;
+ TGtkTreeClass = record
+ parent_class : TGtkContainerClass;
+ selection_changed : procedure (tree:PGtkTree); cdecl;
+ select_child : procedure (tree:PGtkTree; child:PGtkWidget); cdecl;
+ unselect_child : procedure (tree:PGtkTree; child:PGtkWidget); cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkTree_selection_mode = $3;
+ bp_TGtkTree_selection_mode = 0;
+ bm_TGtkTree_view_mode = $4;
+ bp_TGtkTree_view_mode = 2;
+ bm_TGtkTree_view_line = $8;
+ bp_TGtkTree_view_line = 3;
+
+{ set this flag to enable tree debugging output }
+{ $define TREE_DEBUG }
+function GTK_TYPE_TREE : GType;
+function GTK_TREE(obj: pointer) : PGtkTree;
+function GTK_TREE_CLASS(klass: pointer) : PGtkTreeClass;
+function GTK_IS_TREE(obj: pointer) : boolean;
+function GTK_IS_TREE_CLASS(klass: pointer) : boolean;
+function GTK_TREE_GET_CLASS(obj: pointer) : PGtkTreeClass;
+function GTK_IS_ROOT_TREE(obj: pointer) : boolean;
+function GTK_TREE_ROOT_TREE(obj: pointer) : PGtkTree;
+function GTK_TREE_SELECTION_OLD(obj: pointer) : PGList;
+
+function selection_mode(var a : TGtkTree) : guint; overload;
+procedure set_selection_mode(var a : TGtkTree; __selection_mode : guint); overload;
+function view_mode(var a : TGtkTree) : guint;
+procedure set_view_mode(var a : TGtkTree; __view_mode : guint);
+function view_line(var a : TGtkTree) : guint;
+procedure set_view_line(var a : TGtkTree; __view_line : guint);
+
+
+function gtk_tree_get_type:TGtkType; cdecl; external gtklib;
+function gtk_tree_new:PGtkWidget; cdecl; external gtklib;
+procedure gtk_tree_append(tree:PGtkTree; tree_item:PGtkWidget); cdecl; external gtklib;
+procedure gtk_tree_prepend(tree:PGtkTree; tree_item:PGtkWidget); cdecl; external gtklib;
+procedure gtk_tree_insert(tree:PGtkTree; tree_item:PGtkWidget; position:gint); cdecl; external gtklib;
+procedure gtk_tree_remove_items(tree:PGtkTree; items:PGList); cdecl; external gtklib;
+procedure gtk_tree_clear_items(tree:PGtkTree; start:gint; theEnd:gint); cdecl; external gtklib;
+procedure gtk_tree_select_item(tree:PGtkTree; item:gint); cdecl; external gtklib;
+procedure gtk_tree_unselect_item(tree:PGtkTree; item:gint); cdecl; external gtklib;
+procedure gtk_tree_select_child(tree:PGtkTree; tree_item:PGtkWidget); cdecl; external gtklib;
+procedure gtk_tree_unselect_child(tree:PGtkTree; tree_item:PGtkWidget); cdecl; external gtklib;
+function gtk_tree_child_position(tree:PGtkTree; child:PGtkWidget):gint; cdecl; external gtklib;
+procedure gtk_tree_set_selection_mode(tree:PGtkTree; mode:TGtkSelectionMode); cdecl; external gtklib;
+procedure gtk_tree_set_view_mode(tree:PGtkTree; mode:TGtkTreeViewMode); cdecl; external gtklib;
+procedure gtk_tree_set_view_lines(tree:PGtkTree; flag:gboolean); cdecl; external gtklib;
+{ deprecated function, use gtk_container_remove instead.
+ }
+procedure gtk_tree_remove_item(tree:PGtkTree; child:PGtkWidget); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TREE : GType;
+begin
+ GTK_TYPE_TREE:=gtk_tree_get_type;
+end;
+
+function GTK_TREE(obj: pointer) : PGtkTree;
+begin
+ GTK_TREE:=PGtkTree(GTK_CHECK_CAST(obj,GTK_TYPE_TREE));
+end;
+
+function GTK_TREE_CLASS(klass: pointer) : PGtkTreeClass;
+begin
+ GTK_TREE_CLASS:=PGtkTreeClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TREE));
+end;
+
+function GTK_IS_TREE(obj: pointer) : boolean;
+begin
+ GTK_IS_TREE:=GTK_CHECK_TYPE(obj,GTK_TYPE_TREE);
+end;
+
+function GTK_IS_TREE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TREE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TREE);
+end;
+
+function GTK_TREE_GET_CLASS(obj: pointer) : PGtkTreeClass;
+begin
+ GTK_TREE_GET_CLASS:=PGtkTreeClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TREE));
+end;
+
+function GTK_IS_ROOT_TREE(obj: pointer) : boolean;
+begin
+ GTK_IS_ROOT_TREE:=(PGtkObject((GTK_TREE(obj))^.root_tree)) = (PGtkObject(obj));
+end;
+
+function GTK_TREE_ROOT_TREE(obj: pointer) : PGtkTree;
+begin
+ GTK_TREE_ROOT_TREE:=GTK_TREE(obj)^.root_tree;
+end;
+
+function GTK_TREE_SELECTION_OLD(obj: pointer) : PGList;
+begin
+ GTK_TREE_SELECTION_OLD:=(GTK_TREE_ROOT_TREE(obj))^.selection;
+end;
+
+function selection_mode(var a : TGtkTree) : guint;
+begin
+ selection_mode:=(a.flag0 and bm_TGtkTree_selection_mode) shr bp_TGtkTree_selection_mode;
+end;
+
+procedure set_selection_mode(var a : TGtkTree; __selection_mode : guint);
+begin
+ a.flag0:=a.flag0 or ((__selection_mode shl bp_TGtkTree_selection_mode) and bm_TGtkTree_selection_mode);
+end;
+
+function view_mode(var a : TGtkTree) : guint;
+begin
+ view_mode:=(a.flag0 and bm_TGtkTree_view_mode) shr bp_TGtkTree_view_mode;
+end;
+
+procedure set_view_mode(var a : TGtkTree; __view_mode : guint);
+begin
+ a.flag0:=a.flag0 or ((__view_mode shl bp_TGtkTree_view_mode) and bm_TGtkTree_view_mode);
+end;
+
+function view_line(var a : TGtkTree) : guint;
+begin
+ view_line:=(a.flag0 and bm_TGtkTree_view_line) shr bp_TGtkTree_view_line;
+end;
+
+procedure set_view_line(var a : TGtkTree; __view_line : guint);
+begin
+ a.flag0:=a.flag0 or ((__view_line shl bp_TGtkTree_view_line) and bm_TGtkTree_view_line);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreedatalist.inc b/packages/gtk2/src/gtk+/gtk/gtktreedatalist.inc
new file mode 100644
index 0000000000..a7a4880892
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreedatalist.inc
@@ -0,0 +1,73 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ gtktreedatalist.h
+ Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
+
+ 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.
+ }
+{$ifndef __GTK_TREE_DATA_LIST_H__}
+{$define __GTK_TREE_DATA_LIST_H__}
+
+
+{$include "gtktreesortable.h"}
+type
+ PGtkTreeDataList = ^TGtkTreeDataList;
+ TGtkTreeDataList = record
+ next : PGtkTreeDataList;
+ data : record
+ case longint of
+ 0 : ( v_int : gint );
+ 1 : ( v_char : gint8 );
+ 2 : ( v_uchar : guint8 );
+ 3 : ( v_uint : guint );
+ 4 : ( v_float : gfloat );
+ 5 : ( v_double : gdouble );
+ 6 : ( v_pointer : gpointer );
+ end;
+ end;
+
+
+ PGtkTreeDataSortHeader = ^TGtkTreeDataSortHeader;
+ TGtkTreeDataSortHeader = record
+ sort_column_id : gint;
+ func : TGtkTreeIterCompareFunc;
+ data : gpointer;
+ destroy : TGtkDestroyNotify;
+ end;
+
+function _gtk_tree_data_list_alloc:PGtkTreeDataList; cdecl; external gtklib;
+procedure _gtk_tree_data_list_free(list:PGtkTreeDataList; column_headers:PGType); cdecl; external gtklib;
+function _gtk_tree_data_list_check_type(_type:GType):gboolean; cdecl; external gtklib;
+procedure _gtk_tree_data_list_node_to_value(list:PGtkTreeDataList; _type:GType; value:PGValue); cdecl; external gtklib;
+procedure _gtk_tree_data_list_value_to_node(list:PGtkTreeDataList; value:PGValue); cdecl; external gtklib;
+function _gtk_tree_data_list_node_copy(list:PGtkTreeDataList; _type:GType):PGtkTreeDataList; cdecl; external gtklib;
+{ Header code }
+function gtk_tree_data_list_compare_func(model:PGtkTreeModel; a:PGtkTreeIter; b:PGtkTreeIter; user_data:gpointer):gint; cdecl; external gtklib;
+function _gtk_tree_data_list_header_new(n_columns:gint; types:PGType):PGList; cdecl; external gtklib;
+procedure _gtk_tree_data_list_header_free(header_list:PGList); cdecl; external gtklib;
+function _gtk_tree_data_list_get_header(header_list:PGList; sort_column_id:gint):PGtkTreeDataSortHeader; cdecl; external gtklib;
+{$endif}
+{ __GTK_TREE_DATA_LIST_H__ }
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreednd.inc b/packages/gtk2/src/gtk+/gtk/gtktreednd.inc
new file mode 100644
index 0000000000..79e1735769
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreednd.inc
@@ -0,0 +1,117 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkTreeDragSource = pointer;
+ // internal type
+ PGtkTreeDragDest = pointer;
+
+{ VTable - not signals }
+ PGtkTreeDragSourceIface = ^TGtkTreeDragSourceIface;
+ TGtkTreeDragSourceIface = record
+ g_iface : TGTypeInterface;
+ row_draggable : function (drag_source:PGtkTreeDragSource; path:PGtkTreePath):gboolean; cdecl;
+ drag_data_get : function (drag_source:PGtkTreeDragSource; path:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl;
+ drag_data_delete : function (drag_source:PGtkTreeDragSource; path:PGtkTreePath):gboolean; cdecl;
+ end;
+
+
+{ VTable - not signals }
+ PGtkTreeDragDestIface = ^TGtkTreeDragDestIface;
+ TGtkTreeDragDestIface = record
+ g_iface : TGTypeInterface;
+ drag_data_received : function (drag_dest:PGtkTreeDragDest; dest:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl;
+ row_drop_possible : function (drag_dest:PGtkTreeDragDest; dest_path:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_TREE_DRAG_SOURCE : GType;
+function GTK_TREE_DRAG_SOURCE(obj: pointer) : PGtkTreeDragSource;
+function GTK_IS_TREE_DRAG_SOURCE(obj: pointer) : boolean;
+function GTK_TREE_DRAG_SOURCE_GET_IFACE(obj: pointer) : PGtkTreeDragSourceIface;
+
+
+function gtk_tree_drag_source_get_type:GType; cdecl; external gtklib;
+{ Returns whether the given row can be dragged }
+function gtk_tree_drag_source_row_draggable(drag_source:PGtkTreeDragSource; path:PGtkTreePath):gboolean; cdecl; external gtklib;
+{ Deletes the given row, or returns FALSE if it can't }
+function gtk_tree_drag_source_drag_data_delete(drag_source:PGtkTreeDragSource; path:PGtkTreePath):gboolean; cdecl; external gtklib;
+{ Fills in selection_data with type selection_data->target based on
+ the row denoted by path, returns TRUE if it does anything
+ }
+function gtk_tree_drag_source_drag_data_get(drag_source:PGtkTreeDragSource; path:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl; external gtklib;
+function GTK_TYPE_TREE_DRAG_DEST : GType;
+function GTK_TREE_DRAG_DEST(obj: pointer) : PGtkTreeDragDest;
+function GTK_IS_TREE_DRAG_DEST(obj: pointer) : boolean;
+function GTK_TREE_DRAG_DEST_GET_IFACE(obj: pointer) : PGtkTreeDragDestIface;
+
+
+function gtk_tree_drag_dest_get_type:GType; cdecl; external gtklib;
+{ Inserts a row before dest which contains data in selection_data,
+ or returns FALSE if it can't
+ }
+function gtk_tree_drag_dest_drag_data_received(drag_dest:PGtkTreeDragDest; dest:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl; external gtklib;
+{ Returns TRUE if we can drop before path; path may not exist. }
+function gtk_tree_drag_dest_row_drop_possible(drag_dest:PGtkTreeDragDest; dest_path:PGtkTreePath; selection_data:PGtkSelectionData):gboolean; cdecl; external gtklib;
+{ The selection data would normally have target type GTK_TREE_MODEL_ROW in this
+ case. If the target is wrong these functions return FALSE.
+ }
+function gtk_tree_set_row_drag_data(selection_data:PGtkSelectionData; tree_model:PGtkTreeModel; path:PGtkTreePath):gboolean; cdecl; external gtklib;
+function gtk_tree_get_row_drag_data(selection_data:PGtkSelectionData; var tree_model:PGtkTreeModel; var path:PGtkTreePath):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TREE_DRAG_SOURCE : GType;
+begin
+ GTK_TYPE_TREE_DRAG_SOURCE:=gtk_tree_drag_source_get_type;
+end;
+
+function GTK_TREE_DRAG_SOURCE(obj: pointer) : PGtkTreeDragSource;
+begin
+ GTK_TREE_DRAG_SOURCE:=PGtkTreeDragSource(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TREE_DRAG_SOURCE));
+end;
+
+function GTK_IS_TREE_DRAG_SOURCE(obj: pointer) : boolean;
+begin
+ GTK_IS_TREE_DRAG_SOURCE:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TREE_DRAG_SOURCE);
+end;
+
+function GTK_TREE_DRAG_SOURCE_GET_IFACE(obj: pointer) : PGtkTreeDragSourceIface;
+begin
+ GTK_TREE_DRAG_SOURCE_GET_IFACE:=PGtkTreeDragSourceIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,GTK_TYPE_TREE_DRAG_SOURCE));
+end;
+
+function GTK_TYPE_TREE_DRAG_DEST : GType;
+begin
+ GTK_TYPE_TREE_DRAG_DEST:=gtk_tree_drag_dest_get_type;
+end;
+
+function GTK_TREE_DRAG_DEST(obj: pointer) : PGtkTreeDragDest;
+begin
+ GTK_TREE_DRAG_DEST:=PGtkTreeDragDest(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TREE_DRAG_DEST));
+end;
+
+function GTK_IS_TREE_DRAG_DEST(obj: pointer) : boolean;
+begin
+ GTK_IS_TREE_DRAG_DEST:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TREE_DRAG_DEST);
+end;
+
+function GTK_TREE_DRAG_DEST_GET_IFACE(obj: pointer) : PGtkTreeDragDestIface;
+begin
+ GTK_TREE_DRAG_DEST_GET_IFACE:=PGtkTreeDragDestIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,GTK_TYPE_TREE_DRAG_DEST));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreeitem.inc b/packages/gtk2/src/gtk+/gtk/gtktreeitem.inc
new file mode 100644
index 0000000000..605fabbba0
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreeitem.inc
@@ -0,0 +1,110 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ pixmap node for this items color depth }
+ PGtkTreeItem = ^TGtkTreeItem;
+ TGtkTreeItem = record
+ item : TGtkItem;
+ subtree : PGtkWidget;
+ pixmaps_box : PGtkWidget;
+ plus_pix_widget : PGtkWidget;
+ minus_pix_widget : PGtkWidget;
+ pixmaps : PGList;
+ flag0 : word;
+ end;
+
+
+ PGtkTreeItemClass = ^TGtkTreeItemClass;
+ TGtkTreeItemClass = record
+ parent_class : TGtkItemClass;
+ expand : procedure (tree_item:PGtkTreeItem); cdecl;
+ collapse : procedure (tree_item:PGtkTreeItem); cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkTreeItem_expanded = $1;
+ bp_TGtkTreeItem_expanded = 0;
+function GTK_TYPE_TREE_ITEM : GType;
+function GTK_TREE_ITEM(obj: pointer) : PGtkTreeItem;
+function GTK_TREE_ITEM_CLASS(klass: pointer) : PGtkTreeItemClass;
+function GTK_IS_TREE_ITEM(obj: pointer) : boolean;
+function GTK_IS_TREE_ITEM_CLASS(klass: pointer) : boolean;
+function GTK_TREE_ITEM_GET_CLASS(obj: pointer) : PGtkTreeItemClass;
+function GTK_TREE_ITEM_SUBTREE(obj: pointer) : PGtkWidget;
+
+
+function expanded(var a : TGtkTreeItem) : guint; overload;
+procedure set_expanded(var a : TGtkTreeItem; __expanded : guint); overload;
+
+
+function gtk_tree_item_get_type:TGtkType; cdecl; external gtklib;
+function gtk_tree_item_new:PGtkWidget; cdecl; external gtklib;
+function gtk_tree_item_new_with_label(_label:Pgchar):PGtkWidget; cdecl; external gtklib;
+procedure gtk_tree_item_set_subtree(tree_item:PGtkTreeItem; subtree:PGtkWidget); cdecl; external gtklib;
+procedure gtk_tree_item_remove_subtree(tree_item:PGtkTreeItem); cdecl; external gtklib;
+procedure gtk_tree_item_select(tree_item:PGtkTreeItem); cdecl; external gtklib;
+procedure gtk_tree_item_deselect(tree_item:PGtkTreeItem); cdecl; external gtklib;
+procedure gtk_tree_item_expand(tree_item:PGtkTreeItem); cdecl; external gtklib;
+procedure gtk_tree_item_collapse(tree_item:PGtkTreeItem); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TREE_ITEM : GType;
+begin
+ GTK_TYPE_TREE_ITEM:=gtk_tree_item_get_type;
+end;
+
+function GTK_TREE_ITEM(obj: pointer) : PGtkTreeItem;
+begin
+ GTK_TREE_ITEM:=PGtkTreeItem(GTK_CHECK_CAST(obj,GTK_TYPE_TREE_ITEM));
+end;
+
+function GTK_TREE_ITEM_CLASS(klass: pointer) : PGtkTreeItemClass;
+begin
+ GTK_TREE_ITEM_CLASS:=PGtkTreeItemClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TREE_ITEM));
+end;
+
+function GTK_IS_TREE_ITEM(obj: pointer) : boolean;
+begin
+ GTK_IS_TREE_ITEM:=GTK_CHECK_TYPE(obj,GTK_TYPE_TREE_ITEM);
+end;
+
+function GTK_IS_TREE_ITEM_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TREE_ITEM_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TREE_ITEM);
+end;
+
+function GTK_TREE_ITEM_GET_CLASS(obj: pointer) : PGtkTreeItemClass;
+begin
+ GTK_TREE_ITEM_GET_CLASS:=PGtkTreeItemClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TREE_ITEM));
+end;
+
+function GTK_TREE_ITEM_SUBTREE(obj: pointer) : PGtkWidget;
+begin
+ GTK_TREE_ITEM_SUBTREE:=(GTK_TREE_ITEM(obj))^.subtree;
+end;
+
+function expanded(var a : TGtkTreeItem) : guint;
+begin
+ expanded:=(a.flag0 and bm_TGtkTreeItem_expanded) shr bp_TGtkTreeItem_expanded;
+end;
+
+procedure set_expanded(var a : TGtkTreeItem; __expanded : guint);
+begin
+ a.flag0:=a.flag0 or ((__expanded shl bp_TGtkTreeItem_expanded) and bm_TGtkTreeItem_expanded);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreemodel.inc b/packages/gtk2/src/gtk+/gtk/gtktreemodel.inc
new file mode 100644
index 0000000000..c48b3c7c3e
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreemodel.inc
@@ -0,0 +1,196 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ // internal type
+ PPGtkTreeModel = ^PGtkTreeModel;
+ PGtkTreeModel = pointer;
+ // internal type
+ PGtkTreePath = pointer;
+
+ PGtkTreeIter = ^TGtkTreeIter;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ TGtkTreeModelForeachFunc = function (model:PGtkTreeModel; path:PGtkTreePath;
+ iter:PGtkTreeIter; data:gpointer):gboolean; cdecl;
+
+ PGtkTreeModelFlags = ^TGtkTreeModelFlags;
+ TGtkTreeModelFlags = longint;
+
+ TGtkTreeIter = record
+ stamp : gint;
+ user_data : gpointer;
+ user_data2 : gpointer;
+ user_data3 : gpointer;
+ end;
+
+{ Signals }
+{ Virtual Table }
+ PGtkTreeModelIface = ^TGtkTreeModelIface;
+ TGtkTreeModelIface = record
+ g_iface : TGTypeInterface;
+ row_changed : procedure (tree_model:PGtkTreeModel; path:PGtkTreePath; iter:PGtkTreeIter); cdecl;
+ row_inserted : procedure (tree_model:PGtkTreeModel; path:PGtkTreePath; iter:PGtkTreeIter); cdecl;
+ row_has_child_toggled : procedure (tree_model:PGtkTreeModel; path:PGtkTreePath; iter:PGtkTreeIter); cdecl;
+ row_deleted : procedure (tree_model:PGtkTreeModel; path:PGtkTreePath); cdecl;
+ rows_reordered : procedure (tree_model:PGtkTreeModel; path:PGtkTreePath; iter:PGtkTreeIter; new_order:Pgint); cdecl;
+ get_flags : function (tree_model:PGtkTreeModel):TGtkTreeModelFlags; cdecl;
+ get_n_columns : function (tree_model:PGtkTreeModel):gint; cdecl;
+ get_column_type : function (tree_model:PGtkTreeModel; index:gint):GType; cdecl;
+ get_iter : function (tree_model:PGtkTreeModel; iter:PGtkTreeIter; path:PGtkTreePath):gboolean; cdecl;
+ get_path : function (tree_model:PGtkTreeModel; iter:PGtkTreeIter):PGtkTreePath; cdecl;
+ get_value : procedure (tree_model:PGtkTreeModel; iter:PGtkTreeIter; column:gint; value:PGValue); cdecl;
+ iter_next : function (tree_model:PGtkTreeModel; iter:PGtkTreeIter):gboolean; cdecl;
+ iter_children : function (tree_model:PGtkTreeModel; iter:PGtkTreeIter; parent:PGtkTreeIter):gboolean; cdecl;
+ iter_has_child : function (tree_model:PGtkTreeModel; iter:PGtkTreeIter):gboolean; cdecl;
+ iter_n_children : function (tree_model:PGtkTreeModel; iter:PGtkTreeIter):gint; cdecl;
+ iter_nth_child : function (tree_model:PGtkTreeModel; iter:PGtkTreeIter; parent:PGtkTreeIter; n:gint):gboolean; cdecl;
+ iter_parent : function (tree_model:PGtkTreeModel; iter:PGtkTreeIter; child:PGtkTreeIter):gboolean; cdecl;
+ ref_node : procedure (tree_model:PGtkTreeModel; iter:PGtkTreeIter); cdecl;
+ unref_node : procedure (tree_model:PGtkTreeModel; iter:PGtkTreeIter); cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_TREE_MODEL_ITERS_PERSIST = 1 shl 0;
+ GTK_TREE_MODEL_LIST_ONLY = 1 shl 1;
+
+
+function GTK_TYPE_TREE_MODEL : GType;
+function GTK_TREE_MODEL(obj: pointer) : PGtkTreeModel;
+function GTK_IS_TREE_MODEL(obj: pointer) : boolean;
+function GTK_TREE_MODEL_GET_IFACE(obj: pointer) : PGtkTreeModelIface;
+function GTK_TYPE_TREE_ITER : GType;
+function GTK_TYPE_TREE_PATH : GType;
+ { return type might be wrong }
+
+{ GtkTreePath operations }
+
+function gtk_tree_path_new:PGtkTreePath; cdecl; external gtklib;
+function gtk_tree_path_new_from_string(path:Pgchar):PGtkTreePath; cdecl; external gtklib;
+function gtk_tree_path_to_string(path:PGtkTreePath):Pgchar; cdecl; external gtklib;
+function gtk_tree_path_new_root : PGtkTreePath;
+
+function gtk_tree_path_new_first:PGtkTreePath; cdecl; external gtklib;
+procedure gtk_tree_path_append_index(path:PGtkTreePath; index:gint); cdecl; external gtklib;
+procedure gtk_tree_path_prepend_index(path:PGtkTreePath; index:gint); cdecl; external gtklib;
+function gtk_tree_path_get_depth(path:PGtkTreePath):gint; cdecl; external gtklib;
+function gtk_tree_path_get_indices(path:PGtkTreePath):Pgint; cdecl; external gtklib;
+procedure gtk_tree_path_free(path:PGtkTreePath); cdecl; external gtklib;
+function gtk_tree_path_copy(path:PGtkTreePath):PGtkTreePath; cdecl; external gtklib;
+function gtk_tree_path_get_type:GType; cdecl; external gtklib;
+function gtk_tree_path_compare(a:PGtkTreePath; b:PGtkTreePath):gint; cdecl; external gtklib;
+procedure gtk_tree_path_next(path:PGtkTreePath); cdecl; external gtklib;
+function gtk_tree_path_prev(path:PGtkTreePath):gboolean; cdecl; external gtklib;
+function gtk_tree_path_up(path:PGtkTreePath):gboolean; cdecl; external gtklib;
+procedure gtk_tree_path_down(path:PGtkTreePath); cdecl; external gtklib;
+function gtk_tree_path_is_ancestor(path:PGtkTreePath; descendant:PGtkTreePath):gboolean; cdecl; external gtklib;
+function gtk_tree_path_is_descendant(path:PGtkTreePath; ancestor:PGtkTreePath):gboolean; cdecl; external gtklib;
+{ Row reference (an anObject that tracks model changes so it refers to the same
+ row always; a path refers to a position, not a fixed row). You almost always
+ want to call gtk_tree_row_reference_new.
+ }
+function gtk_tree_row_reference_new(model:PGtkTreeModel; path:PGtkTreePath):PGtkTreeRowReference; cdecl; external gtklib;
+function gtk_tree_row_reference_new_proxy(proxy:PGObject; model:PGtkTreeModel; path:PGtkTreePath):PGtkTreeRowReference; cdecl; external gtklib;
+function gtk_tree_row_reference_get_path(reference:PGtkTreeRowReference):PGtkTreePath; cdecl; external gtklib;
+function gtk_tree_row_reference_valid(reference:PGtkTreeRowReference):gboolean; cdecl; external gtklib;
+procedure gtk_tree_row_reference_free(reference:PGtkTreeRowReference); cdecl; external gtklib;
+{ These two functions are only needed if you created the row reference with a
+ proxy anObject }
+procedure gtk_tree_row_reference_inserted(proxy:PGObject; path:PGtkTreePath); cdecl; external gtklib;
+procedure gtk_tree_row_reference_deleted(proxy:PGObject; path:PGtkTreePath); cdecl; external gtklib;
+procedure gtk_tree_row_reference_reordered(proxy:PGObject; path:PGtkTreePath; iter:PGtkTreeIter; new_order:Pgint); cdecl; external gtklib;
+{ GtkTreeIter operations }
+function gtk_tree_iter_copy(iter:PGtkTreeIter):PGtkTreeIter; cdecl; external gtklib;
+procedure gtk_tree_iter_free(iter:PGtkTreeIter); cdecl; external gtklib;
+function gtk_tree_iter_get_type:GType; cdecl; external gtklib;
+function gtk_tree_model_get_type:TGtkType; cdecl; external gtklib;
+function gtk_tree_model_get_flags(tree_model:PGtkTreeModel):TGtkTreeModelFlags; cdecl; external gtklib;
+function gtk_tree_model_get_n_columns(tree_model:PGtkTreeModel):gint; cdecl; external gtklib;
+function gtk_tree_model_get_column_type(tree_model:PGtkTreeModel; index:gint):GType; cdecl; external gtklib;
+{ Iterator movement }
+function gtk_tree_model_get_iter(tree_model:PGtkTreeModel; iter:PGtkTreeIter; path:PGtkTreePath):gboolean; cdecl; external gtklib;
+function gtk_tree_model_get_iter_from_string(tree_model:PGtkTreeModel; iter:PGtkTreeIter; path_string:Pgchar):gboolean; cdecl; external gtklib;
+function gtk_tree_model_get_iter_root(tree_model:PGtkTreeModel; iter:PGtkTreeIter):gboolean;
+
+function gtk_tree_model_get_iter_first(tree_model:PGtkTreeModel; iter:PGtkTreeIter):gboolean; cdecl; external gtklib;
+function gtk_tree_model_get_path(tree_model:PGtkTreeModel; iter:PGtkTreeIter):PGtkTreePath; cdecl; external gtklib;
+procedure gtk_tree_model_get_value(tree_model:PGtkTreeModel; iter:PGtkTreeIter; column:gint; value:PGValue); cdecl; external gtklib;
+function gtk_tree_model_iter_next(tree_model:PGtkTreeModel; iter:PGtkTreeIter):gboolean; cdecl; external gtklib;
+function gtk_tree_model_iter_children(tree_model:PGtkTreeModel; iter:PGtkTreeIter; parent:PGtkTreeIter):gboolean; cdecl; external gtklib;
+function gtk_tree_model_iter_has_child(tree_model:PGtkTreeModel; iter:PGtkTreeIter):gboolean; cdecl; external gtklib;
+function gtk_tree_model_iter_n_children(tree_model:PGtkTreeModel; iter:PGtkTreeIter):gint; cdecl; external gtklib;
+function gtk_tree_model_iter_nth_child(tree_model:PGtkTreeModel; iter:PGtkTreeIter; parent:PGtkTreeIter; n:gint):gboolean; cdecl; external gtklib;
+function gtk_tree_model_iter_parent(tree_model:PGtkTreeModel; iter:PGtkTreeIter; child:PGtkTreeIter):gboolean; cdecl; external gtklib;
+procedure gtk_tree_model_ref_node(tree_model:PGtkTreeModel; iter:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_model_unref_node(tree_model:PGtkTreeModel; iter:PGtkTreeIter); cdecl; external gtklib;
+{$IFNDEF KYLIX}
+procedure gtk_tree_model_get(tree_model:PGtkTreeModel; iter:PGtkTreeIter; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_tree_model_get(tree_model:PGtkTreeModel; iter:PGtkTreeIter); cdecl; overload; varargs; external gtklib;
+procedure gtk_tree_model_get_valist(tree_model:PGtkTreeModel; iter:PGtkTreeIter; var_args: array of const); cdecl; varargs; external gtklib;
+{$ELSE}
+procedure gtk_tree_model_get(tree_model:PGtkTreeModel; iter:PGtkTreeIter); varargs; cdecl; external gtklib;
+procedure gtk_tree_model_get_valist(tree_model:PGtkTreeModel; iter:PGtkTreeIter); varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_tree_model_foreach(model:PGtkTreeModel; func:TGtkTreeModelForeachFunc; user_data:gpointer); cdecl; external gtklib;
+{ Signals }
+procedure gtk_tree_model_row_changed(tree_model:PGtkTreeModel; path:PGtkTreePath; iter:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_model_row_inserted(tree_model:PGtkTreeModel; path:PGtkTreePath; iter:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_model_row_has_child_toggled(tree_model:PGtkTreeModel; path:PGtkTreePath; iter:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_model_row_deleted(tree_model:PGtkTreeModel; path:PGtkTreePath); cdecl; external gtklib;
+procedure gtk_tree_model_rows_reordered(tree_model:PGtkTreeModel; path:PGtkTreePath; iter:PGtkTreeIter; new_order:Pgint); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TREE_MODEL : GType;
+begin
+ GTK_TYPE_TREE_MODEL:=gtk_tree_model_get_type;
+end;
+
+function GTK_TREE_MODEL(obj: pointer) : PGtkTreeModel;
+begin
+ GTK_TREE_MODEL:=PGtkTreeModel(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TREE_MODEL));
+end;
+
+function GTK_IS_TREE_MODEL(obj: pointer) : boolean;
+begin
+ GTK_IS_TREE_MODEL:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TREE_MODEL);
+end;
+
+function GTK_TREE_MODEL_GET_IFACE(obj: pointer) : PGtkTreeModelIface;
+begin
+ GTK_TREE_MODEL_GET_IFACE:=PGtkTreeModelIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,GTK_TYPE_TREE_MODEL));
+end;
+
+function GTK_TYPE_TREE_ITER : GType;
+begin
+ GTK_TYPE_TREE_ITER:=gtk_tree_iter_get_type;
+end;
+
+function GTK_TYPE_TREE_PATH : GType;
+begin
+ GTK_TYPE_TREE_PATH:=gtk_tree_path_get_type;
+end;
+
+function gtk_tree_path_new_root : PGtkTreePath;
+begin
+ gtk_tree_path_new_root:=gtk_tree_path_new_first;
+end;
+
+function gtk_tree_model_get_iter_root(tree_model:PGtkTreeModel; iter:PGtkTreeIter):gboolean;
+begin
+ gtk_tree_model_get_iter_root:=gtk_tree_model_get_iter_first(tree_model,iter);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreemodelfilter.inc b/packages/gtk2/src/gtk+/gtk/gtktreemodelfilter.inc
new file mode 100644
index 0000000000..4be86cfe12
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreemodelfilter.inc
@@ -0,0 +1,105 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+
+ TGtkTreeModelFilterVisibleFunc = function (model:PGtkTreeModel; iter:PGtkTreeIter; data:gpointer):gboolean;cdecl;
+
+ TGtkTreeModelFilterModifyFunc = procedure (model:PGtkTreeModel; iter:PGtkTreeIter; value:PGValue; column:gint; data:gpointer);cdecl;
+
+ PGtkTreeModelFilterPrivate = pointer;
+
+ PGtkTreeModelFilter = ^TGtkTreeModelFilter;
+ TGtkTreeModelFilter = record
+ parent : TGObject;
+ priv : PGtkTreeModelFilterPrivate;
+ end;
+
+{ Padding for future expansion }
+ PGtkTreeModelFilterClass = ^TGtkTreeModelFilterClass;
+ TGtkTreeModelFilterClass = record
+ parent_class : TGObjectClass;
+ _gtk_reserved0 : procedure ;
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ end;
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_TREE_MODEL_FILTER : GType;
+function GTK_TREE_MODEL_FILTER(obj : pointer) : PGtkTreeModelFilter;
+function GTK_TREE_MODEL_FILTER_CLASS(vtable : pointer) : PGtkTreeModelFilterClass;
+function GTK_IS_TREE_MODEL_FILTER(obj : pointer) : gboolean;
+function GTK_IS_TREE_MODEL_FILTER_CLASS(vtable : pointer) : gboolean;
+function GTK_TREE_MODEL_FILTER_GET_CLASS(inst : pointer) : PGtkTreeModelFilterClass;
+
+
+{ base }
+
+function gtk_tree_model_filter_get_type:GType;cdecl;external gtklib name 'gtk_tree_model_filter_get_type';
+
+function gtk_tree_model_filter_new(child_model:PGtkTreeModel; root:PGtkTreePath):PGtkTreeModel;cdecl;external gtklib name 'gtk_tree_model_filter_new';
+
+procedure gtk_tree_model_filter_set_visible_func(filter:PGtkTreeModelFilter; func:TGtkTreeModelFilterVisibleFunc; data:gpointer; destroy:TGtkDestroyNotify);cdecl;external gtklib name 'gtk_tree_model_filter_set_visible_func';
+procedure gtk_tree_model_filter_set_modify_func(filter:PGtkTreeModelFilter; n_columns:gint; types:PGType; func:TGtkTreeModelFilterModifyFunc; data:gpointer; destroy:TGtkDestroyNotify);cdecl;external gtklib name 'gtk_tree_model_filter_set_modify_func';
+
+procedure gtk_tree_model_filter_set_visible_column(filter:PGtkTreeModelFilter; column:gint);cdecl;external gtklib name 'gtk_tree_model_filter_set_visible_column';
+function gtk_tree_model_filter_get_model(filter:PGtkTreeModelFilter):PGtkTreeModel;cdecl;external gtklib name 'gtk_tree_model_filter_get_model';
+
+
+{ conversion }
+procedure gtk_tree_model_filter_convert_child_iter_to_iter(filter:PGtkTreeModelFilter; filter_iter:PGtkTreeIter; child_iter:PGtkTreeIter);cdecl;external gtklib name 'gtk_tree_model_filter_convert_child_iter_to_iter';
+
+procedure gtk_tree_model_filter_convert_iter_to_child_iter(filter:PGtkTreeModelFilter; child_iter:PGtkTreeIter; filter_iter:PGtkTreeIter);cdecl;external gtklib name 'gtk_tree_model_filter_convert_iter_to_child_iter';
+
+function gtk_tree_model_filter_convert_child_path_to_path(filter:PGtkTreeModelFilter; child_path:PGtkTreePath):PGtkTreePath;cdecl;external gtklib name 'gtk_tree_model_filter_convert_child_path_to_path';
+
+function gtk_tree_model_filter_convert_path_to_child_path(filter:PGtkTreeModelFilter; filter_path:PGtkTreePath):PGtkTreePath;cdecl;external gtklib name 'gtk_tree_model_filter_convert_path_to_child_path';
+
+
+{ extras }
+procedure gtk_tree_model_filter_refilter(filter:PGtkTreeModelFilter);cdecl;external gtklib name 'gtk_tree_model_filter_refilter';
+procedure gtk_tree_model_filter_clear_cache(filter:PGtkTreeModelFilter);cdecl;external gtklib name 'gtk_tree_model_filter_clear_cache';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GTK_TYPE_TREE_MODEL_FILTER : GType;
+begin
+ GTK_TYPE_TREE_MODEL_FILTER:=gtk_tree_model_filter_get_type;
+end;
+
+function GTK_TREE_MODEL_FILTER(obj : pointer) : PGtkTreeModelFilter;
+begin
+ GTK_TREE_MODEL_FILTER:=PGtkTreeModelFilter(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TREE_MODEL_FILTER));
+end;
+
+function GTK_TREE_MODEL_FILTER_CLASS(vtable : pointer) : PGtkTreeModelFilterClass;
+begin
+ GTK_TREE_MODEL_FILTER_CLASS:=PGtkTreeModelFilterClass(G_TYPE_CHECK_CLASS_CAST(vtable,GTK_TYPE_TREE_MODEL_FILTER));
+end;
+
+function GTK_IS_TREE_MODEL_FILTER(obj : pointer) : gboolean;
+begin
+ GTK_IS_TREE_MODEL_FILTER:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TREE_MODEL_FILTER);
+end;
+
+function GTK_IS_TREE_MODEL_FILTER_CLASS(vtable : pointer) : gboolean;
+begin
+ GTK_IS_TREE_MODEL_FILTER_CLASS:=G_TYPE_CHECK_CLASS_TYPE(vtable,GTK_TYPE_TREE_MODEL_FILTER);
+end;
+
+function GTK_TREE_MODEL_FILTER_GET_CLASS(inst : pointer) : PGtkTreeModelFilterClass;
+begin
+ GTK_TREE_MODEL_FILTER_GET_CLASS:=PGtkTreeModelFilterClass(G_TYPE_INSTANCE_GET_CLASS(inst,GTK_TYPE_TREE_MODEL_FILTER));
+end;
+
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreemodelsort.inc b/packages/gtk2/src/gtk+/gtk/gtktreemodelsort.inc
new file mode 100644
index 0000000000..0988d7a393
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreemodelsort.inc
@@ -0,0 +1,103 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ < private > }
+{ sort information }
+{ default sort }
+{ signal ids }
+ PGtkTreeModelSort = ^TGtkTreeModelSort;
+ TGtkTreeModelSort = record
+ parent : TGObject;
+ root : gpointer;
+ stamp : gint;
+ child_flags : guint;
+ child_model : PGtkTreeModel;
+ zero_ref_count : gint;
+ sort_list : PGList;
+ sort_column_id : gint;
+ order : TGtkSortType;
+ default_sort_func : TGtkTreeIterCompareFunc;
+ default_sort_data : gpointer;
+ default_sort_destroy : TGtkDestroyNotify;
+ changed_id : guint;
+ inserted_id : guint;
+ has_child_toggled_id : guint;
+ deleted_id : guint;
+ reordered_id : guint;
+ end;
+
+{ Padding for future expansion }
+ PGtkTreeModelSortClass = ^TGtkTreeModelSortClass;
+ TGtkTreeModelSortClass = record
+ parent_class : TGObjectClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_TREE_MODEL_SORT : GType;
+function GTK_TREE_MODEL_SORT(obj: pointer) : PGtkTreeModelSort;
+function GTK_TREE_MODEL_SORT_CLASS(klass: pointer) : PGtkTreeModelSortClass;
+function GTK_IS_TREE_MODEL_SORT(obj: pointer) : boolean;
+function GTK_IS_TREE_MODEL_SORT_CLASS(klass: pointer) : boolean;
+function GTK_TREE_MODEL_SORT_GET_CLASS(obj: pointer) : PGtkTreeModelSortClass;
+
+
+function gtk_tree_model_sort_get_type:GType; cdecl; external gtklib;
+function gtk_tree_model_sort_new_with_model(child_model:PGtkTreeModel):PGtkTreeModel; cdecl; external gtklib;
+function gtk_tree_model_sort_get_model(tree_model:PGtkTreeModelSort):PGtkTreeModel; cdecl; external gtklib;
+function gtk_tree_model_sort_convert_child_path_to_path(tree_model_sort:PGtkTreeModelSort; child_path:PGtkTreePath):PGtkTreePath; cdecl; external gtklib;
+procedure gtk_tree_model_sort_convert_child_iter_to_iter(tree_model_sort:PGtkTreeModelSort; sort_iter:PGtkTreeIter; child_iter:PGtkTreeIter); cdecl; external gtklib;
+function gtk_tree_model_sort_convert_path_to_child_path(tree_model_sort:PGtkTreeModelSort; sorted_path:PGtkTreePath):PGtkTreePath; cdecl; external gtklib;
+procedure gtk_tree_model_sort_convert_iter_to_child_iter(tree_model_sort:PGtkTreeModelSort; child_iter:PGtkTreeIter; sorted_iter:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_model_sort_reset_default_sort_func(tree_model_sort:PGtkTreeModelSort); cdecl; external gtklib;
+procedure gtk_tree_model_sort_clear_cache(tree_model_sort:PGtkTreeModelSort); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TREE_MODEL_SORT : GType;
+begin
+ GTK_TYPE_TREE_MODEL_SORT:=gtk_tree_model_sort_get_type;
+end;
+
+function GTK_TREE_MODEL_SORT(obj: pointer) : PGtkTreeModelSort;
+begin
+ GTK_TREE_MODEL_SORT:=PGtkTreeModelSort(GTK_CHECK_CAST(obj,GTK_TYPE_TREE_MODEL_SORT));
+end;
+
+function GTK_TREE_MODEL_SORT_CLASS(klass: pointer) : PGtkTreeModelSortClass;
+begin
+ GTK_TREE_MODEL_SORT_CLASS:=PGtkTreeModelSortClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TREE_MODEL_SORT));
+end;
+
+function GTK_IS_TREE_MODEL_SORT(obj: pointer) : boolean;
+begin
+ GTK_IS_TREE_MODEL_SORT:=GTK_CHECK_TYPE(obj,GTK_TYPE_TREE_MODEL_SORT);
+end;
+
+function GTK_IS_TREE_MODEL_SORT_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TREE_MODEL_SORT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TREE_MODEL_SORT);
+end;
+
+function GTK_TREE_MODEL_SORT_GET_CLASS(obj: pointer) : PGtkTreeModelSortClass;
+begin
+ GTK_TREE_MODEL_SORT_GET_CLASS:=PGtkTreeModelSortClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TREE_MODEL_SORT));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreeprivate.inc b/packages/gtk2/src/gtk+/gtk/gtktreeprivate.inc
new file mode 100644
index 0000000000..1c31ea123d
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreeprivate.inc
@@ -0,0 +1,370 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkTreeRowReference = pointer;
+
+ PGtkTreeViewFlags = ^TGtkTreeViewFlags;
+ TGtkTreeViewFlags = longint;
+
+ TGtkTreeViewSearchDialogPositionFunc = procedure (tree_view:PGtkTreeView; search_dialog:PGtkWidget); cdecl;
+ PGtkTreeViewColumnReorder = ^TGtkTreeViewColumnReorder;
+ TGtkTreeViewColumnReorder = record
+ left_align : gint;
+ right_align : gint;
+ left_column : PGtkTreeViewColumn;
+ right_column : PGtkTreeViewColumn;
+ end;
+
+{ tree information }
+{ bin_window offset }
+{ dy == y pos of top_row + top_row_dy }
+{ we cache it for simplicity of the code }
+{ Focus code }
+{ Selection stuff }
+{ Column Resizing }
+{ Prelight information }
+{ The node that's currently being collapsed or expanded }
+{ Selection information }
+{ Header information }
+{ ATK Hack }
+{ Scroll timeout (e.g. during dnd) }
+{ Row drag-and-drop }
+{ Scroll-to functionality when unrealized }
+{ hint to display rows in alternating colors }
+{ interactive search }
+ PGtkTreeViewPrivate = ^TGtkTreeViewPrivate;
+ TGtkTreeViewPrivate = record
+ model : PGtkTreeModel;
+ flags : guint;
+ tree : PGtkRBTree;
+ button_pressed_node : PGtkRBNode;
+ button_pressed_tree : PGtkRBTree;
+ children : PGList;
+ width : gint;
+ height : gint;
+ expander_size : gint;
+ hadjustment : PGtkAdjustment;
+ vadjustment : PGtkAdjustment;
+ bin_window : PGdkWindow;
+ header_window : PGdkWindow;
+ drag_window : PGdkWindow;
+ drag_highlight_window : PGdkWindow;
+ drag_column : PGtkTreeViewColumn;
+ last_button_press : PGtkTreeRowReference;
+ last_button_press_2 : PGtkTreeRowReference;
+ top_row : PGtkTreeRowReference;
+ top_row_dy : gint;
+ dy : gint;
+ drag_column_x : gint;
+ expander_column : PGtkTreeViewColumn;
+ edited_column : PGtkTreeViewColumn;
+ presize_handler_timer : guint;
+ validate_rows_timer : guint;
+ scroll_sync_timer : guint;
+ focus_column : PGtkTreeViewColumn;
+ anchor : PGtkTreeRowReference;
+ cursor : PGtkTreeRowReference;
+ drag_pos : gint;
+ x_drag : gint;
+ prelight_node : PGtkRBNode;
+ prelight_tree : PGtkRBTree;
+ expanded_collapsed_node : PGtkRBNode;
+ expanded_collapsed_tree : PGtkRBTree;
+ expand_collapse_timeout : guint;
+ selection : PGtkTreeSelection;
+ n_columns : gint;
+ columns : PGList;
+ header_height : gint;
+ column_drop_func : TGtkTreeViewColumnDropFunc;
+ column_drop_func_data : gpointer;
+ column_drop_func_data_destroy : TGtkDestroyNotify;
+ column_drag_info : PGList;
+ cur_reorder : PGtkTreeViewColumnReorder;
+ destroy_count_func : TGtkTreeDestroyCountFunc;
+ destroy_count_data : gpointer;
+ destroy_count_destroy : TGtkDestroyNotify;
+ scroll_timeout : guint;
+ drag_dest_row : PGtkTreeRowReference;
+ drag_dest_pos : TGtkTreeViewDropPosition;
+ open_dest_timeout : guint;
+ pressed_button : gint;
+ press_start_x : gint;
+ press_start_y : gint;
+ scroll_to_path : PGtkTreeRowReference;
+ scroll_to_column : PGtkTreeViewColumn;
+ scroll_to_row_align : gfloat;
+ scroll_to_col_align : gfloat;
+ flag0 : word;
+ search_column : gint;
+ search_dialog_position_func : TGtkTreeViewSearchDialogPositionFunc;
+ search_equal_func : TGtkTreeViewSearchEqualFunc;
+ search_user_data : gpointer;
+ search_destroy : TGtkDestroyNotify;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ TREE_VIEW_DRAG_WIDTH = 6;
+
+ GTK_TREE_VIEW_IS_LIST = 1 shl 0;
+ GTK_TREE_VIEW_SHOW_EXPANDERS = 1 shl 1;
+ GTK_TREE_VIEW_IN_COLUMN_RESIZE = 1 shl 2;
+ GTK_TREE_VIEW_ARROW_PRELIT = 1 shl 3;
+ GTK_TREE_VIEW_HEADERS_VISIBLE = 1 shl 4;
+ GTK_TREE_VIEW_DRAW_KEYFOCUS = 1 shl 5;
+ GTK_TREE_VIEW_MODEL_SETUP = 1 shl 6;
+ GTK_TREE_VIEW_IN_COLUMN_DRAG = 1 shl 7;
+
+ DRAG_COLUMN_WINDOW_STATE_UNSET = 0;
+ DRAG_COLUMN_WINDOW_STATE_ORIGINAL = 1;
+ DRAG_COLUMN_WINDOW_STATE_ARROW = 2;
+ DRAG_COLUMN_WINDOW_STATE_ARROW_LEFT = 3;
+ DRAG_COLUMN_WINDOW_STATE_ARROW_RIGHT = 4;
+
+procedure GTK_TREE_VIEW_SET_FLAG(tree_view: PGtkTreeView; flag : guint);
+procedure GTK_TREE_VIEW_UNSET_FLAG(tree_view: PGtkTreeView; flag : guint);
+function GTK_TREE_VIEW_FLAG_SET(tree_view: PGtkTreeView; flag : guint) : boolean;
+function TREE_VIEW_HEADER_HEIGHT(tree_view : PGtkTreeView) : longint;
+function TREE_VIEW_COLUMN_REQUESTED_WIDTH(column : PGtkTreeViewColumn) : longint;
+function TREE_VIEW_DRAW_EXPANDERS(tree_view : PGtkTreeView) : boolean;
+
+{ This lovely little value is used to determine how far away from the title bar
+ you can move the mouse and still have a column drag work.
+ }
+function TREE_VIEW_COLUMN_DRAG_DEAD_MULTIPLIER(tree_view : PGtkTreeView) : longint;
+
+
+const
+ bm_TGtkTreeViewPrivate_scroll_to_use_align = $1;
+ bp_TGtkTreeViewPrivate_scroll_to_use_align = 0;
+ bm_TGtkTreeViewPrivate_fixed_height_check = $2;
+ bp_TGtkTreeViewPrivate_fixed_height_check = 1;
+ bm_TGtkTreeViewPrivate_reorderable = $4;
+ bp_TGtkTreeViewPrivate_reorderable = 2;
+ bm_TGtkTreeViewPrivate_header_has_focus = $8;
+ bp_TGtkTreeViewPrivate_header_has_focus = 3;
+ bm_TGtkTreeViewPrivate_drag_column_window_state = $70;
+ bp_TGtkTreeViewPrivate_drag_column_window_state = 4;
+ bm_TGtkTreeViewPrivate_has_rules = $80;
+ bp_TGtkTreeViewPrivate_has_rules = 7;
+ bm_TGtkTreeViewPrivate_mark_rows_col_dirty = $100;
+ bp_TGtkTreeViewPrivate_mark_rows_col_dirty = 8;
+ bm_TGtkTreeViewPrivate_enable_search = $200;
+ bp_TGtkTreeViewPrivate_enable_search = 9;
+ bm_TGtkTreeViewPrivate_disable_popdown = $400;
+ bp_TGtkTreeViewPrivate_disable_popdown = 10;
+
+function scroll_to_use_align(var a : TGtkTreeViewPrivate) : guint;
+procedure set_scroll_to_use_align(var a : TGtkTreeViewPrivate; __scroll_to_use_align : guint);
+function fixed_height_check(var a : TGtkTreeViewPrivate) : guint;
+procedure set_fixed_height_check(var a : TGtkTreeViewPrivate; __fixed_height_check : guint);
+function reorderable(var a : TGtkTreeViewPrivate) : guint; overload;
+procedure set_reorderable(var a : TGtkTreeViewPrivate; __reorderable : guint); overload;
+function header_has_focus(var a : TGtkTreeViewPrivate) : guint;
+procedure set_header_has_focus(var a : TGtkTreeViewPrivate; __header_has_focus : guint);
+function drag_column_window_state(var a : TGtkTreeViewPrivate) : guint;
+procedure set_drag_column_window_state(var a : TGtkTreeViewPrivate; __drag_column_window_state : guint);
+function has_rules(var a : TGtkTreeViewPrivate) : guint;
+procedure set_has_rules(var a : TGtkTreeViewPrivate; __has_rules : guint);
+function mark_rows_col_dirty(var a : TGtkTreeViewPrivate) : guint;
+procedure set_mark_rows_col_dirty(var a : TGtkTreeViewPrivate; __mark_rows_col_dirty : guint);
+function enable_search(var a : TGtkTreeViewPrivate) : guint;
+procedure set_enable_search(var a : TGtkTreeViewPrivate; __enable_search : guint);
+function disable_popdown(var a : TGtkTreeViewPrivate) : guint;
+procedure set_disable_popdown(var a : TGtkTreeViewPrivate; __disable_popdown : guint);
+
+
+{ functions that shouldn't be exported }
+procedure _gtk_tree_selection_internal_select_node(selection:PGtkTreeSelection; node:PGtkRBNode; tree:PGtkRBTree; path:PGtkTreePath; state:TGdkModifierType;
+ override_browse_mode:gboolean); cdecl; external gtklib;
+function _gtk_tree_view_find_node(tree_view:PGtkTreeView; path:PGtkTreePath; var tree:PGtkRBTree; var node:PGtkRBNode):gboolean; cdecl; external gtklib;
+function _gtk_tree_view_find_path(tree_view:PGtkTreeView; tree:PGtkRBTree; node:PGtkRBNode):PGtkTreePath; cdecl; external gtklib;
+procedure _gtk_tree_view_child_move_resize(tree_view:PGtkTreeView; widget:PGtkWidget; x:gint; y:gint; width:gint;
+ height:gint); cdecl; external gtklib;
+procedure _gtk_tree_view_queue_draw_node(tree_view:PGtkTreeView; tree:PGtkRBTree; node:PGtkRBNode; clip_rect:PGdkRectangle); cdecl; external gtklib;
+procedure _gtk_tree_view_column_realize_button(column:PGtkTreeViewColumn); cdecl; external gtklib;
+procedure _gtk_tree_view_column_unrealize_button(column:PGtkTreeViewColumn); cdecl; external gtklib;
+procedure _gtk_tree_view_column_set_tree_view(column:PGtkTreeViewColumn; tree_view:PGtkTreeView); cdecl; external gtklib;
+procedure _gtk_tree_view_column_unset_tree_view(column:PGtkTreeViewColumn); cdecl; external gtklib;
+procedure _gtk_tree_view_column_set_width(column:PGtkTreeViewColumn; width:gint); cdecl; external gtklib;
+procedure _gtk_tree_view_column_start_drag(tree_view:PGtkTreeView; column:PGtkTreeViewColumn); cdecl; external gtklib;
+function _gtk_tree_view_column_cell_event(tree_column:PGtkTreeViewColumn; var editable_widget:PGtkCellEditable; event:PGdkEvent; path_string:Pgchar; background_area:PGdkRectangle;
+ cell_area:PGdkRectangle; flags:guint):gboolean; cdecl; external gtklib;
+procedure _gtk_tree_view_column_start_editing(tree_column:PGtkTreeViewColumn; editable_widget:PGtkCellEditable); cdecl; external gtklib;
+procedure _gtk_tree_view_column_stop_editing(tree_column:PGtkTreeViewColumn); cdecl; external gtklib;
+procedure _gtk_tree_view_install_mark_rows_col_dirty(tree_view:PGtkTreeView); cdecl; external gtklib;
+procedure _gtk_tree_view_column_autosize(tree_view:PGtkTreeView; column:PGtkTreeViewColumn); cdecl; external gtklib;
+function _gtk_tree_view_column_has_editable_cell(column:PGtkTreeViewColumn):gboolean; cdecl; external gtklib;
+function _gtk_tree_view_column_get_edited_cell(column:PGtkTreeViewColumn):PGtkCellRenderer; cdecl; external gtklib;
+function _gtk_tree_view_column_count_special_cells(column:PGtkTreeViewColumn):gint; cdecl; external gtklib;
+function _gtk_tree_view_column_get_cell_at_pos(column:PGtkTreeViewColumn; x:gint):PGtkCellRenderer; cdecl; external gtklib;
+function _gtk_tree_selection_new:PGtkTreeSelection; cdecl; external gtklib;
+function _gtk_tree_selection_new_with_tree_view(tree_view:PGtkTreeView):PGtkTreeSelection; cdecl; external gtklib;
+procedure _gtk_tree_selection_set_tree_view(selection:PGtkTreeSelection; tree_view:PGtkTreeView); cdecl; external gtklib;
+procedure _gtk_tree_view_column_cell_render(tree_column:PGtkTreeViewColumn; window:PGdkWindow; background_area:PGdkRectangle; cell_area:PGdkRectangle; expose_area:PGdkRectangle;
+ flags:guint); cdecl; external gtklib;
+function _gtk_tree_view_column_cell_focus(tree_column:PGtkTreeViewColumn; direction:gint; left:gboolean; right:gboolean):gboolean; cdecl; external gtklib;
+procedure _gtk_tree_view_column_cell_draw_focus(tree_column:PGtkTreeViewColumn; window:PGdkWindow; background_area:PGdkRectangle; cell_area:PGdkRectangle; expose_area:PGdkRectangle;
+ flags:guint); cdecl; external gtklib;
+procedure _gtk_tree_view_column_cell_set_dirty(tree_column:PGtkTreeViewColumn; install_handler:gboolean); cdecl; external gtklib;
+procedure _gtk_tree_view_column_get_neighbor_sizes(column:PGtkTreeViewColumn; cell:PGtkCellRenderer; left:Pgint; right:Pgint); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TREE_VIEW_FLAG_SET(tree_view: PGtkTreeView; flag : guint) : boolean;
+begin
+ GTK_TREE_VIEW_FLAG_SET:=((tree_view^.priv^.flags) and flag) = flag;
+end;
+
+function TREE_VIEW_HEADER_HEIGHT(tree_view : PGtkTreeView) : longint;
+var
+ if_local1 : longint;
+begin
+ if GTK_TREE_VIEW_FLAG_SET(tree_view,GTK_TREE_VIEW_HEADERS_VISIBLE) then
+ if_local1:=tree_view^.priv^.header_height
+ else
+ if_local1:=0;
+ TREE_VIEW_HEADER_HEIGHT:=if_local1;
+end;
+
+function TREE_VIEW_COLUMN_REQUESTED_WIDTH(column : PGtkTreeViewColumn) : longint;
+var
+ MinWidth, MaxWidth: integer;
+begin
+ if column^.min_width<>-1 then
+ MinWidth:=column^.min_width
+ else
+ MinWidth:=column^.requested_width;
+ if column^.max_width<>-1 then
+ MaxWidth:=column^.max_width
+ else
+ MaxWidth:=column^.requested_width;
+ TREE_VIEW_COLUMN_REQUESTED_WIDTH:=CLAMP(column^.requested_width,MinWidth,MaxWidth);
+end;
+
+function TREE_VIEW_DRAW_EXPANDERS(tree_view : PGtkTreeView) : boolean;
+begin
+ TREE_VIEW_DRAW_EXPANDERS:=(not (GTK_TREE_VIEW_FLAG_SET(tree_view,GTK_TREE_VIEW_IS_LIST)))
+ and (GTK_TREE_VIEW_FLAG_SET(tree_view,GTK_TREE_VIEW_SHOW_EXPANDERS));
+end;
+
+function TREE_VIEW_COLUMN_DRAG_DEAD_MULTIPLIER(tree_view : PGtkTreeView) : longint;
+begin
+ TREE_VIEW_COLUMN_DRAG_DEAD_MULTIPLIER:=10 * (TREE_VIEW_HEADER_HEIGHT(tree_view));
+end;
+
+function scroll_to_use_align(var a : TGtkTreeViewPrivate) : guint;
+begin
+ scroll_to_use_align:=(a.flag0 and bm_TGtkTreeViewPrivate_scroll_to_use_align) shr bp_TGtkTreeViewPrivate_scroll_to_use_align;
+end;
+
+procedure set_scroll_to_use_align(var a : TGtkTreeViewPrivate; __scroll_to_use_align : guint);
+begin
+ a.flag0:=a.flag0 or ((__scroll_to_use_align shl bp_TGtkTreeViewPrivate_scroll_to_use_align) and bm_TGtkTreeViewPrivate_scroll_to_use_align);
+end;
+
+function fixed_height_check(var a : TGtkTreeViewPrivate) : guint;
+begin
+ fixed_height_check:=(a.flag0 and bm_TGtkTreeViewPrivate_fixed_height_check) shr bp_TGtkTreeViewPrivate_fixed_height_check;
+end;
+
+procedure set_fixed_height_check(var a : TGtkTreeViewPrivate; __fixed_height_check : guint);
+begin
+ a.flag0:=a.flag0 or ((__fixed_height_check shl bp_TGtkTreeViewPrivate_fixed_height_check) and bm_TGtkTreeViewPrivate_fixed_height_check);
+end;
+
+function reorderable(var a : TGtkTreeViewPrivate) : guint;
+begin
+ reorderable:=(a.flag0 and bm_TGtkTreeViewPrivate_reorderable) shr bp_TGtkTreeViewPrivate_reorderable;
+end;
+
+procedure set_reorderable(var a : TGtkTreeViewPrivate; __reorderable : guint);
+begin
+ a.flag0:=a.flag0 or ((__reorderable shl bp_TGtkTreeViewPrivate_reorderable) and bm_TGtkTreeViewPrivate_reorderable);
+end;
+
+function header_has_focus(var a : TGtkTreeViewPrivate) : guint;
+begin
+ header_has_focus:=(a.flag0 and bm_TGtkTreeViewPrivate_header_has_focus) shr bp_TGtkTreeViewPrivate_header_has_focus;
+end;
+
+procedure set_header_has_focus(var a : TGtkTreeViewPrivate; __header_has_focus : guint);
+begin
+ a.flag0:=a.flag0 or ((__header_has_focus shl bp_TGtkTreeViewPrivate_header_has_focus) and bm_TGtkTreeViewPrivate_header_has_focus);
+end;
+
+function drag_column_window_state(var a : TGtkTreeViewPrivate) : guint;
+begin
+ drag_column_window_state:=(a.flag0 and bm_TGtkTreeViewPrivate_drag_column_window_state) shr bp_TGtkTreeViewPrivate_drag_column_window_state;
+end;
+
+procedure set_drag_column_window_state(var a : TGtkTreeViewPrivate; __drag_column_window_state : guint);
+begin
+ a.flag0:=a.flag0 or ((__drag_column_window_state shl bp_TGtkTreeViewPrivate_drag_column_window_state) and bm_TGtkTreeViewPrivate_drag_column_window_state);
+end;
+
+function has_rules(var a : TGtkTreeViewPrivate) : guint;
+begin
+ has_rules:=(a.flag0 and bm_TGtkTreeViewPrivate_has_rules) shr bp_TGtkTreeViewPrivate_has_rules;
+end;
+
+procedure set_has_rules(var a : TGtkTreeViewPrivate; __has_rules : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_rules shl bp_TGtkTreeViewPrivate_has_rules) and bm_TGtkTreeViewPrivate_has_rules);
+end;
+
+function mark_rows_col_dirty(var a : TGtkTreeViewPrivate) : guint;
+begin
+ mark_rows_col_dirty:=(a.flag0 and bm_TGtkTreeViewPrivate_mark_rows_col_dirty) shr bp_TGtkTreeViewPrivate_mark_rows_col_dirty;
+end;
+
+procedure set_mark_rows_col_dirty(var a : TGtkTreeViewPrivate; __mark_rows_col_dirty : guint);
+begin
+ a.flag0:=a.flag0 or ((__mark_rows_col_dirty shl bp_TGtkTreeViewPrivate_mark_rows_col_dirty) and bm_TGtkTreeViewPrivate_mark_rows_col_dirty);
+end;
+
+function enable_search(var a : TGtkTreeViewPrivate) : guint;
+begin
+ enable_search:=(a.flag0 and bm_TGtkTreeViewPrivate_enable_search) shr bp_TGtkTreeViewPrivate_enable_search;
+end;
+
+procedure set_enable_search(var a : TGtkTreeViewPrivate; __enable_search : guint);
+begin
+ a.flag0:=a.flag0 or ((__enable_search shl bp_TGtkTreeViewPrivate_enable_search) and bm_TGtkTreeViewPrivate_enable_search);
+end;
+
+function disable_popdown(var a : TGtkTreeViewPrivate) : guint;
+begin
+ disable_popdown:=(a.flag0 and bm_TGtkTreeViewPrivate_disable_popdown) shr bp_TGtkTreeViewPrivate_disable_popdown;
+end;
+
+procedure set_disable_popdown(var a : TGtkTreeViewPrivate; __disable_popdown : guint);
+begin
+ a.flag0:=a.flag0 or ((__disable_popdown shl bp_TGtkTreeViewPrivate_disable_popdown) and bm_TGtkTreeViewPrivate_disable_popdown);
+end;
+
+procedure GTK_TREE_VIEW_SET_FLAG(tree_view: PGtkTreeView; flag : guint);
+begin
+ tree_view^.priv^.flags:=tree_view^.priv^.flags or flag;
+end;
+
+procedure GTK_TREE_VIEW_UNSET_FLAG(tree_view: PGtkTreeView; flag : guint);
+begin
+ tree_view^.priv^.flags:=tree_view^.priv^.flags and not flag;
+end;
+
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreeselection.inc b/packages/gtk2/src/gtk+/gtk/gtktreeselection.inc
new file mode 100644
index 0000000000..47f0bac143
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreeselection.inc
@@ -0,0 +1,106 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkTreeSelection = ^TGtkTreeSelection;
+
+ TGtkTreeSelectionFunc = function (selection:PGtkTreeSelection; model:PGtkTreeModel; path:PGtkTreePath; path_currently_selected:gboolean; data:gpointer):gboolean; cdecl;
+
+ TGtkTreeSelectionForeachFunc = procedure (model:PGtkTreeModel; path:PGtkTreePath; iter:PGtkTreeIter; data:gpointer); cdecl;
+{< private > }
+ TGtkTreeSelection = record
+ parent : TGObject;
+ tree_view : PGtkTreeView;
+ _type : TGtkSelectionMode;
+ user_func : TGtkTreeSelectionFunc;
+ user_data : gpointer;
+ destroy : TGtkDestroyNotify;
+ end;
+
+{ Padding for future expansion }
+ PGtkTreeSelectionClass = ^TGtkTreeSelectionClass;
+ TGtkTreeSelectionClass = record
+ parent_class : TGObjectClass;
+ changed : procedure (selection:PGtkTreeSelection); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_TREE_SELECTION : GType;
+function GTK_TREE_SELECTION(obj: pointer) : PGtkTreeSelection;
+function GTK_TREE_SELECTION_CLASS(klass: pointer) : PGtkTreeSelectionClass;
+function GTK_IS_TREE_SELECTION(obj: pointer) : boolean;
+function GTK_IS_TREE_SELECTION_CLASS(klass: pointer) : boolean;
+function GTK_TREE_SELECTION_GET_CLASS(obj: pointer) : PGtkTreeSelectionClass;
+
+
+
+function gtk_tree_selection_get_type:TGtkType; cdecl; external gtklib;
+procedure gtk_tree_selection_set_mode(selection:PGtkTreeSelection; _type:TGtkSelectionMode); cdecl; external gtklib;
+function gtk_tree_selection_get_mode(selection:PGtkTreeSelection):TGtkSelectionMode; cdecl; external gtklib;
+procedure gtk_tree_selection_set_select_function(selection:PGtkTreeSelection; func:TGtkTreeSelectionFunc; data:gpointer; destroy:TGtkDestroyNotify); cdecl; external gtklib;
+function gtk_tree_selection_get_user_data(selection:PGtkTreeSelection):gpointer; cdecl; external gtklib;
+function gtk_tree_selection_get_tree_view(selection:PGtkTreeSelection):PGtkTreeView; cdecl; external gtklib;
+{ Only meaningful if GTK_TREE_SELECTION_SINGLE is set }
+{ Use selected_foreach for GTK_TREE_SELECTION_MULTI }
+function gtk_tree_selection_get_selected(selection:PGtkTreeSelection; model:PPGtkTreeModel; iter:PGtkTreeIter):gboolean; cdecl; external gtklib;
+{ gtk_tree_selection_get_selected_rows was later added, so maybe some older libs don't have it }
+function gtk_tree_selection_get_selected_rows(selection:PGtkTreeSelection; model:PPGtkTreeModel):PGList; cdecl; external gtklib;
+procedure gtk_tree_selection_selected_foreach(selection:PGtkTreeSelection; func:TGtkTreeSelectionForeachFunc; data:gpointer); cdecl; external gtklib;
+procedure gtk_tree_selection_select_path(selection:PGtkTreeSelection; path:PGtkTreePath); cdecl; external gtklib;
+procedure gtk_tree_selection_unselect_path(selection:PGtkTreeSelection; path:PGtkTreePath); cdecl; external gtklib;
+procedure gtk_tree_selection_select_iter(selection:PGtkTreeSelection; iter:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_selection_unselect_iter(selection:PGtkTreeSelection; iter:PGtkTreeIter); cdecl; external gtklib;
+function gtk_tree_selection_path_is_selected(selection:PGtkTreeSelection; path:PGtkTreePath):gboolean; cdecl; external gtklib;
+function gtk_tree_selection_iter_is_selected(selection:PGtkTreeSelection; iter:PGtkTreeIter):gboolean; cdecl; external gtklib;
+procedure gtk_tree_selection_select_all(selection:PGtkTreeSelection); cdecl; external gtklib;
+procedure gtk_tree_selection_unselect_all(selection:PGtkTreeSelection); cdecl; external gtklib;
+procedure gtk_tree_selection_select_range(selection:PGtkTreeSelection; start_path:PGtkTreePath; end_path:PGtkTreePath); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TREE_SELECTION : GType;
+begin
+ GTK_TYPE_TREE_SELECTION:=gtk_tree_selection_get_type;
+end;
+
+function GTK_TREE_SELECTION(obj: pointer) : PGtkTreeSelection;
+begin
+ GTK_TREE_SELECTION:=PGtkTreeSelection(GTK_CHECK_CAST(obj,GTK_TYPE_TREE_SELECTION));
+end;
+
+function GTK_TREE_SELECTION_CLASS(klass: pointer) : PGtkTreeSelectionClass;
+begin
+ GTK_TREE_SELECTION_CLASS:=PGtkTreeSelectionClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TREE_SELECTION));
+end;
+
+function GTK_IS_TREE_SELECTION(obj: pointer) : boolean;
+begin
+ GTK_IS_TREE_SELECTION:=GTK_CHECK_TYPE(obj,GTK_TYPE_TREE_SELECTION);
+end;
+
+function GTK_IS_TREE_SELECTION_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TREE_SELECTION_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TREE_SELECTION);
+end;
+
+function GTK_TREE_SELECTION_GET_CLASS(obj: pointer) : PGtkTreeSelectionClass;
+begin
+ GTK_TREE_SELECTION_GET_CLASS:=PGtkTreeSelectionClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TREE_SELECTION));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreesortable.inc b/packages/gtk2/src/gtk+/gtk/gtktreesortable.inc
new file mode 100644
index 0000000000..6750a4c377
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreesortable.inc
@@ -0,0 +1,82 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type
+ PGtkTreeSortable = pointer;
+
+ TGtkTreeIterCompareFunc = function (model:PGtkTreeModel; a:PGtkTreeIter; b:PGtkTreeIter; user_data:gpointer):gint; cdecl;
+{ signals }
+{ virtual table }
+ PGtkTreeSortableIface = ^TGtkTreeSortableIface;
+ TGtkTreeSortableIface = record
+ g_iface : TGTypeInterface;
+ sort_column_changed : procedure (sortable:PGtkTreeSortable); cdecl;
+ get_sort_column_id : function (sortable:PGtkTreeSortable; sort_column_id:Pgint; order:PGtkSortType):gboolean; cdecl;
+ set_sort_column_id : procedure (sortable:PGtkTreeSortable; sort_column_id:gint; order:TGtkSortType); cdecl;
+ set_sort_func : procedure (sortable:PGtkTreeSortable; sort_column_id:gint; func:TGtkTreeIterCompareFunc; data:gpointer; destroy:TGtkDestroyNotify); cdecl;
+ set_default_sort_func : procedure (sortable:PGtkTreeSortable; func:TGtkTreeIterCompareFunc; data:gpointer; destroy:TGtkDestroyNotify); cdecl;
+ has_default_sort_func : function (sortable:PGtkTreeSortable):gboolean; cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID = -(1);
+
+
+function GTK_TYPE_TREE_SORTABLE : GType;
+function GTK_TREE_SORTABLE(obj: pointer) : PGtkTreeSortable;
+function GTK_TREE_SORTABLE_CLASS(obj: pointer) : PGtkTreeSortableIface;
+function GTK_IS_TREE_SORTABLE(obj: pointer) : boolean;
+function GTK_TREE_SORTABLE_GET_IFACE(obj: pointer) : PGtkTreeSortableIface;
+
+
+
+function gtk_tree_sortable_get_type:GType; cdecl; external gtklib;
+procedure gtk_tree_sortable_sort_column_changed(sortable:PGtkTreeSortable); cdecl; external gtklib;
+function gtk_tree_sortable_get_sort_column_id(sortable:PGtkTreeSortable; sort_column_id:Pgint; order:PGtkSortType):gboolean; cdecl; external gtklib;
+procedure gtk_tree_sortable_set_sort_column_id(sortable:PGtkTreeSortable; sort_column_id:gint; order:TGtkSortType); cdecl; external gtklib;
+procedure gtk_tree_sortable_set_sort_func(sortable:PGtkTreeSortable; sort_column_id:gint; sort_func:TGtkTreeIterCompareFunc; user_data:gpointer; destroy:TGtkDestroyNotify); cdecl; external gtklib;
+procedure gtk_tree_sortable_set_default_sort_func(sortable:PGtkTreeSortable; sort_func:TGtkTreeIterCompareFunc; user_data:gpointer; destroy:TGtkDestroyNotify); cdecl; external gtklib;
+function gtk_tree_sortable_has_default_sort_func(sortable:PGtkTreeSortable):gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TREE_SORTABLE : GType;
+begin
+ GTK_TYPE_TREE_SORTABLE:=gtk_tree_sortable_get_type;
+end;
+
+function GTK_TREE_SORTABLE(obj: pointer) : PGtkTreeSortable;
+begin
+ GTK_TREE_SORTABLE:=PGtkTreeSortable(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_TREE_SORTABLE));
+end;
+
+function GTK_TREE_SORTABLE_CLASS(obj: pointer) : PGtkTreeSortableIface;
+begin
+ GTK_TREE_SORTABLE_CLASS:=PGtkTreeSortableIface(G_TYPE_CHECK_CLASS_CAST(obj,GTK_TYPE_TREE_SORTABLE));
+end;
+
+function GTK_IS_TREE_SORTABLE(obj: pointer) : boolean;
+begin
+ GTK_IS_TREE_SORTABLE:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_TREE_SORTABLE);
+end;
+
+function GTK_TREE_SORTABLE_GET_IFACE(obj: pointer) : PGtkTreeSortableIface;
+begin
+ GTK_TREE_SORTABLE_GET_IFACE:=PGtkTreeSortableIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,GTK_TYPE_TREE_SORTABLE));
+end;
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreestore.inc b/packages/gtk2/src/gtk+/gtk/gtktreestore.inc
new file mode 100644
index 0000000000..f45d7d6efe
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreestore.inc
@@ -0,0 +1,146 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkTreeStore = ^TGtkTreeStore;
+ TGtkTreeStore = record
+ parent : TGObject;
+ stamp : gint;
+ root : gpointer;
+ last : gpointer;
+ n_columns : gint;
+ sort_column_id : gint;
+ sort_list : PGList;
+ order : TGtkSortType;
+ column_headers : PGType;
+ default_sort_func : TGtkTreeIterCompareFunc;
+ default_sort_data : gpointer;
+ default_sort_destroy : TGtkDestroyNotify;
+ flag0 : word;
+ end;
+
+
+{ Padding for future expansion }
+ PGtkTreeStoreClass = ^TGtkTreeStoreClass;
+ TGtkTreeStoreClass = record
+ parent_class : TGObjectClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkTreeStore_columns_dirty = $1;
+ bp_TGtkTreeStore_columns_dirty = 0;
+
+
+function GTK_TYPE_TREE_STORE : GType;
+function GTK_TREE_STORE(obj: pointer) : PGtkTreeStore;
+function GTK_TREE_STORE_CLASS(klass: pointer) : PGtkTreeStoreClass;
+function GTK_IS_TREE_STORE(obj: pointer) : boolean;
+function GTK_IS_TREE_STORE_CLASS(klass: pointer) : boolean;
+function GTK_TREE_STORE_GET_CLASS(obj: pointer) : PGtkTreeStoreClass;
+
+
+function columns_dirty(var a : TGtkTreeStore) : guint; overload;
+procedure set_columns_dirty(var a : TGtkTreeStore; __columns_dirty : guint); overload;
+
+
+function gtk_tree_store_get_type:TGtkType; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+function gtk_tree_store_new(n_columns:gint):PGtkTreeStore; cdecl; overload; external gtklib;
+function gtk_tree_store_new(n_columns:gint; args:array of const):PGtkTreeStore; cdecl; overload; varargs; external gtklib;
+{$ELSE}
+function gtk_tree_store_new(n_columns:gint):PGtkTreeStore; varargs; cdecl; external gtklib;
+{$ENDIF}
+function gtk_tree_store_newv(n_columns:gint; types:PGType):PGtkTreeStore; cdecl; external gtklib;
+procedure gtk_tree_store_set_column_types(tree_store:PGtkTreeStore; n_columns:gint; types:PGType); cdecl; external gtklib;
+{ NOTE: use gtk_tree_model_get to get values from a GtkTreeStore }
+procedure gtk_tree_store_set_value(tree_store:PGtkTreeStore; iter:PGtkTreeIter; column:gint; value:PGValue); cdecl; external gtklib;
+{$IFNDEF KYLIX}
+procedure gtk_tree_store_set(tree_store:PGtkTreeStore; iter:PGtkTreeIter; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_tree_store_set(tree_store:PGtkTreeStore; iter:PGtkTreeIter); cdecl; overload; varargs; external gtklib;
+procedure gtk_tree_store_set_valist(tree_store:PGtkTreeStore; iter:PGtkTreeIter; var_args: array of const); cdecl; external gtklib;
+{$ELSE}
+procedure gtk_tree_store_set(tree_store:PGtkTreeStore; iter:PGtkTreeIter); varargs; cdecl; external gtklib;
+procedure gtk_tree_store_set_valist(tree_store:PGtkTreeStore; iter:PGtkTreeIter); varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_tree_store_remove(tree_store:PGtkTreeStore; iter:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_store_insert(tree_store:PGtkTreeStore; iter:PGtkTreeIter; parent:PGtkTreeIter; position:gint); cdecl; external gtklib;
+procedure gtk_tree_store_insert_before(tree_store:PGtkTreeStore; iter:PGtkTreeIter; parent:PGtkTreeIter; sibling:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_store_insert_after(tree_store:PGtkTreeStore; iter:PGtkTreeIter; parent:PGtkTreeIter; sibling:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_store_prepend(tree_store:PGtkTreeStore; iter:PGtkTreeIter; parent:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_store_append(tree_store:PGtkTreeStore; iter:PGtkTreeIter; parent:PGtkTreeIter); cdecl; external gtklib;
+function gtk_tree_store_is_ancestor(tree_store:PGtkTreeStore; iter:PGtkTreeIter; descendant:PGtkTreeIter):gboolean; cdecl; external gtklib;
+function gtk_tree_store_iter_depth(tree_store:PGtkTreeStore; iter:PGtkTreeIter):gint; cdecl; external gtklib;
+procedure gtk_tree_store_clear(tree_store:PGtkTreeStore); cdecl; external gtklib;
+
+{$IFDEF GTK2_2}
+function gtk_tree_store_iter_is_valid(tree_store:PGtkTreeStore;
+ iter:PGtkTreeIter):gboolean; cdecl; external gtklib;
+procedure gtk_tree_store_reorder(tree_store:PGtkTreeStore;
+ parent:PGtkTreeIter; new_order:pgint); cdecl; external gtklib;
+procedure gtk_tree_store_swap(tree_store:PGtkTreeStore;
+ a:PGtkTreeIter; b:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_store_move_before(tree_store:PGtkTreeStore;
+ iter:PGtkTreeIter; position:PGtkTreeIter); cdecl; external gtklib;
+procedure gtk_tree_store_move_after(tree_store:PGtkTreeStore;
+ iter:PGtkTreeIter; position:PGtkTreeIter); cdecl; external gtklib;
+{$ENDIF}
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TREE_STORE : GType;
+begin
+ GTK_TYPE_TREE_STORE:=gtk_tree_store_get_type;
+end;
+
+function GTK_TREE_STORE(obj: pointer) : PGtkTreeStore;
+begin
+ GTK_TREE_STORE:=PGtkTreeStore(GTK_CHECK_CAST(obj,GTK_TYPE_TREE_STORE));
+end;
+
+function GTK_TREE_STORE_CLASS(klass: pointer) : PGtkTreeStoreClass;
+begin
+ GTK_TREE_STORE_CLASS:=PGtkTreeStoreClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TREE_STORE));
+end;
+
+function GTK_IS_TREE_STORE(obj: pointer) : boolean;
+begin
+ GTK_IS_TREE_STORE:=GTK_CHECK_TYPE(obj,GTK_TYPE_TREE_STORE);
+end;
+
+function GTK_IS_TREE_STORE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TREE_STORE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TREE_STORE);
+end;
+
+function GTK_TREE_STORE_GET_CLASS(obj: pointer) : PGtkTreeStoreClass;
+begin
+ GTK_TREE_STORE_GET_CLASS:=PGtkTreeStoreClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TREE_STORE));
+end;
+
+function columns_dirty(var a : TGtkTreeStore) : guint;
+begin
+ columns_dirty:=(a.flag0 and bm_TGtkTreeStore_columns_dirty) shr bp_TGtkTreeStore_columns_dirty;
+end;
+
+procedure set_columns_dirty(var a : TGtkTreeStore; __columns_dirty : guint);
+begin
+ a.flag0:=a.flag0 or ((__columns_dirty shl bp_TGtkTreeStore_columns_dirty) and bm_TGtkTreeStore_columns_dirty);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreeview.inc b/packages/gtk2/src/gtk+/gtk/gtktreeview.inc
new file mode 100644
index 0000000000..d7df7f265f
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreeview.inc
@@ -0,0 +1,198 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ PGtkTreeView = ^TGtkTreeView;
+
+ TGtkTreeViewColumnDropFunc = function (tree_view:PGtkTreeView; column:PGtkTreeViewColumn; prev_column:PGtkTreeViewColumn; next_column:PGtkTreeViewColumn; data:gpointer):gboolean; cdecl;
+
+ TGtkTreeViewMappingFunc = procedure (tree_view:PGtkTreeView; path:PGtkTreePath; user_data:gpointer); cdecl;
+
+ TGtkTreeViewSearchEqualFunc = function (model:PGtkTreeModel; column:gint; key:Pgchar; iter:PGtkTreeIter; search_data:gpointer):gboolean; cdecl;
+
+{ This function should really never be used. It is just for use by ATK.
+ }
+ TGtkTreeDestroyCountFunc = procedure (tree_view:PGtkTreeView; path:PGtkTreePath; children:gint; user_data:gpointer); cdecl;
+
+{ drop before/after this row }
+{ drop as a child of this row (with fallback to before or after
+ if into is not possible)
+ }
+ PGtkTreeViewDropPosition = ^TGtkTreeViewDropPosition;
+ TGtkTreeViewDropPosition = (
+ GTK_TREE_VIEW_DROP_BEFORE,
+ GTK_TREE_VIEW_DROP_AFTER,
+ GTK_TREE_VIEW_DROP_INTO_OR_BEFORE,
+ GTK_TREE_VIEW_DROP_INTO_OR_AFTER
+ );
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ TGtkTreeView = record
+ parent : TGtkContainer;
+ priv : PGtkTreeViewPrivate;
+ end;
+
+{ Key Binding signals }
+{ Padding for future expansion }
+ PGtkTreeViewClass = ^TGtkTreeViewClass;
+ TGtkTreeViewClass = record
+ parent_class : TGtkContainerClass;
+ set_scroll_adjustments : procedure (tree_view:PGtkTreeView; hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment); cdecl;
+ row_activated : procedure (tree_view:PGtkTreeView; path:PGtkTreePath; column:PGtkTreeViewColumn); cdecl;
+ test_expand_row : function (tree_view:PGtkTreeView; iter:PGtkTreeIter; path:PGtkTreePath):gboolean; cdecl;
+ test_collapse_row : function (tree_view:PGtkTreeView; iter:PGtkTreeIter; path:PGtkTreePath):gboolean; cdecl;
+ row_expanded : procedure (tree_view:PGtkTreeView; iter:PGtkTreeIter; path:PGtkTreePath); cdecl;
+ row_collapsed : procedure (tree_view:PGtkTreeView; iter:PGtkTreeIter; path:PGtkTreePath); cdecl;
+ columns_changed : procedure (tree_view:PGtkTreeView); cdecl;
+ cursor_changed : procedure (tree_view:PGtkTreeView); cdecl;
+ move_cursor : function (tree_view:PGtkTreeView; step:TGtkMovementStep; count:gint):gboolean; cdecl;
+ select_all : procedure (tree_view:PGtkTreeView); cdecl;
+ unselect_all : procedure (tree_view:PGtkTreeView); cdecl;
+ select_cursor_row : procedure (tree_view:PGtkTreeView; start_editing:gboolean); cdecl;
+ toggle_cursor_row : procedure (tree_view:PGtkTreeView); cdecl;
+ expand_collapse_cursor_row : procedure (tree_view:PGtkTreeView; logical:gboolean; expand:gboolean; open_all:gboolean); cdecl;
+ select_cursor_parent : procedure (tree_view:PGtkTreeView); cdecl;
+ start_interactive_search : procedure (tree_view:PGtkTreeView); cdecl;
+ _gtk_reserved0 : procedure ; cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_TREE_VIEW : GType;
+function GTK_TREE_VIEW(obj: pointer) : PGtkTreeView;
+function GTK_TREE_VIEW_CLASS(klass: pointer) : PGtkTreeViewClass;
+function GTK_IS_TREE_VIEW(obj: pointer) : boolean;
+function GTK_IS_TREE_VIEW_CLASS(klass: pointer) : boolean;
+function GTK_TREE_VIEW_GET_CLASS(obj: pointer) : PGtkTreeViewClass;
+
+{ Creators }
+
+function gtk_tree_view_get_type:TGtkType; cdecl; external gtklib;
+function gtk_tree_view_new:PGtkWidget; cdecl; external gtklib;
+function gtk_tree_view_new_with_model(model:PGtkTreeModel):PGtkWidget; cdecl; external gtklib;
+{ Accessors }
+function gtk_tree_view_get_model(tree_view:PGtkTreeView):PGtkTreeModel; cdecl; external gtklib;
+procedure gtk_tree_view_set_model(tree_view:PGtkTreeView; model:PGtkTreeModel); cdecl; external gtklib;
+function gtk_tree_view_get_selection(tree_view:PGtkTreeView):PGtkTreeSelection; cdecl; external gtklib;
+function gtk_tree_view_get_hadjustment(tree_view:PGtkTreeView):PGtkAdjustment; cdecl; external gtklib;
+procedure gtk_tree_view_set_hadjustment(tree_view:PGtkTreeView; adjustment:PGtkAdjustment); cdecl; external gtklib;
+function gtk_tree_view_get_vadjustment(tree_view:PGtkTreeView):PGtkAdjustment; cdecl; external gtklib;
+procedure gtk_tree_view_set_vadjustment(tree_view:PGtkTreeView; adjustment:PGtkAdjustment); cdecl; external gtklib;
+function gtk_tree_view_get_headers_visible(tree_view:PGtkTreeView):gboolean; cdecl; external gtklib;
+procedure gtk_tree_view_set_headers_visible(tree_view:PGtkTreeView; headers_visible:gboolean); cdecl; external gtklib;
+procedure gtk_tree_view_columns_autosize(tree_view:PGtkTreeView); cdecl; external gtklib;
+procedure gtk_tree_view_set_headers_clickable(tree_view:PGtkTreeView; setting:gboolean); cdecl; external gtklib;
+procedure gtk_tree_view_set_rules_hint(tree_view:PGtkTreeView; setting:gboolean); cdecl; external gtklib;
+function gtk_tree_view_get_rules_hint(tree_view:PGtkTreeView):gboolean; cdecl; external gtklib;
+{ Column funtions }
+function gtk_tree_view_append_column(tree_view:PGtkTreeView; column:PGtkTreeViewColumn):gint; cdecl; external gtklib;
+function gtk_tree_view_remove_column(tree_view:PGtkTreeView; column:PGtkTreeViewColumn):gint; cdecl; external gtklib;
+function gtk_tree_view_insert_column(tree_view:PGtkTreeView; column:PGtkTreeViewColumn; position:gint):gint; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+function gtk_tree_view_insert_column_with_attributes(tree_view:PGtkTreeView; position:gint; title:Pgchar; cell:PGtkCellRenderer; args:array of const):gint; cdecl; overload; external gtklib;
+function gtk_tree_view_insert_column_with_attributes(tree_view:PGtkTreeView; position:gint; title:Pgchar; cell:PGtkCellRenderer):gint; cdecl; overload; varargs; external gtklib;
+{$ELSE}
+function gtk_tree_view_insert_column_with_attributes(tree_view:PGtkTreeView; position:gint; title:Pgchar; cell:PGtkCellRenderer):gint; varargs; cdecl; external gtklib;
+{$ENDIF}
+function gtk_tree_view_insert_column_with_data_func(tree_view:PGtkTreeView; position:gint; title:Pgchar; cell:PGtkCellRenderer; func:TGtkTreeCellDataFunc;
+ data:gpointer; dnotify:TGDestroyNotify):gint; cdecl; external gtklib;
+function gtk_tree_view_get_column(tree_view:PGtkTreeView; n:gint):PGtkTreeViewColumn; cdecl; external gtklib;
+function gtk_tree_view_get_columns(tree_view:PGtkTreeView):PGList; cdecl; external gtklib;
+procedure gtk_tree_view_move_column_after(tree_view:PGtkTreeView; column:PGtkTreeViewColumn; base_column:PGtkTreeViewColumn); cdecl; external gtklib;
+procedure gtk_tree_view_set_expander_column(tree_view:PGtkTreeView; column:PGtkTreeViewColumn); cdecl; external gtklib;
+function gtk_tree_view_get_expander_column(tree_view:PGtkTreeView):PGtkTreeViewColumn; cdecl; external gtklib;
+procedure gtk_tree_view_set_column_drag_function(tree_view:PGtkTreeView; func:TGtkTreeViewColumnDropFunc; user_data:gpointer; destroy:TGtkDestroyNotify); cdecl; external gtklib;
+{ Actions }
+procedure gtk_tree_view_scroll_to_point(tree_view:PGtkTreeView; tree_x:gint; tree_y:gint); cdecl; external gtklib;
+procedure gtk_tree_view_scroll_to_cell(tree_view:PGtkTreeView; path:PGtkTreePath; column:PGtkTreeViewColumn; use_align:gboolean; row_align:gfloat;
+ col_align:gfloat); cdecl; external gtklib;
+procedure gtk_tree_view_row_activated(tree_view:PGtkTreeView; path:PGtkTreePath; column:PGtkTreeViewColumn); cdecl; external gtklib;
+procedure gtk_tree_view_expand_all(tree_view:PGtkTreeView); cdecl; external gtklib;
+procedure gtk_tree_view_collapse_all(tree_view:PGtkTreeView); cdecl; external gtklib;
+function gtk_tree_view_expand_row(tree_view:PGtkTreeView; path:PGtkTreePath; open_all:gboolean):gboolean; cdecl; external gtklib;
+function gtk_tree_view_collapse_row(tree_view:PGtkTreeView; path:PGtkTreePath):gboolean; cdecl; external gtklib;
+procedure gtk_tree_view_map_expanded_rows(tree_view:PGtkTreeView; func:TGtkTreeViewMappingFunc; data:gpointer); cdecl; external gtklib;
+function gtk_tree_view_row_expanded(tree_view:PGtkTreeView; path:PGtkTreePath):gboolean; cdecl; external gtklib;
+procedure gtk_tree_view_set_reorderable(tree_view:PGtkTreeView; reorderable:gboolean); cdecl; external gtklib;
+function gtk_tree_view_get_reorderable(tree_view:PGtkTreeView):gboolean; cdecl; external gtklib;
+procedure gtk_tree_view_set_cursor(tree_view:PGtkTreeView; path:PGtkTreePath; focus_column:PGtkTreeViewColumn; start_editing:gboolean); cdecl; external gtklib;
+procedure gtk_tree_view_set_cursor_on_cell(tree_view:PGtkTreeView; path:PGtkTreePath; focus_column:PGtkTreeViewColumn; focus_cell:PGtkCellRenderer; start_editing:gboolean); cdecl; external gtklib;
+procedure gtk_tree_view_get_cursor(tree_view:PGtkTreeView; var path:PGtkTreePath; var focus_column:PGtkTreeViewColumn); cdecl; external gtklib;
+{ Layout information }
+function gtk_tree_view_get_bin_window(tree_view:PGtkTreeView):PGdkWindow; cdecl; external gtklib;
+function gtk_tree_view_get_path_at_pos(tree_view:PGtkTreeView; x:gint; y:gint; var path:PGtkTreePath; var column:PGtkTreeViewColumn;
+ cell_x:Pgint; cell_y:Pgint):gboolean; cdecl; external gtklib;
+procedure gtk_tree_view_get_cell_area(tree_view:PGtkTreeView; path:PGtkTreePath; column:PGtkTreeViewColumn; rect:PGdkRectangle); cdecl; external gtklib;
+procedure gtk_tree_view_get_background_area(tree_view:PGtkTreeView; path:PGtkTreePath; column:PGtkTreeViewColumn; rect:PGdkRectangle); cdecl; external gtklib;
+procedure gtk_tree_view_get_visible_rect(tree_view:PGtkTreeView; visible_rect:PGdkRectangle); cdecl; external gtklib;
+procedure gtk_tree_view_widget_to_tree_coords(tree_view:PGtkTreeView; wx:gint; wy:gint; tx:Pgint; ty:Pgint); cdecl; external gtklib;
+procedure gtk_tree_view_tree_to_widget_coords(tree_view:PGtkTreeView; tx:gint; ty:gint; wx:Pgint; wy:Pgint); cdecl; external gtklib;
+{ Drag-and-Drop support }
+procedure gtk_tree_view_enable_model_drag_source(tree_view:PGtkTreeView; start_button_mask:TGdkModifierType; targets:PGtkTargetEntry; n_targets:gint; actions:TGdkDragAction); cdecl; external gtklib;
+procedure gtk_tree_view_enable_model_drag_dest(tree_view:PGtkTreeView; targets:PGtkTargetEntry; n_targets:gint; actions:TGdkDragAction); cdecl; external gtklib;
+procedure gtk_tree_view_unset_rows_drag_source(tree_view:PGtkTreeView); cdecl; external gtklib;
+procedure gtk_tree_view_unset_rows_drag_dest(tree_view:PGtkTreeView); cdecl; external gtklib;
+{ These are useful to implement your own custom stuff. }
+procedure gtk_tree_view_set_drag_dest_row(tree_view:PGtkTreeView; path:PGtkTreePath; pos:TGtkTreeViewDropPosition); cdecl; external gtklib;
+procedure gtk_tree_view_get_drag_dest_row(tree_view:PGtkTreeView; var path:PGtkTreePath; pos:PGtkTreeViewDropPosition); cdecl; external gtklib;
+function gtk_tree_view_get_dest_row_at_pos(tree_view:PGtkTreeView; drag_x:gint; drag_y:gint; var path:PGtkTreePath; pos:PGtkTreeViewDropPosition):gboolean; cdecl; external gtklib;
+function gtk_tree_view_create_row_drag_icon(tree_view:PGtkTreeView; path:PGtkTreePath):PGdkPixmap; cdecl; external gtklib;
+{ Interactive search }
+procedure gtk_tree_view_set_enable_search(tree_view:PGtkTreeView; enable_search:gboolean); cdecl; external gtklib;
+function gtk_tree_view_get_enable_search(tree_view:PGtkTreeView):gboolean; cdecl; external gtklib;
+function gtk_tree_view_get_search_column(tree_view:PGtkTreeView):gint; cdecl; external gtklib;
+procedure gtk_tree_view_set_search_column(tree_view:PGtkTreeView; column:gint); cdecl; external gtklib;
+function gtk_tree_view_get_search_equal_func(tree_view:PGtkTreeView):TGtkTreeViewSearchEqualFunc; cdecl; external gtklib;
+procedure gtk_tree_view_set_search_equal_func(tree_view:PGtkTreeView; search_equal_func:TGtkTreeViewSearchEqualFunc; search_user_data:gpointer; search_destroy:TGtkDestroyNotify); cdecl; external gtklib;
+
+procedure gtk_tree_view_set_destroy_count_func(tree_view:PGtkTreeView; func:TGtkTreeDestroyCountFunc; data:gpointer; destroy:TGtkDestroyNotify); cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TREE_VIEW : GType;
+begin
+ GTK_TYPE_TREE_VIEW:=gtk_tree_view_get_type;
+end;
+
+function GTK_TREE_VIEW(obj: pointer) : PGtkTreeView;
+begin
+ GTK_TREE_VIEW:=PGtkTreeView(GTK_CHECK_CAST(obj,GTK_TYPE_TREE_VIEW));
+end;
+
+function GTK_TREE_VIEW_CLASS(klass: pointer) : PGtkTreeViewClass;
+begin
+ GTK_TREE_VIEW_CLASS:=PGtkTreeViewClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TREE_VIEW));
+end;
+
+function GTK_IS_TREE_VIEW(obj: pointer) : boolean;
+begin
+ GTK_IS_TREE_VIEW:=GTK_CHECK_TYPE(obj,GTK_TYPE_TREE_VIEW);
+end;
+
+function GTK_IS_TREE_VIEW_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TREE_VIEW_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TREE_VIEW);
+end;
+
+function GTK_TREE_VIEW_GET_CLASS(obj: pointer) : PGtkTreeViewClass;
+begin
+ GTK_TREE_VIEW_GET_CLASS:=PGtkTreeViewClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TREE_VIEW));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktreeviewcolumn.inc b/packages/gtk2/src/gtk+/gtk/gtktreeviewcolumn.inc
new file mode 100644
index 0000000000..cde9f56fbb
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktreeviewcolumn.inc
@@ -0,0 +1,306 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ PGtkTreeViewColumn = ^TGtkTreeViewColumn;
+
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ PGtkTreeViewColumnSizing = ^TGtkTreeViewColumnSizing;
+ TGtkTreeViewColumnSizing = (
+ GTK_TREE_VIEW_COLUMN_GROW_ONLY,
+ GTK_TREE_VIEW_COLUMN_AUTOSIZE,
+ GTK_TREE_VIEW_COLUMN_FIXED
+ );
+
+ TGtkTreeCellDataFunc = procedure (tree_column:PGtkTreeViewColumn;
+ cell:PGtkCellRenderer;
+ tree_model:PGtkTreeModel;
+ iter:PGtkTreeIter; data:gpointer); cdecl;
+{ Sizing fields }
+{ see gtk+/doc/tree-column-sizing.txt for more information on them }
+{ dragging columns }
+{ Sorting }
+{ Flags }
+ TGtkTreeViewColumn = record
+ parent : TGtkObject;
+ tree_view : PGtkWidget;
+ button : PGtkWidget;
+ child : PGtkWidget;
+ arrow : PGtkWidget;
+ alignment : PGtkWidget;
+ window : PGdkWindow;
+ editable_widget : PGtkCellEditable;
+ xalign : gfloat;
+ property_changed_signal : guint;
+ spacing : gint;
+ column_type : TGtkTreeViewColumnSizing;
+ requested_width : gint;
+ button_request : gint;
+ resized_width : gint;
+ width : gint;
+ fixed_width : gint;
+ min_width : gint;
+ max_width : gint;
+ drag_x : gint;
+ drag_y : gint;
+ title : Pgchar;
+ cell_list : PGList;
+ sort_clicked_signal : guint;
+ sort_column_changed_signal : guint;
+ sort_column_id : gint;
+ sort_order : TGtkSortType;
+ flag0 : word;
+ end;
+
+
+{ Padding for future expansion }
+ PGtkTreeViewColumnClass = ^TGtkTreeViewColumnClass;
+ TGtkTreeViewColumnClass = record
+ parent_class : TGtkObjectClass;
+ clicked : procedure (tree_column:PGtkTreeViewColumn); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkTreeViewColumn_visible = $1;
+ bp_TGtkTreeViewColumn_visible = 0;
+ bm_TGtkTreeViewColumn_resizable = $2;
+ bp_TGtkTreeViewColumn_resizable = 1;
+ bm_TGtkTreeViewColumn_clickable = $4;
+ bp_TGtkTreeViewColumn_clickable = 2;
+ bm_TGtkTreeViewColumn_dirty = $8;
+ bp_TGtkTreeViewColumn_dirty = 3;
+ bm_TGtkTreeViewColumn_show_sort_indicator = $10;
+ bp_TGtkTreeViewColumn_show_sort_indicator = 4;
+ bm_TGtkTreeViewColumn_maybe_reordered = $20;
+ bp_TGtkTreeViewColumn_maybe_reordered = 5;
+ bm_TGtkTreeViewColumn_reorderable = $40;
+ bp_TGtkTreeViewColumn_reorderable = 6;
+ bm_TGtkTreeViewColumn_use_resized_width = $80;
+ bp_TGtkTreeViewColumn_use_resized_width = 7;
+
+
+function GTK_TYPE_TREE_VIEW_COLUMN : GType;
+function GTK_TREE_VIEW_COLUMN(obj: pointer) : PGtkTreeViewColumn;
+function GTK_TREE_VIEW_COLUMN_CLASS(klass: pointer) : PGtkTreeViewColumnClass;
+function GTK_IS_TREE_VIEW_COLUMN(obj: pointer) : boolean;
+function GTK_IS_TREE_VIEW_COLUMN_CLASS(klass: pointer) : boolean;
+function GTK_TREE_VIEW_COLUMN_GET_CLASS(obj: pointer) : PGtkTreeViewColumnClass;
+
+
+function visible(var a : TGtkTreeViewColumn) : guint; overload;
+procedure set_visible(var a : TGtkTreeViewColumn; __visible : guint); overload;
+function resizable(var a : TGtkTreeViewColumn) : guint;
+procedure set_resizable(var a : TGtkTreeViewColumn; __resizable : guint);
+function clickable(var a : TGtkTreeViewColumn) : guint;
+procedure set_clickable(var a : TGtkTreeViewColumn; __clickable : guint);
+function dirty(var a : TGtkTreeViewColumn) : guint;
+procedure set_dirty(var a : TGtkTreeViewColumn; __dirty : guint);
+function show_sort_indicator(var a : TGtkTreeViewColumn) : guint;
+procedure set_show_sort_indicator(var a : TGtkTreeViewColumn; __show_sort_indicator : guint);
+function maybe_reordered(var a : TGtkTreeViewColumn) : guint;
+procedure set_maybe_reordered(var a : TGtkTreeViewColumn; __maybe_reordered : guint);
+function reorderable(var a : TGtkTreeViewColumn) : guint; overload;
+procedure set_reorderable(var a : TGtkTreeViewColumn; __reorderable : guint); overload;
+function use_resized_width(var a : TGtkTreeViewColumn) : guint;
+procedure set_use_resized_width(var a : TGtkTreeViewColumn; __use_resized_width : guint);
+
+
+function gtk_tree_view_column_get_type:TGtkType; cdecl; external gtklib;
+function gtk_tree_view_column_new:PGtkTreeViewColumn; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+function gtk_tree_view_column_new_with_attributes(title:Pgchar; cell:PGtkCellRenderer; args:array of const):PGtkTreeViewColumn; cdecl; overload; external gtklib;
+function gtk_tree_view_column_new_with_attributes(title:Pgchar; cell:PGtkCellRenderer):PGtkTreeViewColumn; cdecl; overload; varargs; external gtklib;
+{$ELSE}
+function gtk_tree_view_column_new_with_attributes(title:Pgchar; cell:PGtkCellRenderer):PGtkTreeViewColumn; varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_tree_view_column_pack_start(tree_column:PGtkTreeViewColumn; cell:PGtkCellRenderer; expand:gboolean); cdecl; external gtklib;
+procedure gtk_tree_view_column_pack_end(tree_column:PGtkTreeViewColumn; cell:PGtkCellRenderer; expand:gboolean); cdecl; external gtklib;
+procedure gtk_tree_view_column_clear(tree_column:PGtkTreeViewColumn); cdecl; external gtklib;
+function gtk_tree_view_column_get_cell_renderers(tree_column:PGtkTreeViewColumn):PGList; cdecl; external gtklib;
+procedure gtk_tree_view_column_add_attribute(tree_column:PGtkTreeViewColumn; cell_renderer:PGtkCellRenderer; attribute:Pgchar; column:gint); cdecl; external gtklib;
+{$IFNDEF KYLIX}
+procedure gtk_tree_view_column_set_attributes(tree_column:PGtkTreeViewColumn; cell_renderer:PGtkCellRenderer; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_tree_view_column_set_attributes(tree_column:PGtkTreeViewColumn; cell_renderer:PGtkCellRenderer); cdecl; overload; varargs; external gtklib;
+{$ELSE}
+procedure gtk_tree_view_column_set_attributes(tree_column:PGtkTreeViewColumn; cell_renderer:PGtkCellRenderer); varargs; cdecl; external gtklib;
+{$ENDIF}
+procedure gtk_tree_view_column_set_cell_data_func(tree_column:PGtkTreeViewColumn; cell_renderer:PGtkCellRenderer; func:TGtkTreeCellDataFunc; func_data:gpointer; destroy:TGtkDestroyNotify); cdecl; external gtklib;
+procedure gtk_tree_view_column_clear_attributes(tree_column:PGtkTreeViewColumn; cell_renderer:PGtkCellRenderer); cdecl; external gtklib;
+procedure gtk_tree_view_column_set_spacing(tree_column:PGtkTreeViewColumn; spacing:gint); cdecl; external gtklib;
+function gtk_tree_view_column_get_spacing(tree_column:PGtkTreeViewColumn):gint; cdecl; external gtklib;
+procedure gtk_tree_view_column_set_visible(tree_column:PGtkTreeViewColumn; visible:gboolean); cdecl; external gtklib;
+function gtk_tree_view_column_get_visible(tree_column:PGtkTreeViewColumn):gboolean; cdecl; external gtklib;
+procedure gtk_tree_view_column_set_resizable(tree_column:PGtkTreeViewColumn; resizable:gboolean); cdecl; external gtklib;
+function gtk_tree_view_column_get_resizable(tree_column:PGtkTreeViewColumn):gboolean; cdecl; external gtklib;
+procedure gtk_tree_view_column_set_sizing(tree_column:PGtkTreeViewColumn; _type:TGtkTreeViewColumnSizing); cdecl; external gtklib;
+function gtk_tree_view_column_get_sizing(tree_column:PGtkTreeViewColumn):TGtkTreeViewColumnSizing; cdecl; external gtklib;
+function gtk_tree_view_column_get_width(tree_column:PGtkTreeViewColumn):gint; cdecl; external gtklib;
+function gtk_tree_view_column_get_fixed_width(tree_column:PGtkTreeViewColumn):gint; cdecl; external gtklib;
+procedure gtk_tree_view_column_set_fixed_width(tree_column:PGtkTreeViewColumn; fixed_width:gint); cdecl; external gtklib;
+procedure gtk_tree_view_column_set_min_width(tree_column:PGtkTreeViewColumn; min_width:gint); cdecl; external gtklib;
+function gtk_tree_view_column_get_min_width(tree_column:PGtkTreeViewColumn):gint; cdecl; external gtklib;
+procedure gtk_tree_view_column_set_max_width(tree_column:PGtkTreeViewColumn; max_width:gint); cdecl; external gtklib;
+function gtk_tree_view_column_get_max_width(tree_column:PGtkTreeViewColumn):gint; cdecl; external gtklib;
+procedure gtk_tree_view_column_clicked(tree_column:PGtkTreeViewColumn); cdecl; external gtklib;
+{ Options for manipulating the column headers
+ }
+procedure gtk_tree_view_column_set_title(tree_column:PGtkTreeViewColumn; title:Pgchar); cdecl; external gtklib;
+function gtk_tree_view_column_get_title(tree_column:PGtkTreeViewColumn):Pgchar; cdecl; external gtklib;
+procedure gtk_tree_view_column_set_clickable(tree_column:PGtkTreeViewColumn; clickable:gboolean); cdecl; external gtklib;
+function gtk_tree_view_column_get_clickable(tree_column:PGtkTreeViewColumn):gboolean; cdecl; external gtklib;
+procedure gtk_tree_view_column_set_widget(tree_column:PGtkTreeViewColumn; widget:PGtkWidget); cdecl; external gtklib;
+function gtk_tree_view_column_get_widget(tree_column:PGtkTreeViewColumn):PGtkWidget; cdecl; external gtklib;
+procedure gtk_tree_view_column_set_alignment(tree_column:PGtkTreeViewColumn; xalign:gfloat); cdecl; external gtklib;
+function gtk_tree_view_column_get_alignment(tree_column:PGtkTreeViewColumn):gfloat; cdecl; external gtklib;
+procedure gtk_tree_view_column_set_reorderable(tree_column:PGtkTreeViewColumn; reorderable:gboolean); cdecl; external gtklib;
+function gtk_tree_view_column_get_reorderable(tree_column:PGtkTreeViewColumn):gboolean; cdecl; external gtklib;
+{ You probably only want to use gtk_tree_view_column_set_sort_column_id. The
+ other sorting functions exist primarily to let others do their own custom sorting.
+ }
+procedure gtk_tree_view_column_set_sort_column_id(tree_column:PGtkTreeViewColumn; sort_column_id:gint); cdecl; external gtklib;
+function gtk_tree_view_column_get_sort_column_id(tree_column:PGtkTreeViewColumn):gint; cdecl; external gtklib;
+procedure gtk_tree_view_column_set_sort_indicator(tree_column:PGtkTreeViewColumn; setting:gboolean); cdecl; external gtklib;
+function gtk_tree_view_column_get_sort_indicator(tree_column:PGtkTreeViewColumn):gboolean; cdecl; external gtklib;
+procedure gtk_tree_view_column_set_sort_order(tree_column:PGtkTreeViewColumn; order:TGtkSortType); cdecl; external gtklib;
+function gtk_tree_view_column_get_sort_order(tree_column:PGtkTreeViewColumn):TGtkSortType; cdecl; external gtklib;
+{ These functions are meant primarily for interaction between the GtkTreeView and the column.
+ }
+procedure gtk_tree_view_column_cell_set_cell_data(tree_column:PGtkTreeViewColumn; tree_model:PGtkTreeModel; iter:PGtkTreeIter; is_expander:gboolean; is_expanded:gboolean); cdecl; external gtklib;
+procedure gtk_tree_view_column_cell_get_size(tree_column:PGtkTreeViewColumn; cell_area:PGdkRectangle; x_offset:Pgint; y_offset:Pgint; width:Pgint;
+ height:Pgint); cdecl; external gtklib;
+function gtk_tree_view_column_cell_is_visible(tree_column:PGtkTreeViewColumn):gboolean; cdecl; external gtklib;
+procedure gtk_tree_view_column_focus_cell(tree_column:PGtkTreeViewColumn; cell:PGtkCellRenderer); cdecl; external gtklib;
+
+// since gtk 2.4
+procedure gtk_tree_view_column_set_expand(tree_column: PGtkTreeViewColumn; Expand : gboolean); cdecl; external gtklib;
+function gtk_tree_view_column_get_expand(tree_column: PGtkTreeViewColumn): gboolean; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_TREE_VIEW_COLUMN : GType;
+begin
+ GTK_TYPE_TREE_VIEW_COLUMN:=gtk_tree_view_column_get_type;
+end;
+
+function GTK_TREE_VIEW_COLUMN(obj: pointer) : PGtkTreeViewColumn;
+begin
+ GTK_TREE_VIEW_COLUMN:=PGtkTreeViewColumn(GTK_CHECK_CAST(obj,GTK_TYPE_TREE_VIEW_COLUMN));
+end;
+
+function GTK_TREE_VIEW_COLUMN_CLASS(klass: pointer) : PGtkTreeViewColumnClass;
+begin
+ GTK_TREE_VIEW_COLUMN_CLASS:=PGtkTreeViewColumnClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_TREE_VIEW_COLUMN));
+end;
+
+function GTK_IS_TREE_VIEW_COLUMN(obj: pointer) : boolean;
+begin
+ GTK_IS_TREE_VIEW_COLUMN:=GTK_CHECK_TYPE(obj,GTK_TYPE_TREE_VIEW_COLUMN);
+end;
+
+function GTK_IS_TREE_VIEW_COLUMN_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_TREE_VIEW_COLUMN_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_TREE_VIEW_COLUMN);
+end;
+
+function GTK_TREE_VIEW_COLUMN_GET_CLASS(obj: pointer) : PGtkTreeViewColumnClass;
+begin
+ GTK_TREE_VIEW_COLUMN_GET_CLASS:=PGtkTreeViewColumnClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_TREE_VIEW_COLUMN));
+end;
+
+function visible(var a : TGtkTreeViewColumn) : guint;
+begin
+ visible:=(a.flag0 and bm_TGtkTreeViewColumn_visible) shr bp_TGtkTreeViewColumn_visible;
+end;
+
+procedure set_visible(var a : TGtkTreeViewColumn; __visible : guint);
+begin
+ a.flag0:=a.flag0 or ((__visible shl bp_TGtkTreeViewColumn_visible) and bm_TGtkTreeViewColumn_visible);
+end;
+
+function resizable(var a : TGtkTreeViewColumn) : guint;
+begin
+ resizable:=(a.flag0 and bm_TGtkTreeViewColumn_resizable) shr bp_TGtkTreeViewColumn_resizable;
+end;
+
+procedure set_resizable(var a : TGtkTreeViewColumn; __resizable : guint);
+begin
+ a.flag0:=a.flag0 or ((__resizable shl bp_TGtkTreeViewColumn_resizable) and bm_TGtkTreeViewColumn_resizable);
+end;
+
+function clickable(var a : TGtkTreeViewColumn) : guint;
+begin
+ clickable:=(a.flag0 and bm_TGtkTreeViewColumn_clickable) shr bp_TGtkTreeViewColumn_clickable;
+end;
+
+procedure set_clickable(var a : TGtkTreeViewColumn; __clickable : guint);
+begin
+ a.flag0:=a.flag0 or ((__clickable shl bp_TGtkTreeViewColumn_clickable) and bm_TGtkTreeViewColumn_clickable);
+end;
+
+function dirty(var a : TGtkTreeViewColumn) : guint;
+begin
+ dirty:=(a.flag0 and bm_TGtkTreeViewColumn_dirty) shr bp_TGtkTreeViewColumn_dirty;
+end;
+
+procedure set_dirty(var a : TGtkTreeViewColumn; __dirty : guint);
+begin
+ a.flag0:=a.flag0 or ((__dirty shl bp_TGtkTreeViewColumn_dirty) and bm_TGtkTreeViewColumn_dirty);
+end;
+
+function show_sort_indicator(var a : TGtkTreeViewColumn) : guint;
+begin
+ show_sort_indicator:=(a.flag0 and bm_TGtkTreeViewColumn_show_sort_indicator) shr bp_TGtkTreeViewColumn_show_sort_indicator;
+end;
+
+procedure set_show_sort_indicator(var a : TGtkTreeViewColumn; __show_sort_indicator : guint);
+begin
+ a.flag0:=a.flag0 or ((__show_sort_indicator shl bp_TGtkTreeViewColumn_show_sort_indicator) and bm_TGtkTreeViewColumn_show_sort_indicator);
+end;
+
+function maybe_reordered(var a : TGtkTreeViewColumn) : guint;
+begin
+ maybe_reordered:=(a.flag0 and bm_TGtkTreeViewColumn_maybe_reordered) shr bp_TGtkTreeViewColumn_maybe_reordered;
+end;
+
+procedure set_maybe_reordered(var a : TGtkTreeViewColumn; __maybe_reordered : guint);
+begin
+ a.flag0:=a.flag0 or ((__maybe_reordered shl bp_TGtkTreeViewColumn_maybe_reordered) and bm_TGtkTreeViewColumn_maybe_reordered);
+end;
+
+function reorderable(var a : TGtkTreeViewColumn) : guint;
+begin
+ reorderable:=(a.flag0 and bm_TGtkTreeViewColumn_reorderable) shr bp_TGtkTreeViewColumn_reorderable;
+end;
+
+procedure set_reorderable(var a : TGtkTreeViewColumn; __reorderable : guint);
+begin
+ a.flag0:=a.flag0 or ((__reorderable shl bp_TGtkTreeViewColumn_reorderable) and bm_TGtkTreeViewColumn_reorderable);
+end;
+
+function use_resized_width(var a : TGtkTreeViewColumn) : guint;
+begin
+ use_resized_width:=(a.flag0 and bm_TGtkTreeViewColumn_use_resized_width) shr bp_TGtkTreeViewColumn_use_resized_width;
+end;
+
+procedure set_use_resized_width(var a : TGtkTreeViewColumn; __use_resized_width : guint);
+begin
+ a.flag0:=a.flag0 or ((__use_resized_width shl bp_TGtkTreeViewColumn_use_resized_width) and bm_TGtkTreeViewColumn_use_resized_width);
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtktypeutils.inc b/packages/gtk2/src/gtk+/gtk/gtktypeutils.inc
new file mode 100644
index 0000000000..7b7028b0a9
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtktypeutils.inc
@@ -0,0 +1,478 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ PGtkArg = ^TGtkArg;
+
+{ glib type wrappers (compatibility) }
+ PGtkType = ^TGtkType;
+ TGtkType = GType;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{ Fundamental Types
+ many of these are just aliases for GLib types to maintain
+ compatibility
+ }
+{< skip > }
+{ GtkArg types }
+ PGtkFundamentalType = ^TGtkFundamentalType;
+ TGtkFundamentalType = GType;
+
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+ PGtkTypeObject = ^TGtkTypeObject;
+ TGtkTypeObject = TGTypeInstance;
+
+ PGtkTypeClass = ^TGtkTypeClass;
+ TGtkTypeClass = TGTypeClass;
+
+ PGtkClassInitFunc = ^TGtkClassInitFunc;
+ TGtkClassInitFunc = TGBaseInitFunc;
+
+ PGtkObjectInitFunc = ^TGtkObjectInitFunc;
+ TGtkObjectInitFunc = TGInstanceInitFunc;
+{$endif}
+
+
+{ --- typedefs --- }
+{ here we come with some necessary forward declarations for structures and
+ provide some fundamental function signatures
+ }
+{ anObject forward declaration }
+
+ TGtkFunction = function (data:gpointer):gboolean; cdecl;
+
+ TGtkDestroyNotify = procedure (data:gpointer); cdecl;
+
+ TGtkCallbackMarshal = procedure (anObject:PGtkObject; data:gpointer; n_args:guint; args:PGtkArg); cdecl;
+
+ TGtkSignalFuncProc = procedure;
+ TGtkSignalFunc = procedure (para1: TGtkSignalFuncProc); cdecl;
+
+
+
+ PGtkSignalMarshaller = ^TGtkSignalMarshaller;
+ TGtkSignalMarshaller = TGSignalCMarshaller;
+{ GtkArg, used to hold differently typed values }
+{ this union only defines the required storage types for
+ the possibile values, thus there is no gint enum_data field,
+ because that would just be a mere alias for gint int_data.
+ use the GTK_VALUE_ () and GTK_RETLOC_ () macros to access
+ the discrete memebers.
+ }
+{ flat values }
+{ structured values }
+ TGtkArgSignalData = record
+ f : TGtkSignalFunc;
+ d : gpointer;
+ end;
+
+ TGtkArg = record
+ _type : TGtkType;
+ name : Pgchar;
+ d : record
+ case longint of
+ 0 : ( char_data : gchar );
+ 1 : ( uchar_data : guchar );
+ 2 : ( bool_data : gboolean );
+ 3 : ( int_data : gint );
+ 4 : ( uint_data : guint );
+ 5 : ( long_data : glong );
+ 6 : ( ulong_data : gulong );
+ 7 : ( float_data : gfloat );
+ 8 : ( double_data : gdouble );
+ 9 : ( string_data : Pgchar );
+ 10 : ( object_data : PGtkObject );
+ 11 : ( pointer_data : gpointer );
+ 12 : ( signal_data : TGtkArgSignalData);
+ end;
+ end;
+
+{ GTK_RETLOC_SIGNAL() - no such thing }
+{ type registration, it is recommended to use
+ g_type_register_static() or
+ g_type_register_dynamic() instead
+ }
+ PGtkTypeInfo = ^TGtkTypeInfo;
+ TGtkTypeInfo = record
+ type_name : Pgchar;
+ object_size : guint;
+ class_size : guint;
+ class_init_func : TGtkClassInitFunc;
+ object_init_func : TGtkObjectInitFunc;
+ reserved_1 : gpointer;
+ reserved_2 : gpointer;
+ base_class_init_func : TGtkClassInitFunc;
+ end;
+
+
+ PGtkEnumValue = ^TGtkEnumValue;
+ TGtkEnumValue = TGEnumValue;
+
+ PGtkFlagValue = ^TGtkFlagValue;
+ TGtkFlagValue = TGFlagsValue;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_TYPE_INVALID = G_TYPE_INVALID;
+ GTK_TYPE_NONE = G_TYPE_NONE;
+ GTK_TYPE_ENUM = G_TYPE_ENUM;
+ GTK_TYPE_FLAGS = G_TYPE_FLAGS;
+ GTK_TYPE_CHAR = G_TYPE_CHAR;
+ GTK_TYPE_UCHAR = G_TYPE_UCHAR;
+ GTK_TYPE_BOOL = G_TYPE_BOOLEAN;
+ GTK_TYPE_INT = G_TYPE_INT;
+ GTK_TYPE_UINT = G_TYPE_UINT;
+ GTK_TYPE_LONG = G_TYPE_LONG;
+ GTK_TYPE_ULONG = G_TYPE_ULONG;
+ GTK_TYPE_FLOAT = G_TYPE_FLOAT;
+ GTK_TYPE_DOUBLE = G_TYPE_DOUBLE;
+ GTK_TYPE_STRING = G_TYPE_STRING;
+ GTK_TYPE_BOXED = G_TYPE_BOXED;
+ GTK_TYPE_POINTER = G_TYPE_POINTER;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+const
+ // G_TYPE_LAST_RESERVED_FUNDAMENTAL is a glib version dependent macro
+ // GTK_TYPE_FUNDAMENTAL_LAST = G_TYPE_LAST_RESERVED_FUNDAMENTAL - 1;
+ GTK_TYPE_FUNDAMENTAL_MAX = G_TYPE_FUNDAMENTAL_MAX;
+ // This is special c macro: GTK_STRUCT_OFFSET = G_STRUCT_OFFSET;
+
+function GTK_FUNDAMENTAL_TYPE(_type: GType): GType; // = G_TYPE_FUNDAMENTAL;
+function GTK_CHECK_CAST(instance: Pointer; g_type: GType) : PGTypeInstance; // = G_TYPE_CHECK_INSTANCE_CAST;
+function GTK_CHECK_CLASS_CAST(g_class: pointer; g_type: GType) : Pointer; // = G_TYPE_CHECK_CLASS_CAST;
+function GTK_CHECK_GET_CLASS(instance: Pointer; g_type: GType) : PGTypeClass; // = G_TYPE_INSTANCE_GET_CLASS;
+function GTK_CHECK_TYPE(instance: Pointer; g_type: GType) : boolean; // = G_TYPE_CHECK_INSTANCE_TYPE;
+function GTK_CHECK_CLASS_TYPE(g_class: pointer; g_type : GType) : boolean; // = G_TYPE_CHECK_CLASS_TYPE;
+
+
+{ --- type macros --- }
+function GTK_CLASS_NAME(_class : pointer) : PGChar;
+function GTK_CLASS_TYPE(_class : pointer) :GType;
+function GTK_TYPE_IS_OBJECT(_type : GType) : gboolean;
+
+{ outdated macros that really shouldn't e used anymore,
+ use the GLib type system instead
+ }
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+
+{ urg }
+function GTK_TYPE_IDENTIFIER : GType;
+function gtk_identifier_get_type:GType; cdecl; external gtklib;
+function GTK_SIGNAL_FUNC(f : pointer) : TGtkSignalFunc;
+
+
+function gtk_type_class(_type:TGtkType):gpointer; cdecl; external gtklib;
+
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+{ argument value access macros, these must not contain casts,
+ to allow the usage of these macros in combination with the
+ adress operator, e.g. &GTK_VALUE_CHAR ( arg)
+ }
+function GTK_VALUE_CHAR(a : TGtkArg) : gchar;
+function GTK_VALUE_UCHAR(a : TGtkArg) : guchar;
+function GTK_VALUE_BOOL(a : TGtkArg) : gboolean;
+function GTK_VALUE_INT(a : TGtkArg) : gint;
+function GTK_VALUE_UINT(a : TGtkArg) : guint;
+function GTK_VALUE_LONG(a : TGtkArg) : glong;
+function GTK_VALUE_ULONG(a : TGtkArg) : gulong;
+function GTK_VALUE_FLOAT(a : TGtkArg) : gfloat;
+function GTK_VALUE_DOUBLE(a : TGtkArg) : gdouble;
+function GTK_VALUE_STRING(a : TGtkArg) : PGChar;
+function GTK_VALUE_ENUM(a : TGtkArg) : gint;
+function GTK_VALUE_FLAGS(a : TGtkArg) : guint;
+function GTK_VALUE_BOXED(a : TGtkArg) : gpointer;
+function GTK_VALUE_OBJECT(a : TGtkArg) : PGtkObject;
+function GTK_VALUE_POINTER(a : TGtkArg) : GPointer;
+function GTK_VALUE_SIGNAL(a : TGtkArg) : TGtkArgSignalData;
+
+{ return location macros, these all narrow down to
+ pointer types, because return values need to be
+ passed by reference
+ }
+function GTK_RETLOC_CHAR(a : TGtkArg) : Pgchar;
+function GTK_RETLOC_UCHAR(a : TGtkArg) : Pguchar;
+function GTK_RETLOC_BOOL(a : TGtkArg) : Pgboolean;
+function GTK_RETLOC_INT(a : TGtkArg) : Pgint;
+function GTK_RETLOC_UINT(a : TGtkArg) : Pguint;
+function GTK_RETLOC_LONG(a : TGtkArg) : Pglong;
+function GTK_RETLOC_ULONG(a : TGtkArg) : Pgulong;
+function GTK_RETLOC_FLOAT(a : TGtkArg) : Pgfloat;
+function GTK_RETLOC_DOUBLE(a : TGtkArg) : Pgdouble;
+function GTK_RETLOC_STRING(a : TGtkArg) : Ppgchar;
+function GTK_RETLOC_ENUM(a : TGtkArg) : Pgint;
+function GTK_RETLOC_FLAGS(a : TGtkArg) : Pguint;
+function GTK_RETLOC_BOXED(a : TGtkArg) : Pgpointer;
+function GTK_RETLOC_OBJECT(a : TGtkArg) : PPGtkObject;
+function GTK_RETLOC_POINTER(a : TGtkArg) : Pgpointer;
+
+
+function gtk_type_unique(parent_type:TGtkType; gtkinfo:PGtkTypeInfo):TGtkType; cdecl; external gtklib;
+function gtk_type_new(_type:TGtkType):gpointer; cdecl; external gtklib;
+{ --- compatibility defines --- }
+function gtk_type_name(_type : GType) : Pgchar;
+function gtk_type_from_name(name : Pgchar) : GType;
+function gtk_type_parent(_type : GType) : GType;
+function gtk_type_is_a(_type,is_a_type : GType) : gboolean;
+
+{ deprecated, use g_type_init() instead }
+procedure gtk_type_init(debug_flags:TGTypeDebugFlags); cdecl; external gtklib;
+{ enum/flags compatibility functions, we strongly
+ recommend to use the glib enum/flags classes directly
+ }
+
+function gtk_type_enum_get_values(enum_type:TGtkType):PGtkEnumValue; cdecl; external gtklib;
+function gtk_type_flags_get_values(flags_type:TGtkType):PGtkFlagValue; cdecl; external gtklib;
+function gtk_type_enum_find_value(enum_type:TGtkType; value_name:Pgchar):PGtkEnumValue; cdecl; external gtklib;
+function gtk_type_flags_find_value(flags_type:TGtkType; value_name:Pgchar):PGtkFlagValue; cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_CLASS_NAME(_class : pointer) : PGChar;
+begin
+ GTK_CLASS_NAME:=g_type_name(G_TYPE_FROM_CLASS(_class));
+end;
+
+function GTK_CLASS_TYPE(_class : pointer) :GType;
+begin
+ GTK_CLASS_TYPE:=G_TYPE_FROM_CLASS(_class);
+end;
+
+function GTK_TYPE_IS_OBJECT(_type : GType) : gboolean;
+begin
+ GTK_TYPE_IS_OBJECT:=g_type_is_a(_type,GTK_TYPE_OBJECT);
+end;
+
+function GTK_TYPE_IDENTIFIER : GType;
+begin
+ GTK_TYPE_IDENTIFIER:=gtk_identifier_get_type;
+end;
+
+function GTK_SIGNAL_FUNC(f : pointer) : TGtkSignalFunc;
+begin
+ GTK_SIGNAL_FUNC:=TGtkSignalFunc(f);
+end;
+
+function gtk_type_name(_type : GType) : Pgchar;
+begin
+ gtk_type_name:=g_type_name(_type);
+end;
+
+function gtk_type_from_name(name : Pgchar) : GType;
+begin
+ gtk_type_from_name:=g_type_from_name(name);
+end;
+
+function gtk_type_parent(_type : GType) : GType;
+begin
+ gtk_type_parent:=g_type_parent(_type);
+end;
+
+function gtk_type_is_a(_type,is_a_type : GType) : gboolean;
+begin
+ gtk_type_is_a:=g_type_is_a(_type,is_a_type);
+end;
+
+function GTK_FUNDAMENTAL_TYPE(_type: GType): GType;
+begin
+ GTK_FUNDAMENTAL_TYPE:=G_TYPE_FUNDAMENTAL(_type);
+end;
+
+function GTK_CHECK_CAST(instance: Pointer; g_type: GType) : PGTypeInstance;
+begin
+ GTK_CHECK_CAST:=G_TYPE_CHECK_INSTANCE_CAST(instance,g_type);
+end;
+
+function GTK_CHECK_CLASS_CAST(g_class: pointer; g_type: GType) : Pointer;
+begin
+ GTK_CHECK_CLASS_CAST:=G_TYPE_CHECK_CLASS_CAST(g_class,g_type);
+end;
+
+function GTK_CHECK_GET_CLASS(instance: Pointer; g_type: GType) : PGTypeClass;
+begin
+ GTK_CHECK_GET_CLASS:=G_TYPE_INSTANCE_GET_CLASS(instance,g_type);
+end;
+
+function GTK_CHECK_TYPE(instance: Pointer; g_type: GType) : boolean;
+begin
+ GTK_CHECK_TYPE:=G_TYPE_CHECK_INSTANCE_TYPE(instance,g_type);
+end;
+
+function GTK_CHECK_CLASS_TYPE(g_class: pointer; g_type : GType) : boolean;
+begin
+ GTK_CHECK_CLASS_TYPE:=G_TYPE_CHECK_CLASS_TYPE(g_class,g_type);
+end;
+
+
+function GTK_VALUE_CHAR(a : TGtkArg) : gchar;
+begin
+ Result:=a.d.char_data;
+end;
+
+function GTK_VALUE_UCHAR(a : TGtkArg) : guchar;
+begin
+ Result:=a.d.uchar_data;
+end;
+
+function GTK_VALUE_BOOL(a : TGtkArg) : gboolean;
+begin
+ Result:=a.d.bool_data;
+end;
+
+function GTK_VALUE_INT(a : TGtkArg) : gint;
+begin
+ Result:=a.d.int_data;
+end;
+
+function GTK_VALUE_UINT(a : TGtkArg) : guint;
+begin
+ Result:=a.d.uint_data;
+end;
+
+function GTK_VALUE_LONG(a : TGtkArg) : glong;
+begin
+ Result:=a.d.long_data;
+end;
+
+function GTK_VALUE_ULONG(a : TGtkArg) : gulong;
+begin
+ Result:=a.d.ulong_data;
+end;
+
+function GTK_VALUE_FLOAT(a : TGtkArg) : gfloat;
+begin
+ Result:=a.d.float_data;
+end;
+
+function GTK_VALUE_DOUBLE(a : TGtkArg) : gdouble;
+begin
+ Result:=a.d.double_data;
+end;
+
+function GTK_VALUE_STRING(a : TGtkArg) : PGChar;
+begin
+ Result:=a.d.string_data;
+end;
+
+function GTK_VALUE_ENUM(a : TGtkArg) : gint;
+begin
+ Result:=a.d.int_data;
+end;
+
+function GTK_VALUE_FLAGS(a : TGtkArg) : guint;
+begin
+ Result:=a.d.uint_data;
+end;
+
+function GTK_VALUE_BOXED(a : TGtkArg) : gpointer;
+begin
+ Result:=a.d.pointer_data;
+end;
+
+function GTK_VALUE_OBJECT(a : TGtkArg) : PGtkObject;
+begin
+ Result:=a.d.object_data;
+end;
+
+function GTK_VALUE_POINTER(a : TGtkArg) : GPointer;
+begin
+ Result:=a.d.pointer_data;
+end;
+
+function GTK_VALUE_SIGNAL(a : TGtkArg) : TGtkArgSignalData;
+begin
+ Result:=a.d.signal_data;
+end;
+
+function GTK_RETLOC_CHAR(a : TGtkArg) : Pgchar;
+begin
+ Result:=PGChar(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_UCHAR(a : TGtkArg) : Pguchar;
+begin
+ Result:=PGUChar(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_BOOL(a : TGtkArg) : Pgboolean;
+begin
+ Result:=PGboolean(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_INT(a : TGtkArg) : Pgint;
+begin
+ Result:=PGInt(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_UINT(a : TGtkArg) : Pguint;
+begin
+ Result:=PGUInt(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_LONG(a : TGtkArg) : Pglong;
+begin
+ Result:=PGLong(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_ULONG(a : TGtkArg) : Pgulong;
+begin
+ Result:=PGULong(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_FLOAT(a : TGtkArg) : Pgfloat;
+begin
+ Result:=PGFloat(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_DOUBLE(a : TGtkArg) : Pgdouble;
+begin
+ Result:=PGDouble(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_STRING(a : TGtkArg) : Ppgchar;
+begin
+ Result:=PPGChar(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_ENUM(a : TGtkArg) : Pgint;
+begin
+ Result:=PGInt(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_FLAGS(a : TGtkArg) : Pguint;
+begin
+ Result:=PGUint(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_BOXED(a : TGtkArg) : Pgpointer;
+begin
+ Result:=PGPointer(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_OBJECT(a : TGtkArg) : PPGtkObject;
+begin
+ Result:=PPGtkObject(a.d.pointer_data);
+end;
+
+function GTK_RETLOC_POINTER(a : TGtkArg) : Pgpointer;
+begin
+ Result:=PGPointer(a.d.pointer_data);
+end;
+
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkuimanager.inc b/packages/gtk2/src/gtk+/gtk/gtkuimanager.inc
new file mode 100644
index 0000000000..a39acabedb
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkuimanager.inc
@@ -0,0 +1,123 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+type
+ PGtkUIManagerPrivate = pointer;
+ PGtkUIManager = ^TGtkUIManager;
+ TGtkUIManager = record
+ parent : TGObject;
+ private_data : PGtkUIManagerPrivate;
+ end;
+
+{ Signals }
+{ Padding for future expansion }
+ PGtkUIManagerClass = ^TGtkUIManagerClass;
+ TGtkUIManagerClass = record
+ parent_class : TGObjectClass;
+ add_widget : procedure (merge:PGtkUIManager; widget:PGtkWidget);cdecl;
+ actions_changed : procedure (merge:PGtkUIManager);
+ connect_proxy : procedure (merge:PGtkUIManager; action:PGtkAction; proxy:PGtkWidget);
+ disconnect_proxy : procedure (merge:PGtkUIManager; action:PGtkAction; proxy:PGtkWidget);
+ pre_activate : procedure (merge:PGtkUIManager; action:PGtkAction);
+ post_activate : procedure (merge:PGtkUIManager; action:PGtkAction);
+ _gtk_reserved1 : procedure ;
+ _gtk_reserved2 : procedure ;
+ _gtk_reserved3 : procedure ;
+ _gtk_reserved4 : procedure ;
+ end;
+
+
+ PGtkUIManagerItemType = ^TGtkUIManagerItemType;
+ TGtkUIManagerItemType = (GTK_UI_MANAGER_AUTO := 0,
+ GTK_UI_MANAGER_MENUBAR := 1 shl 0,
+ GTK_UI_MANAGER_MENU := 1 shl 1,
+ GTK_UI_MANAGER_TOOLBAR := 1 shl 2,
+ GTK_UI_MANAGER_PLACEHOLDER := 1 shl 3,
+ GTK_UI_MANAGER_POPUP := 1 shl 4,
+ GTK_UI_MANAGER_MENUITEM := 1 shl 5,
+ GTK_UI_MANAGER_TOOLITEM := 1 shl 6,
+ GTK_UI_MANAGER_SEPARATOR := 1 shl 7,
+ GTK_UI_MANAGER_ACCELERATOR := 1 shl 8);
+
+{$ENDIF read_interface_types}
+
+{$IFDEF read_interface_rest}
+
+function GTK_TYPE_UI_MANAGER : GType;
+function GTK_UI_MANAGER(obj : pointer) : PGtkUIManager;
+function GTK_UI_MANAGER_CLASS(klass : pointer) : PGtkUIManagerClass;
+function GTK_IS_UI_MANAGER(obj : pointer) : gboolean;
+function GTK_IS_UI_MANAGER_CLASS(klass : pointer) : gboolean;
+function GTK_UI_MANAGER_GET_CLASS(obj : pointer) : PGtkUIManagerClass;
+
+
+function gtk_ui_manager_get_type:GType;cdecl;external gtklib name 'gtk_ui_manager_get_type';
+
+function gtk_ui_manager_new:PGtkUIManager;cdecl;external gtklib name 'gtk_ui_manager_new';
+
+procedure gtk_ui_manager_set_add_tearoffs(self:PGtkUIManager; add_tearoffs:gboolean);cdecl;external gtklib name 'gtk_ui_manager_set_add_tearoffs';
+function gtk_ui_manager_get_add_tearoffs(self:PGtkUIManager):gboolean;cdecl;external gtklib name 'gtk_ui_manager_get_add_tearoffs';
+
+procedure gtk_ui_manager_insert_action_group(self:PGtkUIManager; action_group:PGtkActionGroup; pos:gint);cdecl;external gtklib name 'gtk_ui_manager_insert_action_group';
+procedure gtk_ui_manager_remove_action_group(self:PGtkUIManager; action_group:PGtkActionGroup);cdecl;external gtklib name 'gtk_ui_manager_remove_action_group';
+function gtk_ui_manager_get_action_groups(self:PGtkUIManager):PGList;cdecl;external gtklib name 'gtk_ui_manager_get_action_groups';
+
+function gtk_ui_manager_get_accel_group(self:PGtkUIManager):PGtkAccelGroup;cdecl;external gtklib name 'gtk_ui_manager_get_accel_group';
+
+function gtk_ui_manager_get_widget(self:PGtkUIManager; path:Pgchar):PGtkWidget;cdecl;external gtklib name 'gtk_ui_manager_get_widget';
+
+function gtk_ui_manager_get_toplevels(self:PGtkUIManager; types:TGtkUIManagerItemType):PGSList;cdecl;external gtklib name 'gtk_ui_manager_get_toplevels';
+
+function gtk_ui_manager_get_action(self:PGtkUIManager; path:Pgchar):PGtkAction;cdecl;external gtklib name 'gtk_ui_manager_get_action';
+
+function gtk_ui_manager_add_ui_from_string(self:PGtkUIManager; buffer:Pgchar; length:gssize; error:PPGError):guint;cdecl;external gtklib name 'gtk_ui_manager_add_ui_from_string';
+
+
+function gtk_ui_manager_add_ui_from_file(self:PGtkUIManager; filename:Pgchar; error:PPGError):guint;cdecl;external gtklib name 'gtk_ui_manager_add_ui_from_file';
+
+procedure gtk_ui_manager_add_ui(self:PGtkUIManager; merge_id:guint; path:Pgchar; name:Pgchar; action:Pgchar;
+ _type:TGtkUIManagerItemType; top:gboolean);cdecl;external gtklib name 'gtk_ui_manager_add_ui';
+procedure gtk_ui_manager_remove_ui(self:PGtkUIManager; merge_id:guint);cdecl;external gtklib name 'gtk_ui_manager_remove_ui';
+
+function gtk_ui_manager_get_ui(self:PGtkUIManager):Pgchar;cdecl;external gtklib name 'gtk_ui_manager_get_ui';
+procedure gtk_ui_manager_ensure_update(self:PGtkUIManager);cdecl;external gtklib name 'gtk_ui_manager_ensure_update';
+function gtk_ui_manager_new_merge_id(self:PGtkUIManager):guint;cdecl;external gtklib name 'gtk_ui_manager_new_merge_id';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+function GTK_TYPE_UI_MANAGER : GType;
+begin
+ GTK_TYPE_UI_MANAGER:=gtk_ui_manager_get_type;
+end;
+
+function GTK_UI_MANAGER(obj : pointer) : PGtkUIManager;
+begin
+ GTK_UI_MANAGER:=PGtkUIManager(G_TYPE_CHECK_INSTANCE_CAST(obj,GTK_TYPE_UI_MANAGER));
+end;
+
+function GTK_UI_MANAGER_CLASS(klass : pointer) : PGtkUIManagerClass;
+begin
+ GTK_UI_MANAGER_CLASS:=PGtkUIManagerClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_UI_MANAGER));
+end;
+
+function GTK_IS_UI_MANAGER(obj : pointer) : gboolean;
+begin
+ GTK_IS_UI_MANAGER:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GTK_TYPE_UI_MANAGER);
+end;
+
+function GTK_IS_UI_MANAGER_CLASS(klass : pointer) : gboolean;
+begin
+ GTK_IS_UI_MANAGER_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_UI_MANAGER);
+end;
+
+function GTK_UI_MANAGER_GET_CLASS(obj : pointer) : PGtkUIManagerClass;
+begin
+ GTK_UI_MANAGER_GET_CLASS:=PGtkUIManagerClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_UI_MANAGER));
+end;
+
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtk+/gtk/gtkvbbox.inc b/packages/gtk2/src/gtk+/gtk/gtkvbbox.inc
new file mode 100644
index 0000000000..7f93314bd5
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkvbbox.inc
@@ -0,0 +1,80 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkVButtonBox = ^TGtkVButtonBox;
+ TGtkVButtonBox = record
+ button_box : TGtkButtonBox;
+ end;
+
+ PGtkVButtonBoxClass = ^TGtkVButtonBoxClass;
+ TGtkVButtonBoxClass = record
+ parent_class : TGtkButtonBoxClass;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_VBUTTON_BOX : GType;
+function GTK_VBUTTON_BOX(obj: pointer) : PGtkVButtonBox;
+function GTK_VBUTTON_BOX_CLASS(klass: pointer) : PGtkVButtonBoxClass;
+function GTK_IS_VBUTTON_BOX(obj: pointer) : boolean;
+function GTK_IS_VBUTTON_BOX_CLASS(klass: pointer) : boolean;
+function GTK_VBUTTON_BOX_GET_CLASS(obj: pointer) : PGtkVButtonBoxClass;
+
+
+
+function gtk_vbutton_box_get_type:TGtkType; cdecl; external gtklib;
+function gtk_vbutton_box_new:PGtkWidget; cdecl; external gtklib;
+{ buttons can be added by gtk_container_add() }
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+function gtk_vbutton_box_get_spacing_default:gint; cdecl; external gtklib;
+procedure gtk_vbutton_box_set_spacing_default(spacing:gint); cdecl; external gtklib;
+function gtk_vbutton_box_get_layout_default:TGtkButtonBoxStyle; cdecl; external gtklib;
+procedure gtk_vbutton_box_set_layout_default(layout:TGtkButtonBoxStyle); cdecl; external gtklib;
+{$endif}
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_VBUTTON_BOX : GType;
+begin
+ GTK_TYPE_VBUTTON_BOX:=gtk_vbutton_box_get_type;
+end;
+
+function GTK_VBUTTON_BOX(obj: pointer) : PGtkVButtonBox;
+begin
+ GTK_VBUTTON_BOX:=PGtkVButtonBox(GTK_CHECK_CAST(obj,GTK_TYPE_VBUTTON_BOX));
+end;
+
+function GTK_VBUTTON_BOX_CLASS(klass: pointer) : PGtkVButtonBoxClass;
+begin
+ GTK_VBUTTON_BOX_CLASS:=PGtkVButtonBoxClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_VBUTTON_BOX));
+end;
+
+function GTK_IS_VBUTTON_BOX(obj: pointer) : boolean;
+begin
+ GTK_IS_VBUTTON_BOX:=GTK_CHECK_TYPE(obj,GTK_TYPE_VBUTTON_BOX);
+end;
+
+function GTK_IS_VBUTTON_BOX_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_VBUTTON_BOX_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_VBUTTON_BOX);
+end;
+
+function GTK_VBUTTON_BOX_GET_CLASS(obj: pointer) : PGtkVButtonBoxClass;
+begin
+ GTK_VBUTTON_BOX_GET_CLASS:=PGtkVButtonBoxClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_VBUTTON_BOX));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkvbox.inc b/packages/gtk2/src/gtk+/gtk/gtkvbox.inc
new file mode 100644
index 0000000000..676773535b
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkvbox.inc
@@ -0,0 +1,71 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkVBox = ^TGtkVBox;
+ TGtkVBox = record
+ box : TGtkBox;
+ end;
+
+ PGtkVBoxClass = ^TGtkVBoxClass;
+ TGtkVBoxClass = record
+ parent_class : TGtkBoxClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_VBOX : GType;
+function GTK_VBOX(obj: pointer) : PGtkVBox;
+function GTK_VBOX_CLASS(klass: pointer) : PGtkVBoxClass;
+function GTK_IS_VBOX(obj: pointer) : boolean;
+function GTK_IS_VBOX_CLASS(klass: pointer) : boolean;
+function GTK_VBOX_GET_CLASS(obj: pointer) : PGtkVBoxClass;
+
+
+function gtk_vbox_get_type:TGtkType; cdecl; external gtklib;
+function gtk_vbox_new(homogeneous:gboolean; spacing:gint):PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_VBOX : GType;
+begin
+ GTK_TYPE_VBOX:=gtk_vbox_get_type;
+end;
+
+function GTK_VBOX(obj: pointer) : PGtkVBox;
+begin
+ GTK_VBOX:=PGtkVBox(GTK_CHECK_CAST(obj,GTK_TYPE_VBOX));
+end;
+
+function GTK_VBOX_CLASS(klass: pointer) : PGtkVBoxClass;
+begin
+ GTK_VBOX_CLASS:=PGtkVBoxClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_VBOX));
+end;
+
+function GTK_IS_VBOX(obj: pointer) : boolean;
+begin
+ GTK_IS_VBOX:=GTK_CHECK_TYPE(obj,GTK_TYPE_VBOX);
+end;
+
+function GTK_IS_VBOX_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_VBOX_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_VBOX);
+end;
+
+function GTK_VBOX_GET_CLASS(obj: pointer) : PGtkVBoxClass;
+begin
+ GTK_VBOX_GET_CLASS:=PGtkVBoxClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_VBOX));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkviewport.inc b/packages/gtk2/src/gtk+/gtk/gtkviewport.inc
new file mode 100644
index 0000000000..0952d55143
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkviewport.inc
@@ -0,0 +1,83 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkViewport = ^TGtkViewport;
+ TGtkViewport = record
+ bin : TGtkBin;
+ shadow_type : TGtkShadowType;
+ view_window : PGdkWindow;
+ bin_window : PGdkWindow;
+ hadjustment : PGtkAdjustment;
+ vadjustment : PGtkAdjustment;
+ end;
+
+ PGtkViewportClass = ^TGtkViewportClass;
+ TGtkViewportClass = record
+ parent_class : TGtkBinClass;
+ set_scroll_adjustments : procedure (viewport:PGtkViewport; hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment); cdecl;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_VIEWPORT : GType;
+function GTK_VIEWPORT(obj: pointer) : PGtkViewport;
+function GTK_VIEWPORT_CLASS(klass: pointer) : PGtkViewportClass;
+function GTK_IS_VIEWPORT(obj: pointer) : boolean;
+function GTK_IS_VIEWPORT_CLASS(klass: pointer) : boolean;
+function GTK_VIEWPORT_GET_CLASS(obj: pointer) : PGtkViewportClass;
+
+
+function gtk_viewport_get_type:TGtkType; cdecl; external gtklib;
+function gtk_viewport_new(hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment):PGtkWidget; cdecl; external gtklib;
+function gtk_viewport_get_hadjustment(viewport:PGtkViewport):PGtkAdjustment; cdecl; external gtklib;
+function gtk_viewport_get_vadjustment(viewport:PGtkViewport):PGtkAdjustment; cdecl; external gtklib;
+procedure gtk_viewport_set_hadjustment(viewport:PGtkViewport; adjustment:PGtkAdjustment); cdecl; external gtklib;
+procedure gtk_viewport_set_vadjustment(viewport:PGtkViewport; adjustment:PGtkAdjustment); cdecl; external gtklib;
+procedure gtk_viewport_set_shadow_type(viewport:PGtkViewport; _type:TGtkShadowType); cdecl; external gtklib;
+function gtk_viewport_get_shadow_type(viewport:PGtkViewport):TGtkShadowType; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_VIEWPORT : GType;
+begin
+ GTK_TYPE_VIEWPORT:=gtk_viewport_get_type;
+end;
+
+function GTK_VIEWPORT(obj: pointer) : PGtkViewport;
+begin
+ GTK_VIEWPORT:=PGtkViewport(GTK_CHECK_CAST(obj,GTK_TYPE_VIEWPORT));
+end;
+
+function GTK_VIEWPORT_CLASS(klass: pointer) : PGtkViewportClass;
+begin
+ GTK_VIEWPORT_CLASS:=PGtkViewportClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_VIEWPORT));
+end;
+
+function GTK_IS_VIEWPORT(obj: pointer) : boolean;
+begin
+ GTK_IS_VIEWPORT:=GTK_CHECK_TYPE(obj,GTK_TYPE_VIEWPORT);
+end;
+
+function GTK_IS_VIEWPORT_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_VIEWPORT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_VIEWPORT);
+end;
+
+function GTK_VIEWPORT_GET_CLASS(obj: pointer) : PGtkViewportClass;
+begin
+ GTK_VIEWPORT_GET_CLASS:=PGtkViewportClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_VIEWPORT));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkvpaned.inc b/packages/gtk2/src/gtk+/gtk/gtkvpaned.inc
new file mode 100644
index 0000000000..95e3ac6906
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkvpaned.inc
@@ -0,0 +1,71 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkVPaned = ^TGtkVPaned;
+ TGtkVPaned = record
+ paned : TGtkPaned;
+ end;
+
+ PGtkVPanedClass = ^TGtkVPanedClass;
+ TGtkVPanedClass = record
+ parent_class : TGtkPanedClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_VPANED : GType;
+function GTK_VPANED(obj: pointer) : PGtkVPaned;
+function GTK_VPANED_CLASS(klass: pointer) : PGtkVPanedClass;
+function GTK_IS_VPANED(obj: pointer) : boolean;
+function GTK_IS_VPANED_CLASS(klass: pointer) : boolean;
+function GTK_VPANED_GET_CLASS(obj: pointer) : PGtkVPanedClass;
+
+
+function gtk_vpaned_get_type:TGtkType; cdecl; external gtklib;
+function gtk_vpaned_new:PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_VPANED : GType;
+begin
+ GTK_TYPE_VPANED:=gtk_vpaned_get_type;
+end;
+
+function GTK_VPANED(obj: pointer) : PGtkVPaned;
+begin
+ GTK_VPANED:=PGtkVPaned(GTK_CHECK_CAST(obj,GTK_TYPE_VPANED));
+end;
+
+function GTK_VPANED_CLASS(klass: pointer) : PGtkVPanedClass;
+begin
+ GTK_VPANED_CLASS:=PGtkVPanedClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_VPANED));
+end;
+
+function GTK_IS_VPANED(obj: pointer) : boolean;
+begin
+ GTK_IS_VPANED:=GTK_CHECK_TYPE(obj,GTK_TYPE_VPANED);
+end;
+
+function GTK_IS_VPANED_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_VPANED_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_VPANED);
+end;
+
+function GTK_VPANED_GET_CLASS(obj: pointer) : PGtkVPanedClass;
+begin
+ GTK_VPANED_GET_CLASS:=PGtkVPanedClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_VPANED));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkvruler.inc b/packages/gtk2/src/gtk+/gtk/gtkvruler.inc
new file mode 100644
index 0000000000..c29f4ca26e
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkvruler.inc
@@ -0,0 +1,81 @@
+// included by gtk2.pas
+
+{
+ NOTE this widget is considered too specialized/little-used for
+ GTK+, and will in the future be moved to some other package. If
+ your application needs this widget, feel free to use it, as the
+ widget does work and is useful in some applications; it's just not
+ of general interest. However, we are not accepting new features for
+ the widget, and it will eventually move out of the GTK+
+ distribution.
+ }
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkVRuler = ^TGtkVRuler;
+ TGtkVRuler = record
+ ruler : TGtkRuler;
+ end;
+
+ PGtkVRulerClass = ^TGtkVRulerClass;
+ TGtkVRulerClass = record
+ parent_class : TGtkRulerClass;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_VRULER : GType;
+function GTK_VRULER(obj: pointer) : PGtkVRuler;
+function GTK_VRULER_CLASS(klass: pointer) : PGtkVRulerClass;
+function GTK_IS_VRULER(obj: pointer) : boolean;
+function GTK_IS_VRULER_CLASS(klass: pointer) : boolean;
+function GTK_VRULER_GET_CLASS(obj: pointer) : PGtkVRulerClass;
+
+
+function gtk_vruler_get_type:TGtkType; cdecl; external gtklib;
+function gtk_vruler_new:PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_VRULER : GType;
+begin
+ GTK_TYPE_VRULER:=gtk_vruler_get_type;
+end;
+
+function GTK_VRULER(obj: pointer) : PGtkVRuler;
+begin
+ GTK_VRULER:=PGtkVRuler(GTK_CHECK_CAST(obj,GTK_TYPE_VRULER));
+end;
+
+function GTK_VRULER_CLASS(klass: pointer) : PGtkVRulerClass;
+begin
+ GTK_VRULER_CLASS:=PGtkVRulerClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_VRULER));
+end;
+
+function GTK_IS_VRULER(obj: pointer) : boolean;
+begin
+ GTK_IS_VRULER:=GTK_CHECK_TYPE(obj,GTK_TYPE_VRULER);
+end;
+
+function GTK_IS_VRULER_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_VRULER_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_VRULER);
+end;
+
+function GTK_VRULER_GET_CLASS(obj: pointer) : PGtkVRulerClass;
+begin
+ GTK_VRULER_GET_CLASS:=PGtkVRulerClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_VRULER));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkvscale.inc b/packages/gtk2/src/gtk+/gtk/gtkvscale.inc
new file mode 100644
index 0000000000..0cc4669fe8
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkvscale.inc
@@ -0,0 +1,72 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkVScale = ^TGtkVScale;
+ TGtkVScale = record
+ scale : TGtkScale;
+ end;
+
+ PGtkVScaleClass = ^TGtkVScaleClass;
+ TGtkVScaleClass = record
+ parent_class : TGtkScaleClass;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_VSCALE : GType;
+function GTK_VSCALE(obj: pointer) : PGtkVScale;
+function GTK_VSCALE_CLASS(klass: pointer) : PGtkVScaleClass;
+function GTK_IS_VSCALE(obj: pointer) : boolean;
+function GTK_IS_VSCALE_CLASS(klass: pointer) : boolean;
+function GTK_VSCALE_GET_CLASS(obj: pointer) : PGtkVScaleClass;
+
+
+
+function gtk_vscale_get_type:TGtkType; cdecl; external gtklib;
+function gtk_vscale_new(adjustment:PGtkAdjustment):PGtkWidget; cdecl; external gtklib;
+function gtk_vscale_new_with_range(min:gdouble; max:gdouble; step:gdouble):PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_VSCALE : GType;
+begin
+ GTK_TYPE_VSCALE:=gtk_vscale_get_type;
+end;
+
+function GTK_VSCALE(obj: pointer) : PGtkVScale;
+begin
+ GTK_VSCALE:=PGtkVScale(GTK_CHECK_CAST(obj,GTK_TYPE_VSCALE));
+end;
+
+function GTK_VSCALE_CLASS(klass: pointer) : PGtkVScaleClass;
+begin
+ GTK_VSCALE_CLASS:=PGtkVScaleClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_VSCALE));
+end;
+
+function GTK_IS_VSCALE(obj: pointer) : boolean;
+begin
+ GTK_IS_VSCALE:=GTK_CHECK_TYPE(obj,GTK_TYPE_VSCALE);
+end;
+
+function GTK_IS_VSCALE_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_VSCALE_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_VSCALE);
+end;
+
+function GTK_VSCALE_GET_CLASS(obj: pointer) : PGtkVScaleClass;
+begin
+ GTK_VSCALE_GET_CLASS:=PGtkVScaleClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_VSCALE));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkvscrollbar.inc b/packages/gtk2/src/gtk+/gtk/gtkvscrollbar.inc
new file mode 100644
index 0000000000..1c8e876099
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkvscrollbar.inc
@@ -0,0 +1,70 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkVScrollbar = ^TGtkVScrollbar;
+ TGtkVScrollbar = record
+ scrollbar : TGtkScrollbar;
+ end;
+
+ PGtkVScrollbarClass = ^TGtkVScrollbarClass;
+ TGtkVScrollbarClass = record
+ parent_class : TGtkScrollbarClass;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_VSCROLLBAR : GType;
+function GTK_VSCROLLBAR(obj: pointer) : PGtkVScrollbar;
+function GTK_VSCROLLBAR_CLASS(klass: pointer) : PGtkVScrollbarClass;
+function GTK_IS_VSCROLLBAR(obj: pointer) : boolean;
+function GTK_IS_VSCROLLBAR_CLASS(klass: pointer) : boolean;
+function GTK_VSCROLLBAR_GET_CLASS(obj: pointer) : PGtkVScrollbarClass;
+
+
+function gtk_vscrollbar_get_type:TGtkType; cdecl; external gtklib;
+function gtk_vscrollbar_new(adjustment:PGtkAdjustment):PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_VSCROLLBAR : GType;
+begin
+ GTK_TYPE_VSCROLLBAR:=gtk_vscrollbar_get_type;
+end;
+
+function GTK_VSCROLLBAR(obj: pointer) : PGtkVScrollbar;
+begin
+ GTK_VSCROLLBAR:=PGtkVScrollbar(GTK_CHECK_CAST(obj,GTK_TYPE_VSCROLLBAR));
+end;
+
+function GTK_VSCROLLBAR_CLASS(klass: pointer) : PGtkVScrollbarClass;
+begin
+ GTK_VSCROLLBAR_CLASS:=PGtkVScrollbarClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_VSCROLLBAR));
+end;
+
+function GTK_IS_VSCROLLBAR(obj: pointer) : boolean;
+begin
+ GTK_IS_VSCROLLBAR:=GTK_CHECK_TYPE(obj,GTK_TYPE_VSCROLLBAR);
+end;
+
+function GTK_IS_VSCROLLBAR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_VSCROLLBAR_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_VSCROLLBAR);
+end;
+
+function GTK_VSCROLLBAR_GET_CLASS(obj: pointer) : PGtkVScrollbarClass;
+begin
+ GTK_VSCROLLBAR_GET_CLASS:=PGtkVScrollbarClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_VSCROLLBAR));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkvseparator.inc b/packages/gtk2/src/gtk+/gtk/gtkvseparator.inc
new file mode 100644
index 0000000000..ab1a71530a
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkvseparator.inc
@@ -0,0 +1,71 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PGtkVSeparator = ^TGtkVSeparator;
+ TGtkVSeparator = record
+ separator : TGtkSeparator;
+ end;
+
+ PGtkVSeparatorClass = ^TGtkVSeparatorClass;
+ TGtkVSeparatorClass = record
+ parent_class : TGtkSeparatorClass;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+function GTK_TYPE_VSEPARATOR : GType;
+function GTK_VSEPARATOR(obj: pointer) : PGtkVSeparator;
+function GTK_VSEPARATOR_CLASS(klass: pointer) : PGtkVSeparatorClass;
+function GTK_IS_VSEPARATOR(obj: pointer) : boolean;
+function GTK_IS_VSEPARATOR_CLASS(klass: pointer) : boolean;
+function GTK_VSEPARATOR_GET_CLASS(obj: pointer) : PGtkVSeparatorClass;
+
+
+
+function gtk_vseparator_get_type:TGtkType; cdecl; external gtklib;
+function gtk_vseparator_new:PGtkWidget; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_VSEPARATOR : GType;
+begin
+ GTK_TYPE_VSEPARATOR:=gtk_vseparator_get_type;
+end;
+
+function GTK_VSEPARATOR(obj: pointer) : PGtkVSeparator;
+begin
+ GTK_VSEPARATOR:=PGtkVSeparator(GTK_CHECK_CAST(obj,GTK_TYPE_VSEPARATOR));
+end;
+
+function GTK_VSEPARATOR_CLASS(klass: pointer) : PGtkVSeparatorClass;
+begin
+ GTK_VSEPARATOR_CLASS:=PGtkVSeparatorClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_VSEPARATOR));
+end;
+
+function GTK_IS_VSEPARATOR(obj: pointer) : boolean;
+begin
+ GTK_IS_VSEPARATOR:=GTK_CHECK_TYPE(obj,GTK_TYPE_VSEPARATOR);
+end;
+
+function GTK_IS_VSEPARATOR_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_VSEPARATOR_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_VSEPARATOR);
+end;
+
+function GTK_VSEPARATOR_GET_CLASS(obj: pointer) : PGtkVSeparatorClass;
+begin
+ GTK_VSEPARATOR_GET_CLASS:=PGtkVSeparatorClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_VSEPARATOR));
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkwidget.inc b/packages/gtk2/src/gtk+/gtk/gtkwidget.inc
new file mode 100644
index 0000000000..3613a81019
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkwidget.inc
@@ -0,0 +1,764 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+ PGtkWidget = ^TGtkWidget;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+{ The flags that are used by GtkWidget on top of the
+ flags field of GtkObject.
+ }
+{ widget is allowed to receive the default via gtk_widget_grab_default
+ and will reserve space to draw the default if possible
+ }
+{ the widget currently is receiving the default action and should be drawn
+ appropriately if possible
+ }
+{ the widget when focused will receive the default action and have
+ HAS_DEFAULT set even if there is a different widget set as default
+ }
+ PGtkWidgetFlags = ^TGtkWidgetFlags;
+ TGtkWidgetFlags = longint;
+
+
+{ Kinds of widget-specific help }
+
+ PGtkWidgetHelpType = ^TGtkWidgetHelpType;
+ TGtkWidgetHelpType = (GTK_WIDGET_HELP_TOOLTIP,GTK_WIDGET_HELP_WHATS_THIS
+ );
+
+
+{ forward declaration to avoid excessive includes (and concurrent includes)
+ }
+ PGtkAllocation = ^TGtkAllocation;
+ TGtkAllocation = TGdkRectangle;
+
+ TGtkCallback = procedure (widget:PGtkWidget; data:gpointer); cdecl;
+{ A requisition is a desired amount of space which a
+ widget may request.
+ }
+ PGtkRequisition = ^TGtkRequisition;
+ TGtkRequisition = record
+ width : gint;
+ height : gint;
+ end;
+
+{ The widget is the base of the tree for displayable objects.
+ (A displayable anObject is one which takes up some amount
+ of screen real estate). It provides a common base and interface
+ which actual widgets must adhere to.
+ }
+{ The anObject structure needs to be the first
+ element in the widget structure in order for
+ the anObject mechanism to work correctly. This
+ allows a GtkWidget pointer to be cast to a
+ GtkObject pointer.
+ }
+{ 16 bits of internally used private flags.
+ this will be packed into the same 4 byte alignment frame that
+ state and saved_state go. we therefore don't waste any new
+ space on this.
+ }
+{ The state of the widget. There are actually only
+ 5 widget states (defined in "gtkenums.h").
+ }
+{ The saved state of the widget. When a widgets state
+ is changed to GTK_STATE_INSENSITIVE via
+ "gtk_widget_set_state" or "gtk_widget_set_sensitive"
+ the old state is kept around in this field. The state
+ will be restored once the widget gets sensitive again.
+ }
+{ The widgets name. If the widget does not have a name
+ (the name is NULL), then its name (as returned by
+ "gtk_widget_get_name") is its classes name.
+ Among other things, the widget name is used to determine
+ the style to use for a widget.
+ }
+{ The style for the widget. The style contains the
+ colors the widget should be drawn in for each state
+ along with graphics contexts used to draw with and
+ the font to use for text.
+ }
+{ The widgets desired size.
+ }
+{ The widgets allocated size.
+ }
+{ The widgets window or its parent window if it does
+ not have a window. (Which will be indicated by the
+ GTK_NO_WINDOW flag being set).
+ }
+{ The widgets parent.
+ }
+ TGtkWidget = record
+ anObject : TGtkObject;
+ private_flags : guint16;
+ state : guint8;
+ saved_state : guint8;
+ name : Pgchar;
+ style : PGtkStyle;
+ requisition : TGtkRequisition;
+ allocation : TGtkAllocation;
+ window : PGdkWindow;
+ parent : PGtkWidget;
+ end;
+
+{ The anObject class structure needs to be the first
+ element in the widget class structure in order for
+ the class mechanism to work correctly. This allows a
+ GtkWidgetClass pointer to be cast to a GtkObjectClass
+ pointer.
+ }
+{ The signal to emit when a widget of this class is activated,
+ gtk_widget_activate() handles the emission.
+ Implementation of this signal is optional.
+ }
+{ This signal is emitted when a widget of this class is added
+ to a scrolling aware parent, gtk_widget_set_scroll_adjustments()
+ handles the emission.
+ Implementation of this signal is optional.
+ }
+{ seldomly overidden }
+{ basics }
+{ Mnemonics }
+{ explicit focus }
+{ events }
+{ selection }
+{ Source side drag signals }
+{ Target side drag signals }
+{ Signals used only for keybindings }
+{ If a widget has multiple tooltips/whatsthis, it should show the
+ one for the current focus location, or if that doesn't make
+ sense, should cycle through them showing each tip alongside
+ whatever piece of the widget it applies to.
+ }
+{ accessibility support
+ }
+{ Padding for future expansion }
+ PGtkWidgetClass = ^TGtkWidgetClass;
+ TGtkWidgetClass = record
+ parent_class : TGtkObjectClass;
+ activate_signal : guint;
+ set_scroll_adjustments_signal : guint;
+ dispatch_child_properties_changed : procedure (widget:PGtkWidget; n_pspecs:guint; pspecs:PPGParamSpec); cdecl;
+ show : procedure (widget:PGtkWidget); cdecl;
+ show_all : procedure (widget:PGtkWidget); cdecl;
+ hide : procedure (widget:PGtkWidget); cdecl;
+ hide_all : procedure (widget:PGtkWidget); cdecl;
+ map : procedure (widget:PGtkWidget); cdecl;
+ unmap : procedure (widget:PGtkWidget); cdecl;
+ realize : procedure (widget:PGtkWidget); cdecl;
+ unrealize : procedure (widget:PGtkWidget); cdecl;
+ size_request : procedure (widget:PGtkWidget; requisition:PGtkRequisition); cdecl;
+ size_allocate : procedure (widget:PGtkWidget; allocation:PGtkAllocation); cdecl;
+ state_changed : procedure (widget:PGtkWidget; previous_state:TGtkStateType); cdecl;
+ parent_set : procedure (widget:PGtkWidget; previous_parent:PGtkWidget); cdecl;
+ hierarchy_changed : procedure (widget:PGtkWidget; previous_toplevel:PGtkWidget); cdecl;
+ style_set : procedure (widget:PGtkWidget; previous_style:PGtkStyle); cdecl;
+ direction_changed : procedure (widget:PGtkWidget; previous_direction:TGtkTextDirection); cdecl;
+ grab_notify : procedure (widget:PGtkWidget; was_grabbed:gboolean); cdecl;
+ child_notify : procedure (widget:PGtkWidget; pspec:PGParamSpec); cdecl;
+ mnemonic_activate : function (widget:PGtkWidget; group_cycling:gboolean):gboolean; cdecl;
+ grab_focus : procedure (widget:PGtkWidget); cdecl;
+ focus : function (widget:PGtkWidget; direction:TGtkDirectionType):gboolean; cdecl;
+ event : function (widget:PGtkWidget; event:PGdkEvent):gboolean; cdecl;
+ button_press_event : function (widget:PGtkWidget; event:PGdkEventButton):gboolean; cdecl;
+ button_release_event : function (widget:PGtkWidget; event:PGdkEventButton):gboolean; cdecl;
+ scroll_event : function (widget:PGtkWidget; event:PGdkEventScroll):gboolean; cdecl;
+ motion_notify_event : function (widget:PGtkWidget; event:PGdkEventMotion):gboolean; cdecl;
+ delete_event : function (widget:PGtkWidget; event:PGdkEventAny):gboolean; cdecl;
+ destroy_event : function (widget:PGtkWidget; event:PGdkEventAny):gboolean; cdecl;
+ expose_event : function (widget:PGtkWidget; event:PGdkEventExpose):gboolean; cdecl;
+ key_press_event : function (widget:PGtkWidget; event:PGdkEventKey):gboolean; cdecl;
+ key_release_event : function (widget:PGtkWidget; event:PGdkEventKey):gboolean; cdecl;
+ enter_notify_event : function (widget:PGtkWidget; event:PGdkEventCrossing):gboolean; cdecl;
+ leave_notify_event : function (widget:PGtkWidget; event:PGdkEventCrossing):gboolean; cdecl;
+ configure_event : function (widget:PGtkWidget; event:PGdkEventConfigure):gboolean; cdecl;
+ focus_in_event : function (widget:PGtkWidget; event:PGdkEventFocus):gboolean; cdecl;
+ focus_out_event : function (widget:PGtkWidget; event:PGdkEventFocus):gboolean; cdecl;
+ map_event : function (widget:PGtkWidget; event:PGdkEventAny):gboolean; cdecl;
+ unmap_event : function (widget:PGtkWidget; event:PGdkEventAny):gboolean; cdecl;
+ property_notify_event : function (widget:PGtkWidget; event:PGdkEventProperty):gboolean; cdecl;
+ selection_clear_event : function (widget:PGtkWidget; event:PGdkEventSelection):gboolean; cdecl;
+ selection_request_event : function (widget:PGtkWidget; event:PGdkEventSelection):gboolean; cdecl;
+ selection_notify_event : function (widget:PGtkWidget; event:PGdkEventSelection):gboolean; cdecl;
+ proximity_in_event : function (widget:PGtkWidget; event:PGdkEventProximity):gboolean; cdecl;
+ proximity_out_event : function (widget:PGtkWidget; event:PGdkEventProximity):gboolean; cdecl;
+ visibility_notify_event : function (widget:PGtkWidget; event:PGdkEventVisibility):gboolean; cdecl;
+ client_event : function (widget:PGtkWidget; event:PGdkEventClient):gboolean; cdecl;
+ no_expose_event : function (widget:PGtkWidget; event:PGdkEventAny):gboolean; cdecl;
+ window_state_event : function (widget:PGtkWidget; event:PGdkEventWindowState):gboolean; cdecl;
+ selection_get : procedure (widget:PGtkWidget; selection_data:PGtkSelectionData; info:guint; time:guint); cdecl;
+ selection_received : procedure (widget:PGtkWidget; selection_data:PGtkSelectionData; time:guint); cdecl;
+ drag_begin : procedure (widget:PGtkWidget; context:PGdkDragContext); cdecl;
+ drag_end : procedure (widget:PGtkWidget; context:PGdkDragContext); cdecl;
+ drag_data_get : procedure (widget:PGtkWidget; context:PGdkDragContext; selection_data:PGtkSelectionData; info:guint; time:guint); cdecl;
+ drag_data_delete : procedure (widget:PGtkWidget; context:PGdkDragContext); cdecl;
+ drag_leave : procedure (widget:PGtkWidget; context:PGdkDragContext; time:guint); cdecl;
+ drag_motion : function (widget:PGtkWidget; context:PGdkDragContext; x:gint; y:gint; time:guint):gboolean; cdecl;
+ drag_drop : function (widget:PGtkWidget; context:PGdkDragContext; x:gint; y:gint; time:guint):gboolean; cdecl;
+ drag_data_received : procedure (widget:PGtkWidget; context:PGdkDragContext; x:gint; y:gint; selection_data:PGtkSelectionData;
+ info:guint; time:guint); cdecl;
+ popup_menu : function (widget:PGtkWidget):gboolean; cdecl;
+ show_help : function (widget:PGtkWidget; help_type:TGtkWidgetHelpType):gboolean; cdecl;
+ get_accessible : function (widget:PGtkWidget):PAtkObject; cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ _gtk_reserved5 : procedure ; cdecl;
+ _gtk_reserved6 : procedure ; cdecl;
+ _gtk_reserved7 : procedure ; cdecl;
+ _gtk_reserved8 : procedure ; cdecl;
+ end;
+
+ PGtkWidgetAuxInfo = ^TGtkWidgetAuxInfo;
+ TGtkWidgetAuxInfo = record
+ x : gint;
+ y : gint;
+ width : gint;
+ height : gint;
+ flag0 : word;
+ end;
+
+
+ PGtkWidgetShapeInfo = ^TGtkWidgetShapeInfo;
+ TGtkWidgetShapeInfo = record
+ offset_x : gint16;
+ offset_y : gint16;
+ shape_mask : PGdkBitmap;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ GTK_TOPLEVEL = 1 shl 4;
+ GTK_NO_WINDOW = 1 shl 5;
+ GTK_REALIZED = 1 shl 6;
+ GTK_MAPPED = 1 shl 7;
+ GTK_VISIBLE = 1 shl 8;
+ GTK_SENSITIVE = 1 shl 9;
+ GTK_PARENT_SENSITIVE = 1 shl 10;
+ GTK_CAN_FOCUS = 1 shl 11;
+ GTK_HAS_FOCUS = 1 shl 12;
+ GTK_CAN_DEFAULT = 1 shl 13;
+ GTK_HAS_DEFAULT = 1 shl 14;
+ GTK_HAS_GRAB = 1 shl 15;
+ GTK_RC_STYLE = 1 shl 16;
+ GTK_COMPOSITE_CHILD = 1 shl 17;
+ GTK_NO_REPARENT = 1 shl 18;
+ GTK_APP_PAINTABLE = 1 shl 19;
+ GTK_RECEIVES_DEFAULT = 1 shl 20;
+ GTK_DOUBLE_BUFFERED = 1 shl 21;
+
+
+const
+ bm_TGtkWidgetAuxInfo_x_set = $1;
+ bp_TGtkWidgetAuxInfo_x_set = 0;
+ bm_TGtkWidgetAuxInfo_y_set = $2;
+ bp_TGtkWidgetAuxInfo_y_set = 1;
+
+
+{ Macro for casting a pointer to a GtkWidget or GtkWidgetClass pointer.
+ Macros for testing whether `widget' or `klass' are of type GTK_TYPE_WIDGET.
+ }
+function GTK_TYPE_WIDGET : GType;
+function GTK_WIDGET(widget : pointer) : PGtkWidget;
+function GTK_WIDGET_CLASS(klass: pointer) : PGtkWidgetClass;
+function GTK_IS_WIDGET(widget : pointer) : boolean;
+function GTK_IS_WIDGET_CLASS(klass: pointer) : boolean;
+function GTK_WIDGET_GET_CLASS(obj: pointer) : PGtkWidgetClass;
+
+{ Macros for extracting various fields from GtkWidget and GtkWidgetClass.
+ }
+function GTK_WIDGET_TYPE(wid : pointer) : GType;
+function GTK_WIDGET_STATE(wid : pointer) : longint;
+function GTK_WIDGET_SAVED_STATE(wid : pointer) : longint;
+
+{ Macros for extracting the widget flags from GtkWidget.
+ }
+function GTK_WIDGET_FLAGS(wid : pointer) : guint32;
+function GTK_WIDGET_TOPLEVEL(wid : pointer) : gboolean;
+function GTK_WIDGET_NO_WINDOW(wid : pointer) : gboolean;
+function GTK_WIDGET_REALIZED(wid : pointer) : gboolean;
+function GTK_WIDGET_MAPPED(wid : pointer) : gboolean;
+function GTK_WIDGET_VISIBLE(wid : pointer) : gboolean;
+function GTK_WIDGET_DRAWABLE(wid : pointer) : gboolean;
+function GTK_WIDGET_SENSITIVE(wid : pointer) : gboolean;
+function GTK_WIDGET_PARENT_SENSITIVE(wid : pointer) : gboolean;
+function GTK_WIDGET_IS_SENSITIVE(wid : pointer) : gboolean;
+function GTK_WIDGET_CAN_FOCUS(wid : pointer) : gboolean;
+function GTK_WIDGET_HAS_FOCUS(wid : pointer) : gboolean;
+function GTK_WIDGET_CAN_DEFAULT(wid : pointer) : gboolean;
+function GTK_WIDGET_HAS_DEFAULT(wid : pointer) : gboolean;
+function GTK_WIDGET_HAS_GRAB(wid : pointer) : gboolean;
+function GTK_WIDGET_RC_STYLE(wid : pointer) : gboolean;
+function GTK_WIDGET_COMPOSITE_CHILD(wid : pointer) : gboolean;
+function GTK_WIDGET_APP_PAINTABLE(wid : pointer) : gboolean;
+function GTK_WIDGET_RECEIVES_DEFAULT(wid : pointer) : gboolean;
+function GTK_WIDGET_DOUBLE_BUFFERED(wid : pointer) : gboolean;
+
+{ Macros for setting and clearing widget flags. }
+function GTK_WIDGET_SET_FLAGS (wid : PGtkWidget;
+ flags : TGtkWidgetFlags): TGtkWidgetFlags;
+
+function GTK_WIDGET_UNSET_FLAGS (wid : PGtkWidget;
+ flags : TGtkWidgetFlags): TGtkWidgetFlags;
+
+function GTK_TYPE_REQUISITION : GType;
+function x_set(var a : TGtkWidgetAuxInfo) : guint;
+procedure set_x_set(var a : TGtkWidgetAuxInfo; __x_set : guint);
+function y_set(var a : TGtkWidgetAuxInfo) : guint;
+procedure set_y_set(var a : TGtkWidgetAuxInfo; __y_set : guint);
+
+
+function gtk_widget_get_type:TGtkType; cdecl; external gtklib;
+{$IFNDEF KYLIX}
+function gtk_widget_new(_type:TGtkType; first_property_name:Pgchar; args:array of const):PGtkWidget; cdecl; overload; external gtklib;
+function gtk_widget_new(_type:TGtkType; first_property_name:Pgchar):PGtkWidget; cdecl; overload; varargs; external gtklib;
+{$ELSE}
+function gtk_widget_new(_type:TGtkType; first_property_name:Pgchar):PGtkWidget; varargs; cdecl; external gtklib;
+{$ENDIF}
+function gtk_widget_ref(widget:PGtkWidget):PGtkWidget; cdecl; external gtklib;
+procedure gtk_widget_unref(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_destroy(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_destroyed(widget:PGtkWidget; var widget_pointer:PGtkWidget); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+{$IFNDEF KYLIX}
+procedure gtk_widget_set(widget:PGtkWidget; first_property_name:Pgchar; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_widget_set(widget:PGtkWidget; first_property_name:Pgchar); cdecl; overload; varargs; external gtklib;
+{$ELSE}
+procedure gtk_widget_set(widget:PGtkWidget; first_property_name:Pgchar); varargs; cdecl; external gtklib;
+{$ENDIF}
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+procedure gtk_widget_unparent(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_show(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_show_now(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_hide(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_show_all(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_hide_all(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_map(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_unmap(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_realize(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_unrealize(widget:PGtkWidget); cdecl; external gtklib;
+{ Queuing draws }
+procedure gtk_widget_queue_draw(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_queue_draw_area(widget:PGtkWidget; x:gint; y:gint; width:gint; height:gint); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_widget_queue_clear(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_queue_clear_area(widget:PGtkWidget; x:gint; y:gint; width:gint; height:gint); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+procedure gtk_widget_queue_resize(widget:PGtkWidget); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_widget_draw(widget:PGtkWidget; area:PGdkRectangle); cdecl; external gtklib;
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+procedure gtk_widget_size_request(widget:PGtkWidget; requisition:PGtkRequisition); cdecl; external gtklib;
+procedure gtk_widget_size_allocate(widget:PGtkWidget; allocation:PGtkAllocation); cdecl; external gtklib;
+procedure gtk_widget_get_child_requisition(widget:PGtkWidget; requisition:PGtkRequisition); cdecl; external gtklib;
+procedure gtk_widget_add_accelerator(widget:PGtkWidget; accel_signal:Pgchar; accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType;
+ accel_flags:TGtkAccelFlags); cdecl; external gtklib;
+function gtk_widget_remove_accelerator(widget:PGtkWidget; accel_group:PGtkAccelGroup; accel_key:guint; accel_mods:TGdkModifierType):gboolean; cdecl; external gtklib;
+procedure gtk_widget_set_accel_path(widget:PGtkWidget; accel_path:Pgchar; accel_group:PGtkAccelGroup); cdecl; external gtklib;
+function _gtk_widget_get_accel_path(widget:PGtkWidget; locked:Pgboolean):Pgchar; cdecl; external gtklib;
+function gtk_widget_list_accel_closures(widget:PGtkWidget):PGList; cdecl; external gtklib;
+function gtk_widget_mnemonic_activate(widget:PGtkWidget; group_cycling:gboolean):gboolean; cdecl; external gtklib;
+function gtk_widget_event(widget:PGtkWidget; event:PGdkEvent):gboolean; cdecl; external gtklib;
+function gtk_widget_send_expose(widget:PGtkWidget; event:PGdkEvent):gint; cdecl; external gtklib;
+function gtk_widget_activate(widget:PGtkWidget):gboolean; cdecl; external gtklib;
+function gtk_widget_set_scroll_adjustments(widget:PGtkWidget; hadjustment:PGtkAdjustment; vadjustment:PGtkAdjustment):gboolean; cdecl; external gtklib;
+procedure gtk_widget_reparent(widget:PGtkWidget; new_parent:PGtkWidget); cdecl; external gtklib;
+function gtk_widget_intersect(widget:PGtkWidget; area:PGdkRectangle; intersection:PGdkRectangle):gboolean; cdecl; external gtklib;
+function gtk_widget_region_intersect(widget:PGtkWidget; region:PGdkRegion):PGdkRegion; cdecl; external gtklib;
+procedure gtk_widget_freeze_child_notify(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_child_notify(widget:PGtkWidget; child_property:Pgchar); cdecl; external gtklib;
+procedure gtk_widget_thaw_child_notify(widget:PGtkWidget); cdecl; external gtklib;
+function gtk_widget_is_focus(widget:PGtkWidget):gboolean; cdecl; external gtklib;
+procedure gtk_widget_grab_focus(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_grab_default(widget:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_set_name(widget:PGtkWidget; name:Pgchar); cdecl; external gtklib;
+function gtk_widget_get_name(widget:PGtkWidget):Pgchar; cdecl; external gtklib;
+procedure gtk_widget_set_state(widget:PGtkWidget; state:TGtkStateType); cdecl; external gtklib;
+procedure gtk_widget_set_sensitive(widget:PGtkWidget; sensitive:gboolean); cdecl; external gtklib;
+procedure gtk_widget_set_app_paintable(widget:PGtkWidget; app_paintable:gboolean); cdecl; external gtklib;
+procedure gtk_widget_set_double_buffered(widget:PGtkWidget; double_buffered:gboolean); cdecl; external gtklib;
+procedure gtk_widget_set_redraw_on_allocate(widget:PGtkWidget; redraw_on_allocate:gboolean); cdecl; external gtklib;
+procedure gtk_widget_set_parent(widget:PGtkWidget; parent:PGtkWidget); cdecl; external gtklib;
+procedure gtk_widget_set_parent_window(widget:PGtkWidget; parent_window:PGdkWindow); cdecl; external gtklib;
+procedure gtk_widget_set_child_visible(widget:PGtkWidget; is_visible:gboolean); cdecl; external gtklib;
+function gtk_widget_get_child_visible(widget:PGtkWidget):gboolean; cdecl; external gtklib;
+function gtk_widget_get_parent(widget:PGtkWidget):PGtkWidget; cdecl; external gtklib;
+function gtk_widget_get_parent_window(widget:PGtkWidget):PGdkWindow; cdecl; external gtklib;
+function gtk_widget_child_focus(widget:PGtkWidget; direction:TGtkDirectionType):gboolean; cdecl; external gtklib;
+procedure gtk_widget_set_size_request(widget:PGtkWidget; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_widget_get_size_request(widget:PGtkWidget; width:Pgint; height:Pgint); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_widget_set_uposition(widget:PGtkWidget; x:gint; y:gint); cdecl; external gtklib;
+procedure gtk_widget_set_usize(widget:PGtkWidget; width:gint; height:gint); cdecl; external gtklib;
+{$endif}
+
+procedure gtk_widget_set_events(widget:PGtkWidget; events:gint); cdecl; external gtklib;
+procedure gtk_widget_add_events(widget:PGtkWidget; events:gint); cdecl; external gtklib;
+procedure gtk_widget_set_extension_events(widget:PGtkWidget; mode:TGdkExtensionMode); cdecl; external gtklib;
+function gtk_widget_get_extension_events(widget:PGtkWidget):TGdkExtensionMode; cdecl; external gtklib;
+function gtk_widget_get_toplevel(widget:PGtkWidget):PGtkWidget; cdecl; external gtklib;
+function gtk_widget_get_ancestor(widget:PGtkWidget; widget_type:TGtkType):PGtkWidget; cdecl; external gtklib;
+function gtk_widget_get_colormap(widget:PGtkWidget):PGdkColormap; cdecl; external gtklib;
+function gtk_widget_get_visual(widget:PGtkWidget):PGdkVisual; cdecl; external gtklib;
+function gtk_widget_get_screen(widget:PGtkWidget):PGdkScreen; cdecl; external gtklib;
+function gtk_widget_has_screen(widget:PGtkWidget):gboolean; cdecl; external gtklib;
+function gtk_widget_get_display(widget:PGtkWidget):PGdkDisplay; cdecl; external gtklib;
+function gtk_widget_get_root_window(widget:PGtkWidget):PGdkWindow; cdecl; external gtklib;
+function gtk_widget_get_settings(widget:PGtkWidget):PGtkSettings; cdecl; external gtklib;
+function gtk_widget_get_clipboard(widget:PGtkWidget; selection:TGdkAtom):PGtkClipboard; cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_widget_set_visual(widget,visual : pointer);
+procedure gtk_widget_push_visual(visual : pointer);
+procedure gtk_widget_pop_visual;
+procedure gtk_widget_set_default_visual(visual : pointer);
+{$endif}
+
+{ GTK_DISABLE_DEPRECATED }
+{ Accessibility support }
+
+function gtk_widget_get_accessible(widget:PGtkWidget):PAtkObject; cdecl; external gtklib;
+{ The following functions must not be called on an already
+ realized widget. Because it is possible that somebody
+ can call get_colormap() or get_visual() and save the
+ result, these functions are probably only safe to
+ call in a widget's init() function.
+ }
+procedure gtk_widget_set_colormap(widget:PGtkWidget; colormap:PGdkColormap); cdecl; external gtklib;
+function gtk_widget_get_events(widget:PGtkWidget):gint; cdecl; external gtklib;
+procedure gtk_widget_get_pointer(widget:PGtkWidget; x:Pgint; y:Pgint); cdecl; external gtklib;
+function gtk_widget_is_ancestor(widget:PGtkWidget; ancestor:PGtkWidget):gboolean; cdecl; external gtklib;
+function gtk_widget_translate_coordinates(src_widget:PGtkWidget; dest_widget:PGtkWidget; src_x:gint; src_y:gint; dest_x:Pgint;
+ dest_y:Pgint):gboolean; cdecl; external gtklib;
+{ Hide widget and return TRUE.
+ }
+function gtk_widget_hide_on_delete(widget:PGtkWidget):gboolean; cdecl; external gtklib;
+{ Widget styles.
+ }
+procedure gtk_widget_set_style(widget:PGtkWidget; style:PGtkStyle); cdecl; external gtklib;
+procedure gtk_widget_ensure_style(widget:PGtkWidget); cdecl; external gtklib;
+function gtk_widget_get_style(widget:PGtkWidget):PGtkStyle; cdecl; external gtklib;
+procedure gtk_widget_modify_style(widget:PGtkWidget; style:PGtkRcStyle); cdecl; external gtklib;
+function gtk_widget_get_modifier_style(widget:PGtkWidget):PGtkRcStyle; cdecl; external gtklib;
+procedure gtk_widget_modify_fg(widget:PGtkWidget; state:TGtkStateType; color:PGdkColor); cdecl; external gtklib;
+procedure gtk_widget_modify_bg(widget:PGtkWidget; state:TGtkStateType; color:PGdkColor); cdecl; external gtklib;
+procedure gtk_widget_modify_text(widget:PGtkWidget; state:TGtkStateType; color:PGdkColor); cdecl; external gtklib;
+procedure gtk_widget_modify_base(widget:PGtkWidget; state:TGtkStateType; color:PGdkColor); cdecl; external gtklib;
+procedure gtk_widget_modify_font(widget:PGtkWidget; font_desc:PPangoFontDescription); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_widget_set_rc_style(widget : pointer);
+procedure gtk_widget_restore_default_style(widget : pointer);
+{$endif}
+
+function gtk_widget_create_pango_context(widget:PGtkWidget):PPangoContext; cdecl; external gtklib;
+function gtk_widget_get_pango_context(widget:PGtkWidget):PPangoContext; cdecl; external gtklib;
+function gtk_widget_create_pango_layout(widget:PGtkWidget; text:Pgchar):PPangoLayout; cdecl; external gtklib;
+function gtk_widget_render_icon(widget:PGtkWidget; stock_id:Pgchar; size:TGtkIconSize; detail:Pgchar):PGdkPixbuf; cdecl; external gtklib;
+{ handle composite names for GTK_COMPOSITE_CHILD widgets,
+ the returned name is newly allocated.
+ }
+
+procedure gtk_widget_set_composite_name(widget:PGtkWidget; name:Pgchar); cdecl; external gtklib;
+function gtk_widget_get_composite_name(widget:PGtkWidget):Pgchar; cdecl; external gtklib;
+{ Descend recursively and set rc-style on all widgets without user styles }
+procedure gtk_widget_reset_rc_styles(widget:PGtkWidget); cdecl; external gtklib;
+{ Push/pop pairs, to change default values upon a widget's creation.
+ This will override the values that got set by the
+ gtk_widget_set_default_ () functions.
+ }
+procedure gtk_widget_push_colormap(cmap:PGdkColormap); cdecl; external gtklib;
+procedure gtk_widget_push_composite_child; cdecl; external gtklib;
+procedure gtk_widget_pop_composite_child; cdecl; external gtklib;
+procedure gtk_widget_pop_colormap; cdecl; external gtklib;
+{ widget style properties
+ }
+procedure gtk_widget_class_install_style_property(klass:PGtkWidgetClass; pspec:PGParamSpec); cdecl; external gtklib;
+procedure gtk_widget_class_install_style_property_parser(klass:PGtkWidgetClass; pspec:PGParamSpec; parser:TGtkRcPropertyParser); cdecl; external gtklib;
+function gtk_widget_class_find_style_property(klass:PGtkWidgetClass; property_name:Pgchar):PGParamSpec; cdecl; external gtklib;
+function gtk_widget_class_list_style_properties(klass:PGtkWidgetClass; n_properties:Pguint):PPGParamSpec; cdecl; external gtklib;
+procedure gtk_widget_style_get_property(widget:PGtkWidget; property_name:Pgchar; value:PGValue); cdecl; external gtklib;
+{$IFNDEF KYLIX}
+procedure gtk_widget_style_get_valist(widget:PGtkWidget; first_property_name:Pgchar; var_args: array of const); cdecl; external gtklib;
+procedure gtk_widget_style_get(widget:PGtkWidget; first_property_name:Pgchar; args:array of const); cdecl; overload; external gtklib;
+procedure gtk_widget_style_get(widget:PGtkWidget; first_property_name:Pgchar); cdecl; overload; varargs; external gtklib;
+{$ELSE}
+procedure gtk_widget_style_get_valist(widget:PGtkWidget; first_property_name:Pgchar); varargs; cdecl; external gtklib;
+procedure gtk_widget_style_get(widget:PGtkWidget; first_property_name:Pgchar); varargs; cdecl; external gtklib;
+{$ENDIF}
+{ Set certain default values to be used at widget creation time.
+ }
+procedure gtk_widget_set_default_colormap(colormap:PGdkColormap); cdecl; external gtklib;
+function gtk_widget_get_default_style:PGtkStyle; cdecl; external gtklib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gtk_widget_get_default_colormap:PGdkColormap; cdecl; external gtklib;
+function gtk_widget_get_default_visual:PGdkVisual; cdecl; external gtklib;
+{$endif}
+{ Functions for setting directionality for widgets
+ }
+
+procedure gtk_widget_set_direction(widget:PGtkWidget; dir:TGtkTextDirection); cdecl; external gtklib;
+function gtk_widget_get_direction(widget:PGtkWidget):TGtkTextDirection; cdecl; external gtklib;
+procedure gtk_widget_set_default_direction(dir:TGtkTextDirection); cdecl; external gtklib;
+function gtk_widget_get_default_direction:TGtkTextDirection; cdecl; external gtklib;
+{ Counterpart to gdk_window_shape_combine_mask.
+ }
+procedure gtk_widget_shape_combine_mask(widget:PGtkWidget; shape_mask:PGdkBitmap; offset_x:gint; offset_y:gint); cdecl; external gtklib;
+{ internal function }
+procedure gtk_widget_reset_shapes(widget:PGtkWidget); cdecl; external gtklib;
+{ Compute a widget's path in the form "GtkWindow.MyLabel", and
+ return newly alocated strings.
+ }
+procedure gtk_widget_path(widget:PGtkWidget; path_length:Pguint; path:PPgchar; path_reversed:PPgchar); cdecl; external gtklib;
+procedure gtk_widget_class_path(widget:PGtkWidget; path_length:Pguint; path:PPgchar; path_reversed:PPgchar); cdecl; external gtklib;
+function gtk_requisition_get_type:GType; cdecl; external gtklib;
+function gtk_requisition_copy(requisition:PGtkRequisition):PGtkRequisition; cdecl; external gtklib;
+procedure gtk_requisition_free(requisition:PGtkRequisition); cdecl; external gtklib;
+
+function _gtk_widget_get_aux_info(widget:PGtkWidget; create:gboolean):PGtkWidgetAuxInfo; cdecl; external gtklib;
+procedure _gtk_widget_propagate_hierarchy_changed(widget:PGtkWidget; previous_toplevel:PGtkWidget); cdecl; external gtklib;
+function _gtk_widget_peek_colormap:PGdkColormap; cdecl; external gtklib;
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_WIDGET : GType;
+begin
+ GTK_TYPE_WIDGET:=gtk_widget_get_type;
+end;
+
+function GTK_WIDGET(widget : pointer) : PGtkWidget;
+begin
+ GTK_WIDGET:=PGtkWidget(GTK_CHECK_CAST(widget,GTK_TYPE_WIDGET));
+end;
+
+function GTK_WIDGET_CLASS(klass: pointer) : PGtkWidgetClass;
+begin
+ GTK_WIDGET_CLASS:=PGtkWidgetClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_WIDGET));
+end;
+
+function GTK_IS_WIDGET(widget : pointer) : boolean;
+begin
+ GTK_IS_WIDGET:=GTK_CHECK_TYPE(widget,GTK_TYPE_WIDGET);
+end;
+
+function GTK_IS_WIDGET_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_WIDGET_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_WIDGET);
+end;
+
+function GTK_WIDGET_GET_CLASS(obj: pointer) : PGtkWidgetClass;
+begin
+ GTK_WIDGET_GET_CLASS:=PGtkWidgetClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_WIDGET));
+end;
+
+function GTK_WIDGET_TYPE(wid : pointer) : GType;
+begin
+ GTK_WIDGET_TYPE:=GTK_OBJECT_TYPE(wid);
+end;
+
+function GTK_WIDGET_STATE(wid : pointer) : longint;
+begin
+ GTK_WIDGET_STATE:=(GTK_WIDGET(wid))^.state;
+end;
+
+function GTK_WIDGET_SAVED_STATE(wid : pointer) : longint;
+begin
+ GTK_WIDGET_SAVED_STATE:=(GTK_WIDGET(wid))^.saved_state;
+end;
+
+function GTK_WIDGET_FLAGS(wid : pointer) : guint32;
+begin
+ GTK_WIDGET_FLAGS:=GTK_OBJECT_FLAGS(wid);
+end;
+
+function GTK_WIDGET_TOPLEVEL(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_TOPLEVEL:=((GTK_WIDGET_FLAGS(wid)) and GTK_TOPLEVEL) <> 0;
+end;
+
+function GTK_WIDGET_NO_WINDOW(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_NO_WINDOW:=((GTK_WIDGET_FLAGS(wid)) and GTK_NO_WINDOW) <> 0;
+end;
+
+function GTK_WIDGET_REALIZED(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_REALIZED:=((GTK_WIDGET_FLAGS(wid)) and GTK_REALIZED) <> 0;
+end;
+
+function GTK_WIDGET_MAPPED(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_MAPPED:=((GTK_WIDGET_FLAGS(wid)) and GTK_MAPPED) <> 0;
+end;
+
+function GTK_WIDGET_VISIBLE(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_VISIBLE:=((GTK_WIDGET_FLAGS(wid)) and GTK_VISIBLE) <> 0;
+end;
+
+function GTK_WIDGET_DRAWABLE(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_DRAWABLE:=(GTK_WIDGET_VISIBLE(wid)) and (GTK_WIDGET_MAPPED(wid));
+end;
+
+function GTK_WIDGET_SENSITIVE(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_SENSITIVE:=((GTK_WIDGET_FLAGS(wid)) and GTK_SENSITIVE) <> 0;
+end;
+
+function GTK_WIDGET_PARENT_SENSITIVE(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_PARENT_SENSITIVE:=((GTK_WIDGET_FLAGS(wid)) and GTK_PARENT_SENSITIVE) <> 0;
+end;
+
+function GTK_WIDGET_IS_SENSITIVE(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_IS_SENSITIVE:=(GTK_WIDGET_SENSITIVE(wid)) and (GTK_WIDGET_PARENT_SENSITIVE(wid));
+end;
+
+function GTK_WIDGET_CAN_FOCUS(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_CAN_FOCUS:=((GTK_WIDGET_FLAGS(wid)) and GTK_CAN_FOCUS) <> 0;
+end;
+
+function GTK_WIDGET_HAS_FOCUS(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_HAS_FOCUS:=((GTK_WIDGET_FLAGS(wid)) and GTK_HAS_FOCUS) <> 0;
+end;
+
+function GTK_WIDGET_CAN_DEFAULT(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_CAN_DEFAULT:=((GTK_WIDGET_FLAGS(wid)) and GTK_CAN_DEFAULT) <> 0;
+end;
+
+function GTK_WIDGET_HAS_DEFAULT(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_HAS_DEFAULT:=((GTK_WIDGET_FLAGS(wid)) and GTK_HAS_DEFAULT) <> 0;
+end;
+
+function GTK_WIDGET_HAS_GRAB(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_HAS_GRAB:=((GTK_WIDGET_FLAGS(wid)) and GTK_HAS_GRAB) <> 0;
+end;
+
+function GTK_WIDGET_RC_STYLE(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_RC_STYLE:=((GTK_WIDGET_FLAGS(wid)) and GTK_RC_STYLE) <> 0;
+end;
+
+function GTK_WIDGET_COMPOSITE_CHILD(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_COMPOSITE_CHILD:=((GTK_WIDGET_FLAGS(wid)) and GTK_COMPOSITE_CHILD) <> 0;
+end;
+
+function GTK_WIDGET_APP_PAINTABLE(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_APP_PAINTABLE:=((GTK_WIDGET_FLAGS(wid)) and GTK_APP_PAINTABLE) <> 0;
+end;
+
+function GTK_WIDGET_RECEIVES_DEFAULT(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_RECEIVES_DEFAULT:=((GTK_WIDGET_FLAGS(wid)) and GTK_RECEIVES_DEFAULT) <> 0;
+end;
+
+function GTK_WIDGET_DOUBLE_BUFFERED(wid : pointer) : gboolean;
+begin
+ GTK_WIDGET_DOUBLE_BUFFERED:=((GTK_WIDGET_FLAGS(wid)) and GTK_DOUBLE_BUFFERED) <> 0;
+end;
+
+function GTK_TYPE_REQUISITION : GType;
+begin
+ GTK_TYPE_REQUISITION:=gtk_requisition_get_type;
+end;
+
+function x_set(var a : TGtkWidgetAuxInfo) : guint;
+begin
+ x_set:=(a.flag0 and bm_TGtkWidgetAuxInfo_x_set) shr bp_TGtkWidgetAuxInfo_x_set;
+end;
+
+procedure set_x_set(var a : TGtkWidgetAuxInfo; __x_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__x_set shl bp_TGtkWidgetAuxInfo_x_set) and bm_TGtkWidgetAuxInfo_x_set);
+end;
+
+function y_set(var a : TGtkWidgetAuxInfo) : guint;
+begin
+ y_set:=(a.flag0 and bm_TGtkWidgetAuxInfo_y_set) shr bp_TGtkWidgetAuxInfo_y_set;
+end;
+
+procedure set_y_set(var a : TGtkWidgetAuxInfo; __y_set : guint);
+begin
+ a.flag0:=a.flag0 or ((__y_set shl bp_TGtkWidgetAuxInfo_y_set) and bm_TGtkWidgetAuxInfo_y_set);
+end;
+
+procedure gtk_widget_set_visual(widget,visual : pointer);
+begin
+ // Dummy statement:
+ if (Widget<>nil) and (visual<>nil) then ;
+end;
+
+procedure gtk_widget_push_visual(visual : pointer);
+begin
+ // Dummy statement:
+ if (visual<>nil) then ;
+end;
+
+procedure gtk_widget_pop_visual;
+begin
+ ;
+end;
+
+procedure gtk_widget_set_default_visual(visual : pointer);
+begin
+ // Dummy statement:
+ if (visual<>nil) then ;
+end;
+
+procedure gtk_widget_set_rc_style(widget : pointer);
+begin
+ gtk_widget_set_style(widget,NULL);
+end;
+
+procedure gtk_widget_restore_default_style(widget : pointer);
+begin
+ gtk_widget_set_style(widget,NULL);
+end;
+
+function GTK_WIDGET_SET_FLAGS (wid : PGtkWidget;
+ flags : TGtkWidgetFlags): TGtkWidgetFlags;
+begin
+ pGtkObject(wid)^.flags := pGtkObject(wid)^.flags or flags;
+ GTK_WIDGET_SET_FLAGS := pGtkObject(wid)^.flags;
+end;
+
+function GTK_WIDGET_UNSET_FLAGS (wid : PGtkWidget;
+ flags : TGtkWidgetFlags): TGtkWidgetFlags;
+begin
+ pGtkObject(wid)^.flags := pGtkObject(wid)^.flags and (not flags);
+ GTK_WIDGET_UNSET_FLAGS := pGtkObject(wid)^.flags;
+end;
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkwindow-decorate.inc b/packages/gtk2/src/gtk+/gtk/gtkwindow-decorate.inc
new file mode 100644
index 0000000000..330b90b124
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkwindow-decorate.inc
@@ -0,0 +1,39 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ GTK - The GIMP Toolkit
+ Copyright (C) 2001 Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+ }
+{
+ Authors: Alexander Larsson <alexl@redhat.com>
+ }
+
+procedure gtk_decorated_window_init(window:PGtkWindow); cdecl; external gtklib;
+procedure gtk_decorated_window_calculate_frame_size(window:PGtkWindow); cdecl; external gtklib;
+
+procedure gtk_decorated_window_set_title(window:PGtkWindow; title:Pgchar); cdecl; external gtklib;
+procedure gtk_decorated_window_move_resize_window(window:PGtkWindow; x:gint; y:gint; width:gint; height:gint); cdecl; external gtklib;
+
diff --git a/packages/gtk2/src/gtk+/gtk/gtkwindow.inc b/packages/gtk2/src/gtk+/gtk/gtkwindow.inc
new file mode 100644
index 0000000000..a440af3d2d
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/gtkwindow.inc
@@ -0,0 +1,551 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ // internal type:
+ PGtkWindowGeometryInfo = pointer;
+
+ PGtkWindowGroup = ^TGtkWindowGroup;
+
+{ The following flags are initially TRUE (before a window is mapped).
+ They cause us to compute a configure request that involves
+ default-only parameters. Once mapped, we set them to FALSE.
+ Then we set them to TRUE again on unmap (for position)
+ and on unrealize (for size).
+ }
+{ GtkWindowType }
+{ gtk_window_iconify() called before realization }
+{ GdkWindowTypeHint }
+{ GdkGravity }
+ PGtkWindow = ^TGtkWindow;
+ TGtkWindow = record
+ bin : TGtkBin;
+ title : Pgchar;
+ wmclass_name : Pgchar;
+ wmclass_class : Pgchar;
+ wm_role : Pgchar;
+ focus_widget : PGtkWidget;
+ default_widget : PGtkWidget;
+ transient_parent : PGtkWindow;
+ geometry_info : PGtkWindowGeometryInfo;
+ frame : PGdkWindow;
+ group : PGtkWindowGroup;
+ configure_request_count : guint16;
+ flag0 : longint;
+ frame_left : guint;
+ frame_top : guint;
+ frame_right : guint;
+ frame_bottom : guint;
+ keys_changed_handler : guint;
+ mnemonic_modifier : TGdkModifierType;
+ screen : PGdkScreen;
+ end;
+
+
+{ G_SIGNAL_ACTION signals for keybindings }
+{ Padding for future expansion }
+ PGtkWindowClass = ^TGtkWindowClass;
+ TGtkWindowClass = record
+ parent_class : TGtkBinClass;
+ set_focus : procedure (window:PGtkWindow; focus:PGtkWidget); cdecl;
+ frame_event : function (window:PGtkWindow; event:PGdkEvent):gboolean; cdecl;
+ activate_focus : procedure (window:PGtkWindow); cdecl;
+ activate_default : procedure (window:PGtkWindow); cdecl;
+ move_focus : procedure (window:PGtkWindow; direction:TGtkDirectionType); cdecl;
+ keys_changed : procedure (window:PGtkWindow); cdecl;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+
+ TGtkWindowGroup = record
+ parent_instance : TGObject;
+ grabs : PGSList;
+ end;
+
+{ Padding for future expansion }
+ PGtkWindowGroupClass = ^TGtkWindowGroupClass;
+ TGtkWindowGroupClass = record
+ parent_class : TGObjectClass;
+ _gtk_reserved1 : procedure ; cdecl;
+ _gtk_reserved2 : procedure ; cdecl;
+ _gtk_reserved3 : procedure ; cdecl;
+ _gtk_reserved4 : procedure ; cdecl;
+ end;
+
+ TGtkWindowKeysForeachFunc = procedure (window:PGtkWindow; keyval:guint; modifiers:TGdkModifierType; is_mnemonic:gboolean; data:gpointer); cdecl;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+const
+ bm_TGtkWindow_allow_shrink = $1;
+ bp_TGtkWindow_allow_shrink = 0;
+ bm_TGtkWindow_allow_grow = $2;
+ bp_TGtkWindow_allow_grow = 1;
+ bm_TGtkWindow_configure_notify_received = $4;
+ bp_TGtkWindow_configure_notify_received = 2;
+ bm_TGtkWindow_need_default_position = $8;
+ bp_TGtkWindow_need_default_position = 3;
+ bm_TGtkWindow_need_default_size = $10;
+ bp_TGtkWindow_need_default_size = 4;
+ bm_TGtkWindow_position = $E0;
+ bp_TGtkWindow_position = 5;
+ bm_TGtkWindow_type = $F00;
+ bp_TGtkWindow_type = 8;
+ bm_TGtkWindow_has_user_ref_count = $1000;
+ bp_TGtkWindow_has_user_ref_count = 12;
+ bm_TGtkWindow_has_focus = $2000;
+ bp_TGtkWindow_has_focus = 13;
+ bm_TGtkWindow_modal = $4000;
+ bp_TGtkWindow_modal = 14;
+ bm_TGtkWindow_destroy_with_parent = $8000;
+ bp_TGtkWindow_destroy_with_parent = 15;
+ bm_TGtkWindow_has_frame = $10000;
+ bp_TGtkWindow_has_frame = 16;
+ bm_TGtkWindow_iconify_initially = $20000;
+ bp_TGtkWindow_iconify_initially = 17;
+ bm_TGtkWindow_stick_initially = $40000;
+ bp_TGtkWindow_stick_initially = 18;
+ bm_TGtkWindow_maximize_initially = $80000;
+ bp_TGtkWindow_maximize_initially = 19;
+ bm_TGtkWindow_decorated = $100000;
+ bp_TGtkWindow_decorated = 20;
+ bm_TGtkWindow_type_hint = $E00000;
+ bp_TGtkWindow_type_hint = 21;
+ bm_TGtkWindow_gravity = $1F000000;
+ bp_TGtkWindow_gravity = 24;
+
+
+function GTK_TYPE_WINDOW : GType;
+function GTK_WINDOW(obj: pointer) : PGtkWindow;
+function GTK_WINDOW_CLASS(klass: pointer) : PGtkWindowClass;
+function GTK_IS_WINDOW(obj: pointer) : boolean;
+function GTK_IS_WINDOW_CLASS(klass: pointer) : boolean;
+function GTK_WINDOW_GET_CLASS(obj: pointer) : PGtkWindowClass;
+
+
+function allow_shrink(var a : TGtkWindow) : guint;
+procedure set_allow_shrink(var a : TGtkWindow; __allow_shrink : guint);
+function allow_grow(var a : TGtkWindow) : guint;
+procedure set_allow_grow(var a : TGtkWindow; __allow_grow : guint);
+function configure_notify_received(var a : TGtkWindow) : guint;
+procedure set_configure_notify_received(var a : TGtkWindow; __configure_notify_received : guint);
+function need_default_position(var a : TGtkWindow) : guint;
+procedure set_need_default_position(var a : TGtkWindow; __need_default_position : guint);
+function need_default_size(var a : TGtkWindow) : guint;
+procedure set_need_default_size(var a : TGtkWindow; __need_default_size : guint);
+function position(var a : TGtkWindow) : guint;
+procedure set_position(var a : TGtkWindow; __position : guint);
+function get_type(var a : TGtkWindow) : guint; overload;
+procedure set_type(var a : TGtkWindow; __type : guint); overload;
+function has_user_ref_count(var a : TGtkWindow) : guint;
+procedure set_has_user_ref_count(var a : TGtkWindow; __has_user_ref_count : guint);
+function has_focus(var a : TGtkWindow) : guint;
+procedure set_has_focus(var a : TGtkWindow; __has_focus : guint);
+function modal(var a : TGtkWindow) : guint;
+procedure set_modal(var a : TGtkWindow; __modal : guint);
+function destroy_with_parent(var a : TGtkWindow) : guint;
+procedure set_destroy_with_parent(var a : TGtkWindow; __destroy_with_parent : guint);
+function has_frame(var a : TGtkWindow) : guint; overload;
+procedure set_has_frame(var a : TGtkWindow; __has_frame : guint); overload;
+function iconify_initially(var a : TGtkWindow) : guint;
+procedure set_iconify_initially(var a : TGtkWindow; __iconify_initially : guint);
+function stick_initially(var a : TGtkWindow) : guint;
+procedure set_stick_initially(var a : TGtkWindow; __stick_initially : guint);
+function maximize_initially(var a : TGtkWindow) : guint;
+procedure set_maximize_initially(var a : TGtkWindow; __maximize_initially : guint);
+function decorated(var a : TGtkWindow) : guint;
+procedure set_decorated(var a : TGtkWindow; __decorated : guint);
+function type_hint(var a : TGtkWindow) : guint;
+procedure set_type_hint(var a : TGtkWindow; __type_hint : guint);
+function gravity(var a : TGtkWindow) : guint;
+procedure set_gravity(var a : TGtkWindow; __gravity : guint);
+function GTK_TYPE_WINDOW_GROUP : GType;
+function GTK_WINDOW_GROUP(anObject: pointer) : PGtkWindowGroup;
+function GTK_WINDOW_GROUP_CLASS(klass: pointer) : PGtkWindowGroupClass;
+function GTK_IS_WINDOW_GROUP(anObject: pointer) : boolean;
+function GTK_IS_WINDOW_GROUP_CLASS(klass: pointer) : boolean;
+function GTK_WINDOW_GROUP_GET_CLASS(obj: pointer) : PGtkWindowGroupClass;
+
+
+function gtk_window_get_type:TGtkType; cdecl; external gtklib;
+function gtk_window_new(_type:TGtkWindowType):PGtkWidget; cdecl; external gtklib;
+procedure gtk_window_set_title(window:PGtkWindow; title:Pgchar); cdecl; external gtklib;
+function gtk_window_get_title(window:PGtkWindow):Pgchar; cdecl; external gtklib;
+procedure gtk_window_set_wmclass(window:PGtkWindow; wmclass_name:Pgchar; wmclass_class:Pgchar); cdecl; external gtklib;
+procedure gtk_window_set_role(window:PGtkWindow; role:Pgchar); cdecl; external gtklib;
+function gtk_window_get_role(window:PGtkWindow):Pgchar; cdecl; external gtklib;
+procedure gtk_window_add_accel_group(window:PGtkWindow; accel_group:PGtkAccelGroup); cdecl; external gtklib;
+procedure gtk_window_remove_accel_group(window:PGtkWindow; accel_group:PGtkAccelGroup); cdecl; external gtklib;
+procedure gtk_window_set_position(window:PGtkWindow; position:TGtkWindowPosition); cdecl; external gtklib;
+function gtk_window_activate_focus(window:PGtkWindow):gboolean; cdecl; external gtklib;
+procedure gtk_window_set_focus(window:PGtkWindow; focus:PGtkWidget); cdecl; external gtklib;
+function gtk_window_get_focus(window:PGtkWindow):PGtkWidget; cdecl; external gtklib;
+procedure gtk_window_set_default(window:PGtkWindow; default_widget:PGtkWidget); cdecl; external gtklib;
+function gtk_window_activate_default(window:PGtkWindow):gboolean; cdecl; external gtklib;
+procedure gtk_window_set_transient_for(window:PGtkWindow; parent:PGtkWindow); cdecl; external gtklib;
+function gtk_window_get_transient_for(window:PGtkWindow):PGtkWindow; cdecl; external gtklib;
+procedure gtk_window_set_type_hint(window:PGtkWindow; hint:TGdkWindowTypeHint); cdecl; external gtklib;
+function gtk_window_get_type_hint(window:PGtkWindow):TGdkWindowTypeHint; cdecl; external gtklib;
+procedure gtk_window_set_destroy_with_parent(window:PGtkWindow; setting:gboolean); cdecl; external gtklib;
+function gtk_window_get_destroy_with_parent(window:PGtkWindow):gboolean; cdecl; external gtklib;
+procedure gtk_window_set_resizable(window:PGtkWindow; resizable:gboolean); cdecl; external gtklib;
+function gtk_window_get_resizable(window:PGtkWindow):gboolean; cdecl; external gtklib;
+procedure gtk_window_set_gravity(window:PGtkWindow; gravity:TGdkGravity); cdecl; external gtklib;
+function gtk_window_get_gravity(window:PGtkWindow):TGdkGravity; cdecl; external gtklib;
+procedure gtk_window_set_geometry_hints(window:PGtkWindow; geometry_widget:PGtkWidget; geometry:PGdkGeometry; geom_mask:TGdkWindowHints); cdecl; external gtklib;
+procedure gtk_window_set_screen(window:PGtkWindow; screen:PGdkScreen); cdecl; external gtklib;
+function gtk_window_get_screen(window:PGtkWindow):PGdkScreen; cdecl; external gtklib;
+{ gtk_window_set_has_frame () must be called before realizing the window_ }
+procedure gtk_window_set_has_frame(window:PGtkWindow; setting:gboolean); cdecl; external gtklib;
+function gtk_window_get_has_frame(window:PGtkWindow):gboolean; cdecl; external gtklib;
+procedure gtk_window_set_frame_dimensions(window:PGtkWindow; left:gint; top:gint; right:gint; bottom:gint); cdecl; external gtklib;
+procedure gtk_window_get_frame_dimensions(window:PGtkWindow; left:Pgint; top:Pgint; right:Pgint; bottom:Pgint); cdecl; external gtklib;
+procedure gtk_window_set_decorated(window:PGtkWindow; setting:gboolean); cdecl; external gtklib;
+function gtk_window_get_decorated(window:PGtkWindow):gboolean; cdecl; external gtklib;
+procedure gtk_window_set_icon_list(window:PGtkWindow; list:PGList); cdecl; external gtklib;
+function gtk_window_get_icon_list(window:PGtkWindow):PGList; cdecl; external gtklib;
+procedure gtk_window_set_icon(window:PGtkWindow; icon:PGdkPixbuf); cdecl; external gtklib;
+function gtk_window_get_icon(window:PGtkWindow):PGdkPixbuf; cdecl; external gtklib;
+procedure gtk_window_set_default_icon_list(list:PGList); cdecl; external gtklib;
+function gtk_window_get_default_icon_list:PGList; cdecl; external gtklib;
+{ If window is set modal, input will be grabbed when show and released when hide }
+procedure gtk_window_set_modal(window:PGtkWindow; modal:gboolean); cdecl; external gtklib;
+function gtk_window_get_modal(window:PGtkWindow):gboolean; cdecl; external gtklib;
+function gtk_window_list_toplevels:PGList; cdecl; external gtklib;
+procedure gtk_window_add_mnemonic(window:PGtkWindow; keyval:guint; target:PGtkWidget); cdecl; external gtklib;
+procedure gtk_window_remove_mnemonic(window:PGtkWindow; keyval:guint; target:PGtkWidget); cdecl; external gtklib;
+function gtk_window_mnemonic_activate(window:PGtkWindow; keyval:guint; modifier:TGdkModifierType):gboolean; cdecl; external gtklib;
+procedure gtk_window_set_mnemonic_modifier(window:PGtkWindow; modifier:TGdkModifierType); cdecl; external gtklib;
+function gtk_window_get_mnemonic_modifier(window:PGtkWindow):TGdkModifierType; cdecl; external gtklib;
+procedure gtk_window_present(window:PGtkWindow); cdecl; external gtklib;
+procedure gtk_window_iconify(window:PGtkWindow); cdecl; external gtklib;
+procedure gtk_window_deiconify(window:PGtkWindow); cdecl; external gtklib;
+procedure gtk_window_stick(window:PGtkWindow); cdecl; external gtklib;
+procedure gtk_window_unstick(window:PGtkWindow); cdecl; external gtklib;
+procedure gtk_window_maximize(window:PGtkWindow); cdecl; external gtklib;
+procedure gtk_window_unmaximize(window:PGtkWindow); cdecl; external gtklib;
+
+{$ifdef HasGTK2_2}
+procedure gtk_window_fullscreen(window: PGtkWindow); cdecl; external gtklib;
+procedure gtk_window_unfullscreen(window: PGtkWindow); cdecl; external gtklib;
+procedure gtk_window_set_keep_above(window: PGtkWindow; setting: gboolean); cdecl; external gtklib;
+procedure gtk_window_set_keep_below(window: PGtkWindow; setting: gboolean); cdecl; external gtklib;
+function gtk_window_get_skip_pager_hint(window:PGtkWindow):gboolean; cdecl; external gtklib;
+procedure gtk_window_set_skip_pager_hint(window:PGtkWindow; setting:gboolean); cdecl; external gtklib;
+function gtk_window_get_skip_taskbar_hint(window:PGtkWindow):gboolean; cdecl; external gtklib;
+procedure gtk_window_set_skip_taskbar_hint(window:PGtkWindow; setting:gboolean); cdecl; external gtklib;
+{$endif HasGTK2_2}
+
+procedure gtk_window_begin_resize_drag(window:PGtkWindow; edge:TGdkWindowEdge; button:gint; root_x:gint; root_y:gint;
+ timestamp:guint32); cdecl; external gtklib;
+procedure gtk_window_begin_move_drag(window:PGtkWindow; button:gint; root_x:gint; root_y:gint; timestamp:guint32); cdecl; external gtklib;
+
+{$ifndef GTK_DISABLE_DEPRECATED}
+procedure gtk_window_set_policy(window:PGtkWindow; allow_shrink:gint; allow_grow:gint; auto_shrink:gint); cdecl; external gtklib;
+
+procedure gtk_window_position(window:PGtkWindow; position:TGtkWindowPosition);
+{$endif}
+{ GTK_DISABLE_DEPRECATED }
+
+
+{ Set initial default size of the window (does not constrain user
+ resize operations)
+ }
+
+procedure gtk_window_set_default_size(window:PGtkWindow; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_window_get_default_size(window:PGtkWindow; width:Pgint; height:Pgint); cdecl; external gtklib;
+procedure gtk_window_resize(window:PGtkWindow; width:gint; height:gint); cdecl; external gtklib;
+procedure gtk_window_get_size(window:PGtkWindow; width:Pgint; height:Pgint); cdecl; external gtklib;
+procedure gtk_window_move(window:PGtkWindow; x:gint; y:gint); cdecl; external gtklib;
+procedure gtk_window_get_position(window:PGtkWindow; root_x:Pgint; root_y:Pgint); cdecl; external gtklib;
+function gtk_window_parse_geometry(window:PGtkWindow; geometry:Pgchar):gboolean; cdecl; external gtklib;
+{ Ignore this unless you are writing a GUI builder }
+procedure gtk_window_reshow_with_initial_size(window:PGtkWindow); cdecl; external gtklib;
+{ Window groups
+ }
+function gtk_window_group_get_type:GType; cdecl; external gtklib;
+function gtk_window_group_new:PGtkWindowGroup; cdecl; external gtklib;
+procedure gtk_window_group_add_window(window_group:PGtkWindowGroup; window:PGtkWindow); cdecl; external gtklib;
+procedure gtk_window_group_remove_window(window_group:PGtkWindowGroup; window:PGtkWindow); cdecl; external gtklib;
+{ --- internal functions --- }
+procedure _gtk_window_internal_set_focus(window:PGtkWindow; focus:PGtkWidget); cdecl; external gtklib;
+procedure gtk_window_remove_embedded_xid(window:PGtkWindow; xid:guint); cdecl; external gtklib;
+procedure gtk_window_add_embedded_xid(window:PGtkWindow; xid:guint); cdecl; external gtklib;
+procedure _gtk_window_reposition(window:PGtkWindow; x:gint; y:gint); cdecl; external gtklib;
+procedure _gtk_window_constrain_size(window:PGtkWindow; width:gint; height:gint; new_width:Pgint; new_height:Pgint); cdecl; external gtklib;
+function _gtk_window_get_group(window:PGtkWindow):PGtkWindowGroup; cdecl; external gtklib;
+function _gtk_window_activate_key(window:PGtkWindow; event:PGdkEventKey):gboolean; cdecl; external gtklib;
+
+procedure _gtk_window_keys_foreach(window:PGtkWindow; func:TGtkWindowKeysForeachFunc; func_data:gpointer); cdecl; external gtklib;
+{ --- internal (GtkAcceleratable) --- }
+function _gtk_window_query_nonaccels(window:PGtkWindow; accel_key:guint; accel_mods:TGdkModifierType):gboolean; cdecl; external gtklib;
+
+{$IFDEF HasGTK2_4}
+function gtk_window_get_accept_focus(window:PGtkWindow):gboolean; cdecl; external gtklib;
+procedure gtk_window_set_accept_focus(window:PGtkWindow; setting:gboolean); cdecl; external gtklib;
+function gtk_window_has_toplevel_focus(window: PGtkWindow):gboolean;cdecl; external gtklib;
+function gtk_window_is_active(window: PGtkWindow):gboolean; cdecl; external gtklib;
+{$ENDIF HasGTK2_4}
+
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function GTK_TYPE_WINDOW : GType;
+begin
+ GTK_TYPE_WINDOW:=gtk_window_get_type;
+end;
+
+function GTK_WINDOW(obj: pointer) : PGtkWindow;
+begin
+ GTK_WINDOW:=PGtkWindow(GTK_CHECK_CAST(obj,GTK_TYPE_WINDOW));
+end;
+
+function GTK_WINDOW_CLASS(klass: pointer) : PGtkWindowClass;
+begin
+ GTK_WINDOW_CLASS:=PGtkWindowClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_WINDOW));
+end;
+
+function GTK_IS_WINDOW(obj: pointer) : boolean;
+begin
+ GTK_IS_WINDOW:=GTK_CHECK_TYPE(obj,GTK_TYPE_WINDOW);
+end;
+
+function GTK_IS_WINDOW_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_WINDOW_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_WINDOW);
+end;
+
+function GTK_WINDOW_GET_CLASS(obj: pointer) : PGtkWindowClass;
+begin
+ GTK_WINDOW_GET_CLASS:=PGtkWindowClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_WINDOW));
+end;
+
+function allow_shrink(var a : TGtkWindow) : guint;
+begin
+ allow_shrink:=(a.flag0 and bm_TGtkWindow_allow_shrink) shr bp_TGtkWindow_allow_shrink;
+end;
+
+procedure set_allow_shrink(var a : TGtkWindow; __allow_shrink : guint);
+begin
+ a.flag0:=a.flag0 or ((__allow_shrink shl bp_TGtkWindow_allow_shrink) and bm_TGtkWindow_allow_shrink);
+end;
+
+function allow_grow(var a : TGtkWindow) : guint;
+begin
+ allow_grow:=(a.flag0 and bm_TGtkWindow_allow_grow) shr bp_TGtkWindow_allow_grow;
+end;
+
+procedure set_allow_grow(var a : TGtkWindow; __allow_grow : guint);
+begin
+ a.flag0:=a.flag0 or ((__allow_grow shl bp_TGtkWindow_allow_grow) and bm_TGtkWindow_allow_grow);
+end;
+
+function configure_notify_received(var a : TGtkWindow) : guint;
+begin
+ configure_notify_received:=(a.flag0 and bm_TGtkWindow_configure_notify_received) shr bp_TGtkWindow_configure_notify_received;
+end;
+
+procedure set_configure_notify_received(var a : TGtkWindow; __configure_notify_received : guint);
+begin
+ a.flag0:=a.flag0 or ((__configure_notify_received shl bp_TGtkWindow_configure_notify_received) and bm_TGtkWindow_configure_notify_received);
+end;
+
+function need_default_position(var a : TGtkWindow) : guint;
+begin
+ need_default_position:=(a.flag0 and bm_TGtkWindow_need_default_position) shr bp_TGtkWindow_need_default_position;
+end;
+
+procedure set_need_default_position(var a : TGtkWindow; __need_default_position : guint);
+begin
+ a.flag0:=a.flag0 or ((__need_default_position shl bp_TGtkWindow_need_default_position) and bm_TGtkWindow_need_default_position);
+end;
+
+function need_default_size(var a : TGtkWindow) : guint;
+begin
+ need_default_size:=(a.flag0 and bm_TGtkWindow_need_default_size) shr bp_TGtkWindow_need_default_size;
+end;
+
+procedure set_need_default_size(var a : TGtkWindow; __need_default_size : guint);
+begin
+ a.flag0:=a.flag0 or ((__need_default_size shl bp_TGtkWindow_need_default_size) and bm_TGtkWindow_need_default_size);
+end;
+
+function position(var a : TGtkWindow) : guint;
+begin
+ position:=(a.flag0 and bm_TGtkWindow_position) shr bp_TGtkWindow_position;
+end;
+
+procedure set_position(var a : TGtkWindow; __position : guint);
+begin
+ a.flag0:=a.flag0 or ((__position shl bp_TGtkWindow_position) and bm_TGtkWindow_position);
+end;
+
+function get_type(var a : TGtkWindow) : guint;
+begin
+ get_type:=(a.flag0 and bm_TGtkWindow_type) shr bp_TGtkWindow_type;
+end;
+
+procedure set_type(var a : TGtkWindow; __type : guint);
+begin
+ a.flag0:=a.flag0 or ((__type shl bp_TGtkWindow_type) and bm_TGtkWindow_type);
+end;
+
+function has_user_ref_count(var a : TGtkWindow) : guint;
+begin
+ has_user_ref_count:=(a.flag0 and bm_TGtkWindow_has_user_ref_count) shr bp_TGtkWindow_has_user_ref_count;
+end;
+
+procedure set_has_user_ref_count(var a : TGtkWindow; __has_user_ref_count : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_user_ref_count shl bp_TGtkWindow_has_user_ref_count) and bm_TGtkWindow_has_user_ref_count);
+end;
+
+function has_focus(var a : TGtkWindow) : guint;
+begin
+ has_focus:=(a.flag0 and bm_TGtkWindow_has_focus) shr bp_TGtkWindow_has_focus;
+end;
+
+procedure set_has_focus(var a : TGtkWindow; __has_focus : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_focus shl bp_TGtkWindow_has_focus) and bm_TGtkWindow_has_focus);
+end;
+
+function modal(var a : TGtkWindow) : guint;
+begin
+ modal:=(a.flag0 and bm_TGtkWindow_modal) shr bp_TGtkWindow_modal;
+end;
+
+procedure set_modal(var a : TGtkWindow; __modal : guint);
+begin
+ a.flag0:=a.flag0 or ((__modal shl bp_TGtkWindow_modal) and bm_TGtkWindow_modal);
+end;
+
+function destroy_with_parent(var a : TGtkWindow) : guint;
+begin
+ destroy_with_parent:=(a.flag0 and bm_TGtkWindow_destroy_with_parent) shr bp_TGtkWindow_destroy_with_parent;
+end;
+
+procedure set_destroy_with_parent(var a : TGtkWindow; __destroy_with_parent : guint);
+begin
+ a.flag0:=a.flag0 or ((__destroy_with_parent shl bp_TGtkWindow_destroy_with_parent) and bm_TGtkWindow_destroy_with_parent);
+end;
+
+function has_frame(var a : TGtkWindow) : guint;
+begin
+ has_frame:=(a.flag0 and bm_TGtkWindow_has_frame) shr bp_TGtkWindow_has_frame;
+end;
+
+procedure set_has_frame(var a : TGtkWindow; __has_frame : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_frame shl bp_TGtkWindow_has_frame) and bm_TGtkWindow_has_frame);
+end;
+
+function iconify_initially(var a : TGtkWindow) : guint;
+begin
+ iconify_initially:=(a.flag0 and bm_TGtkWindow_iconify_initially) shr bp_TGtkWindow_iconify_initially;
+end;
+
+procedure set_iconify_initially(var a : TGtkWindow; __iconify_initially : guint);
+begin
+ a.flag0:=a.flag0 or ((__iconify_initially shl bp_TGtkWindow_iconify_initially) and bm_TGtkWindow_iconify_initially);
+end;
+
+function stick_initially(var a : TGtkWindow) : guint;
+begin
+ stick_initially:=(a.flag0 and bm_TGtkWindow_stick_initially) shr bp_TGtkWindow_stick_initially;
+end;
+
+procedure set_stick_initially(var a : TGtkWindow; __stick_initially : guint);
+begin
+ a.flag0:=a.flag0 or ((__stick_initially shl bp_TGtkWindow_stick_initially) and bm_TGtkWindow_stick_initially);
+end;
+
+function maximize_initially(var a : TGtkWindow) : guint;
+begin
+ maximize_initially:=(a.flag0 and bm_TGtkWindow_maximize_initially) shr bp_TGtkWindow_maximize_initially;
+end;
+
+procedure set_maximize_initially(var a : TGtkWindow; __maximize_initially : guint);
+begin
+ a.flag0:=a.flag0 or ((__maximize_initially shl bp_TGtkWindow_maximize_initially) and bm_TGtkWindow_maximize_initially);
+end;
+
+function decorated(var a : TGtkWindow) : guint;
+begin
+ decorated:=(a.flag0 and bm_TGtkWindow_decorated) shr bp_TGtkWindow_decorated;
+end;
+
+procedure set_decorated(var a : TGtkWindow; __decorated : guint);
+begin
+ a.flag0:=a.flag0 or ((__decorated shl bp_TGtkWindow_decorated) and bm_TGtkWindow_decorated);
+end;
+
+function type_hint(var a : TGtkWindow) : guint;
+begin
+ type_hint:=(a.flag0 and bm_TGtkWindow_type_hint) shr bp_TGtkWindow_type_hint;
+end;
+
+procedure set_type_hint(var a : TGtkWindow; __type_hint : guint);
+begin
+ a.flag0:=a.flag0 or ((__type_hint shl bp_TGtkWindow_type_hint) and bm_TGtkWindow_type_hint);
+end;
+
+function gravity(var a : TGtkWindow) : guint;
+begin
+ gravity:=(a.flag0 and bm_TGtkWindow_gravity) shr bp_TGtkWindow_gravity;
+end;
+
+procedure set_gravity(var a : TGtkWindow; __gravity : guint);
+begin
+ a.flag0:=a.flag0 or ((__gravity shl bp_TGtkWindow_gravity) and bm_TGtkWindow_gravity);
+end;
+
+function GTK_TYPE_WINDOW_GROUP : GType;
+begin
+ GTK_TYPE_WINDOW_GROUP:=gtk_window_group_get_type;
+end;
+
+function GTK_WINDOW_GROUP(anObject: pointer) : PGtkWindowGroup;
+begin
+ GTK_WINDOW_GROUP:=PGtkWindowGroup(G_TYPE_CHECK_INSTANCE_CAST(anObject,GTK_TYPE_WINDOW_GROUP));
+end;
+
+function GTK_WINDOW_GROUP_CLASS(klass: pointer) : PGtkWindowGroupClass;
+begin
+ GTK_WINDOW_GROUP_CLASS:=PGtkWindowGroupClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_WINDOW_GROUP));
+end;
+
+function GTK_IS_WINDOW_GROUP(anObject: pointer) : boolean;
+begin
+ GTK_IS_WINDOW_GROUP:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GTK_TYPE_WINDOW_GROUP);
+end;
+
+function GTK_IS_WINDOW_GROUP_CLASS(klass: pointer) : boolean;
+begin
+ GTK_IS_WINDOW_GROUP_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_WINDOW_GROUP);
+end;
+
+function GTK_WINDOW_GROUP_GET_CLASS(obj: pointer) : PGtkWindowGroupClass;
+begin
+ GTK_WINDOW_GROUP_GET_CLASS:=PGtkWindowGroupClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_WINDOW_GROUP));
+end;
+
+procedure gtk_window_position(window:PGtkWindow; position:TGtkWindowPosition);
+begin
+ gtk_window_set_position(window,position);
+end;
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/paste.pas b/packages/gtk2/src/gtk+/gtk/paste.pas
new file mode 100644
index 0000000000..9abee8249a
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/paste.pas
@@ -0,0 +1,25 @@
+// included by gtk2.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+
+{$ENDIF read_implementation}
+// included by gtk2.pas
+
diff --git a/packages/gtk2/src/gtk+/gtk/xembed.inc b/packages/gtk2/src/gtk+/gtk/xembed.inc
new file mode 100644
index 0000000000..575ccb6dd6
--- /dev/null
+++ b/packages/gtk2/src/gtk+/gtk/xembed.inc
@@ -0,0 +1,36 @@
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$PACKRECORDS C}
+
+{ XEMBED messages }
+
+const
+ XEMBED_EMBEDDED_NOTIFY = 0;
+ XEMBED_WINDOW_ACTIVATE = 1;
+ XEMBED_WINDOW_DEACTIVATE = 2;
+ XEMBED_REQUEST_FOCUS = 3;
+ XEMBED_FOCUS_IN = 4;
+ XEMBED_FOCUS_OUT = 5;
+ XEMBED_FOCUS_NEXT = 6;
+ XEMBED_FOCUS_PREV = 7;
+ XEMBED_GRAB_KEY = 8;
+ XEMBED_UNGRAB_KEY = 9;
+ XEMBED_MODALITY_ON = 10;
+ XEMBED_MODALITY_OFF = 11;
+{ Non standard messages }
+ XEMBED_GTK_GRAB_KEY = 108;
+ XEMBED_GTK_UNGRAB_KEY = 109;
+{ Details for XEMBED_FOCUS_IN: }
+ XEMBED_FOCUS_CURRENT = 0;
+ XEMBED_FOCUS_FIRST = 1;
+ XEMBED_FOCUS_LAST = 2;
+{ Flags for _XEMBED_INFO }
+ XEMBED_MAPPED = 1 shl 0;
+
diff --git a/packages/gtk2/src/gtk2x11/gdk2x.pas b/packages/gtk2/src/gtk2x11/gdk2x.pas
new file mode 100644
index 0000000000..0ea598658a
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/gdk2x.pas
@@ -0,0 +1,64 @@
+{
+ *****************************************************************************
+ * *
+ * See the file COPYING.modifiedLGPL, 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. *
+ * *
+ *****************************************************************************
+
+ Author: Mattias Gaertner
+
+}
+unit gdk2x;
+
+{$IFDEF FPC}
+ {$mode objfpc}
+{$ENDIF}
+{$IFDEF VER140}
+ {$DEFINE KYLIX}
+{$ENDIF}
+
+interface
+
+uses
+ Classes, SysUtils, Unix, BaseUnix, glib2, gdk2, XLib, X, XRender;
+
+{$ifdef FREEBSD}
+ {$linklib pthread}
+{$endif}
+
+{$IFNDEF KYLIX}
+ {$PACKRECORDS C}
+{$ELSE}
+ {$ALIGN 4}
+ {$WEAKPACKAGEUNIT}
+ {$WARNINGS OFF}
+{$ENDIF}
+
+{$DEFINE read_forward_definitions}
+type
+{$I include/gdk2x11includes.inc}
+{$UNDEF read_forward_definitions}
+
+{$DEFINE read_interface_rest}
+{$I include/gdk2x11includes.inc}
+{$UNDEF read_interface_rest}
+
+implementation
+
+{*****************************************************************************
+ * macro functions
+ *
+ *****************************************************************************}
+
+// call implementation parts of header files
+{$DEFINE read_implementation}
+{$I include/gdk2x11includes.inc}
+{$UNDEF read_implementation}
+
+end.
+
diff --git a/packages/gtk2/src/gtk2x11/include/gdk2x11includes.inc b/packages/gtk2/src/gtk2x11/include/gdk2x11includes.inc
new file mode 100644
index 0000000000..b71fb4030d
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/gdk2x11includes.inc
@@ -0,0 +1,14 @@
+{%MainUnit ../gdk2x.pas}
+
+{$I xsettings-common.inc}
+{$I xsettings-client.inc}
+{$I gdkdisplay-x11.inc}
+{$I gdkdrawable-x11.inc}
+{$I gdkinputprivate.inc}
+{$I gdkpixmap-x11.inc}
+{$I gdkprivate-x11.inc}
+{$I gdkscreen-x11.inc}
+{$I gdkwindow-x11.inc}
+{$I gdkx.inc}
+{$I gxid_proto.inc}
+{$I mwmutil.inc}
diff --git a/packages/gtk2/src/gtk2x11/include/gdkdisplay-x11.inc b/packages/gtk2/src/gtk2x11/include/gdkdisplay-x11.inc
new file mode 100644
index 0000000000..8abf7c07b2
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/gdkdisplay-x11.inc
@@ -0,0 +1,121 @@
+{%MainUnit ../gdk2x.pas}
+
+{$IFDEF read_interface_rest}
+{ Keyboard related information }
+{ Whether we were able to turn on detectable-autorepeat using
+ XkbSetDetectableAutorepeat. If FALSE, we'll fall back
+ to checking the next event with XPending(). }
+{ Information about current pointer and keyboard grabs held by this
+ client. If gdk_pointer_xgrab_window or gdk_keyboard_xgrab_window
+ window is NULL, then the other associated fields are ignored
+ }
+{ drag and drop information }
+{ data needed for MOTIF DnD }
+{ Mapping to/from virtual atoms }
+{ Session Management leader window see ICCCM }
+{ list of filters for client messages }
+{ X ID hashtable }
+{ translation queue }
+{ Input device }
+{ input GdkDevice list }
+{ input GdkWindow list }
+{ information about network port and host for gxid daemon }
+
+type
+ PGdkDisplayX11 = ^TGdkDisplayX11;
+ TGdkDisplayX11 = record
+ parent_instance : TGdkDisplay;
+ xdisplay : PDisplay;
+ default_screen : PGdkScreen;
+ screens : ^PGdkScreen;
+ grab_count : gint;
+ xkb_event_type : gint;
+ use_xkb : gboolean;
+ have_xkb_autorepeat : gboolean;
+ keymap : PGdkKeymap;
+ keymap_serial : guint;
+ use_xshm : gboolean;
+ have_shm_pixmaps : gboolean;
+ have_shape : gint;
+ pointer_xgrab_window : PGdkWindowObject;
+ pointer_xgrab_serial : gulong;
+ pointer_xgrab_owner_events : gboolean;
+ keyboard_xgrab_window : PGdkWindowObject;
+ keyboard_xgrab_serial : gulong;
+ keyboard_xgrab_owner_events : gboolean;
+ current_dest_drag : PGdkDragContext;
+ motif_drag_window : TWindow;
+ motif_drag_gdk_window : PGdkWindow;
+ motif_target_lists : ^PGList;
+ motif_n_target_lists : gint;
+ atom_from_virtual : PGHashTable;
+ atom_to_virtual : PGHashTable;
+ leader_window : TWindow;
+ client_filters : PGList;
+ xid_ht : PGHashTable;
+ translate_queue : PGQueue;
+ input_devices : PGList;
+ input_windows : PGList;
+ input_ignore_core : gint;
+ input_gxid_host : Pgchar;
+ input_gxid_port : gint;
+ use_xft : gint;
+ end;
+
+ PGdkDisplayX11Class = ^TGdkDisplayX11Class;
+ TGdkDisplayX11Class = record
+ parent_class : TGdkDisplayClass;
+ end;
+
+
+// Private function GDK_TYPE_DISPLAY_X11 : GType;
+function GDK_DISPLAY_X11(obj : pointer) : PGdkDisplayX11;
+function GDK_DISPLAY_X11_CLASS(klass : pointer) : PGdkDisplayX11Class;
+// Private function GDK_IS_DISPLAY_X11(obj : pointer) : boolean;
+// Private function GDK_IS_DISPLAY_X11_CLASS(klass : pointer) : boolean;
+// Private function GDK_DISPLAY_X11_GET_CLASS(obj : pointer) : PGdkDisplayX11Class;
+// Private function _gdk_display_x11_get_type:GType;cdecl;external gdklib;
+// Private function _gdk_x11_display_screen_for_xrootwin(display:PGdkDisplay; xrootwin:TWindow):PGdkScreen;cdecl;external;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+{ Private
+function GDK_TYPE_DISPLAY_X11 : GType;
+begin
+ GDK_TYPE_DISPLAY_X11:=_gdk_display_x11_get_type;
+end;}
+
+function GDK_DISPLAY_X11(obj : pointer) : PGdkDisplayX11;
+begin
+ GDK_DISPLAY_X11:=PGdkDisplayX11(obj);
+ //GDK_DISPLAY_X11:=PGdkDisplayX11(G_TYPE_CHECK_INSTANCE_CAST(obj,GDK_TYPE_DISPLAY_X11));
+end;
+
+function GDK_DISPLAY_X11_CLASS(klass : pointer) : PGdkDisplayX11Class;
+begin
+ GDK_DISPLAY_X11_CLASS:=PGdkDisplayX11Class(klass);
+ //GDK_DISPLAY_X11_CLASS:=PGdkDisplayX11Class(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_DISPLAY_X11));
+end;
+
+{ Private
+function GDK_IS_DISPLAY_X11(obj : pointer) : boolean;
+begin
+ GDK_IS_DISPLAY_X11:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GDK_TYPE_DISPLAY_X11);
+end;
+
+function GDK_IS_DISPLAY_X11_CLASS(klass : pointer) : boolean;
+begin
+ GDK_IS_DISPLAY_X11_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_DISPLAY_X11);
+end;
+
+function GDK_DISPLAY_X11_GET_CLASS(obj : pointer) : PGdkDisplayX11Class;
+begin
+ GDK_DISPLAY_X11_GET_CLASS:=PGdkDisplayX11Class(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_DISPLAY_X11));
+end;}
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk2x11/include/gdkdrawable-x11.inc b/packages/gtk2/src/gtk2x11/include/gdkdrawable-x11.inc
new file mode 100644
index 0000000000..d097316d2a
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/gdkdrawable-x11.inc
@@ -0,0 +1,75 @@
+{%MainUnit ../gdk2x.pas}
+
+{$IFDEF read_interface_rest}
+{ Drawable implementation for X11 }
+
+type
+ PGdkDrawableImplX11 = ^TGdkDrawableImplX11;
+ TGdkDrawableImplX11 = record
+ parent_instance : TGdkDrawable;
+ wrapper : PGdkDrawable;
+ colormap : PGdkColormap;
+ xid : TWindow;
+ screen : PGdkScreen;
+ {$IFDEF Has_XFT}
+ picture : TPicture;
+ {$ENDIF}
+ end;
+
+ PGdkDrawableImplX11Class = ^TGdkDrawableImplX11Class;
+ TGdkDrawableImplX11Class = record
+ parent_class : TGdkDrawableClass;
+ end;
+
+// Private function GDK_TYPE_DRAWABLE_IMPL_X11 : GType;
+function GDK_DRAWABLE_IMPL_X11(obj : pointer) : PGdkDrawableImplX11;
+function GDK_DRAWABLE_IMPL_X11_CLASS(klass : pointer) : PGdkDrawableImplX11Class;
+// Private function GDK_IS_DRAWABLE_IMPL_X11(obj : pointer) : boolean;
+// Private function GDK_IS_DRAWABLE_IMPL_X11_CLASS(klass : pointer) : boolean;
+// Private function GDK_DRAWABLE_IMPL_X11_GET_CLASS(obj : pointer) : PGdkDrawableImplX11Class;
+
+// Private function _gdk_drawable_impl_x11_get_type:GType;cdecl;external;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+{ Private
+function GDK_TYPE_DRAWABLE_IMPL_X11 : GType;
+begin
+ GDK_TYPE_DRAWABLE_IMPL_X11:=_gdk_drawable_impl_x11_get_type;
+end;}
+
+function GDK_DRAWABLE_IMPL_X11(obj : pointer) : PGdkDrawableImplX11;
+begin
+ GDK_DRAWABLE_IMPL_X11:=PGdkDrawableImplX11(obj);
+ //GDK_DRAWABLE_IMPL_X11:=PGdkDrawableImplX11(G_TYPE_CHECK_INSTANCE_CAST(obj,GDK_TYPE_DRAWABLE_IMPL_X11));
+end;
+
+function GDK_DRAWABLE_IMPL_X11_CLASS(klass : pointer) : PGdkDrawableImplX11Class;
+begin
+ GDK_DRAWABLE_IMPL_X11_CLASS:=PGdkDrawableImplX11Class(klass);
+ //GDK_DRAWABLE_IMPL_X11_CLASS:=PGdkDrawableImplX11Class(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_DRAWABLE_IMPL_X11));
+end;
+
+{ Private
+function GDK_IS_DRAWABLE_IMPL_X11(obj : pointer) : boolean;
+begin
+ GDK_IS_DRAWABLE_IMPL_X11:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GDK_TYPE_DRAWABLE_IMPL_X11);
+end;
+
+function GDK_IS_DRAWABLE_IMPL_X11_CLASS(klass : pointer) : boolean;
+begin
+ GDK_IS_DRAWABLE_IMPL_X11_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_DRAWABLE_IMPL_X11);
+end;
+
+function GDK_DRAWABLE_IMPL_X11_GET_CLASS(obj : pointer) : PGdkDrawableImplX11Class;
+begin
+ GDK_DRAWABLE_IMPL_X11_GET_CLASS:=PGdkDrawableImplX11Class(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_DRAWABLE_IMPL_X11));
+end;
+}
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk2x11/include/gdkinputprivate.inc b/packages/gtk2/src/gtk2x11/include/gdkinputprivate.inc
new file mode 100644
index 0000000000..59f8904a55
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/gdkinputprivate.inc
@@ -0,0 +1,148 @@
+{%MainUnit ../gdk2x.pas}
+
+{$IFDEF read_forward_definitions}
+ PPPGdkTimeCoord = ^PPGdkTimeCoord;
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_rest}
+
+type
+{ information about a device axis }
+{ reported x resolution }
+{ reported x minimum/maximum values }
+{ calibrated resolution (for aspect ration) - only relative values
+ between axes used }
+{ calibrated minimum/maximum values }
+ PGdkAxisInfo = ^TGdkAxisInfo;
+ TGdkAxisInfo = record
+ xresolution : gint;
+ xmin_value : gint;
+ xmax_value : gint;
+ resolution : gint;
+ min_value : gint;
+ max_value : gint;
+ end;
+
+
+const
+ GDK_INPUT_NUM_EVENTC = 6;
+{$ifndef XINPUT_NONE}
+{ information about the axes }
+{ Information about XInput device }
+{ minimum key code for device }
+{ true if we need to select a different set of events, but
+ can't because this is the core pointer }
+{ Mask of buttons (used for button grabs) }
+{ true if we've claimed the device as active. (used only for XINPUT_GXI) }
+{$endif}
+{ !XINPUT_NONE }
+
+type
+ PGdkDevicePrivate = ^TGdkDevicePrivate;
+ TGdkDevicePrivate = record
+ info : TGdkDevice;
+ deviceid : guint32;
+ display : PGdkDisplay;
+ axes : PGdkAxisInfo;
+ xdevice : Pointer; // PXDevice;
+ min_keycode : gint;
+ buttonpress_type : longint;
+ buttonrelease_type : longint;
+ keypress_type : longint;
+ keyrelease_type : longint;
+ motionnotify_type : longint;
+ proximityin_type : longint;
+ proximityout_type : longint;
+ changenotify_type : longint;
+ needs_update : gint;
+ button_state : gint;
+ claimed : gint;
+ end;
+
+ P_GdkDeviceClass = ^T_GdkDeviceClass;
+ T_GdkDeviceClass = record
+ parent_class : TGObjectClass;
+ end;
+
+{ gdk window }
+{ Extension mode (GDK_EXTENSION_EVENTS_ALL/CURSOR) }
+{ position relative to root window }
+{ rectangles relative to window of windows obscuring this one }
+{ Is there a pointer grab for this window ? }
+ PGdkInputWindow = ^TGdkInputWindow;
+ TGdkInputWindow = record
+ window : PGdkWindow;
+ mode : TGdkExtensionMode;
+ root_x : gint;
+ root_y : gint;
+ obscuring : PGdkRectangle;
+ num_obscuring : gint;
+ grabbed : gint;
+ end;
+
+{ Global data }
+// Private function GDK_IS_CORE(d : pointer) : boolean;
+
+{ Function declarations }
+function gdk_input_window_find(window:PGdkWindow):PGdkInputWindow;cdecl;external;
+
+procedure gdk_input_window_destroy(window:PGdkWindow);cdecl;external;
+
+function _gdk_device_allocate_history(device:PGdkDevice; n_events:gint):PPGdkTimeCoord;cdecl;external;
+
+procedure _gdk_init_input_core;cdecl;external;
+
+{ The following functions are provided by each implementation
+ (xfree, gxi, and none)
+ }
+function _gdk_input_enable_window(window:PGdkWindow; gdkdev:PGdkDevicePrivate):gint;cdecl;external;
+
+function _gdk_input_disable_window(window:PGdkWindow; gdkdev:PGdkDevicePrivate):gint;cdecl;external;
+
+function _gdk_input_window_none_event(event:PGdkEvent; xevent:PXEvent):gint;cdecl;external;
+
+procedure _gdk_input_configure_event(xevent:PXConfigureEvent; window:PGdkWindow);cdecl;external;
+
+procedure _gdk_input_enter_event(xevent:PXCrossingEvent; window:PGdkWindow);cdecl;external;
+
+function _gdk_input_other_event(event:PGdkEvent; xevent:PXEvent; window:PGdkWindow):gint;cdecl;external;
+
+function _gdk_input_grab_pointer(window:PGdkWindow; owner_events:gint; event_mask:TGdkEventMask; confine_to:PGdkWindow; time:guint32):gint;cdecl;external;
+
+procedure _gdk_input_ungrab_pointer(display:PGdkDisplay; time:guint32);cdecl;external;
+
+function _gdk_device_get_history(device:PGdkDevice; window:PGdkWindow; start:guint32; stop:guint32; events:PPPGdkTimeCoord;
+ n_events:Pgint):gboolean;cdecl;external;
+
+{$ifndef XINPUT_NONE}
+
+const
+ GDK_MAX_DEVICE_CLASSES = 13;
+
+function gdk_input_common_init(display:PGdkDisplay; include_core:gint):gint;cdecl;external;
+
+function gdk_input_find_device(display:PGdkDisplay; id:guint32):PGdkDevicePrivate;cdecl;external;
+
+procedure gdk_input_get_root_relative_geometry(display:PDisplay; w:TWindow; x_ret:Plongint; y_ret:Plongint; width_ret:Plongint;
+ height_ret:Plongint);cdecl;external;
+
+procedure gdk_input_common_find_events(window:PGdkWindow; gdkdev:PGdkDevicePrivate; mask:gint; classes:Pointer {PXEventClass}; num_classes:Plongint);cdecl;external;
+
+procedure gdk_input_common_select_events(window:PGdkWindow; gdkdev:PGdkDevicePrivate);cdecl;external;
+
+function gdk_input_common_other_event(event:PGdkEvent; xevent:PXEvent; input_window:PGdkInputWindow; gdkdev:PGdkDevicePrivate):gint;cdecl;external;
+
+{$endif}
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+{ Private
+function GDK_IS_CORE(d : pointer) : boolean;
+begin
+ GDK_IS_CORE:= (PGdkDevice(d)) = _gdk_core_pointer;
+end;}
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk2x11/include/gdkpixmap-x11.inc b/packages/gtk2/src/gtk2x11/include/gdkpixmap-x11.inc
new file mode 100644
index 0000000000..53f037567f
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/gdkpixmap-x11.inc
@@ -0,0 +1,90 @@
+{%MainUnit ../gdk2x.pas}
+
+{$IFDEF read_interface_rest}
+
+{ Pixmap implementation for X11 }
+
+type
+ PGdkPixmapImplX11 = ^TGdkPixmapImplX11;
+ TGdkPixmapImplX11 = record
+ parent_instance : TGdkDrawableImplX11;
+ width : gint;
+ height : gint;
+ flag0 : word;
+ end;
+
+type
+ PGdkPixmapImplX11Class = ^TGdkPixmapImplX11Class;
+ TGdkPixmapImplX11Class = record
+ parent_class : TGdkDrawableImplX11Class;
+ end;
+
+// Private function GDK_TYPE_PIXMAP_IMPL_X11 : GType;
+function GDK_PIXMAP_IMPL_X11(obj : pointer) : PGdkPixmapImplX11;
+function GDK_PIXMAP_IMPL_X11_CLASS(klass : pointer) : PGdkPixmapImplX11Class;
+// Private function GDK_IS_PIXMAP_IMPL_X11(obj : pointer) : boolean;
+// Private function GDK_IS_PIXMAP_IMPL_X11_CLASS(klass : pointer) : boolean;
+// Private function GDK_PIXMAP_IMPL_X11_GET_CLASS(obj : pointer) : PGdkPixmapImplX11Class;
+
+
+const
+ bm_TGdkPixmapImplX11_is_foreign = $1;
+ bp_TGdkPixmapImplX11_is_foreign = 0;
+
+function is_foreign(a : PGdkPixmapImplX11) : guint;
+procedure set_is_foreign(a : PGdkPixmapImplX11; __is_foreign : guint);
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+{ Private
+function gdk_pixmap_impl_x11_get_type: GType; cdecl; external;
+
+function GDK_TYPE_PIXMAP_IMPL_X11 : GType;
+begin
+ GDK_TYPE_PIXMAP_IMPL_X11:=gdk_pixmap_impl_x11_get_type;
+end; }
+
+function GDK_PIXMAP_IMPL_X11(obj : pointer) : PGdkPixmapImplX11;
+begin
+ GDK_PIXMAP_IMPL_X11:=PGdkPixmapImplX11(obj);
+ //GDK_PIXMAP_IMPL_X11:=PGdkPixmapImplX11(G_TYPE_CHECK_INSTANCE_CAST(obj,GDK_TYPE_PIXMAP_IMPL_X11));
+end;
+
+function GDK_PIXMAP_IMPL_X11_CLASS(klass : pointer) : PGdkPixmapImplX11Class;
+begin
+ GDK_PIXMAP_IMPL_X11_CLASS:=PGdkPixmapImplX11Class(klass);
+ //GDK_PIXMAP_IMPL_X11_CLASS:=PGdkPixmapImplX11Class(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_PIXMAP_IMPL_X11));
+end;
+
+{ Private
+function GDK_IS_PIXMAP_IMPL_X11(obj : pointer) : boolean;
+begin
+ GDK_IS_PIXMAP_IMPL_X11:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GDK_TYPE_PIXMAP_IMPL_X11);
+end;
+
+function GDK_IS_PIXMAP_IMPL_X11_CLASS(klass : pointer) : boolean;
+begin
+ GDK_IS_PIXMAP_IMPL_X11_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_PIXMAP_IMPL_X11);
+end;
+
+function GDK_PIXMAP_IMPL_X11_GET_CLASS(obj : pointer) : PGdkPixmapImplX11Class;
+begin
+ GDK_PIXMAP_IMPL_X11_GET_CLASS:=PGdkPixmapImplX11Class(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_PIXMAP_IMPL_X11));
+end; }
+
+function is_foreign(a : PGdkPixmapImplX11) : guint;
+begin
+ is_foreign:=(a^.flag0 and bm_TGdkPixmapImplX11_is_foreign) shr bp_TGdkPixmapImplX11_is_foreign;
+end;
+
+procedure set_is_foreign(a : PGdkPixmapImplX11; __is_foreign : guint);
+begin
+ a^.flag0:=a^.flag0 or ((__is_foreign shl bp_TGdkPixmapImplX11_is_foreign) and bm_TGdkPixmapImplX11_is_foreign);
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk2x11/include/gdkprivate-x11.inc b/packages/gtk2/src/gtk2x11/include/gdkprivate-x11.inc
new file mode 100644
index 0000000000..962538d16f
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/gdkprivate-x11.inc
@@ -0,0 +1,243 @@
+{%MainUnit ../gdk2x.pas}
+
+{$IFDEF read_forward_definitions}
+ // remove this TXRenderColor, when it has been added to the X11 bindings of FPC
+ TXRenderColor = record
+ red: word;
+ green: word;
+ blue: word;
+ alpha: word;
+ end;
+
+ PPXRectangle = ^PXRectangle;
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_rest}
+
+type
+ PGdkGCX11 = ^TGdkGCX11;
+ TGdkGCX11 = record
+ parent_instance : TGdkGC;
+ xgc : TGC;
+ screen : PGdkScreen;
+ clip_region : PGdkRegion;
+ dirty_mask : guint;
+ fg_picture : TPicture;
+ fg_picture_color : TXRenderColor;
+ fg_pixel : gulong;
+ end;
+
+ PGdkGCX11Class = ^TGdkGCX11Class;
+ TGdkGCX11Class = record
+ parent_class : TGdkGCClass;
+ end;
+
+ PGdkCursorPrivate = ^TGdkCursorPrivate;
+ TGdkCursorPrivate = record
+ cursor : TGdkCursor;
+ xcursor : TCursor;
+ screen : PGdkScreen;
+ end;
+
+ PGdkVisualPrivate = ^TGdkVisualPrivate;
+ TGdkVisualPrivate = record
+ visual : TGdkVisual;
+ xvisual : PVisual;
+ screen : PGdkScreen;
+ end;
+
+// Private function GDK_TYPE_GC_X11 : GType;
+function GDK_GC_X11(obj : pointer) : PGdkGCX11;
+function GDK_GC_X11_CLASS(klass : pointer) : PGdkGCX11Class;
+// Private function GDK_IS_GC_X11(obj : pointer) : boolean;
+// Private function GDK_IS_GC_X11_CLASS(klass : pointer) : boolean;
+// Private function GDK_GC_X11_GET_CLASS(obj : pointer) : PGdkGCX11Class;
+
+
+procedure _gdk_xid_table_insert(display:PGdkDisplay; xid:PXID; data:gpointer);cdecl;external;
+procedure _gdk_xid_table_remove(display:PGdkDisplay; xid:TXID);cdecl;external;
+function _gdk_send_xevent(display:PGdkDisplay; window:TWindow; propagate:gboolean; event_mask:glong; event_send:PXEvent):gint;cdecl;external;
+// Private function _gdk_gc_x11_get_type:GType;cdecl;external;
+
+{$ifdef HAVE_XFT}
+function _gdk_x11_have_render(display:PGdkDisplay):gboolean;cdecl;external;
+function _gdk_x11_gc_get_fg_picture(gc:PGdkGC):TPicture;cdecl;external;
+{$endif HAVE_XFT}
+
+function _gdk_x11_gc_new(drawable:PGdkDrawable; values:PGdkGCValues; values_mask:TGdkGCValuesMask):PGdkGC;cdecl;external;
+function gdk_colormap_lookup(xcolormap:TColormap):PGdkColormap;cdecl;external;
+function gdk_visual_lookup(xvisual:PVisual):PGdkVisual;cdecl;external;
+procedure gdk_window_add_colormap_windows(window:PGdkWindow);cdecl;external;
+function _gdk_x11_copy_to_image(drawable:PGdkDrawable; image:PGdkImage; src_x:gint; src_y:gint; dest_x:gint;
+ dest_y:gint; width:gint; height:gint):PGdkImage;cdecl;external;
+function _gdk_x11_image_get_shm_pixmap(image:PGdkImage):TPixmap;cdecl;external;
+
+{ Routines from gdkgeometry-x11.c }
+procedure _gdk_window_init_position(window:PGdkWindow);cdecl;external;
+procedure _gdk_window_move_resize_child(window:PGdkWindow; x:gint; y:gint; width:gint; height:gint);cdecl;external;
+procedure _gdk_window_process_expose(window:PGdkWindow; serial:gulong; area:PGdkRectangle);cdecl;external;
+procedure _gdk_selection_window_destroyed(window:PGdkWindow);cdecl;external;
+function _gdk_selection_filter_clear_event(event:PXSelectionClearEvent):gboolean;cdecl;external;
+procedure _gdk_region_get_xrectangles(region:PGdkRegion; x_offset:gint; y_offset:gint; rects:PPXRectangle; n_rects:Pgint);cdecl;external;
+function _gdk_moveresize_handle_event(event:PXEvent):gboolean;cdecl;external;
+function _gdk_moveresize_configure_done(display:PGdkDisplay; window:PGdkWindow):gboolean;cdecl;external;
+procedure _gdk_keymap_state_changed(display:PGdkDisplay);cdecl;external;
+function _gdk_x11_get_group_for_state(display:PGdkDisplay; state:TGdkModifierType):gint;cdecl;external;
+//function _gdk_x11_gc_flush(gc:PGdkGC):TGC;cdecl;external;
+procedure _gdk_x11_initialize_locale;cdecl;external;
+procedure _gdk_xgrab_check_unmap(window:PGdkWindow; serial:gulong);cdecl;external;
+procedure _gdk_xgrab_check_destroy(window:PGdkWindow);cdecl;external;
+function _gdk_x11_display_is_root_window(display:PGdkDisplay; xroot_window:TWindow):gboolean;cdecl;external;
+procedure _gdk_x11_events_init_screen(screen:PGdkScreen);cdecl;external;
+procedure _gdk_events_init(display:PGdkDisplay);cdecl;external;
+procedure _gdk_windowing_window_init(screen:PGdkScreen);cdecl;external;
+procedure _gdk_visual_init(screen:PGdkScreen);cdecl;external;
+procedure _gdk_dnd_init(display:PGdkDisplay);cdecl;external;
+procedure _gdk_windowing_image_init(display:PGdkDisplay);cdecl;external;
+procedure _gdk_input_init(display:PGdkDisplay);cdecl;external;
+
+
+var
+ _gdk_x11_drawable_class : TGdkDrawableClass;cvar;external;
+ _gdk_use_xshm : gboolean;cvar;external;
+(* Const before type ignored *)
+ _gdk_nenvent_masks : longint;cvar;external;
+(* Const before type ignored *)
+ _gdk_event_mask_table : array of longint;cvar;external;
+ _gdk_selection_property : TGdkAtom;cvar;external;
+ _gdk_synchronize : gboolean;cvar;external;
+
+function GDK_PIXMAP_SCREEN(pix : pointer) : PGdkScreen;
+
+function GDK_PIXMAP_DISPLAY(pix : pointer) : PGdkDisplay;
+function GDK_PIXMAP_XROOTWIN(pix : pointer) : TWindow;
+function GDK_DRAWABLE_DISPLAY(win : PGdkDrawable) : PGdkDisplay;
+function GDK_DRAWABLE_SCREEN(win : PGdkDrawable) : PGdkScreen;
+function GDK_DRAWABLE_XROOTWIN(win : PGdkDrawable) : TWindow;
+function GDK_SCREEN_DISPLAY(screen : PGdkScreen) : PGdkDisplay;
+function GDK_SCREEN_XROOTWIN(screen : PGdkScreen) : TWindow;
+function GDK_WINDOW_SCREEN(win : PGdkDrawable) : PGdkScreen;
+function GDK_WINDOW_DISPLAY(win : PGdkDrawable) : PGdkDisplay;
+function GDK_WINDOW_XROOTWIN(win : PGdkDrawable) : TWindow;
+function GDK_GC_DISPLAY(gc : PGdkGC) : PGdkDisplay;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+{ Private
+function GDK_TYPE_GC_X11 : GType;
+begin
+ GDK_TYPE_GC_X11:=_gdk_gc_x11_get_type;
+end;}
+
+function GDK_GC_X11(obj : pointer) : PGdkGCX11;
+begin
+ GDK_GC_X11:=PGdkGCX11(obj);
+ //GDK_GC_X11:=PGdkGCX11(G_TYPE_CHECK_INSTANCE_CAST(obj,GDK_TYPE_GC_X11));
+end;
+
+function GDK_GC_X11_CLASS(klass : pointer) : PGdkGCX11Class;
+begin
+ GDK_GC_X11_CLASS:=PGdkGCX11Class(klass);
+ //GDK_GC_X11_CLASS:=PGdkGCX11Class(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_GC_X11));
+end;
+
+{ Private
+function GDK_IS_GC_X11(obj : pointer) : boolean;
+begin
+ GDK_IS_GC_X11:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GDK_TYPE_GC_X11);
+end;
+
+function GDK_IS_GC_X11_CLASS(klass : pointer) : boolean;
+begin
+ GDK_IS_GC_X11_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_GC_X11);
+end;
+
+function GDK_GC_X11_GET_CLASS(obj : pointer) : PGdkGCX11Class;
+begin
+ GDK_GC_X11_GET_CLASS:=PGdkGCX11Class(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_GC_X11));
+end; }
+
+function GDK_PIXMAP_SCREEN(pix : pointer) : PGdkScreen;
+begin
+ GDK_PIXMAP_SCREEN:=(GDK_DRAWABLE_IMPL_X11((PGdkPixmapObject(pix))^.impl))^.screen;
+end;
+
+function GDK_PIXMAP_DISPLAY(pix : pointer) : PGdkDisplay;
+begin
+ GDK_PIXMAP_DISPLAY:=(GDK_SCREEN_X11(GDK_PIXMAP_SCREEN(pix)))^.display;
+end;
+
+function GDK_PIXMAP_XROOTWIN(pix : pointer) : TWindow;
+begin
+ GDK_PIXMAP_XROOTWIN:=(GDK_SCREEN_X11(GDK_PIXMAP_SCREEN(pix)))^.xroot_window;
+end;
+
+function GDK_DRAWABLE_DISPLAY(win : PGdkDrawable) : PGdkDisplay;
+var
+ if_local1 : PGdkDisplay;
+begin
+ if GDK_IS_WINDOW(win) then
+ if_local1:=GDK_WINDOW_DISPLAY(win)
+ else
+ if_local1:=GDK_PIXMAP_DISPLAY(win);
+ GDK_DRAWABLE_DISPLAY:=if_local1;
+end;
+
+function GDK_DRAWABLE_SCREEN(win : PGdkDrawable) : PGdkScreen;
+var
+ if_local1 : PGdkScreen;
+begin
+ if GDK_IS_WINDOW(win) then
+ if_local1:=GDK_WINDOW_SCREEN(win)
+ else
+ if_local1:=GDK_PIXMAP_SCREEN(win);
+ GDK_DRAWABLE_SCREEN:=if_local1;
+end;
+
+function GDK_DRAWABLE_XROOTWIN(win : PGdkDrawable) : TWindow;
+var
+ if_local1 : TWindow;
+begin
+ if GDK_IS_WINDOW(win) then
+ if_local1:=GDK_WINDOW_XROOTWIN(win)
+ else
+ if_local1:=GDK_PIXMAP_XROOTWIN(win);
+ GDK_DRAWABLE_XROOTWIN:=if_local1;
+end;
+
+function GDK_SCREEN_DISPLAY(screen : PGdkScreen) : PGdkDisplay;
+begin
+ GDK_SCREEN_DISPLAY:=(GDK_SCREEN_X11(screen))^.display;
+end;
+
+function GDK_SCREEN_XROOTWIN(screen : PGdkScreen) : TWindow;
+begin
+ GDK_SCREEN_XROOTWIN:=(GDK_SCREEN_X11(screen))^.xroot_window;
+end;
+
+function GDK_WINDOW_SCREEN(win : PGdkDrawable) : PGdkScreen;
+begin
+ GDK_WINDOW_SCREEN:=(GDK_DRAWABLE_IMPL_X11((PGdkWindowObject(win))^.impl))^.screen;
+end;
+
+function GDK_WINDOW_DISPLAY(win : PGdkDrawable) : PGdkDisplay;
+begin
+ GDK_WINDOW_DISPLAY:=(GDK_SCREEN_X11(GDK_WINDOW_SCREEN(win)))^.display;
+end;
+
+function GDK_WINDOW_XROOTWIN(win : PGdkDrawable) : TWindow;
+begin
+ GDK_WINDOW_XROOTWIN:=(GDK_SCREEN_X11(GDK_WINDOW_SCREEN(win)))^.xroot_window;
+end;
+
+function GDK_GC_DISPLAY(gc : PGdkGC) : PGdkDisplay;
+begin
+ GDK_GC_DISPLAY:=GDK_SCREEN_DISPLAY((GDK_GC_X11(gc))^.screen);
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk2x11/include/gdkscreen-x11.inc b/packages/gtk2/src/gtk2x11/include/gdkscreen-x11.inc
new file mode 100644
index 0000000000..e5f1395176
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/gdkscreen-x11.inc
@@ -0,0 +1,95 @@
+{%MainUnit ../gdk2x.pas}
+
+{$IFDEF read_interface_rest}
+
+{ Visual Part }
+{ Colormap Part }
+{ X settings }
+{ Xinerama }
+
+type
+ PGdkScreenX11 = ^TGdkScreenX11;
+ TGdkScreenX11 = record
+ parent_instance : TGdkScreen;
+ display : PGdkDisplay;
+ xdisplay : PDisplay;
+ xscreen : PScreen;
+ screen_num : gint;
+ xroot_window : TWindow;
+ root_window : PGdkWindow;
+ wmspec_check_window : TWindow;
+ system_visual : PGdkVisualPrivate;
+ visuals : ^PGdkVisualPrivate;
+ nvisuals : gint;
+ available_depths : array[0..6] of gint;
+ navailable_depths : gint;
+ available_types : array[0..5] of TGdkVisualType;
+ navailable_types : gint;
+ visual_hash : PGHashTable;
+ default_colormap : PGdkColormap;
+ system_colormap : PGdkColormap;
+ xsettings_client : PXSettingsClient;
+ num_monitors : gint;
+ monitors : PGdkRectangle;
+ end;
+
+ PGdkScreenX11Class = ^TGdkScreenX11Class;
+ TGdkScreenX11Class = record
+ parent_class : TGdkScreenClass;
+ end;
+
+
+// Private function GDK_TYPE_SCREEN_X11 : GType;
+function GDK_SCREEN_X11(obj : pointer) : PGdkScreenX11;
+function GDK_SCREEN_X11_CLASS(klass : pointer) : PGdkScreenX11Class;
+// Private function GDK_IS_SCREEN_X11(obj : pointer) : boolean;
+// Private function GDK_IS_SCREEN_X11_CLASS(klass : pointer) : boolean;
+// Private function GDK_SCREEN_X11_GET_CLASS(obj : pointer) : PGdkScreenX11Class;
+
+
+// Private function _gdk_screen_x11_get_type:GType;cdecl;external;
+
+function _gdk_x11_screen_new(display:PGdkDisplay; screen_number:gint):PGdkScreen;cdecl;external;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+{ Private
+function GDK_TYPE_SCREEN_X11 : GType;
+begin
+ GDK_TYPE_SCREEN_X11:=_gdk_screen_x11_get_type;
+end;}
+
+function GDK_SCREEN_X11(obj : pointer) : PGdkScreenX11;
+begin
+ GDK_SCREEN_X11:=PGdkScreenX11(obj);
+ //GDK_SCREEN_X11:=PGdkScreenX11(G_TYPE_CHECK_INSTANCE_CAST(obj,GDK_TYPE_SCREEN_X11));
+end;
+
+function GDK_SCREEN_X11_CLASS(klass : pointer) : PGdkScreenX11Class;
+begin
+ GDK_SCREEN_X11_CLASS:=PGdkScreenX11Class(klass);
+ //GDK_SCREEN_X11_CLASS:=PGdkScreenX11Class(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_SCREEN_X11));
+end;
+
+{ Private
+function GDK_IS_SCREEN_X11(obj : pointer) : boolean;
+begin
+ GDK_IS_SCREEN_X11:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GDK_TYPE_SCREEN_X11);
+end;
+
+function GDK_IS_SCREEN_X11_CLASS(klass : pointer) : boolean;
+begin
+ GDK_IS_SCREEN_X11_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_SCREEN_X11);
+end;
+
+function GDK_SCREEN_X11_GET_CLASS(obj : pointer) : PGdkScreenX11Class;
+begin
+ GDK_SCREEN_X11_GET_CLASS:=PGdkScreenX11Class(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_SCREEN_X11));
+end;}
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk2x11/include/gdkwindow-x11.inc b/packages/gtk2/src/gtk2x11/include/gdkwindow-x11.inc
new file mode 100644
index 0000000000..aa806d0322
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/gdkwindow-x11.inc
@@ -0,0 +1,177 @@
+{%MainUnit ../gdk2x.pas}
+
+{$IFDEF read_interface_rest}
+
+type
+{ Offsets to add to X coordinates within window }
+{ to get GDK coodinates within window }
+{ Set when the window background is temporarily
+ unset during resizing and scaling }
+{ visible rectangle of window }
+ PGdkXPositionInfo = ^TGdkXPositionInfo;
+ TGdkXPositionInfo = record
+ x : gint;
+ y : gint;
+ width : gint;
+ height : gint;
+ x_offset : gint;
+ y_offset : gint;
+ flag0 : word;
+ clip_rect : TGdkRectangle;
+ end;
+
+const
+ bm_TGdkXPositionInfo_big = $1;
+ bp_TGdkXPositionInfo_big = 0;
+ bm_TGdkXPositionInfo_mapped = $2;
+ bp_TGdkXPositionInfo_mapped = 1;
+ bm_TGdkXPositionInfo_no_bg = $4;
+ bp_TGdkXPositionInfo_no_bg = 2;
+function big(var a : TGdkXPositionInfo) : guint;
+procedure set_big(var a : TGdkXPositionInfo; __big : guint);
+function mapped(var a : TGdkXPositionInfo) : guint;
+procedure set_mapped(var a : TGdkXPositionInfo; __mapped : guint);
+function no_bg(var a : TGdkXPositionInfo) : guint;
+procedure set_no_bg(var a : TGdkXPositionInfo; __no_bg : guint);
+{ Window implementation for X11 }
+
+
+type
+ PGdkWindowImplX11 = ^TGdkWindowImplX11;
+ TGdkWindowImplX11 = record
+ parent_instance : TGdkDrawableImplX11;
+ width : gint;
+ height : gint;
+ position_info : TGdkXPositionInfo;
+ flag0 : word;
+ focus_window : TWindow;
+ end;
+
+type
+ PGdkWindowImplX11Class = ^TGdkWindowImplX11Class;
+ TGdkWindowImplX11Class = record
+ parent_class : TGdkDrawableImplX11Class;
+ end;
+
+
+function GDK_TYPE_WINDOW_IMPL_X11 : GType;
+
+function GDK_WINDOW_IMPL_X11(obj : pointer) : PGdkWindowImplX11;
+
+function GDK_WINDOW_IMPL_X11_CLASS(klass : pointer) : PGdkWindowImplX11Class;
+
+function GDK_IS_WINDOW_IMPL_X11(obj : pointer) : boolean;
+
+function GDK_IS_WINDOW_IMPL_X11_CLASS(klass : pointer) : boolean;
+
+function GDK_WINDOW_IMPL_X11_GET_CLASS(obj : pointer) : PGdkWindowImplX11Class;
+
+{ Set if the window, or any descendent of it, has the focus }
+{ Set if !window_has_focus, but events are being sent to the
+ window because the pointer is in it. (Typically, no window
+ manager is running. }
+{ We use an extra X window for toplevel windows that we XSetInputFocus()
+ to in order to avoid getting keyboard events redirected to subwindows
+ that might not even be part of this app }
+
+const
+ bm_TGdkWindowImplX11_has_focus = $1;
+ bp_TGdkWindowImplX11_has_focus = 0;
+ bm_TGdkWindowImplX11_has_pointer_focus = $2;
+ bp_TGdkWindowImplX11_has_pointer_focus = 1;
+function has_focus(var a : TGdkWindowImplX11) : guint;
+procedure set_has_focus(var a : TGdkWindowImplX11; __has_focus : guint);
+function has_pointer_focus(var a : TGdkWindowImplX11) : guint;
+procedure set_has_pointer_focus(var a : TGdkWindowImplX11; __has_pointer_focus : guint);
+
+
+function gdk_window_impl_x11_get_type:GType;cdecl;external;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+function big(var a : TGdkXPositionInfo) : guint;
+begin
+ big:=(a.flag0 and bm_TGdkXPositionInfo_big) shr bp_TGdkXPositionInfo_big;
+end;
+
+procedure set_big(var a : TGdkXPositionInfo; __big : guint);
+begin
+ a.flag0:=a.flag0 or ((__big shl bp_TGdkXPositionInfo_big) and bm_TGdkXPositionInfo_big);
+end;
+
+function mapped(var a : TGdkXPositionInfo) : guint;
+begin
+ mapped:=(a.flag0 and bm_TGdkXPositionInfo_mapped) shr bp_TGdkXPositionInfo_mapped;
+end;
+
+procedure set_mapped(var a : TGdkXPositionInfo; __mapped : guint);
+begin
+ a.flag0:=a.flag0 or ((__mapped shl bp_TGdkXPositionInfo_mapped) and bm_TGdkXPositionInfo_mapped);
+end;
+
+function no_bg(var a : TGdkXPositionInfo) : guint;
+begin
+ no_bg:=(a.flag0 and bm_TGdkXPositionInfo_no_bg) shr bp_TGdkXPositionInfo_no_bg;
+end;
+
+procedure set_no_bg(var a : TGdkXPositionInfo; __no_bg : guint);
+begin
+ a.flag0:=a.flag0 or ((__no_bg shl bp_TGdkXPositionInfo_no_bg) and bm_TGdkXPositionInfo_no_bg);
+end;
+
+function GDK_TYPE_WINDOW_IMPL_X11 : GType;
+begin
+ GDK_TYPE_WINDOW_IMPL_X11:=gdk_window_impl_x11_get_type;
+end;
+
+function GDK_WINDOW_IMPL_X11(obj : pointer) : PGdkWindowImplX11;
+begin
+ GDK_WINDOW_IMPL_X11:=PGdkWindowImplX11(G_TYPE_CHECK_INSTANCE_CAST(obj,GDK_TYPE_WINDOW_IMPL_X11));
+end;
+
+function GDK_WINDOW_IMPL_X11_CLASS(klass : pointer) : PGdkWindowImplX11Class;
+begin
+ GDK_WINDOW_IMPL_X11_CLASS:=PGdkWindowImplX11Class(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_WINDOW_IMPL_X11));
+end;
+
+function GDK_IS_WINDOW_IMPL_X11(obj : pointer) : boolean;
+begin
+ GDK_IS_WINDOW_IMPL_X11:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GDK_TYPE_WINDOW_IMPL_X11);
+end;
+
+function GDK_IS_WINDOW_IMPL_X11_CLASS(klass : pointer) : boolean;
+begin
+ GDK_IS_WINDOW_IMPL_X11_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_WINDOW_IMPL_X11);
+end;
+
+function GDK_WINDOW_IMPL_X11_GET_CLASS(obj : pointer) : PGdkWindowImplX11Class;
+begin
+ GDK_WINDOW_IMPL_X11_GET_CLASS:=PGdkWindowImplX11Class(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_WINDOW_IMPL_X11));
+end;
+
+function has_focus(var a : TGdkWindowImplX11) : guint;
+begin
+ has_focus:=(a.flag0 and bm_TGdkWindowImplX11_has_focus) shr bp_TGdkWindowImplX11_has_focus;
+end;
+
+procedure set_has_focus(var a : TGdkWindowImplX11; __has_focus : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_focus shl bp_TGdkWindowImplX11_has_focus) and bm_TGdkWindowImplX11_has_focus);
+end;
+
+function has_pointer_focus(var a : TGdkWindowImplX11) : guint;
+begin
+ has_pointer_focus:=(a.flag0 and bm_TGdkWindowImplX11_has_pointer_focus) shr bp_TGdkWindowImplX11_has_pointer_focus;
+end;
+
+procedure set_has_pointer_focus(var a : TGdkWindowImplX11; __has_pointer_focus : guint);
+begin
+ a.flag0:=a.flag0 or ((__has_pointer_focus shl bp_TGdkWindowImplX11_has_pointer_focus) and bm_TGdkWindowImplX11_has_pointer_focus);
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk2x11/include/gdkx.inc b/packages/gtk2/src/gtk2x11/include/gdkx.inc
new file mode 100644
index 0000000000..466b253bf1
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/gdkx.inc
@@ -0,0 +1,284 @@
+{%MainUnit ../gdk2x.pas}
+
+{$IFDEF read_interface_rest}
+var
+ gdk_display : PDisplay;cvar;external;
+
+function gdk_x11_drawable_get_xdisplay(drawable:PGdkDrawable):PDisplay;cdecl;external;
+function gdk_x11_drawable_get_xid(drawable:PGdkDrawable):TXID;cdecl;external;
+function gdk_x11_image_get_xdisplay(image:PGdkImage):PDisplay;cdecl;external;
+function gdk_x11_image_get_ximage(image:PGdkImage):PXImage;cdecl;external;
+function gdk_x11_colormap_get_xdisplay(colormap:PGdkColormap):PDisplay;cdecl;external;
+function gdk_x11_colormap_get_xcolormap(colormap:PGdkColormap):TColormap;cdecl;external;
+function gdk_x11_cursor_get_xdisplay(cursor:PGdkCursor):PDisplay;cdecl;external;
+function gdk_x11_cursor_get_xcursor(cursor:PGdkCursor):TCursor;cdecl;external;
+function gdk_x11_display_get_xdisplay(display:PGdkDisplay):PDisplay;cdecl;external;
+function gdk_x11_visual_get_xvisual(visual:PGdkVisual):PVisual;cdecl;external;
+function gdk_x11_gc_get_xdisplay(gc:PGdkGC):PDisplay;cdecl;external;
+function gdk_x11_gc_get_xgc(gc:PGdkGC):TGC;cdecl;external;
+function gdk_x11_screen_get_xscreen(screen:PGdkScreen):PScreen;cdecl;external;
+function gdk_x11_screen_get_screen_number(screen:PGdkScreen):longint;cdecl;external;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+
+function gdk_x11_get_default_root_xwindow:TWindow;cdecl;external;
+function gdk_x11_get_default_xdisplay:PDisplay;cdecl;external;
+function gdk_x11_get_default_screen:gint;cdecl;external;
+
+{$endif}
+function GDK_COLORMAP_XDISPLAY(cmap : PGdkColormap) : PDisplay;
+function GDK_COLORMAP_XCOLORMAP(cmap : PGdkColormap) : TColormap;
+function GDK_CURSOR_XDISPLAY(cursor : PGdkCursor) : PDisplay;
+function GDK_CURSOR_XCURSOR(cursor : PGdkCursor) : TCursor;
+function GDK_IMAGE_XDISPLAY(image : PGdkImage) : PDisplay;
+function GDK_IMAGE_XIMAGE(image : PGdkImage) : PXImage;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function GDK_ROOT_WINDOW : TWindow;
+{$endif}
+
+function GDK_DISPLAY_XDISPLAY(display : PGdkDisplay) : PDisplay;
+function GDK_WINDOW_XDISPLAY(win : PGdkDrawable) : PDisplay;
+function GDK_WINDOW_XID(win : PGdkDrawable) : TXID;
+function GDK_WINDOW_XWINDOW(win : PGdkDrawable) : TXID;
+function GDK_PIXMAP_XDISPLAY(win : PGdkDrawable) : PDisplay;
+function GDK_PIXMAP_XID(win : PGdkDrawable) : TXID;
+function GDK_DRAWABLE_XDISPLAY(win : PGdkDrawable) : PDisplay;
+function GDK_DRAWABLE_XID(win : PGdkDrawable) : TXID;
+function GDK_GC_XDISPLAY(gc : PGdkGC) : PDisplay;
+function GDK_GC_XGC(gc : PGdkGC) : TGC;
+function GDK_SCREEN_XDISPLAY(screen : PGdkScreen) : PDisplay;
+function GDK_SCREEN_XSCREEN(screen : PGdkScreen) : PScreen;
+function GDK_SCREEN_XNUMBER(screen : PGdkScreen) : longint;
+function GDK_VISUAL_XVISUAL(visual : PGdkVisual) : PVisual;
+
+function gdkx_visual_get_for_screen(screen:PGdkScreen; xvisualid:TVisualID):PGdkVisual;cdecl;external;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+
+function gdkx_visual_get(xvisualid:TVisualID):PGdkVisual;cdecl;external;
+
+{$endif}
+{ XXX: Do not use this function until it is fixed. An X Colormap
+ is useless unless we also have the visual. }
+function gdkx_colormap_get(xcolormap:TColormap):PGdkColormap;cdecl;external;
+
+{ Return the Gdk for a particular XID }
+function gdk_xid_table_lookup_for_display(display:PGdkDisplay; xid:TXID):gpointer;cdecl;external;
+
+function gdk_x11_get_server_time(window:PGdkWindow):guint32;cdecl;external;
+
+{ returns TRUE if we support the given WM spec feature }
+function gdk_x11_screen_supports_net_wm_hint(screen:PGdkScreen; _property:TGdkAtom):gboolean;cdecl;external;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+
+function gdk_xid_table_lookup(xid:TXID):gpointer;cdecl;external;
+function gdk_net_wm_supports(_property:TGdkAtom):gboolean;cdecl;external;
+procedure gdk_x11_grab_server;cdecl;external;
+procedure gdk_x11_ungrab_server;cdecl;external;
+
+{$endif}
+
+function gdk_x11_lookup_xdisplay(xdisplay:PDisplay):PGdkDisplay;cdecl;external;
+
+{ Functions to get the X Atom equivalent to the GdkAtom }
+function gdk_x11_atom_to_xatom_for_display(display:PGdkDisplay; atom:TGdkAtom):TAtom;cdecl;external;
+
+function gdk_x11_xatom_to_atom_for_display(display:PGdkDisplay; xatom:TAtom):TGdkAtom;cdecl;external;
+
+(* Const before type ignored *)
+function gdk_x11_get_xatom_by_name_for_display(display:PGdkDisplay; atom_name:Pgchar):TAtom;cdecl;external;
+
+(* Const before type ignored *)
+function gdk_x11_get_xatom_name_for_display(display:PGdkDisplay; xatom:TAtom):Pgchar;cdecl;external;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_x11_atom_to_xatom(atom:TGdkAtom):TAtom;cdecl;external;
+function gdk_x11_xatom_to_atom(xatom:TAtom):TGdkAtom;cdecl;external;
+(* Const before type ignored *)
+function gdk_x11_get_xatom_by_name(atom_name:Pgchar):TAtom;cdecl;external;
+(* Const before type ignored *)
+function gdk_x11_get_xatom_name(xatom:TAtom):Pgchar;cdecl;external;
+{$endif}
+
+{$ifdef GDK_ENABLE_DEPRECATED}
+function gdk_x11_font_get_xdisplay(font:PGdkFont):PDisplay;cdecl;external;
+function gdk_x11_font_get_xfont(font:PGdkFont):gpointer;cdecl;external;
+(* Const before type ignored *)
+function gdk_x11_font_get_name(font:PGdkFont):Pchar;cdecl;external;
+function GDK_FONT_XDISPLAY(font : PGdkFont): PDisplay;
+function GDK_FONT_XFONT(font : PGdkFont): gpointer;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_font_lookup(xid : TXID) : PGdkFont;
+{$endif}
+
+function gdk_font_lookup_for_display(display:PGdkDisplay; xid:TXID) : PGdkFont;
+
+procedure gdk_x11_display_grab(display:PGdkDisplay);cdecl;external;
+
+procedure gdk_x11_display_ungrab(display:PGdkDisplay);cdecl;external;
+{$endif GDK_ENABLE_DEPRECATED}
+
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+
+function GDK_COLORMAP_XDISPLAY(cmap : PGdkColormap) : PDisplay;
+begin
+ GDK_COLORMAP_XDISPLAY:=gdk_x11_colormap_get_xdisplay(cmap);
+end;
+
+function GDK_COLORMAP_XCOLORMAP(cmap : PGdkColormap) : TColormap;
+begin
+ GDK_COLORMAP_XCOLORMAP:=gdk_x11_colormap_get_xcolormap(cmap);
+end;
+
+function GDK_CURSOR_XDISPLAY(cursor : PGdkCursor) : PDisplay;
+begin
+ GDK_CURSOR_XDISPLAY:=gdk_x11_cursor_get_xdisplay(cursor);
+end;
+
+function GDK_CURSOR_XCURSOR(cursor : PGdkCursor) : TCursor;
+begin
+ GDK_CURSOR_XCURSOR:=gdk_x11_cursor_get_xcursor(cursor);
+end;
+
+function GDK_IMAGE_XDISPLAY(image : PGdkImage) : PDisplay;
+begin
+ GDK_IMAGE_XDISPLAY:=gdk_x11_image_get_xdisplay(image);
+end;
+
+function GDK_IMAGE_XIMAGE(image : PGdkImage) : PXImage;
+begin
+ GDK_IMAGE_XIMAGE:=gdk_x11_image_get_ximage(image);
+end;
+
+function GDK_DRAWABLE_XDISPLAY(win : PGdkDrawable) : PDisplay;
+var
+ if_local1 : PDisplay;
+begin
+ if GDK_IS_WINDOW(win) then
+ if_local1:=GDK_WINDOW_XDISPLAY(win)
+ else
+ if_local1:=GDK_PIXMAP_XDISPLAY(win);
+ GDK_DRAWABLE_XDISPLAY:=if_local1;
+end;
+
+function GDK_DRAWABLE_XID(win : PGdkDrawable) : TWindow;
+var
+ if_local1 : TWindow;
+begin
+ if GDK_IS_WINDOW(win) then
+ if_local1:=GDK_WINDOW_XID(win)
+ else
+ if_local1:=GDK_PIXMAP_XID(win);
+ GDK_DRAWABLE_XID:=if_local1;
+end;
+
+function GDK_GC_XDISPLAY(gc : PGdkGC) : PDisplay;
+begin
+ GDK_GC_XDISPLAY:=GDK_SCREEN_XDISPLAY((GDK_GC_X11(gc))^.screen);
+end;
+
+function GDK_GC_XGC(gc : PGdkGC) : TGC;
+begin
+ GDK_GC_XGC:=(GDK_GC_X11(gc))^.xgc;
+end;
+
+function GDK_SCREEN_XSCREEN(screen : PGdkScreen) : PScreen;
+begin
+ GDK_SCREEN_XSCREEN:=(GDK_SCREEN_X11(screen))^.xscreen;
+end;
+
+function GDK_SCREEN_XNUMBER(screen : PGdkScreen) : longint;
+begin
+ GDK_SCREEN_XNUMBER:=(GDK_SCREEN_X11(screen))^.screen_num;
+end;
+
+function GDK_VISUAL_XVISUAL(visual : PGdkVisual) : PVisual;
+begin
+ GDK_VISUAL_XVISUAL:=(PGdkVisualPrivate(visual))^.xvisual;
+end;
+
+function GDK_GC_GET_XGC(gc : PGdkGC) : TGC;
+var
+ if_local1 : TGC;
+begin
+ if_local1:=(PGdkGCX11(gc))^.xgc;
+ if (GDK_GC_X11(gc))^.dirty_mask=gTRUE then begin
+ //if_local1:=_gdk_x11_gc_flush(gc)
+ end;
+ GDK_GC_GET_XGC:=if_local1;
+end;
+
+function GDK_ROOT_WINDOW : TWindow;
+begin
+ GDK_ROOT_WINDOW:=gdk_x11_get_default_root_xwindow;
+end;
+
+function GDK_DISPLAY_XDISPLAY(display : PGdkDisplay) : PDisplay;
+begin
+ GDK_DISPLAY_XDISPLAY:=gdk_x11_display_get_xdisplay(display);
+end;
+
+function GDK_WINDOW_XDISPLAY(win : PGdkDrawable) : PDisplay;
+begin
+ GDK_WINDOW_XDISPLAY:=gdk_x11_drawable_get_xdisplay((PGdkWindowObject(win))^.impl);
+end;
+
+function GDK_WINDOW_XID(win : PGdkDrawable) : TXID;
+begin
+ GDK_WINDOW_XID:=gdk_x11_drawable_get_xid(win);
+end;
+
+function GDK_WINDOW_XWINDOW(win : PGdkDrawable) : TXID;
+begin
+ GDK_WINDOW_XWINDOW:=gdk_x11_drawable_get_xid(win);
+end;
+
+function GDK_PIXMAP_XDISPLAY(win : PGdkDrawable) : PDisplay;
+begin
+ GDK_PIXMAP_XDISPLAY:=gdk_x11_drawable_get_xdisplay((PGdkPixmapObject(win))^.impl);
+end;
+
+function GDK_PIXMAP_XID(win : PGdkDrawable) : TXID;
+begin
+ GDK_PIXMAP_XID:=gdk_x11_drawable_get_xid(win);
+end;
+
+function GDK_SCREEN_XDISPLAY(screen : PGdkScreen) : PDisplay;
+begin
+ GDK_SCREEN_XDISPLAY:=gdk_x11_display_get_xdisplay(gdk_screen_get_display(screen));
+end;
+
+{$ifdef GDK_ENABLE_DEPRECATED}
+function GDK_FONT_XDISPLAY(font : PGdkFont): PDisplay;
+begin
+ GDK_FONT_XDISPLAY:=gdk_x11_font_get_xdisplay(font);
+end;
+
+function gdk_font_lookup(xid : TXID) : PGdkFont;
+begin
+ gdk_font_lookup:=PGdkFont(gdk_xid_table_lookup(xid));
+end;
+
+function GDK_FONT_XFONT(font : PGdkFont): gpointer;
+begin
+ GDK_FONT_XFONT:=gdk_x11_font_get_xfont(font);
+end;
+
+function gdk_font_lookup_for_display(display:PGdkDisplay; xid:TXID) : PGdkFont;
+begin
+ gdk_font_lookup_for_display:=PGdkFont(gdk_xid_table_lookup_for_display(display,xid));
+end;
+{$ENDIF GDK_ENABLE_DEPRECATED}
+
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk2x11/include/gxid_proto.inc b/packages/gtk2/src/gtk2x11/include/gxid_proto.inc
new file mode 100644
index 0000000000..13179d2e54
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/gxid_proto.inc
@@ -0,0 +1,52 @@
+{%MainUnit ../gdk2x.pas}
+
+{$IFDEF read_interface_rest}
+
+const
+ GXID_CLAIM_DEVICE = 1;
+ GXID_RELEASE_DEVICE = 2;
+ GXID_RETURN_OK = 0;
+ GXID_RETURN_ERROR = -(1);
+
+type
+ PGxidMessage = ^TGxidMessage;
+
+ PGxidU32 = ^TGxidU32;
+ TGxidU32 = dword;
+
+ PGxidI32 = ^TGxidI32;
+ TGxidI32 = longint;
+ TGxidClaimDevice = record
+ _type : TGxidU32;
+ length : TGxidU32;
+ device : TGxidU32;
+ window : TGxidU32;
+ exclusive : TGxidU32;
+ end;
+
+ TGxidReleaseDevice = record
+ _type : TGxidU32;
+ length : TGxidU32;
+ device : TGxidU32;
+ window : TGxidU32;
+ end;
+
+ TGxidMessageAny = record
+ _type : TGxidU32;
+ length : TGxidU32;
+ end;
+
+ TGxidMessage = record
+ case longint of
+ 0 : ( any : TGxidMessageAny );
+ 1 : ( claim : TGxidClaimDevice );
+ 2 : ( release : TGxidReleaseDevice );
+ end;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk2x11/include/mwmutil.inc b/packages/gtk2/src/gtk2x11/include/mwmutil.inc
new file mode 100644
index 0000000000..4685a215bb
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/mwmutil.inc
@@ -0,0 +1,109 @@
+{%MainUnit ../gdk2x.pas}
+
+{$IFDEF read_interface_rest}
+
+type
+ PMotifWmHints = ^TMotifWmHints;
+ TMotifWmHints = record
+ flags : dword;
+ functions : dword;
+ decorations : dword;
+ input_mode : longint;
+ status : dword;
+ end;
+ TMwmHints = TMotifWmHints;
+ PMwmHints = ^TMwmHints;
+
+const
+ MWM_HINTS_FUNCTIONS = 1 shl 0;
+ MWM_HINTS_DECORATIONS = 1 shl 1;
+ MWM_HINTS_INPUT_MODE = 1 shl 2;
+ MWM_HINTS_STATUS = 1 shl 3;
+ MWM_FUNC_ALL = 1 shl 0;
+ MWM_FUNC_RESIZE = 1 shl 1;
+ MWM_FUNC_MOVE = 1 shl 2;
+ MWM_FUNC_MINIMIZE = 1 shl 3;
+ MWM_FUNC_MAXIMIZE = 1 shl 4;
+ MWM_FUNC_CLOSE = 1 shl 5;
+ MWM_DECOR_ALL = 1 shl 0;
+ MWM_DECOR_BORDER = 1 shl 1;
+ MWM_DECOR_RESIZEH = 1 shl 2;
+ MWM_DECOR_TITLE = 1 shl 3;
+ MWM_DECOR_MENU = 1 shl 4;
+ MWM_DECOR_MINIMIZE = 1 shl 5;
+ MWM_DECOR_MAXIMIZE = 1 shl 6;
+ MWM_INPUT_MODELESS = 0;
+ MWM_INPUT_PRIMARY_APPLICATION_MODAL = 1;
+ MWM_INPUT_SYSTEM_MODAL = 2;
+ MWM_INPUT_FULL_APPLICATION_MODAL = 3;
+ MWM_INPUT_APPLICATION_MODAL = MWM_INPUT_PRIMARY_APPLICATION_MODAL;
+ MWM_TEAROFF_WINDOW = 1 shl 0;
+
+{ atoms}
+ _XA_MOTIF_BINDINGS = '_MOTIF_BINDINGS';
+ _XA_MOTIF_WM_HINTS = '_MOTIF_WM_HINTS';
+ _XA_MOTIF_WM_MESSAGES = '_MOTIF_WM_MESSAGES';
+ _XA_MOTIF_WM_OFFSET = '_MOTIF_WM_OFFSET';
+ _XA_MOTIF_WM_MENU = '_MOTIF_WM_MENU';
+ _XA_MOTIF_WM_INFO = '_MOTIF_WM_INFO';
+ _XA_MWM_HINTS = _XA_MOTIF_WM_HINTS;
+ _XA_MWM_MESSAGES = _XA_MOTIF_WM_MESSAGES;
+ _XA_MWM_MENU = _XA_MOTIF_WM_MENU;
+ _XA_MWM_INFO = _XA_MOTIF_WM_INFO;
+
+{ _MWM_INFO property }
+
+type
+ PMotifWmInfo = ^TMotifWmInfo;
+ TMotifWmInfo = record
+ flags : longint;
+ wm_window : TWindow;
+ end;
+
+ PMwmInfo = ^TMwmInfo;
+ TMwmInfo = TMotifWmInfo;
+
+const
+ MWM_INFO_STARTUP_STANDARD = 1 shl 0;
+ MWM_INFO_STARTUP_CUSTOM = 1 shl 1;
+
+{ _MWM_HINTS property }
+type
+ PPropMotifWmHints = ^TPropMotifWmHints;
+ TPropMotifWmHints = record
+ flags : dword;
+ functions : dword;
+ decorations : dword;
+ inputMode : longint;
+ status : dword;
+ end;
+
+ PPropMwmHints = ^TPropMwmHints;
+ TPropMwmHints = TPropMotifWmHints;
+
+const
+ PROP_MOTIF_WM_HINTS_ELEMENTS = 5;
+ PROP_MWM_HINTS_ELEMENTS = PROP_MOTIF_WM_HINTS_ELEMENTS;
+
+{ _MWM_INFO property, slight return }
+type
+ PPropMotifWmInfo = ^TPropMotifWmInfo;
+ TPropMotifWmInfo = record
+ flags : dword;
+ wmWindow : dword;
+ end;
+
+ PPropMwmInfo = ^TPropMwmInfo;
+ TPropMwmInfo = TPropMotifWmInfo;
+
+const
+ PROP_MOTIF_WM_INFO_ELEMENTS = 2;
+ PROP_MWM_INFO_ELEMENTS = PROP_MOTIF_WM_INFO_ELEMENTS;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk2x11/include/xsettings-client.inc b/packages/gtk2/src/gtk2x11/include/xsettings-client.inc
new file mode 100644
index 0000000000..cb544b518a
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/xsettings-client.inc
@@ -0,0 +1,27 @@
+{%MainUnit ../gdk2x.pas}
+{$IFDEF read_interface_rest}
+type
+ PXSettingsAction = ^TXSettingsAction;
+ TXSettingsAction = Longint;
+
+Const
+ XSETTINGS_ACTION_NEW = 0;
+ XSETTINGS_ACTION_CHANGED = 1;
+ XSETTINGS_ACTION_DELETED = 2;
+
+type
+ // this PXSettingsClient needs to be removed when there are xcl.h bindings for fpc
+ PXSettingsClient = pointer;
+
+type
+ TXSettingsNotifyFunc = procedure (name:Pchar; action:TXSettingsAction; setting:PXSettingsSetting; cb_data:pointer);cdecl;
+
+ TXSettingsWatchFunc = procedure (window:TWindow; is_start:TBool; mask:longint; cb_data:pointer);cdecl;
+
+function xsettings_client_new(display:PDisplay; screen:longint; notify:TXSettingsNotifyFunc; watch:TXSettingsWatchFunc; cb_data:pointer):PXSettingsClient;cdecl;external;
+procedure xsettings_client_destroy(client:PXSettingsClient);cdecl;external;
+function xsettings_client_process_event(client:PXSettingsClient; xev:PXEvent):TBool;cdecl;external;
+function xsettings_client_get_setting(client:PXSettingsClient; name:Pchar; setting:PPXSettingsSetting):TXSettingsResult;cdecl;external;
+
+{$ENDIF read_interface_rest}
+
diff --git a/packages/gtk2/src/gtk2x11/include/xsettings-common.inc b/packages/gtk2/src/gtk2x11/include/xsettings-common.inc
new file mode 100644
index 0000000000..23b59d20c0
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/include/xsettings-common.inc
@@ -0,0 +1,111 @@
+{%MainUnit ../gdk2x.pas}
+
+{$IFDEF read_interface_rest}
+
+{ Renames for GDK inclusion }
+
+{const
+ xsettings_byte_order = _gdk_xsettings_byte_order;
+ xsettings_client_destroy = _gdk_xsettings_client_destroy;
+ xsettings_client_get_setting = _gdk_xsettings_client_get_setting;
+ xsettings_client_new = _gdk_xsettings_client_new;
+ xsettings_client_process_event = _gdk_xsettings_client_process_event;
+ xsettings_list_copy = _gdk_xsettings_list_copy;
+ xsettings_list_delete = _gdk_xsettings_list_delete;
+ xsettings_list_free = _gdk_xsettings_list_free;
+ xsettings_list_insert = _gdk_xsettings_list_insert;
+ xsettings_list_lookup = _gdk_xsettings_list_lookup;
+ xsettings_setting_copy = _gdk_xsettings_setting_copy;
+ xsettings_setting_equal = _gdk_xsettings_setting_equal;
+ xsettings_setting_free = _gdk_xsettings_setting_free;}
+
+type
+{ Types of settings possible. Enum values correspond to protocol values. }
+
+ PXSettingsType = ^TXSettingsType;
+ TXSettingsType = Longint;
+
+Const
+ XSETTINGS_TYPE_INT = 0;
+ XSETTINGS_TYPE_STRING = 1;
+ XSETTINGS_TYPE_COLOR = 2;
+
+type
+ PXSettingsResult = ^TXSettingsResult;
+ TXSettingsResult = Longint;
+
+Const
+ XSETTINGS_SUCCESS = 0;
+ XSETTINGS_NO_MEM = 1;
+ XSETTINGS_ACCESS = 2;
+ XSETTINGS_FAILED = 3;
+ XSETTINGS_NO_ENTRY = 4;
+ XSETTINGS_DUPLICATE_ENTRY = 5;
+
+type
+ PXSettingsBuffer = ^TXSettingsBuffer;
+ TXSettingsBuffer = record
+ byte_order : char;
+ len : size_t;
+ data : Pbyte;
+ pos : Pbyte;
+ end;
+
+ PXSettingsColor = ^TXSettingsColor;
+ TXSettingsColor = record
+ red : word;
+ green : word;
+ blue : word;
+ alpha : word;
+ end;
+
+ PXSettingsSetting = ^TXSettingsSetting;
+ TXSettingsSetting = record
+ name : Pchar;
+ _type : TXSettingsType;
+ data : record
+ case longint of
+ 0 : ( v_int : longint );
+ 1 : ( v_string : Pchar );
+ 2 : ( v_color : TXSettingsColor );
+ end;
+ last_change_serial : dword;
+ end;
+ PPXSettingsSetting = ^PXSettingsSetting;
+
+ PXSettingsList = ^TXSettingsList;
+ TXSettingsList = record
+ setting : PXSettingsSetting;
+ next : PXSettingsList;
+ end;
+ PPXSettingsList = ^PXSettingsList;
+
+
+function xsettings_setting_copy(setting:PXSettingsSetting):PXSettingsSetting;cdecl;external;
+procedure xsettings_setting_free(setting:PXSettingsSetting);cdecl;external;
+function xsettings_setting_equal(setting_a:PXSettingsSetting; setting_b:PXSettingsSetting):longint;cdecl;external;
+procedure xsettings_list_free(list:PXSettingsList);cdecl;external;
+function xsettings_list_copy(list:PXSettingsList):PXSettingsList;cdecl;external;
+function xsettings_list_insert(list:PPXSettingsList; setting:PXSettingsSetting):TXSettingsResult;cdecl;external;
+
+(* Const before type ignored *)
+function xsettings_list_lookup(list:PXSettingsList; name:Pchar):PXSettingsSetting;cdecl;external;
+
+(* Const before type ignored *)
+function xsettings_list_delete(list:PPXSettingsList; name:Pchar):TXSettingsResult;cdecl;external;
+
+function xsettings_byte_order:char;cdecl;external;
+
+function XSETTINGS_PAD(n,m : longint) : longint;
+
+{$ENDIF read_interface_rest}
+
+{$IFDEF read_implementation}
+
+function XSETTINGS_PAD(n,m : longint) : longint;
+ begin
+ XSETTINGS_PAD:=((n + m) - 1) and ( not (m - 1));
+ end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/gtk2x11/scripts/gdkx11_h2pas.sh b/packages/gtk2/src/gtk2x11/scripts/gdkx11_h2pas.sh
new file mode 100755
index 0000000000..f3b52ea978
--- /dev/null
+++ b/packages/gtk2/src/gtk2x11/scripts/gdkx11_h2pas.sh
@@ -0,0 +1,48 @@
+#!/usr/bin/env bash
+
+#set -x
+set -e
+
+# make sure, we are in the right directory
+cd ../scripts
+
+CHeaderDir=../c_src/x11
+PascalIncDir=../include
+HTmpFile=temp.h
+PasTmpFile=temp.inc
+
+HFiles=$(ls $CHeaderDir/*.h)
+for HFile in $HFiles; do
+ echo $HFile
+ ShortHFile=$(echo $HFile | sed -e 's#.*/##')
+ ShortPascalFile=$(echo $ShortHFile | sed -e 's#\.h$#.inc#')
+ echo $ShortPascalFile
+ PascalFile=$PascalIncDir/$ShortPascalFile
+ cat $HFile | sed \
+ -e 's#G_BEGIN_DECLS##g' \
+ -e 's#G_END_DECLS##g' \
+ -e 's#G_CONST_RETURN#const#g' \
+ > $HTmpFile
+
+ h2pas -d -e -i -p -t -o $PasTmpFile $HTmpFile
+ cat $PasTmpFile | sed \
+ -e 's#\bT\(gint\)\b#\1#g' \
+ -e 's#\bT\(guint\)\b#\1#g' \
+ -e 's#\bT\(gboolean\)\b#\1#g' \
+ -e 's#\bT\(glong\)\b#\1#g' \
+ -e 's#\bT\(gulong\)\b#\1#g' \
+ -e 's#\bT\(gchar\)\b#\1#g' \
+ -e 's#\bT\(guchar\)\b#\1#g' \
+ -e 's#\bT\(gshort\)\b#\1#g' \
+ -e 's#\bT\(gushort\)\b#\1#g' \
+ -e 's#\bT\(gfloat\)\b#\1#g' \
+ -e 's#\bT\(gdouble\)\b#\1#g' \
+ -e 's#\bT\(gpointer\)\b#\1#g' \
+ -e 's#\bT\(gconstpointer\)\b#\1#g' \
+ -e 's#\bT\(guint32\)\b#\1#g' \
+ > $PascalFile
+done
+
+
+# end.
+
diff --git a/packages/gtk2/src/gtkglext/gdkglconfig.inc b/packages/gtk2/src/gtkglext/gdkglconfig.inc
new file mode 100644
index 0000000000..b9b616a450
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglconfig.inc
@@ -0,0 +1,181 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglconfig.h }
+
+{$ifdef read_interface_types}
+
+ { PGdkGLConfig already defined in gdkgltypes.inc }
+
+ TGdkGLConfig = record
+ parent_instance: TGObject;
+ layer_plane: gint;
+ n_aux_buffers: gint;
+ n_sample_buffers: gint;
+ flag0 : word;
+ end;
+
+ PGdkGLConfigClass = ^TGdkGLConfigClass;
+ TGdkGLConfigClass = record
+ parent_class: TGObjectClass;
+ end;
+
+{$endif read_interface_types}
+
+{$ifdef read_interface_rest}
+const
+ { Constants for operating on TGdkGLConfig.flag0 }
+ bm_TGdkGLConfig_is_rgba = 1 shl 0;
+ bp_TGdkGLConfig_is_rgba = 0;
+ bm_TGdkGLConfig_is_double_buffered = 1 shl 1;
+ bp_TGdkGLConfig_is_double_buffered = 1;
+ bm_TGdkGLConfig_as_single_mode = 1 shl 2;
+ bp_TGdkGLConfig_as_single_mode = 2;
+ bm_TGdkGLConfig_is_stereo = 1 shl 3;
+ bp_TGdkGLConfig_is_stereo = 3;
+ bm_TGdkGLConfig_has_alpha = 1 shl 4;
+ bp_TGdkGLConfig_has_alpha = 4;
+ bm_TGdkGLConfig_has_depth_buffer = 1 shl 5;
+ bp_TGdkGLConfig_has_depth_buffer = 5;
+ bm_TGdkGLConfig_has_stencil_buffer = 1 shl 6;
+ bp_TGdkGLConfig_has_stencil_buffer = 6;
+ bm_TGdkGLConfig_has_accum_buffer = 1 shl 7;
+ bp_TGdkGLConfig_has_accum_buffer = 7;
+
+{*
+ * Display mode bit masks.
+ *}
+const
+ GDK_GL_MODE_RGB = 0;
+ GDK_GL_MODE_RGBA = 0; {* same as RGB *}
+ GDK_GL_MODE_INDEX = 1 shl 0;
+ GDK_GL_MODE_SINGLE = 0;
+ GDK_GL_MODE_DOUBLE = 1 shl 1;
+ GDK_GL_MODE_STEREO = 1 shl 2;
+ GDK_GL_MODE_ALPHA = 1 shl 3;
+ GDK_GL_MODE_DEPTH = 1 shl 4;
+ GDK_GL_MODE_STENCIL = 1 shl 5;
+ GDK_GL_MODE_ACCUM = 1 shl 6;
+ GDK_GL_MODE_MULTISAMPLE = 1 shl 7; {* not supported yet *}
+
+type
+ TGdkGLConfigMode = Longint;
+ PGdkGLConfigMode = ^TGdkGLConfigMode;
+
+function GDK_TYPE_GL_CONFIG: GType;
+function GDK_GL_CONFIG(anObject: Pointer): PGdkGLConfig;
+function GDK_GL_CONFIG_CLASS(klass: Pointer): PGdkGLConfigClass;
+function GDK_IS_GL_CONFIG(anObject: Pointer): boolean;
+function GDK_IS_GL_CONFIG_CLASS(klass: Pointer): boolean;
+function GDK_GL_CONFIG_GET_CLASS(obj: Pointer): PGdkGLConfigClass;
+
+function gdk_gl_config_get_type: GType; cdecl; external GdkGLExtLib;
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_gl_config_new(
+ attrib_list: PInteger): PGdkGLConfig;
+ cdecl; external GdkGLExtLib;
+{$endif GDK_MULTIHEAD_SAFE}
+
+{$ifdef GDKGLEXT_MULTIHEAD_SUPPORT}
+function gdk_gl_config_new_for_screen(
+ screen: PGdkScreen;
+ attrib_list: PInteger): PGdkGLConfig;
+ cdecl; external GdkGLExtLib;
+{$endif GDKGLEXT_MULTIHEAD_SUPPORT}
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_gl_config_new_by_mode(
+ mode: TGdkGLConfigMode): PGdkGLConfig;
+ cdecl; external GdkGLExtLib;
+{$endif GDK_MULTIHEAD_SAFE}
+
+{$ifdef GDKGLEXT_MULTIHEAD_SUPPORT}
+function gdk_gl_config_new_by_mode_for_screen(
+ screen: PGdkScreen;
+ mode: TGdkGLConfigMode): PGdkGLConfig;
+ cdecl; external GdkGLExtLib;
+{$endif GDKGLEXT_MULTIHEAD_SUPPORT}
+
+function gdk_gl_config_get_screen(glconfig: PGdkGLConfig): PGdkScreen;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_get_attrib(glconfig: PGdkGLConfig;
+ attribute: Integer;
+ value: PInteger): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_get_colormap(glconfig: PGdkGLConfig): PGdkColormap;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_get_visual(glconfig: PGdkGLConfig): PGdkVisual;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_get_depth (glconfig: PGdkGLConfig): gint;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_get_layer_plane (glconfig: PGdkGLConfig): gint;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_get_n_aux_buffers (glconfig: PGdkGLConfig): gint;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_get_n_sample_buffers (glconfig: PGdkGLConfig): gint;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_is_rgba (glconfig: PGdkGLConfig): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_is_double_buffered (glconfig: PGdkGLConfig): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_is_stereo (glconfig: PGdkGLConfig): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_has_alpha (glconfig: PGdkGLConfig): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_has_depth_buffer (glconfig: PGdkGLConfig): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_has_stencil_buffer (glconfig: PGdkGLConfig): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_config_has_accum_buffer (glconfig: PGdkGLConfig): gboolean;
+ cdecl; external GdkGLExtLib;
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GDK_TYPE_GL_CONFIG: GType;
+begin
+ GDK_TYPE_GL_CONFIG := gdk_gl_config_get_type;
+end;
+
+function GDK_GL_CONFIG(anObject: Pointer): PGdkGLConfig;
+begin
+ GDK_GL_CONFIG := PGdkGLConfig(
+ G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GL_CONFIG));
+end;
+
+function GDK_GL_CONFIG_CLASS(klass: Pointer): PGdkGLConfigClass;
+begin
+ GDK_GL_CONFIG_CLASS := PGdkGLConfigClass(
+ G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_CONFIG));
+end;
+
+function GDK_IS_GL_CONFIG(anObject: Pointer): boolean;
+begin
+ GDK_IS_GL_CONFIG := G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_CONFIG);
+end;
+
+function GDK_IS_GL_CONFIG_CLASS(klass: Pointer): boolean;
+begin
+ GDK_IS_GL_CONFIG_CLASS := G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_CONFIG);
+end;
+
+function GDK_GL_CONFIG_GET_CLASS(obj: Pointer): PGdkGLConfigClass;
+begin
+ GDK_GL_CONFIG_GET_CLASS := PGdkGLConfigClass(
+ G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_CONFIG));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtkglext/gdkglcontext.inc b/packages/gtk2/src/gtkglext/gdkglcontext.inc
new file mode 100644
index 0000000000..64fac7ea5e
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglcontext.inc
@@ -0,0 +1,100 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglcontext.h }
+
+{$ifdef read_interface_types}
+
+ { PGdkGLContext already defined in gdkgltypes.inc }
+
+ TGdkGLContext = record
+ parent_instance: TGObject;
+ end;
+
+ PGdkGLContextClass = ^TGdkGLContextClass;
+ TGdkGLContextClass = record
+ parent_class: TGObjectClass;
+ end;
+
+{$endif read_interface_types}
+
+{$ifdef read_interface_rest}
+
+function GDK_TYPE_GL_CONTEXT: GType;
+function GDK_GL_CONTEXT(anObject: Pointer): PGdkGLContext;
+function GDK_GL_CONTEXT_CLASS(klass: Pointer): PGdkGLContextClass;
+function GDK_IS_GL_CONTEXT(anObject: Pointer): boolean;
+function GDK_IS_GL_CONTEXT_CLASS(klass: Pointer): boolean;
+function GDK_GL_CONTEXT_GET_CLASS(obj: Pointer): PGdkGLContextClass;
+
+function gdk_gl_context_get_type: GType; cdecl; external GdkGLExtLib;
+
+function gdk_gl_context_new(
+ gldrawable: PGdkGLDrawable;
+ share_list: PGdkGLContext;
+ direct: gboolean;
+ render_type: LongInt): PGdkGLContext;
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_context_destroy(glcontext: PGdkGLContext);
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_context_copy(
+ glcontext: PGdkGLContext;
+ src: PGdkGLContext;
+ mask: LongWord): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_context_get_gl_drawable (glcontext: PGdkGLContext): PGdkGLDrawable;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_context_get_gl_config (glcontext: PGdkGLContext): PGdkGLConfig;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_context_get_share_list (glcontext: PGdkGLContext): PGdkGLContext;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_context_is_direct (glcontext: PGdkGLContext): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_context_get_render_type (glcontext: PGdkGLContext): LongInt;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_context_get_current : PGdkGLContext;
+ cdecl; external GdkGLExtLib;
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GDK_TYPE_GL_CONTEXT: GType;
+begin
+ GDK_TYPE_GL_CONTEXT := gdk_gl_context_get_type;
+end;
+
+function GDK_GL_CONTEXT(anObject: Pointer): PGdkGLContext;
+begin
+ GDK_GL_CONTEXT := PGdkGLContext(
+ G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GL_CONTEXT));
+end;
+
+function GDK_GL_CONTEXT_CLASS(klass: Pointer): PGdkGLContextClass;
+begin
+ GDK_GL_CONTEXT_CLASS := PGdkGLContextClass(
+ G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_CONTEXT));
+end;
+
+function GDK_IS_GL_CONTEXT(anObject: Pointer): boolean;
+begin
+ GDK_IS_GL_CONTEXT := G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_CONTEXT);
+end;
+
+function GDK_IS_GL_CONTEXT_CLASS(klass: Pointer): boolean;
+begin
+ GDK_IS_GL_CONTEXT_CLASS := G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_CONTEXT);
+end;
+
+function GDK_GL_CONTEXT_GET_CLASS(obj: Pointer): PGdkGLContextClass;
+begin
+ GDK_GL_CONTEXT_GET_CLASS := PGdkGLContextClass(
+ G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_CONTEXT));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtkglext/gdkgldefs.inc b/packages/gtk2/src/gtkglext/gdkgldefs.inc
new file mode 100644
index 0000000000..82e6a21a4c
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkgldefs.inc
@@ -0,0 +1,3 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkgldefs.h }
+
+{ No need to translate anything here }
diff --git a/packages/gtk2/src/gtkglext/gdkgldrawable.inc b/packages/gtk2/src/gtkglext/gdkgldrawable.inc
new file mode 100644
index 0000000000..b287c6ac8f
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkgldrawable.inc
@@ -0,0 +1,154 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkgldrawable.h
+
+ Michalis comments: note that GdkGLDrawable is an interface,
+ not a class, so
+ - it's GDK_GL_DRAWABLE_GET_CLASS is implemented using
+ GDK_GL_DRAWABLE_GET_INTERFACE instead of GDK_GL_DRAWABLE_GET_CLASS
+ - 1st field of class record is
+ base_iface: TGTypeInterface;
+ instead of
+ parent_class: TGObjectClass;
+ - Also (this is of course minor thing that does not affect
+ code using this unit, but still it is preserved in this translation
+ of C headers to Pascal) names of params of macros are vtable and inst.
+}
+
+{$ifdef read_interface_types}
+
+ { PGdkGLDrawable already defined in gdkgltypes.inc }
+
+ TGdkGLDrawable = record
+ parent_instance: TGObject;
+ end;
+
+ PGdkGLDrawableClass = ^TGdkGLDrawableClass;
+ TGdkGLDrawableClass = record
+ base_iface: TGTypeInterface;
+
+ create_new_context: function(
+ gldrawable: PGdkGLDrawable;
+ share_list: PGdkGLContext;
+ direct: gboolean;
+ render_type: LongInt): PGdkGLContext; cdecl;
+
+ make_context_current: function(
+ draw: PGdkGLDrawable;
+ a_read: PGdkGLDrawable;
+ glcontext: PGdkGLContext): gboolean; cdecl;
+ is_double_buffered: function(gldrawable: PGdkGLDrawable): gboolean; cdecl;
+ swap_buffers: procedure(gldrawable: PGdkGLDrawable); cdecl;
+ wait_gl: procedure(gldrawable: PGdkGLDrawable); cdecl;
+ wait_gdk: procedure(gldrawable: PGdkGLDrawable); cdecl;
+
+ gl_begin: function(
+ draw: PGdkGLDrawable;
+ a_read: PGdkGLDrawable;
+ glcontext: PGdkGLContext): gboolean; cdecl;
+ gl_end: procedure(gldrawable: PGdkGLDrawable); cdecl;
+
+ get_gl_config: function(gldrawable: PGdkGLDrawable): PGdkGLConfig; cdecl;
+
+ get_size: procedure(
+ gldrawable: PGdkGLDrawable;
+ width, height: PGInt); cdecl;
+ end;
+
+{$endif read_interface_types}
+
+{$ifdef read_interface_rest}
+
+function GDK_TYPE_GL_DRAWABLE: GType;
+function GDK_GL_DRAWABLE(inst: Pointer): PGdkGLDrawable;
+function GDK_GL_DRAWABLE_CLASS(vtable: Pointer): PGdkGLDrawableClass;
+function GDK_IS_GL_DRAWABLE(inst: Pointer): boolean;
+function GDK_IS_GL_DRAWABLE_CLASS(vtable: Pointer): boolean;
+function GDK_GL_DRAWABLE_GET_CLASS(inst: Pointer): PGdkGLDrawableClass;
+
+function gdk_gl_drawable_get_type: GType;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_drawable_make_current(
+ gldrawable: PGdkGLDrawable;
+ glcontext: PGdkGLContext)
+ : gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_drawable_is_double_buffered(
+ gldrawable: PGdkGLDrawable)
+ : gboolean;
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_drawable_swap_buffers(
+ gldrawable: PGdkGLDrawable);
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_drawable_wait_gl(
+ gldrawable: PGdkGLDrawable);
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_drawable_wait_gdk(
+ gldrawable: PGdkGLDrawable);
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_drawable_gl_begin(
+ gldrawable: PGdkGLDrawable;
+ glcontext: PGdkGLContext)
+ : gboolean;
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_drawable_gl_end(
+ gldrawable: PGdkGLDrawable);
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_drawable_get_gl_config(
+ gldrawable: PGdkGLDrawable)
+ : PGdkGLConfig;
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_drawable_get_size(
+ gldrawable: PGdkGLDrawable;
+ width, height: PGInt);
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_drawable_get_current
+ : PGdkGLDrawable;
+ cdecl; external GdkGLExtLib;
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GDK_TYPE_GL_DRAWABLE: GType;
+begin
+ GDK_TYPE_GL_DRAWABLE := gdk_gl_drawable_get_type;
+end;
+
+function GDK_GL_DRAWABLE(inst: Pointer): PGdkGLDrawable;
+begin
+ GDK_GL_DRAWABLE := PGdkGLDrawable(
+ G_TYPE_CHECK_INSTANCE_CAST(inst, GDK_TYPE_GL_DRAWABLE));
+end;
+
+function GDK_GL_DRAWABLE_CLASS(vtable: Pointer): PGdkGLDrawableClass;
+begin
+ GDK_GL_DRAWABLE_CLASS := PGdkGLDrawableClass(
+ G_TYPE_CHECK_CLASS_CAST(vtable, GDK_TYPE_GL_DRAWABLE));
+end;
+
+function GDK_IS_GL_DRAWABLE(inst: Pointer): boolean;
+begin
+ GDK_IS_GL_DRAWABLE := G_TYPE_CHECK_INSTANCE_TYPE(inst, GDK_TYPE_GL_DRAWABLE);
+end;
+
+function GDK_IS_GL_DRAWABLE_CLASS(vtable: Pointer): boolean;
+begin
+ GDK_IS_GL_DRAWABLE_CLASS := G_TYPE_CHECK_CLASS_TYPE(vtable, GDK_TYPE_GL_DRAWABLE);
+end;
+
+function GDK_GL_DRAWABLE_GET_CLASS(inst: Pointer): PGdkGLDrawableClass;
+begin
+ GDK_GL_DRAWABLE_GET_CLASS := PGdkGLDrawableClass(
+ G_TYPE_INSTANCE_GET_INTERFACE(inst, GDK_TYPE_GL_DRAWABLE));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtkglext/gdkglenumtypes.inc b/packages/gtk2/src/gtkglext/gdkglenumtypes.inc
new file mode 100644
index 0000000000..cae2d90df5
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglenumtypes.inc
@@ -0,0 +1,85 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglenumtypes.h }
+
+{ Translation to Pascal:
+ used regexps
+ GType \(.*\) (void);
+ to
+ function \1: GType; cdecl; external GdkGLExtLib;
+
+ #define \(.*\) (\(.*\)())
+ to
+ function \1: GType;
+ cdecl; external GdkGLExtLib name '\2';
+}
+
+{$ifdef read_interface_rest}
+
+{* enumerations from "gdkgltokens.h" *}
+
+function gdk_gl_config_attrib_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_CONFIG_ATTRIB: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_config_attrib_get_type';
+
+function gdk_gl_config_caveat_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_CONFIG_CAVEAT: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_config_caveat_get_type';
+
+function gdk_gl_visual_type_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_VISUAL_TYPE: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_visual_type_get_type';
+
+function gdk_gl_transparent_type_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_TRANSPARENT_TYPE: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_transparent_type_get_type';
+
+function gdk_gl_drawable_type_mask_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_DRAWABLE_TYPE_MASK: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_drawable_type_mask_get_type';
+
+function gdk_gl_render_type_mask_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_RENDER_TYPE_MASK: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_render_type_mask_get_type';
+
+function gdk_gl_buffer_mask_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_BUFFER_MASK: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_buffer_mask_get_type';
+
+function gdk_gl_config_error_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_CONFIG_ERROR: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_config_error_get_type';
+
+function gdk_gl_render_type_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_RENDER_TYPE: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_render_type_get_type';
+
+function gdk_gl_drawable_attrib_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_DRAWABLE_ATTRIB: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_drawable_attrib_get_type';
+
+function gdk_gl_pbuffer_attrib_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_PBUFFER_ATTRIB: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_pbuffer_attrib_get_type';
+
+function gdk_gl_event_mask_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_EVENT_MASK: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_event_mask_get_type';
+
+function gdk_gl_event_type_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_EVENT_TYPE: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_event_type_get_type';
+
+function gdk_gl_drawable_type_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_DRAWABLE_TYPE: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_drawable_type_get_type';
+
+{* enumerations from "gdkglconfig.h" *}
+
+function gdk_gl_config_mode_get_type: GType; cdecl; external GdkGLExtLib;
+function GDK_TYPE_GL_CONFIG_MODE: GType;
+ cdecl; external GdkGLExtLib name 'gdk_gl_config_mode_get_type';
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtkglext/gdkglext.pas b/packages/gtk2/src/gtkglext/gdkglext.pas
new file mode 100644
index 0000000000..8b6a1532e5
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglext.pas
@@ -0,0 +1,58 @@
+{ GdkGLExt - OpenGL Extension to GDK
+ Copyright (C) 2002-2004 Naofumi Yasufuku
+ These Pascal bindings copyright 2005 Michalis Kamburelis
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+}
+
+{ Translated from C header /usr/include/gtkglext-1.0/gdk/gdkgl.h
+ (this is probably standardized system-wide location
+ of this header). }
+
+{$mode objfpc}
+
+unit gdkglext;
+
+interface
+
+uses Glib2, Gdk2;
+
+const
+ GdkGLExtLib =
+ {$ifdef WIN32} 'libgdkglext-win32-1.0-0.dll'
+ {$else}
+ {$ifdef DARWIN}
+ 'gdkglext-x11-1.0'
+ {$linklib gdkglext-x11-1.0}
+ {$else}
+ 'libgdkglext-x11-1.0.so'
+ {$endif}
+ {$endif};
+
+type
+ {$define read_interface_types}
+ {$I gdkglext_includes.inc}
+ {$undef read_interface_types}
+
+{$define read_interface_rest}
+{$I gdkglext_includes.inc}
+{$undef read_interface_rest}
+
+implementation
+
+{$define read_implementation}
+{$I gdkglext_includes.inc}
+
+end.
diff --git a/packages/gtk2/src/gtkglext/gdkglext_includes.inc b/packages/gtk2/src/gtkglext/gdkglext_includes.inc
new file mode 100644
index 0000000000..b8c053dc7b
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglext_includes.inc
@@ -0,0 +1,14 @@
+{$I gdkgldefs.inc}
+{$I gdkglversion.inc}
+{$I gdkgltokens.inc}
+{$I gdkgltypes.inc}
+{$I gdkglenumtypes.inc}
+{$I gdkglinit.inc}
+{$I gdkglquery.inc}
+{$I gdkglconfig.inc}
+{$I gdkglcontext.inc}
+{$I gdkgldrawable.inc}
+{$I gdkglpixmap.inc}
+{$I gdkglwindow.inc}
+{$I gdkglfont.inc}
+{$I gdkglshapes.inc}
diff --git a/packages/gtk2/src/gtkglext/gdkglfont.inc b/packages/gtk2/src/gtkglext/gdkglfont.inc
new file mode 100644
index 0000000000..04dd361d74
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglfont.inc
@@ -0,0 +1,22 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglfont.h }
+
+{$ifdef read_interface_rest}
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+{TODO
+PangoFont *gdk_gl_font_use_pango_font (const PangoFontDescription *font_desc,
+ int first,
+ int count,
+ int list_base);}
+{$endif GDK_MULTIHEAD_SAFE}
+
+{$ifdef GDKGLEXT_MULTIHEAD_SUPPORT}
+{TODO
+PangoFont *gdk_gl_font_use_pango_font_for_display (GdkDisplay *display,
+ const PangoFontDescription *font_desc,
+ int first,
+ int count,
+ int list_base);}
+{$endif GDKGLEXT_MULTIHEAD_SUPPORT}
+
+{$endif read_interface_rest}
diff --git a/packages/gtk2/src/gtkglext/gdkglinit.inc b/packages/gtk2/src/gtkglext/gdkglinit.inc
new file mode 100644
index 0000000000..5adcd57670
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglinit.inc
@@ -0,0 +1,16 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglinit.h }
+
+{$ifdef read_interface_rest}
+
+{*
+ * Initialization routines.
+ *}
+
+function gdk_gl_parse_args(argc: Plongint; argv: PPPChar): gboolean;
+ cdecl; external GdkGLExtLib;
+function gdk_gl_init_check(argc: Plongint; argv: PPPChar): gboolean;
+ cdecl; external GdkGLExtLib;
+procedure gdk_gl_init(argc: Plongint; argv: PPPChar);
+ cdecl; external GdkGLExtLib;
+
+{$endif read_interface_rest}
diff --git a/packages/gtk2/src/gtkglext/gdkglpixmap.inc b/packages/gtk2/src/gtkglext/gdkglpixmap.inc
new file mode 100644
index 0000000000..1c12e70b5b
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglpixmap.inc
@@ -0,0 +1,110 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglpixmap.h }
+
+{$ifdef read_interface_types}
+
+ { PGdkGLPixmap already defined in gdkgltypes.inc }
+
+ TGdkGLPixmap = record
+ parent_instance: TGObject;
+ drawable: PGdkDrawable; {* Associated GdkPixmap *}
+ end;
+
+ PGdkGLPixmapClass = ^TGdkGLPixmapClass;
+ TGdkGLPixmapClass = record
+ parent_class: TGObjectClass;
+ end;
+
+{$endif read_interface_types}
+
+{$ifdef read_interface_rest}
+
+function GDK_TYPE_GL_PIXMAP: GType;
+function GDK_GL_PIXMAP(anObject: Pointer): PGdkGLPixmap;
+function GDK_GL_PIXMAP_CLASS(klass: Pointer): PGdkGLPixmapClass;
+function GDK_IS_GL_PIXMAP(anObject: Pointer): boolean;
+function GDK_IS_GL_PIXMAP_CLASS(klass: Pointer): boolean;
+function GDK_GL_PIXMAP_GET_CLASS(obj: Pointer): PGdkGLPixmapClass;
+
+function gdk_gl_pixmap_get_type: GType; cdecl; external GdkGLExtLib;
+
+{*
+ * attrib_list is currently unused. This must be set to NULL or empty
+ * (first attribute of None). See GLX 1.3 spec.
+ *}
+function gdk_gl_pixmap_new(
+ glconfig: PGdkGLConfig;
+ pixmap: PGdkPixmap;
+ attrib_list: PLongInt): PGdkGLPixmap;
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_pixmap_destroy(glpixmap: PGdkGLPixmap);
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_pixmap_get_pixmap(glpixmap: PGdkGLPixmap): PGdkPixmap;
+ cdecl; external GdkGLExtLib;
+
+{*
+ * OpenGL extension to GdkPixmap
+ *}
+
+function gdk_pixmap_set_gl_capability(
+ pixmap: PGdkPixmap;
+ glconfig: PGdkGLConfig;
+ attrib_list: PLongInt): PGdkGLPixmap;
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_pixmap_unset_gl_capability(pixmap: PGdkPixmap);
+ cdecl; external GdkGLExtLib;
+
+function gdk_pixmap_is_gl_capable(pixmap: PGdkPixmap): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_pixmap_get_gl_pixmap(pixmap: PGdkPixmap): PGdkGLPixmap;
+ cdecl; external GdkGLExtLib;
+
+function gdk_pixmap_get_gl_drawable(pixmap: PGdkPixmap): PGdkGLDrawable;
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GDK_TYPE_GL_PIXMAP: GType;
+begin
+ GDK_TYPE_GL_PIXMAP := gdk_gl_pixmap_get_type;
+end;
+
+function GDK_GL_PIXMAP(anObject: Pointer): PGdkGLPixmap;
+begin
+ GDK_GL_PIXMAP := PGdkGLPixmap(
+ G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GL_PIXMAP));
+end;
+
+function GDK_GL_PIXMAP_CLASS(klass: Pointer): PGdkGLPixmapClass;
+begin
+ GDK_GL_PIXMAP_CLASS := PGdkGLPixmapClass(
+ G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_PIXMAP));
+end;
+
+function GDK_IS_GL_PIXMAP(anObject: Pointer): boolean;
+begin
+ GDK_IS_GL_PIXMAP := G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_PIXMAP);
+end;
+
+function GDK_IS_GL_PIXMAP_CLASS(klass: Pointer): boolean;
+begin
+ GDK_IS_GL_PIXMAP_CLASS := G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_PIXMAP);
+end;
+
+function GDK_GL_PIXMAP_GET_CLASS(obj: Pointer): PGdkGLPixmapClass;
+begin
+ GDK_GL_PIXMAP_GET_CLASS := PGdkGLPixmapClass(
+ G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_PIXMAP));
+end;
+
+function gdk_pixmap_get_gl_drawable(pixmap: PGdkPixmap): PGdkGLDrawable;
+begin
+ gdk_pixmap_get_gl_drawable :=
+ GDK_GL_DRAWABLE (gdk_pixmap_get_gl_pixmap (pixmap));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtkglext/gdkglquery.inc b/packages/gtk2/src/gtkglext/gdkglquery.inc
new file mode 100644
index 0000000000..b4a8f49bc2
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglquery.inc
@@ -0,0 +1,34 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglquery.h }
+
+{$ifdef read_interface_rest}
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_gl_query_extension: gboolean;
+ cdecl; external GdkGLExtLib;
+{$endif GDK_MULTIHEAD_SAFE}
+
+{$ifdef GDKGLEXT_MULTIHEAD_SUPPORT}
+function gdk_gl_query_extension_for_display(display: PGdkDisplay): gboolean;
+ cdecl; external GdkGLExtLib;
+{$endif GDKGLEXT_MULTIHEAD_SUPPORT}
+
+{$ifndef GDK_MULTIHEAD_SAFE}
+function gdk_gl_query_version(
+ var major, minor: LongInt): gboolean;
+ cdecl; external GdkGLExtLib;
+{$endif GDK_MULTIHEAD_SAFE}
+
+{$ifdef GDKGLEXT_MULTIHEAD_SUPPORT}
+function gdk_gl_query_version_for_display(
+ display: PGdkDisplay;
+ var major, minor: LongInt): gboolean;
+ cdecl; external GdkGLExtLib;
+{$endif GDKGLEXT_MULTIHEAD_SUPPORT}
+
+function gdk_gl_query_gl_extension(extension: PChar): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_get_proc_address(proc_name: PChar): TGdkGLProc;
+ cdecl; external GdkGLExtLib;
+
+{$endif read_interface_rest}
diff --git a/packages/gtk2/src/gtkglext/gdkglshapes.inc b/packages/gtk2/src/gtkglext/gdkglshapes.inc
new file mode 100644
index 0000000000..82644bbead
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglshapes.inc
@@ -0,0 +1,50 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglshapes.h }
+
+{$ifdef read_interface_rest}
+
+procedure gdk_gl_draw_cube(
+ solid: gboolean;
+ size: Double);
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_draw_sphere(
+ solid: gboolean;
+ radius: Double;
+ slices: LongInt;
+ stacks: LongInt);
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_draw_cone(
+ solid: gboolean;
+ base: Double;
+ height: Double;
+ slices: LongInt;
+ stacks: LongInt);
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_draw_torus(
+ solid: gboolean;
+ inner_radius: Double;
+ outer_radius: Double;
+ nsides: LongInt;
+ rings: LongInt);
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_draw_tetrahedron (solid: gboolean);
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_draw_octahedron (solid: gboolean);
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_draw_dodecahedron (solid: gboolean);
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_draw_icosahedron (solid: gboolean);
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_draw_teapot(
+ solid: gboolean;
+ scale: Double);
+ cdecl; external GdkGLExtLib;
+
+{$endif read_interface_rest}
diff --git a/packages/gtk2/src/gtkglext/gdkgltokens.inc b/packages/gtk2/src/gtkglext/gdkgltokens.inc
new file mode 100644
index 0000000000..ed05fc71d0
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkgltokens.inc
@@ -0,0 +1,270 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkgltokens.h }
+
+{$ifdef read_interface_types}
+
+ TGdkGLConfigAttrib = LongInt;
+ TGdkGLConfigCaveat = LongInt;
+ TGdkGLVisualType = LongInt;
+ TGdkGLTransparentType = LongInt;
+ TGdkGLDrawableTypeMask = LongInt;
+ TGdkGLRenderTypeMask = LongInt;
+ TGdkGLBufferMask = LongInt;
+ TGdkGLConfigError = LongInt;
+ TGdkGLRenderType = LongInt;
+ TGdkGLDrawableAttrib = LongInt;
+ TGdkGLPbufferAttrib = LongInt;
+ TGdkGLEventMask = LongInt;
+ TGdkGLEventType = LongInt;
+ TGdkGLDrawableType = LongInt;
+
+{$endif read_interface_types}
+
+{$ifdef read_interface_rest}
+
+{*
+ * Success return value
+ *}
+const
+ GDK_GL_SUCCESS = 0; {* same as 'Success' of X11 *}
+
+{*
+ * Attribute list terminator
+ *}
+ GDK_GL_ATTRIB_LIST_NONE = 0; {* same as 'None' of X11 *}
+
+{*
+ * This source is based on the OpenGL(R) Sample Implementation by SGI.
+ *}
+
+{*
+** License Applicability. Except to the extent portions of this file are
+** made subject to an alternative license as permitted in the SGI Free
+** Software License B, Version 1.1 (the "License"), the contents of this
+** file are subject only to the provisions of the License. You may not use
+** this file except in compliance with the License. You may obtain a copy
+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+**
+** http://oss.sgi.com/projects/FreeB
+**
+** Note that, as provided in the License, the Software is distributed on an
+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+**
+** Original Code. The Original Code is: OpenGL Sample Implementation,
+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
+** Copyright in any portions created by third parties is as indicated
+** elsewhere herein. All Rights Reserved.
+**
+** Additional Notice Provisions: The application programming interfaces
+** established by SGI in conjunction with the Original Code are The
+** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
+** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
+** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
+** Window System(R) (Version 1.3), released October 19, 1998. This software
+** was created using the OpenGL(R) version 1.2.1 Sample Implementation
+** published by SGI, but has not been independently verified as being
+** compliant with the OpenGL(R) version 1.2.1 Specification.
+*}
+
+{*
+ * Visual Config Attributes.
+ *}
+
+ GDK_GL_USE_GL = 1; {* support GLX rendering *}
+ GDK_GL_BUFFER_SIZE = 2; {* depth of the color buffer *}
+ GDK_GL_LEVEL = 3; {* level in plane stacking *}
+ GDK_GL_RGBA = 4; {* true if RGBA mode *}
+ GDK_GL_DOUBLEBUFFER = 5; {* double buffering supported *}
+ GDK_GL_STEREO = 6; {* stereo buffering supported *}
+ GDK_GL_AUX_BUFFERS = 7; {* number of aux buffers *}
+ GDK_GL_RED_SIZE = 8; {* number of red component bits *}
+ GDK_GL_GREEN_SIZE = 9; {* number of green component bits *}
+ GDK_GL_BLUE_SIZE = 10; {* number of blue component bits *}
+ GDK_GL_ALPHA_SIZE = 11; {* number of alpha component bits *}
+ GDK_GL_DEPTH_SIZE = 12; {* number of depth bits *}
+ GDK_GL_STENCIL_SIZE = 13; {* number of stencil bits *}
+ GDK_GL_ACCUM_RED_SIZE = 14; {* number of red accum bits *}
+ GDK_GL_ACCUM_GREEN_SIZE = 15; {* number of green accum bits *}
+ GDK_GL_ACCUM_BLUE_SIZE = 16; {* number of blue accum bits *}
+ GDK_GL_ACCUM_ALPHA_SIZE = 17; {* number of alpha accum bits *}
+
+ {*
+ * FBConfig-specific attributes.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_CONFIG_CAVEAT = $20;
+ GDK_GL_X_VISUAL_TYPE = $22;
+ GDK_GL_TRANSPARENT_TYPE = $23;
+ GDK_GL_TRANSPARENT_INDEX_VALUE = $24;
+ GDK_GL_TRANSPARENT_RED_VALUE = $25;
+ GDK_GL_TRANSPARENT_GREEN_VALUE = $26;
+ GDK_GL_TRANSPARENT_BLUE_VALUE = $27;
+ GDK_GL_TRANSPARENT_ALPHA_VALUE = $28;
+ GDK_GL_DRAWABLE_TYPE = $8010;
+ GDK_GL_RENDER_TYPE = $8011;
+ GDK_GL_X_RENDERABLE = $8012;
+ GDK_GL_FBCONFIG_ID = $8013;
+ GDK_GL_MAX_PBUFFER_WIDTH = $8016;
+ GDK_GL_MAX_PBUFFER_HEIGHT = $8017;
+ GDK_GL_MAX_PBUFFER_PIXELS = $8018;
+ GDK_GL_VISUAL_ID = $800B;
+ GDK_GL_SCREEN = $800C;
+
+ {*
+ * Multisampling configuration attributes.
+ * [ GLX 1.4 and later ]
+ *}
+ GDK_GL_SAMPLE_BUFFERS = 100000;
+ GDK_GL_SAMPLES = 100001;
+ { Those were values for TGdkGLConfigAttrib }
+
+{*
+ * Generic "don't care" value.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_DONT_CARE = $FFFFFFFF;
+
+{*
+ * "none" value.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_NONE = $8000;
+
+{*
+ * GLX_CONFIG_CAVEAT attribute values.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_CONFIG_CAVEAT_DONT_CARE = $FFFFFFFF; {* GDK_GL_DONT_CARE *}
+ GDK_GL_CONFIG_CAVEAT_NONE = $8000; {* GDK_GL_NONE *}
+ GDK_GL_SLOW_CONFIG = $8001;
+ GDK_GL_NON_CONFORMANT_CONFIG = $800D;
+ { Those were values for TGdkGLConfigCaveat }
+
+{*
+ * GLX_X_VISUAL_TYPE attribute values.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_VISUAL_TYPE_DONT_CARE = $FFFFFFFF; {* GDK_GL_DONT_CARE *}
+ GDK_GL_TRUE_COLOR = $8002;
+ GDK_GL_DIRECT_COLOR = $8003;
+ GDK_GL_PSEUDO_COLOR = $8004;
+ GDK_GL_STATIC_COLOR = $8005;
+ GDK_GL_GRAY_SCALE = $8006;
+ GDK_GL_STATIC_GRAY = $8007;
+ { Those were values for TGdkGLVisualType }
+
+{*
+ * GLX_TRANSPARENT_TYPE attribute values.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_TRANSPARENT_NONE = $8000; {* GDK_GL_NONE *}
+ GDK_GL_TRANSPARENT_RGB = $8008;
+ GDK_GL_TRANSPARENT_INDEX = $8009;
+ { Those were values for TGdkGLTransparentType }
+
+{*
+ * GLX_DRAWABLE_TYPE bits.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_WINDOW_BIT = 1 shl 0; {* $00000001 *}
+ GDK_GL_PIXMAP_BIT = 1 shl 1; {* $00000002 *}
+ GDK_GL_PBUFFER_BIT = 1 shl 2; {* $00000004 *}
+ { Those were values for TGdkGLDrawableTypeMask }
+
+{*
+ * GLX_RENDER_TYPE bits.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_RGBA_BIT = 1 shl 0; {* $00000001 *}
+ GDK_GL_COLOR_INDEX_BIT = 1 shl 1; {* $00000002 *}
+ { Those were values for TGdkGLRenderTypeMask }
+
+{*
+ * Buffer mask bits.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_FRONT_LEFT_BUFFER_BIT = 1 shl 0; {* $00000001 *}
+ GDK_GL_FRONT_RIGHT_BUFFER_BIT = 1 shl 1; {* $00000002 *}
+ GDK_GL_BACK_LEFT_BUFFER_BIT = 1 shl 2; {* $00000004 *}
+ GDK_GL_BACK_RIGHT_BUFFER_BIT = 1 shl 3; {* $00000008 *}
+ GDK_GL_AUX_BUFFERS_BIT = 1 shl 4; {* $00000010 *}
+ GDK_GL_DEPTH_BUFFER_BIT = 1 shl 5; {* $00000020 *}
+ GDK_GL_STENCIL_BUFFER_BIT = 1 shl 6; {* $00000040 *}
+ GDK_GL_ACCUM_BUFFER_BIT = 1 shl 7; {* $00000080 *}
+ { Those were values for TGdkGLBufferMask }
+
+{*
+ * Error return values from glXGetConfig. Success is indicated by
+ * a value of 0.
+ *}
+ GDK_GL_BAD_SCREEN = 1; {* screen # is bad *}
+ GDK_GL_BAD_ATTRIBUTE = 2; {* attribute to get is bad *}
+ GDK_GL_NO_EXTENSION = 3; {* no glx extension on server *}
+ GDK_GL_BAD_VISUAL = 4; {* visual # not known by GLX *}
+ GDK_GL_BAD_CONTEXT = 5; {* returned only by import_context EXT? *}
+ GDK_GL_BAD_VALUE = 6; {* returned only by glXSwapIntervalSGI? *}
+ GDK_GL_BAD_ENUM = 7; {* unused? *}
+ { Those were values for TGdkGLConfigError }
+
+{*
+ * glXCreateNewContext render_type attribute values.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_RGBA_TYPE = $8014;
+ GDK_GL_COLOR_INDEX_TYPE = $8015;
+ { Those were values for TGdkGLRenderType }
+
+{*
+ * glXQueryDrawable attributes.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_PRESERVED_CONTENTS = $801B;
+ GDK_GL_LARGEST_PBUFFER = $801C;
+ GDK_GL_WIDTH = $801D;
+ GDK_GL_HEIGHT = $801E;
+ GDK_GL_EVENT_MASK = $801F;
+ { Those were values for TGdkGLDrawableAttrib }
+
+{*
+ * glXCreatePbuffer attributes.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_PBUFFER_PRESERVED_CONTENTS = $801B; {* GDK_GL_PRESERVED_CONTENTS *}
+ GDK_GL_PBUFFER_LARGEST_PBUFFER = $801C; {* GDK_GL_LARGEST_PBUFFER *}
+ GDK_GL_PBUFFER_HEIGHT = $8040;
+ GDK_GL_PBUFFER_WIDTH = $8041;
+ { Those were values for TGdkGLPbufferAttrib }
+
+{*
+ * glXSelectEvent event mask bits.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_PBUFFER_CLOBBER_MASK = 1 shl 27; {* $08000000 *}
+ { Those were values for TGdkGLEventMask }
+
+{*
+ * GLXPbufferClobberEvent event_type values.
+ * [ GLX 1.3 and later ]
+ *}
+ GDK_GL_DAMAGED = $8020;
+ GDK_GL_SAVED = $8021;
+ { Those were values for TGdkGLEventType }
+
+{*
+ * GLXPbufferClobberEvent draw_type values.
+ * [ GLX 1.3 and later ]
+ *}
+ { Pascal translation comments:
+ Name GDK_GL_WINDOW conflicts (even in case-sensitve C,
+ but there macros conflicts are not errors)
+ with function GDK_GL_WINDOW in gdkglwindow.inc.
+ Renamed to GDK_GL_WINDOW_VALUE. }
+ GDK_GL_WINDOW_VALUE = $8022;
+ GDK_GL_PBUFFER = $8023;
+ { Those were values for TGdkGLDrawableType }
+
+{$endif read_interface_rest}
diff --git a/packages/gtk2/src/gtkglext/gdkgltypes.inc b/packages/gtk2/src/gtkglext/gdkgltypes.inc
new file mode 100644
index 0000000000..b8cb136ef4
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkgltypes.inc
@@ -0,0 +1,31 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkgltypes.h }
+
+{$ifdef read_interface_types}
+
+{*
+ * Forward declarations of commonly used types
+ *}
+
+ { Comments for Pascal translation: TGdkGLProc is a procedure address
+ returned by gdk_gl_get_proc_address.
+
+ Actually one cannot say is it procedure or a function,
+ what parameters it takes and even it's calling convention
+ (e.g. under Win32 procedures from OpenGL32.dll
+ use stdcall calling convention, not cdecl).
+
+ That's why I didn't translate it as "procedure; cdecl;"
+ (this would be a strict translation of what is expressed in C header)
+ but I translated it as a generic Pointer. }
+ TGdkGLProc = Pointer;
+
+ PGdkGLConfig = ^TGdkGLConfig;
+ PGdkGLContext = ^TGdkGLContext;
+ PGdkGLDrawable = ^TGdkGLDrawable;
+ PGdkGLPixmap = ^TGdkGLPixmap;
+ PGdkGLWindow = ^TGdkGLWindow;
+
+{$endif read_interface_types}
+
+{$ifdef read_implementation}
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtkglext/gdkglversion.inc b/packages/gtk2/src/gtkglext/gdkglversion.inc
new file mode 100644
index 0000000000..57c9fc28fe
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglversion.inc
@@ -0,0 +1,50 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglversion.h }
+
+{ Comments for Pascal translation of gdkglext:
+ I prefixed constants (describing header version) and
+ macro (checking versus header version) with "HEADER_",
+ since Pascal is not case sensitive.
+}
+
+{$ifdef read_interface_rest}
+
+{*
+ * Compile time version.
+ *}
+const
+ HEADER_GDKGLEXT_MAJOR_VERSION = 1;
+ HEADER_GDKGLEXT_MINOR_VERSION = 0;
+ HEADER_GDKGLEXT_MICRO_VERSION = 6;
+ HEADER_GDKGLEXT_INTERFACE_AGE = 4;
+ HEADER_GDKGLEXT_BINARY_AGE = 6;
+
+{*
+ * Check whether a GdkGLExt version equal to or greater than
+ * major.minor.micro is present.
+ *}
+function HEADER_GDKGLEXT_CHECK_VERSION(major, minor, micro: guint): boolean;
+
+{*
+ * Library version.
+ *}
+var
+ gdkglext_major_version: guint; cvar; external;
+ gdkglext_minor_version: guint; cvar; external;
+ gdkglext_micro_version: guint; cvar; external;
+ gdkglext_interface_age: guint; cvar; external;
+ gdkglext_binary_age : guint; cvar; external;
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function HEADER_GDKGLEXT_CHECK_VERSION(major, minor, micro: guint): boolean;
+begin
+ HEADER_GDKGLEXT_CHECK_VERSION :=
+ (HEADER_GDKGLEXT_MAJOR_VERSION > major) or
+ ( (HEADER_GDKGLEXT_MAJOR_VERSION = major) and (HEADER_GDKGLEXT_MINOR_VERSION > minor) ) or
+ ( (HEADER_GDKGLEXT_MAJOR_VERSION = major) and (HEADER_GDKGLEXT_MINOR_VERSION = minor) and
+ (HEADER_GDKGLEXT_MICRO_VERSION >= micro) );
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtkglext/gdkglwindow.inc b/packages/gtk2/src/gtkglext/gdkglwindow.inc
new file mode 100644
index 0000000000..68ae2220a0
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gdkglwindow.inc
@@ -0,0 +1,110 @@
+{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglwindow.h }
+
+{$ifdef read_interface_types}
+
+ { PGdkGLWindow already defined in gdkgltypes.inc }
+
+ TGdkGLWindow = record
+ parent_instance: TGObject;
+ drawable: PGdkDrawable; {* Associated GdkWindow *}
+ end;
+
+ PGdkGLWindowClass = ^TGdkGLWindowClass;
+ TGdkGLWindowClass = record
+ parent_class: TGObjectClass;
+ end;
+
+{$endif read_interface_types}
+
+{$ifdef read_interface_rest}
+
+function GDK_TYPE_GL_WINDOW: GType;
+function GDK_GL_WINDOW(anObject: Pointer): PGdkGLWindow;
+function GDK_GL_WINDOW_CLASS(klass: Pointer): PGdkGLWindowClass;
+function GDK_IS_GL_WINDOW(anObject: Pointer): boolean;
+function GDK_IS_GL_WINDOW_CLASS(klass: Pointer): boolean;
+function GDK_GL_WINDOW_GET_CLASS(obj: Pointer): PGdkGLWindowClass;
+
+function gdk_gl_window_get_type: GType; cdecl; external GdkGLExtLib;
+
+{*
+ * attrib_list is currently unused. This must be set to NULL or empty
+ * (first attribute of None). See GLX 1.3 spec.
+ *}
+function gdk_gl_window_new(
+ glconfig: PGdkGLConfig;
+ window: PGdkWindow;
+ attrib_list: PLongInt): PGdkGLWindow;
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_gl_window_destroy(glwindow: PGdkGLWindow);
+ cdecl; external GdkGLExtLib;
+
+function gdk_gl_window_get_window(glwindow: PGdkGLWindow): PGdkWindow;
+ cdecl; external GdkGLExtLib;
+
+{*
+ * OpenGL extension to GdkWindow
+ *}
+
+function gdk_window_set_gl_capability(
+ window: PGdkWindow;
+ glconfig: PGdkGLConfig;
+ attrib_list: PLongInt): PGdkGLWindow;
+ cdecl; external GdkGLExtLib;
+
+procedure gdk_window_unset_gl_capability(window: PGdkWindow);
+ cdecl; external GdkGLExtLib;
+
+function gdk_window_is_gl_capable(window: PGdkWindow): gboolean;
+ cdecl; external GdkGLExtLib;
+
+function gdk_window_get_gl_window(window: PGdkWindow): PGdkGLWindow;
+ cdecl; external GdkGLExtLib;
+
+function gdk_window_get_gl_drawable(window: PGdkWindow): PGdkGLDrawable;
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function GDK_TYPE_GL_WINDOW: GType;
+begin
+ GDK_TYPE_GL_WINDOW := gdk_gl_window_get_type;
+end;
+
+function GDK_GL_WINDOW(anObject: Pointer): PGdkGLWindow;
+begin
+ GDK_GL_WINDOW := PGdkGLWindow(
+ G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GL_WINDOW));
+end;
+
+function GDK_GL_WINDOW_CLASS(klass: Pointer): PGdkGLWindowClass;
+begin
+ GDK_GL_WINDOW_CLASS := PGdkGLWindowClass(
+ G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_WINDOW));
+end;
+
+function GDK_IS_GL_WINDOW(anObject: Pointer): boolean;
+begin
+ GDK_IS_GL_WINDOW := G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_WINDOW);
+end;
+
+function GDK_IS_GL_WINDOW_CLASS(klass: Pointer): boolean;
+begin
+ GDK_IS_GL_WINDOW_CLASS := G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_WINDOW);
+end;
+
+function GDK_GL_WINDOW_GET_CLASS(obj: Pointer): PGdkGLWindowClass;
+begin
+ GDK_GL_WINDOW_GET_CLASS := PGdkGLWindowClass(
+ G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_WINDOW));
+end;
+
+function gdk_window_get_gl_drawable(window: PGdkWindow): PGdkGLDrawable;
+begin
+ gdk_window_get_gl_drawable :=
+ GDK_GL_DRAWABLE (gdk_window_get_gl_window (window));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtkglext/gtkgldefs.inc b/packages/gtk2/src/gtkglext/gtkgldefs.inc
new file mode 100644
index 0000000000..2a46aa3a14
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gtkgldefs.inc
@@ -0,0 +1,3 @@
+{ Original file is /usr/include/gtkglext-1.0/gtk/gtkgldefs.h }
+
+{ No need to translate anything here }
diff --git a/packages/gtk2/src/gtkglext/gtkglext.pas b/packages/gtk2/src/gtkglext/gtkglext.pas
new file mode 100644
index 0000000000..f7b958edb6
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gtkglext.pas
@@ -0,0 +1,60 @@
+{ GtkGLExt - OpenGL Extension to GTK+
+ Copyright (C) 2002-2004 Naofumi Yasufuku
+ These Pascal bindings copyright 2005 Michalis Kamburelis
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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.
+}
+
+{ Translated from C header /usr/include/gtkglext-1.0/gtk/gtkgl.h
+ (this is probably standardized system-wide location
+ of this header). }
+
+{$mode objfpc}
+
+unit gtkglext;
+
+interface
+
+uses Glib2, Gdk2, Gtk2, GdkGLExt;
+
+const
+ GtkGLExtLib =
+ {$ifdef WIN32} 'libgtkglext-win32-1.0-0.dll'
+ {$else}
+ {$ifdef DARWIN}
+ 'gtkglext-x11-1.0'
+ {$linklib gtkglext-x11-1.0}
+ {$else}
+ 'libgtkglext-x11-1.0.so'
+ {$endif}
+ {$endif};
+
+{ gtkglext does not (for now) define any objects ("objects" in the glib sense),
+ so "read_interface_types" section is not really used now. }
+{type}
+ {$define read_interface_types}
+ {$I gtkglext_includes.inc}
+ {$undef read_interface_types}
+
+{$define read_interface_rest}
+{$I gtkglext_includes.inc}
+{$undef read_interface_rest}
+
+implementation
+
+{$define read_implementation}
+{$I gtkglext_includes.inc}
+
+end.
diff --git a/packages/gtk2/src/gtkglext/gtkglext_includes.inc b/packages/gtk2/src/gtkglext/gtkglext_includes.inc
new file mode 100644
index 0000000000..944df2ce96
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gtkglext_includes.inc
@@ -0,0 +1,4 @@
+{$I gtkgldefs.inc}
+{$I gtkglversion.inc}
+{$I gtkglinit.inc}
+{$I gtkglwidget.inc}
diff --git a/packages/gtk2/src/gtkglext/gtkglinit.inc b/packages/gtk2/src/gtkglext/gtkglinit.inc
new file mode 100644
index 0000000000..ff3ae42a09
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gtkglinit.inc
@@ -0,0 +1,16 @@
+{ Original file is /usr/include/gtkglext-1.0/gtk/gtkglinit.h }
+
+{$ifdef read_interface_rest}
+
+{*
+ * Initialization routines.
+ *}
+
+function gtk_gl_parse_args(argc: Plongint; argv: PPPChar): gboolean;
+ cdecl; external GtkGLExtLib;
+function gtk_gl_init_check(argc: Plongint; argv: PPPChar): gboolean;
+ cdecl; external GtkGLExtLib;
+procedure gtk_gl_init(argc: Plongint; argv: PPPChar);
+ cdecl; external GtkGLExtLib;
+
+{$endif read_interface_rest}
diff --git a/packages/gtk2/src/gtkglext/gtkglversion.inc b/packages/gtk2/src/gtkglext/gtkglversion.inc
new file mode 100644
index 0000000000..fb32a277e5
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gtkglversion.inc
@@ -0,0 +1,50 @@
+{ Original file is /usr/include/gtkglext-1.0/gtk/gtkglversion.h }
+
+{ Comments for Pascal translation of gtkglext:
+ I prefixed constants (describing header version) and
+ macro (checking versus header version) with "HEADER_",
+ since Pascal is not case sensitive.
+}
+
+{$ifdef read_interface_rest}
+
+{*
+ * Compile time version.
+ *}
+const
+ HEADER_GTKGLEXT_MAJOR_VERSION = 1;
+ HEADER_GTKGLEXT_MINOR_VERSION = 0;
+ HEADER_GTKGLEXT_MICRO_VERSION = 6;
+ HEADER_GTKGLEXT_INTERFACE_AGE = 4;
+ HEADER_GTKGLEXT_BINARY_AGE = 6;
+
+{*
+ * Check whether a GtkGLExt version equal to or greater than
+ * major.minor.micro is present.
+ *}
+function HEADER_GTKGLEXT_CHECK_VERSION(major, minor, micro: guint): boolean;
+
+{*
+ * Library version.
+ *}
+var
+ gtkglext_major_version: guint; cvar; external;
+ gtkglext_minor_version: guint; cvar; external;
+ gtkglext_micro_version: guint; cvar; external;
+ gtkglext_interface_age: guint; cvar; external;
+ gtkglext_binary_age : guint; cvar; external;
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function HEADER_GTKGLEXT_CHECK_VERSION(major, minor, micro: guint): boolean;
+begin
+ HEADER_GTKGLEXT_CHECK_VERSION :=
+ (HEADER_GTKGLEXT_MAJOR_VERSION > major) or
+ ( (HEADER_GTKGLEXT_MAJOR_VERSION = major) and (HEADER_GTKGLEXT_MINOR_VERSION > minor) ) or
+ ( (HEADER_GTKGLEXT_MAJOR_VERSION = major) and (HEADER_GTKGLEXT_MINOR_VERSION = minor) and
+ (HEADER_GTKGLEXT_MICRO_VERSION >= micro) );
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtkglext/gtkglwidget.inc b/packages/gtk2/src/gtkglext/gtkglwidget.inc
new file mode 100644
index 0000000000..6e52742a4f
--- /dev/null
+++ b/packages/gtk2/src/gtkglext/gtkglwidget.inc
@@ -0,0 +1,44 @@
+{ Original file is /usr/include/gtkglext-1.0/gtk/gtkglwidget.h }
+
+{$ifdef read_interface_rest}
+
+function gtk_widget_set_gl_capability(
+ widget: PGtkWidget;
+ glconfig: PGdkGLConfig;
+ share_list: PGdkGLContext;
+ direct: gboolean;
+ render_type: Integer): gboolean;
+ cdecl; external GtkGLExtLib;
+
+function gtk_widget_is_gl_capable(widget: PGtkWidget): gboolean;
+ cdecl; external GtkGLExtLib;
+
+function gtk_widget_get_gl_config(widget: PGtkWidget): PGdkGLConfig;
+ cdecl; external GtkGLExtLib;
+
+function gtk_widget_create_gl_context(
+ widget: PGtkWidget;
+ share_list: PGdkGLContext;
+ direct: gboolean;
+ render_type: Integer): PGdkGLContext;
+ cdecl; external GtkGLExtLib;
+
+function gtk_widget_get_gl_context(widget: PGtkWidget): PGdkGLContext;
+ cdecl; external GtkGLExtLib;
+
+function gtk_widget_get_gl_window(widget: PGtkWidget): PGdkGLWindow;
+ cdecl; external GtkGLExtLib;
+
+function gtk_widget_get_gl_drawable(widget: PGtkWidget): PGdkGLDrawable;
+
+{$endif read_interface_rest}
+
+{$ifdef read_implementation}
+
+function gtk_widget_get_gl_drawable(widget: PGtkWidget): PGdkGLDrawable;
+begin
+ gtk_widget_get_gl_drawable :=
+ GDK_GL_DRAWABLE (gtk_widget_get_gl_window (widget));
+end;
+
+{$endif read_implementation}
diff --git a/packages/gtk2/src/gtkhtml/dom-document.inc b/packages/gtk2/src/gtkhtml/dom-document.inc
new file mode 100644
index 0000000000..6ab906c851
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/dom-document.inc
@@ -0,0 +1,78 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ PDomDocument = ^TDomDocument;
+ TDomDocument = record
+ parent : PDomNode;
+ iterators : PGSList;
+ end;//TDomDocument
+
+ PDomDocumentClass = ^TDomDocumentClass;
+ TDomDocumentClass = record
+ parent_class : PDomNodeClass;
+ end;//TDomDocumentClass
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ function DOM_TYPE_DOCUMENT : GType;
+ function DOM_DOCUMENT(object : pointer) : PDomDocument;
+ function DOM_DOCUMENT_CLASS(klass : pointer) : PDomDocumentClass;
+ function DOM_IS_DOCUMENT(object : pointer) : boolean;
+ function DOM_IS_DOCUMENT_CLASS(klass : pointer) : boolean;
+ function DOM_DOCUMENT_GET_CLASS(obj : pointer) : PDomDocumentClass;
+
+ function dom_document_get_type:GType;
+ function dom_Document__get_documentElement(doc:PDomDocument):PDomElement;
+ function dom_Document_createElement(doc:PDomDocument; tagName:PDomString):PDomElement;
+ function dom_Document_createTextNode(doc:PDomDocument; data:PDomString):PDomText;
+ function dom_Document_createComment(doc:PDomDocument; data:PDomString):PDomComment;
+ function dom_Document_importNode(doc:PDomDocument; importedNode:PDomNode; deep:DomBoolean; exc:PDomException):PDomNode;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+ function DOM_TYPE_DOCUMENT : GType;
+ begin
+ DOM_TYPE_DOCUMENT:=dom_document_get_type;
+ end;//DOM_TYPE_DOCUMENT
+
+ function DOM_DOCUMENT(object : pointer) : PDomDocument;
+ begin
+ DOM_DOCUMENT:=G_TYPE_CHECK_INSTANCE_CAST(object,DOM_TYPE_DOCUMENT,TDomDocument);
+ end;//DOM_DOCUMENT
+
+ function DOM_DOCUMENT_CLASS(klass : pointer) : PDomDocumentClass;
+ begin
+ DOM_DOCUMENT_CLASS:=G_TYPE_CHECK_CLASS_CAST(klass,DOM_TYPE_DOCUMENT,TDomDocumentClass);
+ end;//DOM_DOCUMENT_CLASS
+
+ function DOM_IS_DOCUMENT(object : pointer) : boolean;
+ begin
+ DOM_IS_DOCUMENT:=G_TYPE_CHECK_INSTANCE_TYPE(object,DOM_TYPE_DOCUMENT);
+ end;//DOM_IS_DOCUMENT
+
+ function DOM_IS_DOCUMENT_CLASS(klass : pointer) : boolean;
+ begin
+ DOM_IS_DOCUMENT_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,DOM_TYPE_DOCUMENT);
+ end;//DOM_IS_DOCUMENT_CLASS
+
+ function DOM_DOCUMENT_GET_CLASS(obj : pointer) : PDomDocumentClass;
+ begin
+ DOM_DOCUMENT_GET_CLASS:=G_TYPE_INSTANCE_GET_CLASS(obj,DOM_TYPE_DOCUMENT,TDomDocumentClass);
+ end;//DOM_DOCUMENT_GET_CLASS
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/dom-node.inc b/packages/gtk2/src/gtkhtml/dom-node.inc
new file mode 100644
index 0000000000..d8dcd7c5e7
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/dom-node.inc
@@ -0,0 +1,99 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ PDomNode = ^TDomNode;
+ TDomNode = record
+ parent : TGObject;
+ xmlnode : PxmlNode;
+ style : PHtmlStyle;
+ end;//TDomNode
+
+ PDomNodeClass =^TDomNodeClass;
+ TDomNodeClass = record
+ parent_class : TGObjectClass;
+ _get_nodeName : function (node:PDomNode):PDomString;cdecl;
+ _get_nodeValue : function (node:PDomNode; exc:PDomException):PDomString;cdecl;
+ _set_nodeValue : function (node:PDomNode; value:PDomString; exc:PDomException):PDomString;cdecl;
+ end;//TDomNodeClass
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ function DOM_TYPE_NODE : GType;
+ function DOM_NODE(object : pointer) : PDomNode;
+ function DOM_NODE_CLASS(klass : pointer) : PDomNodeClass;
+ function DOM_IS_NODE(object : pointer) : boolean;
+ function DOM_IS_NODE_CLASS(klass : pointer) : boolean;
+ function DOM_NODE_GET_CLASS(obj : pointer) : longint;
+
+ function dom_node_get_type:GType;cdecl; external gtkhtmllib;
+ function dom_Node_mkref(node:PxmlNode):PDomNode;cdecl; external gtkhtmllib;
+ function dom_Node__get_childNodes(node:PDomNode):PDomNodeList;cdecl; external gtkhtmllib;
+ function dom_Node_removeChild(node:PDomNode; oldChild:PDomNode; exc:PDomException):PDomNode;cdecl; external gtkhtmllib;
+ function dom_Node__get_nodeValue(node:PDomNode; exc:PDomException):PDomString;cdecl; external gtkhtmllib;
+ function dom_Node__get_firstChild(node:PDomNode):PDomNode;cdecl; external gtkhtmllib;
+ function dom_Node__get_nodeName(node:PDomNode):PDomString;cdecl; external gtkhtmllib;
+ function dom_Node__get_attributes(node:PDomNode):PDomNamedNodeMap;cdecl; external gtkhtmllib;
+ function dom_Document__get_doctype(doc:PDomDocument):PDomDocumentType;cdecl; external gtkhtmllib;
+ function dom_Node_hasChildNodes(node:PDomNode):DomBoolean;cdecl; external gtkhtmllib;
+ function dom_Node__get_parentNode(node:PDomNode):PDomNode;cdecl; external gtkhtmllib;
+ function dom_Node__get_nextSibling(node:PDomNode):PDomNode;cdecl; external gtkhtmllib;
+ function dom_Node__get_nodeType(node:PDomNode):gushort;cdecl; external gtkhtmllib;
+ function dom_Node_hasAttributes(node:PDomNode):DomBoolean;cdecl; external gtkhtmllib;
+ function dom_Node_cloneNode(node:PDomNode; deep:DomBoolean):PDomNode;cdecl; external gtkhtmllib;
+ function dom_Node_appendChild(node:PDomNode; newChild:PDomNode; exc:PDomException):PDomNode;cdecl; external gtkhtmllib;
+ function dom_Node__get_localName(node:PDomNode):PDomString;cdecl; external gtkhtmllib;
+ function dom_Node__get_namespaceURI(node:PDomNode):PDomString;cdecl; external gtkhtmllib;
+ function dom_Node__get_previousSibling(node:PDomNode):PDomNode;cdecl; external gtkhtmllib;
+ function dom_Node__get_lastChild(node:PDomNode):PDomNode;cdecl; external gtkhtmllib;
+ procedure dom_Node__set_nodeValue(node:PDomNode; value:PDomString; exc:PDomException);cdecl; external gtkhtmllib;
+ function dom_Node__get_ownerDocument(node:PDomNode):PDomDocument;cdecl; external gtkhtmllib;
+ function dom_Node_hasAttributes(node:PDomNode):gboolean;cdecl; external gtkhtmllib;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+ function DOM_TYPE_NODE : GType;
+ begin
+ DOM_TYPE_NODE:=dom_node_get_type;
+ end;//DOM_TYPE_NODE
+
+ function DOM_NODE(object : pointer) : PDomNode;
+ begin
+ DOM_NODE:=G_TYPE_CHECK_INSTANCE_CAST(object,DOM_TYPE_NODE,TDomNode);
+ end;//DOM_NODE
+
+ function DOM_NODE_CLASS(klass : pointer) : PDomNodeClass;
+ begin
+ DOM_NODE_CLASS:=G_TYPE_CHECK_CLASS_CAST(klass,DOM_TYPE_NODE,TDomNodeClass);
+ end;//DOM_NODE_CLASS
+
+ function DOM_IS_NODE(object : pointer) : boolean;
+ begin
+ DOM_IS_NODE:=G_TYPE_CHECK_INSTANCE_TYPE(object,DOM_TYPE_NODE);
+ end;//DOM_IS_NODE
+
+ function DOM_IS_NODE_CLASS(klass : pointer) : boolean;
+ begin
+ DOM_IS_NODE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,DOM_TYPE_NODE);
+ end;//DOM_IS_NODE_CLASS
+
+ function DOM_NODE_GET_CLASS(obj : pointer) : PDomNodeClass;
+ begin
+ DOM_NODE_GET_CLASS:=G_TYPE_INSTANCE_GET_CLASS(obj,DOM_TYPE_NODE,TDomNodeClass);
+ end;//DOM_NODE_GET_CLASS
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/dom-types.inc b/packages/gtk2/src/gtkhtml/dom-types.inc
new file mode 100644
index 0000000000..1df3b2e0d8
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/dom-types.inc
@@ -0,0 +1,31 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ TDomString = gchar;
+ TDomBoolean = gboolean;
+ TDomException = gushort;
+ TDomTimeStamp = guint64;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/gtkhtml.pas b/packages/gtk2/src/gtkhtml/gtkhtml.pas
new file mode 100644
index 0000000000..42149befe6
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/gtkhtml.pas
@@ -0,0 +1,121 @@
+{
+ Copyright (C) 2000 CodeFactory AB
+ Copyright (C) 2000 Jonas Borgström <jonas@codefactory.se>
+ Copyright (C) 2000 Anders Carlsson <andersca@codefactory.se>
+
+ 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; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+}
+{
+ !!!!! Maybe wrong for kylix !!!!!
+}
+unit gtkhtml;
+
+{$H+}
+{$IFDEF FPC}
+ {$mode objfpc}
+{$ENDIF}
+{$IFDEF VER140}
+ {$DEFINE KYLIX}
+{$ENDIF}
+
+interface
+
+uses
+ gtk2, glib2, atk, pango, gdk2pixbuf, gdk2;
+
+const
+// OS dependent defines
+// !!!!! Maybe wrong for platforms other than linux !!!!!
+{$ifdef win32}
+ {$DEFINE GTK_WINDOWING_WIN32}
+ gtkhtmllib = 'libgtkhtml-win32-2.0-0.dll';
+ {$IFDEF FPC}
+ {$ifndef NO_SMART_LINK}
+ {$smartlink on}
+ {$endif}
+ {$ENDIF}
+{$else}
+ {$ifdef linux}
+ gtkhtmllib = '';
+ {$else}
+ gtkhtmllib = 'libgtkhtml-2.so';
+ {$endif}
+{$endif}
+
+const
+ DOM_UNSPECIFIED_EVENT_TYPE_ERR = 0;
+ DOM_INDEX_SIZE_ERR = 1;
+ DOM_DOMSTRING_SIZE_ERR = 2;
+ DOM_HIERARCHY_REQUEST_ERR = 3;
+ DOM_WRONG_DOCUMENT_ERR = 4;
+ DOM_INVALID_CHARACTER_ERR = 5;
+ DOM_NO_DATA_ALLOWED_ERR = 6;
+ DOM_NO_MODIFICATION_ALLOWED_ERR = 7;
+ DOM_NOT_FOUND_ERR = 8;
+ DOM_NOT_SUPPORTED_ERR = 9;
+ DOM_INUSE_ATTRIBUTE_ERR = 10;
+ DOM_INVALID_STATE_ERR = 11;
+ DOM_SYNTAX_ERR = 12;
+ DOM_INVALID_MODIFICATION_ERR = 13;
+ DOM_NAMESPACE_ERR = 14;
+ DOM_INVALID_ACCESS_ERR = 15;
+ DOM_NO_EXCEPTION = 255;
+
+ DOM_ELEMENT_NODE = 1;
+ DOM_ATTRIBUTE_NODE = 2;
+ DOM_TEXT_NODE = 3;
+ DOM_CDATA_SECTION_NODE = 4;
+ DOM_ENTITY_REFERENCE_NODE = 5;
+ DOM_ENTITY_NODE = 6;
+ DOM_PROCESSING_INSTRUCTION_NODE = 7;
+ DOM_COMMENT_NODE = 8;
+ DOM_DOCUMENT_NODE = 9;
+ DOM_DOCUMENT_TYPE_NODE = 10;
+ DOM_DOCUMENT_FRAGMENT_NODE = 11;
+ DOM_NOTATION_NODE = 12;
+
+ bm__HtmlFontSpecification_weight = $F;
+ bp__HtmlFontSpecification_weight = 0;
+ bm__HtmlFontSpecification_style = $30;
+ bp__HtmlFontSpecification_style = 4;
+ bm__HtmlFontSpecification_variant = $C0;
+ bp__HtmlFontSpecification_variant = 6;
+ bm__HtmlFontSpecification_stretch = $F00;
+ bp__HtmlFontSpecification_stretch = 8;
+ bm__HtmlFontSpecification_decoration = $7000;
+ bp__HtmlFontSpecification_decoration = 12;
+
+type
+ {$DEFINE read_forward_definitions}
+ {$include gtkhtmlincludes.inc}
+ {$UNDEF read_forward_definitions}
+
+ {$DEFINE read_interface_types}
+ {$include gtkhtmlincludes.inc}
+ {$UNDEF read_interface_types}
+
+ {$DEFINE read_interface_rest}
+ {$include gtkhtmlincludes.inc}
+ {$UNDEF read_interface_rest}
+
+implementation
+
+// call implementation parts of header files
+{$DEFINE read_implementation}
+{$include gtkhtmlincludes.inc}
+{$UNDEF read_implementation}
+
+end.//unit gtkhtml
diff --git a/packages/gtk2/src/gtkhtml/gtkhtmlcontext.inc b/packages/gtk2/src/gtkhtml/gtkhtmlcontext.inc
new file mode 100644
index 0000000000..41ced5d9bb
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/gtkhtmlcontext.inc
@@ -0,0 +1,71 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ PGtkHtmlContext = ^TGtkHtmlContext;
+ TGtkHtmlContext = record
+ parent : TGObject;
+ documents : PGSList;
+ standard_font : PHtmlFontSpecification;
+ fixed_font : PHtmlFontSpecification;
+ debug_painting : gboolean;
+ end;//TGtkHtmlContext
+
+ PGtkHtmlContextClass = ^TGtkHtmlContextClass;
+ TGtkHtmlContextClass = record
+ parent : TGObjectClass;
+ end;//TGtkHtmlContextClass
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ function GTK_HTML_CONTEXT_TYPE : GType;
+ function GTK_HTML_CONTEXT(obj : pointer) : PGtkHtmlContext;
+ function GTK_HTML_CONTEXT_CLASS(klass : pointer) : PGtkHtmlContextClass;
+ function GTK_HTML_IS_CONTEXT(obj : pointer) : boolean;
+ function GTK_HTML_IS_CONTEXT_CLASS(klass : pointer) : boolean;
+
+ function gtk_html_context_get_type:GType;
+ function gtk_html_context_get:PGtkHtmlContext;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+ function GTK_HTML_CONTEXT_TYPE : GType;
+ begin
+ GTK_HTML_CONTEXT_TYPE:=gtk_html_context_get_type;
+ end;//GTK_HTML_CONTEXT_TYPE
+
+ function GTK_HTML_CONTEXT(obj : pointer) : PGtkHtmlContext;
+ begin
+ GTK_HTML_CONTEXT:=GTK_CHECK_CAST(obj,GTK_HTML_CONTEXT_TYPE,TGtkHtmlContext);
+ end;//GTK_HTML_CONTEXT
+
+ function GTK_HTML_CONTEXT_CLASS(klass : pointer) : PGtkHtmlContextClass;
+ begin
+ GTK_HTML_CONTEXT_CLASS:=GTK_CHECK_CLASS_CAST(klass,GTK_HTML_CONTEXT_TYPE,TGtkHtmlContextClass);
+ end;//GTK_HTML_CONTEXT_CLASS
+
+ function GTK_HTML_IS_CONTEXT(obj : pointer) : boolean;
+ begin
+ GTK_HTML_IS_CONTEXT:=GTK_CHECK_TYPE(obj,GTK_HTML_CONTEXT_TYPE);
+ end;//GTK_HTML_IS_CONTEXT
+
+ function GTK_HTML_IS_CONTEXT_CLASS(klass : pointer) : boolean;
+ begin
+ GTK_HTML_IS_CONTEXT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_HTML_CONTEXT_TYPE);
+ end;//GTK_HTML_IS_CONTEXT_CLASS
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/gtkhtmlincludes.inc b/packages/gtk2/src/gtkhtml/gtkhtmlincludes.inc
new file mode 100644
index 0000000000..4a6b77271a
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/gtkhtmlincludes.inc
@@ -0,0 +1,16 @@
+// included by gtkhtml.pas
+
+//{$include dom-types.inc}
+//{$include dom-node.inc}
+//{$include dom-document.inc}
+//{$include htmlfocusiterator.inc}
+//{$include htmlparser.inc}
+{$include htmlstream.inc}
+{$include htmlstreambuffer.inc}
+//{$include htmlevent.inc}
+//{$include htmlselection.inc}
+//{$include gtkhtmlcontext.inc}
+{$include htmldocument.inc}
+{$include htmlview.inc}
+
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/htmldocument.inc b/packages/gtk2/src/gtkhtml/htmldocument.inc
new file mode 100644
index 0000000000..fea5b416cd
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/htmldocument.inc
@@ -0,0 +1,96 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ THtmlDocumentState = (HTML_DOCUMENT_STATE_DONE,HTML_DOCUMENT_STATE_PARSING);
+
+ PHtmlDocument = ^THtmlDocument;
+ THtmlDocument = record
+ parent_instance : TGObject;
+ //dom_document : PDomDocument;
+ stylesheets : PGSList;
+ //parser : PHtmlParser;
+ current_stream : PHtmlStream;
+ //image_factory : PHtmlImageFactory;
+ state : THtmlDocumentState;
+ //hover_node : PDomNode;
+ //active_node : PDomNode;
+ //focus_element : PDomElement;
+ end;//THtmlDocument
+
+ PHtmlDocumentClass = ^THtmlDocumentClass;
+ THtmlDocumentClass = record
+ parent_class : TGObjectClass;
+ request_url : procedure (document:PHtmlDocument; url:Pgchar; stream:PHtmlStream);cdecl;
+ link_clicked : procedure (document:PHtmlDocument; url:Pgchar);cdecl;
+ set_base : procedure (document:PHtmlDocument; url:Pgchar);cdecl;
+ title_changed : procedure (document:PHtmlDocument; new_title:Pgchar);cdecl;
+ submit : procedure (document:PHtmlDocument; method:Pgchar; url:Pgchar; encoding:Pgchar);cdecl;
+ //node_inserted : procedure (document:PHtmlDocument; node:PDomNode);cdecl;
+ //node_removed : procedure (document:PHtmlDocument; node:PDomNode);cdecl;
+ //text_updated : procedure (document:PHtmlDocument; node:PDomNode);cdecl;
+ //style_updated : procedure (document:PHtmlDocument; node:PDomNode; style_change:THtmlStyleChange);cdecl;
+ //relayout_node : procedure (document:PHtmlDocument; node:PDomNode);cdecl;
+ //repaint_node : procedure (document:PHtmlDocument; node:PDomNode);cdecl;
+ //dom_mouse_down : function (document:PHtmlDocument; event:PDomEvent):gboolean;cdecl;
+ //dom_mouse_up : function (document:PHtmlDocument; event:PDomEvent):gboolean;cdecl;
+ //dom_mouse_click : function (document:PHtmlDocument; event:PDomEvent):gboolean;cdecl;
+ //dom_mouse_over : function (document:PHtmlDocument; event:PDomEvent):gboolean;cdecl;
+ //dom_mouse_out : function (document:PHtmlDocument; event:PDomEvent):gboolean;cdecl;
+ end;//THtmlDocumentClass
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ function HTML_TYPE_DOCUMENT : GType;
+ function HTML_DOCUMENT(obj : pointer) : PHtmlDocument;
+ function HTML_DOCUMENT_CLASS(klass : pointer) : PHtmlDocumentClass;
+ function HTML_IS_DOCUMENT(obj : pointer) : boolean;
+
+ function html_document_get_type:GType;cdecl; external gtkhtmllib;
+ function html_document_new:PHtmlDocument;cdecl; external gtkhtmllib;
+ function html_document_open_stream(document:PHtmlDocument; mime_type:Pgchar):gboolean;cdecl; external gtkhtmllib;
+ procedure html_document_write_stream(document:PHtmlDocument; buffer:Pgchar; len:gint);cdecl; external gtkhtmllib;
+ procedure html_document_close_stream(document:PHtmlDocument);cdecl; external gtkhtmllib;
+ procedure html_document_clear(document:PHtmlDocument);cdecl; external gtkhtmllib;
+ //procedure html_document_update_hover_node(document:PHtmlDocument; node:PDomNode);cdecl; external gtkhtmllib;
+ //procedure html_document_update_active_node(document:PHtmlDocument; node:PDomNode);cdecl; external gtkhtmllib;
+ //procedure html_document_update_focus_element(document:PHtmlDocument; element:PDomElement);cdecl; external gtkhtmllib;
+ //function html_document_find_anchor(doc:PHtmlDocument; anchor:Pgchar):PDomNode;cdecl; external gtkhtmllib;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+ function HTML_TYPE_DOCUMENT : GType;
+ begin
+ HTML_TYPE_DOCUMENT:=html_document_get_type;
+ end;//HTML_TYPE_DOCUMENT
+
+ function HTML_DOCUMENT(obj : pointer) : PHtmlDocument;
+ begin
+ HTML_DOCUMENT:=PHtmlDocument(GTK_CHECK_CAST(obj,HTML_TYPE_DOCUMENT));
+ end;//HTML_DOCUMENT
+
+ function HTML_DOCUMENT_CLASS(klass : pointer) : PHtmlDocumentClass;
+ begin
+ HTML_DOCUMENT_CLASS:=GTK_CHECK_CLASS_CAST(klass,HTML_TYPE_DOCUMENT);
+ end;//HTML_DOCUMENT_CLASS
+
+ function HTML_IS_DOCUMENT(obj : pointer) : boolean;
+ begin
+ HTML_IS_DOCUMENT:=GTK_CHECK_TYPE(obj,HTML_TYPE_DOCUMENT);
+ end;//HTML_IS_DOCUMENT
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/htmlevent.inc b/packages/gtk2/src/gtkhtml/htmlevent.inc
new file mode 100644
index 0000000000..573cd6bc77
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/htmlevent.inc
@@ -0,0 +1,32 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ procedure html_event_mouse_move(view:PHtmlView; event:PGdkEventMotion);cdecl; external gtkhtmllib;
+ procedure html_event_button_press(view:PHtmlView; button:PGdkEventButton);cdecl; external gtkhtmllib;
+ procedure html_event_button_release(view:PHtmlView; event:PGdkEventButton);cdecl; external gtkhtmllib;
+ procedure html_event_activate(view:PHtmlView);cdecl; external gtkhtmllib;
+ function html_event_key_press(view:PHtmlView; event:PGdkEventKey):gboolean;cdecl; external gtkhtmllib;
+ function html_event_find_root_box(self:PHtmlBox; x:gint; y:gint):PHtmlBox;cdecl; external gtkhtmllib;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/htmlfocusiterator.inc b/packages/gtk2/src/gtkhtml/htmlfocusiterator.inc
new file mode 100644
index 0000000000..9ca4a7f019
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/htmlfocusiterator.inc
@@ -0,0 +1,75 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ PHtmlFocusIterator = ^THtmlFocusIterator;
+ THtmlFocusIterator = record
+ parent_instance : TGObject;
+ document : PDomDocument;
+ current_node : PDomNode;
+ end;//THtmlFocusIterator
+
+ PHtmlFocusIteratorClass = ^THtmlFocusIteratorClass;
+ THtmlFocusIteratorClass = record
+ parent_class : TGObjectClass;
+ end;//THtmlFocusIteratorClass
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ function HTML_TYPE_FOCUS_ITERATOR : GType;
+ function HTML_FOCUS_ITERATOR(object : pointer) : PHtmlFocusIterator;
+ function HTML_FOCUS_ITERATOR_CLASS(klass : pointer) : PHtmlFocusIteratorClass;
+ function HTML_IS_FOCUS_ITERATOR(object : pointer) : boolean;
+ function HTML_IS_FOCUS_ITERATOR_CLASS(klass : pointer) : boolean;
+ function HTML_FOCUS_ITERATOR_GET_CLASS(obj : pointer) : PHtmlFocusIteratorClass;
+
+ function html_focus_iterator_next_element(document:PDomDocument; element:PDomElement):PDomElement;cdecl; external gtkhtmllib;
+ function html_focus_iterator_prev_element(document:PDomDocument; element:PDomElement):PDomElement;cdecl; external gtkhtmllib;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+ function HTML_TYPE_FOCUS_ITERATOR : GType;
+ begin
+ HTML_TYPE_FOCUS_ITERATOR:=html_focus_iterator_get_type;
+ end;//HTML_TYPE_FOCUS_ITERATOR
+
+ function HTML_FOCUS_ITERATOR(object : pointer) : PHtmlFocusIterator;
+ begin
+ HTML_FOCUS_ITERATOR:=G_TYPE_CHECK_INSTANCE_CAST(object,HTML_TYPE_FOCUS_ITERATOR,HtmlFocusIterator);
+ end;//HTML_FOCUS_ITERATOR
+
+ function HTML_FOCUS_ITERATOR_CLASS(klass : pointer) : PHtmlFocusIteratorClass;
+ begin
+ HTML_FOCUS_ITERATOR_CLASS:=G_TYPE_CHECK_CLASS_CAST(klass,HTML_TYPE_FOCUS_ITERATOR,HtmlFocusIteratorClass);
+ end;//HTML_FOCUS_ITERATOR_CLASS
+
+ function HTML_IS_FOCUS_ITERATOR(object : pointer) : boolean;
+ begin
+ HTML_IS_FOCUS_ITERATOR:=G_TYPE_CHECK_INSTANCE_TYPE(object,HTML_TYPE_FOCUS_ITERATOR);
+ end;//HTML_IS_FOCUS_ITERATOR
+
+ function HTML_IS_FOCUS_ITERATOR_CLASS(klass : pointer) : boolean;
+ begin
+ HTML_IS_FOCUS_ITERATOR_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,HTML_TYPE_FOCUS_ITERATOR);
+ end;//HTML_IS_FOCUS_ITERATOR_CLASS
+
+ function HTML_FOCUS_ITERATOR_GET_CLASS(obj : pointer) : PHtmlFocusIteratorClass;
+ begin
+ HTML_FOCUS_ITERATOR_GET_CLASS:=G_TYPE_INSTANCE_GET_CLASS(obj,HTML_TYPE_FOCUS_ITERATOR,HtmlFocusIteratorClass);
+ end;//HTML_FOCUS_ITERATOR_GET_CLASS
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/htmlfontspecification.inc b/packages/gtk2/src/gtkhtml/htmlfontspecification.inc
new file mode 100644
index 0000000000..4353634bde
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/htmlfontspecification.inc
@@ -0,0 +1,122 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ THtmlFontStyleType = (HTML_FONT_STYLE_NORMAL := 0,HTML_FONT_STYLE_ITALIC, HTML_FONT_STYLE_OBLIQUE);
+ THtmlFontVariantType = (HTML_FONT_VARIANT_NORMAL := 0,HTML_FONT_VARIANT_SMALL_CAPS);
+ THtmlFontWeightType = (HTML_FONT_WEIGHT_100,HTML_FONT_WEIGHT_200,
+ HTML_FONT_WEIGHT_300,HTML_FONT_WEIGHT_400, HTML_FONT_WEIGHT_500,HTML_FONT_WEIGHT_600,
+ HTML_FONT_WEIGHT_700,HTML_FONT_WEIGHT_800, HTML_FONT_WEIGHT_900);
+
+const
+ HTML_FONT_WEIGHT_NORMAL = HTML_FONT_WEIGHT_400;
+ HTML_FONT_WEIGHT_BOLD = HTML_FONT_WEIGHT_700;
+
+type
+ THtmlFontStretchType = (HTML_FONT_STRETCH_NORMAL := 0,HTML_FONT_STRETCH_ULTRA_CONDENSED,
+ HTML_FONT_STRETCH_EXTRA_CONDENSED,HTML_FONT_STRETCH_CONDENSED,
+ HTML_FONT_STRETCH_SEMI_CONDENSED,HTML_FONT_STRETCH_SEMI_EXPANDED,
+ HTML_FONT_STRETCH_EXPANDED,HTML_FONT_STRETCH_EXTRA_EXPANDED,
+ HTML_FONT_STRETCH_ULTRA_EXPANDED);
+ THtmlFontDecorationType = (HTML_FONT_DECORATION_NONE := 0,HTML_FONT_DECORATION_UNDERLINE := 1 shl 0,
+ HTML_FONT_DECORATION_OVERLINE := 1 shl 1, HTML_FONT_DECORATION_LINETHROUGH := 1 shl 2);
+
+ PHtmlFontSpecification = ^THtmlFontSpecification;
+ THtmlFontSpecification = record
+ family : pgchar;
+ size : gint;
+ flag0 : word;
+ end;//THtmlFontSpecification
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ function weight(var a : _HtmlFontSpecification) : THtmlFontWeightType;
+ procedure set_weight(var a : _HtmlFontSpecification; __weight : THtmlFontWeightType);
+ function style(var a : _HtmlFontSpecification) : THtmlFontStyleType;
+ procedure set_style(var a : _HtmlFontSpecification; __style : THtmlFontStyleType);
+ function variant(var a : _HtmlFontSpecification) : THtmlFontVariantType;
+ procedure set_variant(var a : _HtmlFontSpecification; __variant : THtmlFontVariantType);
+ function stretch(var a : _HtmlFontSpecification) : THtmlFontStretchType;
+ procedure set_stretch(var a : _HtmlFontSpecification; __stretch : THtmlFontStretchType);
+ function decoration(var a : _HtmlFontSpecification) : THtmlFontDecorationType;
+ procedure set_decoration(var a : _HtmlFontSpecification; __decoration : THtmlFontDecorationType);
+
+ function html_font_specification_new(family:Pgchar; style:THtmlFontStyleType; variant:THtmlFontVariantType; weight:HtmlFontWeightType; stretch:HtmlFontStretchType;
+ decoration:THtmlFontDecorationType; size:gint):PHtmlFontSpecification;cdecl; external gtkhtmllib;
+ function html_font_specification_ref(spec:PHtmlFontSpecification):PHtmlFontSpecification;cdecl; external gtkhtmllib;
+ procedure html_font_specification_unref(spec:PHtmlFontSpecification);cdecl; external gtkhtmllib;
+ function html_font_specification_dup(spec:PHtmlFontSpecification):PHtmlFontSpecification;cdecl; external gtkhtmllib;
+ function html_font_description_equal(a:PHtmlFontSpecification; b:PHtmlFontSpecification):gboolean;cdecl; external gtkhtmllib;
+ function html_font_specification_get_pango_font_description(spec:PHtmlFontSpecification):PPangoFontDescription;cdecl; external gtkhtmllib;
+ procedure html_font_specification_get_extra_attributes(spec:PHtmlFontSpecification; attrs:PPangoAttrList; start_index:gint; end_index:gint);cdecl; external gtkhtmllib;
+ procedure html_font_specification_get_all_attributes(spec:PHtmlFontSpecification; attrs:PPangoAttrList; start_index:gint; end_index:gint; magnification:gdouble);cdecl; external gtkhtmllib;
+ function html_font_specification_get_html_size(spec:PHtmlFontSpecification):gint;cdecl; external gtkhtmllib;
+ function html_font_description_html_size_to_pt(font_size:gint):gint;cdecl; external gtkhtmllib;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+ function weight(var a : THtmlFontSpecification) : THtmlFontWeightType;
+ begin
+ weight:=(a.flag0 and bm__HtmlFontSpecification_weight) shr bp__HtmlFontSpecification_weight;
+ end;//weight
+
+ procedure set_weight(var a : THtmlFontSpecification; __weight : THtmlFontWeightType);
+ begin
+ a.flag0:=a.flag0 or ((__weight shl bp__HtmlFontSpecification_weight) and bm__HtmlFontSpecification_weight);
+ end;//set_weight
+
+ function style(var a : THtmlFontSpecification) : THtmlFontStyleType;
+ begin
+ style:=(a.flag0 and bm__HtmlFontSpecification_style) shr bp__HtmlFontSpecification_style;
+ end;//style
+
+ procedure set_style(var a : THtmlFontSpecification; __style : THtmlFontStyleType);
+ begin
+ a.flag0:=a.flag0 or ((__style shl bp__HtmlFontSpecification_style) and bm__HtmlFontSpecification_style);
+ end;//set_style
+
+ function variant(var a : THtmlFontSpecification) : THtmlFontVariantType;
+ begin
+ variant:=(a.flag0 and bm__HtmlFontSpecification_variant) shr bp__HtmlFontSpecification_variant;
+ end;//variant
+
+ procedure set_variant(var a : THtmlFontSpecification; __variant : THtmlFontVariantType);
+ begin
+ a.flag0:=a.flag0 or ((__variant shl bp__HtmlFontSpecification_variant) and bm__HtmlFontSpecification_variant);
+ end;//set_variant
+
+ function stretch(var a : THtmlFontSpecification) : THtmlFontStretchType;
+ begin
+ stretch:=(a.flag0 and bm__HtmlFontSpecification_stretch) shr bp__HtmlFontSpecification_stretch;
+ end;//stretch
+
+ procedure set_stretch(var a : THtmlFontSpecification; __stretch : THtmlFontStretchType);
+ begin
+ a.flag0:=a.flag0 or ((__stretch shl bp__HtmlFontSpecification_stretch) and bm__HtmlFontSpecification_stretch);
+ end;//set_stretch
+
+ function decoration(var a : THtmlFontSpecification) : THtmlFontDecorationType;
+ begin
+ decoration:=(a.flag0 and bm__HtmlFontSpecification_decoration) shr bp__HtmlFontSpecification_decoration;
+ end;//decoration
+
+ procedure set_decoration(var a : THtmlFontSpecification; __decoration : THtmlFontDecorationType);
+ begin
+ a.flag0:=a.flag0 or ((__decoration shl bp__HtmlFontSpecification_decoration) and bm__HtmlFontSpecification_decoration);
+ end;//set_decoration
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/htmlparser.inc b/packages/gtk2/src/gtkhtml/htmlparser.inc
new file mode 100644
index 0000000000..5c112b3445
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/htmlparser.inc
@@ -0,0 +1,74 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ THtmlParserType = (HTML_PARSER_TYPE_HTML,HTML_PARSER_TYPE_XML);
+
+ PHtmlParser = ^THtmlParser;
+ THtmlParser = record
+ parent : TGObject;
+ parser_type : THtmlParserType;
+ document : PHtmlDocument;
+ stream : PHtmlStream;
+ xmlctxt : xmlParserCtxtPtr;
+ res : longint;
+ chars : array[0..9] of char;
+ blocking : gboolean;
+ blocking_node : PDomNode;
+ end;//THtmlParser
+
+ PHtmlParserClass = ^THtmlParserClass;
+ THtmlParserClass = record
+ parent : TGtkObjectClass;
+ done_parsing : procedure (parser:PHtmlParser);cdecl;
+ new_node : procedure (parser:PHtmlParser; node:PDomNode);
+ parsed_document_node : procedure (parser:PHtmlParser; document:PDomDocument);
+ end;//THtmlParserClass
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ function HTML_PARSER_TYPE : GType;
+ function HTML_PARSER(obj : pointer) : PHtmlParser;
+ function HTML_PARSER_CLASS(klass : pointer) : PHtmlParserClass;
+ function HTML_IS_PARSER(obj : pointer) : boolean;
+
+ function html_parser_get_type:GType;
+ function html_parser_new(document:PHtmlDocument; parser_type:THtmlParserType):PHtmlParser;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+ function HTML_PARSER_TYPE : GType;
+ begin
+ HTML_PARSER_TYPE:=html_parser_get_type;
+ end;//HTML_PARSER_TYPE
+
+ function HTML_PARSER(obj : pointer) : PHtmlParser;
+ begin
+ HTML_PARSER:=GTK_CHECK_CAST(obj,HTML_PARSER_TYPE,THtmlParser);
+ end;//HTML_PARSER
+
+ function HTML_PARSER_CLASS(klass : pointer) : PHtmlParserClass;
+ begin
+ HTML_PARSER_CLASS:=GTK_CHECK_CLASS_CAST(klass,HTML_PARSER_TYPE,THtmlParserClass);
+ end;//HTML_PARSER_CLASS
+
+ function HTML_IS_PARSER(obj : pointer) : boolean;
+ begin
+ HTML_IS_PARSER:=GTK_CHECK_TYPE(obj,HTML_PARSER_TYPE);
+ end;//HTML_IS_PARSER
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/htmlselection.inc b/packages/gtk2/src/gtkhtml/htmlselection.inc
new file mode 100644
index 0000000000..74e25a6c3f
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/htmlselection.inc
@@ -0,0 +1,29 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ procedure html_selection_start(view:PHtmlView; event:PGdkEventButton);cdecl; external gtkhtmllib;
+ procedure html_selection_end(view:PHtmlView; event:PGdkEventButton);cdecl; external gtkhtmllib;
+ procedure html_selection_update(view:PHtmlView; event:PGdkEventMotion);cdecl; external gtkhtmllib;
+ procedure html_selection_clear(view:PHtmlView);cdecl; external gtkhtmllib;
+ procedure html_selection_set(view:PHtmlView; start:PDomNode; offset:longint; len:longint);cdecl; external gtkhtmllib;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/htmlstream.inc b/packages/gtk2/src/gtkhtml/htmlstream.inc
new file mode 100644
index 0000000000..a671d81c0f
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/htmlstream.inc
@@ -0,0 +1,96 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ PHtmlStream = ^THtmlStream;
+
+ THtmlStreamCloseFunc = procedure (stream:PHtmlStream; user_data:gpointer);cdecl;
+ THtmlStreamWriteFunc = procedure (stream:PHtmlStream; buffer:Pgchar; size:guint; user_data:gpointer);cdecl;
+ THtmlStreamCancelFunc = procedure (stream:PHtmlStream; user_data:gpointer; cancel_data:gpointer);cdecl;
+
+ THtmlStream = record
+ parent_object : TGObject;
+ write_func : THtmlStreamWriteFunc;
+ close_func : THtmlStreamCloseFunc;
+ cancel_func : THtmlStreamCancelFunc;
+ user_data : gpointer;
+ cancel_data : gpointer;
+ written : gint;
+ mime_type : pchar;
+ end;//THtmlStream
+
+ PHtmlStreamClass = ^THtmlStreamClass;
+ THtmlStreamClass = record
+ parent_class : TGObjectClass;
+ end;//
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ function HTML_TYPE_STREAM : GType;
+ function HTML_STREAM(obj : pointer) : PHtmlStream;
+ function HTML_STREAM_CLASS(klass : pointer) : PHtmlStreamClass;
+ function HTML_IS_STREAM(obj : pointer) : boolean;
+ function HTML_IS_STREAM_CLASS(klass : pointer) : boolean;
+ function HTML_STREAM_GET_CLASS(obj : pointer) : PHtmlStreamClass;
+
+ function html_stream_get_type:GType;cdecl; external gtkhtmllib;
+ function html_stream_new(write_func:THtmlStreamWriteFunc; close_func:THtmlStreamCloseFunc; user_data:gpointer):PHtmlStream;cdecl; external gtkhtmllib;
+ procedure html_stream_write(stream:PHtmlStream; buffer:Pgchar; size:guint);cdecl; external gtkhtmllib;
+ procedure html_stream_close(stream:PHtmlStream);cdecl; external gtkhtmllib;
+ procedure html_stream_destroy(stream:PHtmlStream);cdecl; external gtkhtmllib;
+ function html_stream_get_written(stream:PHtmlStream):gint;cdecl; external gtkhtmllib;
+ procedure html_stream_cancel(stream:PHtmlStream);cdecl; external gtkhtmllib;
+ procedure html_stream_set_cancel_func(stream:PHtmlStream; abort_func:THtmlStreamCancelFunc; cancel_data:gpointer);cdecl; external gtkhtmllib;
+ function html_stream_get_mime_type(stream:PHtmlStream):pchar;cdecl; external gtkhtmllib;
+ procedure html_stream_set_mime_type(stream:PHtmlStream; mime_type:Pchar);cdecl; external gtkhtmllib;
+
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+ function HTML_TYPE_STREAM : GType;
+ begin
+ HTML_TYPE_STREAM:=html_stream_get_type;
+ end;//HTML_TYPE_STREAM
+
+ function HTML_STREAM(obj : pointer) : PHtmlStream;
+ begin
+ HTML_STREAM:=PHtmlStream(G_TYPE_CHECK_INSTANCE_CAST(obj,HTML_TYPE_STREAM));
+ end;//HTML_STREAM
+
+ function HTML_STREAM_CLASS(klass : pointer) : PHtmlStreamClass;
+ begin
+ HTML_STREAM_CLASS:=G_TYPE_CHECK_CLASS_CAST(klass,HTML_TYPE_STREAM);
+ end;//HTML_STREAM_CLASS
+
+ function HTML_IS_STREAM(obj : pointer) : boolean;
+ begin
+ HTML_IS_STREAM:=G_TYPE_CHECK_INSTANCE_TYPE(obj,HTML_TYPE_STREAM);
+ end;//HTML_IS_STREAM
+
+ function HTML_IS_STREAM_CLASS(klass : pointer) : boolean;
+ begin
+ HTML_IS_STREAM_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,HTML_TYPE_STREAM);
+ end;//HTML_IS_STREAM_CLASS
+
+ function HTML_STREAM_GET_CLASS(obj : pointer) : PHtmlStreamClass;
+ begin
+ HTML_STREAM_GET_CLASS:=PHtmlStreamClass(G_TYPE_INSTANCE_GET_CLASS(obj,HTML_TYPE_STREAM));
+ end;//HTML_STREAM_GET_CLASS
+
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/htmlstreambuffer.inc b/packages/gtk2/src/gtkhtml/htmlstreambuffer.inc
new file mode 100644
index 0000000000..33142adc6f
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/htmlstreambuffer.inc
@@ -0,0 +1,27 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+
+ THtmlStreamBufferCloseFunc = procedure (str:Pgchar; len:gint; user_data:gpointer);cdecl;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ function html_stream_buffer_new(close_func:THtmlStreamBufferCloseFunc; user_data:gpointer):PHtmlStream;cdecl; external gtkhtmllib;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+{$ENDIF read_implementation}
+
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/gtkhtml/htmlview.inc b/packages/gtk2/src/gtkhtml/htmlview.inc
new file mode 100644
index 0000000000..9f428e127d
--- /dev/null
+++ b/packages/gtk2/src/gtkhtml/htmlview.inc
@@ -0,0 +1,98 @@
+// included by gtkhtml.pas
+
+{$IFDEF read_forward_definitions}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PHtmlView = ^THtmlView;
+ THtmlView = record
+ parent : TGtkLayout;
+ document : PHtmlDocument;
+ //root : PHtmlBox;
+ node_table : PGHashTable;
+ //painter : PHtmlPainter;
+ relayout_idle_id : guint;
+ relayout_timeout_id : guint;
+ mouse_down_x : gint;
+ mouse_down_y : gint;
+ mouse_detail : gint;
+ //sel_start : PHtmlBox;
+ sel_start_ypos : gint;
+ sel_start_index : gint;
+ //sel_end : PHtmlBox;
+ sel_end_ypos : gint;
+ sel_end_index : gint;
+ sel_flag : gboolean;
+ sel_backwards : gboolean;
+ sel_start_found : gboolean;
+ sel_list : PGSList;
+ jump_to_anchor : pgchar;
+ magnification : gdouble;
+ magnification_modified : gboolean;
+ on_url : gboolean;
+ end;//THtmlView
+
+ PHtmlViewClass = ^THtmlViewClass;
+ THtmlViewClass = record
+ parent : TGtkLayoutClass;
+ move_cursor : procedure (html_view:PHtmlView; step:TGtkMovementStep; count:gint; extend_selection:gboolean);cdecl;
+ //request_object : function (html_view:PHtmlView; widget:PHtmlEmbedded):gboolean;
+ on_url : procedure (html_view:PHtmlView; url:Pgchar);
+ activate : procedure (html_view:PHtmlView);
+ move_focus_out : procedure (html_view:PHtmlView; direction:TGtkDirectionType);
+ end;//THtmlViewClass
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_rest}
+
+ function HTML_TYPE_VIEW : GType;
+ function HTML_VIEW(obj : pointer) : PHtmlView;
+ function HTML_VIEW_CLASS(klass : pointer) : PHtmlViewClass;
+ function HTML_IS_VIEW(obj : pointer) : boolean;
+
+ function html_view_get_type:GType;cdecl; external gtkhtmllib;
+ function html_view_new:PGtkWidget;cdecl; external gtkhtmllib;
+ procedure html_view_set_document(view:PHtmlView; document:PHtmlDocument);cdecl; external gtkhtmllib;
+ procedure html_view_jump_to_anchor(view:PHtmlView; anchor:Pgchar);cdecl; external gtkhtmllib;
+ function html_view_get_magnification(view:PHtmlView):gdouble;cdecl; external gtkhtmllib;
+ procedure html_view_set_magnification(view:PHtmlView; magnification:gdouble);cdecl; external gtkhtmllib;
+ procedure html_view_zoom_in(view:PHtmlView);cdecl; external gtkhtmllib;
+ procedure html_view_zoom_out(view:PHtmlView);cdecl; external gtkhtmllib;
+ procedure html_view_zoom_reset(view:PHtmlView);cdecl; external gtkhtmllib;
+ //function html_view_find_layout_box(view:PHtmlView; node:PDomNode; find_parent:gboolean):PHtmlBox;cdecl; external gtkhtmllib;
+
+{$ENDIF read_interface_rest}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+function HTML_TYPE_VIEW : GType;
+begin
+ HTML_TYPE_VIEW:=html_view_get_type;
+end;//HTML_TYPE_VIEW
+
+function HTML_VIEW(obj : pointer) : PHtmlView;
+begin
+ HTML_VIEW:=PHtmlView(GTK_CHECK_CAST(obj,HTML_TYPE_VIEW));
+end;//HTML_VIEW
+
+function HTML_VIEW_CLASS(klass : pointer) : PHtmlViewClass;
+begin
+ HTML_VIEW_CLASS:=PHtmlViewClass(GTK_CHECK_CLASS_CAST(klass,HTML_TYPE_VIEW));
+end;//HTML_VIEW_CLASS
+
+function HTML_IS_VIEW(obj : pointer) : boolean;
+begin
+ HTML_IS_VIEW:=GTK_CHECK_TYPE(obj,HTML_TYPE_VIEW);
+end;//HTML_IS_VIEW
+
+
+{$ENDIF read_implementation}
+// included by gtkhtml.pas
diff --git a/packages/gtk2/src/libglade/glade-init.inc b/packages/gtk2/src/libglade/glade-init.inc
new file mode 100644
index 0000000000..b57e35ba6f
--- /dev/null
+++ b/packages/gtk2/src/libglade/glade-init.inc
@@ -0,0 +1,18 @@
+// included by libglade.pas
+
+{ left for compatibility. Libglade will now automatically initialise }
+
+procedure glade_init; cdecl; external LibGladeLib;
+{ handle dynamic loading of libglade extensions }
+procedure glade_require(TheLibrary:Pgchar); cdecl; external LibGladeLib;
+procedure glade_provide(TheLibrary:Pgchar); cdecl; external LibGladeLib;
+
+{$ifndef LIBGLADE_DISABLE_DEPRECATED}
+{ libglade now loads modules based on information
+ in the glade file - these are deprecated }
+procedure glade_gnome_init;
+procedure glade_bonobo_init;
+{$endif}
+
+// included by libglade.pas
+
diff --git a/packages/gtk2/src/libglade/glade-xml.inc b/packages/gtk2/src/libglade/glade-xml.inc
new file mode 100644
index 0000000000..eb5963e397
--- /dev/null
+++ b/packages/gtk2/src/libglade/glade-xml.inc
@@ -0,0 +1,73 @@
+// included by libglade.pas
+
+type
+ PGladeXMLPrivate = pointer;
+
+ PGladeXML = ^TGladeXML;
+ TGladeXML = record
+ parent : TGObject;
+ filename : Pchar;
+ priv : PGladeXMLPrivate;
+ end;
+
+ PGladeXMLClass = ^TGladeXMLClass;
+ TGladeXMLClass = record
+ parent_class : TGObjectClass;
+ end;
+
+{ if the gtk_signal_connect_object behaviour is required, connect_object
+ will point to the anObject, otherwise it will be NULL.
+ }
+ TGladeXMLConnectFunc = procedure (handler_name:Pgchar; anObject:PGObject;
+ signal_name:Pgchar; signal_data:Pgchar; connect_object:PGObject;
+ after:gboolean; user_data:gpointer); cdecl;
+
+function GLADE_TYPE_XML : GType;
+function GLADE_XML(obj: pointer) : PGladeXML;
+function GLADE_XML_CLASS(klass: pointer) : PGladeXMLClass;
+function GLADE_IS_XML(obj: pointer) : gboolean;
+function GLADE_IS_XML_CLASS(klass: pointer) : gboolean;
+function GLADE_XML_GET_CLASS(obj: pointer) : PGladeXMLClass;
+
+function glade_xml_get_type:GType; cdecl; external LibGladeLib;
+function glade_xml_new(fname:Pchar; root:Pchar; domain:Pchar):PGladeXML; cdecl; external LibGladeLib;
+function glade_xml_new_from_buffer(buffer:Pchar; size:longint; root:Pchar; domain:Pchar):PGladeXML; cdecl; external LibGladeLib;
+function glade_xml_construct(self:PGladeXML; fname:Pchar; root:Pchar; domain:Pchar):gboolean; cdecl; external LibGladeLib;
+procedure glade_xml_signal_connect(self:PGladeXML; handlername:Pchar; func:TGCallback); cdecl; external LibGladeLib;
+procedure glade_xml_signal_connect_data(self:PGladeXML; handlername:Pchar; func:TGCallback; user_data:gpointer); cdecl; external LibGladeLib;
+
+{
+ use gmodule to connect signals automatically. Basically a symbol with
+ the name of the signal handler is searched for, and that is connected to
+ the associated symbols. So setting gtk_main_quit as a signal handler
+ for the destroy signal of a window will do what you expect.
+ }
+procedure glade_xml_signal_autoconnect(self:PGladeXML); cdecl; external LibGladeLib;
+
+{
+ These two are to make it easier to use libglade with an interpreted
+ language binding.
+ }
+procedure glade_xml_signal_connect_full(self:PGladeXML; handler_name:Pgchar; func:TGladeXMLConnectFunc; user_data:gpointer); cdecl; external LibGladeLib;
+procedure glade_xml_signal_autoconnect_full(self:PGladeXML; func:TGladeXMLConnectFunc; user_data:gpointer); cdecl; external LibGladeLib;
+function glade_xml_get_widget(self:PGladeXML; name:Pchar):PGtkWidget; cdecl; external LibGladeLib;
+function glade_xml_get_widget_prefix(self:PGladeXML; name:Pchar):PGList; cdecl; external LibGladeLib;
+function glade_xml_relative_file(self:PGladeXML; filename:Pgchar):Pgchar; cdecl; external LibGladeLib;
+{ don't free the results of these two ... }
+function glade_get_widget_name(widget:PGtkWidget):Pchar; cdecl; external LibGladeLib;
+function glade_get_widget_tree(widget:PGtkWidget):PGladeXML; cdecl; external LibGladeLib;
+
+{ interface for changing the custom widget handling }
+type
+ PGladeXMLCustomWidgetHandler = ^TGladeXMLCustomWidgetHandler;
+ TGladeXMLCustomWidgetHandler = TGtkWidget;
+
+procedure glade_set_custom_handler(handler:TGladeXMLCustomWidgetHandler; user_data:gpointer); cdecl; external LibGladeLib;
+
+{$ifndef LIBGLADE_DISABLE_DEPRECATED}
+function glade_xml_new_with_domain(fname:Pchar; root:Pchar; domain:Pchar):PGladeXML;
+function glade_xml_new_from_memory(buffer:Pchar; size:longint; root:Pchar; domain:Pchar):PGladeXML;
+{$endif}
+
+// included by libglade.pas
+
diff --git a/packages/gtk2/src/libglade/libglade2.pas b/packages/gtk2/src/libglade/libglade2.pas
new file mode 100644
index 0000000000..3990c321ae
--- /dev/null
+++ b/packages/gtk2/src/libglade/libglade2.pas
@@ -0,0 +1,130 @@
+{
+ libglade - a library for building interfaces from XML files at runtime
+ Copyright (C) 1998-2002 James Henstridge <james@daa.com.au>
+
+ glade.h: the main include file for libglade.
+
+ 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 libglade2; // keep unit name lowercase for kylix
+
+{$IFDEF FPC}
+ {$mode objfpc}
+{$ENDIF}
+{$IFDEF VER140}
+ {$DEFINE KYLIX}
+{$ENDIF}
+
+interface
+
+uses
+ glib2, gtk2;
+
+const
+{$ifdef win32}
+ {$define gtkwin}
+ LibGladeLib = 'libglade-2.0-0.dll';
+ {$IFDEF FPC}
+ {$ifndef NO_SMART_LINK}
+ {$smartlink on}
+ {$endif}
+ {$ENDIF}
+{$else}
+ LibGladeLib = 'libglade-2.0.so';
+{$endif}
+
+{$IFNDEF KYLIX}
+ {$PACKRECORDS C}
+{$ELSE}
+ {$ALIGN 4}
+ {$WEAKPACKAGEUNIT}
+ {$WARNINGS OFF}
+{$ENDIF}
+
+
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+
+{$include glade-init.inc}
+{$include glade-xml.inc}
+{ don't include glade-build.h -- it is only for widget set definitions }
+
+implementation
+
+// glade-init.inc --------------------------------------------------------------
+
+procedure glade_gnome_init;
+begin
+ glade_init;
+end;
+
+procedure glade_bonobo_init;
+begin
+ glade_init;
+end;
+
+// glade-xml.inc ---------------------------------------------------------------
+
+function glade_xml_new_with_domain(fname:Pchar; root:Pchar;
+ domain:Pchar):PGladeXML;
+begin
+ glade_xml_new_with_domain:=glade_xml_new(fname,root,domain);
+end;
+
+function glade_xml_new_from_memory(buffer:Pchar; size:longint; root:Pchar;
+ domain:Pchar):PGladeXML;
+begin
+ glade_xml_new_from_memory:=glade_xml_new_from_buffer(buffer,size,root,domain);
+end;
+
+function GLADE_TYPE_XML : GType;
+begin
+ GLADE_TYPE_XML:=glade_xml_get_type;
+end;
+
+function GLADE_XML(obj: pointer) : PGladeXML;
+begin
+ GLADE_XML:=PGladeXML(G_TYPE_CHECK_INSTANCE_CAST(obj,GLADE_TYPE_XML));
+end;
+
+function GLADE_XML_CLASS(klass: pointer) : PGladeXMLClass;
+begin
+ GLADE_XML_CLASS:=PGladeXMLClass(G_TYPE_CHECK_CLASS_CAST(klass,GLADE_TYPE_XML));
+end;
+
+function GLADE_IS_XML(obj: pointer) : gboolean;
+begin
+ GLADE_IS_XML:=G_TYPE_CHECK_INSTANCE_TYPE(obj,GLADE_TYPE_XML);
+end;
+
+function GLADE_IS_XML_CLASS(klass: pointer) : gboolean;
+begin
+ GLADE_IS_XML_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GLADE_TYPE_XML);
+end;
+
+function GLADE_XML_GET_CLASS(obj: pointer) : PGladeXMLClass;
+begin
+ GLADE_XML_GET_CLASS:=PGladeXMLClass(G_TYPE_INSTANCE_GET_CLASS(obj,GLADE_TYPE_XML));
+end;
+
+
+end.
diff --git a/packages/gtk2/src/pango/pango-attributes.inc b/packages/gtk2/src/pango/pango-attributes.inc
new file mode 100644
index 0000000000..8d008d906d
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-attributes.inc
@@ -0,0 +1,167 @@
+// included by pango.pp
+{$IFDEF read_interface_types}
+{ PangoColor }
+ PPangoColor = ^TPangoColor;
+ TPangoColor = record
+ red : guint16;
+ green : guint16;
+ blue : guint16;
+ end;
+
+ PPangoAttrType = ^TPangoAttrType;
+ TPangoAttrType = longint;
+
+ PPangoUnderline = ^TPangoUnderline;
+ TPangoUnderline = longint;
+
+ PPangoAttribute = ^TPangoAttribute;
+ PPangoAttrClass = ^TPangoAttrClass;
+
+ TPangoAttribute = record
+ klass : PPangoAttrClass;
+ start_index : guint;
+ end_index : guint;
+ end;
+
+ TPangoAttrClass = record
+ _type : TPangoAttrType;
+ copy : function (attr:PPangoAttribute):PPangoAttribute; cdecl;
+ destroy : procedure (attr:PPangoAttribute); cdecl;
+ equal : function (attr1:PPangoAttribute; attr2:PPangoAttribute):gboolean; cdecl;
+ end;
+
+ PPangoAttrString = ^TPangoAttrString;
+ TPangoAttrString = record
+ attr : TPangoAttribute;
+ value : Pchar;
+ end;
+
+ PPangoAttrLanguage = ^TPangoAttrLanguage;
+ TPangoAttrLanguage = record
+ attr : TPangoAttribute;
+ value : PPangoLanguage;
+ end;
+
+ PPangoAttrInt = ^TPangoAttrInt;
+ TPangoAttrInt = record
+ attr : TPangoAttribute;
+ value : longint;
+ end;
+
+ PPangoAttrFloat = ^TPangoAttrFloat;
+ TPangoAttrFloat = record
+ attr : TPangoAttribute;
+ value : gdouble;
+ end;
+
+ PPangoAttrColor = ^TPangoAttrColor;
+ TPangoAttrColor = record
+ attr : TPangoAttribute;
+ color : TPangoColor;
+ end;
+
+ PPangoAttrShape = ^TPangoAttrShape;
+ TPangoAttrShape = record
+ attr : TPangoAttribute;
+ ink_rect : TPangoRectangle;
+ logical_rect : TPangoRectangle;
+ end;
+
+ PPangoAttrFontDesc = ^TPangoAttrFontDesc;
+ TPangoAttrFontDesc = record
+ attr : TPangoAttribute;
+ desc : PPangoFontDescription;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+ const
+ PANGO_ATTR_INVALID = 0;
+ PANGO_ATTR_LANGUAGE = 1;
+ PANGO_ATTR_FAMILY = 2;
+ PANGO_ATTR_STYLE = 3;
+ PANGO_ATTR_WEIGHT = 4;
+ PANGO_ATTR_VARIANT = 5;
+ PANGO_ATTR_STRETCH = 6;
+ PANGO_ATTR_SIZE = 7;
+ PANGO_ATTR_FONT_DESC = 8;
+ PANGO_ATTR_FOREGROUND = 9;
+ PANGO_ATTR_BACKGROUND = 10;
+ PANGO_ATTR_UNDERLINE = 11;
+ PANGO_ATTR_STRIKETHROUGH = 12;
+ PANGO_ATTR_RISE = 13;
+ PANGO_ATTR_SHAPE = 14;
+ PANGO_ATTR_SCALE = 15;
+
+ PANGO_UNDERLINE_NONE = 0;
+ PANGO_UNDERLINE_SINGLE = 1;
+ PANGO_UNDERLINE_DOUBLE = 2;
+ PANGO_UNDERLINE_LOW = 3;
+
+
+function PANGO_TYPE_COLOR : GType;
+function pango_color_get_type:GType; cdecl; external pangolib;
+function pango_color_copy(src:PPangoColor):PPangoColor; cdecl; external pangolib;
+procedure pango_color_free(color:PPangoColor); cdecl; external pangolib;
+function pango_color_parse(color:PPangoColor; spec:Pchar):gboolean; cdecl; external pangolib;
+
+{ Attributes }
+
+function PANGO_TYPE_ATTR_LIST : GType;
+
+function pango_attr_type_register(name:Pgchar):TPangoAttrType; cdecl; external pangolib;
+function pango_attribute_copy(attr:PPangoAttribute):PPangoAttribute; cdecl; external pangolib;
+procedure pango_attribute_destroy(attr:PPangoAttribute); cdecl; external pangolib;
+function pango_attribute_equal(attr1:PPangoAttribute; attr2:PPangoAttribute):gboolean; cdecl; external pangolib;
+function pango_attr_language_new(language:PPangoLanguage):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_family_new(family:Pchar):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_foreground_new(red:guint16; green:guint16; blue:guint16):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_background_new(red:guint16; green:guint16; blue:guint16):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_size_new(size:longint):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_style_new(style:TPangoStyle):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_weight_new(weight:TPangoWeight):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_variant_new(variant:TPangoVariant):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_stretch_new(stretch:TPangoStretch):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_font_desc_new(desc:PPangoFontDescription):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_underline_new(underline:TPangoUnderline):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_strikethrough_new(strikethrough:gboolean):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_rise_new(rise:longint):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_shape_new(ink_rect:PPangoRectangle; logical_rect:PPangoRectangle):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_scale_new(scale_factor:gdouble):PPangoAttribute; cdecl; external pangolib;
+function pango_attr_list_get_type:GType; cdecl; external pangolib;
+function pango_attr_list_new:PPangoAttrList; cdecl; external pangolib;
+procedure pango_attr_list_ref(list:PPangoAttrList); cdecl; external pangolib;
+procedure pango_attr_list_unref(list:PPangoAttrList); cdecl; external pangolib;
+function pango_attr_list_copy(list:PPangoAttrList):PPangoAttrList; cdecl; external pangolib;
+procedure pango_attr_list_insert(list:PPangoAttrList; attr:PPangoAttribute); cdecl; external pangolib;
+procedure pango_attr_list_insert_before(list:PPangoAttrList; attr:PPangoAttribute); cdecl; external pangolib;
+procedure pango_attr_list_change(list:PPangoAttrList; attr:PPangoAttribute); cdecl; external pangolib;
+procedure pango_attr_list_splice(list:PPangoAttrList; other:PPangoAttrList; pos:gint; len:gint); cdecl; external pangolib;
+function pango_attr_list_get_iterator(list:PPangoAttrList):PPangoAttrIterator; cdecl; external pangolib;
+procedure pango_attr_iterator_range(iterator:PPangoAttrIterator; start:Pgint; theEnd:Pgint); cdecl; external pangolib;
+function pango_attr_iterator_next(iterator:PPangoAttrIterator):gboolean; cdecl; external pangolib;
+function pango_attr_iterator_copy(iterator:PPangoAttrIterator):PPangoAttrIterator; cdecl; external pangolib;
+procedure pango_attr_iterator_destroy(iterator:PPangoAttrIterator); cdecl; external pangolib;
+function pango_attr_iterator_get(iterator:PPangoAttrIterator; _type:TPangoAttrType):PPangoAttribute; cdecl; external pangolib;
+procedure pango_attr_iterator_get_font(iterator:PPangoAttrIterator; desc:PPangoFontDescription; var language:PPangoLanguage; extra_attrs:PPGSList); cdecl; external pangolib;
+function pango_parse_markup(markup_text:Pchar; length:longint; accel_marker:gunichar; var attr_list:PPangoAttrList; text:PPchar;
+ accel_char:Pgunichar; error:PPGError):gboolean; cdecl; external pangolib;
+{$endif read_interface_functions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+function PANGO_TYPE_COLOR : GType;
+begin
+ PANGO_TYPE_COLOR:=pango_color_get_type;
+end;
+
+function PANGO_TYPE_ATTR_LIST : GType;
+begin
+ PANGO_TYPE_ATTR_LIST:=pango_attr_list_get_type;
+end;
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/pango/pango-break.inc b/packages/gtk2/src/pango/pango-break.inc
new file mode 100644
index 0000000000..a4e44298ef
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-break.inc
@@ -0,0 +1,203 @@
+// included by pango.pp
+{$IFDEF read_interface_types}
+
+{ Logical attributes of a character.
+ }
+{ Can break line in front of character }
+{ Must break line in front of character }
+{ Can break here when doing char wrap }
+{ Whitespace character }
+{ cursor can appear in front of character (i.e. this is a grapheme
+ boundary, or the first character in the text)
+ }
+{ Note that in degenerate cases, you could have both start/theEnd set on
+ some text, most likely for sentences (e.g. no space after a period, so
+ the next sentence starts right away)
+ }
+{ first character in a word }
+{ is first non-word char after a word }
+{ There are two ways to divide sentences. The first assigns all
+ intersentence whitespace/control/format chars to some sentence,
+ so all chars are in some sentence; is_sentence_boundary denotes
+ the boundaries there. The second way doesn't assign
+ between-sentence spaces, etc. to any sentence, so
+ is_sentence_start/is_sentence_end mark the boundaries of those
+ sentences.
+ }
+{ first character in a sentence }
+{ first non-sentence char after a sentence }
+ PPangoLogAttr = ^TPangoLogAttr;
+ TPangoLogAttr = record
+ flag0 : word;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+const
+ bm_TPangoLogAttr_is_line_break = $1;
+ bp_TPangoLogAttr_is_line_break = 0;
+ bm_TPangoLogAttr_is_mandatory_break = $2;
+ bp_TPangoLogAttr_is_mandatory_break = 1;
+ bm_TPangoLogAttr_is_char_break = $4;
+ bp_TPangoLogAttr_is_char_break = 2;
+ bm_TPangoLogAttr_is_white = $8;
+ bp_TPangoLogAttr_is_white = 3;
+ bm_TPangoLogAttr_is_cursor_position = $10;
+ bp_TPangoLogAttr_is_cursor_position = 4;
+ bm_TPangoLogAttr_is_word_start = $20;
+ bp_TPangoLogAttr_is_word_start = 5;
+ bm_TPangoLogAttr_is_word_end = $40;
+ bp_TPangoLogAttr_is_word_end = 6;
+ bm_TPangoLogAttr_is_sentence_boundary = $80;
+ bp_TPangoLogAttr_is_sentence_boundary = 7;
+ bm_TPangoLogAttr_is_sentence_start = $100;
+ bp_TPangoLogAttr_is_sentence_start = 8;
+ bm_TPangoLogAttr_is_sentence_end = $200;
+ bp_TPangoLogAttr_is_sentence_end = 9;
+
+function is_line_break(var a : TPangoLogAttr) : guint;
+procedure set_is_line_break(var a : TPangoLogAttr; __is_line_break : guint);
+function is_mandatory_break(var a : TPangoLogAttr) : guint;
+procedure set_is_mandatory_break(var a : TPangoLogAttr; __is_mandatory_break : guint);
+function is_char_break(var a : TPangoLogAttr) : guint;
+procedure set_is_char_break(var a : TPangoLogAttr; __is_char_break : guint);
+function is_white(var a : TPangoLogAttr) : guint;
+procedure set_is_white(var a : TPangoLogAttr; __is_white : guint);
+function is_cursor_position(var a : TPangoLogAttr) : guint;
+procedure set_is_cursor_position(var a : TPangoLogAttr; __is_cursor_position : guint);
+function is_word_start(var a : TPangoLogAttr) : guint;
+procedure set_is_word_start(var a : TPangoLogAttr; __is_word_start : guint);
+function is_word_end(var a : TPangoLogAttr) : guint;
+procedure set_is_word_end(var a : TPangoLogAttr; __is_word_end : guint);
+function is_sentence_boundary(var a : TPangoLogAttr) : guint;
+procedure set_is_sentence_boundary(var a : TPangoLogAttr; __is_sentence_boundary : guint);
+function is_sentence_start(var a : TPangoLogAttr) : guint;
+procedure set_is_sentence_start(var a : TPangoLogAttr; __is_sentence_start : guint);
+function is_sentence_end(var a : TPangoLogAttr) : guint;
+procedure set_is_sentence_end(var a : TPangoLogAttr; __is_sentence_end : guint);
+{ Determine information about cluster/word/line breaks in a string
+ of Unicode text.
+ }
+
+procedure pango_break(text:Pgchar; length:longint; analysis:PPangoAnalysis; attrs:PPangoLogAttr; attrs_len:longint); cdecl; external pangolib;
+procedure pango_find_paragraph_boundary(text:Pgchar; length:gint; paragraph_delimiter_index:Pgint; next_paragraph_start:Pgint); cdecl; external pangolib;
+procedure pango_get_log_attrs(text:Pchar; length:longint; level:longint; language:PPangoLanguage; log_attrs:PPangoLogAttr;
+ attrs_len:longint); cdecl; external pangolib;
+{$ifdef PANGO_ENABLE_ENGINE}
+{ This is the default break algorithm, used if no language
+ engine overrides it. Normally you should use pango_break()
+ instead; this function is mostly useful for chaining up
+ from a language engine override.
+ }
+
+procedure pango_default_break(text:Pgchar; length:longint; analysis:PPangoAnalysis; attrs:PPangoLogAttr; attrs_len:longint); cdecl; external pangolib;
+{$endif PANGO_ENABLE_ENGINE}
+
+{$endif read_interface_functions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function is_line_break(var a : TPangoLogAttr) : guint;
+begin
+ is_line_break:=(a.flag0 and bm_TPangoLogAttr_is_line_break) shr bp_TPangoLogAttr_is_line_break;
+end;
+
+procedure set_is_line_break(var a : TPangoLogAttr; __is_line_break : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_line_break shl bp_TPangoLogAttr_is_line_break) and bm_TPangoLogAttr_is_line_break);
+end;
+
+function is_mandatory_break(var a : TPangoLogAttr) : guint;
+begin
+ is_mandatory_break:=(a.flag0 and bm_TPangoLogAttr_is_mandatory_break) shr bp_TPangoLogAttr_is_mandatory_break;
+end;
+
+procedure set_is_mandatory_break(var a : TPangoLogAttr; __is_mandatory_break : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_mandatory_break shl bp_TPangoLogAttr_is_mandatory_break) and bm_TPangoLogAttr_is_mandatory_break);
+end;
+
+function is_char_break(var a : TPangoLogAttr) : guint;
+begin
+ is_char_break:=(a.flag0 and bm_TPangoLogAttr_is_char_break) shr bp_TPangoLogAttr_is_char_break;
+end;
+
+procedure set_is_char_break(var a : TPangoLogAttr; __is_char_break : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_char_break shl bp_TPangoLogAttr_is_char_break) and bm_TPangoLogAttr_is_char_break);
+end;
+
+function is_white(var a : TPangoLogAttr) : guint;
+begin
+ is_white:=(a.flag0 and bm_TPangoLogAttr_is_white) shr bp_TPangoLogAttr_is_white;
+end;
+
+procedure set_is_white(var a : TPangoLogAttr; __is_white : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_white shl bp_TPangoLogAttr_is_white) and bm_TPangoLogAttr_is_white);
+end;
+
+function is_cursor_position(var a : TPangoLogAttr) : guint;
+begin
+ is_cursor_position:=(a.flag0 and bm_TPangoLogAttr_is_cursor_position) shr bp_TPangoLogAttr_is_cursor_position;
+end;
+
+procedure set_is_cursor_position(var a : TPangoLogAttr; __is_cursor_position : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_cursor_position shl bp_TPangoLogAttr_is_cursor_position) and bm_TPangoLogAttr_is_cursor_position);
+end;
+
+function is_word_start(var a : TPangoLogAttr) : guint;
+begin
+ is_word_start:=(a.flag0 and bm_TPangoLogAttr_is_word_start) shr bp_TPangoLogAttr_is_word_start;
+end;
+
+procedure set_is_word_start(var a : TPangoLogAttr; __is_word_start : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_word_start shl bp_TPangoLogAttr_is_word_start) and bm_TPangoLogAttr_is_word_start);
+end;
+
+function is_word_end(var a : TPangoLogAttr) : guint;
+begin
+ is_word_end:=(a.flag0 and bm_TPangoLogAttr_is_word_end) shr bp_TPangoLogAttr_is_word_end;
+end;
+
+procedure set_is_word_end(var a : TPangoLogAttr; __is_word_end : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_word_end shl bp_TPangoLogAttr_is_word_end) and bm_TPangoLogAttr_is_word_end);
+end;
+
+function is_sentence_boundary(var a : TPangoLogAttr) : guint;
+begin
+ is_sentence_boundary:=(a.flag0 and bm_TPangoLogAttr_is_sentence_boundary) shr bp_TPangoLogAttr_is_sentence_boundary;
+end;
+
+procedure set_is_sentence_boundary(var a : TPangoLogAttr; __is_sentence_boundary : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_sentence_boundary shl bp_TPangoLogAttr_is_sentence_boundary) and bm_TPangoLogAttr_is_sentence_boundary);
+end;
+
+function is_sentence_start(var a : TPangoLogAttr) : guint;
+begin
+ is_sentence_start:=(a.flag0 and bm_TPangoLogAttr_is_sentence_start) shr bp_TPangoLogAttr_is_sentence_start;
+end;
+
+procedure set_is_sentence_start(var a : TPangoLogAttr; __is_sentence_start : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_sentence_start shl bp_TPangoLogAttr_is_sentence_start) and bm_TPangoLogAttr_is_sentence_start);
+end;
+
+function is_sentence_end(var a : TPangoLogAttr) : guint;
+begin
+ is_sentence_end:=(a.flag0 and bm_TPangoLogAttr_is_sentence_end) shr bp_TPangoLogAttr_is_sentence_end;
+end;
+
+procedure set_is_sentence_end(var a : TPangoLogAttr; __is_sentence_end : guint);
+begin
+ a.flag0:=a.flag0 or ((__is_sentence_end shl bp_TPangoLogAttr_is_sentence_end) and bm_TPangoLogAttr_is_sentence_end);
+end;
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/pango/pango-context.inc b/packages/gtk2/src/pango/pango-context.inc
new file mode 100644
index 0000000000..d7e92d399f
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-context.inc
@@ -0,0 +1,89 @@
+// included by pango.pp
+{$IFDEF read_interface_types}
+
+{$ENDIF}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+
+{ Sort of like a GC - application set information about how
+ to handle scripts
+ }
+{ PangoContext typedefed in pango-fontmap.h }
+
+function PANGO_TYPE_CONTEXT : GType;
+function PANGO_CONTEXT(anObject : pointer) : PPangoContext;
+function PANGO_CONTEXT_CLASS(klass : pointer) : PPangoContextClass;
+function PANGO_IS_CONTEXT(anObject : pointer) : boolean;
+function PANGO_IS_CONTEXT_CLASS(klass : pointer) : boolean;
+function PANGO_CONTEXT_GET_CLASS(obj : PPangoContext) : PPangoContextClass;
+
+{ The PangoContext and PangoContextClass structs are private; if you
+ need to create a subclass of these, mail otaylor@redhat.com
+ }
+function pango_context_get_type:GType; cdecl; external pangolib;
+{$ifdef PANGO_ENABLE_BACKEND}
+
+function pango_context_new:PPangoContext; cdecl; external pangolib;
+procedure pango_context_set_font_map(context:PPangoContext; font_map:PPangoFontMap); cdecl; external pangolib;
+{$endif}
+{ PANGO_ENABLE_BACKEND }
+
+procedure pango_context_list_families(context:PPangoContext; families:PPPPangoFontFamily; n_families:Plongint); cdecl; external pangolib;
+function pango_context_load_font(context:PPangoContext; desc:PPangoFontDescription):PPangoFont; cdecl; external pangolib;
+function pango_context_load_fontset(context:PPangoContext; desc:PPangoFontDescription; language:PPangoLanguage):PPangoFontset; cdecl; external pangolib;
+function pango_context_get_metrics(context:PPangoContext; desc:PPangoFontDescription; language:PPangoLanguage):PPangoFontMetrics; cdecl; external pangolib;
+procedure pango_context_set_font_description(context:PPangoContext; desc:PPangoFontDescription); cdecl; external pangolib;
+function pango_context_get_font_description(context:PPangoContext):PPangoFontDescription; cdecl; external pangolib;
+function pango_context_get_language(context:PPangoContext):PPangoLanguage; cdecl; external pangolib;
+procedure pango_context_set_language(context:PPangoContext; language:PPangoLanguage); cdecl; external pangolib;
+procedure pango_context_set_base_dir(context:PPangoContext; direction:TPangoDirection); cdecl; external pangolib;
+function pango_context_get_base_dir(context:PPangoContext):TPangoDirection; cdecl; external pangolib;
+
+{ Break a string of Unicode characters into segments with
+ consistent shaping/language engine and bidrectional level.
+ Returns a GList of PangoItem's
+ }
+function pango_itemize(context:PPangoContext; text:Pchar; start_index:longint; length:longint; attrs:PPangoAttrList;
+ cached_iter:PPangoAttrIterator):PGList; cdecl; external pangolib;
+{$endif read_interface_functions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+function PANGO_TYPE_CONTEXT : GType;
+begin
+ PANGO_TYPE_CONTEXT:=pango_context_get_type;
+end;
+
+function PANGO_CONTEXT(anObject : pointer) : PPangoContext;
+begin
+ PANGO_CONTEXT:=PPangoContext(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ PANGO_TYPE_CONTEXT));
+end;
+
+function PANGO_CONTEXT_CLASS(klass : pointer) : PPangoContextClass;
+begin
+ PANGO_CONTEXT_CLASS:=PPangoContextClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ PANGO_TYPE_CONTEXT));
+end;
+
+function PANGO_IS_CONTEXT(anObject : pointer) : boolean;
+begin
+ PANGO_IS_CONTEXT:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,PANGO_TYPE_CONTEXT);
+end;
+
+function PANGO_IS_CONTEXT_CLASS(klass : pointer) : boolean;
+begin
+ PANGO_IS_CONTEXT_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,PANGO_TYPE_CONTEXT);
+end;
+
+function PANGO_CONTEXT_GET_CLASS(obj : PPangoContext) : PPangoContextClass;
+begin
+ PANGO_CONTEXT_GET_CLASS:=PPangoContextClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ PANGO_TYPE_CONTEXT));
+end;
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/pango/pango-coverage.inc b/packages/gtk2/src/pango/pango-coverage.inc
new file mode 100644
index 0000000000..3abfb50239
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-coverage.inc
@@ -0,0 +1,41 @@
+// included by pango.pp
+{$IFDEF read_interface_types}
+ PPangoCoverageLevel = ^TPangoCoverageLevel;
+ TPangoCoverageLevel = (
+ PANGO_COVERAGE_NONE,
+ PANGO_COVERAGE_FALLBACK,
+ PANGO_COVERAGE_APPROXIMATE,
+ PANGO_COVERAGE_EXACT
+ );
+
+ PPangoBlockInfo = ^TPangoBlockInfo;
+ TPangoBlockInfo = record
+ data: Pguchar;
+ level: TPangoCoverageLevel; // Used if data == NULL
+ end;
+
+ PPangoCoverage = ^TPangoCoverage;
+ TPangoCoverage = record
+ ref_count: guint;
+ n_blocks: longint;
+ data_size: longint;
+ blocks: PPangoBlockInfo;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+function pango_coverage_new:PPangoCoverage; cdecl; external pangolib;
+function pango_coverage_ref(coverage:PPangoCoverage):PPangoCoverage; cdecl; external pangolib;
+procedure pango_coverage_unref(coverage:PPangoCoverage); cdecl; external pangolib;
+function pango_coverage_copy(coverage:PPangoCoverage):PPangoCoverage; cdecl; external pangolib;
+function pango_coverage_get(coverage:PPangoCoverage; index:longint):TPangoCoverageLevel; cdecl; external pangolib;
+procedure pango_coverage_set(coverage:PPangoCoverage; index:longint; level:TPangoCoverageLevel); cdecl; external pangolib;
+procedure pango_coverage_max(coverage:PPangoCoverage; other:PPangoCoverage); cdecl; external pangolib;
+procedure pango_coverage_to_bytes(coverage:PPangoCoverage; bytes:PPguchar; n_bytes:Plongint); cdecl; external pangolib;
+function pango_coverage_from_bytes(bytes:Pguchar; n_bytes:longint):PPangoCoverage; cdecl; external pangolib;
+{$endif}
+
+
diff --git a/packages/gtk2/src/pango/pango-engine.inc b/packages/gtk2/src/pango/pango-engine.inc
new file mode 100644
index 0000000000..788e4437a2
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-engine.inc
@@ -0,0 +1,75 @@
+// included by pango.pp
+{$IFDEF read_forward_definitions}
+{$ENDIF}
+
+{$IFDEF read_interface_types}
+ PPangoEngineRange = ^TPangoEngineRange;
+ TPangoEngineRange = record
+ start : guint32;
+ theEnd : guint32;
+ langs : Pgchar;
+ end;
+
+ PPangoEngineInfo = ^TPangoEngineInfo;
+ TPangoEngineInfo = record
+ id : Pgchar;
+ engine_type : Pgchar;
+ render_type : Pgchar;
+ ranges : PPangoEngineRange;
+ n_ranges : gint;
+ end;
+
+ PPangoEngine = ^TPangoEngine;
+ TPangoEngine = record
+ id : Pgchar;
+ _type : Pgchar;
+ length : gint;
+ end;
+
+ TPangoEngineLangScriptBreak =
+ procedure (text:Pchar; len:longint; analysis:PPangoAnalysis;
+ attrs:PPangoLogAttr; attrs_len:longint); cdecl;
+
+ PPangoEngineLang = ^TPangoEngineLang;
+ TPangoEngineLang = record
+ engine : TPangoEngine;
+ script_break : TPangoEngineLangScriptBreak;
+ end;
+
+ TPangoEngineShapeScript =
+ procedure (font:PPangoFont; text:Pchar; length:longint;
+ analysis:PPangoAnalysis; glyphs:PPangoGlyphString); cdecl;
+ TPangoEngineShapeGetCoverage =
+ function (font:PPangoFont; language:PPangoLanguage):PPangoCoverage; cdecl;
+
+ PPangoEngineShape = ^TPangoEngineShape;
+ TPangoEngineShape = record
+ engine : TPangoEngine;
+ script_shape : TPangoEngineShapeScript;
+ get_coverage : TPangoEngineShapeGetCoverage
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+
+{$ifdef PANGO_ENABLE_ENGINE}
+{ Module API }
+
+const
+ PANGO_ENGINE_TYPE_LANG = 'PangoEngineLang';
+ PANGO_ENGINE_TYPE_SHAPE = 'PangoEngineShape';
+ PANGO_RENDER_TYPE_NONE = 'PangoRenderNone';
+
+{ A module should export the following functions }
+procedure script_engine_list(var engines:PPangoEngineInfo; n_engines:Plongint); cdecl; external pangolib;
+function script_engine_load(id:Pchar):PPangoEngine; cdecl; external pangolib;
+procedure script_engine_unload(engine:PPangoEngine); cdecl; external pangolib;
+{$endif}
+{ PANGO_ENABLE_ENGINE }
+{$endif read_interface_functions}
+
+
+
diff --git a/packages/gtk2/src/pango/pango-font.inc b/packages/gtk2/src/pango/pango-font.inc
new file mode 100644
index 0000000000..8dbd2306f3
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-font.inc
@@ -0,0 +1,400 @@
+// included by pango.pp
+{$IFDEF read_forward_definitions}
+{$ifdef PANGO_ENABLE_BACKEND}
+ PPangoFont = ^TPangoFont;
+ PPangoFontMetrics = ^TPangoFontMetrics;
+{$ENDIF}
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ PPangoStyle = ^TPangoStyle;
+ TPangoStyle = gint;
+
+
+ PPangoVariant = ^TPangoVariant;
+ TPangoVariant = gint;
+
+ PPangoWeight = ^TPangoWeight;
+ TPangoWeight = gint;
+
+ PPangoStretch = ^TPangoStretch;
+ TPangoStretch = gint;
+
+ PPangoFontMask = ^TPangoFontMask;
+ TPangoFontMask = longint; // see below for possible values
+
+{$ifdef PANGO_ENABLE_BACKEND}
+ TPangoFontMetrics = record
+ ref_count : guint;
+ ascent : longint;
+ descent : longint;
+ approximate_char_width : longint;
+ approximate_digit_width : longint;
+ end;
+
+ PPangoFontFamily = ^TPangoFontFamily;
+ PPPangoFontFamily = ^PPangoFontFamily;
+ PPPPangoFontFamily = ^PPPangoFontFamily;
+ TPangoFontFamily = record
+ parent_instance : TGObject;
+ end;
+
+{ Padding for future expansion }
+{}
+
+ PPangoFontFace = ^TPangoFontFace;
+ PPPangoFontFace = ^PPangoFontFace;
+ PPPPangoFontFace = ^PPPangoFontFace;
+ TPangoFontFace = record
+ parent_instance : TGObject;
+ end;
+
+ TPangoFontFamilyClassListFaces =
+ procedure (family:PPangoFontFamily; faces:PPPPangoFontFace;
+ n_faces:Plongint); cdecl;
+ TPangoFontFamilyClassGetName =
+ function (family:PPangoFontFamily):Pchar; cdecl;
+
+ PPangoFontFamilyClass = ^TPangoFontFamilyClass;
+ TPangoFontFamilyClass = record
+ parent_class : TGObjectClass;
+ list_faces : TPangoFontFamilyClassListFaces;
+ get_name : TPangoFontFamilyClassGetName;
+ _pango_reserved1 : procedure; cdecl;
+ _pango_reserved2 : procedure; cdecl;
+ _pango_reserved3 : procedure; cdecl;
+ _pango_reserved4 : procedure; cdecl;
+ end;
+
+{ Padding for future expansion }
+ PPangoFontFaceClass = ^TPangoFontFaceClass;
+ TPangoFontFaceClass = record
+ parent_class : TGObjectClass;
+ get_face_name : function (face:PPangoFontFace):Pchar; cdecl;
+ describe : function (face:PPangoFontFace):PPangoFontDescription; cdecl;
+ _pango_reserved1 : procedure ; cdecl;
+ _pango_reserved2 : procedure ; cdecl;
+ _pango_reserved3 : procedure ; cdecl;
+ _pango_reserved4 : procedure ; cdecl;
+ end;
+
+ TPangoFont = record
+ parent_instance : TGObject;
+ end;
+
+ TPangoFontClassDescribe =
+ function (font:PPangoFont):PPangoFontDescription; cdecl;
+ TPangoFontClassGetCoverage =
+ function (font:PPangoFont; lang:PPangoLanguage):PPangoCoverage;
+ TPangoFontClassFindShaper =
+ function (font:PPangoFont; lang:PPangoLanguage;
+ ch:guint32):PPangoEngineShape;
+ TPangoFontClassGetGlyphExtents =
+ procedure (font:PPangoFont; glyph:TPangoGlyph; ink_rect:PPangoRectangle;
+ logical_rect:PPangoRectangle);
+ TPangoFontClassGetMetrics =
+ function (font:PPangoFont; language:PPangoLanguage):PPangoFontMetrics;
+
+ { Padding for future expansion }
+ PPangoFontClass = ^TPangoFontClass;
+ TPangoFontClass = record
+ parent_class : TGObjectClass;
+ describe : TPangoFontClassDescribe;
+ get_coverage : TPangoFontClassGetCoverage;
+ find_shaper : TPangoFontClassFindShaper;
+ get_glyph_extents : TPangoFontClassGetGlyphExtents;
+ get_metrics : TPangoFontClassGetMetrics;
+ _pango_reserved1 : procedure ; cdecl;
+ _pango_reserved2 : procedure ; cdecl;
+ _pango_reserved3 : procedure ; cdecl;
+ _pango_reserved4 : procedure ; cdecl;
+ end;
+
+{$ENDIF PANGO_ENABLE_BACKEND}
+
+{$ENDIF read_interface_types}
+
+//-----------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+const
+ // values for TPangoStyle
+ PANGO_STYLE_NORMAL = 0; // the font is upright
+ PANGO_STYLE_OBLIQUE = 1; // the font is slanted, but in a roman style
+ PANGO_STYLE_ITALIC = 2; // the font is slanted in an italic style
+
+ //values for TPangoVariant
+ PANGO_VARIANT_NORMAL = 0;
+ PANGO_VARIANT_SMALL_CAPS = 1;
+
+ // values for TPangoWeight
+ PANGO_WEIGHT_ULTRALIGHT = 200;
+ PANGO_WEIGHT_LIGHT = 300;
+ PANGO_WEIGHT_NORMAL = 400;
+ PANGO_WEIGHT_BOLD = 700;
+ PANGO_WEIGHT_ULTRABOLD = 800;
+ PANGO_WEIGHT_HEAVY = 900;
+
+ //values for TPangoStretch
+ PANGO_STRETCH_ULTRA_CONDENSED = 0;
+ PANGO_STRETCH_EXTRA_CONDENSED = 1;
+ PANGO_STRETCH_CONDENSED = 2;
+ PANGO_STRETCH_SEMI_CONDENSED = 3;
+ PANGO_STRETCH_NORMAL = 4;
+ PANGO_STRETCH_SEMI_EXPANDED = 5;
+ PANGO_STRETCH_EXPANDED = 6;
+ PANGO_STRETCH_EXTRA_EXPANDED = 7;
+ PANGO_STRETCH_ULTRA_EXPANDED = 8;
+
+
+ // values for TPangoFontMask
+ PANGO_FONT_MASK_FAMILY = 1 shl 0;
+ PANGO_FONT_MASK_STYLE = 1 shl 1;
+ PANGO_FONT_MASK_VARIANT = 1 shl 2;
+ PANGO_FONT_MASK_WEIGHT = 1 shl 3;
+ PANGO_FONT_MASK_STRETCH = 1 shl 4;
+ PANGO_FONT_MASK_SIZE = 1 shl 5;
+
+{ CSS scale factors (1.2 factor between each size) }
+ PANGO_SCALE_XX_SMALL = 0.5787037037037;
+ PANGO_SCALE_X_SMALL = 0.6444444444444;
+ PANGO_SCALE_SMALL = 0.8333333333333;
+ PANGO_SCALE_MEDIUM = 1.0;
+ PANGO_SCALE_LARGE = 1.2;
+ PANGO_SCALE_X_LARGE = 1.4399999999999;
+ PANGO_SCALE_XX_LARGE = 1.728;
+
+ {
+ PangoFontDescription
+ }
+
+function PANGO_TYPE_FONT_DESCRIPTION : GType;
+function pango_font_description_get_type:GType; cdecl; external pangolib;
+function pango_font_description_new:PPangoFontDescription; cdecl; external pangolib;
+function pango_font_description_copy(desc:PPangoFontDescription):PPangoFontDescription; cdecl; external pangolib;
+function pango_font_description_copy_static(desc:PPangoFontDescription):PPangoFontDescription; cdecl; external pangolib;
+function pango_font_description_hash(desc:PPangoFontDescription):guint; cdecl; external pangolib;
+function pango_font_description_equal(desc1:PPangoFontDescription; desc2:PPangoFontDescription):gboolean; cdecl; external pangolib;
+procedure pango_font_description_free(desc:PPangoFontDescription); cdecl; external pangolib;
+procedure pango_font_descriptions_free(var descs:PPangoFontDescription; n_descs:longint); cdecl; external pangolib;
+procedure pango_font_description_set_family(desc:PPangoFontDescription; family:Pchar); cdecl; external pangolib;
+procedure pango_font_description_set_family_static(desc:PPangoFontDescription; family:Pchar); cdecl; external pangolib;
+function pango_font_description_get_family(desc:PPangoFontDescription):Pchar; cdecl; external pangolib;
+procedure pango_font_description_set_style(desc:PPangoFontDescription; style:TPangoStyle); cdecl; external pangolib;
+function pango_font_description_get_style(desc:PPangoFontDescription):TPangoStyle; cdecl; external pangolib;
+procedure pango_font_description_set_variant(desc:PPangoFontDescription; variant:TPangoVariant); cdecl; external pangolib;
+function pango_font_description_get_variant(desc:PPangoFontDescription):TPangoVariant; cdecl; external pangolib;
+procedure pango_font_description_set_weight(desc:PPangoFontDescription; weight:TPangoWeight); cdecl; external pangolib;
+function pango_font_description_get_weight(desc:PPangoFontDescription):TPangoWeight; cdecl; external pangolib;
+procedure pango_font_description_set_stretch(desc:PPangoFontDescription; stretch:TPangoStretch); cdecl; external pangolib;
+function pango_font_description_get_stretch(desc:PPangoFontDescription):TPangoStretch; cdecl; external pangolib;
+procedure pango_font_description_set_size(desc:PPangoFontDescription; size:gint); cdecl; external pangolib;
+function pango_font_description_get_size(desc:PPangoFontDescription):gint; cdecl; external pangolib;
+procedure pango_font_description_set_absolute_size(desc:PPangoFontDescription;size:double); cdecl; external pangolib;
+function pango_font_description_get_size_is_absolute (desc:PPangoFontDescription):gboolean; cdecl; external pangolib;
+function pango_font_description_get_set_fields(desc:PPangoFontDescription):TPangoFontMask; cdecl; external pangolib;
+procedure pango_font_description_unset_fields(desc:PPangoFontDescription; to_unset:TPangoFontMask); cdecl; external pangolib;
+procedure pango_font_description_merge(desc:PPangoFontDescription; desc_to_merge:PPangoFontDescription; replace_existing:gboolean); cdecl; external pangolib;
+procedure pango_font_description_merge_static(desc:PPangoFontDescription; desc_to_merge:PPangoFontDescription; replace_existing:gboolean); cdecl; external pangolib;
+function pango_font_description_better_match(desc:PPangoFontDescription; old_match:PPangoFontDescription; new_match:PPangoFontDescription):gboolean; cdecl; external pangolib;
+function pango_font_description_from_string(str:Pchar):PPangoFontDescription; cdecl; external pangolib;
+function pango_font_description_to_string(desc:PPangoFontDescription):Pchar; cdecl; external pangolib;
+function pango_font_description_to_filename(desc:PPangoFontDescription):Pchar; cdecl; external pangolib;
+{
+ PangoFontMetrics
+}
+function PANGO_TYPE_FONT_METRICS:GType;
+function pango_font_metrics_get_type:GType; cdecl; external pangolib;
+function pango_font_metrics_ref(metrics:PPangoFontMetrics):PPangoFontMetrics; cdecl; external pangolib;
+procedure pango_font_metrics_unref(metrics:PPangoFontMetrics); cdecl; external pangolib;
+function pango_font_metrics_get_ascent(metrics:PPangoFontMetrics):longint; cdecl; external pangolib;
+function pango_font_metrics_get_descent(metrics:PPangoFontMetrics):longint; cdecl; external pangolib;
+function pango_font_metrics_get_approximate_char_width(metrics:PPangoFontMetrics):longint; cdecl; external pangolib;
+function pango_font_metrics_get_approximate_digit_width(metrics:PPangoFontMetrics):longint; cdecl; external pangolib;
+
+
+{$ifdef PANGO_ENABLE_BACKEND}
+
+function pango_font_metrics_new:PPangoFontMetrics; cdecl; external pangolib;
+
+{$endif PANGO_ENABLE_BACKEND}
+{ PANGO_ENABLE_BACKEND }
+{
+ PangoFontFamily
+}
+
+function PANGO_TYPE_FONT_FAMILY: GType;
+function PANGO_FONT_FAMILY(anObject: Pointer): PPangoFontFamily;
+function PANGO_IS_FONT_FAMILY(anObject : Pointer) : boolean;
+
+function pango_font_family_get_type:GType; cdecl; external pangolib;
+procedure pango_font_family_list_faces(family:PPangoFontFamily;
+ faces:PPPPangoFontFace; n_faces:Plongint); cdecl; external pangolib;
+function pango_font_family_get_name(family:PPangoFontFamily):Pchar; cdecl; external pangolib;
+
+{$ifdef PANGO_ENABLE_BACKEND}
+function PANGO_FONT_FAMILY_CLASS(klass : pointer) : PPangoFontFamilyClass;
+function PANGO_IS_FONT_FAMILY_CLASS(klass : pointer) : boolean;
+function PANGO_FONT_FAMILY_GET_CLASS(obj : PPangoFontFamily) : PPangoFontFamilyClass;
+{$endif}
+{ PANGO_ENABLE_BACKEND }
+
+
+{
+ PangoFontFace
+}
+function PANGO_TYPE_FONT_FACE : GType;
+function PANGO_FONT_FACE(anObject : pointer) : PPangoFontFace;
+function PANGO_IS_FONT_FACE(anObject : pointer) : boolean;
+
+function pango_font_face_get_type:GType; cdecl; external pangolib;
+function pango_font_face_describe(face:PPangoFontFace):PPangoFontDescription; cdecl; external pangolib;
+function pango_font_face_get_face_name(face:PPangoFontFace):Pchar; cdecl; external pangolib;
+{$ifdef PANGO_ENABLE_BACKEND}
+function PANGO_FONT_FACE_CLASS(klass : pointer) : PPangoFontFaceClass;
+function PANGO_IS_FONT_FACE_CLASS(klass : pointer) : boolean;
+function PANGO_FONT_FACE_GET_CLASS(obj : pointer) : PPangoFontFaceClass;
+{$endif}
+{ PANGO_ENABLE_BACKEND }
+
+{
+ PangoFont
+}
+function PANGO_TYPE_FONT : GType;
+function PANGO_FONT(anObject : pointer) : PPangoFont;
+function PANGO_IS_FONT(anObject : pointer) : boolean;
+
+function pango_font_get_type:GType; cdecl; external pangolib;
+function pango_font_describe(font:PPangoFont):PPangoFontDescription; cdecl; external pangolib;
+function pango_font_get_coverage(font:PPangoFont; language:PPangoLanguage):PPangoCoverage; cdecl; external pangolib;
+function pango_font_find_shaper(font:PPangoFont; language:PPangoLanguage; ch:guint32):PPangoEngineShape; cdecl; external pangolib;
+function pango_font_get_metrics(font:PPangoFont; language:PPangoLanguage):PPangoFontMetrics; cdecl; external pangolib;
+procedure pango_font_get_glyph_extents(font:PPangoFont; glyph:TPangoGlyph; ink_rect:PPangoRectangle; logical_rect:PPangoRectangle); cdecl; external pangolib;
+
+{$ifdef PANGO_ENABLE_BACKEND}
+function PANGO_FONT_CLASS(klass : pointer) : PPangoFontClass;
+function PANGO_IS_FONT_CLASS(klass : pointer) : boolean;
+function PANGO_FONT_GET_CLASS(obj : PPangoFont) : PPangoFontClass;
+{$endif}
+{ PANGO_ENABLE_BACKEND }
+
+{$ENDIF read_interface_functions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+
+function PANGO_TYPE_FONT_DESCRIPTION : GType;
+begin
+ PANGO_TYPE_FONT_DESCRIPTION:=pango_font_description_get_type;
+end;
+
+function PANGO_TYPE_FONT_METRICS : GType;
+begin
+ PANGO_TYPE_FONT_METRICS:=pango_font_metrics_get_type;
+end;
+
+function PANGO_TYPE_FONT_FAMILY : GType;
+begin
+ PANGO_TYPE_FONT_FAMILY:=pango_font_family_get_type;
+end;
+
+function PANGO_FONT_FAMILY(anObject : pointer) : PPangoFontFamily;
+begin
+ PANGO_FONT_FAMILY:=PPangoFontFamily(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ PANGO_TYPE_FONT_FAMILY));
+end;
+
+function PANGO_IS_FONT_FAMILY(anObject : Pointer) : boolean;
+begin
+ PANGO_IS_FONT_FAMILY:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,
+ PANGO_TYPE_FONT_FAMILY);
+end;
+
+function PANGO_FONT_FAMILY_CLASS(klass : Pointer) : PPangoFontFamilyClass;
+begin
+ PANGO_FONT_FAMILY_CLASS:=PPangoFontFamilyClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ PANGO_TYPE_FONT_FAMILY));
+end;
+
+function PANGO_IS_FONT_FAMILY_CLASS(klass : Pointer) : boolean;
+begin
+ PANGO_IS_FONT_FAMILY_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,
+ PANGO_TYPE_FONT_FAMILY);
+end;
+
+function PANGO_FONT_FAMILY_GET_CLASS(obj : PPangoFontFamily) : PPangoFontFamilyClass;
+begin
+ PANGO_FONT_FAMILY_GET_CLASS:=PPangoFontFamilyClass(G_TYPE_INSTANCE_GET_CLASS(
+ obj,PANGO_TYPE_FONT_FAMILY));
+end;
+
+function PANGO_TYPE_FONT_FACE : GType;
+begin
+ PANGO_TYPE_FONT_FACE:=pango_font_face_get_type;
+end;
+
+function PANGO_FONT_FACE(anObject : Pointer) : PPangoFontFace;
+begin
+ PANGO_FONT_FACE:=PPangoFontFace(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ PANGO_TYPE_FONT_FACE));
+end;
+
+function PANGO_IS_FONT_FACE(anObject : Pointer) : boolean;
+begin
+ PANGO_IS_FONT_FACE:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,PANGO_TYPE_FONT_FACE);
+end;
+
+function PANGO_FONT_FACE_CLASS(klass : Pointer) : PPangoFontFaceClass;
+begin
+ PANGO_FONT_FACE_CLASS:=PPangoFontFaceClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ PANGO_TYPE_FONT_FACE));
+end;
+
+function PANGO_IS_FONT_FACE_CLASS(klass : Pointer) : boolean;
+begin
+ PANGO_IS_FONT_FACE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,PANGO_TYPE_FONT_FACE);
+end;
+
+function PANGO_FONT_FACE_GET_CLASS(obj : Pointer) : PPangoFontFaceClass;
+begin
+ PANGO_FONT_FACE_GET_CLASS:=PPangoFontFaceClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ PANGO_TYPE_FONT_FACE));
+end;
+
+function PANGO_TYPE_FONT : GType;
+begin
+ PANGO_TYPE_FONT:=pango_font_get_type;
+end;
+
+function PANGO_FONT(anObject : Pointer) : PPangoFont;
+begin
+ PANGO_FONT:=PPangoFont(G_TYPE_CHECK_INSTANCE_CAST(anObject,PANGO_TYPE_FONT));
+end;
+
+function PANGO_IS_FONT(anObject : Pointer) : boolean;
+begin
+ PANGO_IS_FONT:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,PANGO_TYPE_FONT);
+end;
+
+function PANGO_FONT_CLASS(klass : Pointer) : PPangoFontClass;
+begin
+ PANGO_FONT_CLASS:=PPangoFontClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ PANGO_TYPE_FONT));
+end;
+
+function PANGO_IS_FONT_CLASS(klass : Pointer) : boolean;
+begin
+ PANGO_IS_FONT_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,PANGO_TYPE_FONT);
+end;
+
+function PANGO_FONT_GET_CLASS(obj : PPangoFont) : PPangoFontClass;
+begin
+ PANGO_FONT_GET_CLASS:=PPangoFontClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ PANGO_TYPE_FONT));
+end;
+
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/pango/pango-fontmap.inc b/packages/gtk2/src/pango/pango-fontmap.inc
new file mode 100644
index 0000000000..7c9fff260e
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-fontmap.inc
@@ -0,0 +1,94 @@
+// included by pango.pp
+{$IFDEF read_interface_types}
+
+{$IFDEF PANGO_ENABLE_BACKEND}
+ PPangoFontMap = ^TPangoFontMap;
+ TPangoFontMap = record
+ parent_instance : TGObject;
+ end;
+
+{ Padding for future expansion }
+ TPangoFontMapClassLoadFont =
+ function (fontmap:PPangoFontMap; context:PPangoContext;
+ desc:PPangoFontDescription):PPangoFont; cdecl;
+ TPangoFontMapClassListFamilies =
+ procedure (fontmap:PPangoFontMap; families:PPPPangoFontFamily;
+ n_families:Plongint); cdecl;
+ TPangoFontMapClassFontSet =
+ function (fontmap:PPangoFontMap; context:PPangoContext;
+ desc:PPangoFontDescription;
+ language:PPangoLanguage):PPangoFontset; cdecl;
+
+ PPangoFontMapClass = ^TPangoFontMapClass;
+ TPangoFontMapClass = record
+ parent_class : TGObjectClass;
+ load_font : TPangoFontMapClassLoadFont;
+ list_families : TPangoFontMapClassListFamilies;
+ load_fontset : TPangoFontMapClassFontSet;
+ _pango_reserved1 : procedure ; cdecl;
+ _pango_reserved2 : procedure ; cdecl;
+ _pango_reserved3 : procedure ; cdecl;
+ _pango_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF}
+
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+function PANGO_TYPE_FONT_MAP : GType;
+function PANGO_FONT_MAP(anObject : pointer) : PPangoFontMap;
+function PANGO_IS_FONT_MAP(anObject : pointer) : boolean;
+
+function pango_font_map_get_type:GType; cdecl; external pangolib;
+function pango_font_map_load_font(fontmap:PPangoFontMap; context:PPangoContext; desc:PPangoFontDescription):PPangoFont; cdecl; external pangolib;
+function pango_font_map_load_fontset(fontmap:PPangoFontMap; context:PPangoContext; desc:PPangoFontDescription; language:PPangoLanguage):PPangoFontset; cdecl; external pangolib;
+procedure pango_font_map_list_families(fontmap:PPangoFontMap; families:PPPPangoFontFamily; n_families:Plongint); cdecl; external pangolib;
+
+{$ifdef PANGO_ENABLE_BACKEND}
+function PANGO_FONT_MAP_CLASS(klass : pointer) : PPangoFontMapClass;
+function PANGO_IS_FONT_MAP_CLASS(klass : pointer) : boolean;
+function PANGO_FONT_MAP_GET_CLASS(obj : PPangoFontMap) : PPangoFontMapClass;
+{$endif}
+{ PANGO_ENABLE_BACKEND }
+{$endif read_interface_functions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function PANGO_TYPE_FONT_MAP : GType;
+begin
+ PANGO_TYPE_FONT_MAP:=pango_font_map_get_type;
+end;
+
+function PANGO_FONT_MAP(anObject : pointer) : PPangoFontmap;
+begin
+ PANGO_FONT_MAP:=PPangoFontmap(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ PANGO_TYPE_FONT_MAP));
+end;
+
+function PANGO_IS_FONT_MAP(anObject : pointer) : boolean;
+begin
+ PANGO_IS_FONT_MAP:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,PANGO_TYPE_FONT_MAP);
+end;
+
+function PANGO_FONT_MAP_CLASS(klass : pointer) : PPangoFontMapClass;
+begin
+ PANGO_FONT_MAP_CLASS:=PPangoFontMapClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ PANGO_TYPE_FONT_MAP));
+end;
+
+function PANGO_IS_FONT_MAP_CLASS(klass : pointer) : boolean;
+begin
+ PANGO_IS_FONT_MAP_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,PANGO_TYPE_FONT_MAP);
+end;
+
+function PANGO_FONT_MAP_GET_CLASS(obj : PPangoFontMap) : PPangoFontMapClass;
+begin
+ PANGO_FONT_MAP_GET_CLASS:=PPangoFontMapClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ PANGO_TYPE_FONT_MAP));
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/pango/pango-fontset.inc b/packages/gtk2/src/pango/pango-fontset.inc
new file mode 100644
index 0000000000..ea13d7d2ae
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-fontset.inc
@@ -0,0 +1,114 @@
+// included by pango.pp
+{$IFDEF read_interface_types}
+
+{$IFDEF PANGO_ENABLE_BACKEND}
+ PPangoFontset = ^TPangoFontset;
+ TPangoFontset = record
+ parent_instance : TGObject;
+ end;
+
+{ Padding for future expansion }
+ PPangoFontsetClass = ^TPangoFontsetClass;
+ TPangoFontsetClass = record
+ parent_class : TGObjectClass;
+ get_font : function (fontset:PPangoFontset; wc:guint):PPangoFont; cdecl;
+ get_metrics : function (fontset:PPangoFontset):PPangoFontMetrics; cdecl;
+ get_language : function (fontset:PPangoFontset):PPangoLanguage; cdecl;
+ _pango_reserved1 : procedure ; cdecl;
+ _pango_reserved2 : procedure ; cdecl;
+ _pango_reserved3 : procedure ; cdecl;
+ _pango_reserved4 : procedure ; cdecl;
+ end;
+{$ENDIF}
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+{
+ PangoFontset
+}
+function PANGO_TYPE_FONTSET : GType;
+function PANGO_FONTSET(anObject : pointer) : PPangoFontset;
+function PANGO_IS_FONTSET(anObject : pointer) : boolean;
+function pango_fontset_get_type:GType; cdecl; external pangolib;
+
+function pango_fontset_get_font(fontset:PPangoFontset; wc:guint):PPangoFont; cdecl; external pangolib;
+function pango_fontset_get_metrics(fontset:PPangoFontset):PPangoFontMetrics; cdecl; external pangolib;
+
+{$ifdef PANGO_ENABLE_BACKEND}
+function PANGO_FONTSET_CLASS(klass : pointer) : PPangoFontsetClass;
+function PANGO_IS_FONTSET_CLASS(klass : pointer) : boolean;
+function PANGO_FONTSET_GET_CLASS(obj : PPangoFontset) : PPangoFontsetClass;
+
+{
+ PangoFontsetSimple
+}
+
+function PANGO_TYPE_FONTSET_SIMPLE : GType;
+function PANGO_FONTSET_SIMPLE(anObject : pointer) : PPangoFontsetSimple;
+function PANGO_IS_FONTSET_SIMPLE(anObject : pointer) : boolean;
+
+function pango_fontset_simple_get_type:GType; cdecl; external pangolib;
+function pango_fontset_simple_new(language:PPangoLanguage):PPangoFontsetSimple; cdecl; external pangolib;
+procedure pango_fontset_simple_append(fontset:PPangoFontsetSimple; font:PPangoFont); cdecl; external pangolib;
+function pango_fontset_simple_size(fontset:PPangoFontsetSimple):longint; cdecl; external pangolib;
+{$endif}
+{ PANGO_ENABLE_BACKEND }
+{$endif read_interface_functions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function PANGO_TYPE_FONTSET : GType;
+begin
+ PANGO_TYPE_FONTSET:=pango_fontset_get_type;
+end;
+
+function PANGO_FONTSET(anObject : pointer) : PPangoFontset;
+begin
+ PANGO_FONTSET:=PPangoFontset(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ PANGO_TYPE_FONTSET));
+end;
+
+function PANGO_IS_FONTSET(anObject : pointer) : boolean;
+begin
+ PANGO_IS_FONTSET:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,PANGO_TYPE_FONTSET);
+end;
+
+function PANGO_FONTSET_CLASS(klass : pointer) : PPangoFontsetClass;
+begin
+ PANGO_FONTSET_CLASS:=PPangoFontsetClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ PANGO_TYPE_FONTSET));
+end;
+
+function PANGO_IS_FONTSET_CLASS(klass : pointer) : boolean;
+begin
+ PANGO_IS_FONTSET_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,PANGO_TYPE_FONTSET);
+end;
+
+function PANGO_FONTSET_GET_CLASS(obj : PPangoFontset) : PPangoFontsetClass;
+begin
+ PANGO_FONTSET_GET_CLASS:=PPangoFontsetClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ PANGO_TYPE_FONTSET));
+end;
+
+function PANGO_TYPE_FONTSET_SIMPLE : GType;
+begin
+ PANGO_TYPE_FONTSET_SIMPLE:=pango_fontset_simple_get_type;
+end;
+
+function PANGO_FONTSET_SIMPLE(anObject : pointer) : PPangoFontsetSimple;
+begin
+ PANGO_FONTSET_SIMPLE:=PPangoFontsetSimple(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ PANGO_TYPE_FONTSET_SIMPLE));
+end;
+
+function PANGO_IS_FONTSET_SIMPLE(anObject : pointer) : boolean;
+begin
+ PANGO_IS_FONTSET_SIMPLE:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,
+ PANGO_TYPE_FONTSET_SIMPLE);
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/pango/pango-glyph.inc b/packages/gtk2/src/pango/pango-glyph.inc
new file mode 100644
index 0000000000..bcf2e48f1a
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-glyph.inc
@@ -0,0 +1,105 @@
+// included by pango.pp
+{$IFDEF read_forward_definitions}
+ PPangoGlyphString = ^TPangoGlyphString;
+{$ENDIF read_forward_definitions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_types}
+ { 1000ths of a device unit }
+ PPangoGlyphUnit = ^TPangoGlyphUnit;
+ TPangoGlyphUnit = gint32;
+
+ { Positioning information about a glyph }
+ PPangoGlyphGeometry = ^TPangoGlyphGeometry;
+ TPangoGlyphGeometry = record
+ width : TPangoGlyphUnit;
+ x_offset : TPangoGlyphUnit;
+ y_offset : TPangoGlyphUnit;
+ end;
+
+ { Visual attributes of a glyph }
+ PPangoGlyphVisAttr = ^TPangoGlyphVisAttr;
+ TPangoGlyphVisAttr = record
+ flag0 : word;
+ end;
+
+{ A single glyph }
+ PPangoGlyphInfo = ^TPangoGlyphInfo;
+ TPangoGlyphInfo = record
+ glyph : TPangoGlyph;
+ geometry : TPangoGlyphGeometry;
+ attr : TPangoGlyphVisAttr;
+ end;
+
+{ A string of glyphs with positional information and visual attributes -
+ ready for drawing
+ }
+{ This is a memory inefficient way of representing the information
+ here - each value gives the byte index within the text
+ corresponding to the glyph string of the start of the cluster to
+ which the glyph belongs.
+ }
+{< private > }
+ TPangoGlyphString = record
+ num_glyphs : gint;
+ glyphs : PPangoGlyphInfo;
+ log_clusters : Pgint;
+ space : gint;
+ end;
+
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+const
+ bm_TPangoGlyphVisAttr_is_cluster_start = $1;
+ bp_TPangoGlyphVisAttr_is_cluster_start = 0;
+
+function is_cluster_start(var a : TPangoGlyphVisAttr) : guint;
+procedure set_is_cluster_start(var a : TPangoGlyphVisAttr; __is_cluster_start : guint);
+
+function PANGO_TYPE_GLYPH_STRING : GType;
+function pango_glyph_string_new:PPangoGlyphString; cdecl; external pangolib;
+procedure pango_glyph_string_set_size(_string:PPangoGlyphString; new_len:gint); cdecl; external pangolib;
+function pango_glyph_string_get_type:GType; cdecl; external pangolib;
+function pango_glyph_string_copy(_string:PPangoGlyphString):PPangoGlyphString; cdecl; external pangolib;
+procedure pango_glyph_string_free(_string:PPangoGlyphString); cdecl; external pangolib;
+procedure pango_glyph_string_extents(glyphs:PPangoGlyphString; font:PPangoFont; ink_rect:PPangoRectangle; logical_rect:PPangoRectangle); cdecl; external pangolib;
+procedure pango_glyph_string_extents_range(glyphs:PPangoGlyphString; start:longint; theEnd:longint; font:PPangoFont; ink_rect:PPangoRectangle;
+ logical_rect:PPangoRectangle); cdecl; external pangolib;
+procedure pango_glyph_string_get_logical_widths(glyphs:PPangoGlyphString; text:Pchar; length:longint; embedding_level:longint; logical_widths:Plongint); cdecl; external pangolib;
+procedure pango_glyph_string_index_to_x(glyphs:PPangoGlyphString; text:Pchar; length:longint; analysis:PPangoAnalysis; index:longint;
+ trailing:gboolean; x_pos:Plongint); cdecl; external pangolib;
+procedure pango_glyph_string_x_to_index(glyphs:PPangoGlyphString; text:Pchar; length:longint; analysis:PPangoAnalysis; x_pos:longint;
+ index:Plongint; trailing:Plongint); cdecl; external pangolib;
+{ Turn a string of characters into a string of glyphs
+ }
+procedure pango_shape(text:Pgchar; length:gint; analysis:PPangoAnalysis; glyphs:PPangoGlyphString); cdecl; external pangolib;
+function pango_reorder_items(logical_items:PGList):PGList; cdecl; external pangolib;
+{$endif read_interface_functions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function is_cluster_start(var a : TPangoGlyphVisAttr) : guint;
+begin
+ is_cluster_start:=(a.flag0 and bm_TPangoGlyphVisAttr_is_cluster_start)
+ shr bp_TPangoGlyphVisAttr_is_cluster_start;
+end;
+
+procedure set_is_cluster_start(var a : TPangoGlyphVisAttr;
+ __is_cluster_start : guint);
+begin
+ a.flag0:=a.flag0
+ or ((__is_cluster_start shl bp_TPangoGlyphVisAttr_is_cluster_start)
+ and bm_TPangoGlyphVisAttr_is_cluster_start);
+end;
+
+function PANGO_TYPE_GLYPH_STRING : GType;
+begin
+ PANGO_TYPE_GLYPH_STRING:=pango_glyph_string_get_type;
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/pango/pango-item.inc b/packages/gtk2/src/pango/pango-item.inc
new file mode 100644
index 0000000000..d47f8775d4
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-item.inc
@@ -0,0 +1,34 @@
+// included by pango.pp
+{$IFDEF read_forward_definitions}
+ PPangoAnalysis = ^TPangoAnalysis;
+ PPangoItem = ^TPangoItem;
+{$ENDIF read_forward_definitions}
+
+{$IFDEF read_interface_types}
+ TPangoAnalysis = record
+ shape_engine : PPangoEngineShape;
+ lang_engine : PPangoEngineLang;
+ font : PPangoFont;
+ level : guint8;
+ language : PPangoLanguage;
+ extra_attrs : PGSList;
+ end;
+
+ TPangoItem = record
+ offset : gint;
+ length : gint;
+ num_chars : gint;
+ analysis : TPangoAnalysis;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+function pango_item_new:PPangoItem; cdecl; external pangolib;
+function pango_item_copy(item:PPangoItem):PPangoItem; cdecl; external pangolib;
+procedure pango_item_free(item:PPangoItem); cdecl; external pangolib;
+function pango_item_split(orig:PPangoItem; split_index:longint; split_offset:longint):PPangoItem; cdecl; external pangolib;
+{$endif read_interface_functions}
+
+
diff --git a/packages/gtk2/src/pango/pango-layout.inc b/packages/gtk2/src/pango/pango-layout.inc
new file mode 100644
index 0000000000..f388808f02
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-layout.inc
@@ -0,0 +1,152 @@
+// included by pango.pp
+{$IFDEF read_interface_types}
+ PPangoAlignment = ^TPangoAlignment;
+ TPangoAlignment = (
+ PANGO_ALIGN_LEFT,
+ PANGO_ALIGN_CENTER,
+ PANGO_ALIGN_RIGHT
+ );
+
+ PPangoWrapMode = ^TPangoWrapMode;
+ TPangoWrapMode = (PANGO_WRAP_WORD,PANGO_WRAP_CHAR);
+
+ { start of line as byte index into layout->text }
+ { length of line in bytes }
+ PPangoLayoutLine = ^TPangoLayoutLine;
+ TPangoLayoutLine = record
+ layout : PPangoLayout;
+ start_index : gint;
+ length : gint;
+ runs : PGSList;
+ end;
+
+ PPangoLayoutRun = ^TPangoLayoutRun;
+ TPangoLayoutRun = record
+ item : PPangoItem;
+ glyphs : PPangoGlyphString;
+ end;
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+function PANGO_TYPE_LAYOUT : GType;
+function PANGO_LAYOUT(anObject : pointer) : PPangoLayout;
+function PANGO_LAYOUT_CLASS(klass : pointer) : PPangoLayoutClass;
+function PANGO_IS_LAYOUT(anObject : pointer) : boolean;
+function PANGO_IS_LAYOUT_CLASS(klass : pointer) : boolean;
+function PANGO_LAYOUT_GET_CLASS(obj : PPangoLayout) : PPangoLayoutClass;
+
+{ The PangoLayout and PangoLayoutClass structs are private; if you
+ need to create a subclass of these, mail otaylor@redhat.com
+ }
+function pango_layout_get_type:GType; cdecl; external pangolib;
+function pango_layout_new(context:PPangoContext):PPangoLayout; cdecl; external pangolib;
+function pango_layout_copy(src:PPangoLayout):PPangoLayout; cdecl; external pangolib;
+function pango_layout_get_context(layout:PPangoLayout):PPangoContext; cdecl; external pangolib;
+procedure pango_layout_set_attributes(layout:PPangoLayout; attrs:PPangoAttrList); cdecl; external pangolib;
+function pango_layout_get_attributes(layout:PPangoLayout):PPangoAttrList; cdecl; external pangolib;
+procedure pango_layout_set_text(layout:PPangoLayout; text:Pchar; length:longint); cdecl; external pangolib;
+function pango_layout_get_text(layout:PPangoLayout):Pchar; cdecl; external pangolib;
+procedure pango_layout_set_markup(layout:PPangoLayout; markup:Pchar; length:longint); cdecl; external pangolib;
+procedure pango_layout_set_markup_with_accel(layout:PPangoLayout; markup:Pchar; length:longint; accel_marker:gunichar; accel_char:Pgunichar); cdecl; external pangolib;
+function pango_layout_get_font_description(layout:PPangoLayout):PPangoFontDescription; cdecl; external pangolib;
+procedure pango_layout_set_font_description(layout:PPangoLayout; desc:PPangoFontDescription); cdecl; external pangolib;
+procedure pango_layout_set_width(layout:PPangoLayout; width:longint); cdecl; external pangolib;
+function pango_layout_get_width(layout:PPangoLayout):longint; cdecl; external pangolib;
+procedure pango_layout_set_wrap(layout:PPangoLayout; wrap:TPangoWrapMode); cdecl; external pangolib;
+function pango_layout_get_wrap(layout:PPangoLayout):TPangoWrapMode; cdecl; external pangolib;
+procedure pango_layout_set_indent(layout:PPangoLayout; indent:longint); cdecl; external pangolib;
+function pango_layout_get_indent(layout:PPangoLayout):longint; cdecl; external pangolib;
+procedure pango_layout_set_spacing(layout:PPangoLayout; spacing:longint); cdecl; external pangolib;
+function pango_layout_get_spacing(layout:PPangoLayout):longint; cdecl; external pangolib;
+procedure pango_layout_set_justify(layout:PPangoLayout; justify:gboolean); cdecl; external pangolib;
+function pango_layout_get_justify(layout:PPangoLayout):gboolean; cdecl; external pangolib;
+procedure pango_layout_set_alignment(layout:PPangoLayout; alignment:TPangoAlignment); cdecl; external pangolib;
+function pango_layout_get_alignment(layout:PPangoLayout):TPangoAlignment; cdecl; external pangolib;
+procedure pango_layout_set_tabs(layout:PPangoLayout; tabs:PPangoTabArray); cdecl; external pangolib;
+function pango_layout_get_tabs(layout:PPangoLayout):PPangoTabArray; cdecl; external pangolib;
+procedure pango_layout_set_single_paragraph_mode(layout:PPangoLayout; setting:gboolean); cdecl; external pangolib;
+function pango_layout_get_single_paragraph_mode(layout:PPangoLayout):gboolean; cdecl; external pangolib;
+procedure pango_layout_context_changed(layout:PPangoLayout); cdecl; external pangolib;
+procedure pango_layout_get_log_attrs(layout:PPangoLayout; var attrs:PPangoLogAttr; n_attrs:Pgint); cdecl; external pangolib;
+procedure pango_layout_index_to_pos(layout:PPangoLayout; index:longint; pos:PPangoRectangle); cdecl; external pangolib;
+procedure pango_layout_get_cursor_pos(layout:PPangoLayout; index:longint; strong_pos:PPangoRectangle; weak_pos:PPangoRectangle); cdecl; external pangolib;
+procedure pango_layout_move_cursor_visually(layout:PPangoLayout; strong:gboolean; old_index:longint; old_trailing:longint; direction:longint;
+ new_index:Plongint; new_trailing:Plongint); cdecl; external pangolib;
+function pango_layout_xy_to_index(layout:PPangoLayout; x:longint; y:longint; index:Plongint; trailing:Plongint):gboolean; cdecl; external pangolib;
+procedure pango_layout_get_extents(layout:PPangoLayout; ink_rect:PPangoRectangle; logical_rect:PPangoRectangle); cdecl; external pangolib;
+procedure pango_layout_get_pixel_extents(layout:PPangoLayout; ink_rect:PPangoRectangle; logical_rect:PPangoRectangle); cdecl; external pangolib;
+procedure pango_layout_get_size(layout:PPangoLayout; width:Plongint; height:Plongint); cdecl; external pangolib;
+procedure pango_layout_get_pixel_size(layout:PPangoLayout; width:Plongint; height:Plongint); cdecl; external pangolib;
+function pango_layout_get_line_count(layout:PPangoLayout):longint; cdecl; external pangolib;
+function pango_layout_get_line(layout:PPangoLayout; line:longint):PPangoLayoutLine; cdecl; external pangolib;
+function pango_layout_get_lines(layout:PPangoLayout):PGSList; cdecl; external pangolib;
+procedure pango_layout_line_ref(line:PPangoLayoutLine); cdecl; external pangolib;
+procedure pango_layout_line_unref(line:PPangoLayoutLine); cdecl; external pangolib;
+function pango_layout_line_x_to_index(line:PPangoLayoutLine; x_pos:longint; index:Plongint; trailing:Plongint):gboolean; cdecl; external pangolib;
+procedure pango_layout_line_index_to_x(line:PPangoLayoutLine; index:longint; trailing:gboolean; x_pos:Plongint); cdecl; external pangolib;
+procedure pango_layout_line_get_x_ranges(line:PPangoLayoutLine; start_index:longint; end_index:longint; var ranges:Plongint; n_ranges:Plongint); cdecl; external pangolib;
+procedure pango_layout_line_get_extents(line:PPangoLayoutLine; ink_rect:PPangoRectangle; logical_rect:PPangoRectangle); cdecl; external pangolib;
+procedure pango_layout_line_get_pixel_extents(layout_line:PPangoLayoutLine; ink_rect:PPangoRectangle; logical_rect:PPangoRectangle); cdecl; external pangolib;
+
+function pango_layout_get_iter(layout:PPangoLayout):PPangoLayoutIter; cdecl; external pangolib;
+procedure pango_layout_iter_free(iter:PPangoLayoutIter); cdecl; external pangolib;
+function pango_layout_iter_get_index(iter:PPangoLayoutIter):longint; cdecl; external pangolib;
+function pango_layout_iter_get_run(iter:PPangoLayoutIter):PPangoLayoutRun; cdecl; external pangolib;
+function pango_layout_iter_get_line(iter:PPangoLayoutIter):PPangoLayoutLine; cdecl; external pangolib;
+function pango_layout_iter_at_last_line(iter:PPangoLayoutIter):gboolean; cdecl; external pangolib;
+function pango_layout_iter_next_char(iter:PPangoLayoutIter):gboolean; cdecl; external pangolib;
+function pango_layout_iter_next_cluster(iter:PPangoLayoutIter):gboolean; cdecl; external pangolib;
+function pango_layout_iter_next_run(iter:PPangoLayoutIter):gboolean; cdecl; external pangolib;
+function pango_layout_iter_next_line(iter:PPangoLayoutIter):gboolean; cdecl; external pangolib;
+procedure pango_layout_iter_get_char_extents(iter:PPangoLayoutIter; logical_rect:PPangoRectangle); cdecl; external pangolib;
+procedure pango_layout_iter_get_cluster_extents(iter:PPangoLayoutIter; ink_rect:PPangoRectangle; logical_rect:PPangoRectangle); cdecl; external pangolib;
+procedure pango_layout_iter_get_run_extents(iter:PPangoLayoutIter; ink_rect:PPangoRectangle; logical_rect:PPangoRectangle); cdecl; external pangolib;
+procedure pango_layout_iter_get_line_extents(iter:PPangoLayoutIter; ink_rect:PPangoRectangle; logical_rect:PPangoRectangle); cdecl; external pangolib;
+
+{ All the yranges meet, unlike the logical_rect's (i.e. the yranges
+ assign between-line spacing to the nearest line)
+ }
+procedure pango_layout_iter_get_line_yrange(iter:PPangoLayoutIter; y0:Plongint; y1:Plongint); cdecl; external pangolib;
+procedure pango_layout_iter_get_layout_extents(iter:PPangoLayoutIter; ink_rect:PPangoRectangle; logical_rect:PPangoRectangle); cdecl; external pangolib;
+function pango_layout_iter_get_baseline(iter:PPangoLayoutIter):longint; cdecl; external pangolib;
+{$endif read_interface_functions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function PANGO_TYPE_LAYOUT : GType;
+begin
+ PANGO_TYPE_LAYOUT:=pango_layout_get_type;
+end;
+
+function PANGO_LAYOUT(anObject : pointer) : PPangoLayout;
+begin
+ PANGO_LAYOUT:=PPangoLayout(G_TYPE_CHECK_INSTANCE_CAST(anObject,
+ PANGO_TYPE_LAYOUT));
+end;
+
+function PANGO_LAYOUT_CLASS(klass : pointer) : PPangoLayoutClass;
+begin
+ PANGO_LAYOUT_CLASS:=PPangoLayoutClass(G_TYPE_CHECK_CLASS_CAST(klass,
+ PANGO_TYPE_LAYOUT));
+end;
+
+function PANGO_IS_LAYOUT(anObject : pointer) : boolean;
+begin
+ PANGO_IS_LAYOUT:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,PANGO_TYPE_LAYOUT);
+end;
+
+function PANGO_IS_LAYOUT_CLASS(klass : pointer) : boolean;
+begin
+ PANGO_IS_LAYOUT_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,PANGO_TYPE_LAYOUT);
+end;
+
+function PANGO_LAYOUT_GET_CLASS(obj : PPangoLayout) : PPangoLayoutClass;
+begin
+ PANGO_LAYOUT_GET_CLASS:=PPangoLayoutClass(G_TYPE_INSTANCE_GET_CLASS(obj,
+ PANGO_TYPE_LAYOUT));
+end;
+{$ENDIF}
+
diff --git a/packages/gtk2/src/pango/pango-tabs.inc b/packages/gtk2/src/pango/pango-tabs.inc
new file mode 100644
index 0000000000..5d7e3c33aa
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-tabs.inc
@@ -0,0 +1,47 @@
+// included by pango.pp
+{$IFDEF read_interface_types}
+ { These are not supported now, but may be in the
+ future.
+
+ PANGO_TAB_RIGHT,
+ PANGO_TAB_CENTER,
+ PANGO_TAB_NUMERIC
+ }
+ PPangoTabAlign = ^TPangoTabAlign;
+ TPangoTabAlign = (
+ PANGO_TAB_LEFT
+ );
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+function PANGO_TYPE_TAB_ARRAY : GType;
+
+function pango_tab_array_new(initial_size:gint; positions_in_pixels:gboolean):PPangoTabArray; cdecl; external pangolib;
+{$IFNDEF KYLIX}
+function pango_tab_array_new_with_positions(size:gint; positions_in_pixels:gboolean; first_alignment:TPangoTabAlign; first_position:gint; args:array of const):PPangoTabArray; cdecl; overload; external pangolib;
+function pango_tab_array_new_with_positions(size:gint; positions_in_pixels:gboolean; first_alignment:TPangoTabAlign; first_position:gint):PPangoTabArray; cdecl; overload; varargs; external pangolib;
+{$ELSE}
+function pango_tab_array_new_with_positions(size:gint; positions_in_pixels:gboolean; first_alignment:TPangoTabAlign; first_position:gint):PPangoTabArray; varargs; cdecl; external pangolib;
+{$ENDIF}
+function pango_tab_array_get_type:GType; cdecl; external pangolib;
+function pango_tab_array_copy(src:PPangoTabArray):PPangoTabArray; cdecl; external pangolib;
+procedure pango_tab_array_free(tab_array:PPangoTabArray); cdecl; external pangolib;
+function pango_tab_array_get_size(tab_array:PPangoTabArray):gint; cdecl; external pangolib;
+procedure pango_tab_array_resize(tab_array:PPangoTabArray; new_size:gint); cdecl; external pangolib;
+procedure pango_tab_array_set_tab(tab_array:PPangoTabArray; tab_index:gint; alignment:TPangoTabAlign; location:gint); cdecl; external pangolib;
+procedure pango_tab_array_get_tab(tab_array:PPangoTabArray; tab_index:gint; alignment:PPangoTabAlign; location:Pgint); cdecl; external pangolib;
+procedure pango_tab_array_get_tabs(tab_array:PPangoTabArray; var alignments:PPangoTabAlign; var locations:Pgint); cdecl; external pangolib;
+function pango_tab_array_get_positions_in_pixels(tab_array:PPangoTabArray):gboolean; cdecl; external pangolib;
+{$endif read_interface_functions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function PANGO_TYPE_TAB_ARRAY : GType;
+begin
+ PANGO_TYPE_TAB_ARRAY:=pango_tab_array_get_type;
+end;
+{$ENDIF read_implementation}
+
diff --git a/packages/gtk2/src/pango/pango-types.inc b/packages/gtk2/src/pango/pango-types.inc
new file mode 100644
index 0000000000..c01b240312
--- /dev/null
+++ b/packages/gtk2/src/pango/pango-types.inc
@@ -0,0 +1,96 @@
+// included by pango.pp
+{$IFDEF read_interface_types}
+ PPangoLanguage = ^TPangoLanguage;
+ TPangoLanguage = pointer;
+
+ { An index of a glyph into a font. Rendering system dependent }
+ PPangoGlyph = ^TPangoGlyph;
+ TPangoGlyph = guint32;
+
+ { A rectangle. Used to store logical and physical extents of glyphs,
+ runs, strings, etc.
+ }
+ PPangoRectangle = ^TPangoRectangle;
+ TPangoRectangle = record
+ x : longint;
+ y : longint;
+ width : longint;
+ height : longint;
+ end;
+
+ PPangoDirection = ^TPangoDirection;
+ TPangoDirection = (
+ PANGO_DIRECTION_LTR,
+ PANGO_DIRECTION_RTL,
+ PANGO_DIRECTION_TTB_LTR,
+ PANGO_DIRECTION_TTB_RTL
+ );
+{$ENDIF read_interface_types}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_interface_functions}
+const
+ PANGO_SCALE = 1024;
+
+function PANGO_PIXELS(d: integer): integer;
+
+{ Macros to translate from extents rectangles to ascent/descent/lbearing/rbearing
+ }
+function PANGO_ASCENT(rect : TPangoRectangle) : longint;
+function PANGO_DESCENT(rect : TPangoRectangle) : longint;
+function PANGO_LBEARING(rect : TPangoRectangle) : longint;
+function PANGO_RBEARING(rect : TPangoRectangle) : longint;
+
+{ Information about a segment of text with a consistent
+ shaping/language engine and bidirectional level
+}
+function PANGO_TYPE_LANGUAGE : GType;
+function pango_language_get_type:GType; cdecl; external pangolib;
+function pango_language_from_string(language:Pchar):PPangoLanguage; cdecl; external pangolib;
+function pango_language_to_string(language : PPangoLanguage) : Pchar;
+
+function pango_language_matches(language:PPangoLanguage; range_list:Pchar):gboolean; cdecl; external pangolib;
+{$endif read_interface_funtions}
+
+//------------------------------------------------------------------------------
+
+{$IFDEF read_implementation}
+function PANGO_ASCENT(rect : TPangoRectangle) : longint;
+begin
+ PANGO_ASCENT:=-(rect.y);
+end;
+
+function PANGO_DESCENT(rect : TPangoRectangle) : longint;
+begin
+ PANGO_DESCENT:=(rect.y) + (rect.height);
+end;
+
+function PANGO_LBEARING(rect : TPangoRectangle) : longint;
+begin
+ PANGO_LBEARING:=rect.x;
+end;
+
+function PANGO_RBEARING(rect : TPangoRectangle) : longint;
+begin
+ PANGO_RBEARING:=(rect.x) + (rect.width);
+end;
+
+function PANGO_TYPE_LANGUAGE : GType;
+begin
+ PANGO_TYPE_LANGUAGE:=pango_language_get_type;
+end;
+
+function pango_language_to_string(language : PPangoLanguage) : Pchar;
+begin
+ pango_language_to_string:=Pchar(language);
+end;
+
+function PANGO_PIXELS(d: integer): integer;
+begin
+ if d>=0 then
+ PANGO_PIXELS:=(d+(PANGO_SCALE div 2)) div PANGO_SCALE
+ else
+ PANGO_PIXELS:=(d-(PANGO_SCALE div 2)) div PANGO_SCALE;
+end;
+{$ENDIF}
diff --git a/packages/gtk2/src/pango/pango.pas b/packages/gtk2/src/pango/pango.pas
new file mode 100644
index 0000000000..b585602a03
--- /dev/null
+++ b/packages/gtk2/src/pango/pango.pas
@@ -0,0 +1,114 @@
+{
+ Pango - an open-source framework for the layout and rendering of
+ internationalized text.
+
+ Copyright (C) 1999 Red Hat Software
+
+ 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 pango; // keep unit name lowercase for kylix
+
+{$IFDEF FPC}
+ {$mode objfpc}
+{$ENDIF}
+{$IFDEF VER140}
+ {$DEFINE KYLIX}
+{$ENDIF}
+
+interface
+
+uses glib2;
+
+{$DEFINE PANGO_ENABLE_ENGINE}
+{$DEFINE PANGO_ENABLE_BACKEND}
+
+const
+{$ifdef win32}
+ {$define pangowin}
+ pangolib = 'libpango-1.0-0.dll';
+ {$IFDEF FPC}
+ {$ifndef NO_SMART_LINK}
+ {$smartlink on}
+ {$endif}
+ {$ENDIF}
+{$else}
+ {$ifdef UseCustomLibs}
+ pangolib = '';
+ {$else}
+ pangolib = 'libpango-1.0.so.0';
+ {$endif}
+{$endif}
+
+{$IFNDEF KYLIX}
+ {$PACKRECORDS C}
+{$ELSE}
+ {$ALIGN 4}
+ {$WEAKPACKAGEUNIT}
+ {$WARNINGS OFF}
+{$ENDIF}
+
+
+{$DEFINE read_forward_definitions}
+type
+ // internal types:
+ PPangoFontDescription = ^TPangoFontDescription;
+ TPangoFontDescription = pointer;
+
+ PPangoAttrList = ^TPangoAttrList;
+ TPangoAttrList = pointer;
+
+ PPangoAttrIterator = ^TPangoAttrIterator;
+ TPangoAttrIterator = pointer;
+
+ PPangoLayout = ^TPangoLayout;
+ TPangoLayout = pointer;
+
+ PPangoLayoutClass = ^TPangoLayoutClass;
+ TPangoLayoutClass = pointer;
+
+ PPangoLayoutIter = ^TPangoLayoutIter;
+ TPangoLayoutIter = pointer;
+
+ PPangoContext = ^TPangoContext;
+ TPangoContext = pointer;
+
+ PPangoContextClass = ^TPangoContextClass;
+ TPangoContextClass = pointer;
+
+ PPangoFontsetSimple = ^TPangoFontsetSimple;
+ TPangoFontsetSimple = pointer;
+
+ PPangoTabArray = ^TPangoTabArray;
+ TPangoTabArray = pointer;
+
+{$include pangoincludes.inc}
+{$UNDEF read_forward_definitions}
+
+{$DEFINE read_interface_types}
+{$include pangoincludes.inc}
+{$UNDEF read_interface_types}
+
+{$DEFINE read_interface_functions}
+{$include pangoincludes.inc}
+{$UNDEF read_interface_functions}
+
+implementation
+
+{$DEFINE read_implementation}
+{$include pangoincludes.inc}
+{$UNDEF read_implementation}
+
+end.
diff --git a/packages/gtk2/src/pango/pangoincludes.inc b/packages/gtk2/src/pango/pangoincludes.inc
new file mode 100644
index 0000000000..e65cc460f3
--- /dev/null
+++ b/packages/gtk2/src/pango/pangoincludes.inc
@@ -0,0 +1,17 @@
+// included by pango.pp
+
+{$include pango-types.inc}
+{$include pango-attributes.inc}
+{$include pango-break.inc}
+{$include pango-context.inc}
+{$include pango-coverage.inc}
+{$include pango-engine.inc}
+{$include pango-fontset.inc}
+{$include pango-font.inc}
+{$include pango-fontmap.inc}
+{$include pango-glyph.inc}
+{$include pango-item.inc}
+{$include pango-layout.inc}
+{ $include pango-enum-types.inc}
+{$include pango-tabs.inc}
+
diff --git a/packages/gtk2/src/pango/pangoutils.pas b/packages/gtk2/src/pango/pangoutils.pas
new file mode 100644
index 0000000000..3975d7816a
--- /dev/null
+++ b/packages/gtk2/src/pango/pangoutils.pas
@@ -0,0 +1,108 @@
+{ Pango
+ PangoUtils - Utilities for internal functions and modules
+
+ Copyright (C) 2000 Red Hat Software
+
+ 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 pangoutils;
+
+{$IFDEF FPC}
+ {$MODE objfpc}
+{$ENDIF}
+{$IFDEF VER140}
+ {$DEFINE KYLIX}
+{$ENDIF}
+
+interface
+
+uses
+ glib2, pango;
+
+{ Pointers to basic pascal types, inserted by h2pas conversion program.}
+Type
+ PLongint = ^Longint;
+ PSmallInt = ^SmallInt;
+ PByte = ^Byte;
+ PWord = ^Word;
+ PDWord = ^DWord;
+ PDouble = ^Double;
+{$IFDEF KYLIX}
+ PFile = ^file;
+{$ENDIF}
+
+{$IFNDEF KYLIX}
+ {$PACKRECORDS C}
+{$ELSE}
+ {$ALIGN 4}
+ {$WEAKPACKAGEUNIT}
+ {$WARNINGS OFF}
+{$ENDIF}
+
+function pango_split_file_list(str:Pchar):PPchar; cdecl; external pangolib;
+function pango_trim_string(str:Pchar):Pchar; cdecl; external pangolib;
+function pango_read_line(stream:PFILE; str:PGString):gint; cdecl; external pangolib;
+function pango_skip_space(pos:PPchar):gboolean; cdecl; external pangolib;
+function pango_scan_word(pos:PPchar; OutStr:PGString):gboolean; cdecl; external pangolib;
+function pango_scan_string(pos:PPchar; OutStr:PGString):gboolean; cdecl; external pangolib;
+function pango_scan_int(pos:PPchar; OutInt:Plongint):gboolean; cdecl; external pangolib;
+
+{$ifdef PANGO_ENABLE_BACKEND}
+function pango_config_key_get(key:Pchar):Pchar; cdecl; external pangolib;
+procedure pango_lookup_aliases(fontname:Pchar; families:PPPchar; n_families:Plongint); cdecl; external pangolib;
+{$endif}
+{ PANGO_ENABLE_BACKEND }
+
+{ Functions for parsing textual representations
+ of PangoFontDescription fields. They return TRUE if the input string
+ contains a valid value, which then has been assigned to the corresponding
+ field in the PangoFontDescription. If the warn parameter is TRUE,
+ a warning is printed (with g_warning) if the string does not
+ contain a valid value.
+ }
+function pango_parse_style(str:Pchar; style:PPangoStyle; warn:gboolean):gboolean; cdecl; external pangolib;
+function pango_parse_variant(str:Pchar; variant:PPangoVariant; warn:gboolean):gboolean; cdecl; external pangolib;
+function pango_parse_weight(str:Pchar; weight:PPangoWeight; warn:gboolean):gboolean; cdecl; external pangolib;
+function pango_parse_stretch(str:Pchar; stretch:PPangoStretch; warn:gboolean):gboolean; cdecl; external pangolib;
+{$ifdef PANGO_ENABLE_BACKEND}
+
+{ On Unix, return the name of the "pango" subdirectory of SYSCONFDIR
+ (which is set at compile time). On Win32, return the Pango
+ installation directory (which is set at installation time, and
+ stored in the registry). The returned string should not be
+ g_free'd.
+ }
+function pango_get_sysconf_subdirectory:Pchar; cdecl; external pangolib;
+
+{ Ditto for LIBDIR/pango. On Win32, use the same Pango
+ installation directory. This returned string should not be
+ g_free'd either.
+ }
+function pango_get_lib_subdirectory:Pchar; cdecl; external pangolib;
+{$endif}
+{ PANGO_ENABLE_BACKEND }
+
+{ A couple of routines from fribidi that we either wrap or
+ provide ourselves.
+ }
+
+function pango_log2vis_get_embedding_levels(str:Pgunichar; len:longint; pbase_dir:PPangoDirection; embedding_level_list:Pguint8):gboolean; cdecl; external pangolib;
+function pango_get_mirror_char(ch:gunichar; mirrored_ch:Pgunichar):gboolean; cdecl; external pangolib;
+function pango_language_get_sample_string(language:PPangoLanguage):Pchar; cdecl; external pangolib;
+
+implementation
+
+end.