From 58a074d5757045e38de3ede64afa1bcd7d0a9204 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 5 Apr 2000 04:35:37 +0000 Subject: [PATCH] Add checks for Pango Wed Apr 5 00:18:14 2000 Owen Taylor * configure.in: Add checks for Pango * configure.in docs/Makefile.am: Add test for sgml2html and allow 'make dist' without building html, but print out warnings in that case. (For making snapshots) * gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am: Add Pango libraries and C flags * gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c: Add function (gdk_draw_layout) to draw a pango layout. * gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions for getting Pango contexts for GDK. * gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set() * gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional editing. * gtk/gtkentry.c: Hack in simple Hebrew input with direct keysym => unicode translations. More languages can be added here, but real input-method support is needed. * docs/Changes-1.4.txt: Added note about entry behavior. * gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions to set the reading direction for a widget and the global direction. Add test which allows toggling the global direction. Two private flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR) * gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c * gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango * gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking, underlining now handled by Pango. * gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription to RCStyle and Style. (Having both this and the old font name and GdkFont is temporary.) * gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added convenience functions for creating contexts and layouts for widgets. * gtk/testgtk.c: Enhance label tests with multilingual labels. --- ChangeLog | 50 + ChangeLog.pre-2-0 | 50 + ChangeLog.pre-2-10 | 50 + ChangeLog.pre-2-2 | 50 + ChangeLog.pre-2-4 | 50 + ChangeLog.pre-2-6 | 50 + ChangeLog.pre-2-8 | 50 + configure.in | 22 + demos/testanimation.c | 462 - demos/testpixbuf-drawable.c | 113 - demos/testpixbuf-scale.c | 156 - demos/testpixbuf.c | 594 - docs/Changes-1.4.txt | 7 + docs/Makefile.am | 28 +- docs/reference/AUTHORS | 7 - docs/reference/COPYING | 30 - docs/reference/ChangeLog | 238 - docs/reference/README | 62 - docs/reference/README.cvs-commits | 39 - docs/reference/gdk-pixbuf/.cvsignore | 5 - docs/reference/gdk-pixbuf/Makefile.am | 109 - docs/reference/gdk-pixbuf/compiling.sgml | 103 - docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt | 414 - .../gdk-pixbuf/gdk-pixbuf-sections.txt | 105 - docs/reference/gdk-pixbuf/gdk-pixbuf.args | 66 - .../reference/gdk-pixbuf/gdk-pixbuf.hierarchy | 4 - docs/reference/gdk-pixbuf/gdk-pixbuf.sgml | 63 - docs/reference/gdk-pixbuf/gdk-pixbuf.signals | 34 - docs/reference/gdk-pixbuf/gdk-pixbuf.types | 7 - docs/reference/gdk-pixbuf/tmpl/animation.sgml | 91 - docs/reference/gdk-pixbuf/tmpl/creating.sgml | 96 - .../gdk-pixbuf/tmpl/file-loading.sgml | 41 - .../gdk-pixbuf/tmpl/from-drawables.sgml | 42 - .../gdk-pixbuf/tmpl/gdk-pixbuf-io.sgml | 70 - .../gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml | 182 - .../gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml | 114 - .../reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml | 108 - .../gdk-pixbuf/tmpl/gnome-canvas-pixbuf.sgml | 302 - .../gdk-pixbuf/tmpl/refcounting.sgml | 44 - docs/reference/gdk-pixbuf/tmpl/rendering.sgml | 125 - docs/reference/gdk-pixbuf/tmpl/scaling.sgml | 162 - docs/reference/gdk-pixbuf/tmpl/util.sgml | 52 - docs/reference/gdk/.cvsignore | 6 - docs/reference/gdk/Makefile.am | 50 - docs/reference/gdk/gdk-decl.txt | 2919 ---- docs/reference/gdk/gdk-docs.sgml | 72 - docs/reference/gdk/gdk-overrides.txt | 23 - docs/reference/gdk/gdk-sections.txt | 622 - docs/reference/gdk/tmpl/color_contexts.sgml | 207 - docs/reference/gdk/tmpl/colors.sgml | 390 - docs/reference/gdk/tmpl/cursors.sgml | 99 - docs/reference/gdk/tmpl/dnd.sgml | 194 - docs/reference/gdk/tmpl/drawing.sgml | 239 - docs/reference/gdk/tmpl/event_structs.sgml | 368 - docs/reference/gdk/tmpl/events.sgml | 303 - docs/reference/gdk/tmpl/fonts.sgml | 643 - docs/reference/gdk/tmpl/gcs.sgml | 639 - docs/reference/gdk/tmpl/gdk-unused.sgml | 0 docs/reference/gdk/tmpl/general.sgml | 346 - docs/reference/gdk/tmpl/images.sgml | 156 - docs/reference/gdk/tmpl/input.sgml | 130 - docs/reference/gdk/tmpl/input_contexts.sgml | 243 - docs/reference/gdk/tmpl/input_devices.sgml | 301 - docs/reference/gdk/tmpl/input_methods.sgml | 213 - docs/reference/gdk/tmpl/keys.sgml | 93 - docs/reference/gdk/tmpl/pixmaps.sgml | 196 - docs/reference/gdk/tmpl/properties.sgml | 225 - docs/reference/gdk/tmpl/regions.sgml | 259 - docs/reference/gdk/tmpl/rgb.sgml | 458 - docs/reference/gdk/tmpl/selections.sgml | 185 - docs/reference/gdk/tmpl/threads.sgml | 50 - docs/reference/gdk/tmpl/visuals.sgml | 391 - docs/reference/gdk/tmpl/windows.sgml | 783 - docs/reference/gtk/.cvsignore | 6 - docs/reference/gtk/Makefile.am | 59 - docs/reference/gtk/gtk-decl.txt | 13819 ---------------- docs/reference/gtk/gtk-docs.sgml | 293 - docs/reference/gtk/gtk-overrides.txt | 19 - docs/reference/gtk/gtk-sections.txt | 2952 ---- docs/reference/gtk/gtk.args | 846 - docs/reference/gtk/gtk.hierarchy | 93 - docs/reference/gtk/gtk.signals | 1097 -- docs/reference/gtk/gtk.types | 96 - docs/reference/gtk/objects_grouped.sgml | 130 - docs/reference/gtk/tmpl/gtk-unused.sgml | 629 - docs/reference/gtk/tmpl/gtkaccelgroup.sgml | 314 - docs/reference/gtk/tmpl/gtkaccellabel.sgml | 132 - docs/reference/gtk/tmpl/gtkadjustment.sgml | 154 - docs/reference/gtk/tmpl/gtkalignment.sgml | 99 - docs/reference/gtk/tmpl/gtkarg.sgml | 202 - docs/reference/gtk/tmpl/gtkarrow.sgml | 89 - docs/reference/gtk/tmpl/gtkaspectframe.sgml | 65 - docs/reference/gtk/tmpl/gtkbbox.sgml | 202 - docs/reference/gtk/tmpl/gtkbin.sgml | 42 - docs/reference/gtk/tmpl/gtkbindings.sgml | 243 - docs/reference/gtk/tmpl/gtkbox.sgml | 366 - docs/reference/gtk/tmpl/gtkbutton.sgml | 158 - docs/reference/gtk/tmpl/gtkcalendar.sgml | 240 - docs/reference/gtk/tmpl/gtkcheckbutton.sgml | 59 - docs/reference/gtk/tmpl/gtkcheckmenuitem.sgml | 108 - docs/reference/gtk/tmpl/gtkclist.sgml | 1317 -- docs/reference/gtk/tmpl/gtkcolorsel.sgml | 109 - docs/reference/gtk/tmpl/gtkcolorseldlg.sgml | 70 - docs/reference/gtk/tmpl/gtkcombo.sgml | 204 - docs/reference/gtk/tmpl/gtkcontainer.sgml | 404 - docs/reference/gtk/tmpl/gtkctree.sgml | 1257 -- docs/reference/gtk/tmpl/gtkcurve.sgml | 125 - docs/reference/gtk/tmpl/gtkdata.sgml | 38 - docs/reference/gtk/tmpl/gtkdebug.sgml | 42 - docs/reference/gtk/tmpl/gtkdialog.sgml | 119 - docs/reference/gtk/tmpl/gtkdnd.sgml | 345 - docs/reference/gtk/tmpl/gtkdrawingarea.sgml | 110 - docs/reference/gtk/tmpl/gtkeditable.sgml | 442 - docs/reference/gtk/tmpl/gtkentry.sgml | 185 - docs/reference/gtk/tmpl/gtkenums.sgml | 340 - docs/reference/gtk/tmpl/gtkeventbox.sgml | 33 - docs/reference/gtk/tmpl/gtkfeatures.sgml | 63 - docs/reference/gtk/tmpl/gtkfilesel.sgml | 167 - docs/reference/gtk/tmpl/gtkfixed.sgml | 102 - docs/reference/gtk/tmpl/gtkfontsel.sgml | 134 - docs/reference/gtk/tmpl/gtkfontseldlg.sgml | 178 - docs/reference/gtk/tmpl/gtkframe.sgml | 89 - docs/reference/gtk/tmpl/gtkgamma.sgml | 40 - docs/reference/gtk/tmpl/gtkgc.sgml | 45 - docs/reference/gtk/tmpl/gtkhandlebox.sgml | 157 - docs/reference/gtk/tmpl/gtkhbbox.sgml | 98 - docs/reference/gtk/tmpl/gtkhbox.sgml | 46 - docs/reference/gtk/tmpl/gtkhpaned.sgml | 32 - docs/reference/gtk/tmpl/gtkhruler.sgml | 36 - docs/reference/gtk/tmpl/gtkhscale.sgml | 44 - docs/reference/gtk/tmpl/gtkhscrollbar.sgml | 40 - docs/reference/gtk/tmpl/gtkhseparator.sgml | 45 - docs/reference/gtk/tmpl/gtkimage.sgml | 60 - docs/reference/gtk/tmpl/gtkinputdialog.sgml | 63 - docs/reference/gtk/tmpl/gtkinvisible.sgml | 35 - docs/reference/gtk/tmpl/gtkitem.sgml | 69 - docs/reference/gtk/tmpl/gtkitemfactory.sgml | 350 - docs/reference/gtk/tmpl/gtklabel.sgml | 138 - docs/reference/gtk/tmpl/gtklayout.sgml | 116 - docs/reference/gtk/tmpl/gtklist.sgml | 372 - docs/reference/gtk/tmpl/gtklistitem.sgml | 145 - docs/reference/gtk/tmpl/gtkmain.sgml | 533 - docs/reference/gtk/tmpl/gtkmarshal.sgml | 91 - docs/reference/gtk/tmpl/gtkmenu.sgml | 278 - docs/reference/gtk/tmpl/gtkmenubar.sgml | 73 - docs/reference/gtk/tmpl/gtkmenufactory.sgml | 132 - docs/reference/gtk/tmpl/gtkmenuitem.sgml | 151 - docs/reference/gtk/tmpl/gtkmenushell.sgml | 179 - docs/reference/gtk/tmpl/gtkmisc.sgml | 104 - docs/reference/gtk/tmpl/gtknotebook.sgml | 482 - docs/reference/gtk/tmpl/gtkobject.sgml | 916 - docs/reference/gtk/tmpl/gtkoptionmenu.sgml | 71 - docs/reference/gtk/tmpl/gtkpacker.sgml | 219 - docs/reference/gtk/tmpl/gtkpaned.sgml | 181 - docs/reference/gtk/tmpl/gtkpixmap.sgml | 75 - docs/reference/gtk/tmpl/gtkplug.sgml | 57 - docs/reference/gtk/tmpl/gtkpreview.sgml | 256 - docs/reference/gtk/tmpl/gtkprivate.sgml | 120 - docs/reference/gtk/tmpl/gtkprogress.sgml | 204 - docs/reference/gtk/tmpl/gtkprogressbar.sgml | 218 - docs/reference/gtk/tmpl/gtkradiobutton.sgml | 159 - docs/reference/gtk/tmpl/gtkradiomenuitem.sgml | 92 - docs/reference/gtk/tmpl/gtkrange.sgml | 182 - docs/reference/gtk/tmpl/gtkrc.sgml | 782 - docs/reference/gtk/tmpl/gtkruler.sgml | 62 - docs/reference/gtk/tmpl/gtkscale.sgml | 97 - docs/reference/gtk/tmpl/gtkscrollbar.sgml | 35 - .../reference/gtk/tmpl/gtkscrolledwindow.sgml | 191 - docs/reference/gtk/tmpl/gtkselection.sgml | 271 - docs/reference/gtk/tmpl/gtkseparator.sgml | 23 - docs/reference/gtk/tmpl/gtksignal.sgml | 928 -- docs/reference/gtk/tmpl/gtksocket.sgml | 122 - docs/reference/gtk/tmpl/gtkspinbutton.sgml | 367 - docs/reference/gtk/tmpl/gtkstatusbar.sgml | 129 - docs/reference/gtk/tmpl/gtkstyle.sgml | 887 - docs/reference/gtk/tmpl/gtktable.sgml | 228 - .../gtk/tmpl/gtktearoffmenuitem.sgml | 53 - docs/reference/gtk/tmpl/gtktext.sgml | 239 - docs/reference/gtk/tmpl/gtkthemes.sgml | 73 - docs/reference/gtk/tmpl/gtktipsquery.sgml | 160 - docs/reference/gtk/tmpl/gtktogglebutton.sgml | 162 - docs/reference/gtk/tmpl/gtktoolbar.sgml | 321 - docs/reference/gtk/tmpl/gtktooltips.sgml | 176 - docs/reference/gtk/tmpl/gtktree.sgml | 296 - docs/reference/gtk/tmpl/gtktreeitem.sgml | 110 - docs/reference/gtk/tmpl/gtktypeutils.sgml | 869 - docs/reference/gtk/tmpl/gtkvbbox.sgml | 96 - docs/reference/gtk/tmpl/gtkvbox.sgml | 46 - docs/reference/gtk/tmpl/gtkviewport.sgml | 92 - docs/reference/gtk/tmpl/gtkvpaned.sgml | 32 - docs/reference/gtk/tmpl/gtkvruler.sgml | 36 - docs/reference/gtk/tmpl/gtkvscale.sgml | 44 - docs/reference/gtk/tmpl/gtkvscrollbar.sgml | 40 - docs/reference/gtk/tmpl/gtkvseparator.sgml | 38 - docs/reference/gtk/tmpl/gtkwidget.sgml | 1711 -- docs/reference/gtk/tmpl/gtkwindow.sgml | 300 - gdk-pixbuf/.cvsignore | 12 - gdk-pixbuf/ChangeLog | 1705 -- gdk-pixbuf/Makefile.am | 196 - gdk-pixbuf/gdk-pixbuf-animation.c | 225 - gdk-pixbuf/gdk-pixbuf-data.c | 69 - gdk-pixbuf/gdk-pixbuf-features.h.in | 12 - gdk-pixbuf/gdk-pixbuf-io.c | 484 - gdk-pixbuf/gdk-pixbuf-io.h | 84 - gdk-pixbuf/gdk-pixbuf-loader.c | 509 - gdk-pixbuf/gdk-pixbuf-loader.h | 88 - gdk-pixbuf/gdk-pixbuf-scale.c | 214 - gdk-pixbuf/gdk-pixbuf-util.c | 144 - gdk-pixbuf/gdk-pixbuf-xform.c | 95 - gdk-pixbuf/gdk-pixbuf.c | 315 - gdk-pixbuf/gdk-pixbuf.h | 258 - gdk-pixbuf/gnome-canvas-pixbuf.c | 833 - gdk-pixbuf/gnome-canvas-pixbuf.h | 64 - gdk-pixbuf/io-bmp.c | 768 - gdk-pixbuf/io-gif.c | 1230 -- gdk-pixbuf/io-ico.c | 689 - gdk-pixbuf/io-jpeg.c | 550 - gdk-pixbuf/io-png.c | 524 - gdk-pixbuf/io-pnm.c | 860 - gdk-pixbuf/io-ras.c | 444 - gdk-pixbuf/io-tiff.c | 202 - gdk-pixbuf/io-xpm.c | 465 - gdk-pixbuf/pixops/.cvsignore | 7 - gdk-pixbuf/pixops/Makefile.am | 22 - gdk-pixbuf/pixops/README | 110 - gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S | 208 - .../pixops/composite_line_color_22_4a4_mmx.S | 219 - gdk-pixbuf/pixops/have_mmx.S | 42 - gdk-pixbuf/pixops/pixops-internal.h | 7 - gdk-pixbuf/pixops/pixops.c | 1528 -- gdk-pixbuf/pixops/pixops.h | 80 - gdk-pixbuf/pixops/scale_line_22_33_mmx.S | 152 - gdk-pixbuf/pixops/timescale.c | 232 - gdk-pixbuf/test-gdk-pixbuf.c | 33 - gdk/Makefile.am | 3 + gdk/gdk.h | 1 + gdk/gdkdraw.c | 17 + gdk/gdkdrawable.h | 174 +- gdk/gdkpango.h | 45 + gdk/gdkpixbuf-drawable.c | 1130 -- gdk/gdkpixbuf-render.c | 382 - gdk/gdktypes.h | 1 + gdk/gdkwindow.c | 32 +- gdk/x11/Makefile.am | 8 +- gdk/x11/gdkdrawable-x11.c | 137 +- gdk/x11/gdkpango-x11.c | 134 + gtk/Makefile.am | 3 + gtk/gdk-pixbuf-loader.c | 509 - gtk/gdk-pixbuf-loader.h | 88 - gtk/gtkcheckbutton.c | 17 +- gtk/gtkeditable.c | 29 - gtk/gtkentry.c | 1444 +- gtk/gtkentry.h | 31 +- gtk/gtkenums.h | 8 + gtk/gtkframe.c | 49 +- gtk/gtkhbbox.c | 8 +- gtk/gtkhbox.c | 9 + gtk/gtkhscale.c | 68 +- gtk/gtklabel.c | 778 +- gtk/gtklabel.h | 12 +- gtk/gtkprivate.h | 10 +- gtk/gtkradiobutton.c | 3 + gtk/gtkrc.c | 9 + gtk/gtkrc.h | 1 + gtk/gtkscale.c | 67 +- gtk/gtkscale.h | 5 +- gtk/gtkspinbutton.c | 14 +- gtk/gtkstyle.c | 6 +- gtk/gtkstyle.h | 4 +- gtk/gtktable.c | 5 + gtk/gtkvscale.c | 64 +- gtk/gtkwidget.c | 135 + gtk/gtkwidget.h | 14 + gtk/testgtk.c | 83 +- modules/engines/pixbuf/.cvsignore | 6 - modules/engines/pixbuf/ChangeLog | 107 - modules/engines/pixbuf/Makefile.am | 14 - modules/engines/pixbuf/README | 17 - modules/engines/pixbuf/pixbuf-draw.c | 1037 -- modules/engines/pixbuf/pixbuf-main.c | 877 - modules/engines/pixbuf/pixbuf-render.c | 345 - modules/engines/pixbuf/pixbuf.h | 194 - tests/testgtk.c | 83 +- 283 files changed, 2245 insertions(+), 79006 deletions(-) delete mode 100644 demos/testanimation.c delete mode 100644 demos/testpixbuf-drawable.c delete mode 100644 demos/testpixbuf-scale.c delete mode 100644 demos/testpixbuf.c delete mode 100644 docs/reference/AUTHORS delete mode 100644 docs/reference/COPYING delete mode 100644 docs/reference/ChangeLog delete mode 100644 docs/reference/README delete mode 100644 docs/reference/README.cvs-commits delete mode 100644 docs/reference/gdk-pixbuf/.cvsignore delete mode 100644 docs/reference/gdk-pixbuf/Makefile.am delete mode 100644 docs/reference/gdk-pixbuf/compiling.sgml delete mode 100644 docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt delete mode 100644 docs/reference/gdk-pixbuf/gdk-pixbuf-sections.txt delete mode 100644 docs/reference/gdk-pixbuf/gdk-pixbuf.args delete mode 100644 docs/reference/gdk-pixbuf/gdk-pixbuf.hierarchy delete mode 100644 docs/reference/gdk-pixbuf/gdk-pixbuf.sgml delete mode 100644 docs/reference/gdk-pixbuf/gdk-pixbuf.signals delete mode 100644 docs/reference/gdk-pixbuf/gdk-pixbuf.types delete mode 100644 docs/reference/gdk-pixbuf/tmpl/animation.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/creating.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/file-loading.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/from-drawables.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-io.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/gnome-canvas-pixbuf.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/refcounting.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/rendering.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/scaling.sgml delete mode 100644 docs/reference/gdk-pixbuf/tmpl/util.sgml delete mode 100644 docs/reference/gdk/.cvsignore delete mode 100644 docs/reference/gdk/Makefile.am delete mode 100644 docs/reference/gdk/gdk-decl.txt delete mode 100644 docs/reference/gdk/gdk-docs.sgml delete mode 100644 docs/reference/gdk/gdk-overrides.txt delete mode 100644 docs/reference/gdk/gdk-sections.txt delete mode 100644 docs/reference/gdk/tmpl/color_contexts.sgml delete mode 100644 docs/reference/gdk/tmpl/colors.sgml delete mode 100644 docs/reference/gdk/tmpl/cursors.sgml delete mode 100644 docs/reference/gdk/tmpl/dnd.sgml delete mode 100644 docs/reference/gdk/tmpl/drawing.sgml delete mode 100644 docs/reference/gdk/tmpl/event_structs.sgml delete mode 100644 docs/reference/gdk/tmpl/events.sgml delete mode 100644 docs/reference/gdk/tmpl/fonts.sgml delete mode 100644 docs/reference/gdk/tmpl/gcs.sgml delete mode 100644 docs/reference/gdk/tmpl/gdk-unused.sgml delete mode 100644 docs/reference/gdk/tmpl/general.sgml delete mode 100644 docs/reference/gdk/tmpl/images.sgml delete mode 100644 docs/reference/gdk/tmpl/input.sgml delete mode 100644 docs/reference/gdk/tmpl/input_contexts.sgml delete mode 100644 docs/reference/gdk/tmpl/input_devices.sgml delete mode 100644 docs/reference/gdk/tmpl/input_methods.sgml delete mode 100644 docs/reference/gdk/tmpl/keys.sgml delete mode 100644 docs/reference/gdk/tmpl/pixmaps.sgml delete mode 100644 docs/reference/gdk/tmpl/properties.sgml delete mode 100644 docs/reference/gdk/tmpl/regions.sgml delete mode 100644 docs/reference/gdk/tmpl/rgb.sgml delete mode 100644 docs/reference/gdk/tmpl/selections.sgml delete mode 100644 docs/reference/gdk/tmpl/threads.sgml delete mode 100644 docs/reference/gdk/tmpl/visuals.sgml delete mode 100644 docs/reference/gdk/tmpl/windows.sgml delete mode 100644 docs/reference/gtk/.cvsignore delete mode 100644 docs/reference/gtk/Makefile.am delete mode 100644 docs/reference/gtk/gtk-decl.txt delete mode 100644 docs/reference/gtk/gtk-docs.sgml delete mode 100644 docs/reference/gtk/gtk-overrides.txt delete mode 100644 docs/reference/gtk/gtk-sections.txt delete mode 100644 docs/reference/gtk/gtk.args delete mode 100644 docs/reference/gtk/gtk.hierarchy delete mode 100644 docs/reference/gtk/gtk.signals delete mode 100644 docs/reference/gtk/gtk.types delete mode 100644 docs/reference/gtk/objects_grouped.sgml delete mode 100644 docs/reference/gtk/tmpl/gtk-unused.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkaccelgroup.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkaccellabel.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkadjustment.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkalignment.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkarg.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkarrow.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkaspectframe.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkbbox.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkbin.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkbindings.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkbox.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkbutton.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkcalendar.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkcheckbutton.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkcheckmenuitem.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkclist.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkcolorsel.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkcolorseldlg.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkcombo.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkcontainer.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkctree.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkcurve.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkdata.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkdebug.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkdialog.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkdnd.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkdrawingarea.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkeditable.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkentry.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkenums.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkeventbox.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkfeatures.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkfilesel.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkfixed.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkfontsel.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkfontseldlg.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkframe.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkgamma.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkgc.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkhandlebox.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkhbbox.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkhbox.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkhpaned.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkhruler.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkhscale.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkhscrollbar.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkhseparator.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkimage.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkinputdialog.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkinvisible.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkitem.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkitemfactory.sgml delete mode 100644 docs/reference/gtk/tmpl/gtklabel.sgml delete mode 100644 docs/reference/gtk/tmpl/gtklayout.sgml delete mode 100644 docs/reference/gtk/tmpl/gtklist.sgml delete mode 100644 docs/reference/gtk/tmpl/gtklistitem.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkmain.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkmarshal.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkmenu.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkmenubar.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkmenufactory.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkmenuitem.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkmenushell.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkmisc.sgml delete mode 100644 docs/reference/gtk/tmpl/gtknotebook.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkobject.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkoptionmenu.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkpacker.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkpaned.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkpixmap.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkplug.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkpreview.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkprivate.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkprogress.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkprogressbar.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkradiobutton.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkradiomenuitem.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkrange.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkrc.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkruler.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkscale.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkscrollbar.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkscrolledwindow.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkselection.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkseparator.sgml delete mode 100644 docs/reference/gtk/tmpl/gtksignal.sgml delete mode 100644 docs/reference/gtk/tmpl/gtksocket.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkspinbutton.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkstatusbar.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkstyle.sgml delete mode 100644 docs/reference/gtk/tmpl/gtktable.sgml delete mode 100644 docs/reference/gtk/tmpl/gtktearoffmenuitem.sgml delete mode 100644 docs/reference/gtk/tmpl/gtktext.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkthemes.sgml delete mode 100644 docs/reference/gtk/tmpl/gtktipsquery.sgml delete mode 100644 docs/reference/gtk/tmpl/gtktogglebutton.sgml delete mode 100644 docs/reference/gtk/tmpl/gtktoolbar.sgml delete mode 100644 docs/reference/gtk/tmpl/gtktooltips.sgml delete mode 100644 docs/reference/gtk/tmpl/gtktree.sgml delete mode 100644 docs/reference/gtk/tmpl/gtktreeitem.sgml delete mode 100644 docs/reference/gtk/tmpl/gtktypeutils.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkvbbox.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkvbox.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkviewport.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkvpaned.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkvruler.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkvscale.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkvscrollbar.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkvseparator.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkwidget.sgml delete mode 100644 docs/reference/gtk/tmpl/gtkwindow.sgml delete mode 100644 gdk-pixbuf/.cvsignore delete mode 100644 gdk-pixbuf/ChangeLog delete mode 100644 gdk-pixbuf/Makefile.am delete mode 100644 gdk-pixbuf/gdk-pixbuf-animation.c delete mode 100644 gdk-pixbuf/gdk-pixbuf-data.c delete mode 100644 gdk-pixbuf/gdk-pixbuf-features.h.in delete mode 100644 gdk-pixbuf/gdk-pixbuf-io.c delete mode 100644 gdk-pixbuf/gdk-pixbuf-io.h delete mode 100644 gdk-pixbuf/gdk-pixbuf-loader.c delete mode 100644 gdk-pixbuf/gdk-pixbuf-loader.h delete mode 100644 gdk-pixbuf/gdk-pixbuf-scale.c delete mode 100644 gdk-pixbuf/gdk-pixbuf-util.c delete mode 100644 gdk-pixbuf/gdk-pixbuf-xform.c delete mode 100644 gdk-pixbuf/gdk-pixbuf.c delete mode 100644 gdk-pixbuf/gdk-pixbuf.h delete mode 100644 gdk-pixbuf/gnome-canvas-pixbuf.c delete mode 100644 gdk-pixbuf/gnome-canvas-pixbuf.h delete mode 100644 gdk-pixbuf/io-bmp.c delete mode 100644 gdk-pixbuf/io-gif.c delete mode 100644 gdk-pixbuf/io-ico.c delete mode 100644 gdk-pixbuf/io-jpeg.c delete mode 100644 gdk-pixbuf/io-png.c delete mode 100644 gdk-pixbuf/io-pnm.c delete mode 100644 gdk-pixbuf/io-ras.c delete mode 100644 gdk-pixbuf/io-tiff.c delete mode 100644 gdk-pixbuf/io-xpm.c delete mode 100644 gdk-pixbuf/pixops/.cvsignore delete mode 100644 gdk-pixbuf/pixops/Makefile.am delete mode 100644 gdk-pixbuf/pixops/README delete mode 100644 gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S delete mode 100644 gdk-pixbuf/pixops/composite_line_color_22_4a4_mmx.S delete mode 100644 gdk-pixbuf/pixops/have_mmx.S delete mode 100644 gdk-pixbuf/pixops/pixops-internal.h delete mode 100644 gdk-pixbuf/pixops/pixops.c delete mode 100644 gdk-pixbuf/pixops/pixops.h delete mode 100644 gdk-pixbuf/pixops/scale_line_22_33_mmx.S delete mode 100644 gdk-pixbuf/pixops/timescale.c delete mode 100644 gdk-pixbuf/test-gdk-pixbuf.c create mode 100644 gdk/gdkpango.h delete mode 100644 gdk/gdkpixbuf-drawable.c delete mode 100644 gdk/gdkpixbuf-render.c create mode 100644 gdk/x11/gdkpango-x11.c delete mode 100644 gtk/gdk-pixbuf-loader.c delete mode 100644 gtk/gdk-pixbuf-loader.h delete mode 100644 modules/engines/pixbuf/.cvsignore delete mode 100644 modules/engines/pixbuf/ChangeLog delete mode 100644 modules/engines/pixbuf/Makefile.am delete mode 100644 modules/engines/pixbuf/README delete mode 100644 modules/engines/pixbuf/pixbuf-draw.c delete mode 100644 modules/engines/pixbuf/pixbuf-main.c delete mode 100644 modules/engines/pixbuf/pixbuf-render.c delete mode 100644 modules/engines/pixbuf/pixbuf.h diff --git a/ChangeLog b/ChangeLog index ae34dabf0d..468caee8c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,53 @@ +Wed Apr 5 00:18:14 2000 Owen Taylor + + * configure.in: Add checks for Pango + + * configure.in docs/Makefile.am: Add test for sgml2html + and allow 'make dist' without building html, but print out + warnings in that case. (For making snapshots) + + * gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am: + Add Pango libraries and C flags + + * gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c: + Add function (gdk_draw_layout) to draw a pango layout. + + * gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions + for getting Pango contexts for GDK. + + * gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set() + + * gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional + editing. + + * gtk/gtkentry.c: Hack in simple Hebrew input with direct + keysym => unicode translations. More languages can be added + here, but real input-method support is needed. + + * docs/Changes-1.4.txt: Added note about entry behavior. + + * gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions + to set the reading direction for a widget and the global direction. + Add test which allows toggling the global direction. Two private + flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR) + + * gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c + gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c + + * gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango + + * gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking, + underlining now handled by Pango. + + * gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription + to RCStyle and Style. (Having both this and the old font name and GdkFont + is temporary.) + + * gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added + convenience functions for creating contexts and layouts for widgets. + + * gtk/testgtk.c: Enhance label tests with multilingual labels. + Wed Apr 5 00:08:36 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new): Fix screwy diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index ae34dabf0d..468caee8c0 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,53 @@ +Wed Apr 5 00:18:14 2000 Owen Taylor + + * configure.in: Add checks for Pango + + * configure.in docs/Makefile.am: Add test for sgml2html + and allow 'make dist' without building html, but print out + warnings in that case. (For making snapshots) + + * gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am: + Add Pango libraries and C flags + + * gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c: + Add function (gdk_draw_layout) to draw a pango layout. + + * gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions + for getting Pango contexts for GDK. + + * gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set() + + * gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional + editing. + + * gtk/gtkentry.c: Hack in simple Hebrew input with direct + keysym => unicode translations. More languages can be added + here, but real input-method support is needed. + + * docs/Changes-1.4.txt: Added note about entry behavior. + + * gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions + to set the reading direction for a widget and the global direction. + Add test which allows toggling the global direction. Two private + flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR) + + * gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c + gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c + + * gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango + + * gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking, + underlining now handled by Pango. + + * gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription + to RCStyle and Style. (Having both this and the old font name and GdkFont + is temporary.) + + * gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added + convenience functions for creating contexts and layouts for widgets. + + * gtk/testgtk.c: Enhance label tests with multilingual labels. + Wed Apr 5 00:08:36 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new): Fix screwy diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ae34dabf0d..468caee8c0 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,53 @@ +Wed Apr 5 00:18:14 2000 Owen Taylor + + * configure.in: Add checks for Pango + + * configure.in docs/Makefile.am: Add test for sgml2html + and allow 'make dist' without building html, but print out + warnings in that case. (For making snapshots) + + * gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am: + Add Pango libraries and C flags + + * gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c: + Add function (gdk_draw_layout) to draw a pango layout. + + * gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions + for getting Pango contexts for GDK. + + * gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set() + + * gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional + editing. + + * gtk/gtkentry.c: Hack in simple Hebrew input with direct + keysym => unicode translations. More languages can be added + here, but real input-method support is needed. + + * docs/Changes-1.4.txt: Added note about entry behavior. + + * gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions + to set the reading direction for a widget and the global direction. + Add test which allows toggling the global direction. Two private + flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR) + + * gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c + gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c + + * gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango + + * gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking, + underlining now handled by Pango. + + * gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription + to RCStyle and Style. (Having both this and the old font name and GdkFont + is temporary.) + + * gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added + convenience functions for creating contexts and layouts for widgets. + + * gtk/testgtk.c: Enhance label tests with multilingual labels. + Wed Apr 5 00:08:36 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new): Fix screwy diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index ae34dabf0d..468caee8c0 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,53 @@ +Wed Apr 5 00:18:14 2000 Owen Taylor + + * configure.in: Add checks for Pango + + * configure.in docs/Makefile.am: Add test for sgml2html + and allow 'make dist' without building html, but print out + warnings in that case. (For making snapshots) + + * gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am: + Add Pango libraries and C flags + + * gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c: + Add function (gdk_draw_layout) to draw a pango layout. + + * gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions + for getting Pango contexts for GDK. + + * gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set() + + * gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional + editing. + + * gtk/gtkentry.c: Hack in simple Hebrew input with direct + keysym => unicode translations. More languages can be added + here, but real input-method support is needed. + + * docs/Changes-1.4.txt: Added note about entry behavior. + + * gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions + to set the reading direction for a widget and the global direction. + Add test which allows toggling the global direction. Two private + flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR) + + * gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c + gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c + + * gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango + + * gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking, + underlining now handled by Pango. + + * gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription + to RCStyle and Style. (Having both this and the old font name and GdkFont + is temporary.) + + * gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added + convenience functions for creating contexts and layouts for widgets. + + * gtk/testgtk.c: Enhance label tests with multilingual labels. + Wed Apr 5 00:08:36 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new): Fix screwy diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index ae34dabf0d..468caee8c0 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,53 @@ +Wed Apr 5 00:18:14 2000 Owen Taylor + + * configure.in: Add checks for Pango + + * configure.in docs/Makefile.am: Add test for sgml2html + and allow 'make dist' without building html, but print out + warnings in that case. (For making snapshots) + + * gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am: + Add Pango libraries and C flags + + * gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c: + Add function (gdk_draw_layout) to draw a pango layout. + + * gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions + for getting Pango contexts for GDK. + + * gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set() + + * gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional + editing. + + * gtk/gtkentry.c: Hack in simple Hebrew input with direct + keysym => unicode translations. More languages can be added + here, but real input-method support is needed. + + * docs/Changes-1.4.txt: Added note about entry behavior. + + * gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions + to set the reading direction for a widget and the global direction. + Add test which allows toggling the global direction. Two private + flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR) + + * gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c + gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c + + * gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango + + * gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking, + underlining now handled by Pango. + + * gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription + to RCStyle and Style. (Having both this and the old font name and GdkFont + is temporary.) + + * gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added + convenience functions for creating contexts and layouts for widgets. + + * gtk/testgtk.c: Enhance label tests with multilingual labels. + Wed Apr 5 00:08:36 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new): Fix screwy diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index ae34dabf0d..468caee8c0 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,53 @@ +Wed Apr 5 00:18:14 2000 Owen Taylor + + * configure.in: Add checks for Pango + + * configure.in docs/Makefile.am: Add test for sgml2html + and allow 'make dist' without building html, but print out + warnings in that case. (For making snapshots) + + * gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am: + Add Pango libraries and C flags + + * gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c: + Add function (gdk_draw_layout) to draw a pango layout. + + * gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions + for getting Pango contexts for GDK. + + * gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set() + + * gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional + editing. + + * gtk/gtkentry.c: Hack in simple Hebrew input with direct + keysym => unicode translations. More languages can be added + here, but real input-method support is needed. + + * docs/Changes-1.4.txt: Added note about entry behavior. + + * gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions + to set the reading direction for a widget and the global direction. + Add test which allows toggling the global direction. Two private + flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR) + + * gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c + gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c + + * gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango + + * gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking, + underlining now handled by Pango. + + * gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription + to RCStyle and Style. (Having both this and the old font name and GdkFont + is temporary.) + + * gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added + convenience functions for creating contexts and layouts for widgets. + + * gtk/testgtk.c: Enhance label tests with multilingual labels. + Wed Apr 5 00:08:36 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new): Fix screwy diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index ae34dabf0d..468caee8c0 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,53 @@ +Wed Apr 5 00:18:14 2000 Owen Taylor + + * configure.in: Add checks for Pango + + * configure.in docs/Makefile.am: Add test for sgml2html + and allow 'make dist' without building html, but print out + warnings in that case. (For making snapshots) + + * gdk/Makefile.am gdk/x11/Makefile.am gtk/Makefile.am: + Add Pango libraries and C flags + + * gdk/gdkdraw.c gdk/gdkdrawable.h gdkwindow.c gdk/x11/gdkdrawable-x11.c: + Add function (gdk_draw_layout) to draw a pango layout. + + * gdk/gdkpango.h gdk/x11/gdkpango-x11.c: New file with functions + for getting Pango contexts for GDK. + + * gtk/gtkeditable.c: Get rid of dead code gtk_editable_parent_set() + + * gtk/gtkentry.[ch]: Complete rewrite to use Pango, add bidirectional + editing. + + * gtk/gtkentry.c: Hack in simple Hebrew input with direct + keysym => unicode translations. More languages can be added + here, but real input-method support is needed. + + * docs/Changes-1.4.txt: Added note about entry behavior. + + * gtk/gtkenums.h gtk/gtkwidget.[ch] testgtk.c gtkprivate.h: Add functions + to set the reading direction for a widget and the global direction. + Add test which allows toggling the global direction. Two private + flags are used to store the direction. (GTK_DIRECTION_SET + GTK_DIRECTION_LTR) + + * gtk/gtkcheckbutton.c gtk/gtkframe.c gtk/gtkhbbox.c gtk/gtkhbox.c + gtk/gtkradiobutton.c gtk/gtkspinbutton.c gtk/gtktable.c + + * gtk/gtk[hv]scale.c gtk/gtkscale.[ch]: Draw numbers using Pango + + * gtk/gtklabel.[ch]: Moved to Pango and considerably rewritten. Line breaking, + underlining now handled by Pango. + + * gtk/gtkstyle.[ch] gtk/gtkrc.[ch]: Add a PangoFontDescription + to RCStyle and Style. (Having both this and the old font name and GdkFont + is temporary.) + + * gtk/gtkwidget.[ch] (gtk_widget_create_pango_{context,layout}): Added + convenience functions for creating contexts and layouts for widgets. + + * gtk/testgtk.c: Enhance label tests with multilingual labels. + Wed Apr 5 00:08:36 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new): Fix screwy diff --git a/configure.in b/configure.in index 65868fb29f..aabf223cb1 100644 --- a/configure.in +++ b/configure.in @@ -309,6 +309,7 @@ AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H)) AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H)) AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H)) + # Find the X11 include and library directories AC_PATH_X AC_PATH_XTRA @@ -395,6 +396,24 @@ fi x_cflags="$X_CFLAGS" x_ldflags="$X_LDFLAGS $X_LIBS" +# +# Check for Pango +# +AC_PATH_PROG(PANGO_CONFIG, pango-config, no) +if test x$PANGO_CONFIG = xno ; then + AC_MSG_ERROR([*** pango-config not found]) +fi +PANGO_CFLAGS="`pango-config --cflags pangox`" +CFLAGS="$CFLAGS $PANGO_CFLAGS" +PANGO_LIBS="`pango-config --libs pangox`" +AC_SUBST(PANGO_LIBS) +AC_SUBST(PANGO_CFLAGS) + +AC_CHECK_LIB(pango, pango_context_new, :, AC_MSG_ERROR([ +*** Pango not found. Pango is required to build +*** GTK+. For more information see http://www.pango.org]), $PANGO_LIBS $x_ldflags $x_libs) + + # set up things for XInput if test "x$with_xinput" = "xgxi" || test "x$with_xinput" = "xyes"; then @@ -618,6 +637,9 @@ fi ]) +AC_PATH_PROG(SGML2HTML, sgml2html, no) +AM_CONDITIONAL(HAVE_SGML2HTML, ! test x$SGML2HTML = xno) + AC_OUTPUT([ gtk+.spec docs/gtk-config.1 diff --git a/demos/testanimation.c b/demos/testanimation.c deleted file mode 100644 index d67b8dd8de..0000000000 --- a/demos/testanimation.c +++ /dev/null @@ -1,462 +0,0 @@ - -/* testpixbuf -- test program for gdk-pixbuf code - * Copyright (C) 1999 Mark Crichton, Larry Ewing - * - * 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. - */ - -#include -#include -#include -#include -#include -#include "gdk-pixbuf.h" -#include "gdk-pixbuf-io.h" -#include "gdk-pixbuf-loader.h" - -typedef struct { - FILE *imagefile; - GdkPixbufLoader *loader; - GtkWidget **rgbwin; - guchar *buf; - guint timeout; - guint readlen; - -} ProgressFileStatus; - - -#define DEFAULT_WIDTH 24 -#define DEFAULT_HEIGHT 24 - -static const unsigned char default_image[] = { - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xae, 0xb3, 0xb3, 0xc6, 0xc9, 0xcd, 0xd7, 0xd4, 0xdf, - 0xec, 0xde, 0xf3, 0xe7, 0xcb, 0xe9, 0xd9, 0xb5, 0xd3, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xb1, 0xb7, 0xa5, - 0xb0, 0xb8, 0xad, 0xb3, 0xb9, 0xb6, 0xc1, 0xc6, 0xc8, 0xd5, 0xd3, 0xdc, - 0xec, 0xde, 0xf3, 0xe5, 0xca, 0xe6, 0xe0, 0xbb, 0xd7, 0xe1, 0xad, 0xc2, - 0xe3, 0xac, 0xa3, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xca, 0xc1, 0xa4, 0xc5, 0xc7, 0xac, - 0xb7, 0xbe, 0xaf, 0xad, 0xb4, 0xaf, 0xbd, 0xc2, 0xc3, 0xd1, 0xd0, 0xd8, - 0xec, 0xde, 0xf3, 0xe5, 0xc7, 0xe4, 0xe0, 0xb6, 0xd1, 0xe7, 0xa9, 0xb4, - 0xed, 0xcd, 0xb6, 0xd6, 0xcf, 0xae, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0xdf, 0xa7, 0x9f, 0xdd, 0xbf, 0xaa, 0xcf, 0xc5, 0xa9, - 0xc1, 0xc4, 0xac, 0xb2, 0xba, 0xaf, 0xb6, 0xbb, 0xbb, 0xcd, 0xce, 0xd4, - 0xec, 0xde, 0xf3, 0xe4, 0xc4, 0xe1, 0xe0, 0xaf, 0xc7, 0xea, 0xbc, 0xae, - 0xe1, 0xd6, 0xb6, 0xc7, 0xcc, 0xae, 0xa2, 0xab, 0x9a, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0xe3, 0xab, 0xc0, 0xe6, 0xa3, 0xa7, 0xdf, 0xba, 0xa8, - 0xcf, 0xc5, 0xa9, 0xbd, 0xc2, 0xae, 0xad, 0xb4, 0xaf, 0xc6, 0xc9, 0xcd, - 0xec, 0xde, 0xf3, 0xe2, 0xbf, 0xdc, 0xe7, 0xa9, 0xb4, 0xe7, 0xd6, 0xb8, - 0xc7, 0xcc, 0xae, 0xac, 0xb6, 0xa6, 0x9d, 0xa8, 0x9f, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xd9, 0xaf, 0xcf, 0xe1, 0xb4, 0xd2, 0xe2, 0xb0, 0xcb, 0xe4, 0xa9, 0xbb, - 0xe2, 0xb2, 0xa6, 0xcf, 0xc5, 0xa9, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d, - 0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xed, 0xcd, 0xb6, 0xc7, 0xcc, 0xae, - 0xa6, 0xb1, 0xa3, 0x98, 0xa2, 0x9c, 0x8f, 0x97, 0x96, 0x7e, 0x84, 0x85, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xe8, 0xc6, 0xe7, 0xe5, 0xc2, 0xe3, 0xe3, 0xbd, 0xdd, 0xe1, 0xb6, 0xd5, - 0xe2, 0xb0, 0xcb, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0x9d, 0xa8, 0x9f, - 0x8f, 0x97, 0x96, 0x8b, 0x90, 0x92, 0x97, 0x9e, 0xa2, 0xa0, 0xa7, 0xae, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xe7, 0xd3, 0xed, 0xe8, 0xd1, 0xed, 0xe8, 0xce, 0xec, 0xe9, 0xcc, 0xeb, - 0xe8, 0xc6, 0xe7, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0x97, 0x9e, 0xa2, - 0xa7, 0xae, 0xb7, 0xb2, 0xb6, 0xc5, 0xba, 0xbc, 0xce, 0xbf, 0xbe, 0xd3, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, - 0xe9, 0xdf, 0xf0, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0xe1, 0xd2, 0xf7, - 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xca, 0xc7, 0xd2, 0xc5, 0xc4, 0xcd, 0xbf, 0xbf, 0xc7, 0xb8, 0xb9, 0xc0, - 0xae, 0xaf, 0xb6, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0xd5, 0xa8, 0xe1, - 0xd8, 0xb2, 0xe9, 0xd9, 0xb8, 0xed, 0xdb, 0xbd, 0xf0, 0xdc, 0xbf, 0xf1, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xa4, 0xa6, 0xac, 0xa8, 0xaa, 0xaf, 0xa0, 0xa6, 0xa8, 0x98, 0x9e, 0x9c, - 0xa1, 0xa8, 0x9e, 0xb1, 0xb6, 0xa1, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d, - 0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xc0, 0x8c, 0xad, 0xcc, 0x90, 0xb5, - 0xd3, 0x94, 0xca, 0xd6, 0xa2, 0xdb, 0xd5, 0xa8, 0xe1, 0xcf, 0xa7, 0xdf, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x98, 0x9f, 0x9b, 0xa1, 0xa8, 0x9e, 0xac, 0xb3, 0xa0, - 0xb9, 0xb9, 0xa4, 0xd0, 0xb8, 0xa8, 0xc5, 0xb5, 0xb8, 0xb6, 0xbb, 0xad, - 0xe3, 0xd7, 0xb5, 0xdd, 0xb4, 0xa9, 0xcb, 0x89, 0xac, 0xc0, 0x8c, 0xad, - 0xc8, 0x91, 0xb5, 0xd1, 0x8d, 0xb7, 0xd3, 0x94, 0xca, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0xa1, 0xa7, 0x98, 0xb1, 0xb6, 0xa1, 0xbd, 0xb9, 0xa5, - 0xd0, 0xb8, 0xa8, 0xca, 0xb5, 0xb7, 0xb8, 0xb1, 0xb1, 0xc2, 0xc8, 0xb2, - 0xe3, 0xd7, 0xb5, 0xe1, 0xbf, 0xaf, 0xdb, 0x92, 0x9a, 0xbe, 0x82, 0xa6, - 0xc0, 0x8c, 0xad, 0xc8, 0x91, 0xb4, 0xc7, 0x8b, 0xb0, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xbc, 0xb6, 0xa1, 0xd0, 0xb8, 0xa8, - 0xcd, 0xb6, 0xb7, 0xc0, 0xb4, 0xb5, 0xb1, 0xb1, 0xaa, 0xca, 0xd1, 0xb4, - 0xe3, 0xd7, 0xb5, 0xe2, 0xc1, 0xb0, 0xdb, 0xa8, 0xa3, 0xd2, 0x8a, 0xa9, - 0xb7, 0x7e, 0xa2, 0xbd, 0x89, 0xa9, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xc9, 0xaf, 0xaf, - 0xc5, 0xb5, 0xb8, 0xb8, 0xb1, 0xb1, 0xb6, 0xbb, 0xad, 0xd0, 0xd6, 0xb5, - 0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xaf, 0xdd, 0xb4, 0xa9, 0xdb, 0x92, 0x9a, - 0xc6, 0x84, 0xa7, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xac, 0xaa, 0xa6, 0xbd, 0xc3, 0xb0, 0xd2, 0xd7, 0xb5, - 0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xae, 0xdb, 0xb6, 0xa8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff -}; - -static void -quit_func (GtkWidget *widget, gpointer dummy) -{ - gtk_main_quit (); -} - -static void -expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data) -{ - GdkPixbuf *pixbuf; - - pixbuf = (GdkPixbuf *)gtk_object_get_data(GTK_OBJECT(drawing_area), "pixbuf"); - - if (!pixbuf->art_pixbuf) { - g_warning ("art_pixbuf is NULL in expose_func!!\n"); - return; - } - - if (pixbuf->art_pixbuf->has_alpha) { - gdk_draw_rgb_32_image (drawing_area->window, - drawing_area->style->black_gc, - event->area.x, event->area.y, - event->area.width, - event->area.height, - GDK_RGB_DITHER_MAX, - pixbuf->art_pixbuf->pixels - + (event->area.y * pixbuf->art_pixbuf->rowstride) - + (event->area.x * pixbuf->art_pixbuf->n_channels), - pixbuf->art_pixbuf->rowstride); - } else { - gdk_draw_rgb_image (drawing_area->window, - drawing_area->style->white_gc, - event->area.x, event->area.y, - event->area.width, - event->area.height, - GDK_RGB_DITHER_NORMAL, - pixbuf->art_pixbuf->pixels - + (event->area.y * pixbuf->art_pixbuf->rowstride) - + (event->area.x * pixbuf->art_pixbuf->n_channels), - pixbuf->art_pixbuf->rowstride); - } -} - -static void -config_func (GtkWidget *drawing_area, GdkEventConfigure *event, gpointer data) -{ - GdkPixbuf *pixbuf; - - pixbuf = (GdkPixbuf *)gtk_object_get_data(GTK_OBJECT(drawing_area), "pixbuf"); - - g_print("X:%d Y:%d\n", event->width, event->height); - -#if 0 - if (((event->width) != (pixbuf->art_pixbuf->width)) || - ((event->height) != (pixbuf->art_pixbuf->height))) - gdk_pixbuf_scale(pixbuf, event->width, event->height); -#endif -} - -static GtkWidget* -new_testrgb_window (GdkPixbuf *pixbuf, gchar *title) -{ - GtkWidget *window; - GtkWidget *vbox; - GtkWidget *temp_box; - GtkWidget *button; - GtkWidget *drawing_area; - gint w, h; - - w = pixbuf->art_pixbuf->width; - h = pixbuf->art_pixbuf->height; - - window = gtk_widget_new (gtk_window_get_type (), - "GtkObject::user_data", NULL, - "GtkWindow::type", GTK_WINDOW_TOPLEVEL, - "GtkWindow::title", "testrgb", - "GtkWindow::allow_shrink", TRUE, - NULL); - gtk_signal_connect (GTK_OBJECT (window), "destroy", - (GtkSignalFunc) quit_func, NULL); - - vbox = gtk_vbox_new (FALSE, 0); - - if (title) - gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new (title), - TRUE, TRUE, 0); - - drawing_area = gtk_drawing_area_new (); - - temp_box = gtk_hbox_new (FALSE, 0); - gtk_drawing_area_size (GTK_DRAWING_AREA(drawing_area), w, h); - gtk_box_pack_start (GTK_BOX (temp_box), drawing_area, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), temp_box, FALSE, FALSE, 0); - - - gtk_signal_connect (GTK_OBJECT(drawing_area), "expose_event", - GTK_SIGNAL_FUNC(expose_func), NULL); - gtk_signal_connect (GTK_OBJECT(drawing_area), "configure_event", - GTK_SIGNAL_FUNC (config_func), NULL); - - gtk_object_set_data (GTK_OBJECT(drawing_area), "pixbuf", pixbuf); - - gtk_widget_show (drawing_area); - - button = gtk_button_new_with_label ("Quit"); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (window)); - - gtk_widget_show (button); - - gtk_container_add (GTK_CONTAINER (window), vbox); - gtk_widget_show_all (vbox); - - gtk_widget_show (window); - - return window; -} - - -static gint -update_timeout(gpointer data) -{ - ProgressFileStatus *status = data; - gboolean done; - - done = TRUE; - if (!feof(status->imagefile)) { - gint nbytes; - - nbytes = fread(status->buf, 1, status->readlen, - status->imagefile); - - done = !gdk_pixbuf_loader_write (GDK_PIXBUF_LOADER (status->loader), status->buf, nbytes); - - } - - if (done) { - gtk_widget_queue_draw(*status->rgbwin); - gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader)); - gtk_object_destroy (GTK_OBJECT(status->loader)); - fclose (status->imagefile); - g_free (status->buf); - } - - return !done; -} - - -static void -progressive_prepared_callback(GdkPixbufLoader* loader, gpointer data) -{ - GtkWidget** retloc = data; - GdkPixbuf* pixbuf; - - pixbuf = gdk_pixbuf_loader_get_pixbuf(loader); - g_assert(pixbuf != NULL); - - gdk_pixbuf_ref(pixbuf); /* for the RGB window */ - - *retloc = new_testrgb_window(pixbuf, "Progressive"); - - return; -} - - -static void -progressive_updated_callback(GdkPixbufLoader* loader, guint x, guint y, guint width, guint height, gpointer data) -{ - GtkWidget** window_loc = data; - -/* g_print ("progressive_updated_callback:\n\t%d\t%d\t%d\t%d\n", x, y, width, height); */ - - if (*window_loc != NULL) - gtk_widget_queue_draw_area(*window_loc, - x, y, width, height); - - return; -} - -static int readlen = 4096; - -int -main (int argc, char **argv) -{ - int i; - int found_valid = FALSE; - - GdkPixbufAnimation *animation; - GdkPixbufLoader *pixbuf_loader; - - gtk_init (&argc, &argv); - - gdk_rgb_set_verbose (TRUE); - - gdk_rgb_init (); - - gtk_widget_set_default_colormap (gdk_rgb_get_cmap ()); - gtk_widget_set_default_visual (gdk_rgb_get_visual ()); - - { - char *tbf_readlen = getenv("TBF_READLEN"); - if(tbf_readlen) readlen = atoi(tbf_readlen); - } - - { - char *tbf_bps = getenv("TBF_KBPS"); - guint bps; - - if (tbf_bps) { - bps = atoi(tbf_bps); - g_print ("Simulating %d kBytes/sec\n", bps); - readlen = (bps*1024)/10; - } - } - - i = 1; - if (argc == 1) { - g_print ("USAGE: testanimation FILE1 ...\n"); - return 0; - } else { - for (i = 1; i < argc; i++) { - - animation = gdk_pixbuf_animation_new_from_file (argv[i]); - - if (animation) { - GList *listptr; - for (listptr = animation->frames; listptr; listptr = listptr->next){ - g_print ("in a frame\n"); - new_testrgb_window (((GdkPixbufFrame *)listptr->data)->pixbuf, "File"); - } - found_valid = TRUE; - } - } -#if 0 - { - GtkWidget* rgb_window = NULL; - ProgressFileStatus status; - - pixbuf_loader = gdk_pixbuf_loader_new (); - status.loader = pixbuf_loader; - - status.rgbwin = &rgb_window; - - status.buf = g_malloc (readlen); - gtk_signal_connect(GTK_OBJECT(pixbuf_loader), - "area_prepared", - GTK_SIGNAL_FUNC(progressive_prepared_callback), - &rgb_window); - - gtk_signal_connect(GTK_OBJECT(pixbuf_loader), - "area_updated", - GTK_SIGNAL_FUNC(progressive_updated_callback), - &rgb_window); - - - status.imagefile = fopen (argv[1], "r"); - g_assert (status.imagefile != NULL); - - status.readlen = readlen; - - status.timeout = gtk_timeout_add(100, update_timeout, &status); - } -#endif - } - - if (found_valid) - gtk_main (); - - return 0; -} diff --git a/demos/testpixbuf-drawable.c b/demos/testpixbuf-drawable.c deleted file mode 100644 index a465aa4c82..0000000000 --- a/demos/testpixbuf-drawable.c +++ /dev/null @@ -1,113 +0,0 @@ -#include -#include -#include -#include "gdk-pixbuf.h" - -int close_app(GtkWidget *widget, gpointer data) -{ - gtk_main_quit(); - return TRUE; -} - -int expose_cb(GtkWidget *drawing_area, GdkEventExpose *evt, gpointer data) -{ - GdkPixbuf *pixbuf; - - pixbuf = (GdkPixbuf *) gtk_object_get_data(GTK_OBJECT(drawing_area), - "pixbuf"); - if(pixbuf->art_pixbuf->has_alpha) - { - gdk_draw_rgb_32_image(drawing_area->window, - drawing_area->style->black_gc, - evt->area.x, evt->area.y, - evt->area.width, - evt->area.height, - GDK_RGB_DITHER_MAX, - pixbuf->art_pixbuf->pixels + - (evt->area.y * pixbuf->art_pixbuf->rowstride) + - (evt->area.x * pixbuf->art_pixbuf->n_channels), - pixbuf->art_pixbuf->rowstride); - } - else - { - gdk_draw_rgb_image(drawing_area->window, - drawing_area->style->black_gc, - evt->area.x, evt->area.y, - evt->area.width, - evt->area.height, - GDK_RGB_DITHER_NORMAL, - pixbuf->art_pixbuf->pixels + - (evt->area.y * pixbuf->art_pixbuf->rowstride) + - (evt->area.x * pixbuf->art_pixbuf->n_channels), - pixbuf->art_pixbuf->rowstride); - } - return FALSE; -} - -int configure_cb(GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data) -{ - GdkPixbuf *pixbuf; - - pixbuf = (GdkPixbuf *) gtk_object_get_data(GTK_OBJECT(drawing_area), - "pixbuf"); - - g_print("X:%d Y:%d\n", evt->width, evt->height); - if(evt->width != pixbuf->art_pixbuf->width || evt->height != pixbuf->art_pixbuf->height) - { - GdkWindow *root; - GdkPixbuf *new_pixbuf; - - root = GDK_ROOT_PARENT(); - new_pixbuf = gdk_pixbuf_get_from_drawable(NULL, root, NULL, - 0, 0, 0, 0, evt->width, evt->height); - gtk_object_set_data(GTK_OBJECT(drawing_area), "pixbuf", new_pixbuf); - gdk_pixbuf_unref(pixbuf); - } - - return FALSE; -} - -int main(int argc, char **argv) -{ - GdkWindow *root; - GtkWidget *window; - GtkWidget *vbox; - GtkWidget *drawing_area; - GdkPixbuf *pixbuf; - - gtk_init(&argc, &argv); - gdk_rgb_set_verbose(TRUE); - gdk_rgb_init(); - - gtk_widget_set_default_colormap(gdk_rgb_get_cmap()); - gtk_widget_set_default_visual(gdk_rgb_get_visual()); - - root = GDK_ROOT_PARENT(); - pixbuf = gdk_pixbuf_get_from_drawable(NULL, root, NULL, - 0, 0, 0, 0, 150, 160); - - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_signal_connect(GTK_OBJECT(window), "delete_event", - GTK_SIGNAL_FUNC(close_app), NULL); - gtk_signal_connect(GTK_OBJECT(window), "destroy", - GTK_SIGNAL_FUNC(close_app), NULL); - - vbox = gtk_vbox_new(FALSE, 0); - gtk_container_add(GTK_CONTAINER(window), vbox); - - drawing_area = gtk_drawing_area_new(); - gtk_drawing_area_size(GTK_DRAWING_AREA(drawing_area), - pixbuf->art_pixbuf->width, - pixbuf->art_pixbuf->height); - gtk_signal_connect(GTK_OBJECT(drawing_area), "expose_event", - GTK_SIGNAL_FUNC(expose_cb), NULL); - - gtk_signal_connect(GTK_OBJECT(drawing_area), "configure_event", - GTK_SIGNAL_FUNC(configure_cb), NULL); - gtk_object_set_data(GTK_OBJECT(drawing_area), "pixbuf", pixbuf); - gtk_box_pack_start(GTK_BOX(vbox), drawing_area, TRUE, TRUE, 0); - - gtk_widget_show_all(window); - gtk_main(); - return 0; -} diff --git a/demos/testpixbuf-scale.c b/demos/testpixbuf-scale.c deleted file mode 100644 index 2efafd6da9..0000000000 --- a/demos/testpixbuf-scale.c +++ /dev/null @@ -1,156 +0,0 @@ -#include -#include "gdk-pixbuf.h" - -#include - -ArtFilterLevel filter_level = ART_FILTER_BILINEAR; -int overall_alpha = 255; -GdkPixbuf *pixbuf; -GtkWidget *darea; - -void -set_filter_level (GtkWidget *widget, gpointer data) -{ - filter_level = GPOINTER_TO_UINT (data); - gtk_widget_queue_draw (darea); -} - -void -overall_changed_cb (GtkAdjustment *adjustment, gpointer data) -{ - if (adjustment->value != overall_alpha) - { - overall_alpha = adjustment->value; - gtk_widget_queue_draw (darea); - } -} - -gboolean -expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) -{ - GdkPixbuf *dest; - - gdk_window_set_back_pixmap (widget->window, NULL, FALSE); - - dest = gdk_pixbuf_new (ART_PIX_RGB, FALSE, 8, event->area.width, event->area.height); - - gdk_pixbuf_composite_color (pixbuf, dest, - 0, 0, event->area.width, event->area.height, - -event->area.x, -event->area.y, - (double) widget->allocation.width / pixbuf->art_pixbuf->width, - (double) widget->allocation.height / pixbuf->art_pixbuf->height, - filter_level, overall_alpha, - event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555); - - gdk_pixbuf_render_to_drawable (dest, widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], - 0, 0, event->area.x, event->area.y, - event->area.width, event->area.height, - GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y); - - gdk_pixbuf_unref (dest); - - return TRUE; -} - -int -main(int argc, char **argv) -{ - GtkWidget *window, *vbox; - GtkWidget *menuitem, *optionmenu, *menu; - GtkWidget *alignment; - GtkWidget *hbox, *label, *hscale; - GtkAdjustment *adjustment; - GtkRequisition scratch_requisition; - - gtk_init (&argc, &argv); - gdk_rgb_init (); - - if (argc != 2) { - fprintf (stderr, "Usage: testpixbuf-scale FILE\n"); - exit (1); - } - - pixbuf = gdk_pixbuf_new_from_file (argv[1]); - if (!pixbuf) { - fprintf (stderr, "Cannot load %s\n", argv[1]); - exit(1); - } - - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_signal_connect (GTK_OBJECT (window), "destroy", - GTK_SIGNAL_FUNC (gtk_main_quit), NULL); - - vbox = gtk_vbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (window), vbox); - - menu = gtk_menu_new (); - - menuitem = gtk_menu_item_new_with_label ("NEAREST"); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (set_filter_level), - GUINT_TO_POINTER (ART_FILTER_NEAREST)); - gtk_widget_show (menuitem); - gtk_container_add (GTK_CONTAINER (menu), menuitem); - - menuitem = gtk_menu_item_new_with_label ("BILINEAR"); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (set_filter_level), - GUINT_TO_POINTER (ART_FILTER_BILINEAR)); - gtk_widget_show (menuitem); - gtk_container_add (GTK_CONTAINER (menu), menuitem); - - menuitem = gtk_menu_item_new_with_label ("TILES"); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (set_filter_level), - GUINT_TO_POINTER (ART_FILTER_TILES)); - gtk_container_add (GTK_CONTAINER (menu), menuitem); - - menuitem = gtk_menu_item_new_with_label ("HYPER"); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (set_filter_level), - GUINT_TO_POINTER (ART_FILTER_HYPER)); - gtk_container_add (GTK_CONTAINER (menu), menuitem); - - optionmenu = gtk_option_menu_new (); - gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu); - gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), 1); - - alignment = gtk_alignment_new (0.0, 0.0, 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0); - - hbox = gtk_hbox_new (FALSE, 4); - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - - label = gtk_label_new ("Overall Alpha:"); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - - adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (overall_alpha, 0, 255, 1, 10, 0)); - gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed", - GTK_SIGNAL_FUNC (overall_changed_cb), NULL); - - hscale = gtk_hscale_new (adjustment); - gtk_scale_set_digits (GTK_SCALE (hscale), 0); - gtk_box_pack_start (GTK_BOX (hbox), hscale, TRUE, TRUE, 0); - - gtk_container_add (GTK_CONTAINER (alignment), optionmenu); - gtk_widget_show_all (vbox); - - /* Compute the size without the drawing area, so we know how big to make the default size */ - gtk_widget_size_request (vbox, &scratch_requisition); - - darea = gtk_drawing_area_new (); - gtk_box_pack_start (GTK_BOX (vbox), darea, TRUE, TRUE, 0); - - gtk_signal_connect (GTK_OBJECT (darea), "expose_event", - GTK_SIGNAL_FUNC (expose_cb), NULL); - - gtk_window_set_default_size (GTK_WINDOW (window), - pixbuf->art_pixbuf->width, - scratch_requisition.height + pixbuf->art_pixbuf->height); - - gtk_widget_show_all (window); - - gtk_main (); - - return 0; -} diff --git a/demos/testpixbuf.c b/demos/testpixbuf.c deleted file mode 100644 index 423d7d3308..0000000000 --- a/demos/testpixbuf.c +++ /dev/null @@ -1,594 +0,0 @@ - -/* testpixbuf -- test program for gdk-pixbuf code - * Copyright (C) 1999 Mark Crichton, Larry Ewing - * - * 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. - */ - -#include -#include -#include -#include -#include -#include "gdk-pixbuf.h" -#include "gdk-pixbuf-io.h" -#include "gdk-pixbuf-loader.h" - -typedef struct { - FILE *imagefile; - GdkPixbufLoader *loader; - GtkWidget **rgbwin; - guchar *buf; - guint timeout; - guint readlen; - -} ProgressFileStatus; - - -#define DEFAULT_WIDTH 24 -#define DEFAULT_HEIGHT 24 - -static const unsigned char default_image[] = { - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xae, 0xb3, 0xb3, 0xc6, 0xc9, 0xcd, 0xd7, 0xd4, 0xdf, - 0xec, 0xde, 0xf3, 0xe7, 0xcb, 0xe9, 0xd9, 0xb5, 0xd3, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xb1, 0xb7, 0xa5, - 0xb0, 0xb8, 0xad, 0xb3, 0xb9, 0xb6, 0xc1, 0xc6, 0xc8, 0xd5, 0xd3, 0xdc, - 0xec, 0xde, 0xf3, 0xe5, 0xca, 0xe6, 0xe0, 0xbb, 0xd7, 0xe1, 0xad, 0xc2, - 0xe3, 0xac, 0xa3, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xca, 0xc1, 0xa4, 0xc5, 0xc7, 0xac, - 0xb7, 0xbe, 0xaf, 0xad, 0xb4, 0xaf, 0xbd, 0xc2, 0xc3, 0xd1, 0xd0, 0xd8, - 0xec, 0xde, 0xf3, 0xe5, 0xc7, 0xe4, 0xe0, 0xb6, 0xd1, 0xe7, 0xa9, 0xb4, - 0xed, 0xcd, 0xb6, 0xd6, 0xcf, 0xae, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0xdf, 0xa7, 0x9f, 0xdd, 0xbf, 0xaa, 0xcf, 0xc5, 0xa9, - 0xc1, 0xc4, 0xac, 0xb2, 0xba, 0xaf, 0xb6, 0xbb, 0xbb, 0xcd, 0xce, 0xd4, - 0xec, 0xde, 0xf3, 0xe4, 0xc4, 0xe1, 0xe0, 0xaf, 0xc7, 0xea, 0xbc, 0xae, - 0xe1, 0xd6, 0xb6, 0xc7, 0xcc, 0xae, 0xa2, 0xab, 0x9a, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0xe3, 0xab, 0xc0, 0xe6, 0xa3, 0xa7, 0xdf, 0xba, 0xa8, - 0xcf, 0xc5, 0xa9, 0xbd, 0xc2, 0xae, 0xad, 0xb4, 0xaf, 0xc6, 0xc9, 0xcd, - 0xec, 0xde, 0xf3, 0xe2, 0xbf, 0xdc, 0xe7, 0xa9, 0xb4, 0xe7, 0xd6, 0xb8, - 0xc7, 0xcc, 0xae, 0xac, 0xb6, 0xa6, 0x9d, 0xa8, 0x9f, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xd9, 0xaf, 0xcf, 0xe1, 0xb4, 0xd2, 0xe2, 0xb0, 0xcb, 0xe4, 0xa9, 0xbb, - 0xe2, 0xb2, 0xa6, 0xcf, 0xc5, 0xa9, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d, - 0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xed, 0xcd, 0xb6, 0xc7, 0xcc, 0xae, - 0xa6, 0xb1, 0xa3, 0x98, 0xa2, 0x9c, 0x8f, 0x97, 0x96, 0x7e, 0x84, 0x85, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xe8, 0xc6, 0xe7, 0xe5, 0xc2, 0xe3, 0xe3, 0xbd, 0xdd, 0xe1, 0xb6, 0xd5, - 0xe2, 0xb0, 0xcb, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0x9d, 0xa8, 0x9f, - 0x8f, 0x97, 0x96, 0x8b, 0x90, 0x92, 0x97, 0x9e, 0xa2, 0xa0, 0xa7, 0xae, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xe7, 0xd3, 0xed, 0xe8, 0xd1, 0xed, 0xe8, 0xce, 0xec, 0xe9, 0xcc, 0xeb, - 0xe8, 0xc6, 0xe7, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0x97, 0x9e, 0xa2, - 0xa7, 0xae, 0xb7, 0xb2, 0xb6, 0xc5, 0xba, 0xbc, 0xce, 0xbf, 0xbe, 0xd3, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, - 0xe9, 0xdf, 0xf0, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0xe1, 0xd2, 0xf7, - 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xca, 0xc7, 0xd2, 0xc5, 0xc4, 0xcd, 0xbf, 0xbf, 0xc7, 0xb8, 0xb9, 0xc0, - 0xae, 0xaf, 0xb6, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0xd5, 0xa8, 0xe1, - 0xd8, 0xb2, 0xe9, 0xd9, 0xb8, 0xed, 0xdb, 0xbd, 0xf0, 0xdc, 0xbf, 0xf1, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0xa4, 0xa6, 0xac, 0xa8, 0xaa, 0xaf, 0xa0, 0xa6, 0xa8, 0x98, 0x9e, 0x9c, - 0xa1, 0xa8, 0x9e, 0xb1, 0xb6, 0xa1, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d, - 0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xc0, 0x8c, 0xad, 0xcc, 0x90, 0xb5, - 0xd3, 0x94, 0xca, 0xd6, 0xa2, 0xdb, 0xd5, 0xa8, 0xe1, 0xcf, 0xa7, 0xdf, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0x98, 0x9f, 0x9b, 0xa1, 0xa8, 0x9e, 0xac, 0xb3, 0xa0, - 0xb9, 0xb9, 0xa4, 0xd0, 0xb8, 0xa8, 0xc5, 0xb5, 0xb8, 0xb6, 0xbb, 0xad, - 0xe3, 0xd7, 0xb5, 0xdd, 0xb4, 0xa9, 0xcb, 0x89, 0xac, 0xc0, 0x8c, 0xad, - 0xc8, 0x91, 0xb5, 0xd1, 0x8d, 0xb7, 0xd3, 0x94, 0xca, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0x00, 0x00, 0x00, 0xa1, 0xa7, 0x98, 0xb1, 0xb6, 0xa1, 0xbd, 0xb9, 0xa5, - 0xd0, 0xb8, 0xa8, 0xca, 0xb5, 0xb7, 0xb8, 0xb1, 0xb1, 0xc2, 0xc8, 0xb2, - 0xe3, 0xd7, 0xb5, 0xe1, 0xbf, 0xaf, 0xdb, 0x92, 0x9a, 0xbe, 0x82, 0xa6, - 0xc0, 0x8c, 0xad, 0xc8, 0x91, 0xb4, 0xc7, 0x8b, 0xb0, 0x00, 0x00, 0x00, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xbc, 0xb6, 0xa1, 0xd0, 0xb8, 0xa8, - 0xcd, 0xb6, 0xb7, 0xc0, 0xb4, 0xb5, 0xb1, 0xb1, 0xaa, 0xca, 0xd1, 0xb4, - 0xe3, 0xd7, 0xb5, 0xe2, 0xc1, 0xb0, 0xdb, 0xa8, 0xa3, 0xd2, 0x8a, 0xa9, - 0xb7, 0x7e, 0xa2, 0xbd, 0x89, 0xa9, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xc9, 0xaf, 0xaf, - 0xc5, 0xb5, 0xb8, 0xb8, 0xb1, 0xb1, 0xb6, 0xbb, 0xad, 0xd0, 0xd6, 0xb5, - 0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xaf, 0xdd, 0xb4, 0xa9, 0xdb, 0x92, 0x9a, - 0xc6, 0x84, 0xa7, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xac, 0xaa, 0xa6, 0xbd, 0xc3, 0xb0, 0xd2, 0xd7, 0xb5, - 0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xae, 0xdb, 0xb6, 0xa8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, - 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff -}; - - -static const char * book_open_xpm[] = { -"16 16 4 1", -" c None s None", -". c black", -"X c #808080", -"o c white", -" ", -" .. ", -" .Xo. ... ", -" .Xoo. ..oo. ", -" .Xooo.Xooo... ", -" .Xooo.oooo.X. ", -" .Xooo.Xooo.X. ", -" .Xooo.oooo.X. ", -" .Xooo.Xooo.X. ", -" .Xooo.oooo.X. ", -" .Xoo.Xoo..X. ", -" .Xo.o..ooX. ", -" .X..XXXXX. ", -" ..X....... ", -" .. ", -" "}; - -static const char * book_closed_xpm[] = { -"16 16 6 1", -" c None s None", -". c black", -"X c red", -"o c yellow", -"O c #808080", -"# c white", -" ", -" .. ", -" ..XX. ", -" ..XXXXX. ", -" ..XXXXXXXX. ", -".ooXXXXXXXXX. ", -"..ooXXXXXXXXX. ", -".X.ooXXXXXXXXX. ", -".XX.ooXXXXXX.. ", -" .XX.ooXXX..#O ", -" .XX.oo..##OO. ", -" .XX..##OO.. ", -" .X.#OO.. ", -" ..O.. ", -" .. ", -" "}; - -static const char * mini_page_xpm[] = { -"16 16 4 1", -" c None s None", -". c black", -"X c white", -"o c #808080", -" ", -" ....... ", -" .XXXXX.. ", -" .XoooX.X. ", -" .XXXXX.... ", -" .XooooXoo.o ", -" .XXXXXXXX.o ", -" .XooooooX.o ", -" .XXXXXXXX.o ", -" .XooooooX.o ", -" .XXXXXXXX.o ", -" .XooooooX.o ", -" .XXXXXXXX.o ", -" ..........o ", -" oooooooooo ", -" "}; - -static const char * gtk_mini_xpm[] = { -"15 20 17 1", -" c None", -". c #14121F", -"+ c #278828", -"@ c #9B3334", -"# c #284C72", -"$ c #24692A", -"% c #69282E", -"& c #37C539", -"* c #1D2F4D", -"= c #6D7076", -"- c #7D8482", -"; c #E24A49", -"> c #515357", -", c #9B9C9B", -"' c #2FA232", -") c #3CE23D", -"! c #3B6CCB", -" ", -" ***> ", -" >.*!!!* ", -" ***....#*= ", -" *!*.!!!**!!# ", -" .!!#*!#*!!!!# ", -" @%#!.##.*!!$& ", -" @;%*!*.#!#')) ", -" @;;@%!!*$&)'' ", -" @%.%@%$'&)$+' ", -" @;...@$'*'*)+ ", -" @;%..@$+*.')$ ", -" @;%%;;$+..$)# ", -" @;%%;@$$$'.$# ", -" %;@@;;$$+))&* ", -" %;;;@+$&)&* ", -" %;;@'))+> ", -" %;@'&# ", -" >%$$ ", -" >= "}; - -const gchar ** xpms[] = { - book_open_xpm, - book_closed_xpm, - mini_page_xpm, - gtk_mini_xpm, - NULL -}; - -static void -quit_func (GtkWidget *widget, gpointer dummy) -{ - gtk_main_quit (); -} - -static void -expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data) -{ - GdkPixbuf *pixbuf; - - pixbuf = (GdkPixbuf *)gtk_object_get_data(GTK_OBJECT(drawing_area), "pixbuf"); - - if (!pixbuf->art_pixbuf) { - g_warning ("art_pixbuf is NULL in expose_func!!\n"); - return; - } - - if (pixbuf->art_pixbuf->has_alpha) { - gdk_draw_rgb_32_image (drawing_area->window, - drawing_area->style->black_gc, - event->area.x, event->area.y, - event->area.width, - event->area.height, - GDK_RGB_DITHER_MAX, - pixbuf->art_pixbuf->pixels - + (event->area.y * pixbuf->art_pixbuf->rowstride) - + (event->area.x * pixbuf->art_pixbuf->n_channels), - pixbuf->art_pixbuf->rowstride); - } else { - gdk_draw_rgb_image (drawing_area->window, - drawing_area->style->white_gc, - event->area.x, event->area.y, - event->area.width, - event->area.height, - GDK_RGB_DITHER_NORMAL, - pixbuf->art_pixbuf->pixels - + (event->area.y * pixbuf->art_pixbuf->rowstride) - + (event->area.x * pixbuf->art_pixbuf->n_channels), - pixbuf->art_pixbuf->rowstride); - } -} - -static void -config_func (GtkWidget *drawing_area, GdkEventConfigure *event, gpointer data) -{ - GdkPixbuf *pixbuf; - - pixbuf = (GdkPixbuf *)gtk_object_get_data(GTK_OBJECT(drawing_area), "pixbuf"); - - g_print("X:%d Y:%d\n", event->width, event->height); - -#if 0 - if (((event->width) != (pixbuf->art_pixbuf->width)) || - ((event->height) != (pixbuf->art_pixbuf->height))) - gdk_pixbuf_scale(pixbuf, event->width, event->height); -#endif -} - -static GtkWidget* -new_testrgb_window (GdkPixbuf *pixbuf, gchar *title) -{ - GtkWidget *window; - GtkWidget *vbox; - GtkWidget *temp_box; - GtkWidget *button; - GtkWidget *drawing_area; - gint w, h; - - w = pixbuf->art_pixbuf->width; - h = pixbuf->art_pixbuf->height; - - window = gtk_widget_new (gtk_window_get_type (), - "GtkObject::user_data", NULL, - "GtkWindow::type", GTK_WINDOW_TOPLEVEL, - "GtkWindow::title", "testrgb", - "GtkWindow::allow_shrink", TRUE, - NULL); - gtk_signal_connect (GTK_OBJECT (window), "destroy", - (GtkSignalFunc) quit_func, NULL); - - vbox = gtk_vbox_new (FALSE, 0); - - if (title) - gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new (title), - TRUE, TRUE, 0); - - drawing_area = gtk_drawing_area_new (); - - temp_box = gtk_hbox_new (FALSE, 0); - gtk_drawing_area_size (GTK_DRAWING_AREA(drawing_area), w, h); - gtk_box_pack_start (GTK_BOX (temp_box), drawing_area, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), temp_box, FALSE, FALSE, 0); - - - gtk_signal_connect (GTK_OBJECT(drawing_area), "expose_event", - GTK_SIGNAL_FUNC(expose_func), NULL); - gtk_signal_connect (GTK_OBJECT(drawing_area), "configure_event", - GTK_SIGNAL_FUNC (config_func), NULL); - - gtk_object_set_data (GTK_OBJECT(drawing_area), "pixbuf", pixbuf); - - gtk_widget_show (drawing_area); - - button = gtk_button_new_with_label ("Quit"); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (window)); - - gtk_widget_show (button); - - gtk_container_add (GTK_CONTAINER (window), vbox); - gtk_widget_show_all (vbox); - - gtk_widget_show (window); - - return window; -} - - -static gint -update_timeout(gpointer data) -{ - ProgressFileStatus *status = data; - gboolean done; - - done = TRUE; - if (!feof(status->imagefile)) { - gint nbytes; - - nbytes = fread(status->buf, 1, status->readlen, - status->imagefile); - - done = !gdk_pixbuf_loader_write (GDK_PIXBUF_LOADER (status->loader), status->buf, nbytes); - - } - - if (done) { - gtk_widget_queue_draw(*status->rgbwin); - gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader)); - gtk_object_destroy (GTK_OBJECT(status->loader)); - fclose (status->imagefile); - g_free (status->buf); - } - - return !done; -} - - -static void -progressive_prepared_callback(GdkPixbufLoader* loader, gpointer data) -{ - GtkWidget** retloc = data; - GdkPixbuf* pixbuf; - - pixbuf = gdk_pixbuf_loader_get_pixbuf(loader); - g_assert(pixbuf != NULL); - - gdk_pixbuf_ref(pixbuf); /* for the RGB window */ - - *retloc = new_testrgb_window(pixbuf, "Progressive"); - - return; -} - - -static void -progressive_updated_callback(GdkPixbufLoader* loader, guint x, guint y, guint width, guint height, gpointer data) -{ - GtkWidget** window_loc = data; - -/* g_print ("progressive_updated_callback:\n\t%d\t%d\t%d\t%d\n", x, y, width, height); */ - - if (*window_loc != NULL) - gtk_widget_queue_draw_area(*window_loc, - x, y, width, height); - - return; -} - -static int readlen = 4096; - -int -main (int argc, char **argv) -{ - int i; - int found_valid = FALSE; - - GdkPixbuf *pixbuf; - GdkPixbufLoader *pixbuf_loader; - - gtk_init (&argc, &argv); - - gdk_rgb_set_verbose (TRUE); - - gdk_rgb_init (); - - gtk_widget_set_default_colormap (gdk_rgb_get_cmap ()); - gtk_widget_set_default_visual (gdk_rgb_get_visual ()); - - { - char *tbf_readlen = getenv("TBF_READLEN"); - if(tbf_readlen) readlen = atoi(tbf_readlen); - } - - { - char *tbf_bps = getenv("TBF_KBPS"); - guint bps; - - if (tbf_bps) { - bps = atoi(tbf_bps); - g_print ("Simulating %d kBytes/sec\n", bps); - readlen = (bps*1024)/10; - } - } - - i = 1; - if (argc == 1) { - const gchar*** xpmp; - - pixbuf = gdk_pixbuf_new_from_data (default_image, ART_PIX_RGB, FALSE, - DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_WIDTH * 3, - NULL, NULL); - new_testrgb_window (pixbuf, NULL); - - xpmp = xpms; - while (*xpmp) { - pixbuf = gdk_pixbuf_new_from_xpm_data (*xpmp); - new_testrgb_window (pixbuf, NULL); - ++xpmp; - } - - found_valid = TRUE; - } else { - for (i = 1; i < argc; i++) { - - pixbuf = gdk_pixbuf_new_from_file (argv[i]); -#if 0 - pixbuf = gdk_pixbuf_rotate(pixbuf, 10.0); -#endif - - if (pixbuf) { - new_testrgb_window (pixbuf, "File"); - found_valid = TRUE; - } - } -#if 1 - { - GtkWidget* rgb_window = NULL; - ProgressFileStatus status; - - pixbuf_loader = gdk_pixbuf_loader_new (); - status.loader = pixbuf_loader; - - status.rgbwin = &rgb_window; - - status.buf = g_malloc (readlen); - gtk_signal_connect(GTK_OBJECT(pixbuf_loader), - "area_prepared", - GTK_SIGNAL_FUNC(progressive_prepared_callback), - &rgb_window); - - gtk_signal_connect(GTK_OBJECT(pixbuf_loader), - "area_updated", - GTK_SIGNAL_FUNC(progressive_updated_callback), - &rgb_window); - - - status.imagefile = fopen (argv[1], "r"); - g_assert (status.imagefile != NULL); - - status.readlen = readlen; - - status.timeout = gtk_timeout_add(100, update_timeout, &status); - } -#endif - } - - if (found_valid) - gtk_main (); - - return 0; -} diff --git a/docs/Changes-1.4.txt b/docs/Changes-1.4.txt index 436af8d204..e3507b833a 100644 --- a/docs/Changes-1.4.txt +++ b/docs/Changes-1.4.txt @@ -21,3 +21,10 @@ Incompatible Changes from GTK+-1.2 to GTK+-1.4: window's owner. - The detail arguments in the GtkStyleClass structure are now 'const gchar *'. + +- Inserting and deleting text in GtkEntry though functions such + as gtk_entry_insert_text() now leave the cursor at its original + position in the text instead of moving it to the location of + the insertion/deletion. + + diff --git a/docs/Makefile.am b/docs/Makefile.am index 8d58f71fdd..b0dad4b1e1 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -187,15 +187,19 @@ EXTRA_DIST += \ gtk_tut_fr.sgml \ gtk_tut_packbox1.gif \ gtk_tut_packbox2.gif \ - html/gtk_tut_table.gif \ - html/gtk_tut_packbox1.gif \ - html/gtk_tut_packbox2.gif \ - gtk_tut_table.gif \ - html/gdk.html \ - html/gdk_toc.html \ - html/gtk.html \ - html/gtk_toc.html \ - $(TUTORIAL_FILES) \ - $(TUTORIAL_FR_FILES) \ - $(TUTORIAL_IT_FILES) \ - $(FAQ_FILES) + gtk_tut_table.gif + +if HAVE_SGML2HTML +dist-hook: faq tutorial tutorial_it tutorial_fr + mkdir $(distdir)/html + cp -p $(srcdir)/html/*.html $(distdir)/html + cp -p $(srcdir)/html/*.gif $(distdir)/html + mkdir $(distdir)/text + cp -p $(srcdir)/text/*.txt $(distdir)/text +else +dist-hook: + echo "***" + echo "*** Warning: Tutorial and faq not built" + echo "*** DISTRIBUTION IS INCOMPLETE" + echo "***" +endif \ No newline at end of file diff --git a/docs/reference/AUTHORS b/docs/reference/AUTHORS deleted file mode 100644 index 64f46b74b2..0000000000 --- a/docs/reference/AUTHORS +++ /dev/null @@ -1,7 +0,0 @@ -Damon Chaplin and others. - -See: - - http://www.gtk.org/rdp/status.html - -for a complete list. diff --git a/docs/reference/COPYING b/docs/reference/COPYING deleted file mode 100644 index df952d3cab..0000000000 --- a/docs/reference/COPYING +++ /dev/null @@ -1,30 +0,0 @@ -This work may be reproduced and distributed in whole or in part, in -any medium, physical or electronic, so as long as this copyright -notice remains intact and unchanged on all copies. Commercial -redistribution is permitted and encouraged, but you may not -redistribute, in whole or in part, under terms more restrictive than -those under which you received it. If you redistribute a modified or -translated version of this work, you must also make the source code to -the modified or translated version available in electronic form -without charge. However, mere aggregation as part of a larger work -shall not count as a modification for this purpose. - -All code examples in this work are placed into the public domain, -and may be used, modified and redistributed without restriction. - -BECAUSE THIS WORK IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE WORK, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE WORK "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. SHOULD THE WORK PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY REPAIR OR CORRECTION. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE WORK AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -WORK, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog deleted file mode 100644 index 1cb588853c..0000000000 --- a/docs/reference/ChangeLog +++ /dev/null @@ -1,238 +0,0 @@ -Tue Mar 14 14:17:46 2000 Raph Levien - - * gdk/tmpl/rgb.sgml: Better explanation of gdk_rgb_set_min_colors. - Thanks to Stric for spotting it. - -2000-03-07 Damon Chaplin - - * gtk/tmpl/gtkclist.sgml: fix to gtk_clist_set_reorderable(). It - reorders rows, not columns. From Guy Harris . - -2000-02-29 Damon Chaplin - - * gtk/tmpl/gtkmenuitem.sgml: minor fix from Nicolas GEORGE - . - -2000-02-28 Damon Chaplin - - * gtk/tmpl/gtkradiomenuitem.sgml: - * gtk/tmpl/gtkmenuitem.sgml: - * gtk/tmpl/gtknotebook.sgml: new menu item sections and minor update to - notebook section from Nicolas GEORGE . - -2000-02-18 Damon Chaplin - - * gtk/tmpl/gtktooltips.sgml: patch from - David Benson to note that gtk_tooltips_set_colors() - does not work. - -2000-02-09 Damon Chaplin - - * gdk/tmpl/input_methods.sgml: minor fix. - -2000-02-03 Damon Chaplin - - * gdk/gdk-sections.txt: rearranged a bit. - - * gdk/tmpl/event_structs.sgml: updated. - - * gtk/gtk-sections.txt: added INCLUDE tag for Private Info section. - - * gdk/tmpl/color_contexts.sgml: added note saying it is deprecated. - * gdk/tmpl/dnd.sgml: added note saying read the GTK+ DnD docs. - -2000-02-02 Damon Chaplin - - * gdk/tmpl/*.sgml: ran make templates. - - * gdk/gdk-docs.sgml: rearranged sections. - - * gdk/tmpl/events.sgml: documented. - - * gdk/tmpl/general.sgml: documented. - - * gdk/tmpl/rgb.sgml: fixed a few '@' -> '#'. - - * gdk/gdk-sections.txt: rearranged a few bits, including moving - GdkWChar and related functions from the input method section to the - font section, and GdkCapStyle etc. from Drawing Primitives to GCs. - - * gdk/tmpl/images.sgml: documented. - - * gdk/tmpl/drawing.sgml: updated. - - * gdk/tmpl/regions.sgml: updated. - - * gdk/tmpl/input_contexts.sgml: documented. - - * gdk/tmpl/input_methods.sgml: documented. - - * gdk/tmpl/selections.sgml: changed xref to a link since Jade says - a xref to a RefEntry is not supported. - -2000-01-19 Damon Chaplin - - * gtk/tmpl/gtkscrollbar.sgml: Started. - -2000-01-08 Damon Chaplin - - * gtk/tmpl/gtkclist.sgml: update from Paul Schifferer - - -Wed Jan 5 10:23:41 2000 Owen Taylor - - * gtk/tmpl/gtkprogress.sgml: Missing , remove extra - * gtk/tmpl/gtkobject.sgml: dos2unix - * gtk/tmpl/gtkcurve.sgml: missing - * gtk/tmpl/gtkarg.sgml: dos2unix, missing - * gtk/tmpl/gtkcolorsel.sgml: Missing 's - * gtk/tmpl/gtksignal.sgml (signal): dos2unix, missing 's - * gtk/tmpl/gtkmarshal.sgml: Missing - -1999-11-16 Damon Chaplin - - * gtk/tmpl/gtkmenubar.sgml: fixed minor error - using . - - * gtk/tmpl/gtknotebook.sgml: - * gtk/tmpl/gtklist.sgml: new sections from - Nicolas George , with help from - "Bob Springett" . - - * gtk/tmpl/gtkobject.sgml: - * gtk/tmpl/gtkarg.sgml: new sections from - David Benson . - - * gtk/tmpl/gtkvbox.sgml: - * gtk/tmpl/gtkhbox.sgml: fixed line endings. - - * gtk/tmpl/gtkvbbox.sgml: update from Lee Mallabone - - - * gdk/tmpl/drawing.sgml: fixed error in gdk_draw_arc() @angle2 param - - it is relative to @angle1 rather than from the 3 o'clock position. - - * gtk/tmpl/gtkfontseldlg.sgml: changed enums to use @ fields. - - * gtk/tmpl/gtkcolorsel.sgml: - * gtk/tmpl/gtkcolorseldlg.sgml: - * gtk/tmpl/gtkprogress.sgml: - * gtk/tmpl/gtkprogressbar.sgml: new sections from Tom Martone - - - * gtk/tmpl/gtkclist.sgml: partially written documentation from - Paul Schifferer who won't be able to finish it - -1999-09-22 Martin Norbck - - * gtk/tmpl/gtkclist.sgml: Added information about the sorting functions - -Tue Oct 26 16:50:15 1999 Owen Taylor - - * gtk/tmpl/gtkrc.sgml: Added information about widget - paths and pattern matching. - -1999-09-22 Damon Chaplin - - * gtk/tmpl/*.sgml: ran make templates, to fix problems with structs. - - * gtk/gtk-sections.txt: rearranged GtkCombo section. - - * gtk/tmpl/gtkvseparator.sgml: - * gtk/tmpl/gtkhseparator.sgml: - * gtk/tmpl/gtkgc.sgml: - * gtk/tmpl/gtkfeatures.sgml: - * gtk/tmpl/gtktipsquery.sgml: - * gtk/tmpl/gtkitem.sgml: - * gtk/tmpl/gtkinvisible.sgml: - * gtk/tmpl/gtkgamma.sgml: - * gtk/tmpl/gtkdata.sgml: - * gtk/tmpl/gtkcurve.sgml: - * gtk/tmpl/gtkcombo.sgml: - * gtk/tmpl/gtkaccellabel.sgml: documented. - -1999-09-20 Damon Chaplin - - * gtk/gtk-docs.sgml: added role="no-toc" to the GTK+ Widgets & Objects - chapter since we've created our own special contents page. - -1999-09-19 Damon Chaplin - - * gtk/tmpl/gtkmarshal.sgml: - * gtk/tmpl/gtksignal.sgml: new sections from - David Benson . - - * gtk/gtk-sections.txt: rearranged signal sections, and made most - marshallers private. Moved GtkSignalRunType to signals section. - - * gtk/tmpl/gtkradiobutton.sgml: new section from Lee Mallabone. - -1999-09-17 Damon Chaplin - - * gtk/gtk-docs.sgml: removed menu factory and debugging sections. - - * gtk/gtk-sections.txt: made menu factory stuff private since it is - deprecated. Also made debugging stuff private since it is only useful - within GTK+. - -1999-09-14 Damon Chaplin - - * gtk/tmpl/gtkfilesel.sgml: fixed mismatched parentheses. - -1999-09-02 Damon Chaplin - - * gdk/tmpl/event_structs.sgml: - * gdk/tmpl/drawing.sgml: minor fixes. - -1999-09-20 David C. Mason - - * gtk/tmpl/gtkimage.sgml: first pass at gtkimage... not complete - -1999-08-28 Damon Chaplin - - * gtk/tmpl/gtkbbox.sgml: new section from Lee Mallabone. - - * gdk/gdk-sections.txt: rearranged rgb, regions, and drawing sections. - - * gdk/tmpl/rgb.sgml: new section from Raph Levien, with a few changes - by me, including a little example app. - - * gdk/tmpl/regions.sgml: - * gdk/tmpl/event_structs.sgml: - * gdk/tmpl/drawing.sgml: my first attempt. - * gdk/tmpl/cursors.sgml: tiny changes. - -Tue Aug 17 09:14:01 1999 Owen Taylor - - * gtk/tmpl/gtktypeutils.sgml: Fix corrupted end tag. - - * gtk/tmpl/gtkselection.sgml gtk/tmpl/gtkrc.sgml - gtk/tmpl/gtkdnd.sgml gtk/tmpl/gtkarrow.sgml - gtk/tmpl/gtkpaned.sgml gtk/tmpl/gtkmisc.sgml - gtk/tmpl/gtkhandlebox.sgml gtk/tmpl/gtkctree.sgml: - Added missing close tags. - -Thu Aug 19 14:43:08 1999 Owen Taylor - - * gdk/tmpl/gcs.sgml gdk/gdk-sections.txt: Added section. - (Written a while ago but fell through the cracks) - - * gtk/gtk-docs.sgml: Add a &hash; entity here as a - temporary hack. (There is no standard entity - for '#', and no way of escaping '#' in gtk-doc) - - * gtk/tmpl/gtkrc.sgml: Use the above to fix up #rrggbb - string literals. - - * gtk/tmpl/gtkdrawingarea.sgml: Fixed a couple - of errors in the example. (pointed out by - Nick Lamb) - -Mon Aug 16 6:60:53 1999 Owen Taylor - - * gdk/tmpl/properties.sgml - gdk/tmpl/selections.sgml - gdk/tmpl/input_devices.sgml: Documented - - * gdk/gdk-sections.txt: Moved around types for - input devices properties and selections, marked - a few functions as private. diff --git a/docs/reference/README b/docs/reference/README deleted file mode 100644 index 024306be4b..0000000000 --- a/docs/reference/README +++ /dev/null @@ -1,62 +0,0 @@ -This package contains the reference documentation -for GTK+. For more information about GTK+ -see: - - http://www.gtk.org - -For information about contributing to the -GLib/GTK+ reference documentation project, see: - - http://www.gtk.org/rdp/ - -The GTK+ reference documentation is freely redistributable, -see the file COPYING for details. - - -REQUIREMENTS -============ - -To build the documentation, you must have the gtk-doc -package installed. To rebuild the template files, -you must have the current version of the GTK+ -header files installed. - - -BUILD -===== - -First, run configure to generate the makefiles for this -module. There is one option specific to this package - - --with-html-dir=DIR top of installed HTML documentation tree - - -The Makefiles in the gdk/ and gtk/ subdirs each define three targets: - - templates: - - Scan the headers and merge the results with the current - template files - - sgml: - - Generate SGML files using the DocBook DTD from - the template files - - html: - - Generate HTML from the SGML files. - -To build the documentation, do: - - make sgml - make html - -You should only run the 'make templates' step if you -need to regenerate the templates for a more recent -version of the GTK+ sources. - -INSTALLATION -============ - - make install diff --git a/docs/reference/README.cvs-commits b/docs/reference/README.cvs-commits deleted file mode 100644 index 8b6edbd661..0000000000 --- a/docs/reference/README.cvs-commits +++ /dev/null @@ -1,39 +0,0 @@ -Before making any changes to this module, please -contact: - - Damon Chaplin - -This will ensure that duplicate work does not occur, -and also make sure we know who has written what -parts of the documentation. See - - http://www.gtk.org/rdp/ - -for more information. - -By contributing work to the Reference Documentation -Project, you agree that it will be covered under the -license terms described in the file COPYING -included in this directory. - - -Other notes: - -- Do not run 'make templates' unless you have - the latest cvs version of the gtk-1-2 - branch of GTK+ and the latest CVS version - of gtk-doc. - - (This is very important. Otherwise, the template - files may be come corrupted.) - - Make sure that gtk-config --prefix points - to the correct version of GTK+. - -- As always, ChangeLog entries should be made for - each commit. These can be really brief - "documented GHashTable"; but if you are editing - something someone else wrote, please be specific. - (Or better, send the changes to them for their - approval, first) - diff --git a/docs/reference/gdk-pixbuf/.cvsignore b/docs/reference/gdk-pixbuf/.cvsignore deleted file mode 100644 index 4a186dc1df..0000000000 --- a/docs/reference/gdk-pixbuf/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -Makefile.in -html -sgml -gdk-pixbuf.html diff --git a/docs/reference/gdk-pixbuf/Makefile.am b/docs/reference/gdk-pixbuf/Makefile.am deleted file mode 100644 index d9d18350c7..0000000000 --- a/docs/reference/gdk-pixbuf/Makefile.am +++ /dev/null @@ -1,109 +0,0 @@ -## Process this file with automake to produce Makefile.in - -# The name of the module. -DOC_MODULE=gdk-pixbuf - -# The top-level SGML file. -DOC_MAIN_SGML_FILE=gdk-pixbuf.sgml - -# The directory containing the source code (if it contains documentation). -DOC_SOURCE_DIR=$(GDK_PIXBUF_DIR)/gdk-pixbuf - -CFLAGS=`gnome-config --cflags gnomeui gdk_pixbuf gnomecanvaspixbuf` -LDFLAGS=`gnome-config --libs gnomeui gdk_pixbuf gnomecanvaspixbuf` - -HTML_DIR=$(datadir)/gnome/html - -TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) - -tmpl_sources = \ - tmpl/animation.sgml \ - tmpl/creating.sgml \ - tmpl/file-loading.sgml \ - tmpl/from-drawables.sgml \ - tmpl/gdk-pixbuf-loader.sgml \ - tmpl/gdk-pixbuf-unused.sgml \ - tmpl/gdk-pixbuf.sgml \ - tmpl/gnome-canvas-pixbuf.sgml \ - tmpl/refcounting.sgml \ - tmpl/rendering.sgml \ - tmpl/scaling.sgml \ - tmpl/util.sgml - -gdk_pixbuf_docdir = $(HTML_DIR) -gdk_pixbuf_doc_DATA = \ - gdk-pixbuf.html \ - gdk-pixbuf.hierarchy \ - gdk-pixbuf.types \ - gdk-pixbuf-decl.txt \ - gdk-pixbuf-sections.txt - -content_files = \ - compiling.sgml - -EXTRA_DIST = \ - $(gdk_pixbuf_doc_DATA) \ - $(content_files) - -if ENABLE_GTK_DOC -gdk-pixbuf.html: html/book1.html - -cd $(srcdir) && cp html/book1.html gdk-pixbuf.html -else -gdk-pixbuf.html: -endif - -html/book1.html: sgml/gdk-pixbuf-doc.bottom $(content_files) - $(MAKE) html - -sgml/gdk-pixbuf-doc.bottom: $(tmpl_sources) - $(MAKE) sgml - -scan: - -(cd $(srcdir) \ - && env CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) \ - gtkdoc-scanobj --module=$(DOC_MODULE) \ - && gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="pixops.h pixops-internal.h" ) - -templates: scan - cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) - -sgml: - cd $(srcdir) \ - && gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) - -html: - test -d $(srcdir)/html || mkdir $(srcdir)/html - -cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - -clean-local: - rm -f *~ *.bak *.signals *-unused.txt - -maintainer-clean-local: clean - cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt - -install-data-local: - $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) - (installfiles=`echo $(srcdir)/html/*.html`; \ - if test "$$installfiles" = '$(srcdir)/html/*.html'; \ - then echo '-- Nothing to install' ; \ - else \ - for i in $$installfiles; do \ - echo '-- Installing '$$i ; \ - $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ - done; \ - echo '-- Installing $(srcdir)/html/index.sgml' ; \ - $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \ - echo '-- Fixing Crossreferences' ; \ - gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)|| true; \ - fi) - -dist-hook: - mkdir $(distdir)/html - mkdir $(distdir)/sgml - mkdir $(distdir)/tmpl - -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html - -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl - -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml - -cp $(srcdir)/sgml/*.bottom $(srcdir)/sgml/*.top $(distdir)/sgml - -.PHONY : html sgml templates scan diff --git a/docs/reference/gdk-pixbuf/compiling.sgml b/docs/reference/gdk-pixbuf/compiling.sgml deleted file mode 100644 index 5bc123fef6..0000000000 --- a/docs/reference/gdk-pixbuf/compiling.sgml +++ /dev/null @@ -1,103 +0,0 @@ - - Compiling the gdk-pixbuf library - - - This appendix describes the special options you can use while - compiling the gdk-pixbuf library. - - - - Building the Library - - The gdk-pixbuf library uses the standard GNU build system, - using autoconf for package - configuration and resolving portability issues, - automake for building makefiles - that comply with the GNU Coding Standards, and - libtool for building shared - libraries on multiple platforms. The normal sequence for - compiling and installing the gdk-pixbuf library is thus: - - - ./configure - make - make install - - - - - The standard options provided by GNU - autoconf may be passed to the - configure script. Please see the - autoconf documentation or run - ./configure --help for information about - the standard options. - - - - - Extra Configuration Options - - - In addition to the normal options, the - configure script in the gdk-pixbuf library - supports these additional arguments: - - - configure - - - --disable-modules - --enable-modules - - - - --disable-gtk-doc - --enable-gtk-doc - - - - - - <systemitem>--disable-modules</systemitem> and - <systemitem>--enable-modules</systemitem> - - - Normally gdk-pixbuf will try to build the image file format - loaders as little shared libraries that are loaded on - demand. The --disable-modules - argument indicates that they should all be built statically - into the gdk-pixbuf library instead. This is useful for - people who need to produce statically-linked binaries. If - neither --disable-modules nor - --enable-modules is specified, then - the configure script will try to - auto-detect whether shared modules work on your system. - - - - - <systemitem>--disable-gtk-doc</systemitem> and - <systemitem>--enable-gtk-doc</systemitem> - - - By default the configure script will try - to auto-detect whether the - gtk-doc package is installed. If - it is, then it will use it to extract and build the - documentation for the gdk-pixbuf library. These options can - be used to explicitly control whether gtk-doc should be used - or not. If it is not used, the distributed, pre-generated - HTML files will be installed instead of building them on - your machine. - - - - - - diff --git a/docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt b/docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt deleted file mode 100644 index 560f696be7..0000000000 --- a/docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt +++ /dev/null @@ -1,414 +0,0 @@ - -ModulePreparedNotifyFunc -void -GdkPixbuf *pixbuf, gpointer user_data - - -ModuleUpdatedNotifyFunc -void -GdkPixbuf *pixbuf, - guint x, guint y, - guint width, guint height, - gpointer user_data - - -ModuleFrameDoneNotifyFunc -void -GdkPixbufFrame *frame, - gpointer user_data - - -ModuleAnimationDoneNotifyFunc -void -GdkPixbuf *pixbuf, - gpointer user_data - - -GdkPixbufModule - - -GdkPixbufModule -struct GdkPixbufModule { - char *module_name; - gboolean (* format_check) (guchar *buffer, int size); - GModule *module; - GdkPixbuf *(* load) (FILE *f); - GdkPixbuf *(* load_xpm_data) (const char **data); - - /* Incremental loading */ - - gpointer (* begin_load) (ModulePreparedNotifyFunc prepare_func, - ModuleUpdatedNotifyFunc update_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data); - void (* stop_load) (gpointer context); - gboolean (* load_increment) (gpointer context, const guchar *buf, guint size); - - /* Animation loading */ - GdkPixbufAnimation *(* load_animation) (FILE *f); -}; - - -gdk_pixbuf_get_module -GdkPixbufModule * -guchar *buffer, guint size - - -gdk_pixbuf_load_module -void -GdkPixbufModule *image_module - - -GDK_TYPE_PIXBUF_LOADER -#define GDK_TYPE_PIXBUF_LOADER (gdk_pixbuf_loader_get_type ()) - - -GDK_PIXBUF_LOADER -#define GDK_PIXBUF_LOADER(obj) (GTK_CHECK_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoader)) - - -GDK_PIXBUF_LOADER_CLASS -#define GDK_PIXBUF_LOADER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass)) - - -GDK_IS_PIXBUF_LOADER -#define GDK_IS_PIXBUF_LOADER(obj) (GTK_CHECK_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER)) - - -GDK_IS_PIXBUF_LOADER_CLASS -#define GDK_IS_PIXBUF_LOADER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER)) - - -GdkPixbufLoader - - -GdkPixbufLoader -struct GdkPixbufLoader -{ - GtkObject object; - - /* < Private > */ - gpointer private; -}; - - -GdkPixbufLoaderClass - - -gdk_pixbuf_loader_get_type -GtkType -void - - -gdk_pixbuf_loader_new -GdkPixbufLoader * -void - - -gdk_pixbuf_loader_write -gboolean -GdkPixbufLoader *loader,const guchar *buf,size_t count - - -gdk_pixbuf_loader_get_pixbuf -GdkPixbuf * -GdkPixbufLoader *loader - - -gdk_pixbuf_loader_get_animation -GdkPixbufAnimation * -GdkPixbufLoader *loader - - -gdk_pixbuf_loader_close -void -GdkPixbufLoader *loader - - -GdkPixbuf - - -GdkPixbufFrame - - -GdkPixbufAnimation - - -GdkPixbuf -struct GdkPixbuf { - /* Reference count */ - int ref_count; - - /* Libart pixbuf */ - ArtPixBuf *art_pixbuf; -}; - - -GdkPixbufFrameAction -typedef enum { - GDK_PIXBUF_FRAME_RETAIN, - GDK_PIXBUF_FRAME_DISPOSE, - GDK_PIXBUF_FRAME_REVERT -} GdkPixbufFrameAction; - - -GdkPixbufFrame -struct GdkPixbufFrame { - /* The pixbuf with this frame's image data */ - GdkPixbuf *pixbuf; - - /* Offsets for overlaying onto the animation's area */ - int x_offset; - int y_offset; - - /* Frame duration in ms */ - int delay_time; - - /* Overlay mode */ - GdkPixbufFrameAction action; -}; - - -GdkPixbufAnimation -struct GdkPixbufAnimation { - /* Reference count */ - int ref_count; - - /* Number of frames */ - int n_frames; - - /* List of GdkPixbufFrame structures */ - GList *frames; -}; - - -gdk_pixbuf_get_format -ArtPixFormat -GdkPixbuf *pixbuf - - -gdk_pixbuf_get_n_channels -int -GdkPixbuf *pixbuf - - -gdk_pixbuf_get_has_alpha -int -GdkPixbuf *pixbuf - - -gdk_pixbuf_get_bits_per_sample -int -GdkPixbuf *pixbuf - - -gdk_pixbuf_get_pixels -guchar * -GdkPixbuf *pixbuf - - -gdk_pixbuf_get_width -int -GdkPixbuf *pixbuf - - -gdk_pixbuf_get_height -int -GdkPixbuf *pixbuf - - -gdk_pixbuf_get_rowstride -int -GdkPixbuf *pixbuf - - -gdk_pixbuf_ref -GdkPixbuf * -GdkPixbuf *pixbuf - - -gdk_pixbuf_unref -void -GdkPixbuf *pixbuf - - -gdk_pixbuf_new_from_art_pixbuf -GdkPixbuf * -ArtPixBuf *art_pixbuf - - -gdk_pixbuf_new -GdkPixbuf * -ArtPixFormat format, gboolean has_alpha, int bits_per_sample,int width, int height - - -gdk_pixbuf_new_from_file -GdkPixbuf * -const char *filename - - -gdk_pixbuf_new_from_data -GdkPixbuf * -guchar *data,ArtPixFormat format,gboolean has_alpha,int width, int height,int rowstride,ArtDestroyNotify dfunc,gpointer dfunc_data - - -gdk_pixbuf_new_from_xpm_data -GdkPixbuf * -const char **data - - -gdk_pixbuf_add_alpha -GdkPixbuf * -GdkPixbuf *pixbuf, gboolean substitute_color,guchar r, guchar g, guchar b - - -GdkPixbufAlphaMode -typedef enum { - GDK_PIXBUF_ALPHA_BILEVEL, - GDK_PIXBUF_ALPHA_FULL -} GdkPixbufAlphaMode; - - -gdk_pixbuf_render_threshold_alpha -void -GdkPixbuf *pixbuf, GdkBitmap *bitmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height,int alpha_threshold - - -gdk_pixbuf_render_to_drawable -void -GdkPixbuf *pixbuf,GdkDrawable *drawable, GdkGC *gc,int src_x, int src_y,int dest_x, int dest_y,int width, int height,GdkRgbDither dither,int x_dither, int y_dither - - -gdk_pixbuf_render_to_drawable_alpha -void -GdkPixbuf *pixbuf, GdkDrawable *drawable,int src_x, int src_y,int dest_x, int dest_y,int width, int height,GdkPixbufAlphaMode alpha_mode,int alpha_threshold,GdkRgbDither dither,int x_dither, int y_dither - - -gdk_pixbuf_render_pixmap_and_mask -void -GdkPixbuf *pixbuf,GdkPixmap **pixmap_return, GdkBitmap **mask_return,int alpha_threshold - - -gdk_pixbuf_get_from_drawable -GdkPixbuf * -GdkPixbuf *dest,GdkDrawable *src, GdkColormap *cmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height - - -gdk_pixbuf_copy_area -void -GdkPixbuf *src_pixbuf,int src_x, int src_y,int width, int height,GdkPixbuf *dest_pixbuf,int dest_x, int dest_y - - -gdk_pixbuf_scale -void -GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,ArtFilterLevel filter_level - - -gdk_pixbuf_composite -void -GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,ArtFilterLevel filter_level,int overall_alpha - - -gdk_pixbuf_composite_color -void -GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,ArtFilterLevel filter_level,int overall_alpha,int check_x,int check_y,int check_size,art_u32 color1,art_u32 color2 - - -gdk_pixbuf_scale_simple -GdkPixbuf * -GdkPixbuf *src,int dest_width,int dest_height,ArtFilterLevel filter_level - - -gdk_pixbuf_composite_color_simple -GdkPixbuf * -GdkPixbuf *src,int dest_width,int dest_height,ArtFilterLevel filter_level,int overall_alpha,int check_size,art_u32 color1,art_u32 color2 - - -gdk_pixbuf_animation_new_from_file -GdkPixbufAnimation * -const char *filename - - -gdk_pixbuf_animation_ref -GdkPixbufAnimation * -GdkPixbufAnimation *animation - - -gdk_pixbuf_animation_unref -void -GdkPixbufAnimation *animation - - -gdk_pixbuf_preinit -void -gpointer app, gpointer modinfo - - -gdk_pixbuf_postinit -void -gpointer app, gpointer modinfo - - -GNOME_TYPE_CANVAS_PIXBUF -#define GNOME_TYPE_CANVAS_PIXBUF (gnome_canvas_pixbuf_get_type ()) - - -GNOME_CANVAS_PIXBUF -#define GNOME_CANVAS_PIXBUF(obj) (GTK_CHECK_CAST ((obj), \ - GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbuf)) - - -GNOME_CANVAS_PIXBUF_CLASS -#define GNOME_CANVAS_PIXBUF_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), \ - GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbufClass)) - - -GNOME_IS_CANVAS_PIXBUF -#define GNOME_IS_CANVAS_PIXBUF(obj) (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CANVAS_PIXBUF)) - - -GNOME_IS_CANVAS_PIXBUF_CLASS -#define GNOME_IS_CANVAS_PIXBUF_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), \ - GNOME_TYPE_CANVAS_PIXBUF)) - - -GnomeCanvasPixbuf - - -GnomeCanvasPixbufClass - - -GnomeCanvasPixbuf -struct GnomeCanvasPixbuf { - GnomeCanvasItem item; - - /* Private data */ - gpointer priv; -}; - - -gnome_canvas_pixbuf_get_type -GtkType -void - - -GDK_PIXBUF_MAJOR -#define GDK_PIXBUF_MAJOR (0) - - -GDK_PIXBUF_MINOR -#define GDK_PIXBUF_MINOR (4) - - -GDK_PIXBUF_MICRO -#define GDK_PIXBUF_MICRO (0) - - -GDK_PIXBUF_VERSION -#define GDK_PIXBUF_VERSION "0.4.0" - - -gdk_pixbuf_version -extern const char *gdk_pixbuf_version; - diff --git a/docs/reference/gdk-pixbuf/gdk-pixbuf-sections.txt b/docs/reference/gdk-pixbuf/gdk-pixbuf-sections.txt deleted file mode 100644 index 82673441b5..0000000000 --- a/docs/reference/gdk-pixbuf/gdk-pixbuf-sections.txt +++ /dev/null @@ -1,105 +0,0 @@ -gdk-pixbuf/gdk-pixbuf.h - -
-gdk-pixbuf -GdkPixbuf -gdk_pixbuf_get_format -gdk_pixbuf_get_n_channels -gdk_pixbuf_get_has_alpha -gdk_pixbuf_get_bits_per_sample -gdk_pixbuf_get_pixels -gdk_pixbuf_get_width -gdk_pixbuf_get_height -gdk_pixbuf_get_rowstride -
- -
-refcounting -gdk_pixbuf_ref -gdk_pixbuf_unref -
- -
-file-loading -gdk_pixbuf_new_from_file -
- -
-creating -gdk_pixbuf_new_from_art_pixbuf -gdk_pixbuf_new -gdk_pixbuf_new_from_data -gdk_pixbuf_new_from_xpm_data -
- -
-rendering -GdkPixbufAlphaMode -gdk_pixbuf_render_to_drawable_alpha -gdk_pixbuf_render_to_drawable -gdk_pixbuf_render_threshold_alpha -gdk_pixbuf_render_pixmap_and_mask -
- -
-from-drawables -gdk_pixbuf_get_from_drawable -
- -
-util -gdk_pixbuf_add_alpha -gdk_pixbuf_copy_area -
- -
-animation -GdkPixbufFrameAction -GdkPixbufFrame -GdkPixbufAnimation -gdk_pixbuf_animation_new_from_file -gdk_pixbuf_animation_ref -gdk_pixbuf_animation_unref -
- -
-scaling -gdk_pixbuf_scale -gdk_pixbuf_composite -gdk_pixbuf_composite_color -gdk_pixbuf_scale_simple -gdk_pixbuf_composite_color_simple -
- -
-gdk-pixbuf-loader -GDK_PIXBUF_LOADER -GdkPixbufLoader -gdk_pixbuf_loader_new -gdk_pixbuf_loader_write -gdk_pixbuf_loader_get_pixbuf -gdk_pixbuf_loader_get_animation -gdk_pixbuf_loader_close - -GDK_TYPE_PIXBUF_LOADER -GDK_IS_PIXBUF_LOADER -gdk_pixbuf_loader_get_type -GDK_PIXBUF_LOADER_CLASS -GDK_IS_PIXBUF_LOADER_CLASS - -GdkPixbufLoader -
- -
-gnome-canvas-pixbuf -GNOME_CANVAS_PIXBUF -GnomeCanvasPixbuf - -GNOME_TYPE_CANVAS_PIXBUF -GNOME_IS_CANVAS_PIXBUF -gnome_canvas_pixbuf_get_type -GNOME_CANVAS_PIXBUF_CLASS -GNOME_IS_CANVAS_PIXBUF_CLASS - -GnomeCanvasPixbuf -
diff --git a/docs/reference/gdk-pixbuf/gdk-pixbuf.args b/docs/reference/gdk-pixbuf/gdk-pixbuf.args deleted file mode 100644 index 638669c942..0000000000 --- a/docs/reference/gdk-pixbuf/gdk-pixbuf.args +++ /dev/null @@ -1,66 +0,0 @@ - -GnomeCanvasPixbuf::pixbuf -gpointer -rw - - - -GnomeCanvasPixbuf::width -gdouble -rw - - - -GnomeCanvasPixbuf::width_set -gboolean -rw - - - -GnomeCanvasPixbuf::width_in_pixels -gboolean -rw - - - -GnomeCanvasPixbuf::height -gdouble -rw - - - -GnomeCanvasPixbuf::height_set -gboolean -rw - - - -GnomeCanvasPixbuf::height_in_pixels -gboolean -rw - - - -GnomeCanvasPixbuf::x -gdouble -rw - - - -GnomeCanvasPixbuf::x_in_pixels -gboolean -rw - - - -GnomeCanvasPixbuf::y -gdouble -rw - - - -GnomeCanvasPixbuf::y_in_pixels -gboolean -rw - - diff --git a/docs/reference/gdk-pixbuf/gdk-pixbuf.hierarchy b/docs/reference/gdk-pixbuf/gdk-pixbuf.hierarchy deleted file mode 100644 index 1c379f26d4..0000000000 --- a/docs/reference/gdk-pixbuf/gdk-pixbuf.hierarchy +++ /dev/null @@ -1,4 +0,0 @@ -GtkObject - GdkPixbufLoader - GnomeCanvasItem - GnomeCanvasPixbuf diff --git a/docs/reference/gdk-pixbuf/gdk-pixbuf.sgml b/docs/reference/gdk-pixbuf/gdk-pixbuf.sgml deleted file mode 100644 index 900f4edb5a..0000000000 --- a/docs/reference/gdk-pixbuf/gdk-pixbuf.sgml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - -]> - - - - The GdkPixbuf Library - - - - Federico - Mena Quintero - -
- federico@gimp.org -
-
-
-
- - - 1999 - The Free Software Foundation - -
- - - API Reference - - - - This part presents the class and function reference for the - GdkPixbuf library. Classes are described together with their - methods; individual functions are grouped by functional group. - - - - &gdk-pixbuf-gdk-pixbuf; - &gdk-pixbuf-refcounting; - &gdk-pixbuf-file-loading; - &gdk-pixbuf-creating; - &gdk-pixbuf-rendering; - &gdk-pixbuf-scaling; - &gdk-pixbuf-from-drawables; - &gdk-pixbuf-util; - &gdk-pixbuf-animation; - &GdkPixbufLoader; - &GnomeCanvasPixbuf; - - - &Compiling; -
diff --git a/docs/reference/gdk-pixbuf/gdk-pixbuf.signals b/docs/reference/gdk-pixbuf/gdk-pixbuf.signals deleted file mode 100644 index 7ac8646dea..0000000000 --- a/docs/reference/gdk-pixbuf/gdk-pixbuf.signals +++ /dev/null @@ -1,34 +0,0 @@ - -GdkPixbufLoader::area-updated -void -GdkPixbufLoader *gdkpixbufloader -gint arg1 -gint arg2 -gint arg3 -gint arg4 - - - -GdkPixbufLoader::area-prepared -void -GdkPixbufLoader *gdkpixbufloader - - - -GdkPixbufLoader::frame-done -void -GdkPixbufLoader *gdkpixbufloader - - - -GdkPixbufLoader::animation-done -void -GdkPixbufLoader *gdkpixbufloader - - - -GdkPixbufLoader::closed -void -GdkPixbufLoader *gdkpixbufloader - - diff --git a/docs/reference/gdk-pixbuf/gdk-pixbuf.types b/docs/reference/gdk-pixbuf/gdk-pixbuf.types deleted file mode 100644 index b583e41377..0000000000 --- a/docs/reference/gdk-pixbuf/gdk-pixbuf.types +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include -#include -#include - -gdk_pixbuf_loader_get_type -gnome_canvas_pixbuf_get_type diff --git a/docs/reference/gdk-pixbuf/tmpl/animation.sgml b/docs/reference/gdk-pixbuf/tmpl/animation.sgml deleted file mode 100644 index 2ce521ac84..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/animation.sgml +++ /dev/null @@ -1,91 +0,0 @@ - -Animations - - -Animations as multi-frame structures. - - - - The GdkPixbuf library provides a simple mechanism to load and - represent animations, primarily animated GIF files. Animations - are represented as lists of #GdkPixbufFrame structures. Each - frame structure contains a #GdkPixbuf structure and information - about the frame's overlay mode and duration. - - - - - #GdkPixbufLoader - - - - - Each animation frame can have several things happen to it when the - next frame is displayed. The #GdkPixbufFrameAction determines this. - If a frame as marked as #GDK_PIXBUF_FRAME_RETAIN, then the image - will remain displayed, and will be potentially occluded by the next - frame. If it is marked as #GDK_PIXBUF_FRAME_DISPOSE, then the - animation is reverted to the setting before the frame was shown. If - it is marked as #GDK_PIXBUF_FRAME_REVERT, then the animation is - reverted to the first image before continuing. - - -@GDK_PIXBUF_FRAME_RETAIN: -@GDK_PIXBUF_FRAME_DISPOSE: -@GDK_PIXBUF_FRAME_REVERT: - - - - This structure describes a frame in a #GdkPixbufAnimation. Each - frame consists of a #GdkPixbuf, an offset of the frame within the - animation's bounding box, a duration, and an overlay mode or - action. - - -@pixbuf: The frame's image contents. -@x_offset: X offset of the frame inside the animation's bounding box. -@y_offset: Y offset of the frame inside the animation's bounding box. -@delay_time: Duration of the frame in milliseconds. -@action: Overlay mode. - - - - This structure describes an animation, which is represented as a - list of #GdkPixbufFrame structures. - - -@ref_count: Reference count. -@n_frames: Number of frames in the animation. -@frames: List of #GdkPixbufFrame structures. - - - - - - -@filename: -@Returns: - - - - - - - -@animation: -@Returns: - - - - - - - -@animation: - - diff --git a/docs/reference/gdk-pixbuf/tmpl/creating.sgml b/docs/reference/gdk-pixbuf/tmpl/creating.sgml deleted file mode 100644 index 3c06008c91..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/creating.sgml +++ /dev/null @@ -1,96 +0,0 @@ - -Image Data in Memory - - -Creating a pixbuf from image data that is already in memory. - - - - The most basic way to create a pixbuf is to wrap an existing - #ArtPixBuf structure with a #GdkPixbuf to add reference counting - capabilities to it. The gdk_pixbuf_new_from_art_pixbuf() performs - this operation. - - - - As a convenience, you can use the gdk_pixbuf_new_from_data() - function to wrap an existing data buffer with a #GdkPixbuf. You - need to specify the destroy notification function that will be - called when the data buffer needs to be freed; this will happen - when the pixbuf's reference count drops to zero and thus the - #ArtPixBuf needs to be destroyed. If you have a chunk of static - data compiled into your application, you can pass in #NULL as the - destroy notification function so that the data will not be freed. - - - - The gdk_pixbuf_new() function can be used as a convenience to - create a pixbuf with an empty buffer. This is equivalent to - allocating a data buffer using malloc() and then wrapping it with - gdk_pixbuf_new_from_data(). The gdk_pixbuf_new() function will - compute an optimal rowstride so that rendering can be performed - with an efficient algorithm. - - - - As a special case, you can use the gdk_pixbuf_new_from_xpm_data() - function to create a pixbuf from inline XPM image data. - - - - - #ArtPixBuf - - - - - - - -@art_pixbuf: -@Returns: - - - - - - - -@format: -@has_alpha: -@bits_per_sample: -@width: -@height: -@Returns: - - - - - - - -@data: -@format: -@has_alpha: -@width: -@height: -@rowstride: -@dfunc: -@dfunc_data: -@Returns: - - - - - - - -@data: -@Returns: - - diff --git a/docs/reference/gdk-pixbuf/tmpl/file-loading.sgml b/docs/reference/gdk-pixbuf/tmpl/file-loading.sgml deleted file mode 100644 index 5659bc4457..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/file-loading.sgml +++ /dev/null @@ -1,41 +0,0 @@ - -File Loading - - -Loading a pixbuf from a file. - - - - The GdkPixbuf library provides a simple mechanism for loading an - image from a file in synchronous fashion. This means that the - library takes control of the application while the file is being - loaded; from the user's point of view, the application will block - until the image is done loading. - - - - This interface can be used by applications in which blocking is - acceptable while an image is being loaded. It can also be used to - load small images in general. Applications that need progressive - loading can use the #GdkPixbufLoader functionality instead. - - - - - #GdkPixbufLoader - - - - - - - -@filename: -@Returns: - - diff --git a/docs/reference/gdk-pixbuf/tmpl/from-drawables.sgml b/docs/reference/gdk-pixbuf/tmpl/from-drawables.sgml deleted file mode 100644 index 252d57bfa4..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/from-drawables.sgml +++ /dev/null @@ -1,42 +0,0 @@ - -Drawables to Pixbufs - - -Getting parts of a drawable's image data into a pixbuf. - - - - The functions in this section allow you to take the image data - from a GDK drawable and dump it into a #GdkPixbuf. This can be - used for screenshots and other special effects. Note that these - operations can be expensive, since the image data has to be - transferred from the X server to the client program and converted. - - - - - #GdkPixbuf, gdk_image_get() - - - - - - - -@dest: -@src: -@cmap: -@src_x: -@src_y: -@dest_x: -@dest_y: -@width: -@height: -@Returns: - - diff --git a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-io.sgml b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-io.sgml deleted file mode 100644 index cc03e4648d..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-io.sgml +++ /dev/null @@ -1,70 +0,0 @@ - -gdk-pixbuf-io - - - - - - - - - - - - - - - - - - - -@pixbuf: -@user_data: - - - - - - - -@pixbuf: -@user_data: -@x: -@y: -@width: -@height: - - - - - - - -@module_name: -@format_check: -@module: -@load: -@load_xpm_data: -@begin_load: -@stop_load: -@load_increment: - - - - - - -@buffer: -@size: -@Returns: - - - - - - - -@image_module: - - diff --git a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml deleted file mode 100644 index ed5a432cf5..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml +++ /dev/null @@ -1,182 +0,0 @@ - -GdkPixbufLoader - - -Application-driven progressive image loading. - - - - #GdkPixbufLoader provides a way for applications to drive the - process of loading an image, by letting them send the image data - directly. Applications can use this functionality instead of - gdk_pixbuf_new_from_file() when they need to parse image data in - small chunks. For example, it should be used when reading an image - from a (potentially) slow network connection, or when loading an - extremely large file. - - - To use #GdkPixbufLoader to load an image, just create a new one, and - call gdk_pixbuf_loader_write() to send the data to it. When done, - gdk_pixbuf_loader_close() should be called to end the stream and - finalize everything. The loader will emit two important signals - throughout the process. The first, #"area_prepared", will be called - as soon as the image has enough information to determine the size of - the image to be used. It will pass a @GdkPixbuf in. If you want to - use it, you can simply ref it. In addition, no actual information - will be passed in yet, so the pixbuf can be safely filled with any - temporary graphics (or an initial color) as needed. You can also - call the gdk_pixbuf_loader_get_pixbuf() once this signal has been - emitted and get the same pixbuf. - - - The other signal, #"area_updated" gets called every - time a region is updated. This way you can update a partially - completed image. Note that you do not know anything about the - completeness of an image from the area updated. For example, in an - interlaced image, you need to make several passes before the image - is done loading. - - - Loading an animation - - Loading an animation is a little more complex then loading an - image. In addition to the above signals, there is also a - #"frame_done" signal, as well as an #"animation_done" signal. The - first lets the application know that it is dealing with an - animation, instead of a static image. It also passes a - #GdkPixbufFrame in the signal. As before, if you want to keep the - frame, you need to ref it. Once the first #"frame_done" signal - has been emitted, you can call gdk_pixbuf_loader_get_animation() - to get the #GdkPixbufAnimation struct. Each subsequent frame goes - through a similar lifecycle. For example #"area_prepared" is - re-emitted. Then #"area_updated" is emitted as many times as - necessary. Finally, #"animation_done" is emitted as soon as all - frames are done. - - - - - - gdk_pixbuf_new_from_file() - - - - - Casts a #GtkObject to a #GdkPixbufLoader. - - -@obj: A GTK+ object. - - - - - - - -@Returns: - - - - - - - -@loader: -@buf: -@count: -@Returns: - - - - - - - -@loader: -@Returns: - - - - - - - -@loader: -@Returns: - - - - - - - -@loader: - - - - - This signal is emitted when a significant area of the image being - loaded has been updated. Normally it means that a complete - scanline has been read in, but it could be a different area as - well. Applications can use this signal to know when to repaint - areas of an image that is being loaded. - - -@gdkpixbufloader: the object which received the signal. -@arg1: -@arg2: -@arg3: -@arg4: - -@loader: Loader which emitted the signal. -@x: X offset of upper-left corner of the updated area. -@y: Y offset of upper-left corner of the updated area. -@width: Width of updated area. -@height: Height of updated area. - - - - This signal is emitted when the pixbuf loader has been fed the - initial amount of data that is required to figure out the size and - format of the image that it will create. After this signal is - emitted, applications can call gdk_pixbuf_loader_get_pixbuf() to - fetch the partially-loaded pixbuf. - - -@gdkpixbufloader: the object which received the signal. - -@loader: Loader which emitted the signal. - - - - - - -@gdkpixbufloader: the object which received the signal. - - - - - - -@gdkpixbufloader: the object which received the signal. - - - - This signal is emitted when gdk_pixbuf_loader_close() is called. - It can be used by different parts of an application to receive - notification when an image loader is closed by the code that - drives it. - - -@gdkpixbufloader: the object which received the signal. - -@loader: Loader which emitted the signal. - - - diff --git a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml deleted file mode 100644 index 788c92fbc2..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-unused.sgml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - -@image_module: - - - - - - - - - - - - - - - - -@module_name: -@format_check: -@module: -@load: -@load_xpm_data: -@begin_load: -@stop_load: -@load_increment: - - - - - - - - - - - - - - - - - - -@pixbuf: -@user_data: -@x: -@y: -@width: -@height: - - -gdk-pixbuf-io - - - - - Determines whether the x argument is used to - translate the pixbuf from its logical origin in item-relative - coordinates. - - - - - - Determines whether the y argument is used to - translate the pixbuf from its logical origin in item-relative - coordinates. Works in the same way as the x_set argument. The - default is %FALSE. - - - - - - - - -@pixbuf: -@user_data: - - - - - - - - - - - - -@buffer: -@size: -@Returns: - - - - - - - diff --git a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml b/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml deleted file mode 100644 index ff31dacb12..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf.sgml +++ /dev/null @@ -1,108 +0,0 @@ - -The GdkPixbuf Structure - - -Information that describes an image. - - - - - The GdkPixbuf structure contains - information that describes an image in memory. It is actually a - simple wrapper that adds reference counting capabilities to an - #ArtPixBuf structure. - - - - - #ArtPixBuf - - - - - This is the main structure in the GdkPixbuf library. This - structure adds reference counting capabilities to an #ArtPixBuf - structure. - - -@ref_count: Reference count. -@art_pixbuf: An #ArtPixBuf that actually contains the description of -the image data. - - - - - - -@pixbuf: -@Returns: - - - - - - - -@pixbuf: -@Returns: - - - - - - - -@pixbuf: -@Returns: - - - - - - - -@pixbuf: -@Returns: - - - - - - - -@pixbuf: -@Returns: - - - - - - - -@pixbuf: -@Returns: - - - - - - - -@pixbuf: -@Returns: - - - - - - - -@pixbuf: -@Returns: - - diff --git a/docs/reference/gdk-pixbuf/tmpl/gnome-canvas-pixbuf.sgml b/docs/reference/gdk-pixbuf/tmpl/gnome-canvas-pixbuf.sgml deleted file mode 100644 index 21a51eef6a..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/gnome-canvas-pixbuf.sgml +++ /dev/null @@ -1,302 +0,0 @@ - -GnomeCanvasPixbuf - - -Canvas item to display #GdkPixbuf images. - - - - This canvas item displays #GdkPixbuf images. It handles full - affine transformations in both GDK and antialiased modes, and also - supports the W3C's SVG-like scaling and - translation semantics for absolute pixel values. - - - - #GdkPixbuf structures may be shared among different pixbuf canvas - items; the pixbuf item uses #GdkPixbuf's reference counting - functions for this. - - - - Custom Scaling and Translation - - - In addition to the normal affine transformations supported by - canvas items, the #GnomeCanvasPixbuf item supports independent - object arguments for scaling and translation. This is useful - for explicitly setting a size to which the pixbuf's image will - be scaled, and for specifying translation offsets that take - place in the item's local coordinate system. - - - - By default, the pixbuf canvas item will attain the size in units - of the #GdkPixbuf it contains. If a #GnomeCanvasPixbuf is - configured to use a #GdkPixbuf that has a size of 300 by 200 - pixels, then the pixbuf item will automatically obtain a size of - 300 by 200 units in the item's local coordinate system. If the - item is transformed with a scaling transformation of (0.5, 2.0), - then the final image size will be of 150 by 400 pixels. - - - - To set custom width and height values, you must set the width_set or height_set - arguments to %TRUE, and then set the width or height arguments to - the desired values. The former two arguments control whether - the latter two are used when computing the final image's size; - they are both %FALSE by default so that the pixbuf item will - attain a size in units equal to the size in pixels of the - #GdkPixbuf that the item contains. - - - - The custom translation offsets are controlled by the x and y arguments. The logical - upper-left vertex of the image will be translated by the - specified distance, aligned with the item's local coordinate - system. - - - - - Absolute Pixel Scaling and Translation - - - The Scalable Vector - Graphics specification (SVG) of the World Wide Web Consortium also - allows images to be translated and scaled by absolute pixel - values that are independent of an item's normal affine - transformation. - - - - Normally, the pixbuf item's translation and scaling arguments - are interpreted in units, so they will be modified by the item's - affine transformation. The width_in_pixels, - height_in_pixels, - x_in_pixels, and - y_in_pixels - object arguments can be used to modify this behavior. If one of - these arguments is %TRUE, then the corresponding scaling or - translation value will not be affected lengthwise by the pixbuf - item's affine transformation. - - - - For example, consider a pixbuf item whose size is (300, 200). - If the item is modified with a scaling transformation of (0.5, - 2.0) but the width_in_pixels - is set to %TRUE, then the item will appear to be (300, 400) - pixels in size. This means that in this case the item's affine - transformation only applies to the height value, while the width - value is kept in absolute pixels. - - - - Likewise, consider a pixbuf item whose (x, y) arguments are set to - (30, 40). If the item is then modified by the same scaling - transformation of (0.5, 2.0) but the y_in_pixels - argument is set to %TRUE, then the image's upper-left corner - will appear to be at position (15, 40). In this case, the - affine transformation is applied only to the x offset, while the - y offset is kept in absolute pixels. - - - - In short, these arguments control whether a particular dimension - of a pixbuf item is scaled or not in the normal way by the - item's affine transformation. - - - - - Resource Management - - - When you set the #GdkPixbuf structure that a #GnomeCanvasPixbuf - item will use by setting the pixbuf argument, a - reference count will be added to that #GdkPixbuf structure. - When the pixbuf item no longer needs the #GdkPixbuf structure, - such as when the item is destroyed or when a new pixbuf - structure is passed to it, then the old #GdkPixbuf structure - will be automatically unreferenced. - - - - This means that if an application just needs to load a pixbuf - image and set it into a pixbuf canvas item, it can do the - following to ‘forget’ about the pixbuf structure: - - - GdkPixbuf *pixbuf; - GnomeCanvasItem *item; - - pixbuf = gdk_pixbuf_new_from_file ("foo.png"); - g_assert (pixbuf != NULL); - - item = gnome_canvas_item_new (gnome_canvas_root (my_canvas), - gnome_canvas_pixbuf_get_type (), - "pixbuf", pixbuf, - NULL); - gdk_pixbuf_unref (pixbuf); - - - - - After this happens, the reference count of the pixbuf structure - will be 1: the gdk_pixbuf_new_from_file() function creates it - with a reference count of 1, then setting the pixbuf argument of - the #GnomeCanvasPixbuf item increases it to 2, and then it is - decremented to 1 by the call to gdk_pixbuf_unref(). When the - canvas item is destroyed, it will automatically unreference the - pixbuf structure again, causing its reference count to drop to - zero and thus be freed. - - - - - - #GnomeCanvas, #GdkPixbuf - - - - - Casts a #GtkOjbect to a #GnomeCanvasPixbuf. - - -@obj: A GTK+ object. - - - - - Contains a pointer to a #GdkPixbuf structure that will be used by - the pixbuf canvas item as an image source. When a pixbuf is set - its reference count is incremented; if the pixbuf item kept a - pointer to another #GdkPixbuf structure, the reference count of - this structure will be decremented. Also, the GdkPixbuf's - reference count will automatically be decremented when the - #GnomeCanvasPixbuf item is destroyed. When a pixbuf is queried, a - reference count will not be added to the return value; you must do - this yourself if you intend to keep the pixbuf structure around. - - - - - Indicates the width the pixbuf will be scaled to. This argument - will only be used if the width_set argument - is %TRUE. If the width_in_pixels - argument is %FALSE, the width will be taken to be in canvas units, - and thus will be scaled along with the canvas item's affine - transformation. If width_in_pixels is %TRUE, the width will be - taken to be in pixels, and will visually remain a constant size - even if the item's affine transformation changes. - - - - - Determines whether the width argument is taken - into account when scaling the pixbuf item. If this argument is - %FALSE, then the width value of the pixbuf's #ArtPixBuf will be - used instead. This argument is %FALSE by default. - - - - - If this argument is %TRUE, then the width of the pixbuf will be - considered to be in pixels, that is, it will not be visually - scaled even if the item's affine transformation changes. If this - is %FALSE, then the width of the pixbuf will be considered to be - in canvas units, and so will be scaled normally by affine - transformations. The default is %FALSE. - - - - - Indicates the height the pixbuf will be scaled to. This argument - will only be used if the height_set argument - is %TRUE. Works in the same way as the width argument. - - - - - Determines whether the height argument is - taken into account when scaling the pixbuf item. Works in the - same way as the width_set argument. - The default is %FALSE. - - - - - Works in the same way as the width_in_pixels - argument. The default is %FALSE. - - - - - Indicates the horizontal translation offset of the pixbuf item's - image. This offset may not actually appear horizontal, since it - will be affected by the item's affine transformation. The default - is 0.0. - - - - - If this argument is %TRUE, the pixbuf's translation with respect - to its logical origin in item-relative coordinates will be in - pixels, that is, the visible offset will not change even if the - item's affine transformation changes. If it is %FALSE, the - pixbuf's translation will be taken to be in canvas units, and thus - will change along with the item's affine transformation. The - default is %FALSE. - - - - - Indicates the vertical translation offset of the pixbuf item's - image. Works in the same way as the x argument. The default is - 0.0. - - - - - Works in the same way as the x_in_pixels - argument, but controls whether the y translation offset is - scaled or not. The default is %FALSE. - - - - diff --git a/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml b/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml deleted file mode 100644 index 9593e7210c..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml +++ /dev/null @@ -1,44 +0,0 @@ - -Reference Counting - - -Functions to perform reference counting on a #GdkPixbuf. - - - - #GdkPixbuf structures are reference counted. This means that - an application can share a single pixbuf among many parts of the - code. When a piece of the program needs to keep a pointer to a - pixbuf, it should add a reference to it. When it no longer needs - the pixbuf, it should subtract a reference. The pixbuf will be - destroyed when its reference count drops to zero. Newly-created - #GdkPixbuf structures start with a reference count of one. - - - - - #GdkPixbuf, #ArtPixBuf - - - - - - - -@pixbuf: -@Returns: - - - - - - - -@pixbuf: - - diff --git a/docs/reference/gdk-pixbuf/tmpl/rendering.sgml b/docs/reference/gdk-pixbuf/tmpl/rendering.sgml deleted file mode 100644 index 4af655d54a..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/rendering.sgml +++ /dev/null @@ -1,125 +0,0 @@ - -Rendering - - -Rendering a pixbuf to a GDK drawable. - - - - The GdkPixbuf library provides several convenience functions to - render pixbufs to GDK drawables. It uses the GdkRGB to render the - image data. - - - - At this point there is not a standard alpha channel extension for - the X Window System, so it is not possible to use full opacity - information when painting images to arbitrary drawables. The - GdkPixbuf convenience functions will threshold the opacity - information to create a bi-level clipping mask (black and white), - and use that to draw the image onto a drawable. - - - - - Since these functions use GdkRGB for rendering, you must - initialize GdkRGB before using any of them. You can do this by - calling gdk_rgb_init() near the beginning of your program. - - - - - - GdkRGB - - - - - These values can be passed to - gdk_pixbuf_render_to_drawable_alpha() to control how the alpha - chanel of an image should be handled. This function can create a - bilevel clipping mask (black and white) and use it while painting - the image. In the future, when the X Window System gets an alpha - channel extension, it will be possible to do full alpha - compositing onto arbitrary drawables. For now both cases fall - back to a bilevel clipping mask. - - -@GDK_PIXBUF_ALPHA_BILEVEL: A bilevel clipping mask (black and white) -will be created and used to draw the image. Pixels below 0.5 opacity -will be considered fully transparent, and all others will be -considered fully opaque. -@GDK_PIXBUF_ALPHA_FULL: For now falls back to #GDK_PIXBUF_ALPHA_BILEVEL. -In the future it will do full alpha compositing. - - - - - - -@pixbuf: -@drawable: -@src_x: -@src_y: -@dest_x: -@dest_y: -@width: -@height: -@alpha_mode: -@alpha_threshold: -@dither: -@x_dither: -@y_dither: - - - - - - - -@pixbuf: -@drawable: -@gc: -@src_x: -@src_y: -@dest_x: -@dest_y: -@width: -@height: -@dither: -@x_dither: -@y_dither: - - - - - - - -@pixbuf: -@bitmap: -@src_x: -@src_y: -@dest_x: -@dest_y: -@width: -@height: -@alpha_threshold: - - - - - - - -@pixbuf: -@pixmap_return: -@mask_return: -@alpha_threshold: - - diff --git a/docs/reference/gdk-pixbuf/tmpl/scaling.sgml b/docs/reference/gdk-pixbuf/tmpl/scaling.sgml deleted file mode 100644 index 37411cd4f7..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/scaling.sgml +++ /dev/null @@ -1,162 +0,0 @@ - -Scaling - - -Scaling pixbufs and scaling and compositing pixbufs - - - -gdk-pixbuf contains functions to scale pixbufs, to scale pixbufs and -composite against an existing image, and to scale pixbufs and -composite against a solid color or checkerboard. (Compositing a -checkerboard is a common way to show an image with an alpha-channel in -image-viewing and editing software.) - - -Since the full-featured functions (gdk_pixbuf_scale(), -gdk_pixbuf_composite(), and gdk_pixbuf_composite_color()) are -rather complex to use and have many arguments, two simple -convenience functions are provided, gdk_pixbuf_scale_simple() -and gdk_pixbuf_composite_color_simple() which create a -new pixbuf of a given size, scale an original image to fit, -and then return the new pixmap. - - - -The following example demonstrates handling an expose event by -rendering the appropriate area of a source image (which is scaled to -fit the widget) onto the widget's window. The source image is -rendered against a checkerboard, which provides a visual -representation of the alpha channel if the image has one. If the image -doesn't have an alpha channel, calling gdk_pixbuf_composite_color() -function has exactly the same effect as calling gdk_pixbuf_scale(). - - - -gboolean -expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) -{ - GdkPixbuf *dest; - - gdk_window_set_back_pixmap (widget->window, NULL, FALSE); - - dest = gdk_pixbuf_new (ART_PIX_RGB, FALSE, 8, event->area.width, event->area.height); - - gdk_pixbuf_composite_color (pixbuf, dest, - 0, 0, event->area.width, event->area.height, - -event->area.x, -event->area.y, - (double) widget->allocation.width / pixbuf->art_pixbuf->width, - (double) widget->allocation.height / pixbuf->art_pixbuf->height, - filter_level, 255, - event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555); - - gdk_pixbuf_render_to_drawable (dest, widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], - 0, 0, event->area.x, event->area.y, - event->area.width, event->area.height, - GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y); - - gdk_pixbuf_unref (dest); - - return TRUE; -} - - - - - - - - - - - - -@src: -@dest: -@dest_x: -@dest_y: -@dest_width: -@dest_height: -@offset_x: -@offset_y: -@scale_x: -@scale_y: -@filter_level: - - - - - - - -@src: -@dest: -@dest_x: -@dest_y: -@dest_width: -@dest_height: -@offset_x: -@offset_y: -@scale_x: -@scale_y: -@filter_level: -@overall_alpha: - - - - - - - -@src: -@dest: -@dest_x: -@dest_y: -@dest_width: -@dest_height: -@offset_x: -@offset_y: -@scale_x: -@scale_y: -@filter_level: -@overall_alpha: -@check_x: -@check_y: -@check_size: -@color1: -@color2: - - - - - - - -@src: -@dest_width: -@dest_height: -@filter_level: -@Returns: - - - - - - - -@src: -@dest_width: -@dest_height: -@filter_level: -@overall_alpha: -@check_size: -@color1: -@color2: -@Returns: - - diff --git a/docs/reference/gdk-pixbuf/tmpl/util.sgml b/docs/reference/gdk-pixbuf/tmpl/util.sgml deleted file mode 100644 index 2d29c75054..0000000000 --- a/docs/reference/gdk-pixbuf/tmpl/util.sgml +++ /dev/null @@ -1,52 +0,0 @@ - -Utilities - - -Utility and miscellaneous convenience functions. - - - - These functions provide miscellaneous utilities for manipulating - pixbufs. The pixel data in pixbufs may of course be manipulated - directly by applications, but several common operations can be - performed by these functions instead. - - - - - #GdkPixbuf - - - - - - - -@pixbuf: -@substitute_color: -@r: -@g: -@b: -@Returns: - - - - - - - -@src_pixbuf: -@src_x: -@src_y: -@width: -@height: -@dest_pixbuf: -@dest_x: -@dest_y: - - diff --git a/docs/reference/gdk/.cvsignore b/docs/reference/gdk/.cvsignore deleted file mode 100644 index 1fa9184d72..0000000000 --- a/docs/reference/gdk/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -sgml -html -gdk-decl-list.txt -gdk-unused.txt diff --git a/docs/reference/gdk/Makefile.am b/docs/reference/gdk/Makefile.am deleted file mode 100644 index 0b0b0eacff..0000000000 --- a/docs/reference/gdk/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -## Process this file with automake to produce Makefile.in - -# The name of the module. -DOC_MODULE=gdk - -# The top-level SGML file. -DOC_MAIN_SGML_FILE=gdk-docs.sgml - -# We could alternatively use this for using installed headers. -INCLUDE_DIR=`gtk-config --prefix`/include/gdk - - -TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) - -scan: - gtkdoc-scan --module=$(DOC_MODULE) $(INCLUDE_DIR)/gdk.h $(INCLUDE_DIR)/gdktypes.h $(INCLUDE_DIR)/gdkrgb.h - -templates: scan - gtkdoc-mktmpl --module=$(DOC_MODULE) - -sgml: - gtkdoc-mkdb --module=$(DOC_MODULE) - -html: - if ! test -d html ; then mkdir html ; fi - -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - -clean-local: - rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt - -maintainer-clean-local: clean - rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt - -install-data-local: - install -d -m 0755 $(TARGET_DIR) - install -m 0644 html/*.html $(TARGET_DIR) - install -m 0644 html/index.sgml $(TARGET_DIR) - gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR) - -EXTRA_DIST = \ - $(DOC_MAIN_SGML_FILE) \ - $(DOC_MODULE)-sections.txt \ - gdk-overrides.txt \ - gdk-decl.txt - -dist-hook: - mkdir $(distdir)/tmpl - cp -p tmpl/*.sgml $(distdir)/tmpl - -.PHONY : html sgml templates scan diff --git a/docs/reference/gdk/gdk-decl.txt b/docs/reference/gdk/gdk-decl.txt deleted file mode 100644 index cd75a1e2a3..0000000000 --- a/docs/reference/gdk/gdk-decl.txt +++ /dev/null @@ -1,2919 +0,0 @@ - -GDK_PRIORITY_EVENTS -#define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT) - - -gdk_init -void -gint *argc,gchar ***argv - - -gdk_init_check -gboolean -gint *argc,gchar ***argv - - -gdk_exit -void -gint error_code - - -gdk_set_locale -gchar * -void - - -gdk_error_trap_push -void -void - - -gdk_error_trap_pop -gint -void - - -gdk_events_pending -gboolean -void - - -gdk_event_get -GdkEvent * -void - - -gdk_event_peek -GdkEvent * -void - - -gdk_event_get_graphics_expose -GdkEvent * -GdkWindow *window - - -gdk_event_put -void -GdkEvent *event - - -gdk_event_copy -GdkEvent * -GdkEvent *event - - -gdk_event_free -void -GdkEvent *event - - -gdk_event_get_time -guint32 -GdkEvent *event - - -gdk_event_handler_set -void -GdkEventFunc func,gpointer data,GDestroyNotify notify - - -gdk_set_show_events -void -gint show_events - - -gdk_set_use_xshm -void -gint use_xshm - - -gdk_get_show_events -gint -void - - -gdk_get_use_xshm -gint -void - - -gdk_get_display -gchar * -void - - -gdk_time_get -guint32 -void - - -gdk_timer_get -guint32 -void - - -gdk_timer_set -void -guint32 milliseconds - - -gdk_timer_enable -void -void - - -gdk_timer_disable -void -void - - -gdk_input_add_full -gint -gint source,GdkInputCondition condition,GdkInputFunction function,gpointer data,GdkDestroyNotify destroy - - -gdk_input_add -gint -gint source,GdkInputCondition condition,GdkInputFunction function,gpointer data - - -gdk_input_remove -void -gint tag - - -gdk_pointer_grab -gint -GdkWindow * window,gint owner_events,GdkEventMask event_mask,GdkWindow * confine_to,GdkCursor * cursor,guint32 time - - -gdk_pointer_ungrab -void -guint32 time - - -gdk_keyboard_grab -gint -GdkWindow * window,gint owner_events,guint32 time - - -gdk_keyboard_ungrab -void -guint32 time - - -gdk_pointer_is_grabbed -gint -void - - -gdk_screen_width -gint -void - - -gdk_screen_height -gint -void - - -gdk_screen_width_mm -gint -void - - -gdk_screen_height_mm -gint -void - - -gdk_flush -void -void - - -gdk_beep -void -void - - -gdk_key_repeat_disable -void -void - - -gdk_key_repeat_restore -void -void - - -gdk_visual_get_best_depth -gint -void - - -gdk_visual_get_best_type -GdkVisualType -void - - -gdk_visual_get_system -GdkVisual * -void - - -gdk_visual_get_best -GdkVisual * -void - - -gdk_visual_get_best_with_depth -GdkVisual * -gint depth - - -gdk_visual_get_best_with_type -GdkVisual * -GdkVisualType visual_type - - -gdk_visual_get_best_with_both -GdkVisual * -gint depth,GdkVisualType visual_type - - -gdk_visual_ref -GdkVisual * -GdkVisual *visual - - -gdk_visual_unref -void -GdkVisual *visual - - -gdk_query_depths -void -gint **depths,gint *count - - -gdk_query_visual_types -void -GdkVisualType **visual_types,gint *count - - -gdk_list_visuals -GList * -void - - -gdk_window_new -GdkWindow * -GdkWindow *parent,GdkWindowAttr *attributes,gint attributes_mask - - -gdk_window_destroy -void -GdkWindow *window - - -gdk_window_ref -GdkWindow * -GdkWindow *window - - -gdk_window_unref -void -GdkWindow *window - - -gdk_window_at_pointer -GdkWindow * -gint *win_x,gint *win_y - - -gdk_window_show -void -GdkWindow *window - - -gdk_window_hide -void -GdkWindow *window - - -gdk_window_withdraw -void -GdkWindow *window - - -gdk_window_move -void -GdkWindow *window,gint x,gint y - - -gdk_window_resize -void -GdkWindow *window,gint width,gint height - - -gdk_window_move_resize -void -GdkWindow *window,gint x,gint y,gint width,gint height - - -gdk_window_reparent -void -GdkWindow *window,GdkWindow *new_parent,gint x,gint y - - -gdk_window_clear -void -GdkWindow *window - - -gdk_window_clear_area -void -GdkWindow *window,gint x,gint y,gint width,gint height - - -gdk_window_clear_area_e -void -GdkWindow *window,gint x,gint y,gint width,gint height - - -gdk_window_copy_area -void -GdkWindow *window,GdkGC *gc,gint x,gint y,GdkWindow *source_window,gint source_x,gint source_y,gint width,gint height - - -gdk_window_raise -void -GdkWindow *window - - -gdk_window_lower -void -GdkWindow *window - - -gdk_window_set_user_data -void -GdkWindow *window,gpointer user_data - - -gdk_window_set_override_redirect -void -GdkWindow *window,gboolean override_redirect - - -gdk_window_add_filter -void -GdkWindow *window,GdkFilterFunc function,gpointer data - - -gdk_window_remove_filter -void -GdkWindow *window,GdkFilterFunc function,gpointer data - - -gdk_window_shape_combine_mask -void -GdkWindow *window,GdkBitmap *shape_mask,gint offset_x,gint offset_y - - -gdk_window_set_child_shapes -void -GdkWindow *window - - -gdk_window_merge_child_shapes -void -GdkWindow *window - - -gdk_window_is_visible -gboolean -GdkWindow *window - - -gdk_window_is_viewable -gboolean -GdkWindow *window - - -gdk_window_set_static_gravities -gboolean -GdkWindow *window,gboolean use_static - - -gdk_add_client_message_filter -void -GdkAtom message_type,GdkFilterFunc func,gpointer data - - -gdk_drag_context_new -GdkDragContext * -void - - -gdk_drag_context_ref -void -GdkDragContext *context - - -gdk_drag_context_unref -void -GdkDragContext *context - - -gdk_drag_status -void -GdkDragContext *context,GdkDragAction action,guint32 time - - -gdk_drop_reply -void -GdkDragContext *context,gboolean ok,guint32 time - - -gdk_drop_finish -void -GdkDragContext *context,gboolean success,guint32 time - - -gdk_drag_get_selection -GdkAtom -GdkDragContext *context - - -gdk_drag_begin -GdkDragContext * -GdkWindow *window,GList *targets - - -gdk_drag_get_protocol -guint32 -guint32 xid,GdkDragProtocol *protocol - - -gdk_drag_find_window -void -GdkDragContext *context,GdkWindow *drag_window,gint x_root,gint y_root,GdkWindow **dest_window,GdkDragProtocol *protocol - - -gdk_drag_motion -gboolean -GdkDragContext *context,GdkWindow *dest_window,GdkDragProtocol protocol,gint x_root,gint y_root,GdkDragAction suggested_action,GdkDragAction possible_actions,guint32 time - - -gdk_drag_drop -void -GdkDragContext *context,guint32 time - - -gdk_drag_abort -void -GdkDragContext *context,guint32 time - - -gdk_drag_get_selection -GdkAtom -GdkDragContext *context - - -gdk_window_set_hints -void -GdkWindow *window,gint x,gint y,gint min_width,gint min_height,gint max_width,gint max_height,gint flags - - -gdk_window_set_geometry_hints -void -GdkWindow *window,GdkGeometry *geometry,GdkWindowHints flags - - -gdk_set_sm_client_id -void -const gchar *sm_client_id - - -gdk_window_set_title -void -GdkWindow *window,const gchar *title - - -gdk_window_set_role -void -GdkWindow *window,const gchar *role - - -gdk_window_set_transient_for -void -GdkWindow *window,GdkWindow *leader - - -gdk_window_set_background -void -GdkWindow *window,GdkColor *color - - -gdk_window_set_back_pixmap -void -GdkWindow *window,GdkPixmap *pixmap,gint parent_relative - - -gdk_window_set_cursor -void -GdkWindow *window,GdkCursor *cursor - - -gdk_window_set_colormap -void -GdkWindow *window,GdkColormap *colormap - - -gdk_window_get_user_data -void -GdkWindow *window,gpointer *data - - -gdk_window_get_geometry -void -GdkWindow *window,gint *x,gint *y,gint *width,gint *height,gint *depth - - -gdk_window_get_position -void -GdkWindow *window,gint *x,gint *y - - -gdk_window_get_size -void -GdkWindow *window,gint *width,gint *height - - -gdk_window_get_visual -GdkVisual * -GdkWindow *window - - -gdk_window_get_colormap -GdkColormap * -GdkWindow *window - - -gdk_window_get_type -GdkWindowType -GdkWindow *window - - -gdk_window_get_origin -gint -GdkWindow *window,gint *x,gint *y - - -gdk_window_get_deskrelative_origin -gboolean -GdkWindow *window,gint *x,gint *y - - -gdk_window_get_root_origin -void -GdkWindow *window,gint *x,gint *y - - -gdk_window_get_pointer -GdkWindow * -GdkWindow *window,gint *x,gint *y,GdkModifierType *mask - - -gdk_window_get_parent -GdkWindow * -GdkWindow *window - - -gdk_window_get_toplevel -GdkWindow * -GdkWindow *window - - -gdk_window_get_children -GList * -GdkWindow *window - - -gdk_window_get_events -GdkEventMask -GdkWindow *window - - -gdk_window_set_events -void -GdkWindow *window,GdkEventMask event_mask - - -gdk_window_set_icon -void -GdkWindow *window,GdkWindow *icon_window,GdkPixmap *pixmap,GdkBitmap *mask - - -gdk_window_set_icon_name -void -GdkWindow *window,gchar *name - - -gdk_window_set_group -void -GdkWindow *window,GdkWindow *leader - - -gdk_window_set_decorations -void -GdkWindow *window,GdkWMDecoration decorations - - -gdk_window_set_functions -void -GdkWindow *window,GdkWMFunction functions - - -gdk_window_get_toplevels -GList * -void - - -gdk_window_register_dnd -void -GdkWindow *window - - -gdk_drawable_set_data -void -GdkDrawable *drawable,const gchar *key,gpointer data,GDestroyNotify destroy_func - - -gdk_cursor_new -GdkCursor * -GdkCursorType cursor_type - - -gdk_cursor_new_from_pixmap -GdkCursor * -GdkPixmap *source,GdkPixmap *mask,GdkColor *fg,GdkColor *bg,gint x,gint y - - -gdk_cursor_destroy -void -GdkCursor *cursor - - -gdk_gc_new -GdkGC * -GdkWindow *window - - -gdk_gc_new_with_values -GdkGC * -GdkWindow *window,GdkGCValues *values,GdkGCValuesMask values_mask - - -gdk_gc_ref -GdkGC * -GdkGC *gc - - -gdk_gc_unref -void -GdkGC *gc - - -gdk_gc_destroy -void -GdkGC *gc - - -gdk_gc_get_values -void -GdkGC *gc,GdkGCValues *values - - -gdk_gc_set_foreground -void -GdkGC *gc,GdkColor *color - - -gdk_gc_set_background -void -GdkGC *gc,GdkColor *color - - -gdk_gc_set_font -void -GdkGC *gc,GdkFont *font - - -gdk_gc_set_function -void -GdkGC *gc,GdkFunction function - - -gdk_gc_set_fill -void -GdkGC *gc,GdkFill fill - - -gdk_gc_set_tile -void -GdkGC *gc,GdkPixmap *tile - - -gdk_gc_set_stipple -void -GdkGC *gc,GdkPixmap *stipple - - -gdk_gc_set_ts_origin -void -GdkGC *gc,gint x,gint y - - -gdk_gc_set_clip_origin -void -GdkGC *gc,gint x,gint y - - -gdk_gc_set_clip_mask -void -GdkGC *gc,GdkBitmap *mask - - -gdk_gc_set_clip_rectangle -void -GdkGC *gc,GdkRectangle *rectangle - - -gdk_gc_set_clip_region -void -GdkGC *gc,GdkRegion *region - - -gdk_gc_set_subwindow -void -GdkGC *gc,GdkSubwindowMode mode - - -gdk_gc_set_exposures -void -GdkGC *gc,gint exposures - - -gdk_gc_set_line_attributes -void -GdkGC *gc,gint line_width,GdkLineStyle line_style,GdkCapStyle cap_style,GdkJoinStyle join_style - - -gdk_gc_set_dashes -void -GdkGC *gc,gint dash_offset,gchar dash_list[],gint n - - -gdk_gc_copy -void -GdkGC *dst_gc,GdkGC *src_gc - - -gdk_pixmap_new -GdkPixmap * -GdkWindow *window,gint width,gint height,gint depth - - -gdk_bitmap_create_from_data -GdkBitmap * -GdkWindow *window,const gchar *data,gint width,gint height - - -gdk_pixmap_create_from_data -GdkPixmap * -GdkWindow *window,const gchar *data,gint width,gint height,gint depth,GdkColor *fg,GdkColor *bg - - -gdk_pixmap_create_from_xpm -GdkPixmap * -GdkWindow *window,GdkBitmap **mask,GdkColor *transparent_color,const gchar *filename - - -gdk_pixmap_colormap_create_from_xpm -GdkPixmap * -GdkWindow *window,GdkColormap *colormap,GdkBitmap **mask,GdkColor *transparent_color,const gchar *filename - - -gdk_pixmap_create_from_xpm_d -GdkPixmap * -GdkWindow *window,GdkBitmap **mask,GdkColor *transparent_color,gchar **data - - -gdk_pixmap_colormap_create_from_xpm_d -GdkPixmap * -GdkWindow *window,GdkColormap *colormap,GdkBitmap **mask,GdkColor *transparent_color,gchar **data - - -gdk_pixmap_ref -GdkPixmap * -GdkPixmap *pixmap - - -gdk_pixmap_unref -void -GdkPixmap *pixmap - - -gdk_bitmap_ref -GdkBitmap * -GdkBitmap *pixmap - - -gdk_bitmap_unref -void -GdkBitmap *pixmap - - -gdk_image_new_bitmap -GdkImage * -GdkVisual *visual,gpointer data,gint width,gint height - - -gdk_image_new -GdkImage * -GdkImageType type,GdkVisual *visual,gint width,gint height - - -gdk_image_get -GdkImage * -GdkWindow *window,gint x,gint y,gint width,gint height - - -gdk_image_put_pixel -void -GdkImage *image,gint x,gint y,guint32 pixel - - -gdk_image_get_pixel -guint32 -GdkImage *image,gint x,gint y - - -gdk_image_destroy -void -GdkImage *image - - -gdk_colormap_new -GdkColormap * -GdkVisual *visual,gint allocate - - -gdk_colormap_ref -GdkColormap * -GdkColormap *cmap - - -gdk_colormap_unref -void -GdkColormap *cmap - - -gdk_colormap_get_system -GdkColormap * -void - - -gdk_colormap_get_system_size -gint -void - - -gdk_colormap_change -void -GdkColormap *colormap,gint ncolors - - -gdk_colormap_alloc_colors -gint -GdkColormap *colormap,GdkColor *colors,gint ncolors,gboolean writeable,gboolean best_match,gboolean *success - - -gdk_colormap_alloc_color -gboolean -GdkColormap *colormap,GdkColor *color,gboolean writeable,gboolean best_match - - -gdk_colormap_free_colors -void -GdkColormap *colormap,GdkColor *colors,gint ncolors - - -gdk_colormap_get_visual -GdkVisual * -GdkColormap *colormap - - -gdk_color_copy -GdkColor * -GdkColor *color - - -gdk_color_free -void -GdkColor *color - - -gdk_color_parse -gboolean -const gchar *spec,GdkColor *color - - -gdk_color_hash -guint -const GdkColor *colora,const GdkColor *colorb - - -gdk_color_equal -gint -const GdkColor *colora,const GdkColor *colorb - - -gdk_colors_store -void -GdkColormap *colormap,GdkColor *colors,gint ncolors - - -gdk_colors_alloc -gboolean -GdkColormap *colormap,gint contiguous,gulong *planes,gint nplanes,gulong *pixels,gint npixels - - -gdk_colors_free -void -GdkColormap *colormap,gulong *pixels,gint npixels,gulong planes - - -gdk_color_white -gboolean -GdkColormap *colormap,GdkColor *color - - -gdk_color_black -gboolean -GdkColormap *colormap,GdkColor *color - - -gdk_color_alloc -gboolean -GdkColormap *colormap,GdkColor *color - - -gdk_color_change -gboolean -GdkColormap *colormap,GdkColor *color - - -gdk_font_load -GdkFont * -const gchar *font_name - - -gdk_fontset_load -GdkFont * -gchar *fontset_name - - -gdk_font_ref -GdkFont * -GdkFont *font - - -gdk_font_unref -void -GdkFont *font - - -gdk_font_id -gint -const GdkFont *font - - -gdk_font_equal -gint -const GdkFont *fonta,const GdkFont *fontb - - -gdk_string_width -gint -GdkFont *font,const gchar *string - - -gdk_text_width -gint -GdkFont *font,const gchar *text,gint text_length - - -gdk_text_width_wc -gint -GdkFont *font,const GdkWChar *text,gint text_length - - -gdk_char_width -gint -GdkFont *font,gchar character - - -gdk_char_width_wc -gint -GdkFont *font,GdkWChar character - - -gdk_string_measure -gint -GdkFont *font,const gchar *string - - -gdk_text_measure -gint -GdkFont *font,const gchar *text,gint text_length - - -gdk_char_measure -gint -GdkFont *font,gchar character - - -gdk_string_height -gint -GdkFont *font,const gchar *string - - -gdk_text_height -gint -GdkFont *font,const gchar *text,gint text_length - - -gdk_char_height -gint -GdkFont *font,gchar character - - -gdk_text_extents -void -GdkFont *font,const gchar *text,gint text_length,gint *lbearing,gint *rbearing,gint *width,gint *ascent,gint *descent - - -gdk_text_extents_wc -void -GdkFont *font,const GdkWChar *text,gint text_length,gint *lbearing,gint *rbearing,gint *width,gint *ascent,gint *descent - - -gdk_string_extents -void -GdkFont *font,const gchar *string,gint *lbearing,gint *rbearing,gint *width,gint *ascent,gint *descent - - -gdk_draw_point -void -GdkDrawable *drawable,GdkGC *gc,gint x,gint y - - -gdk_draw_line -void -GdkDrawable *drawable,GdkGC *gc,gint x1,gint y1,gint x2,gint y2 - - -gdk_draw_rectangle -void -GdkDrawable *drawable,GdkGC *gc,gint filled,gint x,gint y,gint width,gint height - - -gdk_draw_arc -void -GdkDrawable *drawable,GdkGC *gc,gint filled,gint x,gint y,gint width,gint height,gint angle1,gint angle2 - - -gdk_draw_polygon -void -GdkDrawable *drawable,GdkGC *gc,gint filled,GdkPoint *points,gint npoints - - -gdk_draw_string -void -GdkDrawable *drawable,GdkFont *font,GdkGC *gc,gint x,gint y,const gchar *string - - -gdk_draw_text -void -GdkDrawable *drawable,GdkFont *font,GdkGC *gc,gint x,gint y,const gchar *text,gint text_length - - -gdk_draw_text_wc -void -GdkDrawable *drawable,GdkFont *font,GdkGC *gc,gint x,gint y,const GdkWChar *text,gint text_length - - -gdk_draw_pixmap -void -GdkDrawable *drawable,GdkGC *gc,GdkDrawable *src,gint xsrc,gint ysrc,gint xdest,gint ydest,gint width,gint height - - -gdk_draw_bitmap -void -GdkDrawable *drawable,GdkGC *gc,GdkDrawable *src,gint xsrc,gint ysrc,gint xdest,gint ydest,gint width,gint height - - -gdk_draw_image -void -GdkDrawable *drawable,GdkGC *gc,GdkImage *image,gint xsrc,gint ysrc,gint xdest,gint ydest,gint width,gint height - - -gdk_draw_points -void -GdkDrawable *drawable,GdkGC *gc,GdkPoint *points,gint npoints - - -gdk_draw_segments -void -GdkDrawable *drawable,GdkGC *gc,GdkSegment *segs,gint nsegs - - -gdk_draw_lines -void -GdkDrawable *drawable,GdkGC *gc,GdkPoint *points,gint npoints - - -gdk_selection_owner_set -gint -GdkWindow *owner,GdkAtom selection,guint32 time,gint send_event - - -gdk_selection_owner_get -GdkWindow * -GdkAtom selection - - -gdk_selection_convert -void -GdkWindow *requestor,GdkAtom selection,GdkAtom target,guint32 time - - -gdk_selection_property_get -gint -GdkWindow *requestor,guchar **data,GdkAtom *prop_type,gint *prop_format - - -gdk_selection_send_notify -void -guint32 requestor,GdkAtom selection,GdkAtom target,GdkAtom property,guint32 time - - -gdk_text_property_to_text_list -gint -GdkAtom encoding, gint format,guchar *text, gint length,gchar ***list - - -gdk_free_text_list -void -gchar **list - - -gdk_string_to_compound_text -gint -gchar *str,GdkAtom *encoding, gint *format,guchar **ctext, gint *length - - -gdk_free_compound_text -void -guchar *ctext - - -gdk_atom_intern -GdkAtom -const gchar *atom_name,gint only_if_exists - - -gdk_atom_name -gchar * -GdkAtom atom - - -gdk_property_get -gint -GdkWindow *window,GdkAtom property,GdkAtom type,gulong offset,gulong length,gint pdelete,GdkAtom *actual_property_type,gint *actual_format,gint *actual_length,guchar **data - - -gdk_property_change -void -GdkWindow *window,GdkAtom property,GdkAtom type,gint format,GdkPropMode mode,guchar *data,gint nelements - - -gdk_property_delete -void -GdkWindow *window,GdkAtom property - - -gdk_rectangle_intersect -gint -GdkRectangle *src1,GdkRectangle *src2,GdkRectangle *dest - - -gdk_rectangle_union -void -GdkRectangle *src1,GdkRectangle *src2,GdkRectangle *dest - - -gdk_input_init -void -void - - -gdk_input_exit -void -void - - -gdk_input_list_devices -GList * -void - - -gdk_input_set_extension_events -void -GdkWindow *window,gint mask,GdkExtensionMode mode - - -gdk_input_set_source -void -guint32 deviceid,GdkInputSource source - - -gdk_input_set_mode -gint -guint32 deviceid,GdkInputMode mode - - -gdk_input_set_axes -void -guint32 deviceid,GdkAxisUse *axes - - -gdk_input_set_key -void -guint32 deviceid,guint index,guint keyval,GdkModifierType modifiers - - -gdk_input_window_get_pointer -void -GdkWindow *window,guint32 deviceid,gdouble *x,gdouble *y,gdouble *pressure,gdouble *xtilt,gdouble *ytilt,GdkModifierType *mask - - -gdk_input_motion_events -GdkTimeCoord * -GdkWindow *window,guint32 deviceid,guint32 start,guint32 stop,gint *nevents_return - - -gdk_im_ready -gint -void - - -gdk_im_begin -void -GdkIC *ic,GdkWindow *window - - -gdk_im_end -void -void - - -gdk_im_decide_style -GdkIMStyle -GdkIMStyle supported_style - - -gdk_im_set_best_style -GdkIMStyle -GdkIMStyle best_allowed_style - - -gdk_ic_new -GdkIC * -GdkICAttr *attr,GdkICAttributesType mask - - -gdk_ic_destroy -void -GdkIC *ic - - -gdk_ic_get_style -GdkIMStyle -GdkIC *ic - - -gdk_ic_get_events -GdkEventMask -GdkIC *ic - - -gdk_ic_attr_new -GdkICAttr * -void - - -gdk_ic_attr_destroy -void -GdkICAttr *attr - - -gdk_ic_set_attr -GdkICAttributesType -GdkIC *ic,GdkICAttr *attr,GdkICAttributesType mask - - -gdk_ic_get_attr -GdkICAttributesType -GdkIC *ic,GdkICAttr *attr,GdkICAttributesType mask - - -gdk_wcstombs -gchar * -const GdkWChar *src - - -gdk_mbstowcs -gint -GdkWChar *dest,const gchar *src,gint dest_max - - -gdk_color_context_new -GdkColorContext * -GdkVisual *visual,GdkColormap *colormap - - -gdk_color_context_new_mono -GdkColorContext * -GdkVisual *visual,GdkColormap *colormap - - -gdk_color_context_free -void -GdkColorContext *cc - - -gdk_color_context_get_pixel -gulong -GdkColorContext *cc,gushort red,gushort green,gushort blue,gint *failed - - -gdk_color_context_get_pixels -void -GdkColorContext *cc,gushort *reds,gushort *greens,gushort *blues,gint ncolors,gulong *colors,gint *nallocated - - -gdk_color_context_get_pixels_incremental -void -GdkColorContext *cc,gushort *reds,gushort *greens,gushort *blues,gint ncolors,gint *used,gulong *colors,gint *nallocated - - -gdk_color_context_query_color -gint -GdkColorContext *cc,GdkColor *color - - -gdk_color_context_query_colors -gint -GdkColorContext *cc,GdkColor *colors,gint num_colors - - -gdk_color_context_add_palette -gint -GdkColorContext *cc,GdkColor *palette,gint num_palette - - -gdk_color_context_init_dither -void -GdkColorContext *cc - - -gdk_color_context_free_dither -void -GdkColorContext *cc - - -gdk_color_context_get_pixel_from_palette -gulong -GdkColorContext *cc,gushort *red,gushort *green,gushort *blue,gint *failed - - -gdk_color_context_get_index_from_palette -guchar -GdkColorContext *cc,gint *red,gint *green,gint *blue,gint *failed - - -gdk_region_new -GdkRegion * -void - - -gdk_region_destroy -void -GdkRegion *region - - -gdk_region_get_clipbox -void -GdkRegion *region,GdkRectangle *rectangle - - -gdk_region_empty -gboolean -GdkRegion *region - - -gdk_region_equal -gboolean -GdkRegion *region1,GdkRegion *region2 - - -gdk_region_point_in -gboolean -GdkRegion *region,int x,int y - - -gdk_region_rect_in -GdkOverlapType -GdkRegion *region,GdkRectangle *rect - - -gdk_region_polygon -GdkRegion * -GdkPoint *points,gint npoints,GdkFillRule fill_rule - - -gdk_region_offset -void -GdkRegion *region,gint dx,gint dy - - -gdk_region_shrink -void -GdkRegion *region,gint dx,gint dy - - -gdk_region_union_with_rect -GdkRegion * -GdkRegion *region,GdkRectangle *rect - - -gdk_regions_intersect -GdkRegion * -GdkRegion *source1,GdkRegion *source2 - - -gdk_regions_union -GdkRegion * -GdkRegion *source1,GdkRegion *source2 - - -gdk_regions_subtract -GdkRegion * -GdkRegion *source1,GdkRegion *source2 - - -gdk_regions_xor -GdkRegion * -GdkRegion *source1,GdkRegion *source2 - - -gdk_event_send_clientmessage_toall -void -GdkEvent *event - - -gdk_event_send_client_message -gboolean -GdkEvent *event,guint32 xid - - -gdk_keyval_name -gchar * -guint keyval - - -gdk_keyval_from_name -guint -const gchar *keyval_name - - -gdk_keyval_to_upper -guint -guint keyval - - -gdk_keyval_to_lower -guint -guint keyval - - -gdk_keyval_is_upper -gboolean -guint keyval - - -gdk_keyval_is_lower -gboolean -guint keyval - - -gdk_threads_mutex -extern GMutex *gdk_threads_mutex; - - -gdk_threads_enter -void -void - - -gdk_threads_leave -void -void - - -GDK_THREADS_ENTER -# define GDK_THREADS_ENTER() G_STMT_START { \ - if (gdk_threads_mutex) \ - g_mutex_lock (gdk_threads_mutex); \ - } G_STMT_END - - -GDK_THREADS_LEAVE -# define GDK_THREADS_LEAVE() G_STMT_START { \ - if (gdk_threads_mutex) \ - g_mutex_unlock (gdk_threads_mutex); \ - } G_STMT_END - - -GDK_THREADS_ENTER -# define GDK_THREADS_ENTER() - - -GDK_THREADS_LEAVE -# define GDK_THREADS_LEAVE() - - -GDK_NONE -#define GDK_NONE 0L - - -GDK_CURRENT_TIME -#define GDK_CURRENT_TIME 0L - - -GDK_PARENT_RELATIVE -#define GDK_PARENT_RELATIVE 1L - - -GDK_CORE_POINTER -#define GDK_CORE_POINTER 0xfedc - - -GdkAtom -typedef gulong GdkAtom; - - -GdkColor - - -GdkColormap - - -GdkVisual - - -GdkWindowAttr - - -GdkWindow - - -GdkGeometry - - -GdkImage - - -GdkGCValues - - -GdkGC - - -GdkPoint - - -GdkRectangle - - -GdkSegment - - -GdkFont - - -GdkCursor - - -GdkColorContextDither - - -GdkColorContext - - -GdkDragContext - - -GdkEventAny - - -GdkEventExpose - - -GdkEventNoExpose - - -GdkEventVisibility - - -GdkEventMotion - - -GdkEventButton - - -GdkEventKey - - -GdkEventFocus - - -GdkEventCrossing - - -GdkEventConfigure - - -GdkEventProperty - - -GdkEventSelection - - -GdkEventProximity - - -GdkEventClient - - -GdkEventDND - - -GdkDeviceKey - - -GdkDeviceInfo - - -GdkTimeCoord - - -GdkRegion - - -GdkEventFunc -void -GdkEvent *event, - gpointer data - - -GdkIC - - -GdkICAttr - - -GdkWChar -typedef guint32 GdkWChar; - - -GdkWindowType -typedef enum -{ - GDK_WINDOW_ROOT, - GDK_WINDOW_TOPLEVEL, - GDK_WINDOW_CHILD, - GDK_WINDOW_DIALOG, - GDK_WINDOW_TEMP, - GDK_WINDOW_PIXMAP, - GDK_WINDOW_FOREIGN -} GdkWindowType; - - -GdkWindowClass -typedef enum -{ - GDK_INPUT_OUTPUT, - GDK_INPUT_ONLY -} GdkWindowClass; - - -GdkImageType -typedef enum -{ - GDK_IMAGE_NORMAL, - GDK_IMAGE_SHARED, - GDK_IMAGE_FASTEST -} GdkImageType; - - -GdkVisualType -typedef enum -{ - GDK_VISUAL_STATIC_GRAY, - GDK_VISUAL_GRAYSCALE, - GDK_VISUAL_STATIC_COLOR, - GDK_VISUAL_PSEUDO_COLOR, - GDK_VISUAL_TRUE_COLOR, - GDK_VISUAL_DIRECT_COLOR -} GdkVisualType; - - -GdkFontType -typedef enum -{ - GDK_FONT_FONT, - GDK_FONT_FONTSET -} GdkFontType; - - -GdkWindowAttributesType -typedef enum -{ - GDK_WA_TITLE = 1 << 1, - GDK_WA_X = 1 << 2, - GDK_WA_Y = 1 << 3, - GDK_WA_CURSOR = 1 << 4, - GDK_WA_COLORMAP = 1 << 5, - GDK_WA_VISUAL = 1 << 6, - GDK_WA_WMCLASS = 1 << 7, - GDK_WA_NOREDIR = 1 << 8 -} GdkWindowAttributesType; - - -GdkWindowHints -typedef enum -{ - GDK_HINT_POS = 1 << 0, - GDK_HINT_MIN_SIZE = 1 << 1, - GDK_HINT_MAX_SIZE = 1 << 2, - GDK_HINT_BASE_SIZE = 1 << 3, - GDK_HINT_ASPECT = 1 << 4, - GDK_HINT_RESIZE_INC = 1 << 5 -} GdkWindowHints; - - -GdkFunction -typedef enum -{ - 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_SET -} GdkFunction; - - -GdkFill -typedef enum -{ - GDK_SOLID, - GDK_TILED, - GDK_STIPPLED, - GDK_OPAQUE_STIPPLED -} GdkFill; - - -GdkFillRule -typedef enum -{ - GDK_EVEN_ODD_RULE, - GDK_WINDING_RULE -} GdkFillRule; - - -GdkLineStyle -typedef enum -{ - GDK_LINE_SOLID, - GDK_LINE_ON_OFF_DASH, - GDK_LINE_DOUBLE_DASH -} GdkLineStyle; - - -GdkCapStyle -typedef enum -{ - GDK_CAP_NOT_LAST, - GDK_CAP_BUTT, - GDK_CAP_ROUND, - GDK_CAP_PROJECTING -} GdkCapStyle; - - -GdkJoinStyle -typedef enum -{ - GDK_JOIN_MITER, - GDK_JOIN_ROUND, - GDK_JOIN_BEVEL -} GdkJoinStyle; - - -GdkCursorType -typedef enum -{ -#include - GDK_LAST_CURSOR, - GDK_CURSOR_IS_PIXMAP = -1 -} GdkCursorType; - - -GdkFilterReturn -typedef enum { - GDK_FILTER_CONTINUE, /* Event not handled, continue processesing */ - GDK_FILTER_TRANSLATE, /* Translated event stored */ - GDK_FILTER_REMOVE /* Terminate processing, removing event */ -} GdkFilterReturn; - - -GdkVisibilityState -typedef enum { - GDK_VISIBILITY_UNOBSCURED, - GDK_VISIBILITY_PARTIAL, - GDK_VISIBILITY_FULLY_OBSCURED -} GdkVisibilityState; - - -GdkEventType -typedef enum -{ - 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 = 24, - GDK_DRAG_STATUS = 25, - GDK_DROP_START = 26, - GDK_DROP_FINISHED = 27, - GDK_CLIENT_EVENT = 28, - GDK_VISIBILITY_NOTIFY = 29, - GDK_NO_EXPOSE = 30 -} GdkEventType; - - -GdkEventMask -typedef enum -{ - GDK_EXPOSURE_MASK = 1 << 1, - GDK_POINTER_MOTION_MASK = 1 << 2, - GDK_POINTER_MOTION_HINT_MASK = 1 << 3, - GDK_BUTTON_MOTION_MASK = 1 << 4, - GDK_BUTTON1_MOTION_MASK = 1 << 5, - GDK_BUTTON2_MOTION_MASK = 1 << 6, - GDK_BUTTON3_MOTION_MASK = 1 << 7, - GDK_BUTTON_PRESS_MASK = 1 << 8, - GDK_BUTTON_RELEASE_MASK = 1 << 9, - GDK_KEY_PRESS_MASK = 1 << 10, - GDK_KEY_RELEASE_MASK = 1 << 11, - GDK_ENTER_NOTIFY_MASK = 1 << 12, - GDK_LEAVE_NOTIFY_MASK = 1 << 13, - GDK_FOCUS_CHANGE_MASK = 1 << 14, - GDK_STRUCTURE_MASK = 1 << 15, - GDK_PROPERTY_CHANGE_MASK = 1 << 16, - GDK_VISIBILITY_NOTIFY_MASK = 1 << 17, - GDK_PROXIMITY_IN_MASK = 1 << 18, - GDK_PROXIMITY_OUT_MASK = 1 << 19, - GDK_SUBSTRUCTURE_MASK = 1 << 20, - GDK_ALL_EVENTS_MASK = 0x0FFFFF -} GdkEventMask; - - -GdkNotifyType -typedef enum -{ - 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 -} GdkNotifyType; - - -GdkCrossingMode -typedef enum -{ - GDK_CROSSING_NORMAL, - GDK_CROSSING_GRAB, - GDK_CROSSING_UNGRAB -} GdkCrossingMode; - - -GdkModifierType -typedef enum -{ - GDK_SHIFT_MASK = 1 << 0, - GDK_LOCK_MASK = 1 << 1, - GDK_CONTROL_MASK = 1 << 2, - GDK_MOD1_MASK = 1 << 3, - GDK_MOD2_MASK = 1 << 4, - GDK_MOD3_MASK = 1 << 5, - GDK_MOD4_MASK = 1 << 6, - GDK_MOD5_MASK = 1 << 7, - GDK_BUTTON1_MASK = 1 << 8, - GDK_BUTTON2_MASK = 1 << 9, - GDK_BUTTON3_MASK = 1 << 10, - GDK_BUTTON4_MASK = 1 << 11, - GDK_BUTTON5_MASK = 1 << 12, - GDK_RELEASE_MASK = 1 << 13, - GDK_MODIFIER_MASK = 0x3fff -} GdkModifierType; - - -GdkSubwindowMode -typedef enum -{ - GDK_CLIP_BY_CHILDREN = 0, - GDK_INCLUDE_INFERIORS = 1 -} GdkSubwindowMode; - - -GdkInputCondition -typedef enum -{ - GDK_INPUT_READ = 1 << 0, - GDK_INPUT_WRITE = 1 << 1, - GDK_INPUT_EXCEPTION = 1 << 2 -} GdkInputCondition; - - -GdkStatus -typedef enum -{ - GDK_OK = 0, - GDK_ERROR = -1, - GDK_ERROR_PARAM = -2, - GDK_ERROR_FILE = -3, - GDK_ERROR_MEM = -4 -} GdkStatus; - - -GdkByteOrder -typedef enum -{ - GDK_LSB_FIRST, - GDK_MSB_FIRST -} GdkByteOrder; - - -GdkGCValuesMask -typedef enum -{ - GDK_GC_FOREGROUND = 1 << 0, - GDK_GC_BACKGROUND = 1 << 1, - GDK_GC_FONT = 1 << 2, - GDK_GC_FUNCTION = 1 << 3, - GDK_GC_FILL = 1 << 4, - GDK_GC_TILE = 1 << 5, - GDK_GC_STIPPLE = 1 << 6, - GDK_GC_CLIP_MASK = 1 << 7, - GDK_GC_SUBWINDOW = 1 << 8, - GDK_GC_TS_X_ORIGIN = 1 << 9, - GDK_GC_TS_Y_ORIGIN = 1 << 10, - GDK_GC_CLIP_X_ORIGIN = 1 << 11, - GDK_GC_CLIP_Y_ORIGIN = 1 << 12, - GDK_GC_EXPOSURES = 1 << 13, - GDK_GC_LINE_WIDTH = 1 << 14, - GDK_GC_LINE_STYLE = 1 << 15, - GDK_GC_CAP_STYLE = 1 << 16, - GDK_GC_JOIN_STYLE = 1 << 17 -} GdkGCValuesMask; - - -GdkSelection -typedef enum -{ - GDK_SELECTION_PRIMARY = 1, - GDK_SELECTION_SECONDARY = 2 -} GdkSelection; - - -GdkPropertyState -typedef enum -{ - GDK_PROPERTY_NEW_VALUE, - GDK_PROPERTY_DELETE -} GdkPropertyState; - - -GdkPropMode -typedef enum -{ - GDK_PROP_MODE_REPLACE, - GDK_PROP_MODE_PREPEND, - GDK_PROP_MODE_APPEND -} GdkPropMode; - - -GdkInputSource -typedef enum -{ - GDK_SOURCE_MOUSE, - GDK_SOURCE_PEN, - GDK_SOURCE_ERASER, - GDK_SOURCE_CURSOR -} GdkInputSource; - - -GdkInputMode -typedef enum -{ - GDK_MODE_DISABLED, - GDK_MODE_SCREEN, - GDK_MODE_WINDOW -} GdkInputMode; - - -GdkAxisUse -typedef enum -{ - GDK_AXIS_IGNORE, - GDK_AXIS_X, - GDK_AXIS_Y, - GDK_AXIS_PRESSURE, - GDK_AXIS_XTILT, - GDK_AXIS_YTILT, - GDK_AXIS_LAST -} GdkAxisUse; - - -GdkTarget -typedef enum -{ - GDK_TARGET_BITMAP = 5, - GDK_TARGET_COLORMAP = 7, - GDK_TARGET_DRAWABLE = 17, - GDK_TARGET_PIXMAP = 20, - GDK_TARGET_STRING = 31 -} GdkTarget; - - -GdkSelectionType -typedef enum -{ - GDK_SELECTION_TYPE_ATOM = 4, - GDK_SELECTION_TYPE_BITMAP = 5, - GDK_SELECTION_TYPE_COLORMAP = 7, - GDK_SELECTION_TYPE_DRAWABLE = 17, - GDK_SELECTION_TYPE_INTEGER = 19, - GDK_SELECTION_TYPE_PIXMAP = 20, - GDK_SELECTION_TYPE_WINDOW = 33, - GDK_SELECTION_TYPE_STRING = 31 -} GdkSelectionType; - - -GdkExtensionMode -typedef enum -{ - GDK_EXTENSION_EVENTS_NONE, - GDK_EXTENSION_EVENTS_ALL, - GDK_EXTENSION_EVENTS_CURSOR -} GdkExtensionMode; - - -GdkIMStyle -typedef enum /*< flags >*/ -{ - GDK_IM_PREEDIT_AREA = 0x0001, - GDK_IM_PREEDIT_CALLBACKS = 0x0002, - GDK_IM_PREEDIT_POSITION = 0x0004, - GDK_IM_PREEDIT_NOTHING = 0x0008, - GDK_IM_PREEDIT_NONE = 0x0010, - GDK_IM_PREEDIT_MASK = 0x001f, - - GDK_IM_STATUS_AREA = 0x0100, - GDK_IM_STATUS_CALLBACKS = 0x0200, - GDK_IM_STATUS_NOTHING = 0x0400, - GDK_IM_STATUS_NONE = 0x0800, - GDK_IM_STATUS_MASK = 0x0f00 -} GdkIMStyle; - - -GdkICAttributesType -typedef enum -{ - GDK_IC_STYLE = 1 << 0, - GDK_IC_CLIENT_WINDOW = 1 << 1, - GDK_IC_FOCUS_WINDOW = 1 << 2, - GDK_IC_FILTER_EVENTS = 1 << 3, - GDK_IC_SPOT_LOCATION = 1 << 4, - GDK_IC_LINE_SPACING = 1 << 5, - GDK_IC_CURSOR = 1 << 6, - - GDK_IC_PREEDIT_FONTSET = 1 << 10, - GDK_IC_PREEDIT_AREA = 1 << 11, - GDK_IC_PREEDIT_AREA_NEEDED = 1 << 12, - GDK_IC_PREEDIT_FOREGROUND = 1 << 13, - GDK_IC_PREEDIT_BACKGROUND = 1 << 14, - GDK_IC_PREEDIT_PIXMAP = 1 << 15, - GDK_IC_PREEDIT_COLORMAP = 1 << 16, - - GDK_IC_STATUS_FONTSET = 1 << 21, - GDK_IC_STATUS_AREA = 1 << 22, - GDK_IC_STATUS_AREA_NEEDED = 1 << 23, - GDK_IC_STATUS_FOREGROUND = 1 << 24, - GDK_IC_STATUS_BACKGROUND = 1 << 25, - GDK_IC_STATUS_PIXMAP = 1 << 26, - GDK_IC_STATUS_COLORMAP = 1 << 27, - - GDK_IC_ALL_REQ = GDK_IC_STYLE | - GDK_IC_CLIENT_WINDOW, - - GDK_IC_PREEDIT_AREA_REQ = GDK_IC_PREEDIT_AREA | - GDK_IC_PREEDIT_FONTSET, - GDK_IC_PREEDIT_POSITION_REQ = GDK_IC_PREEDIT_AREA | GDK_IC_SPOT_LOCATION | - GDK_IC_PREEDIT_FONTSET, - - GDK_IC_STATUS_AREA_REQ = GDK_IC_STATUS_AREA | - GDK_IC_STATUS_FONTSET -} GdkICAttributesType; - - -GdkWMDecoration -typedef enum -{ - GDK_DECOR_ALL = 1 << 0, - GDK_DECOR_BORDER = 1 << 1, - GDK_DECOR_RESIZEH = 1 << 2, - GDK_DECOR_TITLE = 1 << 3, - GDK_DECOR_MENU = 1 << 4, - GDK_DECOR_MINIMIZE = 1 << 5, - GDK_DECOR_MAXIMIZE = 1 << 6 -} GdkWMDecoration; - - -GdkWMFunction -typedef enum -{ - GDK_FUNC_ALL = 1 << 0, - GDK_FUNC_RESIZE = 1 << 1, - GDK_FUNC_MOVE = 1 << 2, - GDK_FUNC_MINIMIZE = 1 << 3, - GDK_FUNC_MAXIMIZE = 1 << 4, - GDK_FUNC_CLOSE = 1 << 5 -} GdkWMFunction; - - -GdkInputFunction -void -gpointer data, - gint source, - GdkInputCondition condition - - -GdkDestroyNotify -void -gpointer data - - -GdkColorContextMode -typedef enum -{ - GDK_CC_MODE_UNDEFINED, - GDK_CC_MODE_BW, - GDK_CC_MODE_STD_CMAP, - GDK_CC_MODE_TRUE, - GDK_CC_MODE_MY_GRAY, - GDK_CC_MODE_PALETTE -} GdkColorContextMode; - - -GdkOverlapType -typedef enum -{ - GDK_OVERLAP_RECTANGLE_IN, - GDK_OVERLAP_RECTANGLE_OUT, - GDK_OVERLAP_RECTANGLE_PART -} GdkOverlapType; - - -GdkDragAction -typedef enum { - GDK_ACTION_DEFAULT = 1 << 0, - GDK_ACTION_COPY = 1 << 1, - GDK_ACTION_MOVE = 1 << 2, - GDK_ACTION_LINK = 1 << 3, - GDK_ACTION_PRIVATE = 1 << 4, - GDK_ACTION_ASK = 1 << 5 -} GdkDragAction; - - -GdkDragProtocol -typedef enum { - GDK_DRAG_PROTO_MOTIF, - GDK_DRAG_PROTO_XDND, - GDK_DRAG_PROTO_ROOTWIN, /* A root window with nobody claiming - * drags */ - GDK_DRAG_PROTO_NONE /* Not a valid drag window */ -} GdkDragProtocol; - - -GdkColor -struct GdkColor -{ - gulong pixel; - gushort red; - gushort green; - gushort blue; -}; - - -GdkColormap -struct GdkColormap -{ - gint size; - GdkColor *colors; -}; - - -GdkVisual -struct GdkVisual -{ - GdkVisualType type; - gint depth; - GdkByteOrder byte_order; - gint colormap_size; - gint bits_per_rgb; - - guint32 red_mask; - gint red_shift; - gint red_prec; - - guint32 green_mask; - gint green_shift; - gint green_prec; - - guint32 blue_mask; - gint blue_shift; - gint blue_prec; -}; - - -GdkWindowAttr -struct GdkWindowAttr -{ - gchar *title; - gint event_mask; - gint16 x, y; - gint16 width; - gint16 height; - GdkWindowClass wclass; - GdkVisual *visual; - GdkColormap *colormap; - GdkWindowType window_type; - GdkCursor *cursor; - gchar *wmclass_name; - gchar *wmclass_class; - gboolean override_redirect; -}; - - -GdkWindow -struct GdkWindow -{ - gpointer user_data; -}; - - -GdkGeometry -struct GdkGeometry { - gint min_width; - gint min_height; - gint max_width; - gint max_height; - gint base_width; - gint base_height; - gint width_inc; - gint height_inc; - gdouble min_aspect; - gdouble max_aspect; - /* GdkGravity gravity; */ -}; - - -GdkImage -struct GdkImage -{ - GdkImageType type; - GdkVisual *visual; /* visual used to create the image */ - GdkByteOrder byte_order; - guint16 width; - guint16 height; - guint16 depth; - guint16 bpp; /* bytes per pixel */ - guint16 bpl; /* bytes per line */ - gpointer mem; -}; - - -GdkGCValues -struct GdkGCValues -{ - GdkColor foreground; - GdkColor background; - GdkFont *font; - GdkFunction function; - GdkFill fill; - GdkPixmap *tile; - GdkPixmap *stipple; - GdkPixmap *clip_mask; - GdkSubwindowMode subwindow_mode; - gint ts_x_origin; - gint ts_y_origin; - gint clip_x_origin; - gint clip_y_origin; - gint graphics_exposures; - gint line_width; - GdkLineStyle line_style; - GdkCapStyle cap_style; - GdkJoinStyle join_style; -}; - - -GdkGC -struct GdkGC -{ - gint dummy_var; -}; - - -GdkPoint -struct GdkPoint -{ - gint16 x; - gint16 y; -}; - - -GdkRectangle -struct GdkRectangle -{ - gint16 x; - gint16 y; - guint16 width; - guint16 height; -}; - - -GdkSegment -struct GdkSegment -{ - gint16 x1; - gint16 y1; - gint16 x2; - gint16 y2; -}; - - -GdkFont -struct GdkFont -{ - GdkFontType type; - gint ascent; - gint descent; -}; - - -GdkCursor -struct GdkCursor -{ - GdkCursorType type; -}; - - -GdkColorContextDither -struct GdkColorContextDither -{ - gint fast_rgb[32][32][32]; /* quick look-up table for faster rendering */ - gint fast_err[32][32][32]; /* internal RGB error information */ - gint fast_erg[32][32][32]; - gint fast_erb[32][32][32]; -}; - - -GdkColorContext -struct GdkColorContext -{ - GdkVisual *visual; - GdkColormap *colormap; - - gint num_colors; /* available no. of colors in colormap */ - gint max_colors; /* maximum no. of colors */ - gint num_allocated; /* no. of allocated colors */ - - GdkColorContextMode mode; - gint need_to_free_colormap; - GdkAtom std_cmap_atom; - - gulong *clut; /* color look-up table */ - GdkColor *cmap; /* colormap */ - - GHashTable *color_hash; /* hash table of allocated colors */ - GdkColor *palette; /* preallocated palette */ - gint num_palette; /* size of palette */ - - GdkColorContextDither *fast_dither; /* fast dither matrix */ - - struct - { - gint red; - gint green; - gint blue; - } shifts; - - - -GdkDeviceKey -struct GdkDeviceKey -{ - guint keyval; - GdkModifierType modifiers; -}; - - -GdkDeviceInfo -struct GdkDeviceInfo -{ - guint32 deviceid; - gchar *name; - GdkInputSource source; - GdkInputMode mode; - gint has_cursor; /* TRUE if the X pointer follows device motion */ - gint num_axes; - GdkAxisUse *axes; /* Specifies use for each axis */ - gint num_keys; - GdkDeviceKey *keys; -}; - - -GdkTimeCoord -struct GdkTimeCoord -{ - guint32 time; - gdouble x; - gdouble y; - gdouble pressure; - gdouble xtilt; - gdouble ytilt; -}; - - -GdkDragContext -struct GdkDragContext { - GdkDragProtocol protocol; - - gboolean is_source; - - GdkWindow *source_window; - GdkWindow *dest_window; - - GList *targets; - GdkDragAction actions; - GdkDragAction suggested_action; - GdkDragAction action; - - guint32 start_time; -}; - - -GdkXEvent -typedef void GdkXEvent; /* Can be cast to XEvent */ - - -GdkFilterFunc -GdkFilterReturn -GdkXEvent *xevent, - GdkEvent *event, - gpointer data - - -GdkEventAny -struct GdkEventAny -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; -}; - - -GdkEventExpose -struct GdkEventExpose -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - GdkRectangle area; - gint count; /* If non-zero, how many more events follow. */ -}; - - -GdkEventNoExpose -struct GdkEventNoExpose -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - /* XXX: does anyone need the X major_code or minor_code fields? */ -}; - - -GdkEventVisibility -struct GdkEventVisibility -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - GdkVisibilityState state; -}; - - -GdkEventMotion -struct GdkEventMotion -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - guint32 time; - gdouble x; - gdouble y; - gdouble pressure; - gdouble xtilt; - gdouble ytilt; - guint state; - gint16 is_hint; - GdkInputSource source; - guint32 deviceid; - gdouble x_root, y_root; -}; - - -GdkEventButton -struct GdkEventButton -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - guint32 time; - gdouble x; - gdouble y; - gdouble pressure; - gdouble xtilt; - gdouble ytilt; - guint state; - guint button; - GdkInputSource source; - guint32 deviceid; - gdouble x_root, y_root; -}; - - -GdkEventKey -struct GdkEventKey -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - guint32 time; - guint state; - guint keyval; - gint length; - gchar *string; -}; - - -GdkEventCrossing -struct GdkEventCrossing -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - GdkWindow *subwindow; - guint32 time; - gdouble x; - gdouble y; - gdouble x_root; - gdouble y_root; - GdkCrossingMode mode; - GdkNotifyType detail; - gboolean focus; - guint state; -}; - - -GdkEventFocus -struct GdkEventFocus -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - gint16 in; -}; - - -GdkEventConfigure -struct GdkEventConfigure -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - gint16 x, y; - gint16 width; - gint16 height; -}; - - -GdkEventProperty -struct GdkEventProperty -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - GdkAtom atom; - guint32 time; - guint state; -}; - - -GdkEventSelection -struct GdkEventSelection -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - GdkAtom selection; - GdkAtom target; - GdkAtom property; - guint32 requestor; - guint32 time; -}; - - -GdkEventProximity -struct GdkEventProximity -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - guint32 time; - GdkInputSource source; - guint32 deviceid; -}; - - -GdkEventClient -struct GdkEventClient -{ - GdkEventType type; - GdkWindow *window; - gint8 send_event; - GdkAtom message_type; - gushort data_format; - union { - char b[20]; - short s[10]; - long l[5]; - } data; -}; - - -GdkEventDND -struct GdkEventDND { - GdkEventType type; - GdkWindow *window; - gint8 send_event; - GdkDragContext *context; - - guint32 time; - gshort x_root, y_root; -}; - - -GdkEvent -union GdkEvent -{ - GdkEventType type; - GdkEventAny any; - GdkEventExpose expose; - GdkEventNoExpose no_expose; - GdkEventVisibility visibility; - GdkEventMotion motion; - GdkEventButton button; - GdkEventKey key; - GdkEventCrossing crossing; - GdkEventFocus focus_change; - GdkEventConfigure configure; - GdkEventProperty property; - GdkEventSelection selection; - GdkEventProximity proximity; - GdkEventClient client; - GdkEventDND dnd; -}; - - -GdkRegion -struct GdkRegion -{ - gpointer user_data; -}; - - -GdkICAttr -struct GdkICAttr -{ - GdkIMStyle style; - GdkWindow *client_window; - GdkWindow *focus_window; - GdkEventMask filter_events; - GdkPoint spot_location; - gint line_spacing; - GdkCursor *cursor; - - GdkFont *preedit_fontset; - GdkRectangle preedit_area; - GdkRectangle preedit_area_needed; - GdkColor preedit_foreground; - GdkColor preedit_background; - GdkPixmap *preedit_pixmap; - GdkColormap *preedit_colormap; - - GdkFont *status_fontset; - GdkRectangle status_area; - GdkRectangle status_area_needed; - GdkColor status_foreground; - GdkColor status_background; - GdkPixmap *status_pixmap; - GdkColormap *status_colormap; -}; - - -GdkRgbCmap - - -GdkRgbCmap -struct GdkRgbCmap { - guint32 colors[256]; - guchar lut[256]; /* for 8-bit modes */ -}; - - -gdk_rgb_init -void -void - - -gdk_rgb_xpixel_from_rgb -gulong -guint32 rgb - - -gdk_rgb_gc_set_foreground -void -GdkGC *gc, guint32 rgb - - -gdk_rgb_gc_set_background -void -GdkGC *gc, guint32 rgb - - -GdkRgbDither -typedef enum -{ - GDK_RGB_DITHER_NONE, - GDK_RGB_DITHER_NORMAL, - GDK_RGB_DITHER_MAX -} GdkRgbDither; - - -gdk_draw_rgb_image -void -GdkDrawable *drawable,GdkGC *gc,gint x,gint y,gint width,gint height,GdkRgbDither dith,guchar *rgb_buf,gint rowstride - - -gdk_draw_rgb_image_dithalign -void -GdkDrawable *drawable,GdkGC *gc,gint x,gint y,gint width,gint height,GdkRgbDither dith,guchar *rgb_buf,gint rowstride,gint xdith,gint ydith - - -gdk_draw_rgb_32_image -void -GdkDrawable *drawable,GdkGC *gc,gint x,gint y,gint width,gint height,GdkRgbDither dith,guchar *buf,gint rowstride - - -gdk_draw_gray_image -void -GdkDrawable *drawable,GdkGC *gc,gint x,gint y,gint width,gint height,GdkRgbDither dith,guchar *buf,gint rowstride - - -gdk_rgb_cmap_new -GdkRgbCmap * -guint32 *colors, gint n_colors - - -gdk_rgb_cmap_free -void -GdkRgbCmap *cmap - - -gdk_draw_indexed_image -void -GdkDrawable *drawable,GdkGC *gc,gint x,gint y,gint width,gint height,GdkRgbDither dith,guchar *buf,gint rowstride,GdkRgbCmap *cmap - - -gdk_rgb_ditherable -gboolean -void - - -gdk_rgb_set_verbose -void -gboolean verbose - - -gdk_rgb_set_install -void -gboolean install - - -gdk_rgb_set_min_colors -void -gint min_colors - - -gdk_rgb_get_cmap -GdkColormap * -void - - -gdk_rgb_get_visual -GdkVisual * -void - diff --git a/docs/reference/gdk/gdk-docs.sgml b/docs/reference/gdk/gdk-docs.sgml deleted file mode 100644 index a656a33d8b..0000000000 --- a/docs/reference/gdk/gdk-docs.sgml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - GDK Reference Manual - - - - GDK - &gdk-General; - - &gdk-Points-Rectangles-and-Regions; - &gdk-Graphics-Contexts; - &gdk-Drawing-Primitives; - - &gdk-Bitmaps-and-Pixmaps; - &gdk-GdkRGB; - &gdk-Images; - - &gdk-Colormaps-and-Colors; - &gdk-Color-Contexts; - &gdk-Visuals; - - &gdk-Fonts; - &gdk-Cursors; - - &gdk-Windows; - - &gdk-Events; - &gdk-Event-Structures; - - &gdk-Selections; - &gdk-Drag-and-Drop; - - &gdk-Properties-and-Atoms; - - &gdk-Threads; - - &gdk-Input; - - &gdk-Input-Devices; - - &gdk-Key-Values; - - &gdk-Input-Methods; - &gdk-Input-Contexts; - - diff --git a/docs/reference/gdk/gdk-overrides.txt b/docs/reference/gdk/gdk-overrides.txt deleted file mode 100644 index 939122e78b..0000000000 --- a/docs/reference/gdk/gdk-overrides.txt +++ /dev/null @@ -1,23 +0,0 @@ - -# GdkPixmap, GdkBitmap and GdkDrawable are the same as GdkWindow. - -GdkPixmap -struct GdkPixmap -{ - gpointer user_data; -}; - - -GdkBitmap -struct GdkBitmap -{ - gpointer user_data; -}; - - -GdkDrawable -struct GdkDrawable -{ - gpointer user_data; -}; - diff --git a/docs/reference/gdk/gdk-sections.txt b/docs/reference/gdk/gdk-sections.txt deleted file mode 100644 index 18ea372c96..0000000000 --- a/docs/reference/gdk/gdk-sections.txt +++ /dev/null @@ -1,622 +0,0 @@ - -gdk/gdk.h - -
-General -general -gdk_init -gdk_init_check -gdk_exit -gdk_set_locale -gdk_set_sm_client_id - - -gdk_get_display - - -gdk_flush - - -gdk_screen_width -gdk_screen_height -gdk_screen_width_mm -gdk_screen_height_mm - - -gdk_pointer_grab -gdk_pointer_ungrab -gdk_pointer_is_grabbed - - -gdk_keyboard_grab -gdk_keyboard_ungrab - - -gdk_key_repeat_disable -gdk_key_repeat_restore - - -gdk_beep - - -gdk_get_use_xshm -gdk_set_use_xshm - - -gdk_error_trap_push -gdk_error_trap_pop - - -GdkStatus -gdk_time_get -gdk_timer_get -gdk_timer_set -gdk_timer_enable -gdk_timer_disable -
- -
-Bitmaps and Pixmaps -pixmaps -GdkPixmap -gdk_pixmap_new -gdk_bitmap_create_from_data -gdk_pixmap_create_from_data -gdk_pixmap_create_from_xpm -gdk_pixmap_colormap_create_from_xpm -gdk_pixmap_create_from_xpm_d -gdk_pixmap_colormap_create_from_xpm_d -gdk_pixmap_ref -gdk_pixmap_unref -GdkBitmap -gdk_bitmap_ref -gdk_bitmap_unref -
- -
-Images -images -GdkImage -gdk_image_new -GdkImageType -gdk_image_new_bitmap -gdk_image_get -gdk_image_destroy - -gdk_image_put_pixel -gdk_image_get_pixel -
- -
-GdkRGB -rgb -gdk_rgb_init - - -gdk_draw_rgb_image -gdk_draw_rgb_image_dithalign -gdk_draw_indexed_image -gdk_draw_gray_image -gdk_draw_rgb_32_image -GdkRgbDither - - -gdk_rgb_cmap_new -gdk_rgb_cmap_free -GdkRgbCmap - - -gdk_rgb_gc_set_foreground -gdk_rgb_gc_set_background -gdk_rgb_xpixel_from_rgb - - -gdk_rgb_set_install -gdk_rgb_set_min_colors -gdk_rgb_get_visual -gdk_rgb_get_cmap -gdk_rgb_ditherable -gdk_rgb_set_verbose -
- -
-Colormaps and Colors -colors -GdkColor -GdkColormap -gdk_colormap_new -gdk_colormap_ref -gdk_colormap_unref -gdk_colormap_get_system -gdk_colormap_get_system_size -gdk_colormap_change -gdk_colormap_alloc_colors -gdk_colormap_alloc_color -gdk_colormap_free_colors -gdk_colormap_get_visual -gdk_colors_store -gdk_color_copy -gdk_color_free -gdk_colors_alloc -gdk_colors_free -gdk_color_white -gdk_color_black -gdk_color_parse -gdk_color_alloc -gdk_color_change -gdk_color_equal -gdk_color_hash -
- -
-Fonts -fonts -GdkFont -GdkFontType -gdk_font_load -gdk_fontset_load -gdk_font_ref -gdk_font_unref -gdk_font_id -gdk_font_equal - - -gdk_string_extents -gdk_text_extents -gdk_text_extents_wc -gdk_string_width -gdk_text_width -gdk_text_width_wc -gdk_char_width -gdk_char_width_wc -gdk_string_measure -gdk_text_measure -gdk_char_measure -gdk_string_height -gdk_text_height -gdk_char_height - - -GdkWChar -gdk_wcstombs -gdk_mbstowcs -
- -
-Drawing Primitives -drawing -gdk_draw_point -gdk_draw_points -gdk_draw_line -gdk_draw_lines -gdk_draw_segments -GdkSegment -gdk_draw_rectangle -gdk_draw_arc -gdk_draw_polygon - - -gdk_draw_string -gdk_draw_text -gdk_draw_text_wc - - -gdk_draw_pixmap -gdk_draw_image - - -gdk_draw_bitmap -
- -
-Graphics Contexts -gcs -GdkGC -GdkGCValues -GdkGCValuesMask - -GdkFunction - -gdk_gc_new -gdk_gc_new_with_values -gdk_gc_ref -gdk_gc_unref -gdk_gc_destroy -gdk_gc_get_values -gdk_gc_set_foreground -gdk_gc_set_background -gdk_gc_set_font -gdk_gc_set_function -gdk_gc_set_fill -GdkFill -gdk_gc_set_tile -gdk_gc_set_stipple -gdk_gc_set_ts_origin -gdk_gc_set_clip_origin -gdk_gc_set_clip_mask -gdk_gc_set_clip_rectangle -gdk_gc_set_clip_region -gdk_gc_set_subwindow -GdkSubwindowMode -gdk_gc_set_exposures -gdk_gc_set_line_attributes -GdkLineStyle -GdkCapStyle -GdkJoinStyle -gdk_gc_set_dashes -gdk_gc_copy -
- -
-Visuals -visuals -GdkVisual -GdkVisualType -GdkByteOrder -gdk_query_depths -gdk_query_visual_types -gdk_list_visuals - -gdk_visual_get_best_depth -gdk_visual_get_best_type -gdk_visual_get_system -gdk_visual_get_best -gdk_visual_get_best_with_depth -gdk_visual_get_best_with_type -gdk_visual_get_best_with_both -gdk_visual_ref -gdk_visual_unref -
- -
-Windows -windows -GdkWindowAttr -GdkWindow -GdkWindowType -GdkWindowClass -GdkWindowAttributesType -GdkWindowHints -GdkGeometry - -gdk_window_new -gdk_window_destroy -gdk_window_ref -gdk_window_unref -gdk_window_at_pointer -gdk_window_show -gdk_window_hide -gdk_window_is_visible -gdk_window_is_viewable -gdk_window_withdraw -gdk_window_move -gdk_window_resize -gdk_window_move_resize -gdk_window_reparent -gdk_window_clear -gdk_window_clear_area -gdk_window_clear_area_e -gdk_window_copy_area -gdk_window_raise -gdk_window_lower -gdk_window_register_dnd -gdk_window_set_user_data -gdk_window_set_override_redirect -gdk_window_add_filter -gdk_window_remove_filter -GdkFilterFunc -GdkFilterReturn -GdkXEvent -gdk_window_shape_combine_mask -gdk_window_set_child_shapes -gdk_window_merge_child_shapes -gdk_window_set_static_gravities -gdk_window_set_hints -gdk_window_set_title -gdk_window_set_background -gdk_window_set_back_pixmap -GDK_PARENT_RELATIVE -gdk_window_set_cursor -gdk_window_set_colormap -gdk_window_get_user_data -gdk_window_get_geometry -gdk_window_set_geometry_hints -gdk_window_get_position -gdk_window_get_root_origin -gdk_window_get_size -gdk_window_get_visual -gdk_window_get_colormap -gdk_window_get_type -gdk_window_get_origin -gdk_window_get_deskrelative_origin -gdk_window_get_pointer -GdkModifierType -gdk_window_get_parent -gdk_window_get_toplevel -gdk_window_get_children -gdk_window_get_events -gdk_window_set_events -gdk_window_set_icon -gdk_window_set_icon_name -gdk_window_set_transient_for -gdk_window_set_role -gdk_window_set_group -gdk_window_set_decorations -GdkWMDecoration -gdk_window_set_functions -GdkWMFunction -gdk_window_get_toplevels -GdkDrawable -gdk_drawable_set_data -
- -
-Selections -selections -GdkSelection -GdkSelectionType -GdkTarget -gdk_selection_owner_set -gdk_selection_owner_get -gdk_selection_convert -gdk_selection_property_get -gdk_selection_send_notify -
- -
-Properties and Atoms -properties -GdkAtom -GDK_NONE -gdk_text_property_to_text_list -gdk_free_text_list -gdk_string_to_compound_text -gdk_free_compound_text -gdk_atom_intern -gdk_atom_name -gdk_property_get -gdk_property_change -GdkPropMode -gdk_property_delete -
- -
-Input Methods -input_methods -GdkIMStyle -gdk_im_ready -gdk_im_decide_style -gdk_im_set_best_style - - -gdk_im_begin -gdk_im_end -
- -
-Input Contexts -input_contexts -GdkIC -gdk_ic_new -gdk_ic_destroy -gdk_ic_get_events -gdk_ic_get_style -gdk_ic_get_attr -gdk_ic_set_attr - - -GdkICAttr -GdkICAttributesType -gdk_ic_attr_new -gdk_ic_attr_destroy -
- -
-Color Contexts -color_contexts -GdkColorContext -GdkColorContextDither -GdkColorContextMode - -gdk_color_context_new -gdk_color_context_new_mono -gdk_color_context_free -gdk_color_context_get_pixel -gdk_color_context_get_pixels -gdk_color_context_get_pixels_incremental -gdk_color_context_query_color -gdk_color_context_query_colors -gdk_color_context_add_palette -gdk_color_context_init_dither -gdk_color_context_free_dither -gdk_color_context_get_pixel_from_palette -gdk_color_context_get_index_from_palette -
- -
-Points, Rectangles and Regions -regions -GdkPoint - - -GdkRectangle -gdk_rectangle_intersect -gdk_rectangle_union - - -GdkRegion -gdk_region_new -gdk_region_polygon -GdkFillRule -gdk_region_destroy - - -gdk_regions_intersect -gdk_regions_union -gdk_regions_subtract -gdk_regions_xor -gdk_region_union_with_rect -gdk_region_offset -gdk_region_shrink - - -gdk_region_empty -gdk_region_equal -gdk_region_point_in -gdk_region_rect_in -GdkOverlapType -gdk_region_get_clipbox -
- -
-Threads -threads -gdk_threads_mutex -GDK_THREADS_ENTER -GDK_THREADS_LEAVE -gdk_threads_enter -gdk_threads_leave -
- -
-Key Values -keys -gdk_keyval_name -gdk_keyval_from_name - - -gdk_keyval_is_upper -gdk_keyval_is_lower - - -gdk_keyval_to_upper -gdk_keyval_to_lower -
- -
-Input Devices -input_devices -GDK_CORE_POINTER -gdk_input_list_devices -GdkDeviceInfo -GdkDeviceKey -gdk_input_set_extension_events -GdkExtensionMode -gdk_input_set_source -GdkInputSource -gdk_input_set_mode -GdkInputMode -gdk_input_set_axes -GdkAxisUse -gdk_input_set_key -gdk_input_window_get_pointer -gdk_input_motion_events -GdkTimeCoord - - -gdk_input_init -gdk_input_exit -
- -
-Events -events -GdkEventType -GdkEventMask -GDK_CURRENT_TIME -GDK_PRIORITY_EVENTS - - -gdk_events_pending -gdk_event_peek -gdk_event_get -gdk_event_get_graphics_expose -gdk_event_put -gdk_event_copy -gdk_event_free -gdk_event_get_time - - -gdk_event_handler_set -GdkEventFunc - - -gdk_event_send_client_message -gdk_event_send_clientmessage_toall -gdk_add_client_message_filter - - -gdk_get_show_events -gdk_set_show_events -
- -
-Event Structures -event_structs -GdkEvent - - -GdkEventAny -GdkEventKey -GdkEventButton -GdkEventMotion -GdkEventExpose -GdkEventVisibility -GdkEventCrossing -GdkEventFocus -GdkEventConfigure -GdkEventProperty -GdkEventSelection -GdkEventDND -GdkEventProximity -GdkEventClient -GdkEventNoExpose - - -GdkVisibilityState -GdkCrossingMode -GdkNotifyType -GdkPropertyState -
- -
-Cursors -cursors -GdkCursor -GdkCursorType -gdk_cursor_new -gdk_cursor_new_from_pixmap -gdk_cursor_destroy -
- -
-Input -input -gdk_input_add_full -GdkInputCondition -GdkInputFunction -GdkDestroyNotify -gdk_input_add -gdk_input_remove -
- -
-Drag and Drop -dnd -gdk_drag_get_selection -gdk_drag_abort -gdk_drop_reply -gdk_drag_context_new -gdk_drag_drop -gdk_drag_find_window -gdk_drag_context_ref -gdk_drag_begin -gdk_drag_motion -gdk_drop_finish -gdk_drag_get_protocol -GdkDragProtocol -gdk_drag_context_unref -GdkDragContext -GdkDragAction -gdk_drag_status -
diff --git a/docs/reference/gdk/tmpl/color_contexts.sgml b/docs/reference/gdk/tmpl/color_contexts.sgml deleted file mode 100644 index af6455024c..0000000000 --- a/docs/reference/gdk/tmpl/color_contexts.sgml +++ /dev/null @@ -1,207 +0,0 @@ - -Color Contexts - - -routines for allocating colors (deprecated). - - - -The #GdkColorContext type is used for allocating groups of colors. - - -It is now deprecated in favor of the gdk_colormap_*() functions described in -the Colormaps and Colors -section. - - - - - - - - - - - - -@visual: -@colormap: -@num_colors: -@max_colors: -@num_allocated: -@mode: -@need_to_free_colormap: -@std_cmap_atom: -@clut: -@cmap: -@color_hash: -@palette: -@num_palette: -@fast_dither: - - - - - - -@fast_rgb: -@fast_err: -@fast_erg: -@fast_erb: - - - - - - -@GDK_CC_MODE_UNDEFINED: -@GDK_CC_MODE_BW: -@GDK_CC_MODE_STD_CMAP: -@GDK_CC_MODE_TRUE: -@GDK_CC_MODE_MY_GRAY: -@GDK_CC_MODE_PALETTE: - - - - - - -@visual: -@colormap: -@Returns: - - - - - - - -@visual: -@colormap: -@Returns: - - - - - - - -@cc: - - - - - - - -@cc: -@red: -@green: -@blue: -@failed: -@Returns: - - - - - - - -@cc: -@reds: -@greens: -@blues: -@ncolors: -@colors: -@nallocated: - - - - - - - -@cc: -@reds: -@greens: -@blues: -@ncolors: -@used: -@colors: -@nallocated: - - - - - - - -@cc: -@color: -@Returns: - - - - - - - -@cc: -@colors: -@num_colors: -@Returns: - - - - - - - -@cc: -@palette: -@num_palette: -@Returns: - - - - - - - -@cc: - - - - - - - -@cc: - - - - - - - -@cc: -@red: -@green: -@blue: -@failed: -@Returns: - - - - - - - -@cc: -@red: -@green: -@blue: -@failed: -@Returns: - - diff --git a/docs/reference/gdk/tmpl/colors.sgml b/docs/reference/gdk/tmpl/colors.sgml deleted file mode 100644 index f9050d6988..0000000000 --- a/docs/reference/gdk/tmpl/colors.sgml +++ /dev/null @@ -1,390 +0,0 @@ - -Colormaps and Colors - - -manipulation of colors and colormaps. - - - -These functions are used to modify colormaps. -A colormap is an object that contains the mapping -between the color values stored in memory and -the RGB values that are used to display color -values. In general, colormaps only contain -significant information for pseudo-color visuals, -but even for other visual types, a colormap object -is required in some circumstances. - - - -There are a couple of special colormaps that can -be retrieved. The system colormap (retrieved -with gdk_colormap_get_system()) is the default -colormap of the system. If you are using GdkRGB, -there is another colormap that is important - the -colormap in which GdkRGB works, retrieved with -gdk_rgb_get_cmap(). However, when using GdkRGB, -it is not generally necessary to allocate colors -directly. - - - -In previous revisions of this interface, a number -of functions that take a #GdkColormap parameter -were replaced with functions whose names began -with "gdk_colormap_". This process will probably -be extended somewhat in the future - -gdk_color_white(), gdk_color_black(), and -gdk_color_change() will probably become aliases. - - - - - - - - - -The #GdkColor structure is used to describe an -allocated or unallocated color. - - - - - - -pixel -For allocated colors, the value used to -draw this color on the screen. - - - -red -The red component of the color. This is -a value between 0 and 65535, with 65535 indicating -full intensitiy. - - - -green -the blue component of the color. - - - -blue -the green component of the color.. - - - - - -@pixel: -@red: -@green: -@blue: - - - -The colormap structure contains the following public -fields. - - - - - - -size -For pseudo-color colormaps, the number of colors -in the colormap.. - - - -colors -An array containing the current values in the -colormap. This can be used to map from pixel values -back to RGB values. This is only meaningful for -pseudo-color colormaps. - - - - - -@size: -@colors: - - - -Create a new colormap for the given visual. - - -@visual: a #GdkVisual. -@allocate: if %TRUE, the newly created colormap will be - a private colormap, and all colors in it will be - allocated for the applications use. -@Returns: the new #GdkColormap. - - - - -Increase the reference count of a colormap. - - -@cmap: a #GdkColormap. -@Returns: @cmap - - - - -Decrease the reference count of a colormap. If the -resulting reference count is zero, destroys the colormap. - - -@cmap: a #GdkColormap. - - - - -Returns the system's default colormap. - - -@Returns: the default colormap. - - - - -Returns the size of the system's default colormap. -(See the description of struct #GdkColormap for an -explanation of the size of a colormap.) - - -@Returns: the size of the system's default colormap. - - - - -Change the value of the first @ncolors in a private colormap -to match the values in the colors -array in the color map. This function is obsolete and -should not be used. See gdk_color_change(). - - -@colormap: a #GdkColormap. -@ncolors: the number of colors to change. - - - - -Allocates colors from a colormap. - - -@colormap: a #GdkColormap. -@colors: The color values to allocate. On return, the pixel - values for allocated colors will be filled in. -@ncolors: The number of colors in @colors. -@writeable: If %TRUE, the colors are allocated writeable - (their values can later be changed using gdk_color_change()). - Writeable colors cannot be shared between applications. -@best_match: If %TRUE, GDK will attempt to do matching against - existing colors if the colors cannot be allocated as - requested. -@success: An array of length @ncolors. On return, this - indicates whether the corresponding color in @colors was - sucessfully allocated or not. -@Returns: The number of colors that were not sucessfully - allocated. - - - - -Allocate a single color from a colormap. - - -@colormap: a #GdkColormap. -@color: the color to allocate. On return the -pixel field will be -filled in if allocation succeeds. -@writeable: If %TRUE, the color is allocated writeable - (their values can later be changed using gdk_color_change()). - Writeable colors cannot be shared between applications. -@best_match: If %TRUE, GDK will attempt to do matching against - existing colors if the color cannot be allocated as - requested. -@Returns: %TRUE if the allocation succeeded. - - - - -Free previously allocated colors. - - -@colormap: a #GdkColormap. -@colors: the colors to free. -@ncolors: the number of colors in @colors. - - - - -Return the visual for which a given colormap was created. - - -@colormap: a #GdkColormap. -@Returns: the visual of the colormap. - - - - -Change the value of the first @ncolors colors in -a private colormap. This function is obsolete and -should not be used. See gdk_color_change(). - - -@colormap: a #GdkColormap. -@colors: the new color values. -@ncolors: the number of colors to change. - - - - -Make a copy of a color structure. The result -must be freed using gdk_color_free(). - - -@color: a #GdkColor. -@Returns: a copy of @color. - - - - -Free a color structure created with -gdk_color_copy(). - - -@color: a #GdkColor. - - - - -Allocate colors from a colormap. This function -is obsolete. See gdk_colormap_alloc_colors(). -For full documentation of the fields, see -the Xlib documentation for XAllocColorCells. - - -@colormap: a #GdkColormap. -@contiguous: if %TRUE, the colors should be allocated - in contiguous color cells. -@planes: an array in which to store the plane masks. -@nplanes: the number of planes to allocate. (Or zero, - to indicate that the color allocation should not be - planar.) -@pixels: an array into which to store allocated pixel - values. -@npixels: the number of pixels in each plane to allocate. -@Returns: - - - - -Free colors allocated with gdk_colors_alloc(). This -function is obsolete. See gdk_colormap_free_colors(). - - -@colormap: a #GdkColormap. -@pixels: the pixel values of the colors to free. -@npixels: the number of values in @pixels. -@planes: the plane masks for all planes to free, OR'd - together. - - - - -Return the white color for a given colormap. The resulting -value has already allocated been allocated. - - -@colormap: a #GdkColormap. -@color: the location to store the color. -@Returns: %TRUE if the allocation succeeded. - - - - -Return the black color for a given colormap. The resulting -value has already benn allocated. - - -@colormap: a #GdkColormap. -@color: the location to store the color. -@Returns: %TRUE if the allocation succeeded. - - - - -Parse a textual specification of a color and fill in -the red, -green, and -blue fields of a -#GdkColor structure. The color is not -allocated, you must call gdk_colormap_alloc_color() yourself. -The text string can be in any of the forms accepted -by XParseColor; these include -name for a color from rgb.txt, such as -DarkSlateGray, or a hex specification -such as 305050. - - -@spec: the string specifying the color. -@color: the #GdkColor to fill in -@Returns: - - - - -Allocate a single color from a colormap. -This function is obsolete. See gdk_colormap_alloc_color(). - - -@colormap: a #GdkColormap. -@color: The color to allocate. On return, the -pixel field will be -filled in. -@Returns: %TRUE if the allocation succeeded. - - - - -Change the value of a color that has already -been allocated. If @colormap is not a private -colormap, then the color must have been allocated -using gdk_colormap_alloc_colors() with the -@writeable set to %TRUE. - - -@colormap: a #GdkColormap. -@color: a #GdkColor, with the color to change -in the pixel field, -and the new value in the remaining fields. -@Returns: - - - - -Compare two colors. - - -@colora: a #GdkColor. -@colorb: another #GdkColor. -@Returns: %TRUE if the two colors compare equal - - - - -A hash function suitable for using for a hash -table that stores #GdkColor's. - - -@colora: a #GdkColor. -@colorb: NOT USED. -@Returns: The hash function appled to @colora - - diff --git a/docs/reference/gdk/tmpl/cursors.sgml b/docs/reference/gdk/tmpl/cursors.sgml deleted file mode 100644 index 5b33090b9a..0000000000 --- a/docs/reference/gdk/tmpl/cursors.sgml +++ /dev/null @@ -1,99 +0,0 @@ - -Cursors - - -standard and pixmap cursors. - - - - - - - - - - - - - - - - -@type: - - - -The standard cursors available. - - - - - -Creates a new standard cursor. - - -@cursor_type: the type of the cursor. -@Returns: a new #GdkCursor. - - - - -Creates a new cursor from a given pixmap and mask. Both the pixmap and mask -must have a depth of 1 (i.e. each pixel has only 2 values - on or off). -The standard cursor size is 16 by 16 pixels. - -Creating a custom cursor. - -/* This data is in X bitmap format, and can be created with the 'bitmap' - utility. */ -#define cursor1_width 16 -#define cursor1_height 16 -static unsigned char cursor1_bits[] = { - 0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x08, 0x08, 0x10, 0x04, 0x20, - 0x82, 0x41, 0x41, 0x82, 0x41, 0x82, 0x82, 0x41, 0x04, 0x20, 0x08, 0x10, - 0x10, 0x08, 0x20, 0x04, 0x40, 0x02, 0x80, 0x01}; - -static unsigned char cursor1mask_bits[] = { - 0x80, 0x01, 0xc0, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x18, 0x18, 0x8c, 0x31, - 0xc6, 0x63, 0x63, 0xc6, 0x63, 0xc6, 0xc6, 0x63, 0x8c, 0x31, 0x18, 0x18, - 0x30, 0x0c, 0x60, 0x06, 0xc0, 0x03, 0x80, 0x01}; - - - GdkCursor *cursor; - GdkPixmap *source, *mask; - GdkColor fg = { 0, 65535, 0, 0 }; /* Red. */ - GdkColor bg = { 0, 0, 0, 65535 }; /* Blue. */ - - - source = gdk_bitmap_create_from_data (NULL, cursor1_bits, - cursor1_width, cursor1_height); - mask = gdk_bitmap_create_from_data (NULL, cursor1mask_bits, - cursor1_width, cursor1_height); - cursor = gdk_cursor_new_from_pixmap (source, mask, &fg, &bg, 8, 8); - gdk_pixmap_unref (source); - gdk_pixmap_unref (mask); - - - gdk_window_set_cursor (widget->window, cursor); - - - -@source: the pixmap specifying the cursor. -@mask: the pixmap specifying the mask, which must be the same size as @source. -@fg: the foreground color, used for the bits in the source which are 1. -The color does not have to be allocated first. -@bg: the background color, used for the bits in the source which are 0. -The color does not have to be allocated first. -@x: the horizontal offset of the 'hotspot' of the cursor. -@y: the vertical offset of the 'hotspot' of the cursor. -@Returns: a new #GdkCursor. - - - - -Destroys a cursor, freeing any resources allocated for it. - - -@cursor: a #GdkCursor. - - diff --git a/docs/reference/gdk/tmpl/dnd.sgml b/docs/reference/gdk/tmpl/dnd.sgml deleted file mode 100644 index c61ad4c6f3..0000000000 --- a/docs/reference/gdk/tmpl/dnd.sgml +++ /dev/null @@ -1,194 +0,0 @@ - -Drag and Drop - - -functions for controlling drag and drop handling. - - - -These functions provide a low level interface for drag and drop. -GDK supports both the Xdnd and Motif drag and drop protocols transparently. - - -GTK+ provides a higher level abstraction based on top of these functions, -and so they are not normally needed in GTK+ applications. -See the Drag and Drop section of -the GTK+ documentation for more information. - - - - - - - - - - - - -@context: -@Returns: - - - - - - - -@context: -@time: - - - - - - - -@context: -@ok: -@time: - - - - - - - -@Returns: - - - - - - - -@context: -@time: - - - - - - - -@context: -@drag_window: -@x_root: -@y_root: -@dest_window: -@protocol: - - - - - - - -@context: - - - - - - - -@window: -@targets: -@Returns: - -@actions: - - - - - - - -@context: -@dest_window: -@protocol: -@x_root: -@y_root: -@suggested_action: -@possible_actions: -@time: -@Returns: - -@action: - - - - - - - -@context: -@success: -@time: - - - - - - - -@xid: -@protocol: -@Returns: - - - - - - - -@GDK_DRAG_PROTO_MOTIF: -@GDK_DRAG_PROTO_XDND: -@GDK_DRAG_PROTO_ROOTWIN: -@GDK_DRAG_PROTO_NONE: - - - - - - -@context: - - - - - - - -@protocol: -@is_source: -@source_window: -@dest_window: -@targets: -@actions: -@suggested_action: -@action: -@start_time: - - - - - - -@GDK_ACTION_DEFAULT: -@GDK_ACTION_COPY: -@GDK_ACTION_MOVE: -@GDK_ACTION_LINK: -@GDK_ACTION_PRIVATE: -@GDK_ACTION_ASK: - - - - - - -@context: -@action: -@time: - - diff --git a/docs/reference/gdk/tmpl/drawing.sgml b/docs/reference/gdk/tmpl/drawing.sgml deleted file mode 100644 index f9589d8fdb..0000000000 --- a/docs/reference/gdk/tmpl/drawing.sgml +++ /dev/null @@ -1,239 +0,0 @@ - -Drawing Primitives - - -functions for drawing points, lines, arcs, and text. - - - -These functions provide support for drawing points, lines, arcs and text -onto what are called 'drawables'. Drawables, as the name suggests, are things -which support drawing onto them, and are either #GdkWindow or #GdkPixmap -objects. - - -Many of the drawing operations take a #GdkGC argument, which represents a -graphics context. This #GdkGC contains a number of drawing attributes such -as foreground color, background color and line width, and is used to reduce -the number of arguments needed for each drawing operation. See the -Graphics Contexts section for -more information. - - - - - - - - - -Draws a point, using the foreground color and other attributes of the #GdkGC. - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@gc: a #GdkGC. -@x: the x coordinate of the point. -@y: the y coordinate of the point. - - - - -Draws a number of points, using the foreground color and other attributes of -the #GdkGC. - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@gc: a #GdkGC. -@points: an array of #GdkPoint structures. -@npoints: the number of points to be drawn. - - - - -Draws a line, using the foreground color and other attributes of the #GdkGC. - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@gc: a #GdkGC. -@x1: the x coordinate of the start point. -@y1: the y coordinate of the start point. -@x2: the x coordinate of the end point. -@y2: the y coordinate of the end point. - - - - -Draws a series of lines connecting the given points. -The way in which joins between lines are draw is determined by the -#GdkCapStyle value in the #GdkGC. This can be set with -gdk_gc_set_line_attributes(). - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@gc: a #GdkGC. -@points: an array of #GdkPoint structures specifying the endpoints of the -lines. -@npoints: the size of the @points array. - - - - -Draws a number of unconnected lines. - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@gc: a #GdkGC. -@segs: an array of #GdkSegment structures specifying the start and end points -of the lines to be drawn, -@nsegs: the number of line segments to draw, i.e. the size of the @segs array. - - - - -Specifies the start and end point of a line for use by the gdk_draw_segments() -function. - - -@x1: the x coordinate of the start point. -@y1: the y coordinate of the start point. -@x2: the x coordinate of the end point. -@y2: the y coordinate of the end point. - - - -Draws a rectangular outline or filled rectangle, using the foreground color -and other attributes of the #GdkGC. - - - -A rectangle drawn filled is 1 pixel smaller in both dimensions than a rectangle -outlined. Calling gdk_draw_rectangle (window, gc, TRUE, 0, 0, 20, 20) results -in a filled rectangle 20 pixels wide and 20 pixels high. Calling -gdk_draw_rectangle (window, gc, FALSE, 0, 0, 20, 20) results in an outlined -rectangle with corners at (0, 0), (0, 20), (20, 20), and (20, 0), which -makes it 21 pixels wide and 21 pixels high. - - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@gc: a #GdkGC. -@filled: TRUE if the rectangle should be filled. -@x: the x coordinate of the left edge of the rectangle. -@y: the y coordinate of the top edge of the rectangle. -@width: the width of the rectangle. -@height: the height of the rectangle. - - - - -Draws an arc or a filled 'pie slice'. The arc is defined by the bounding -rectangle of the entire ellipse, and the start and end angles of the part of -the ellipse to be drawn. - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@gc: a #GdkGC. -@filled: TRUE if the arc should be filled, producing a 'pie slice'. -@x: the x coordinate of the left edge of the bounding rectangle. -@y: the y coordinate of the top edge of the bounding rectangle. -@width: the width of the bounding rectangle. -@height: the height of the bounding rectangle. -@angle1: the start angle of the arc, relative to the 3 o'clock position, -counter-clockwise, in 1/64ths of a degree. -@angle2: the end angle of the arc, relative to @angle1, in 1/64ths of a degree. - - - - -Draws an outlined or filled polygon. - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@gc: a #GdkGC. -@filled: TRUE if the polygon should be filled. The polygon is closed -automatically, connecting the last point to the first point if necessary. -@points: an array of #GdkPoint structures specifying the points making up the -polygon. -@npoints: the number of points. - - - - -Draws a string of characters in the given font or fontset. - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@font: a #GdkFont. -@gc: a #GdkGC. -@x: the x coordinate of the left edge of the text. -@y: the y coordinate of the baseline of the text. -@string: the string of characters to draw. - - - - -Draws a number of characters in the given font or fontset. - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@font: a #GdkFont. -@gc: a #GdkGC. -@x: the x coordinate of the left edge of the text. -@y: the y coordinate of the baseline of the text. -@text: the characters to draw. -@text_length: the number of characters of @text to draw. - - - - -Draws a number of wide characters using the given font of fontset. -If the font is a 1-byte font, the string is converted into 1-byte characters -(discarding the high bytes) before output. - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@font: a #GdkFont. -@gc: a #GdkGC. -@x: the x coordinate of the left edge of the text. -@y: the y coordinate of the baseline of the text. -@text: the wide characters to draw. -@text_length: the number of characters to draw. - - - - -Draws a pixmap, or a part of a pixmap, onto another drawable. - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@gc: a #GdkGC. -@src: the source #GdkPixmap to draw. -@xsrc: the left edge of the source rectangle within @src. -@ysrc: the top of the source rectangle within @src. -@xdest: the x coordinate of the destination within @drawable. -@ydest: the y coordinate of the destination within @drawable. -@width: the width of the area to be copied, or -1 to make the area extend to -the right edge of the source pixmap. -@height: the height of the area to be copied, or -1 to make the area extend -to the bottom edge of the source pixmap. - - - - -Draws a #GdkImage onto a drawable. -The depth of the #GdkImage must match the depth of the #GdkDrawable. - - -@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). -@gc: a #GdkGC. -@image: the #GdkImage to draw. -@xsrc: the left edge of the source rectangle within @image. -@ysrc: the top of the source rectangle within @image. -@xdest: the x coordinate of the destination within @drawable. -@ydest: the y coordinate of the destination within @drawable. -@width: the width of the area to be copied, or -1 to make the area extend to -the right edge of @image. -@height: the height of the area to be copied, or -1 to make the area extend -to the bottom edge of @image. - - diff --git a/docs/reference/gdk/tmpl/event_structs.sgml b/docs/reference/gdk/tmpl/event_structs.sgml deleted file mode 100644 index b5a9d13445..0000000000 --- a/docs/reference/gdk/tmpl/event_structs.sgml +++ /dev/null @@ -1,368 +0,0 @@ - -Event Structures - - -data structures specific to each type of event. - - - -The event structs contain data specific to each type of event in GDK. - - - -A common mistake is to forget to set the event mask of a widget so that the -required events are received. See gtk_widget_set_events(). - - - - - - - - - - -The #GdkEvent struct contains a union of all of the event structs, -and allows access to the data fields in a number of ways. - - -The event type is always the first field in all of the event structs, and -can always be accessed with the following code, no matter what type of event -it is: - - - GdkEvent *event; - GdkEventType type; - - type = event->type; - - - - - -To access other fields of the event structs, the pointer to the event can be -cast to the appropriate event struct pointer, or the union member name can be -used. For example if the event type is %GDK_BUTTON_PRESS then the x coordinate -of the button press can be accessed with: - - - GdkEvent *event; - gdouble x; - - x = ((GdkEventButton*)event)->x; - - -or: - - - GdkEvent *event; - gdouble x; - - x = event->button.x; - - - - - - - -Contains the fields which are common to all event structs. -Any event pointer can safely be cast to a pointer to a #GdkEventAny to access -these fields. - - -@type: the type of the event. -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). - - - -Describes a key press or key release event. - - -@type: the type of the event (%GDK_KEY_RELEASE or %GDK_KEY_RELEASE). -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@time: the time of the event in milliseconds. -@state: a bit-mask representing the state of the modifier keys (e.g. Control, -Shift and Alt) and the pointer buttons. See #GdkModifierType. -@keyval: the key that was pressed or released. See the <gdk/gdkkeysym.h> -header file for a complete list of GDK key codes. -@length: the length of @string. -@string: a null-terminated multi-byte string containing the composed characters -resulting from the key press. When text is being input, in a GtkEntry for -example, it is these characters which should be added to the input buffer. -When using Input Methods to support -internationalized text input, the composed characters appear here after the -pre-editing has been completed. - - - -Used for button press and button release events. The -type field will be one of %GDK_BUTTON_PRESS, -%GDK_2BUTTON_PRESS, %GDK_3BUTTON_PRESS, and %GDK_BUTTON_RELEASE. - - -Double and triple-clicks result in a sequence of events being received. -For double-clicks the order of events will be: - -%GDK_BUTTON_PRESS -%GDK_BUTTON_RELEASE -%GDK_BUTTON_PRESS -%GDK_2BUTTON_PRESS -%GDK_BUTTON_RELEASE - -Note that the first click is received just like a normal -button press, while the second click results in a %GDK_2BUTTON_PRESS being -received just after the %GDK_BUTTON_PRESS. - - -Triple-clicks are very similar to double-clicks, except that %GDK_3BUTTON_PRESS -is inserted after the third click. The order of the events is: - -%GDK_BUTTON_PRESS -%GDK_BUTTON_RELEASE -%GDK_BUTTON_PRESS -%GDK_2BUTTON_PRESS -%GDK_BUTTON_RELEASE -%GDK_BUTTON_PRESS -%GDK_3BUTTON_PRESS -%GDK_BUTTON_RELEASE - - - -For a double click to occur, the second button press must occur within 1/4 of -a second of the first. For a triple click to occur, the third button press -must also occur within 1/2 second of the first button press. - - -@type: the type of the event (%GDK_BUTTON_PRESS, %GDK_2BUTTON_PRESS, -%GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE). -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@time: the time of the event in milliseconds. -@x: the x coordinate of the mouse relative to the window. -@y: the y coordinate of the mouse relative to the window. -@pressure: the pressure of the button press, intended for input devices such -as graphics tablets. It defaults to 0.5. -@xtilt: the horizontal tilt of the input device. Defaults to 0. -@ytilt: the vertical tilt of the input device. Defaults to 0. -@state: a bit-mask representing the state of the modifier keys (e.g. Control, -Shift and Alt) and the pointer buttons. See #GdkModifierType. -@button: the button which was pressed or released, numbered from 1 to 5. -Normally button 1 is the left mouse button, 2 is the middle button, -and 3 is the right button. On 2-button mice, the middle button can often -be simulated by pressing both mouse buttons together. -@source: the input device where the event came from, usually %GDK_SOURCE_MOUSE. -@deviceid: the input device ID, usually %GDK_CORE_POINTER but may be -different if touch screens or graphics tablets are being used. -@x_root: the x coordinate of the mouse relative to the root of the screen. -@y_root: the y coordinate of the mouse relative to the root of the screen. - - - - - - -@type: the type of the event. -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@time: -@x: -@y: -@pressure: -@xtilt: -@ytilt: -@state: -@is_hint: -@source: -@deviceid: -@x_root: -@y_root: - - - -Generated when all or part of a window becomes visible and needs to be -redrawn. - - -@type: the type of the event (%GDK_EXPOSE). -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@area: the area that needs to be redrawn. -@count: the number of contiguous %GDK_EXPOSE events following this one. -The only use for this is "exposure compression", i.e. handling all contiguous -%GDK_EXPOSE events in one go, though GDK performs some exposure compression -so this is not normally needed. - - - -Generated when the window visibility status has changed. - - -@type: the type of the event (%GDK_VISIBILITY_NOTIFY). -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@state: the new visibility state (%GDK_VISIBILITY_FULLY_OBSCURED, -%GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED). - - - -Specifies the visiblity status of a window for a #GdkEventVisibility. - - -@GDK_VISIBILITY_UNOBSCURED: the window is completely visible. -@GDK_VISIBILITY_PARTIAL: the window is partially visible. -@GDK_VISIBILITY_FULLY_OBSCURED: the window is not visible at all. - - - - - - -@type: the type of the event. -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@subwindow: -@time: the time of the event in milliseconds. -@x: -@y: -@x_root: -@y_root: -@mode: -@detail: -@focus: -@state: - - - - - - -@GDK_CROSSING_NORMAL: -@GDK_CROSSING_GRAB: -@GDK_CROSSING_UNGRAB: - - - - - - -@GDK_NOTIFY_ANCESTOR: -@GDK_NOTIFY_VIRTUAL: -@GDK_NOTIFY_INFERIOR: -@GDK_NOTIFY_NONLINEAR: -@GDK_NOTIFY_NONLINEAR_VIRTUAL: -@GDK_NOTIFY_UNKNOWN: - - - -Describes a change of keyboard focus. - - -@type: the type of the event (%GDK_FOCUS_CHANGE). -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@in: TRUE if the window has gained the keyboard focus, FALSE if it has lost -the focus. - - - -Generated when a window size or position has changed. - - -@type: the type of the event (%GDK_CONFIGURE). -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@x: the new x coordinate of the window, relative to its parent. -@y: the new y coordinate of the window, relative to its parent. -@width: the new width of the window. -@height: the new height of the window. - - - -Describes a property change on a window. - - -@type: the type of the event (%GDK_PROPERTY_NOTIFY). -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@atom: the property that was changed. -@time: the time of the event in milliseconds. -@state: whether the property was changed (%GDK_PROPERTY_NEW_VALUE) or -deleted (%GDK_PROPERTY_DELETE). - - - -Specifies the type of a property change for a #GdkEventProperty. - - -@GDK_PROPERTY_NEW_VALUE: the property value wan changed. -@GDK_PROPERTY_DELETE: the property was deleted. - - - - - - -@type: the type of the event. -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@selection: -@target: -@property: -@requestor: -@time: the time of the event in milliseconds. - - - - - - -@type: the type of the event. -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@context: -@time: the time of the event in milliseconds. -@x_root: -@y_root: - - - - - - -@type: the type of the event. -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@time: the time of the event in milliseconds. -@source: -@deviceid: - - - -An event sent by another client application. - - -@type: the type of the event (%GDK_CLIENT_EVENT). -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). -@message_type: the type of the message, which can be defined by the -application. -@data_format: the format of the data, given as the number of bits in each -data element, i.e. 8, 16, or 32. 8-bit data uses the b array of the data -union, 16-bit data uses the s array, and 32-bit data uses the l array. - - - -Generated when the area of a #GdkDrawable being copied, with gdk_draw_pixmap() -or gdk_window_copy_area(), was completely available. - - -FIXME: add more here. - - -@type: the type of the event (%GDK_NO_EXPOSE). -@window: the window which received the event. -@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent). - diff --git a/docs/reference/gdk/tmpl/events.sgml b/docs/reference/gdk/tmpl/events.sgml deleted file mode 100644 index dca821ca7e..0000000000 --- a/docs/reference/gdk/tmpl/events.sgml +++ /dev/null @@ -1,303 +0,0 @@ - -Events - - -functions for handling events from the window system. - - - -This section describes functions dealing with events from the window system. - - -In GTK+ applications the events are handled automatically in -gtk_main_do_event() and passed on to the appropriate widgets, so these -functions are rarely needed. Though some of the fields in the -Event Structures are useful. - - - - - - -Event Structures - -The structs used for each type of event. - - - - - - - -Specifies the type of the event. - - -Do not confuse these events with the signals that GTK+ widgets emit. -Although many of these events result in corresponding signals being emitted, -the events are often transformed or filtered along the way. - - -@GDK_NOTHING: a special code to indicate a null event. -@GDK_DELETE: the window manager has requested that the toplevel window be -hidden or destroyed, usually when the user clicks on a special icon in the -title bar. -@GDK_DESTROY: the window has been destroyed. -@GDK_EXPOSE: all or part of the window has become visible and needs to be -redrawn. -@GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved. -@GDK_BUTTON_PRESS: a mouse button has been pressed. -@GDK_2BUTTON_PRESS: a mouse button has been double-clicked (clicked twice -within a short period of time). Note that each click also generates a -%GDK_BUTTON_PRESS event. -@GDK_3BUTTON_PRESS: a mouse button has been clicked 3 times in a short period -of time. Note that each click also generates a %GDK_BUTTON_PRESS event. -@GDK_BUTTON_RELEASE: a mouse button has been released. -@GDK_KEY_PRESS: a key has been pressed. -@GDK_KEY_RELEASE: a key has been released. -@GDK_ENTER_NOTIFY: the pointer has entered the window. -@GDK_LEAVE_NOTIFY: the pointer has left the window. -@GDK_FOCUS_CHANGE: the keyboard focus has entered or left the window. -@GDK_CONFIGURE: the size, position or stacking order of the window has changed. -Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows. -@GDK_MAP: the window has been mapped. -@GDK_UNMAP: the window has been unmapped. -@GDK_PROPERTY_NOTIFY: a property on the window has been changed or deleted. -@GDK_SELECTION_CLEAR: the application has lost ownership of a selection. -@GDK_SELECTION_REQUEST: another application has requested a selection. -@GDK_SELECTION_NOTIFY: a selection has been received. -@GDK_PROXIMITY_IN: an input device has moved into contact with a sensing -surface (e.g. a touchscreen or graphics tablet). -@GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing -surface. -@GDK_DRAG_ENTER: the mouse has entered the window while a drag is in progress. -@GDK_DRAG_LEAVE: the mouse has left the window while a drag is in progress. -@GDK_DRAG_MOTION: the mouse has moved in the window while a drag is in -progress. -@GDK_DRAG_STATUS: the status of the drag operation initiated by the window -has changed. -@GDK_DROP_START: a drop operation onto the window has started. -@GDK_DROP_FINISHED: the drop operation initiated by the window has completed. -@GDK_CLIENT_EVENT: a message has been received from another application. -@GDK_VISIBILITY_NOTIFY: the window visibility status has changed. -@GDK_NO_EXPOSE: indicates that the source region was completely available -when parts of a drawable were copied. This is not very useful. - - - -A set of bit-flags to indicate which events a window is to receive. -Most of these masks map onto one or more of the #GdkEventType event types -above. - - -%GDK_POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the -number of %GDK_MOTION_NOTIFY events received. Normally a %GDK_MOTION_NOTIFY -event is received each time the mouse moves. However, if the application -spends a lot of time processing the event (updating the display, for example), -it can easily lag behind the position of the mouse. When using the -%GDK_POINTER_MOTION_HINT_MASK the server will only send %GDK_MOTION_NOTIFY -events when the application asks for them, by calling gdk_window_get_pointer(). - - -@GDK_EXPOSURE_MASK: -@GDK_POINTER_MOTION_MASK: -@GDK_POINTER_MOTION_HINT_MASK: -@GDK_BUTTON_MOTION_MASK: -@GDK_BUTTON1_MOTION_MASK: -@GDK_BUTTON2_MOTION_MASK: -@GDK_BUTTON3_MOTION_MASK: -@GDK_BUTTON_PRESS_MASK: -@GDK_BUTTON_RELEASE_MASK: -@GDK_KEY_PRESS_MASK: -@GDK_KEY_RELEASE_MASK: -@GDK_ENTER_NOTIFY_MASK: -@GDK_LEAVE_NOTIFY_MASK: -@GDK_FOCUS_CHANGE_MASK: -@GDK_STRUCTURE_MASK: -@GDK_PROPERTY_CHANGE_MASK: -@GDK_VISIBILITY_NOTIFY_MASK: -@GDK_PROXIMITY_IN_MASK: -@GDK_PROXIMITY_OUT_MASK: -@GDK_SUBSTRUCTURE_MASK: -@GDK_ALL_EVENTS_MASK: the combination of all the above event masks. - - - -Represents the current time, and can be used anywhere a time is expected. - - - - - - -This is the priority that events from the X server are given in the -GLib Main Loop. - - - - - - -Checks if any events are waiting to be processed. - - -@Returns: TRUE if any events are pending. - - - - -Gets a copy of the first #GdkEvent in the event queue. -(Note that this function will not get more events from the X server. -It only checks the events that have already been moved to the GDK event queue.) - - -@Returns: a copy of the first #GdkEvent on the event queue, or NULL if no -events are in the queue. The returned #GdkEvent should be freed with -gdk_event_free(). - - - - -Gets the next #GdkEvent to be processed, fetching events from the X server if -necessary. - - -@Returns: the next #GdkEvent to be processed, or NULL if no events are pending. -The returned #GdkEvent should be freed with gdk_event_free(). - - - - -Waits for a GraphicsExpose or NoExpose event from the X server. -This is used in the #GtkText and #GtkCList widgets in GTK+ to make sure any -GraphicsExpose events are handled before the widget is scrolled. - - -@window: the #GdkWindow to wait for the events for. -@Returns: a #GdkEventExpose if a GraphicsExpose was received, or NULL if a -NoExpose event was received. - - - - -Appends a copy of the given event onto the front of the event queue. - - -@event: a #GdkEvent. - - - - -Copies a #GdkEvent, copying or incrementing the reference count of the -resources associated with it (e.g. #GdkWindow's and strings). - - -@event: a #GdkEvent. -@Returns: a copy of @event. The returned #GdkEvent should be freed with -gdk_event_free(). - - - - -Frees a #GdkEvent, freeing or decrementing any resources associated with it. -Note that this function should only be called with events returned from -gdk_event_peek(), gdk_event_get(), gdk_event_get_graphics_expose() and -gdk_event_copy(). - - -@event: a #GdkEvent. - - - - -Gets the timestamp from a #GdkEvent. - - -@event: a #GdkEvent. -@Returns: the timestamp from @event, or #GDK_CURRENT_TIME if the event has -no timestamp. - - - - -Sets the function to call to handle all events from GDK. - - -Note that GTK+ uses this to install its own event handler, so it is probably -not useful for GTK+ applications. - - -@func: the function to call to handle events from GDK. -@data: user data to pass to the function. -@notify: the function to call when the handler function is removed, i.e. when -gdk_event_handler_set() is called with another event handler. - - - - -Specifies the type of function passed to gdk_event_handler_set() to handle -all GDK events. - - -@event: the #GdkEvent to process. -@data: user data set when the event handler was installed with -gdk_event_handler_set(). - - - - -Sends an X ClientMessage event to a given window. - - -This could be used for communicating between different applications, -though the amount of data is limited to 20 bytes. - - -@event: the #GdkEvent to send, which should be a #GdkEventClient. -@xid: the window to send the X ClientMessage event to. -@Returns: non-zero on success. - - - - -Sends an X ClientMessage event to all toplevel windows. - - -Toplevel windows are determined by checking for the WM_STATE property, as -described in the Inter-Client Communication Conventions Manual (ICCCM). -If no windows are found with the WM_STATE property set, the message is sent -to all children of the root window. - - -@event: the #GdkEvent to send, which should be a #GdkEventClient. - - - - -Adds a filter to be called when X ClientMessage events are received. - - -@message_type: the type of ClientMessage events to receive. This will be -checked against the message_type field of the -XClientMessage event struct. -@func: the function to call to process the event. -@data: user data to pass to @func. - - - - -Returns non-zero if event debugging output is enabled. - - -@Returns: non-zero if event debugging output is enabled. - - - - -Sets whether event debugging information is output. -Note that GTK+ must be compiled with debugging enabled, i.e. using the -'--enable-debug' configure option. - - -@show_events: TRUE to output event debugging information. - - diff --git a/docs/reference/gdk/tmpl/fonts.sgml b/docs/reference/gdk/tmpl/fonts.sgml deleted file mode 100644 index 479b115846..0000000000 --- a/docs/reference/gdk/tmpl/fonts.sgml +++ /dev/null @@ -1,643 +0,0 @@ - -Fonts - - -loading and manipulating fonts - - - -The GdkFont data type represents a font for drawing on -the screen. These functions provide support for -loading fonts, and also for determining the dimensions -of characters and strings when drawn with a particular -font. - - - -Fonts in X are specified by a -X Logical Font Description. -The following description is considerably simplified. -For definitive information about XLFD's see the -X reference documentation. A X Logical Font Description (XLFD) -consists of a sequence of fields separated (and surrounded by) '-' -characters. For example, Adobe Helvetica Bold 12 pt, has the -full description: - - -"-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1" - - - - -The fields in the XLFD are: - - - - - - -Foundry -the company or organization where the font originated. - - - -Family -the font family (a group of related font designs). - - - -Weight -A name for the font's typographic weight -For example, 'bold' or 'medium'). - - - -Slant -The slant of the font. Common values are 'R' for Roman, -'I' for italoc, and 'O' for oblique. - - - -Set Width -A name for the width of the font. For example, -'normal' or 'condensed'. - - - -Add Style -Additional information to distinguish a font from -other fonts of the same family. - - - -Pixel Size -The body size of the font in pixels. - - - -Point Size -The body size of the font in 10ths of a point. -(A point is 1/72.27 inch) - - - -Resolution X -The horizontal resolution that the font was designed for. - - - -Resolution Y -The vertical resolution that the font was designed for . - - - -Spacing -The type of spacing for the font - can be 'p' for proportional, -'m' for monospaced or 'c' for charcell. - - - -Average Width -The average width of a glyph in the font. For monospaced -and charcell fonts, all glyphs in the font have this width - - - -Charset Registry -The registration authority that owns the encoding for -the font. Together with the Charset Encoding field, this -defines the character set for the font. - - - -Charset Encoding -An identifier for the particular character set encoding. - - - - - - -When specifying a font via a X logical Font Description, -'*' can be used as a wildcard to match any portion of -the XLFD. For instance, the above example could -also be specified as - - -"-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1" - - -It is generally a good idea to use wildcards for any -portion of the XLFD that your program does not care -about specifically, since that will improve the -chances of finding a matching font. - - - -A fontset is a list of fonts -that is used for drawing international text that may -contain characters from a number of different character -sets. It is represented by a list of XLFD's. - - - -The font for a given character set is determined by going -through the list of XLFD's in order. For each one, if -the registry and and encoding fields match the desired -character set, then that font is used, otherwise if -the XLFD contains wild-cards for the registry and encoding -fields, the registry and encoding for the desired character -set are subsituted in and a lookup is done. If a match is found -that font is used. Otherwise, processing continues -on to the next font in the list. - - - -The functions for determining the metrics of a string -come in several varieties that can take a number -of forms of string input: - - - - 8-bit string - - When using functions like gdk_string_width() that - take a gchar *, if the font is of type - %GDK_FONT_FONT and is an 8-bit font, then each - gchar indexes the glyphs in the font directly. - - - - 16-bit string - - For functions taking a gchar *, if the - font is of type %GDK_FONT_FONT, and is a 16-bit - font, then the gchar * argument is - interpreted as a guint16 * cast to - a gchar * and each guint16 - indexes the glyphs in the font directly. - - - - Multibyte string - - For functions taking a gchar *, if the - font is of type %GDK_FONT_FONTSET, then the input - string is interpreted as a multibyte - encoded according to the current locale. (A multibyte - string is one in which each character may consist - of one or more bytes, with different lengths for different - characters in the string). They can be converted to and - from wide character strings (see below) using - gdk_wcstombs() and gdk_mbstowcs().) The string will - be rendered using one or more different fonts from - the fontset. - - - - Wide character string - - For a number of the text-measuring functions, GTK+ - provides a variant (such as gdk_text_width_wc()) which - takes a GdkWChar * instead of a - gchar *. The input is then taken to - be a wide character string in the encoding of the - current locale. (A wide character string is a string - in which each character consists of several bytes, - and the width of each character in the string is - constant.) - - - - - - -GDK provides functions to determine a number of different -measurements (metrics) for a given string. (Need diagram -here). - - - - ascent - - The vertical distance from the origin of the drawing - opereration to the top of the drawn character. - - - - descent - - The vertical distance from the origin of the drawing - opereration to the bottom of the drawn character. - - - - left bearing - - The horizontal distance from the origin of the drawing - operation to the left-most part of the drawn character. - - - - right bearing - - The horizontal distance from the origin of the drawing - operation to the right-most part of the drawn character. - - - - width bearing - - The horizontal distance from the origin of the drawing - operation to the correct origin for drawing another - string to follow the current one. Depending on the - font, this could be greater than or less than the - right bearing. - - - - - - - - - - - - -The GdkFont structure represents a font or fontset. It -contains the following public fields. A new GdkFont -structure is returned by gdk_font_load() or gdk_fontset_load(), -and is reference counted with gdk_font_ref() and gdk_font_unref() - - - - - - -type -a value of type #GdkFontType which indicates -whether this font is a single font or a fontset. - - - -ascent -the maximum distance that the font, when drawn, -ascends above the baseline. - - - -descent -the maximum distance that the font, when drawn, -descends below the baseline. - - - - - -@type: -@ascent: -@descent: - - - -Indicates the type of a font. The possible values -are currently: - - - - - - -GDK_FONT_FONT -the font is a single font. - - - -GDK_FONT_FONT -the font is a fontset. - - - - - -@GDK_FONT_FONT: -@GDK_FONT_FONTSET: - - - -Loads a font. - - - -Currently, this function will always return a new -font, however, in the future, it may be changed to -look up the font in a cache. You should make no -assumptions about the initial reference count. - - -@font_name: a XLFD describing the font to load. -@Returns: a #GdkFont, or NULL if the font could not be loaded. - - - - -Loads a fontset. - - -Currently this function will always return a new -font, however, in the future, it may be changed to -look up the font in a cache. You should make no -assumptions about the initial reference count. - - -@fontset_name: a comma-separated list of XLFDs describing - the component fonts of the fontset to load. -@Returns: a #GdkFont, or NULL if the fontset could not be loaded. - - - - -Increase the reference count of a count by one. - - -@font: a #GdkFont -@Returns: @font - - - - -Decrease the reference count of a count by one. -If the result is zero, destroys the font. - - -@font: a #GdkFont - - - - -Returns the X Font ID for the given font. - - -@font: a #GdkFont. -@Returns: the numeric X Font ID - - - - -Compares two fonts for equality. Single fonts compare equal -if they have the same X font ID. This operation does -not currently work correctly for fontsets. - - -@fonta: a #GdkFont. -@fontb: another #GdkFont. -@Returns: %TRUE if the fonts are equal. - - - - -Returns the metrics of a NULL-terminated string. - - -@font: a #GdkFont. -@string: the NULL-terminated string to measure. -@lbearing: the left bearing of the string. -@rbearing: the right bearing of the string. -@width: the width of the string. -@ascent: the ascent of the string. -@descent: the descent of the string. - - - - -Returns the metrics of a string. - - -@font: a #GdkFont -@text: the text to measure -@text_length: the length of the text in bytes. (If the - font is a 16-bit font, this is twice the length - of the text in characters.) -@lbearing: the left bearing of the string. -@rbearing: the right bearing of the string. -@width: the width of the string. -@ascent: the ascent of the string. -@descent: the descent of the string. - - - - -Returns the metrics of a string of wide characters. - - -@font: a #GdkFont -@text: the text to measure. -@text_length: the length of the text in character. -@lbearing: the left bearing of the string. -@rbearing: the right bearing of the string. -@width: the width of the string. -@ascent: the ascent of the string. -@descent: the descent of the string. - - - - -Determine the width of a NULL-terminated string. -(The distance from the origin of the string to the -point where the next string in a sequence of strings -should be drawn) - - -@font: a #GdkFont -@string: the NULL-terminated string to measure -@Returns: the width of the string in pixels. - - - - -Determine the width of a given string. - - -@font: a #GdkFont -@text: the text to measure. -@text_length: the length of the text in bytes. -@Returns: the width of the string in pixels. - - - - -Determine the width of a given wide-character string. - - -@font: a #GdkFont -@text: the text to measure. -@text_length: the length of the text in characters. -@Returns: the width of the string in pixels. - - - - -Determine the width of a given character. - - -@font: a #GdkFont -@character: the character to measure. -@Returns: the width of the character in pixels. - - - - -Determine the width of a given wide character. (Encoded -in the wide-character encoding of the current locale). - - -@font: a #GdkFont -@character: the character to measure. -@Returns: the width of the character in pixels. - - - - -Determines the distance from the origin to the rightmost -portion of a NULL-terminated string when drawn. This is not the -correct value for determining the origin of the next -portion when drawing text in multiple pieces. -See gdk_string_width(). - - -@font: a #GdkFont -@string: the NULL-terminated string to measure. -@Returns: the right bearing of the string in pixels. - - - - -Determines the distance from the origin to the rightmost -portion of a string when drawn. This is not the -correct value for determining the origin of the next -portion when drawing text in multiple pieces. -See gdk_text_width(). - - -@font: a #GdkFont -@text: the text to measure. -@text_length: the length of the text in bytes. -@Returns: the right bearing of the string in pixels. - - - - -Determines the distance from the origin to the rightmost -portion of a character when drawn. This is not the -correct value for determining the origin of the next -portion when drawing text in multiple pieces. - - -@font: a #GdkFont -@character: the character to measure. -@Returns: the right bearing of the character in pixels. - - - - -Determines the total height of a given NULL-terminated -string. This value is not generally useful, because you -cannot determine how this total height will be drawn in -relation to the baseline. See gdk_string_extents(). - - -@font: a #GdkFont -@string: the NULL-terminated string to measure. -@Returns: the height of the string in pixels. - - - - -Determines the total height of a given string. -This value is not generally useful, because you cannot -determine how this total height will be drawn in -relation to the baseline. See gdk_text_extents(). - - -@font: a #GdkFont -@text: the text to measure. -@text_length: the length of the text in bytes. -@Returns: the height of the string in pixels. - - - - -Determines the total height of a given character. -This value is not generally useful, because you cannot -determine how this total height will be drawn in -relation to the baseline. See gdk_text_extents(). - - -@font: a #GdkFont -@character: the character to measure. -@Returns: the height of the character in pixels. - - - - -Specifies a wide character type, used to represent character codes. -This is needed since some native languages have character sets which have -more than 256 characters (Japanese and Chinese, for example). - - -Wide character values between 0 and 127 are always identical in meaning to -the ASCII character codes. The wide character value 0 is often used to -terminate strings of wide characters in a similar way to normal strings -using the char type. - - -An alternative to wide characters is multi-byte characters, which extend -normal char strings to cope with larger character sets. As the name suggests, -multi-byte characters use a different number of bytes to store different -character codes. For example codes 0-127 (i.e. the ASCII codes) often -use just one byte of memory, while other codes may use 2, 3 or even 4 bytes. -Multi-byte characters have the advantage that they can often be used in an -application with little change, since strings are still represented as arrays -of char values. However multi-byte strings are much easier to manipulate since -the character are all of the same size. - - -Applications typically use wide characters to represent character codes -internally, and multi-byte strings when saving the characters to a file. -The gdk_wcstombs() and gdk_mbstowcs() functions can be used to convert from -one representation to the other. - - -See the 'Extended Characters' section of the GNU C Library Reference Manual -for more detailed information on wide and multi-byte characters. - - - - - -Converts a wide character string to a multi-byte string. -(The function name comes from an acronym of 'Wide Character String TO -Multi-Byte String'). - - -@src: a wide character string. -@Returns: the multi-byte string corresponding to @src, or NULL if the -conversion failed. The returned string should be freed with g_free() when no -longer needed. - - - - -Converts a multi-byte string to a wide character string. -(The function name comes from an acronym of 'Multi-Byte String TO Wide -Character String'). - - -@dest: the space to place the converted wide character string into. -@src: the multi-byte string to convert, which must be null-terminated. -@dest_max: the maximum number of wide characters to place in @dest. -@Returns: the number of wide characters written into @dest, or -1 if the -conversion failed. - - diff --git a/docs/reference/gdk/tmpl/gcs.sgml b/docs/reference/gdk/tmpl/gcs.sgml deleted file mode 100644 index 4ec3f32425..0000000000 --- a/docs/reference/gdk/tmpl/gcs.sgml +++ /dev/null @@ -1,639 +0,0 @@ - -Graphics Contexts - - -objects to encapsulate drawing properties. - - - -All drawing operations in GDK take a -graphics context (GC) argument. -A graphics context encapsulates information about -the way things are drawn, such as the foreground -color or line width. By using graphics contexts, -the number of arguments to each drawing call is -greatly reduced, and communication overhead is -minimized, since identical arguments do not need -to be passed repeatedly. - - -Most values of a graphics context can be set at -creation time by using gdk_gc_new_with_values(), -or can be set one-by-one using functions such -as gdk_gc_set_foreground(). A few of the values -in the GC, such as the dash pattern, can only -be set by the latter method. - - - - - - - - - -The #GdkGC structure represents a graphics context. -It is an opaque structure with no user-visible -elements. - - -@dummy_var: - - - -The #GdkGCValues structure holds a set of values used -to create or modify a graphics context. - - - - - - -#GdkColor foreground; -the foreground color. - - - -#GdkColor background; -the background color. - - - -#GdkFont *font; -the default font.. - - - -#GdkFunction function; -the bitwise operation used when drawing. - - - -#GdkFill fill; -the fill style. - - - -#GdkPixmap *tile; -the tile pixmap. - - - -#GdkPixmap *stipple; -the stipple bitmap. - - - -#GdkPixmap *clip_mask; -the clip mask bitmap. - - - -#GdkSubwindowMode subwindow_mode; -the subwindow mode. - - - -#gint ts_x_origin; -the x origin of the tile or stipple. - - - -#gint ts_y_origin; -the y origin of the tile or stipple. - - - -#gint clip_x_origin; -the x origin of the clip mask. - - - -#gint clip_y_origin; -the y origin of the clip mask. - - - -#gint graphics_exposures; -whether graphics exposures are enabled. - - - -#gint line_width; -the line width - - - -#GdkLineStyle line_style; -the way dashed lines are drawn - - - -#GdkCapStyle cap_style; -the way the ends of lines are drawn - - - -#GdkJoinStyle join_style; -the way joins between lines are drawn - - - - - -@foreground: -@background: -@font: -@function: -@fill: -@tile: -@stipple: -@clip_mask: -@subwindow_mode: -@ts_x_origin: -@ts_y_origin: -@clip_x_origin: -@clip_y_origin: -@graphics_exposures: -@line_width: -@line_style: -@cap_style: -@join_style: - - - -A set of bit flags used to indicate which fields -#GdkGCValues structure are set. - - -@GDK_GC_FOREGROUND: -@GDK_GC_BACKGROUND: -@GDK_GC_FONT: -@GDK_GC_FUNCTION: -@GDK_GC_FILL: -@GDK_GC_TILE: -@GDK_GC_STIPPLE: -@GDK_GC_CLIP_MASK: -@GDK_GC_SUBWINDOW: -@GDK_GC_TS_X_ORIGIN: -@GDK_GC_TS_Y_ORIGIN: -@GDK_GC_CLIP_X_ORIGIN: -@GDK_GC_CLIP_Y_ORIGIN: -@GDK_GC_EXPOSURES: -@GDK_GC_LINE_WIDTH: -@GDK_GC_LINE_STYLE: -@GDK_GC_CAP_STYLE: -@GDK_GC_JOIN_STYLE: - - - -Determines how the bit values for the source pixels are combined with -the bit values for destination pixels to produce the final result. The -sixteen values here correspond to the 16 different possible 2x2 truth -tables. Only a couple of these values are usually useful; for colored -images, only %GDK_COPY, %GDK_XOR and %GDK_INVERT are generally -useful. For bitmaps, %GDK_AND and %GDK_OR are also useful. - - -@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_SET: - - - -Create a new graphics context with default values. - - -@window: a #GdkDrawable. The created GC must always be used - with drawables of the same depth as this one. -@Returns: the new graphics context. - - - - -Create a new GC with the given initial values. - - -@window: a #GdkDrawable. The created GC must always be used - with drawables of the same depth as this one. -@values: a structure containing initial values for the GC. -@values_mask: a bit mask indicating which fields in @values - are set. -@Returns: the new graphics context. - - - - -Increase the reference count on a graphics context. - - -@gc: a #GdkGC. -@Returns: @gc. - - - - -Decrease the reference count on a graphics context. If -the resulting reference count is zero, the graphics -context will be destroyed. - - -@gc: a #GdkGC. - - - - -Identical to gdk_gc_unref(). This function is obsolete -and should not be used. - - -@gc: a #GdkGC. - - - - -Retrieves the current values from a graphics context. - - -@gc: a #GdkGC. -@values: the #GdkGCValues structure in which to store the results. - - - - -Sets the foreground color for a graphics context. - - -@gc: a #GdkGC. -@color: the new foreground color. - - - - -Sets the background color for a graphics context. - - -@gc: a #GdkGC. -@color: the new background color. - - - - -Sets the font for a graphics context. (Note that -all text-drawing functions in GDK take a @font -argument; the value set here is used when that -argument is %NULL.) - - -@gc: a #GdkGC. -@font: the new font. - - - - -Determines how the current pixel values and the -pixel values being drawn are combined to produce -the final pixel values. - - -@gc: a #GdkGC. -@function: - - - - -Set the fill mode for a graphics context. - - -@gc: a #GdkGC. -@fill: the new fill mode. - - - - -Determines how primitives are drawn. - - - - - - -GDK_SOLID -draw with the foreground color. - - - -GDK_TILED -draw with a tiled pixmap. - - - -GDK_STIPPLED -draw using the stipple bitmap. Pixels corresponding -to bits in the stipple bitmap that are set will be drawn in the -foreground color; pixels corresponding to bits that are -not set will be left untouched. - - - -GDK_OPAQUE_STIPPLED -draw using the stipple bitmap. Pixels corresponding -to bits in the stipple bitmap that are set will be drawn in the -foreground color; pixels corresponding to bits that are -not set will be drawn with the background color. - - - - - -@GDK_SOLID: -@GDK_TILED: -@GDK_STIPPLED: -@GDK_OPAQUE_STIPPLED: - - - -Set a tile pixmap for a graphics context. -This will only be used if the fill mode -is %GDK_TILED. - - -@gc: a #GdkGC. -@tile: the new tile pixmap. - - - - -Set the stipple bitmap for a graphics context. The -stipple will only be used if the fill mode is -%GDK_STIPPLED or %GDK_OPAQUE_STIPPLED. - - -@gc: a #GdkGC. -@stipple: the new stipple bitmap. - - - - -Set the origin when using tiles or stipples with -the GC. The tile or stipple will be aligned such -that the upper left corner of the tile or stipple -will coincide with this point. - - -@gc: a #GdkGC. -@x: the x-coordinate of the origin. -@y: the y-coordinate of the origin. - - - - -Sets the origin of the clip mask. The coordinates are -interpreted relative to the upper-left corner of -the destination drawable of the current operation. - - -@gc: a #GdkGC. -@x: the x-coordinate of the origin. -@y: the y-coordinate of the origin. - - - - -Sets the clip mask for a graphics context from a bitmap. -The clip mask is interpreted relative to the clip -origin. (See gdk_gc_set_clip_origin()). - - -@gc: the #GdkGC. -@mask: a bitmap. - - - - -Sets the clip mask for a graphics context from a -rectangle. The clip mask is interpreted relative to the clip -origin. (See gdk_gc_set_clip_origin()). - - - -@gc: a #GdkGC. -@rectangle: the rectangle to clip to. - - - - -Sets the clip mask for a graphics context from a region structure. -The clip mask is interpreted relative to the clip origin. (See -gdk_gc_set_clip_origin()). - - -@gc: a #GdkGC. -@region: the #GdkRegion. - - - - -Sets how drawing with this GC on a window will affect child -windows of that window. - - -@gc: a #GdkGC. -@mode: the subwindow mode. - - - - - -Determines how drawing onto a window will affect child -windows of that window. - - - - - - -GDK_CLIP_BY_CHILDREN -only draw onto the window itself. - - - -GDK_INCLUDE_INFERIORS -Draw onto the window and child windows. - - - - - -@GDK_CLIP_BY_CHILDREN: -@GDK_INCLUDE_INFERIORS: - - - -Sets whether copying non-visible portions of a drawable -using this graphics context generate exposure events -for the corresponding regions of the destination -drawable. (See gdk_draw_pixmap()). - - -@gc: a #GdkGC. -@exposures: if %TRUE, exposure events will be generated. - - - - -Sets various attributes of how lines are drawn. See -the corresponding members of GdkGCValues for full -explanations of the arguments. - - -@gc: a #GdkGC. -@line_width: the width of lines. -@line_style: the dash-style for lines. -@cap_style: the manner in which the ends of lines are drawn. -@join_style: the in which lines are joined together. - - - - -Determines how lines are drawn. - - - - - - -GDK_LINE_SOLID -lines are drawn solid. - - - -GDK_LINE_ON_OFF_DASH -even segments are drawn; odd segments are not drawn. - - - -GDK_LINE_DOUBLE_DASH -even segments are normally. Odd segments are drawn -in the background color if the fill style is %GDK_SOLID, -or in the background color masked by the stipple if the -fill style is %GDK_STIPPLED. - - - - - -@GDK_LINE_SOLID: -@GDK_LINE_ON_OFF_DASH: -@GDK_LINE_DOUBLE_DASH: - - - -Determines how the end of lines are drawn. - - - - - - -GDK_CAP_NOT_LAST -the same as %GDK_CAP_BUTT for lines of non-zero width. - for zero width lines, the final point on the line - will not be drawn. - - - -GDK_CAP_BUTT -the ends of the lines are drawn squared off and extending - to the coordinates of the end point. - - - -GDK_CAP_ROUND -the ends of the lines are drawn as semicircles with the - diameter equal to the line width and centered at the - end point. - - - -GDK_CAP_PROJECTING -the ends of the lines are drawn squared off and extending - half the width of the line beyond the end point. - - - - -@GDK_CAP_NOT_LAST: -@GDK_CAP_BUTT: -@GDK_CAP_ROUND: -@GDK_CAP_PROJECTING: - - - -Determines how the joins between segments of a polygon are drawn. - - - - - - -GDK_JOIN_MITER -the sides of each line are extended to meet at an angle. - - - -GDK_JOIN_ROUND -the sides of the two lines are joined by a circular arc. - - - -GDK_JOIN_BEVEL -the sides of the two lines are joined by a straight line which - makes an equal angle with each line. - - - - - -@GDK_JOIN_MITER: -@GDK_JOIN_ROUND: -@GDK_JOIN_BEVEL: - - - -Sets the way dashed-lines are drawn. Lines will be -drawn with alternating on and off segments of the -lengths specified in @dash_list. The manner in -which the on and off segments are drawn is determined -by the @line_style value of the GC. (This can -be changed with gdk_gc_set_line_attributes) - - -@gc: a #GdkGC. -@dash_offset: the -@dash_list: an array of dash lengths. -@n: the number of elements in @dash_list. - - - - -Copy the set of values from one graphics context -onto another graphics context. - - -@dst_gc: the destination graphics context. -@src_gc: the source graphics context. - - diff --git a/docs/reference/gdk/tmpl/gdk-unused.sgml b/docs/reference/gdk/tmpl/gdk-unused.sgml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/reference/gdk/tmpl/general.sgml b/docs/reference/gdk/tmpl/general.sgml deleted file mode 100644 index 87a746db38..0000000000 --- a/docs/reference/gdk/tmpl/general.sgml +++ /dev/null @@ -1,346 +0,0 @@ - -General - - -library initialization and miscellaneous functions. - - - -This section describes the GDK initialization functions and miscellaneous -utility functions. - - - - - - - - - -Initializes the GDK library and connects to the X server. -If initialization fails, a warning message is output and the application -terminates with a call to exit(1). - - -Any arguments used by GDK are removed from the array and @argc and @argv are -updated accordingly. - - -GTK+ initializes GDK in gtk_init() and so this function is not usually needed -by GTK+ applications. - - -@argc: the number of command line arguments. -@argv: the array of command line arguments. - - - - -Initializes the GDK library and connects to the X server, returning TRUE on -success. - - -Any arguments used by GDK are removed from the array and @argc and @argv are -updated accordingly. - - -GTK+ initializes GDK in gtk_init() and so this function is not usually needed -by GTK+ applications. - - -@argc: the number of command line arguments. -@argv: the array of command line arguments. -@Returns: TRUE if initialization succeeded. - - - - -Exits the application using the exit() system call. - - -This routine is provided mainly for backwards compatability, since it used to -perform tasks necessary to exit the application cleanly. Those tasks are now -performed in a function which is automatically called on exit (via the use -of g_atexit()). - - -@error_code: the error code to pass to the exit() call. - - - - -Initializes the support for internationalization by calling the setlocale() -system call. This function is called by gtk_set_locale() and so GTK+ -applications should use that instead. - - -The locale to use is determined by the LANG environment variable, -so to run an application in a certain locale you can do something like this: - - - export LANG="fr" - ... run application ... - - - - -If the locale is not supported by X then it is reset to the standard "C" -locale. - - -@Returns: the resulting locale. - - - - -Sets the SM_CLIENT_ID property on the application's leader window so that -the window manager can save the application's state using the X11R6 ICCCM -session management protocol. - - -The leader window is automatically created by GDK and never shown. It's only -use is for session management. The WM_CLIENT_LEADER property is automatically -set on all X windows created by the application to point to the leader window. - - -See the X Session Management Library documentation for more information on -session management and the Inter-Client Communication Conventions Manual -(ICCCM) for information on the WM_CLIENT_LEADER property. (Both documents are -part of the X Windows distribution.) - - -@sm_client_id: the client id assigned by the session manager when the -connection was opened, or NULL to remove the property. - - - - -Gets the name of the display, which usually comes from the DISPLAY -environment variable or the --display command line option. - - -@Returns: the name of the display. - - - - -Flushes the X output buffer and waits until all requests have been processed -by the server. This is rarely needed by applications. It's main use is for -trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop(). - - - - - - -Returns the width of the screen in pixels. - - -@Returns: the width of the screen in pixels. - - - - -Returns the height of the screen in pixels. - - -@Returns: the height of the screen in pixels. - - - - -Returns the width of the screen in millimeters. -Note that on many X servers this value will not be correct. - - -@Returns: the width of the screen in millimeters, though it is not always -correct. - - - - -Returns the height of the screen in millimeters. -Note that on many X servers this value will not be correct. - - -@Returns: the height of the screen in millimeters, though it is not always -correct. - - - - -Grabs the pointer (usually a mouse) so that all events are passed to this -application until the pointer is ungrabbed with gdk_pointer_ungrab(), or -the grab window becomes unviewable. -This overrides any previous pointer grab by this client. - - -Pointer grabs are used for operations which need complete control over mouse -events, even if the mouse leaves the application. -For example in GTK+ it is used for Drag and Drop, for dragging the handle in -the #GtkHPaned and #GtkVPaned widgets, and for resizing columns in #GtkCList -widgets. - - -Note that if the event mask of an X window has selected both button press and -button release events, then a button press event will cause an automatic -pointer grab until the button is released. -X does this automatically since most applications expect to receive button -press and release events in pairs. -It is equivalent to a pointer grab on the window with @owner_events set to -TRUE. - - -@window: the #GdkWindow which will own the grab (the grab window). -@owner_events: if FALSE then all pointer events are reported with respect to -@window and are only reported if selected by @event_mask. If TRUE then pointer -events for this application are reported as normal, but pointer events outside -this application are reported with respect to @window and only if selected by -@event_mask. In either mode, unreported events are discarded. -@event_mask: specifies the event mask, which is used in accordance with -@owner_events. -@confine_to: TRUE to confine the pointer to @window. If the pointer is outside -@window, it will automatically be moved to the closest edge of @window and -enter and leave events will be generated as necessary. -@cursor: the cursor to display while the grab is active. If this is NULL then -the normal cursors are used for @window and its descendants, and the cursor -for @window is used for all other windows. -@time: the timestamp of the event which led to this pointer grab. This usually -comes from a #GdkEventButton struct, though #GDK_CURRENT_TIME can be used if -the time isn't known. -@Returns: 0 if the grab was successful. - - - - -Ungrabs the pointer, if it is grabbed by this application. - - -@time: a timestamp from a #GdkEvent, or #GDK_CURRENT_TIME if no timestamp is -available. - - - - -Returns TRUE if the pointer is currently grabbed by this application. - - -Note that the return value is not completely reliable since the X server may -automatically ungrab the pointer, without informing the application, if the -grab window becomes unviewable. It also does not take passive pointer grabs -into account. - - -@Returns: TRUE if the pointer is currently grabbed by this application. -Though this value is not always correct. - - - - -Grabs the keyboard so that all events are passed to this -application until the keyboard is ungrabbed with gdk_keyboard_ungrab(). -This overrides any previous keyboard grab by this client. - - -@window: the #GdkWindow which will own the grab (the grab window). -@owner_events: if FALSE then all keyboard events are reported with respect to -@window. If TRUE then keyboard events for this application are reported as -normal, but keyboard events outside this application are reported with respect -to @window. Both key press and key release events are alwasy reported, -independant of the event mask set by the application. -@time: a timestamp from a #GdkEvent, or #GDK_CURRENT_TIME if no timestamp is -available. -@Returns: 0 if the grab was successful. - - - - -Ungrabs the keyboard, if it is grabbed by this application. - - -@time: a timestamp from a #GdkEvent, or #GDK_CURRENT_TIME if no timestamp is -available. - - - - -Disables the keyboard auto-repeat mode. -This should be used with care as it may affect other applications. - - - - - - -Restores the keyboard auto-repeat mode to its state when the application was -started. - - - - - - -Emits a short beep. - - - - - - -Returns TRUE if GDK will attempt to use the MIT-SHM shared memory extension. - - -The shared memory extension is used for #GdkImage, and consequently for -GdkRGB. -It enables much faster drawing by communicating with the X server through -SYSV shared memory calls. However, it can only be used if the X client and -server are on the same machine and the server supports it. - - -@Returns: TRUE if use of the MIT shared memory extension will be attempted. - - - - -Sets whether the use of the MIT shared memory extension should be attempted. -This function is mainly for internal use. It is only safe for an application -to set this to FALSE, since if it is set to TRUE and the server does not -support the extension it may cause warning messages to be output. - - -@use_xshm: TRUE if use of the MIT shared memory extension should be attempted. - - - - -This function allows X errors to be trapped instead of the normal behavior -of exiting the application. It should only be used if it is not possible to -avoid the X error in any other way. - - -Trapping an X error. - - gdk_error_trap_push (); - - /* ... Call the X function which may cause an error here ... */ - - /* Flush the X queue to catch errors now. */ - gdk_flush (); - - if (gdk_error_trap_pop ()) - { - /* ... Handle the error here ... */ - } - - - - - - - -Removes the X error trap installed with gdk_error_trap_push(). - - -@Returns: the X error code, or 0 if no error occurred. - - diff --git a/docs/reference/gdk/tmpl/images.sgml b/docs/reference/gdk/tmpl/images.sgml deleted file mode 100644 index 683d817f07..0000000000 --- a/docs/reference/gdk/tmpl/images.sgml +++ /dev/null @@ -1,156 +0,0 @@ - -Images - - -an area for bit-mapped graphics stored on the X Windows client. - - - -The #GdkImage type represents an area for drawing graphics. -It has now been superceded to a large extent by the much more flexible -GdkRGB functions. - - -To create an empty #GdkImage use gdk_image_new(). -To create a #GdkImage from bitmap data use gdk_image_new_bitmap(). -To create an image from part of a #GdkWindow use gdk_image_get(). - - -The image can be manipulated with gdk_image_get_pixel() and -gdk_image_put_pixel(), or alternatively by changing the actual pixel data. -Though manipulating the pixel data requires complicated code to cope with -the different formats that may be used. - - -To draw a #GdkImage in a #GdkWindow or #GdkPixmap use gdk_draw_image(). - - -To destroy a #GdkImage use gdk_image_destroy(). - - - - - - - -Bitmaps and Pixmaps - -Graphics which are stored on the X Windows server. -Since these are stored on the server they can be drawn very quickly, and all -of the Drawing Primitives can be -used to draw on them. Their main disadvantage is that manipulating individual -pixels can be very slow. - - - - -GdkRGB - -Built on top of #GdkImage, this provides much more functionality, -including the dithering of colors to produce better output on low-color -displays. - - - - - - - - -The #GdkImage struct contains information on the image and the pixel data. - - -@type: the type of the image. -@visual: the visual. -@byte_order: the byte order. -@width: the width of the image in pixels. -@height: the height of the image in pixels. -@depth: the depth of the image, i.e. the number of bits per pixel. -@bpp: the number of bytes per pixel. -@bpl: the number of bytes per line of the image. -@mem: the pixel data. - - - -Creates a new #GdkImage. - - -@type: the type of the #GdkImage, one of %GDK_IMAGE_NORMAL, %GDK_IMAGE_SHARED -and %GDK_IMAGE_FASTEST. %GDK_IMAGE_FASTEST is probably the best choice, since -it will try creating a %GDK_IMAGE_SHARED image first and if that fails it will -then use %GDK_IMAGE_NORMAL. -@visual: the #GdkVisual to use for the image. -@width: the width of the image in pixels. -@height: the height of the image in pixels. -@Returns: a new #GdkImage, or NULL if the image could not be created. - - - - -Specifies the type of a #GdkImage. - - -@GDK_IMAGE_NORMAL: The original X image type, which is quite slow since the -image has to be transferred from the client to the server to display it. -@GDK_IMAGE_SHARED: A faster image type, which uses shared memory to transfer -the image data between client and server. However this will only be available -if client and server are on the same machine and the shared memory extension -is supported by the server. -@GDK_IMAGE_FASTEST: Specifies that %GDK_IMAGE_SHARED should be tried first, -and if that fails then %GDK_IMAGE_NORMAL will be used. - - - -Creates a new #GdkImage with a depth of 1 from the given data. - - -@visual: the #GdkVisual to use for the image. -@data: the pixel data. -@width: the width of the image in pixels. -@height: the height of the image in pixels. -@Returns: a new #GdkImage. - - - - -Gets part of a #GdkWindow and stores it in a new #GdkImage. - - -@window: the #GdkWindow to copy from. -@x: the left edge of the rectangle to copy from @window. -@y: the top edge of the rectangle to copy from @window. -@width: the width of the area to copy, in pixels. -@height: the height of the area to copy, in pixels. -@Returns: a new #GdkImage with a copy of the given area of @window. - - - - -Destroys a #GdkImage, freeing any resources allocated for it. - - -@image: a #GdkImage. - - - - -Sets a pixel in a #GdkImage to a given pixel value. - - -@image: a #GdkImage. -@x: the x coordinate of the pixel to set. -@y: the y coordinate of the pixel to set. -@pixel: the pixel value to set. - - - - -Gets a pixel value at a specified position in a #GdkImage. - - -@image: a #GdkImage. -@x: the x coordinate of the pixel to get. -@y: the y coordinate of the pixel to get. -@Returns: the pixel value at the given position. - - diff --git a/docs/reference/gdk/tmpl/input.sgml b/docs/reference/gdk/tmpl/input.sgml deleted file mode 100644 index 057b1c1c54..0000000000 --- a/docs/reference/gdk/tmpl/input.sgml +++ /dev/null @@ -1,130 +0,0 @@ - -Input - - -Callbacks on file descriptors. - - - -The functions in this section are used to establish -callbacks when some condition becomes true for -a file descriptor. They are currently just wrappers around -the IO Channel -facility. - - - - - - - -GLib Main Loop -The main loop in which input callbacks run. - - - -IO Channels -A newer and more flexible way of doing IO -callbacks. - - - - - - - -Establish a callback when a condition becomes true on -a file descriptor. - - -@source: a file descriptor. -@condition: the condition. -@function: the callback function. -@data: callback data passed to @function. -@destroy: callback function to call with @data when the input - handler is removed. -@Returns: a tag that can later be used as an argument to - gdk_input_remove(). - - - - -A set of bit flags used to specify conditions for which -an input callback will be triggered. The three members -of this enumeration correspond to the @readfds, -@writefds, and @exceptfds arguments to the -select system call. - - - - - - -GDK_INPUT_READ -the file descriptor has become available for reading. -(Or, as is standard in Unix, a socket or pipe was closed -at the other end; this is the case if a subsequent read -on the file descriptor returns a count of zero.) - - - -GDK_INPUT_WRITE -the file descriptor has become available for writing. - - - -GDK_INPUT_EXCEPTION -an exception was raised on the file descriptor. - - - - - -@GDK_INPUT_READ: -@GDK_INPUT_WRITE: -@GDK_INPUT_EXCEPTION: - - - -A callback function that will be called when some condition -occurs. - - -@data: the user data passed to gdk_input_add() or gdk_input_add_full(). -@source: the source where the condition occurred. -@condition: the triggering condition. - - - - -A callback function called when a piece of user data is -no longer being stored by GDK. Will typically free the -structure or object that @data points to. - - -@data: the user data. - - - - -Establish a callback when a condition becomes true on -a file descriptor. - - -@source: a file descriptor. -@condition: the condition. -@function: the callback function. -@data: callback data passed to @function. -@Returns: a tag that can later be used as an argument to - gdk_input_remove(). - - - - -Remove a callback added with gdk_input_add() or -gdk_input_add_full(). - - -@tag: the tag returned when the callback was set up. - - diff --git a/docs/reference/gdk/tmpl/input_contexts.sgml b/docs/reference/gdk/tmpl/input_contexts.sgml deleted file mode 100644 index b655f10bb4..0000000000 --- a/docs/reference/gdk/tmpl/input_contexts.sgml +++ /dev/null @@ -1,243 +0,0 @@ - -Input Contexts - - -internationalized text input properties. - - - -A #GdkIC input context is used for each user interface element which supports -internationalized text input. See the -Input Methods section for an overview -of how internationalized text input works in GTK+. - - - - - - - - - -The #GdkIC struct is an opaque structure representing an input context -for use with the global Input Method. - - - - - -Creates a new #GdkIC using the given attributes. - - -@attr: a #GdkICAttr struct containing attributes to use for the input context. -@mask: a #GdkICAttributesType mask specifying which of the attributes in @attr -are set. -@Returns: a new #GdkIC. - - - - -Destroys the input context. - - -@ic: a #GdkIC. - - - - -Returns the mask of events that the input method needs to function properly. -This is typically called in a widget's realize method after creating the -#GdkIC. The returned event mask is then combined with the widget's -own event mask and applied using gdk_window_set_events(). - - -@ic: a #GdkIC. -@Returns: the mask of events that the input method needs to function -properly. - - - - -Returns the pre-edit and status style of the #GdkIC. - - -@ic: a #GdkIC. -@Returns: the pre-edit and status style of the #GdkIC. - - - - -Gets attributes of a #GdkIC. - - -@ic: a #GdkIC. -@attr: a #GdkICAttr struct to contain the returned attributes. -@mask: a #GdkICAttributesType mask specifying which attributes to get. -@Returns: a #GdkICAttributesType mask specifying which of the attributes -were not retrieved succesfully. - - - - -Sets attributes of the #GdkIC. - - -Note that the GDK_IC_STYLE and GDK_IC_CLIENT_WINDOW attributes can only be set -when creating the #GdkIC, and the GDK_IC_FILTER_EVENTS attribute is read-only. - - -@ic: a #GdkIC. -@attr: a #GdkICAttr struct containing attributes to use for the input context. -@mask: a #GdkICAttributesType mask specifying which of the attributes in @attr -are set. -@Returns: a #GdkICAttributesType mask indicating which of the attributes -were not set successfully. - - - - -The #GdkICAttr struct is used when getting and setting attributes of the -input context. It is used together with a #GdkICAttributesType mask which -specifies which of the fields are being set or returned. - - -@style: the pre-edit and status style. This attribute is required when -creating the #GdkIC, and cannot be changed. -@client_window: the #GdkWindow in which the input method will display its -pre-edit and status areas or create subwindows. -The preedit_area and status_area attributes are specified relative to this -window. This attribute is required when creating the #GdkIC, and cannot be -changed. -@focus_window: the #GdkWindow which is to be used when editing text. -gdk_im_begin() sets this attribute before starting the text input process, -so it is normally not necessary to set it elsewhere. -@filter_events: the mask of events that the input method requires. -See the gdk_ic_get_events() function. This attribute is read-only and is -never changed. -@spot_location: the position of the insertion cursor, for use with the -%GDK_IM_PREEDIT_POSITION style. The y coordinate specifies the baseline of -the text. -@line_spacing: the line spacing to be used in the pre-edit and status areas -when displaying multi-line text. -@cursor: the cursor to use in the input method's windows. -If this attribute isn't set it is determined by the input method. -@preedit_fontset: the font to use for the pre-edit area. -If this attribute isn't set it is determined by the input method. -@preedit_area: the area in which the input method will display pre-editing -data, used for the %GDK_IM_PREEDIT_POSITION and %GDK_IM_PREEDIT_AREA styles. -@preedit_area_needed: the area that the input method requests for displaying -pre-editing data, used for the %GDK_IM_PREEDIT_POSITION and -%GDK_IM_PREEDIT_AREA styles. -@preedit_foreground: the foreground color to use for the pre-edit area. -This color must already be allocated in the preedit_colormap. -If this attribute isn't set it is determined by the input method. -@preedit_background: the background color to use for the pre-edit area. -This color must already be allocated in the preedit_colormap. -If this attribute isn't set it is determined by the input method. -@preedit_pixmap: the background pixmap to use for the pre-edit area. -If this attribute isn't set it is determined by the input method. -@preedit_colormap: the colormap the input method should use to allocate colors. -The default value is the colormap of client_window. -@status_fontset: the font to use for the status area. -If this attribute isn't set it is determined by the input method. -@status_area: the are that the input method will display status information in. -This is used for the %GDK_IM_STATUS_AREA style. -@status_area_needed: the size that the input method requests for displaying -status information, for the %GDK_IM_STATUS_AREA style. -@status_foreground: the foreground color to use for the status area. -This color must already be allocated in the status_colormap. -If this attribute isn't set it is determined by the input method. -@status_background: the background color to use for the status area. -This color must already be allocated in the status_colormap. -If this attribute isn't set it is determined by the input method. -@status_pixmap: the background pixmap to use for the status area. -If this attribute isn't set it is determined by the input method. -@status_colormap: the colormap the input method should use to allocate colors. -The default value is the colormap of client_window. - - - -The #GdkICAttributesType contains a set of bit-flags which are used to -specify which of the attributes in a #GdkICAttr are being set or returned. - - -It also contains several combinations of the flags which specify required -attributes for the various styles: - - -%GDK_IC_ALL_REQ: - -the set of attributes required for all styles. - - - - -%GDK_IC_PREEDIT_AREA_REQ: - -the set of additional attributes required for the -%GDK_IM_PREEDIT_AREA pre-edit style. - - - - -%GDK_IC_PREEDIT_POSITION_REQ: - -the set of additional attributes required for the -%GDK_IM_PREEDIT_POSITION pre-edit style. - - - - -%GDK_IC_STATUS_AREA_REQ: - -the set of additional attributes required for the -%GDK_IM_STATUS_AREA status style. - - - - - -@GDK_IC_STYLE: -@GDK_IC_CLIENT_WINDOW: -@GDK_IC_FOCUS_WINDOW: -@GDK_IC_FILTER_EVENTS: -@GDK_IC_SPOT_LOCATION: -@GDK_IC_LINE_SPACING: -@GDK_IC_CURSOR: -@GDK_IC_PREEDIT_FONTSET: -@GDK_IC_PREEDIT_AREA: -@GDK_IC_PREEDIT_AREA_NEEDED: -@GDK_IC_PREEDIT_FOREGROUND: -@GDK_IC_PREEDIT_BACKGROUND: -@GDK_IC_PREEDIT_PIXMAP: -@GDK_IC_PREEDIT_COLORMAP: -@GDK_IC_STATUS_FONTSET: -@GDK_IC_STATUS_AREA: -@GDK_IC_STATUS_AREA_NEEDED: -@GDK_IC_STATUS_FOREGROUND: -@GDK_IC_STATUS_BACKGROUND: -@GDK_IC_STATUS_PIXMAP: -@GDK_IC_STATUS_COLORMAP: -@GDK_IC_ALL_REQ: -@GDK_IC_PREEDIT_AREA_REQ: -@GDK_IC_PREEDIT_POSITION_REQ: -@GDK_IC_STATUS_AREA_REQ: - - - -Creates a new #GdkICAttr struct, with all fields set to 0. -The #GdkICAttr struct should be freed with gdk_ic_attr_destroy() when no -longer needed. - - -@Returns: a new #GdkICAttr struct. - - - - -Destroys the given #GdkICAttr struct, freeing the allocated memory. - - -@attr: a #GdkICAttr struct. - - diff --git a/docs/reference/gdk/tmpl/input_devices.sgml b/docs/reference/gdk/tmpl/input_devices.sgml deleted file mode 100644 index 325b2d5a53..0000000000 --- a/docs/reference/gdk/tmpl/input_devices.sgml +++ /dev/null @@ -1,301 +0,0 @@ - -Input Devices - - -Functions for handling extended input devices. - - - -In addition to the normal keyboard and mouse input devices, GTK+ also -contains support for extended input devices. In -particular, this support is targeted at graphics tablets. Graphics -tablets typically return sub-pixel positioning information and possibly -information about the pressure and tilt of the stylus. Under -X, the support for extended devices is done through the -XInput extension. - - -Because handling extended input devices may involve considerable -overhead, they need to be turned on for each #GdkWindow -individually using gdk_input_set_extension_events(). -(Or, more typically, for GtkWidgets, using gtk_widget_set_extension_events()). -As an additional complication, depending on the support from -the windowing system, its possible that a normal mouse -cursor will not be displayed for a particular extension -device. If an application does not want to deal with displaying -a cursor itself, it can ask only to get extension events -from devices that will display a cursor, by passing the -%GDK_EXTENSION_EVENTS_CURSOR value to -gdk_input_set_extension_events(). Otherwise, the application -must retrieve the device information using gdk_input_list_devices(), -check the has_cursor field, and, -if it is %FALSE, draw a cursor itself when it receives -motion events. - - -Each pointing device is assigned a unique integer ID; events from a -particular device can be identified by the -deviceid field in the event structure. The -events generated by pointer devices have also been extended to contain -pressure, xtilt -and ytilt fields which contain the extended -information reported as additional valuators -from the device. The pressure field is a -a double value ranging from 0.0 to 1.0, while the tilt fields are -double values ranging from -1.0 to 1.0. (With -1.0 representing the -maximum title to the left or up, and 1.0 representing the maximum -tilt to the right or down.) - - -One additional field in each event is the -source field, which contains an -enumeration value describing the type of device; this currently -can be one of -%GDK_SOURCE_MOUSE, - %GDK_SOURCE_PEN, -%GDK_SOURCE_ERASER, -or %GDK_SOURCE_CURSOR. This field is present to allow simple -applications to (for instance) delete when they detect eraser -devices without having to keep track of complicated per-device -settings. - - -Various aspects of each device may be configured. The easiest way of -creating a GUI to allow the user to conifigure such a device -is to use to use the #GtkInputDialog widget in GTK+. -However, even when using this widget, application writers -will need to directly query and set the configuration parameters -in order to save the state between invocations of the application. -The configuration of devices is queried using gdk_input_list_devices. -Each device must is activated using gdk_input_set_mode(), which -also controls whether the device's range is mapped to the -entire screen or to a single window. The mapping of the valuators of -the device onto the predefined valuator types is set using -gdk_input_set_axes. And the source type for each device -can be set with gdk_input_set_source(). - - -Devices may also have associated keys -or macro buttons. Such keys can be globally set to map -into normal X keyboard events. The mapping is set using -gdk_input_set_key(). - - -The interfaces in this section will most likely be considerably -modified in the future to accomodate devices that may have different -sets of additional valuators than the pressure xtilt and ytilt. - - - - - - - - - -This macro contains an integer value representing -the device ID for the core pointer device. - - - - - - -Lists all available input devices, along with their -configuration information. - - -@Returns: A #GList of #GdkDeviceInfo structures. This list - is internal data of GTK+ and should not be modified - or freed. - - - - -The #GdkDeviceInfo structure contains information about a -device. It has the following fields: - - -@deviceid: a unique integer ID for this device. -@name: the human-readable name for the device. -@source: the type of device. -@mode: a value indicating whether the device is enabled and - how the device coordinates map to the screen. -@has_cursor: if %TRUE, a cursor will be displayed indicating - the current on-screen location to the user. Otherwise, - the application is responsible for drawing a cursor - itself. -@num_axes: the number of axes for this device. -@axes: a pointer to an array of GdkAxisUse values which - give the mapping of axes onto the possible valuators - for a GDK device. -@num_keys: the number of macro buttons. -@keys: a pointer to an array of #GdkDeviceKey structures - which describe what key press events are generated - for each macro button. - - - -The #GdkDeviceKey structure contains information -about the mapping of one device macro button onto -a normal X key event. It has the following fields: - - -@keyval: the keyval to generate when the macro button is pressed. - If this is 0, no keypress will be generated. -@modifiers: the modifiers set for the generated key event. - - - -Turns extension events on or off for a particular window, -and specifies the event mask for extension events. - - -@window: a #GdkWindow. -@mask: the event mask -@mode: the type of extension events that are desired. - - - - -An enumeration used to specify which extension events -are desired for a particular widget. - - -@GDK_EXTENSION_EVENTS_NONE: no extension events are desired. -@GDK_EXTENSION_EVENTS_ALL: all extension events are desired. -@GDK_EXTENSION_EVENTS_CURSOR: extension events are desired only if a cursor - will be displayed for the device. - - - -Sets the source type for a device. - - -@deviceid: the device to configure -@source: the new source type. - - - - -An enumeration describing the type of an input device -in general terms. - - -@GDK_SOURCE_MOUSE: the device is a mouse. (This will be reported for the core - pointer, even if it is something else, such as a trackball.) -@GDK_SOURCE_PEN: the device is a stylus of a graphics tablet or similar device. -@GDK_SOURCE_ERASER: the device is an eraser. Typically, this would be the other end - of a stylus on a graphics tablet. -@GDK_SOURCE_CURSOR: the device is a graphics tablet "puck" or similar device. - - - -Enables or disables a device, and determines how the -device maps onto the screen. - - -@deviceid: the device to configure. -@mode: the new mode. -@Returns: %TRUE if the device supports the given mode, otherwise - %FALSE and the device's mode is unchanged. - - - - -An enumeration that describes the mode of an input device. - - -@GDK_MODE_DISABLED: the device is disabled and will not report any events. -@GDK_MODE_SCREEN: the device is enabled. The device's coordinate space - maps to the entire screen. -@GDK_MODE_WINDOW: the device is enabled. The device's coordinate space - is mapped to a single window. The manner in which this window - is chosen is undefined, but it will typically be the same - way in which the focus window for key events is determined. - - - -Sets the mapping of the axes (valuators) of a device -onto the predefined valuator types that GTK+ understands. - - -@deviceid: the device to configure. -@axes: an array of GdkAxisUse. This length of this array - must match the number of axes for the device. - - - - -An enumeration describing the way in which a device -axis (valuator) maps onto the predefined valuator -types that GTK+ understands. - - -@GDK_AXIS_IGNORE: the axis is ignored. -@GDK_AXIS_X: the axis is used as the x axis. -@GDK_AXIS_Y: the axis is used as the y axis. -@GDK_AXIS_PRESSURE: the axis is used for pressure information. -@GDK_AXIS_XTILT: the axis is used for x tilt information. -@GDK_AXIS_YTILT: the axis is used for x tilt information. -@GDK_AXIS_LAST: a constant equal to the numerically highest axis value. - - - -Sets the key event generated when a macro button is pressed. - - -@deviceid: the device to configure. -@index: the index of the macro button. -@keyval: the key value for the #GdkKeypressEvent to generate. - (a value of 0 means no event will be generated.) -@modifiers: the modifier field for the generated - #GdkKeyPressEvent. - - - - -Returns information about the current position of the pointer -within a window, including extended device information. -Any of the return parameters may be %NULL, in which case, -they will be ignored. - - -@window: a #GdkWindow. -@deviceid: a device ID. -@x: location to store current x postion. -@y: location to store current y postion. -@pressure: location to store current pressure. -@xtilt: location to store current tilt in the x direction. -@ytilt: location to store current tilt in the y direction. -@mask: location to store the current modifier state. - - - - -Retrieves the motion history for a given device/window pair. - - -@window: a #GdkWindow. -@deviceid: the device for which to retrieve motion history. -@start: the start time. -@stop: the stop time. -@nevents_return: location to store the number of events returned. -@Returns: a newly allocated array containing all the events - from @start to @stop. This array should be freed - with g_free() when you are finished using it. - - - - -The #GdkTimeCoord structure stores a single event in a -motion history. It contains the following fields: - - -@time: The timestamp for this event. -@x: the x position. -@y: the y position. -@pressure: the pressure. -@xtilt: the tilt in the x direction. -@ytilt: the tilt in the y direction. - diff --git a/docs/reference/gdk/tmpl/input_methods.sgml b/docs/reference/gdk/tmpl/input_methods.sgml deleted file mode 100644 index 4ba54c8bd3..0000000000 --- a/docs/reference/gdk/tmpl/input_methods.sgml +++ /dev/null @@ -1,213 +0,0 @@ - -Input Methods - - -support for internationalized text input. - - - -Input Methods provide a way for complex character sets to be used in GTK+. -Languages such as Chinese, Japanese, and Korean (often abbreviated to CJK) -use a large number of ideographs, making it impossible to support all -characters with a simple keyboard. Instead, text is usually -pre-edited using a phonetic alphabet and then -composed to form the ideographs. - - -GTK+ makes use of the input method mechanism provided by the X Windows -platform. When a GTK+ application is started, it opens a connection to the -input method appropriate for the current locale (if any). - - -Widgets which handle textual input, such as #GtkEntry, need to do a number of -things to support internationalized text input: - - -When the widget is realized: -Check if an input method is being used with gdk_im_ready(). -If it is, create a new Input Context -using gdk_ic_new(). Find out which events the -Input Context needs to receive -with gdk_ic_get_events(), and make sure that the widget's window receives -these events using gdk_window_set_events(). - - - - -When the widget's size, state or cursor position changes: - -Update the appropriate -Input Context attributes -using gdk_ic_set_attr(). - - - - -When the keyboard focus enters or leaves the widget: - -Call gdk_im_begin() or gdk_im_end() to start or finish editing the text. - - - - -When the widget receives a key_press event: - -The string and length -fields of the #GdkEventKey struct should be used to insert the composed text -into the widget. - - - - -When the widget is unrealized: - -Destroy the Input Context. - - - - - - -See the XLib reference manual for more detailed information on input methods, -and the #GtkEntry and #GtkText widgets for some example code. - - - - - - -Input Contexts - -Used for each widget that handles internationalized text input using the -global input method. - - - - - - - - -A set of bit-flags used to specify the input method styles which are supported -or which are currently in use. The flags can be divided into 2 groups, the -pre-edit flags and the status flags. - - -The pre-edit flags specify how pre-editing data is displayed. -For example, this could display the text being typed in in the phonetic -alphabet before it is composed and inserted as an ideograph. - - -The status flags specify how status information is displayed. -The status information can be thought of as an extension of the -standard keyboard mode indicators, such as the Caps Lock indicator. - - - -The %GDK_IM_PREEDIT_CALLBACKS and %GDK_IM_STATUS_CALLBACKS styles are not -currently supported in GTK+. - - - -@GDK_IM_PREEDIT_AREA: The application provides the input method with an area -in which to perform off-the-spot pre-editing. -@GDK_IM_PREEDIT_CALLBACKS: The application registers a number of callback -functions which are used to display pre-editing data. -@GDK_IM_PREEDIT_POSITION: The application provides the input method with the -position of the insertion cursor, for over-the-spot -pre-editing. The input method creates its own window over the widget to -display the pre-editing data. -@GDK_IM_PREEDIT_NOTHING: The input method uses the root X window to perform -pre-editing, so the application does not need to do anything. -@GDK_IM_PREEDIT_NONE: No pre-editing is done by the input method, or no -pre-editing data needs to be displayed. -@GDK_IM_PREEDIT_MASK: A bit-mask containing all the pre-edit flags. -@GDK_IM_STATUS_AREA: The application provides the input method with an area -in which to display status information. -@GDK_IM_STATUS_CALLBACKS: The applications registers a number of callback -functions which are used to display status information. -@GDK_IM_STATUS_NOTHING: The input method uses the root X window to display -status information, so the application does not need to do anything. -@GDK_IM_STATUS_NONE: The input method does not display status information. -@GDK_IM_STATUS_MASK: A bit-mask containing all the status flags. - - - -Checks if an input method is to be used for the current locale. -If GTK+ has been compiled without support for input methods, or the current -locale doesn't need an input method, then this will return FALSE. - - -@Returns: TRUE if an input method is available and should be used. - - - - -Decides which input method style should be used, by comparing the styles given -in @supported_style with those of the available input method. - - -@supported_style: styles which are supported by the widget. -@Returns: the best style in @supported_style that is also supported by the -available input method. - - - - -Sets the best pre-edit and/or status style which should be used. -This will affect the style chosen in gdk_im_decide_style(). - - -The order of the pre-edit styles is (from worst to best): -%GDK_IM_PREEDIT_NONE, %GDK_IM_PREEDIT_NOTHING, %GDK_IM_PREEDIT_AREA, -%GDK_IM_PREEDIT_POSITION, %GDK_IM_PREEDIT_CALLBACKS. -The order of the status styles is: -%GDK_IM_STATUS_NONE, %GDK_IM_STATUS_NOTHING, %GDK_IM_STATUS_AREA, -%GDK_IM_STATUS_CALLBACKS. - - -So, for example, to set the best allowed pre-edit style to %GDK_IM_PREEDIT_AREA -you would do this: - - - - gdk_im_set_best_style (GDK_IM_PREEDIT_AREA); - - - -Or to set the best allowed pre-edit style to %GDK_IM_PREEDIT_POSITION and the -best allowed status style to %GDK_IM_STATUS_NOTHING you can do this: - - - - gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION | GDK_IM_STATUS_NOTHING); - - - - -@best_allowed_style: a bit-mask with the best pre-edit style and/or the best -status style to use. If 0 is used, then the current bit-mask of all allowed -styles is returned. -@Returns: a bit-mask of all the styles allowed. - - - - -Starts editing, using the given input context and #GdkWindow. -This should be called when the widget receives the input focus, typically in -the widget's focus_in_event method. - - -@ic: a #GdkInputContext. -@window: the #GdkWindow which will be receiving the key press events. - - - - -Stops editing using the input method. -This should be called when the widget loses the input focus, typically in -the widget's focus_out_event method. - - - - diff --git a/docs/reference/gdk/tmpl/keys.sgml b/docs/reference/gdk/tmpl/keys.sgml deleted file mode 100644 index e014c6e10f..0000000000 --- a/docs/reference/gdk/tmpl/keys.sgml +++ /dev/null @@ -1,93 +0,0 @@ - -Key Values - - -functions for manipulating keyboard codes. - - - -Key values are the codes which are sent whenever a key is pressed or released. -They appear in the keyval field of the -#GdkEventKey structure, which is passed to signal handlers for the -"key-press-event" and "key-release-event" signals. -The complete list of key values can be found in the <gdk/gdkkeysyms.h> -header file. - - -Key values can be converted into a string representation using -gdk_keyval_name(). The reverse function, converting a string to a key value, -is provided by gdk_keyval_from_name(). - - -The case of key values can be determined using gdk_keyval_is_upper() and -gdk_keyval_is_lower(). Key values can be converted to upper or lower case -using gdk_keyval_to_upper() and gdk_keyval_to_lower(). - - - - - - - - - -Converts a key value into a symbolic name. -The names are the same as those in the <gdk/gdkkeysyms.h> header file -but without the leading "GDK_". - - -@keyval: a key value. -@Returns: a string containing the name of the key, or NULL if @keyval is not -a valid key. The string should not be modified. - - - - -Converts a key name to a key value. - - -@keyval_name: a key name. -@Returns: the corresponding key value, or %GDK_VoidSymbol if the key name is -not a valid key. - - - - -Returns TRUE if the given key value is in upper case. - - -@keyval: a key value. -@Returns: TRUE if @keyval is in upper case, or if @keyval is not subject to -case conversion. - - - - -Returns TRUE if the given key value is in lower case. - - -@keyval: a key value. -@Returns: TRUE if @keyval is in lower case, or if @keyval is not subject to -case conversion. - - - - -Converts a key value to upper case, if applicable. - - -@keyval: a key value. -@Returns: the upper case form of @keyval, or @keyval itself if it is already -in upper case or it is not subject to case conversion. - - - - -Converts a key value to lower case, if applicable. - - -@keyval: a key value. -@Returns: the lower case form of @keyval, or @keyval itself if it is already -in lower case or it is not subject to case conversion. - - diff --git a/docs/reference/gdk/tmpl/pixmaps.sgml b/docs/reference/gdk/tmpl/pixmaps.sgml deleted file mode 100644 index ea7de9ebdc..0000000000 --- a/docs/reference/gdk/tmpl/pixmaps.sgml +++ /dev/null @@ -1,196 +0,0 @@ - -Bitmaps and Pixmaps - - -Offscreen drawables. - - - -Pixmaps are offscreen drawables. They can be drawn upon with the -standard drawing primitives, then copied to another drawable (such as -a #GdkWindow) with gdk_pixmap_draw(). The depth of a pixmap -is the number of bits per pixels. Bitmaps are simply pixmaps -with a depth of 1. (That is, they are monochrome bitmaps - each -pixel can be either on or off). - - - - - - - - -An opaque structure representing an offscreen drawable. -Pointers to structures of type #GdkPixmap, #GdkBitmap, -and #GdkWindow, can often be used interchangeably. -The type #GdkDrawable refers generically to any of -these types. - - -@user_data: - - - -Create a new pixmap with a given size and depth. - - -@window: a #GdkWindow, used to determine default values for the - new pixmap. Can be %NULL if @depth is specified, -@width: The width of the new pixmap in pixels. -@height: The height of the new pixmap in pixels. -@depth: The depth (number of bits per pixel) of the new pixmap. - If -1, and @window is not %NULL, the depth of the new - pixmap will be equal to that of @window. -@Returns: the #GdkBitmap - - - - -Creates a new bitmap from data in XBM format. - - -@window: a #GdkWindow, used to determine default values for the - new pixmap. Can be %NULL, in which case the root window is - used. -@data: a pointer to the XBM data. -@width: the width of the new pixmap in pixels. -@height: the height of the new pixmap in pixels. -@Returns: the #GdkBitmap - - - - -Create a two-color pixmap from data in XBM data. - - -@window: a #GdkWindow, used to determine default values for the - new pixmap. Can be %NULL, if the depth is given. -@data: a pointer to the data. -@width: the width of the new pixmap in pixels. -@height: the height of the new pixmap in pixels. -@depth: the depth (number of bits per pixel) of the new pixmap. -@fg: the foreground color. -@bg: the background color. -@Returns: the #GdkPixmap - - - - -Create a pixmap from a XPM file. - - -@window: a #GdkWindow, used to determine default values for the - new pixmap. -@mask: a pointer to a place to store a bitmap representing -the transparency mask of the XPM file. Can be %NULL, -in which case transparency will be ignored. -@transparent_color: the color to be used for the pixels -that are transparent in the input file. Can be %NULL, -in which case a default color will be used. -@filename: the filename of a file containing XPM data. -@Returns: the #GdkPixmap - - - - -Create a pixmap from a XPM file using a particular colormap. - - -@window: a #GdkWindow, used to determine default values for the - new pixmap. Can be %NULL if @colormap is given. -@colormap: the #GdkColormap that the new pixmap will be use. - If omitted, the colormap for @window will be used. -@mask: a pointer to a place to store a bitmap representing -the transparency mask of the XPM file. Can be %NULL, -in which case transparency will be ignored. -@transparent_color: the color to be used for the pixels -that are transparent in the input file. Can be %NULL, -in which case a default color will be used. -@filename: the filename of a file containing XPM data. -@Returns: the #GdkPixmap. - - - - -Create a pixmap from data in XPM format. - - -@window: a #GdkWindow, used to determine default values for the - new pixmap. -@mask: Pointer to a place to store a bitmap representing -the transparency mask of the XPM file. Can be %NULL, -in which case transparency will be ignored. -@transparent_color: This color will be used for the pixels -that are transparent in the input file. Can be %NULL -in which case a default color will be used. -@data: Pointer to a string containing the XPM data. -@Returns: the #GdkPixmap - - - - -Create a pixmap from data in XPM format using a particular -colormap. - - -@window: a #GdkWindow, used to determine default values for the - new pixmap. Can be %NULL if @colormap is given. -@colormap: the #GdkColormap that the new pixmap will be use. - If omitted, the colormap for @window will be used. -@mask: a pointer to a place to store a bitmap representing -the transparency mask of the XPM file. Can be %NULL, -in which case transparency will be ignored. -@transparent_color: the color to be used for the pixels -that are transparent in the input file. Can be %NULL, -in which case a default color will be used. -@data: Pointer to a string containing the XPM data. -@Returns: the #GdkPixmap. - - - - -Increase the reference count of a pixmap. - - -@pixmap: a #GdkPixmap -@Returns: @pixmap - - - - -Decrease the reference count of a pixmap. If the resulting -reference count is zero, destroy the pixmap. - - -@pixmap: a #GdkPixmap - - - - -An opaque structure representing an offscreen drawable of depth -1. Pointers to structures of type GdkPixmap, #GdkBitmap, and -#GdkWindow, can often be used interchangeably. The type #GdkDrawable -refers generically to any of these types. - - -@user_data: - - - -Increase the reference count of a bitmap. An alias -for gdk_pixmap_ref(). - - -@pixmap: -@Returns: - - - - -Decrease the reference count of a bitmap. An alias -for gdk_pixmap_unref(). - - -@pixmap: - - diff --git a/docs/reference/gdk/tmpl/properties.sgml b/docs/reference/gdk/tmpl/properties.sgml deleted file mode 100644 index d792214a1c..0000000000 --- a/docs/reference/gdk/tmpl/properties.sgml +++ /dev/null @@ -1,225 +0,0 @@ - -Properties and Atoms - - -functions to manipulate properties on windows. - - - -Each window under X can have any number of associated -properties attached to it. -Properties are arbitrary chunks of data identified by -atoms. (An atom -is a numeric index into a string table on the X server. They are used -to transfer strings efficiently between clients without -having to transfer the entire string.) A property -has an associated type, which is also identified -using an atom. - - -A property has an associated format, -an integer describing how many bits are in each unit -of data inside the property. It must be 8, 16, or 32. -When data is transfered between the server and client, -if they are of different endianesses it will be byteswapped -as necessary according to the format of the property. -Note that on the client side, properties of format 32 -will be stored with one unit per long, -even if a long integer has more than 32 bits on the platform. -(This decision was apparently made for Xlib to maintain -compatibility with programs that assumed longs were 32 -bits, at the expense of programs that knew better.) - - -The functions in this section are used to add, remove -and change properties on windows, to convert atoms -to and from strings and to manipulate some types of -data commonly stored in X window properties. - - - - - - - - - -A numeric type representing a string as an index into a table -of strings on the X server. - - - - - - - - - - - - -Convert a text string from the encoding as it is stored in -a property into an array of strings in the encoding of -the current local. (The elements of the array represent -the null-separated elements of the original text string.) - - -@encoding: an atom representing the encoding. The most common - values for this are STRING, - or COMPOUND_TEXT. This is - value used as the type for the property. -@format: the format of the property. -@text: the text data. -@length: the length of the property, in item.s -@list: location to store a terminated array of strings - in the encoding of the current locale. This - array should be freed using gdk_free_text_list(). -@Returns: the number of strings stored in @list, or 0, - if the conversion failed. - - - - -Free the array of strings created by -gdk_text_property_to_text_list(). - - -@list: the value stored in the @list parameter by - a call to gdk_text_property_to_text_list(). - - - - -Convert a string from the encoding of the current locale -into a form suitable for storing in a window property. - - -@str: a null-terminated string. -@encoding: location to store the encoding atom (to be used as the type for the property). -@format: location to store the format for the property. -@ctext: location to store newly allocated data for the property. -@length: location to store the length of @ctext in items. -@Returns: 0 upon sucess, non-zero upon failure. - - - - -Free the data returned from gdk_string_to_compound_text(). - - -@ctext: The pointer stored in @ctext from a call to gdk_string_to_compound_text(). - - - - -Find or create an atom corresponding to a given string. - - -@atom_name: a string. -@only_if_exists: if %TRUE, do not create a new atom, but - just return the atom if it already exists. -@Returns: the atom corresponding to @atom_name, or, if - @only_if_exists is false, and an atom does not - already exists for the string, %GDK_NONE. - - - - -Determine the string corresponding to an atom. - - -@atom: a #GdkAtom. -@Returns: a newly allocated string containing the string - corresponding to @atom. When you are done - with the return value, you should free it - using g_free(). - - - - -Retrieves a portion of the contents of a property. If the -property does not exist, then the function returns FALSE, -and %GDK_NONE will be stored in @actual_property_type. - -Note: the XGetWindowProperty() -function that gdk_property_get() -uses has a very confusing and complicated set of semantics. -Unfortunately, gdk_property_get() makes the situation -worse instead of better (the semantics should be considered -undefined), and also prints warnings to stderr in cases where it -should return a useful error to the program. You are advised to use -XGetWindowProperty() -directly until a replacement function for gdk_property_get() -is provided. - - -@window: a #GdkWindow. -@property: the property to retrieve. -@type: the desired property type, or 0, if any type of data - is acceptable. If this does not match the actual - type, then @actual_format and @actual_length will - be filled in, a warning will be printed to stderr - and no data will be returned. -@offset: the offset into the property at which to begin - retrieving data. (in 4 byte units!) -@length: the length of the data to delete. (in bytes, but - the actual retrieved length will be the next - integer multiple multiple of four greater than - this!) -@pdelete: if %TRUE, delete the property after retrieving the - data. -@actual_property_type: location to store the actual type of - the property. -@actual_format: location to store the actual format of the data. -@actual_length: location to store the length of the retrieved - data, in bytes. -@data: location to store a pointer to the data. The retrieved - data should be freed with g_free() when you are finished - using it. -@Returns: %TRUE if data was sucessfully received and stored - in @data, otherwise %FALSE. - - - - -Change the contents of a property on a window. - - -@window: a #GdkWindow. -@property: the property to change. -@type: the new type for the property. If @mode is - %GDK_PROP_MODE_REPLACE or %GDK_PROP_MODE_APPEND, then this - must match the existing type or an error will occur. -@format: the new format for the property. If @mode is - %GDK_PROP_MODE_REPLACE or %GDK_PROP_MODE_APPEND, then this - must match the existing format or an error will occur. -@mode: a value describing how the new data is to be combined - with the current data. -@data: the data - (a guchar * - gushort *, or - gulong *, depending on @format), cast to a - guchar *. -@nelements: the number of elements of size determined by the format, - contained in @data. - - - - -Describes how existing data is combined with new data when -using gdk_property_change(). - - -@GDK_PROP_MODE_REPLACE: the new data replaces the existing data. -@GDK_PROP_MODE_PREPEND: the new data is prepended to the existing data. -@GDK_PROP_MODE_APPEND: the new data is appended to the existing data. - - - -Delete a property from a window. - - -@window: a #GdkWindow. -@property: the property to delete. - - diff --git a/docs/reference/gdk/tmpl/regions.sgml b/docs/reference/gdk/tmpl/regions.sgml deleted file mode 100644 index 32087e1d66..0000000000 --- a/docs/reference/gdk/tmpl/regions.sgml +++ /dev/null @@ -1,259 +0,0 @@ - -Points, Rectangles and Regions - - -simple graphical data types. - - - -GDK provides the #GdkPoint, #GdkRectangle and #GdkRegion data types for -representing pixels and sets of pixels on the screen. - - -#GdkPoint is a simple structure containing an x and y coordinate of a point. - - -#GdkRectangle is a structure holding the position and size of a rectangle. -The intersection of two rectangles can be computed with -gdk_rectangle_intersect(). To find the union of two rectangles use -gdk_rectangle_union(). - - -#GdkRegion is an opaque data type holding a set of arbitrary pixels, and is -usually used for clipping graphical operations (see gdk_gc_set_clip_region()). - - - - - - - - - -Defines the x and y coordinates of a point. -Note that both are defined as #gint16 values, so the coordinates are limited -to between -32,768 and 32,767. - - -@x: the x coordinate of the point. -@y: the y coordinate of the point. - - - -Defines the position and size of a rectangle. - - -@x: the x coordinate of the left edge of the rectangle. -@y: the y coordinate of the top of the rectangle. -@width: the width of the rectangle. -@height: the height of the rectangle. - - - -Calculates the intersection of two rectangles. - - -@src1: a #GdkRectangle. -@src2: a #GdkRectangle. -@dest: the intersection of @src1 and @src2. -@Returns: TRUE if the rectangles intersect. - - - - -Calculates the union of two rectangles. -The union of rectangles @src1 and @src2 is the smallest rectangle which -includes both @src1 and @src2 within it. - - -@src1: a #GdkRectangle. -@src2: a #GdkRectangle. -@dest: the union of @src1 and @src2. - - - - -A GdkRegion represents a set of pixels on the screen. -The only user-visible field of the structure is the user_data member, which -can be used to attach arbitrary data to the #GdkRegion. - - -@user_data: arbitrary data attached to the #GdkRegion. - - - -Creates a new empty #GdkRegion. - - -@Returns: a new empty #GdkRegion. - - - - -Creates a new #GdkRegion using the polygon defined by a number of points. - - - -@points: an array of #GdkPoint structs. -@npoints: the number of elements in the @points array. -@fill_rule: specifies which pixels are included in the region when the polygon -overlaps itself. -@Returns: a new #GdkRegion based on the given polygon. - - - - -The method for determining which pixels are included in a region, when -creating a #GdkRegion from a polygon. -The fill rule is only relevant for polygons which overlap themselves. - - -@GDK_EVEN_ODD_RULE: areas which are overlapped an odd number of times are -included in the region, while areas overlapped an even number of times are not. -@GDK_WINDING_RULE: overlapping areas are always included. - - - -Destroys a #GdkRegion. - - -@region: a #GdkRegion. - - - - -Returns the intersection of two regions. - - -@source1: a #GdkRegion. -@source2: a #GdkRegion. -@Returns: the intersection of @source1 and @source2. - - - - -Returns the union of two regions. -This is all pixels in either of @source1 or @source2. - - -@source1: a #GdkRegion. -@source2: a #GdkRegion. -@Returns: the union of @source1 and @source2. - - - - -Subtracts one region from another. -The result is a region containing all the pixels which are in @source1, but -which are not in @source2. - - -@source1: a #GdkRegion. -@source2: a #GdkRegion to subtract from @source1. -@Returns: @source1 - @source2. - - - - -Returns the difference between the union and the intersection of two regions. -This is a region containing the pixels that are in one of the source regions, -but which are not in both. - - -@source1: a #GdkRegion. -@source2: a #GdkRegion. -@Returns: the difference between the union and the intersection of @source1 -and @source2. - - - - -Returns the union of a region and a rectangle. - - -@region: a #GdkRegion. -@rect: a #GdkRectangle. -@Returns: the union of @region and @rect. - - - - -Moves a region the specified distance. - - -@region: a #GdkRegion. -@dx: the distance to move the region horizontally. -@dy: the distance to move the region vertically. - - - - -Resizes a region by the specified amount. -Positive values shrink the region. Negative values expand it. - - -@region: a #GdkRegion. -@dx: the number of pixels to shrink the region horizontally. -@dy: the number of pixels to shrink the region vertically. - - - - -Returns TRUE if the #GdkRegion is empty. - - -@region: a #GdkRegion. -@Returns: TRUE if @region is empty. - - - - -Returns TRUE if the two regions are the same. - - -@region1: a #GdkRegion. -@region2: a #GdkRegion. -@Returns: TRUE if @region1 and @region2 are equal. - - - - -Returns TRUE if a point is in a region. - - -@region: a #GdkRegion. -@x: the x coordinate of a point. -@y: the y coordinate of a point. -@Returns: TRUE if the point is in @region. - - - - -Tests whether a rectangle is within a region. - - -@region: a #GdkRegion. -@rect: a #GdkRectangle. -@Returns: GDK_OVERLAP_RECTANGLE_IN, GDK_OVERLAP_RECTANGLE_OUT, or -GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside, -outside, or partly inside the #GdkRegion, respectively. - - - - -Specifies the possible values returned by gdk_region_rect_in(). - - -@GDK_OVERLAP_RECTANGLE_IN: if the rectangle is inside the #GdkRegion. -@GDK_OVERLAP_RECTANGLE_OUT: if the rectangle is outside the #GdkRegion. -@GDK_OVERLAP_RECTANGLE_PART: if the rectangle is partly inside the #GdkRegion. - - - -Returns the smallest rectangle which includes the entire #GdkRegion. - - -@region: a #GdkRegion. -@rectangle: returns the smallest rectangle which includes all of @region. - - diff --git a/docs/reference/gdk/tmpl/rgb.sgml b/docs/reference/gdk/tmpl/rgb.sgml deleted file mode 100644 index 9d7beab230..0000000000 --- a/docs/reference/gdk/tmpl/rgb.sgml +++ /dev/null @@ -1,458 +0,0 @@ - -GdkRGB - - -displays RGB images (as well as grayscale and colormapped) to -the native window. - - - - -GdkRgb converts RGB, grayscale, and colormapped images into the native -window pixel format and displays them. It takes care of colormaps, -visuals, dithering, and management of the temporary buffers. - - - - -You must call gdk_rgb_init() before using any GdkRgb functionality. If -you fail to do so, expect coredumps. All Gtk+ widgets that use GdkRgb -(including #GtkPreview) call gdk_rgb_init() in their class_init method. -Thus, if you use GdkRgb only indirectly, you don't need to worry -about it. - - - -GdkRgb tries to use the system default visual and colormap, but -doesn't always succeed. Thus, you have to be prepared to install the -visual and colormap generated by GdkRgb. The following code sequence -(before any widgets are created) should work in most applications: - - - - - gdk_rgb_init (); - - gtk_widget_set_default_colormap (gdk_rgb_get_cmap ()); - gtk_widget_set_default_visual (gdk_rgb_get_visual ()); - - - - -You can also push the colormap and visual, but in general it doesn't -work unless the push wraps the window creation call. If you wrap the -push around a widget which is embedded in a window without the GdkRgb -colormap and visual, it probably won't work, and is likely to cause -colormap flashing, as well. - - - -On 8-bit systems, the colormaps used by Imlib and GdkRgb may -conflict. There is no good general solution to this other than phasing -out the dependence on Imlib. - - - -You can set the threshold for installing colormaps with -gdk_rgb_set_min_colors (). The default is 5x5x5 (125). If a colorcube -of this size or larger can be allocated in the default colormap, then -that's done. Otherwise, GdkRgb creates its own private colormap. -Setting it to 0 means that it always tries to use the default -colormap, and setting it to 216 means that it always creates a private -one if it cannot allocate the 6x6x6 colormap in the default. If you -always want a private colormap (to avoid consuming too many colormap -entries for other apps, say), you can use gdk_rgb_set_install(TRUE). -Setting the value greater than 216 exercises a bug in older versions -of GdkRgb. Note, however, that setting it to 0 doesn't let you get -away with ignoring the colormap and visual - a colormap is always -created in grayscale and direct color modes, and the visual is changed -in cases where a "better" visual than the default is available. - - - -A simple example program using GdkRGB. - -#include <gtk/gtk.h> - -#define IMAGE_WIDTH 256 -#define IMAGE_HEIGHT 256 - -guchar rgbbuf[IMAGE_WIDTH * IMAGE_HEIGHT * 3]; - -gboolean on_darea_expose (GtkWidget *widget, - GdkEventExpose *event, - gpointer user_data); - -int -main (int argc, char *argv[]) -{ - GtkWidget *window, *darea; - gint x, y; - guchar *pos; - - gtk_init (&argc, &argv); - gdk_rgb_init (); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - darea = gtk_drawing_area_new (); - gtk_drawing_area_size (GTK_DRAWING_AREA (darea), IMAGE_WIDTH, IMAGE_HEIGHT); - gtk_container_add (GTK_CONTAINER (window), darea); - gtk_signal_connect (GTK_OBJECT (darea), "expose-event", - GTK_SIGNAL_FUNC (on_darea_expose), NULL); - gtk_widget_show_all (window); - - /* Set up the RGB buffer. */ - pos = rgbbuf; - for (y = 0; y < IMAGE_HEIGHT; y++) - { - for (x = 0; x < IMAGE_WIDTH; x++) - { - *pos++ = x - x % 32; /* Red. */ - *pos++ = (x / 32) * 4 + y - y % 32; /* Green. */ - *pos++ = y - y % 32; /* Blue. */ - } - } - - gtk_main (); - return 0; -} - - -gboolean -on_darea_expose (GtkWidget *widget, - GdkEventExpose *event, - gpointer user_data) -{ - gdk_draw_rgb_image (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], - 0, 0, IMAGE_WIDTH, IMAGE_HEIGHT, - GDK_RGB_DITHER_MAX, rgbbuf, IMAGE_WIDTH * 3); -} - - - - - - - - -#GdkColor -The underlying Gdk mechanism for allocating -colors. - - - - - - - - -Initializes GdkRgb statically. It may be called more than once with no -ill effects. It must, however, be called before any other GdkRgb -operations are performed. - - - -The GdkRgb "context" is allocated statically. Thus, GdkRgb may be used -to drive only one visual in any given application. GdkRgb -automatically selects a best visual and sets its own colormap, if -necessary. gdk_rgb_get_visual() and gdk_rgb_get_cmap () retrieve -the chosen visual and colormap, respectively. - - - - - - -Draws an RGB image in the drawable. This is the core GdkRgb -function, and likely the only one you will need to use other than the -initialization stuff. - - - -The @rowstride parameter allows for lines to be aligned more flexibly. -For example, lines may be allocated to begin on 32-bit boundaries, -even if the width of the rectangle is odd. Rowstride is also useful -when drawing a subrectangle of a larger image in memory. Finally, to -replicate the same line a number of times, the trick of setting -@rowstride to 0 is allowed. - - - -In general, for 0 <= i < @width and 0 <= j < height, -the pixel (x + i, y + j) is colored with red value @rgb_buf[@j * -@rowstride + @i * 3], green value @rgb_buf[@j * @rowstride + @i * 3 + -1], and blue value @rgb_buf[@j * @rowstride + @i * 3 + 2]. - - -@drawable: The #GdkDrawable to draw in (usually a #GdkWindow). -@gc: The graphics context (all Gdk drawing operations require one; its -contents are ignored). -@x: The x coordinate of the top-left corner in the drawable. -@y: The y coordinate of the top-left corner in the drawable. -@width: The width of the rectangle to be drawn. -@height: The height of the rectangle to be drawn. -@dith: A #GdkRgbDither value, selecting the desired dither mode. -@rgb_buf: The pixel data, represented as packed 24-bit data. -@rowstride: The number of bytes from the start of one row in @rgb_buf to the -start of the next. - - - - -Draws an RGB image in the drawable, with an adjustment for dither alignment. - - - -This function is useful when drawing dithered images into a window -that may be scrolled. Pixel (x, y) will be drawn dithered as if its -actual location is (x + @xdith, y + @ydith). Thus, if you draw an -image into a window using zero dither alignment, then scroll up one -pixel, subsequent draws to the window should have @ydith = 1. - - - -Setting the dither alignment correctly allows updating of small parts -of the screen while avoiding visible "seams" between the different -dither textures. - - -@drawable: The #GdkDrawable to draw in (usually a #GdkWindow). -@gc: The graphics context. -@x: The x coordinate of the top-left corner in the drawable. -@y: The y coordinate of the top-left corner in the drawable. -@width: The width of the rectangle to be drawn. -@height: The height of the rectangle to be drawn. -@dith: A #GdkRgbDither value, selecting the desired dither mode. -@rgb_buf: The pixel data, represented as packed 24-bit data. -@rowstride: The number of bytes from the start of one row in @rgb_buf to the -start of the next. -@xdith: An x offset for dither alignment. -@ydith: A y offset for dither alignment. - - - - -Draws an indexed image in the drawable, using a #GdkRgbCmap to assign -actual colors to the color indices. - - -@drawable: The #GdkDrawable to draw in (usually a #GdkWindow). -@gc: The graphics context. -@x: The x coordinate of the top-left corner in the drawable. -@y: The y coordinate of the top-left corner in the drawable. -@width: The width of the rectangle to be drawn. -@height: The height of the rectangle to be drawn. -@dith: A #GdkRgbDither value, selecting the desired dither mode. -@buf: The pixel data, represented as 8-bit color indices. -@rowstride: The number of bytes from the start of one row in @buf to the -start of the next. -@cmap: The #GdkRgbCmap used to assign colors to the color indices. - - - - -Draws a grayscale image in the drawable. - - - -@drawable: The #GdkDrawable to draw in (usually a #GdkWindow). -@gc: The graphics context. -@x: The x coordinate of the top-left corner in the drawable. -@y: The y coordinate of the top-left corner in the drawable. -@width: The width of the rectangle to be drawn. -@height: The height of the rectangle to be drawn. -@dith: A #GdkRgbDither value, selecting the desired dither mode. -@buf: The pixel data, represented as 8-bit gray values. -@rowstride: The number of bytes from the start of one row in @buf to the -start of the next. - - - - -Draws a padded RGB image in the drawable. The image is stored as one -pixel per 32-bit word. It is laid out as a red byte, a green byte, a -blue byte, and a padding byte. - - - -It's unlikely that this function will give significant performance -gains in practice. In my experience, the performance gain from having -pixels aligned to 32-bit boundaries is cancelled out by the increased -memory bandwidth. - - -@drawable: The #GdkDrawable to draw in (usually a #GdkWindow). -@gc: The graphics context. -@x: The x coordinate of the top-left corner in the drawable. -@y: The y coordinate of the top-left corner in the drawable. -@width: The width of the rectangle to be drawn. -@height: The height of the rectangle to be drawn. -@dith: A #GdkRgbDither value, selecting the desired dither mode. -@buf: The pixel data, represented as padded 32-bit data. -@rowstride: The number of bytes from the start of one row in @buf to the -start of the next. - - - - - -Selects whether or not GdkRgb applies dithering -to the image on display. There are three values: - - - - - - -%GDK_RGB_DITHER_NONE: Never use dithering. - - - - - -%GDK_RGB_DITHER_NORMAL: Use dithering in 8 bits per pixel (and below) -only. - - - - - -%GDK_RGB_DITHER_MAX: Use dithering in 16 bits per pixel and below. - - - - - - -Since GdkRgb currently only handles images with 8 bits per component, -dithering on 24 bit per pixel displays is a moot point. - - -@GDK_RGB_DITHER_NONE: -@GDK_RGB_DITHER_NORMAL: -@GDK_RGB_DITHER_MAX: - - - -Creates a new #GdkRgbCmap structure. The cmap maps color indexes to -RGB colors. If @n_colors is less than 256, then images containing -color values greater than or equal to @n_colors will produce undefined -results, including possibly segfaults. - - -@colors: The colors, represented as 0xRRGGBB integer values. -@n_colors: The number of colors in the cmap. -@Returns: The newly created #GdkRgbCmap - - - - -Frees the memory associated with a #GdkRgbCmap created by gdk_rgb_cmap_new(). - - -@cmap: The #GdkRgbCmap to free. - - - - -A private data structure which maps color indices to actual RGB -colors. This is used only for gdk_draw_indexed_image(). - - -@colors: -@lut: - - - -Sets the foreground color in @gc to the specified color (or the -closest approximation, in the case of limited visuals). - - -@gc: The #GdkGC to modify. -@rgb: The color, represented as a 0xRRGGBB integer value. - - - - -Sets the background color in @gc to the specified color (or the -closest approximation, in the case of limited visuals). - - -@gc: The #GdkGC to modify. -@rgb: The color, represented as a 0xRRGGBB integer value. - - - - -Finds the X pixel closest in color to the @rgb color specified. This -value may be used to set the pixel field of -a #GdkColor struct. - - -@rgb: The color, represented as a 0xRRGGBB integer value. -@Returns: The X pixel value. - - - - -If @install is TRUE, directs GdkRgb to always install a new "private" -colormap rather than trying to find a best fit with the colors already -allocated. Ordinarily, GdkRgb will install a colormap only if a -sufficient cube cannot be allocated. - - - -A private colormap has more colors, leading to better quality display, -but also leads to the dreaded "colormap flashing" effect. - - -@install: TRUE to set install mode. - - - - -Sets the minimum number of colors for the color cube. Generally, -GdkRgb tries to allocate the largest color cube it can. If it can't -allocate a color cube at least as large as @min_colors, it installs a -private colormap. - - -@min_colors: The minimum number of colors accepted. - - - - -Gets the visual chosen by GdkRgb. This visual and the corresponding -colormap should be used when creating windows that will be drawn in by GdkRgb. - - -@Returns: The #GdkVisual chosen by GdkRgb. - - - - -Gets the colormap set by GdkRgb. This colormap and the corresponding -visual should be used when creating windows that will be drawn in by GdkRgb. - - -@Returns: The #GdkColormap set by GdkRgb. - - - - -Determine whether the visual is ditherable. This function may be -useful for presenting a user interface choice to the user about which -dither mode is desired; if the display is not ditherable, it may make -sense to gray out or hide the corresponding UI widget. - - -@Returns: TRUE if the visual is ditherable. - - - - -Sets the "verbose" flag. This is generally only useful for debugging. - - -@verbose: TRUE if verbose messages are desired. - - diff --git a/docs/reference/gdk/tmpl/selections.sgml b/docs/reference/gdk/tmpl/selections.sgml deleted file mode 100644 index fbcde204a6..0000000000 --- a/docs/reference/gdk/tmpl/selections.sgml +++ /dev/null @@ -1,185 +0,0 @@ - -Selections - - -functions for transfering data via the X selection mechanism. - - - -The X selection mechanism provides a way to transfer -arbitrary chunks of data between programs. -A selection is a essentially -a named clipboard, identified by a string interned -as a #GdkAtom. By claiming ownership of a selection, -an application indicates that it will be responsible -for supplying its contents. The most common -selections are PRIMARY and -CLIPBOARD. - - -The contents of a selection can be represented in -a number of formats, called targets. -Each target is identified by an atom. A list of -all possible targets supported by the selection owner -can be retrieved by requesting the special target -TARGETS. When a selection is -retrieved, the data is accompanied by a type -(an atom), and a format (an integer, representing -the number of bits per item). -See Properties and Atoms -for more information. - - -The functions in this section only contain the lowlevel -parts of the selection protocol. A considerably more -complicated implementation is needed on top of this. -GTK+ contains such an implementation in the functions -in gtkselection.h and programmers -should use those functions instead of the ones presented -here. If you plan to implement selection handling -directly on top of the functions here, you should refer -to the X Inter-client Communication Conventions Manual -(ICCCM). - - - - - - - - - -The #GdkSelection enumeration contains predefined -atom values for several common selections. - - -@GDK_SELECTION_PRIMARY: The primary X selection. Programs -typically claim this selection when the user -selects text and paste its contents in response -to a middle button press. -@GDK_SELECTION_SECONDARY: An additional X selection. - - - -The #GdkSelectionType enumeration contains predefined -atom values used to represent the types of data transferred -in response to a request for a target. See the -ICCCM for details about what data should be transferred -for each of these types. Other atoms can be used, -and the recommended practice for GTK+ is to to use mime -types for this purpose. However, supporting these types -may be useful for compatibility with older programs. - - -@GDK_SELECTION_TYPE_ATOM: An atom. (format 32) -@GDK_SELECTION_TYPE_BITMAP: A bitmap ID. (format 32) -@GDK_SELECTION_TYPE_COLORMAP: A colormap ID. (format 32) -@GDK_SELECTION_TYPE_DRAWABLE: A drawable ID. (format 32) -@GDK_SELECTION_TYPE_INTEGER: An integer. (format 32) -@GDK_SELECTION_TYPE_PIXMAP: A pixmap ID. (format 32) -@GDK_SELECTION_TYPE_WINDOW: A window ID. (format 32) -@GDK_SELECTION_TYPE_STRING: A string encoded - in ISO Latin-1. (With the additional of TAB - and NEWLINE.) (format 8) - - - -The #GdkTarget enumeration contains predefined atom values which are -used to describe possible targets for a selection. Other atoms can be -used, and the recommended practice for GTK+ is to to use mime types -for this purpose. However, supporting these types may be useful for -compatibility with older programs. - - -@GDK_TARGET_BITMAP: A bitmap ID. -@GDK_TARGET_COLORMAP: A colormap ID. -@GDK_TARGET_DRAWABLE: A drawable ID. -@GDK_TARGET_PIXMAP: A pixmap ID. -@GDK_TARGET_STRING: A string encoded in ISO Latin-1. - (With the additional of TAB - and NEWLINE.) - - - -Set the owner of the given selection. - - -@owner: a #GdkWindow or NULL to indicate that the - the owner for the given should be unset. -@selection: an atom identifying a selection. -@time: timestamp to use when setting the selection. - If this is older than the timestamp given last - time the owner was set for the given selection, the - request will be ignored. -@send_event: if %TRUE, and the new owner is different - from the current owner, the current owner - will be sent a SelectionClear event. -@Returns: %TRUE if the selection owner was succesfully - changed to @owner, otherwise %FALSE. - - - - -Determine the owner of the given selection. - - -@selection: an atom indentifying a selection. -@Returns: if there is a selection owner for this window, - and it is a window known to the current process, - the #GdkWindow that owns the selection, otherwise - NULL. Note that the return value may be owned - by a different process if a foreign window - was previously created for that window, but - a new foreign window will never be created by - this call. - - - - -Retrieve the contents of a selection in a given -form. - - -@requestor: a #GdkWindow. -@selection: an atom identifying the selection to get the - contents of. -@target: the form in which to retrieve the selection. -@time: the timestamp to use when retrieving the - selection. The selection owner may refuse the - request if it did not own the selection at - the time indicated by the timestamp. - - - - -Retrieve selection data that was stored by the selection -data in response to a call to gdk_selection_convert() - - -@requestor: the window on which the data is stored -@data: location to store a pointer to the retrieved data. - If the retrieval failed, NULL we be stored here, otherwise, it - will be non-NULL and the returned data should be freed with g_free() - when you are finished using it. The length of the - allocated memory is one more than the the length - of the returned data, and the final byte will always - be zero, to ensure null-termination of strings. -@prop_type: location to store the type of the property. -@prop_format: location to store the format of the property. -@Returns: the length of the retrieved data. - - - - -Send a response to SelectionRequest event. - - -@requestor: window to which to deliver response. -@selection: selection that was requested. -@target: target that was selected. -@property: property in which the selection owner stored the - data, or %GDK_NONE to indicate that the request - was rejected. -@time: timestamp. - - diff --git a/docs/reference/gdk/tmpl/threads.sgml b/docs/reference/gdk/tmpl/threads.sgml deleted file mode 100644 index 3b14e8ce3f..0000000000 --- a/docs/reference/gdk/tmpl/threads.sgml +++ /dev/null @@ -1,50 +0,0 @@ - -Threads - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/gdk/tmpl/visuals.sgml b/docs/reference/gdk/tmpl/visuals.sgml deleted file mode 100644 index bff192930d..0000000000 --- a/docs/reference/gdk/tmpl/visuals.sgml +++ /dev/null @@ -1,391 +0,0 @@ - -Visuals - - -manipulation of visuals. - - - -The way that the data stored on the screen is stored -in memory can vary considerably between different X -servers; some X servers even support multiple formats -used simultaneously. An X visual -represents a particular format for screen data. -It includes information about the number of bits -used for each color, the way the bits are translated -into an RGB value for display, and the way the bits -are stored in memory. - - -There are several standard visuals. The visual returned -by gdk_visual_get_system() is the system's default -visual. gdk_rgb_get_visual() return the visual most -suited to displaying full-color image data. If you -use the calls in GdkRGB, you should create your windows -using this visual (and the colormap returned by -gdk_rgb_get_colormap()). - - -A number of functions are provided for determining -the "best" available visual. For the purposes of -making this determination, higher bit depths are -considered better, and for visuals of the same -bit depth, %GDK_VISUAL_PSEUDO_COLOR is preferred at -8bpp, otherwise, the visual types are ranked in the -order of (highest to lowest) %GDK_VISUAL_DIRECT_COLOR, -%GDK_VISUAL_TRUE_COLOR, %GDK_VISUAL_PSEUDO_COLOR, -%GDK_VISUAL_STATIC_COLOR, %GDK_VISUAL_GRAYSCALE, -then %GDK_VISUAL_STATIC_GRAY. - - - - - - - - - -The GdkVisual structure contains information about -a particular visual. It contains the following -public fields. - - - - - - -type -The type of this visual. - - - -depth -The number of bits per pixel. - - - -byte_order -The byte-order for this visual. - - - -colormap_size -The number of entries in the colormap, for -visuals of type GDK_VISUAL_PSEUDO_COLOR or -GDK_VISUAL_GRAY_SCALE. For other visual types, it -is the number of possible levels per color component. -If the visual has different numbers of levels for -different components, the value of this field is -undefined. - - - -bits_per_rgb - -The number of significant bits per red, green, or blue -when specifying colors for this visual. (For instance, -for gdk_colormap_alloc_color()) - - - - -red_mask - -A mask giving the bits in a pixel value that -correspond to the red field. Significant only for -%GDK_VISUAL_PSEUDOCOLOR and %GDK_VISUAL_DIRECTCOLOR. - - - - -red_shift, red_prec - -The red_shift and -red_prec give an alternate presentation -of the information in red_mask. -red_mask is a contiguous sequence -of red_prec starting at bit -number red_shift. For example, - shows constructing a pixel value -out of three 16 bit color values. - - - - - -green_mask - -A mask giving the bits in a pixel value that -correspond to the green field. - - - - -green_shift, green_prec - -The green_shift and -green_prec give an alternate presentation -of the information in green_mask. - - - - -blue_mask - -A mask giving the bits in a pixel value that -correspond to the blue field. - - - - -blue_shift, blue_prec - -The blue_shift and -blue_prec give an alternate presentation -of the information in blue_mask. - - - - - - -
-Constructing a pixel value from components - -guint -pixel_from_rgb (GdkVisual *visual, - guchar r, guchar b, guchar g) -{ - return ((r >> (16 - visual->red_prec)) << visual->red_shift) | - ((g >> (16 - visual->green_prec)) << visual->green_shift) | - ((r >> (16 - visual->blue_prec)) << visual->blue_shift); -} - -
- -@type: -@depth: -@byte_order: -@colormap_size: -@bits_per_rgb: -@red_mask: -@red_shift: -@red_prec: -@green_mask: -@green_shift: -@green_prec: -@blue_mask: -@blue_shift: -@blue_prec: - - - -A set of values that describe the manner in which the -pixel values for a visual are converted into RGB -values for display. - - - - - - -GDK_VISUAL_STATIC_GRAY -Each pixel value indexes a grayscale value directly. - - - -GDK_VISUAL_GRAYSCALE -Each pixel is an index into a color map that maps -pixel values into grayscale values. The color map can -be changed by an application. - - - -GDK_VISUAL_STATIC_COLOR -Each pixel value is an index into a predefined, -unmodifiable color map that maps pixel values into -rgb values. - - - -GDK_VISUAL_PSEUDO_COLOR -Each pixel is an index into a color map that maps -pixel values into rgb values. The color map can -be changed by an application. - - - -GDK_TRUE_COLOR -Each pixel value directly contains red, green, -and blue components. The red_mask, -green_mask, and -blue_mask fields of the #GdkVisual -structure describe how the components are assembled into -a pixel value. -. - - - -GDK_DIRECT_COLOR -Each pixel value contains red, green, and blue -components as for %GDK_TRUE_COLOR, but the components -are mapped via a color table into the final output -table instead of being converted directly.. - - - - - -@GDK_VISUAL_STATIC_GRAY: -@GDK_VISUAL_GRAYSCALE: -@GDK_VISUAL_STATIC_COLOR: -@GDK_VISUAL_PSEUDO_COLOR: -@GDK_VISUAL_TRUE_COLOR: -@GDK_VISUAL_DIRECT_COLOR: - - - -A set of values describing the possible byte-orders -for storing pixel values in memory. - - - - - - -GDK_LSB_FIRST -The values are stored with the least-significant byte -first. For instance, the 32-bit value 0xffeecc would be stored -in memory as 0xcc, 0xee, 0xff, 0x00. - - - -GDK_MSB_FIRST -The values are stored with the least-significant byte -first. For instance, the 32-bit value 0xffeecc would be stored -in memory as 0xff, 0xee, 0xcc, 0x00. - - - - - -@GDK_LSB_FIRST: -@GDK_MSB_FIRST: - - - -Lists the available color depths. The returned values -are pointers to static storage and should not be -modified or freed. - - -@depths: a location to store a pointer to an array - holding the available color depths. -@count: a location to store the number of values in @depths. - - - - -Lists the available visual types. The returned values -are pointers to static storage and should not be -modified or freed. - - -@visual_types: a location to store a pointer to an - array holding the available visual types. -@count: a location to store the number of values in @visual types. - - - - -Lists the available visuals. - - -@Returns: A #GList of the available visuals. The list -should be freed this list with g_list_free(). - - - - -Returns the best available color depth. - - -@Returns: the best available color depth. - - - - -Returns the best available visual type. - - -@Returns: the best available visual type. - - - - -Returns the system's default visual. - - -@Returns: the system's default visual. - - - - -Returns the best available visual. - - -@Returns: the best available visual. - - - - -Returns the best available visual with a certain depth. - - -@depth: the desired color depth -@Returns: the best available visual with @depth bits per pixel -or %NULL if no visuals with that type are available. - - - - -Returns the best available visual of a certain visual type. - - -@visual_type: the desired visual type. -@Returns: the visual of the given type with the highest depth -or %NULL if no visuals of that type are available. - - - - -Returns the best available visual - - -@depth: the desired visual type. -@visual_type: the desired depth. -@Returns: the best available visual with the given depth -and visual type, or %NULL if no matching visuals are -available. - - - - -In theory, increases the reference count of a visual. However, -the set of visuals is determined statically when GTK+ is -initialized, so this operation does nothing. - - -@visual: a #GdkVisual. -@Returns: @visual. - - - - -In theory, decreases the reference count of a visual. Like -gdk_visual_ref(), this operation does nothing. - - -@visual: a #GdkVisual. - - diff --git a/docs/reference/gdk/tmpl/windows.sgml b/docs/reference/gdk/tmpl/windows.sgml deleted file mode 100644 index 5a4ddfdf67..0000000000 --- a/docs/reference/gdk/tmpl/windows.sgml +++ /dev/null @@ -1,783 +0,0 @@ - -Windows - - - - - - - - - - - - - - - - - - - -@title: -@event_mask: -@x: -@y: -@width: -@height: -@wclass: -@visual: -@colormap: -@window_type: -@cursor: -@wmclass_name: -@wmclass_class: -@override_redirect: - - - - - - -@user_data: - - - - - - -@GDK_WINDOW_ROOT: -@GDK_WINDOW_TOPLEVEL: -@GDK_WINDOW_CHILD: -@GDK_WINDOW_DIALOG: -@GDK_WINDOW_TEMP: -@GDK_WINDOW_PIXMAP: -@GDK_WINDOW_FOREIGN: - - - - - - -@GDK_INPUT_OUTPUT: -@GDK_INPUT_ONLY: - - - - - - -@GDK_WA_TITLE: -@GDK_WA_X: -@GDK_WA_Y: -@GDK_WA_CURSOR: -@GDK_WA_COLORMAP: -@GDK_WA_VISUAL: -@GDK_WA_WMCLASS: -@GDK_WA_NOREDIR: - - - - - - -@GDK_HINT_POS: -@GDK_HINT_MIN_SIZE: -@GDK_HINT_MAX_SIZE: -@GDK_HINT_BASE_SIZE: -@GDK_HINT_ASPECT: -@GDK_HINT_RESIZE_INC: - - - - - - -@min_width: -@min_height: -@max_width: -@max_height: -@base_width: -@base_height: -@width_inc: -@height_inc: -@min_aspect: -@max_aspect: - - - - - - -@parent: -@attributes: -@attributes_mask: -@Returns: - - - - - - - -@window: - - - - - - - -@window: -@Returns: - - - - - - - -@window: - - - - - - - -@win_x: -@win_y: -@Returns: - - - - - - - -@window: - - - - - - - -@window: - - - - - - - -@window: -@Returns: - - - - - - - -@window: -@Returns: - - - - - - - -@window: - - - - - - - -@window: -@x: -@y: - - - - - - - -@window: -@width: -@height: - - - - - - - -@window: -@x: -@y: -@width: -@height: - - - - - - - -@window: -@new_parent: -@x: -@y: - - - - - - - -@window: - - - - - - - -@window: -@x: -@y: -@width: -@height: - - - - - - - -@window: -@x: -@y: -@width: -@height: - - - - - - - -@window: -@gc: -@x: -@y: -@source_window: -@source_x: -@source_y: -@width: -@height: - - - - - - - -@window: - - - - - - - -@window: - - - - - - - -@window: - - - - - - - -@window: -@user_data: - - - - - - - -@window: -@override_redirect: - - - - - - - -@window: -@function: -@data: - - - - - - - -@window: -@function: -@data: - - - - - - - -@xevent: -@event: -@data: -@Returns: - - - - - - - -@GDK_FILTER_CONTINUE: -@GDK_FILTER_TRANSLATE: -@GDK_FILTER_REMOVE: - - - - - - - - - - - - -@window: -@shape_mask: -@offset_x: -@offset_y: - - - - - - - -@window: - - - - - - - -@window: - - - - - - - -@window: -@use_static: -@Returns: - - - - - - - -@window: -@x: -@y: -@min_width: -@min_height: -@max_width: -@max_height: -@flags: - - - - - - - -@window: -@title: - - - - - - - -@window: -@color: - - - - - - - -@window: -@pixmap: -@parent_relative: - - - - - - - - - - - - - - -@window: -@cursor: - - - - - - - -@window: -@colormap: - - - - - - - -@window: -@data: - - - - - - - -@window: -@x: -@y: -@width: -@height: -@depth: - - - - - - - -@window: -@geometry: -@flags: - - - - - - - -@window: -@x: -@y: - - - - - - - -@window: -@x: -@y: - - - - - - - -@window: -@width: -@height: - - - - - - - -@window: -@Returns: - - - - - - - -@window: -@Returns: - - - - - - - -@window: -@Returns: - - - - - - - -@window: -@x: -@y: -@Returns: - - - - - - - -@window: -@x: -@y: -@Returns: - - - - - - - -@window: -@x: -@y: -@mask: -@Returns: - - - - - - - -@GDK_SHIFT_MASK: -@GDK_LOCK_MASK: -@GDK_CONTROL_MASK: -@GDK_MOD1_MASK: -@GDK_MOD2_MASK: -@GDK_MOD3_MASK: -@GDK_MOD4_MASK: -@GDK_MOD5_MASK: -@GDK_BUTTON1_MASK: -@GDK_BUTTON2_MASK: -@GDK_BUTTON3_MASK: -@GDK_BUTTON4_MASK: -@GDK_BUTTON5_MASK: -@GDK_RELEASE_MASK: -@GDK_MODIFIER_MASK: - - - - - - -@window: -@Returns: - - - - - - - -@window: -@Returns: - - - - - - - -@window: -@Returns: - - - - - - - -@window: -@Returns: - - - - - - - -@window: -@event_mask: - - - - - - - -@window: -@icon_window: -@pixmap: -@mask: - - - - - - - -@window: -@name: - - - - - - - -@window: -@leader: - - - - - - - -@window: -@role: - - - - - - - -@window: -@leader: - - - - - - - -@window: -@decorations: - - - - - - - -@GDK_DECOR_ALL: -@GDK_DECOR_BORDER: -@GDK_DECOR_RESIZEH: -@GDK_DECOR_TITLE: -@GDK_DECOR_MENU: -@GDK_DECOR_MINIMIZE: -@GDK_DECOR_MAXIMIZE: - - - - - - -@window: -@functions: - - - - - - - -@GDK_FUNC_ALL: -@GDK_FUNC_RESIZE: -@GDK_FUNC_MOVE: -@GDK_FUNC_MINIMIZE: -@GDK_FUNC_MAXIMIZE: -@GDK_FUNC_CLOSE: - - - - - - -@Returns: - - - - - - - -@user_data: - - - - - - -@drawable: -@key: -@data: -@destroy_func: - - diff --git a/docs/reference/gtk/.cvsignore b/docs/reference/gtk/.cvsignore deleted file mode 100644 index 53762fb5ac..0000000000 --- a/docs/reference/gtk/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -sgml -html -gtk-decl-list.txt -gtk-unused.txt diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am deleted file mode 100644 index a836723486..0000000000 --- a/docs/reference/gtk/Makefile.am +++ /dev/null @@ -1,59 +0,0 @@ -## Process this file with automake to produce Makefile.in - -# The name of the module. -DOC_MODULE=gtk - -# The top-level SGML file. -DOC_MAIN_SGML_FILE=gtk-docs.sgml - -# We could alternatively use this for using installed headers. -INCLUDE_DIR=`gtk-config --prefix`/include/gtk - - -TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) - -CFLAGS=`gtk-config --cflags` -LDFLAGS=`gtk-config --libs` - -scan: - CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) gtkdoc-scanobj --module=$(DOC_MODULE) - gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers='gtkintl.h' $(INCLUDE_DIR)/*.h - -templates: scan - gtkdoc-mktmpl --module=$(DOC_MODULE) - -sgml: - gtkdoc-mkdb --module=$(DOC_MODULE) - -html: - if ! test -d html ; then mkdir html ; fi - -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - -clean-local: - rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt - -maintainer-clean-local: clean - rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt - -install-data-local: - install -d -m 0755 $(TARGET_DIR) - install -m 0644 html/*.html $(TARGET_DIR) - install -m 0644 html/index.sgml $(TARGET_DIR) - gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR) - -EXTRA_DIST = \ - $(DOC_MAIN_SGML_FILE) \ - $(DOC_MODULE)-sections.txt \ - gtk-overrides.txt \ - gtk-decl.txt \ - gtk.hierarchy \ - gtk.signals \ - gtk.args \ - gtk.types \ - objects_grouped.sgml - -dist-hook: - mkdir $(distdir)/tmpl - cp -p tmpl/*.sgml $(distdir)/tmpl - -.PHONY : html sgml templates scan diff --git a/docs/reference/gtk/gtk-decl.txt b/docs/reference/gtk/gtk-decl.txt deleted file mode 100644 index 06169bfa53..0000000000 --- a/docs/reference/gtk/gtk-decl.txt +++ /dev/null @@ -1,13819 +0,0 @@ - -GtkAccelGroup - - -GtkAccelEntry - - -GtkAccelFlags -typedef enum -{ - /* should the accelerator appear in - * the widget's display? - */ - GTK_ACCEL_VISIBLE = 1 << 0, - /* should the signal associated with - * this accelerator be also visible? - */ - GTK_ACCEL_SIGNAL_VISIBLE = 1 << 1, - /* may the accelerator be removed - * again? - */ - GTK_ACCEL_LOCKED = 1 << 2, - GTK_ACCEL_MASK = 0x07 -} GtkAccelFlags; - - -GtkAccelGroup -struct GtkAccelGroup -{ - guint ref_count; - guint lock_count; - GdkModifierType modifier_mask; - GSList *attach_objects; -}; - - -GtkAccelEntry -struct GtkAccelEntry -{ - /* key portion - */ - GtkAccelGroup *accel_group; - guint accelerator_key; - GdkModifierType accelerator_mods; - - GtkAccelFlags accel_flags; - GtkObject *object; - guint signal_id; -}; - - -gtk_accel_group_new -GtkAccelGroup * -void - - -gtk_accel_group_get_default -GtkAccelGroup * -void - - -gtk_accel_group_ref -GtkAccelGroup * -GtkAccelGroup *accel_group - - -gtk_accel_group_unref -void -GtkAccelGroup *accel_group - - -gtk_accel_group_activate -gboolean -GtkAccelGroup *accel_group,guint accel_key,GdkModifierType accel_mods - - -gtk_accel_groups_activate -gboolean -GtkObject *object,guint accel_key,GdkModifierType accel_mods - - -gtk_accel_group_attach -void -GtkAccelGroup *accel_group,GtkObject *object - - -gtk_accel_group_detach -void -GtkAccelGroup *accel_group,GtkObject *object - - -gtk_accel_group_lock -void -GtkAccelGroup *accel_group - - -gtk_accel_group_unlock -void -GtkAccelGroup *accel_group - - -gtk_accel_group_get_entry -GtkAccelEntry * -GtkAccelGroup *accel_group,guint accel_key,GdkModifierType accel_mods - - -gtk_accel_group_lock_entry -void -GtkAccelGroup *accel_group,guint accel_key,GdkModifierType accel_mods - - -gtk_accel_group_unlock_entry -void -GtkAccelGroup *accel_group,guint accel_key,GdkModifierType accel_mods - - -gtk_accel_group_add -void -GtkAccelGroup *accel_group,guint accel_key,GdkModifierType accel_mods,GtkAccelFlags accel_flags,GtkObject *object,const gchar *accel_signal - - -gtk_accel_group_remove -void -GtkAccelGroup *accel_group,guint accel_key,GdkModifierType accel_mods,GtkObject *object - - -gtk_accel_group_handle_add -void -GtkObject *object,guint accel_signal_id,GtkAccelGroup *accel_group,guint accel_key,GdkModifierType accel_mods,GtkAccelFlags accel_flags - - -gtk_accel_group_handle_remove -void -GtkObject *object,GtkAccelGroup *accel_group,guint accel_key,GdkModifierType accel_mods - - -gtk_accel_group_create_add -guint -GtkType class_type,GtkSignalRunType signal_flags,guint handler_offset - - -gtk_accel_group_create_remove -guint -GtkType class_type,GtkSignalRunType signal_flags,guint handler_offset - - -gtk_accel_group_marshal_add -void -GtkObject *object,GtkSignalFunc func,gpointer func_data,GtkArg *args - - -gtk_accel_group_marshal_remove -void -GtkObject *object,GtkSignalFunc func,gpointer func_data,GtkArg *args - - -gtk_accel_groups_from_object -GSList * -GtkObject *object - - -gtk_accel_group_entries_from_object -GSList * -GtkObject *object - - -gtk_accelerator_valid -gboolean -guint keyval,GdkModifierType modifiers - - -gtk_accelerator_parse -void -const gchar *accelerator,guint *accelerator_key,GdkModifierType *accelerator_mods - - -gtk_accelerator_name -gchar * -guint accelerator_key,GdkModifierType accelerator_mods - - -gtk_accelerator_set_default_mod_mask -void -GdkModifierType default_mod_mask - - -gtk_accelerator_get_default_mod_mask -guint -void - - -GTK_TYPE_ACCEL_LABEL -#define GTK_TYPE_ACCEL_LABEL (gtk_accel_label_get_type ()) - - -GTK_ACCEL_LABEL -#define GTK_ACCEL_LABEL(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ACCEL_LABEL, GtkAccelLabel)) - - -GTK_ACCEL_LABEL_CLASS -#define GTK_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ACCEL_LABEL, GtkAccelLabelClass)) - - -GTK_IS_ACCEL_LABEL -#define GTK_IS_ACCEL_LABEL(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ACCEL_LABEL)) - - -GTK_IS_ACCEL_LABEL_CLASS -#define GTK_IS_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ACCEL_LABEL)) - - -GtkAccelLabel - - -GtkAccelLabelClass - - -GtkAccelLabel -struct GtkAccelLabel -{ - GtkLabel label; - - guint queue_id; - guint accel_padding; - GtkWidget *accel_widget; - gchar *accel_string; - guint16 accel_string_width; -}; - - -gtk_accel_label_get_type -GtkType -void - - -gtk_accel_label_new -GtkWidget * -const gchar *string - - -gtk_accel_label_get_accel_width -guint -GtkAccelLabel *accel_label - - -gtk_accel_label_set_accel_widget -void -GtkAccelLabel *accel_label,GtkWidget *accel_widget - - -gtk_accel_label_refetch -gboolean -GtkAccelLabel *accel_label - - -GTK_TYPE_ADJUSTMENT -#define GTK_TYPE_ADJUSTMENT (gtk_adjustment_get_type ()) - - -GTK_ADJUSTMENT -#define GTK_ADJUSTMENT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustment)) - - -GTK_ADJUSTMENT_CLASS -#define GTK_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass)) - - -GTK_IS_ADJUSTMENT -#define GTK_IS_ADJUSTMENT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ADJUSTMENT)) - - -GTK_IS_ADJUSTMENT_CLASS -#define GTK_IS_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ADJUSTMENT)) - - -GtkAdjustment - - -GtkAdjustmentClass - - -GtkAdjustment -struct GtkAdjustment -{ - GtkData data; - - gfloat lower; - gfloat upper; - gfloat value; - gfloat step_increment; - gfloat page_increment; - gfloat page_size; -}; - - -gtk_adjustment_get_type -GtkType -void - - -gtk_adjustment_new -GtkObject * -gfloat value,gfloat lower,gfloat upper,gfloat step_increment,gfloat page_increment,gfloat page_size - - -gtk_adjustment_changed -void -GtkAdjustment *adjustment - - -gtk_adjustment_value_changed -void -GtkAdjustment *adjustment - - -gtk_adjustment_clamp_page -void -GtkAdjustment *adjustment,gfloat lower,gfloat upper - - -gtk_adjustment_set_value -void -GtkAdjustment *adjustment,gfloat value - - -GTK_TYPE_ALIGNMENT -#define GTK_TYPE_ALIGNMENT (gtk_alignment_get_type ()) - - -GTK_ALIGNMENT -#define GTK_ALIGNMENT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ALIGNMENT, GtkAlignment)) - - -GTK_ALIGNMENT_CLASS -#define GTK_ALIGNMENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ALIGNMENT, GtkAlignmentClass)) - - -GTK_IS_ALIGNMENT -#define GTK_IS_ALIGNMENT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ALIGNMENT)) - - -GTK_IS_ALIGNMENT_CLASS -#define GTK_IS_ALIGNMENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ALIGNMENT)) - - -GtkAlignment - - -GtkAlignmentClass - - -GtkAlignment -struct GtkAlignment -{ - GtkBin bin; - - gfloat xalign; - gfloat yalign; - gfloat xscale; - gfloat yscale; -}; - - -gtk_alignment_get_type -GtkType -void - - -gtk_alignment_new -GtkWidget * -gfloat xalign,gfloat yalign,gfloat xscale,gfloat yscale - - -gtk_alignment_set -void -GtkAlignment *alignment,gfloat xalign,gfloat yalign,gfloat xscale,gfloat yscale - - -GtkArgInfo - - -GtkArgInfo -struct GtkArgInfo -{ - /* hash key portion */ - GtkType class_type; - gchar *name; - - GtkType type; - guint arg_flags; - gchar *full_name; - - /* private fields */ - guint arg_id; - guint seq_id; -}; - - -gtk_arg_new -GtkArg * -GtkType arg_type - - -gtk_arg_copy -GtkArg * -GtkArg *src_arg,GtkArg *dest_arg - - -gtk_arg_free -void -GtkArg *arg,gboolean free_contents - - -gtk_arg_reset -void -GtkArg *arg - - -gtk_arg_values_equal -gboolean -const GtkArg *arg1,const GtkArg *arg2 - - -gtk_args_collect -gchar * -GtkType object_type,GHashTable *arg_info_hash_table,GSList **arg_list_p,GSList **info_list_p,const gchar *first_arg_name,va_list var_args - - -gtk_args_collect_cleanup -void -GSList *arg_list,GSList *info_list - - -gtk_arg_get_info -gchar * -GtkType object_type,GHashTable *arg_info_hash_table,const gchar *arg_name,GtkArgInfo **info_p - - -gtk_arg_type_new_static -GtkArgInfo * -GtkType base_class_type,const gchar *arg_name,guint class_n_args_offset,GHashTable *arg_info_hash_table,GtkType arg_type,guint arg_flags,guint arg_id - - -gtk_args_query -GtkArg * -GtkType class_type,GHashTable *arg_info_hash_table,guint32 **arg_flags,guint *n_args_p - - -gtk_arg_name_strip_type -gchar * -const gchar *arg_name - - -gtk_arg_info_equal -gint -gconstpointer arg_info_1,gconstpointer arg_info_2 - - -gtk_arg_info_hash -guint -gconstpointer arg_info - - -gtk_arg_to_valueloc -void -GtkArg *arg,gpointer value_pointer - - -GTK_TYPE_ARROW -#define GTK_TYPE_ARROW (gtk_arrow_get_type ()) - - -GTK_ARROW -#define GTK_ARROW(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ARROW, GtkArrow)) - - -GTK_ARROW_CLASS -#define GTK_ARROW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ARROW, GtkArrowClass)) - - -GTK_IS_ARROW -#define GTK_IS_ARROW(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ARROW)) - - -GTK_IS_ARROW_CLASS -#define GTK_IS_ARROW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ARROW)) - - -GtkArrow - - -GtkArrowClass - - -GtkArrow -struct GtkArrow -{ - GtkMisc misc; - - gint16 arrow_type; - gint16 shadow_type; -}; - - -gtk_arrow_get_type -GtkType -void - - -gtk_arrow_new -GtkWidget * -GtkArrowType arrow_type,GtkShadowType shadow_type - - -gtk_arrow_set -void -GtkArrow *arrow,GtkArrowType arrow_type,GtkShadowType shadow_type - - -GTK_TYPE_ASPECT_FRAME -#define GTK_TYPE_ASPECT_FRAME (gtk_aspect_frame_get_type ()) - - -GTK_ASPECT_FRAME -#define GTK_ASPECT_FRAME(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ASPECT_FRAME, GtkAspectFrame)) - - -GTK_ASPECT_FRAME_CLASS -#define GTK_ASPECT_FRAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ASPECT_FRAME, GtkAspectFrameClass)) - - -GTK_IS_ASPECT_FRAME -#define GTK_IS_ASPECT_FRAME(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ASPECT_FRAME)) - - -GTK_IS_ASPECT_FRAME_CLASS -#define GTK_IS_ASPECT_FRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ASPECT_FRAME)) - - -GtkAspectFrame - - -GtkAspectFrameClass - - -GtkAspectFrame -struct GtkAspectFrame -{ - GtkFrame frame; - - gfloat xalign; - gfloat yalign; - gfloat ratio; - gint obey_child; - - GtkAllocation center_allocation; -}; - - -gtk_aspect_frame_get_type -GtkType -void - - -gtk_aspect_frame_new -GtkWidget * -const gchar *label,gfloat xalign,gfloat yalign,gfloat ratio,gint obey_child - - -gtk_aspect_frame_set -void -GtkAspectFrame *aspect_frame,gfloat xalign,gfloat yalign,gfloat ratio,gint obey_child - - -GTK_TYPE_BUTTON_BOX -#define GTK_TYPE_BUTTON_BOX (gtk_button_box_get_type ()) - - -GTK_BUTTON_BOX -#define GTK_BUTTON_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBox)) - - -GTK_BUTTON_BOX_CLASS -#define GTK_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass)) - - -GTK_IS_BUTTON_BOX -#define GTK_IS_BUTTON_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON_BOX)) - - -GTK_IS_BUTTON_BOX_CLASS -#define GTK_IS_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON_BOX)) - - -GTK_BUTTONBOX_DEFAULT -#define GTK_BUTTONBOX_DEFAULT -1 - - -GtkButtonBox - - -GtkButtonBoxClass - - -GtkButtonBox -struct GtkButtonBox -{ - GtkBox box; - gint spacing; - gint child_min_width; - gint child_min_height; - gint child_ipad_x; - gint child_ipad_y; - GtkButtonBoxStyle layout_style; -}; - - -gtk_button_box_get_type -GtkType -void - - -gtk_button_box_get_child_size_default -void -gint *min_width, gint *min_height - - -gtk_button_box_get_child_ipadding_default -void -gint *ipad_x, gint *ipad_y - - -gtk_button_box_set_child_size_default -void -gint min_width, gint min_height - - -gtk_button_box_set_child_ipadding_default -void -gint ipad_x, gint ipad_y - - -gtk_button_box_get_spacing -gint -GtkButtonBox *widget - - -gtk_button_box_get_layout -GtkButtonBoxStyle -GtkButtonBox *widget - - -gtk_button_box_get_child_size -void -GtkButtonBox *widget,gint *min_width, gint *min_height - - -gtk_button_box_get_child_ipadding -void -GtkButtonBox *widget, gint *ipad_x, gint *ipad_y - - -gtk_button_box_set_spacing -void -GtkButtonBox *widget, gint spacing - - -gtk_button_box_set_layout -void -GtkButtonBox *widget,GtkButtonBoxStyle layout_style - - -gtk_button_box_set_child_size -void -GtkButtonBox *widget,gint min_width, gint min_height - - -gtk_button_box_set_child_ipadding -void -GtkButtonBox *widget, gint ipad_x, gint ipad_y - - -gtk_button_box_child_requisition -void -GtkWidget *widget,int *nvis_children,int *width,int *height - - -GTK_TYPE_BIN -#define GTK_TYPE_BIN (gtk_bin_get_type ()) - - -GTK_BIN -#define GTK_BIN(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BIN, GtkBin)) - - -GTK_BIN_CLASS -#define GTK_BIN_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BIN, GtkBinClass)) - - -GTK_IS_BIN -#define GTK_IS_BIN(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BIN)) - - -GTK_IS_BIN_CLASS -#define GTK_IS_BIN_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BIN)) - - -GtkBin - - -GtkBinClass - - -GtkBin -struct GtkBin -{ - GtkContainer container; - - GtkWidget *child; -}; - - -gtk_bin_get_type -GtkType -void - - -GtkPatternSpec - - -GtkPatternSpec -struct GtkPatternSpec -{ - GtkMatchType match_type; - guint pattern_length; - gchar *pattern; - gchar *pattern_reversed; - gpointer user_data; - guint seq_id; -}; - - -gtk_pattern_spec_init -void -GtkPatternSpec *pspec,const gchar *pattern - - -gtk_pattern_spec_free_segs -void -GtkPatternSpec *pspec - - -gtk_pattern_match -gboolean -GtkPatternSpec *pspec,guint string_length,const gchar *string,const gchar *string_reversed - - -gtk_pattern_match_string -gboolean -GtkPatternSpec *pspec,const gchar *string - - -gtk_pattern_match_simple -gboolean -const gchar *pattern,const gchar *string - - -GtkBindingSet - - -GtkBindingEntry - - -GtkBindingSignal - - -GtkBindingArg - - -GtkBindingSet -struct GtkBindingSet -{ - gchar *set_name; - gint priority; - GSList *widget_path_pspecs; - GSList *widget_class_pspecs; - GSList *class_branch_pspecs; - GtkBindingEntry *entries; - GtkBindingEntry *current; -}; - - -GtkBindingEntry -struct GtkBindingEntry -{ - /* key portion - */ - guint keyval; - guint modifiers; - - GtkBindingSet *binding_set; - guint destroyed : 1; - guint in_emission : 1; - GtkBindingEntry *set_next; - GtkBindingEntry *hash_next; - GtkBindingSignal *signals; -}; - - -GtkBindingSignal -struct GtkBindingSignal -{ - GtkBindingSignal *next; - gchar *signal_name; - guint n_args; - GtkBindingArg *args; -}; - - -GtkBindingArg -struct GtkBindingArg -{ - GtkType arg_type; - union { - glong long_data; - gdouble double_data; - gchar *string_data; - } d; -}; - - -gtk_binding_set_new -GtkBindingSet * -const gchar *set_name - - -gtk_binding_set_by_class -GtkBindingSet * -gpointer object_class - - -gtk_binding_set_find -GtkBindingSet * -const gchar *set_name - - -gtk_bindings_activate -gboolean -GtkObject *object,guint keyval,guint modifiers - - -gtk_binding_set_activate -gboolean -GtkBindingSet *binding_set,guint keyval,guint modifiers,GtkObject *object - - -gtk_binding_entry_add -#define gtk_binding_entry_add gtk_binding_entry_clear - - -gtk_binding_entry_clear -void -GtkBindingSet *binding_set,guint keyval,guint modifiers - - -gtk_binding_entry_add_signal -void -GtkBindingSet *binding_set,guint keyval,guint modifiers,const gchar *signal_name,guint n_args,... - - -gtk_binding_set_add_path -void -GtkBindingSet *binding_set,GtkPathType path_type,const gchar *path_pattern,GtkPathPriorityType priority - - -gtk_binding_entry_remove -void -GtkBindingSet *binding_set,guint keyval,guint modifiers - - -gtk_binding_entry_add_signall -void -GtkBindingSet *binding_set,guint keyval,guint modifiers,const gchar *signal_name,GSList *binding_args - - -gtk_binding_parse_binding -guint -GScanner *scanner - - -GTK_TYPE_BOX -#define GTK_TYPE_BOX (gtk_box_get_type ()) - - -GTK_BOX -#define GTK_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BOX, GtkBox)) - - -GTK_BOX_CLASS -#define GTK_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BOX, GtkBoxClass)) - - -GTK_IS_BOX -#define GTK_IS_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BOX)) - - -GTK_IS_BOX_CLASS -#define GTK_IS_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BOX)) - - -GtkBox - - -GtkBoxClass - - -GtkBoxChild - - -GtkBox -struct GtkBox -{ - GtkContainer container; - - GList *children; - gint16 spacing; - guint homogeneous : 1; -}; - - -GtkBoxChild -struct GtkBoxChild -{ - GtkWidget *widget; - guint16 padding; - guint expand : 1; - guint fill : 1; - guint pack : 1; -}; - - -gtk_box_get_type -GtkType -void - - -gtk_box_pack_start -void -GtkBox *box,GtkWidget *child,gboolean expand,gboolean fill,guint padding - - -gtk_box_pack_end -void -GtkBox *box,GtkWidget *child,gboolean expand,gboolean fill,guint padding - - -gtk_box_pack_start_defaults -void -GtkBox *box,GtkWidget *widget - - -gtk_box_pack_end_defaults -void -GtkBox *box,GtkWidget *widget - - -gtk_box_set_homogeneous -void -GtkBox *box,gboolean homogeneous - - -gtk_box_set_spacing -void -GtkBox *box,gint spacing - - -gtk_box_reorder_child -void -GtkBox *box,GtkWidget *child,gint position - - -gtk_box_query_child_packing -void -GtkBox *box,GtkWidget *child,gboolean *expand,gboolean *fill,guint *padding,GtkPackType *pack_type - - -gtk_box_set_child_packing -void -GtkBox *box,GtkWidget *child,gboolean expand,gboolean fill,guint padding,GtkPackType pack_type - - -GTK_TYPE_BUTTON -#define GTK_TYPE_BUTTON (gtk_button_get_type ()) - - -GTK_BUTTON -#define GTK_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON, GtkButton)) - - -GTK_BUTTON_CLASS -#define GTK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON, GtkButtonClass)) - - -GTK_IS_BUTTON -#define GTK_IS_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON)) - - -GTK_IS_BUTTON_CLASS -#define GTK_IS_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON)) - - -GtkButton - - -GtkButtonClass - - -GtkButton -struct GtkButton -{ - GtkBin bin; - - GtkWidget *child /* deprecapted field, - * use GTK_BIN (button)->child instead - */; - - guint in_button : 1; - guint button_down : 1; - guint relief : 2; -}; - - -gtk_button_get_type -GtkType -void - - -gtk_button_new -GtkWidget * -void - - -gtk_button_new_with_label -GtkWidget * -const gchar *label - - -gtk_button_pressed -void -GtkButton *button - - -gtk_button_released -void -GtkButton *button - - -gtk_button_clicked -void -GtkButton *button - - -gtk_button_enter -void -GtkButton *button - - -gtk_button_leave -void -GtkButton *button - - -gtk_button_set_relief -void -GtkButton *button,GtkReliefStyle newstyle - - -gtk_button_get_relief -GtkReliefStyle -GtkButton *button - - -GTK_TYPE_CALENDAR -#define GTK_TYPE_CALENDAR (gtk_calendar_get_type ()) - - -GTK_CALENDAR -#define GTK_CALENDAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CALENDAR, GtkCalendar)) - - -GTK_CALENDAR_CLASS -#define GTK_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CALENDAR, GtkCalendarClass)) - - -GTK_IS_CALENDAR -#define GTK_IS_CALENDAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CALENDAR)) - - -GTK_IS_CALENDAR_CLASS -#define GTK_IS_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CALENDAR)) - - -GtkCalendar - - -GtkCalendarClass - - -GtkCalendarDisplayOptions -typedef enum -{ - GTK_CALENDAR_SHOW_HEADING = 1 << 0, - GTK_CALENDAR_SHOW_DAY_NAMES = 1 << 1, - GTK_CALENDAR_NO_MONTH_CHANGE = 1 << 2, - GTK_CALENDAR_SHOW_WEEK_NUMBERS = 1 << 3, - GTK_CALENDAR_WEEK_START_MONDAY = 1 << 4 -} GtkCalendarDisplayOptions; - - -GtkCalendar -struct GtkCalendar -{ - GtkWidget widget; - - GtkStyle *header_style; - GtkStyle *label_style; - - gint month; - gint year; - gint selected_day; - - gint day_month[6][7]; - gint day[6][7]; - - gint num_marked_dates; - gint marked_date[31]; - GtkCalendarDisplayOptions display_flags; - GdkColor marked_date_color[31]; - - GdkGC *gc; - GdkGC *xor_gc; - - gint focus_row; - gint focus_col; - - gint highlight_row; - gint highlight_col; - - gpointer private_data; - gchar grow_space [32]; -}; - - -gtk_calendar_get_type -GtkType -void - - -gtk_calendar_new -GtkWidget * -void - - -gtk_calendar_select_month -gint -GtkCalendar *calendar,guint month,guint year - - -gtk_calendar_select_day -void -GtkCalendar *calendar,guint day - - -gtk_calendar_mark_day -gint -GtkCalendar *calendar,guint day - - -gtk_calendar_unmark_day -gint -GtkCalendar *calendar,guint day - - -gtk_calendar_clear_marks -void -GtkCalendar *calendar - - -gtk_calendar_display_options -void -GtkCalendar *calendar,GtkCalendarDisplayOptions flags - - -gtk_calendar_get_date -void -GtkCalendar *calendar,guint *year,guint *month,guint *day - - -gtk_calendar_freeze -void -GtkCalendar *calendar - - -gtk_calendar_thaw -void -GtkCalendar *calendar - - -GTK_TYPE_CHECK_BUTTON -#define GTK_TYPE_CHECK_BUTTON (gtk_check_button_get_type ()) - - -GTK_CHECK_BUTTON -#define GTK_CHECK_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CHECK_BUTTON, GtkCheckButton)) - - -GTK_CHECK_BUTTON_CLASS -#define GTK_CHECK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CHECK_BUTTON, GtkCheckButtonClass)) - - -GTK_IS_CHECK_BUTTON -#define GTK_IS_CHECK_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CHECK_BUTTON)) - - -GTK_IS_CHECK_BUTTON_CLASS -#define GTK_IS_CHECK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHECK_BUTTON)) - - -GtkCheckButton - - -GtkCheckButtonClass - - -GtkCheckButton -struct GtkCheckButton -{ - GtkToggleButton toggle_button; -}; - - -gtk_check_button_get_type -GtkType -void - - -gtk_check_button_new -GtkWidget * -void - - -gtk_check_button_new_with_label -GtkWidget * -const gchar *label - - -GTK_TYPE_CHECK_MENU_ITEM -#define GTK_TYPE_CHECK_MENU_ITEM (gtk_check_menu_item_get_type ()) - - -GTK_CHECK_MENU_ITEM -#define GTK_CHECK_MENU_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CHECK_MENU_ITEM, GtkCheckMenuItem)) - - -GTK_CHECK_MENU_ITEM_CLASS -#define GTK_CHECK_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CHECK_MENU_ITEM, GtkCheckMenuItemClass)) - - -GTK_IS_CHECK_MENU_ITEM -#define GTK_IS_CHECK_MENU_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CHECK_MENU_ITEM)) - - -GTK_IS_CHECK_MENU_ITEM_CLASS -#define GTK_IS_CHECK_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHECK_MENU_ITEM)) - - -GtkCheckMenuItem - - -GtkCheckMenuItemClass - - -GtkCheckMenuItem -struct GtkCheckMenuItem -{ - GtkMenuItem menu_item; - - guint active : 1; - guint always_show_toggle : 1; -}; - - -gtk_check_menu_item_get_type -GtkType -void - - -gtk_check_menu_item_new -GtkWidget * -void - - -gtk_check_menu_item_new_with_label -GtkWidget * -const gchar *label - - -gtk_check_menu_item_set_active -void -GtkCheckMenuItem *check_menu_item,gboolean is_active - - -gtk_check_menu_item_set_show_toggle -void -GtkCheckMenuItem *menu_item,gboolean always - - -gtk_check_menu_item_toggled -void -GtkCheckMenuItem *check_menu_item - - -GtkCellType -typedef enum -{ - GTK_CELL_EMPTY, - GTK_CELL_TEXT, - GTK_CELL_PIXMAP, - GTK_CELL_PIXTEXT, - GTK_CELL_WIDGET -} GtkCellType; - - -GtkCListDragPos -typedef enum -{ - GTK_CLIST_DRAG_NONE, - GTK_CLIST_DRAG_BEFORE, - GTK_CLIST_DRAG_INTO, - GTK_CLIST_DRAG_AFTER -} GtkCListDragPos; - - -GtkButtonAction -typedef enum -{ - GTK_BUTTON_IGNORED = 0, - GTK_BUTTON_SELECTS = 1 << 0, - GTK_BUTTON_DRAGS = 1 << 1, - GTK_BUTTON_EXPANDS = 1 << 2 -} GtkButtonAction; - - -GTK_TYPE_CLIST -#define GTK_TYPE_CLIST (gtk_clist_get_type ()) - - -GTK_CLIST -#define GTK_CLIST(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CLIST, GtkCList)) - - -GTK_CLIST_CLASS -#define GTK_CLIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CLIST, GtkCListClass)) - - -GTK_IS_CLIST -#define GTK_IS_CLIST(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CLIST)) - - -GTK_IS_CLIST_CLASS -#define GTK_IS_CLIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CLIST)) - - -GTK_CLIST_FLAGS -#define GTK_CLIST_FLAGS(clist) (GTK_CLIST (clist)->flags) - - -GTK_CLIST_SET_FLAG -#define GTK_CLIST_SET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) |= (GTK_ ## flag)) - - -GTK_CLIST_UNSET_FLAG -#define GTK_CLIST_UNSET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) &= ~(GTK_ ## flag)) - - -GTK_CLIST_IN_DRAG -#define GTK_CLIST_IN_DRAG(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_IN_DRAG) - - -GTK_CLIST_ROW_HEIGHT_SET -#define GTK_CLIST_ROW_HEIGHT_SET(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_ROW_HEIGHT_SET) - - -GTK_CLIST_SHOW_TITLES -#define GTK_CLIST_SHOW_TITLES(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_SHOW_TITLES) - - -GTK_CLIST_CHILD_HAS_FOCUS -#define GTK_CLIST_CHILD_HAS_FOCUS(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_CHILD_HAS_FOCUS) - - -GTK_CLIST_ADD_MODE -#define GTK_CLIST_ADD_MODE(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_ADD_MODE) - - -GTK_CLIST_AUTO_SORT -#define GTK_CLIST_AUTO_SORT(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_AUTO_SORT) - - -GTK_CLIST_AUTO_RESIZE_BLOCKED -#define GTK_CLIST_AUTO_RESIZE_BLOCKED(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_AUTO_RESIZE_BLOCKED) - - -GTK_CLIST_REORDERABLE -#define GTK_CLIST_REORDERABLE(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_REORDERABLE) - - -GTK_CLIST_USE_DRAG_ICONS -#define GTK_CLIST_USE_DRAG_ICONS(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_USE_DRAG_ICONS) - - -GTK_CLIST_DRAW_DRAG_LINE -#define GTK_CLIST_DRAW_DRAG_LINE(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_DRAW_DRAG_LINE) - - -GTK_CLIST_DRAW_DRAG_RECT -#define GTK_CLIST_DRAW_DRAG_RECT(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_DRAW_DRAG_RECT) - - -GTK_CLIST_ROW -#define GTK_CLIST_ROW(_glist_) ((GtkCListRow *)((_glist_)->data)) - - -GTK_CELL_TEXT -#define GTK_CELL_TEXT(cell) (((GtkCellText *) &(cell))) - - -GTK_CELL_PIXMAP -#define GTK_CELL_PIXMAP(cell) (((GtkCellPixmap *) &(cell))) - - -GTK_CELL_PIXTEXT -#define GTK_CELL_PIXTEXT(cell) (((GtkCellPixText *) &(cell))) - - -GTK_CELL_WIDGET -#define GTK_CELL_WIDGET(cell) (((GtkCellWidget *) &(cell))) - - -GtkCList - - -GtkCListClass - - -GtkCListColumn - - -GtkCListRow - - -GtkCell - - -GtkCellText - - -GtkCellPixmap - - -GtkCellPixText - - -GtkCellWidget - - -GtkCListCompareFunc -gint -GtkCList *clist, - gconstpointer ptr1, - gconstpointer ptr2 - - -GtkCListCellInfo - - -GtkCListDestInfo - - -GtkCListCellInfo -struct GtkCListCellInfo -{ - gint row; - gint column; -}; - - -GtkCListDestInfo -struct GtkCListDestInfo -{ - GtkCListCellInfo cell; - GtkCListDragPos insert_pos; -}; - - -GtkCList -struct GtkCList -{ - GtkContainer container; - - guint16 flags; - - /* mem chunks */ - GMemChunk *row_mem_chunk; - GMemChunk *cell_mem_chunk; - - guint freeze_count; - - /* allocation rectangle after the conatiner_border_width - * and the width of the shadow border */ - GdkRectangle internal_allocation; - - /* rows */ - gint rows; - gint row_center_offset; - gint row_height; - GList *row_list; - GList *row_list_end; - - /* columns */ - gint columns; - GdkRectangle column_title_area; - GdkWindow *title_window; - - /* dynamicly allocated array of column structures */ - GtkCListColumn *column; - - /*the scrolling window and it's height and width to - * make things a little speedier */ - GdkWindow *clist_window; - gint clist_window_width; - gint clist_window_height; - - /* offsets for scrolling */ - gint hoffset; - gint voffset; - - /* border shadow style */ - GtkShadowType shadow_type; - - /* the list's selection mode (gtkenums.h) */ - GtkSelectionMode selection_mode; - - /* list of selected rows */ - GList *selection; - GList *selection_end; - - GList *undo_selection; - GList *undo_unselection; - gint undo_anchor; - - /* mouse buttons */ - guint8 button_actions[5]; - - guint8 drag_button; - - /* dnd */ - GtkCListCellInfo click_cell; - - /* scroll adjustments */ - GtkAdjustment *hadjustment; - GtkAdjustment *vadjustment; - - /* xor GC for the vertical drag line */ - GdkGC *xor_gc; - - /* gc for drawing unselected cells */ - GdkGC *fg_gc; - GdkGC *bg_gc; - - /* cursor used to indicate dragging */ - GdkCursor *cursor_drag; - - /* the current x-pixel location of the xor-drag line */ - gint x_drag; - - /* focus handling */ - gint focus_row; - - /* dragging the selection */ - gint anchor; - GtkStateType anchor_state; - gint drag_pos; - gint htimer; - gint vtimer; - - GtkSortType sort_type; - GtkCListCompareFunc compare; - gint sort_column; -}; - - -GtkCListColumn -struct GtkCListColumn -{ - gchar *title; - GdkRectangle area; - - GtkWidget *button; - GdkWindow *window; - - gint width; - gint min_width; - gint max_width; - GtkJustification justification; - - guint visible : 1; - guint width_set : 1; - guint resizeable : 1; - guint auto_resize : 1; - guint button_passive : 1; -}; - - -GtkCListRow -struct GtkCListRow -{ - GtkCell *cell; - GtkStateType state; - - GdkColor foreground; - GdkColor background; - - GtkStyle *style; - - gpointer data; - GtkDestroyNotify destroy; - - guint fg_set : 1; - guint bg_set : 1; - guint selectable : 1; -}; - - -GtkCellText -struct GtkCellText -{ - GtkCellType type; - - gint16 vertical; - gint16 horizontal; - - GtkStyle *style; - - gchar *text; -}; - - -GtkCellPixmap -struct GtkCellPixmap -{ - GtkCellType type; - - gint16 vertical; - gint16 horizontal; - - GtkStyle *style; - - GdkPixmap *pixmap; - GdkBitmap *mask; -}; - - -GtkCellPixText -struct GtkCellPixText -{ - GtkCellType type; - - gint16 vertical; - gint16 horizontal; - - GtkStyle *style; - - gchar *text; - guint8 spacing; - GdkPixmap *pixmap; - GdkBitmap *mask; -}; - - -GtkCellWidget -struct GtkCellWidget -{ - GtkCellType type; - - gint16 vertical; - gint16 horizontal; - - GtkStyle *style; - - GtkWidget *widget; -}; - - -GtkCell -struct GtkCell -{ - GtkCellType type; - - gint16 vertical; - gint16 horizontal; - - GtkStyle *style; - - union { - gchar *text; - - struct { - GdkPixmap *pixmap; - GdkBitmap *mask; - } pm; - - struct { - gchar *text; - guint8 spacing; - GdkPixmap *pixmap; - GdkBitmap *mask; - } pt; - - GtkWidget *widget; - } u; -}; - - -gtk_clist_get_type -GtkType -void - - -gtk_clist_construct -void -GtkCList *clist,gint columns,gchar *titles[] - - -gtk_clist_new -GtkWidget * -gint columns - - -gtk_clist_new_with_titles -GtkWidget * -gint columns,gchar *titles[] - - -gtk_clist_set_hadjustment -void -GtkCList *clist,GtkAdjustment *adjustment - - -gtk_clist_set_vadjustment -void -GtkCList *clist,GtkAdjustment *adjustment - - -gtk_clist_get_hadjustment -GtkAdjustment * -GtkCList *clist - - -gtk_clist_get_vadjustment -GtkAdjustment * -GtkCList *clist - - -gtk_clist_set_shadow_type -void -GtkCList *clist,GtkShadowType type - - -gtk_clist_set_selection_mode -void -GtkCList *clist,GtkSelectionMode mode - - -gtk_clist_set_reorderable -void -GtkCList *clist,gboolean reorderable - - -gtk_clist_set_use_drag_icons -void -GtkCList *clist,gboolean use_icons - - -gtk_clist_set_button_actions -void -GtkCList *clist,guint button,guint8 button_actions - - -gtk_clist_freeze -void -GtkCList *clist - - -gtk_clist_thaw -void -GtkCList *clist - - -gtk_clist_column_titles_show -void -GtkCList *clist - - -gtk_clist_column_titles_hide -void -GtkCList *clist - - -gtk_clist_column_title_active -void -GtkCList *clist,gint column - - -gtk_clist_column_title_passive -void -GtkCList *clist,gint column - - -gtk_clist_column_titles_active -void -GtkCList *clist - - -gtk_clist_column_titles_passive -void -GtkCList *clist - - -gtk_clist_set_column_title -void -GtkCList *clist,gint column,const gchar *title - - -gtk_clist_get_column_title -gchar * -GtkCList *clist,gint column - - -gtk_clist_set_column_widget -void -GtkCList *clist,gint column,GtkWidget *widget - - -gtk_clist_get_column_widget -GtkWidget * -GtkCList *clist,gint column - - -gtk_clist_set_column_justification -void -GtkCList *clist,gint column,GtkJustification justification - - -gtk_clist_set_column_visibility -void -GtkCList *clist,gint column,gboolean visible - - -gtk_clist_set_column_resizeable -void -GtkCList *clist,gint column,gboolean resizeable - - -gtk_clist_set_column_auto_resize -void -GtkCList *clist,gint column,gboolean auto_resize - - -gtk_clist_columns_autosize -gint -GtkCList *clist - - -gtk_clist_optimal_column_width -gint -GtkCList *clist,gint column - - -gtk_clist_set_column_width -void -GtkCList *clist,gint column,gint width - - -gtk_clist_set_column_min_width -void -GtkCList *clist,gint column,gint min_width - - -gtk_clist_set_column_max_width -void -GtkCList *clist,gint column,gint max_width - - -gtk_clist_set_row_height -void -GtkCList *clist,guint height - - -gtk_clist_moveto -void -GtkCList *clist,gint row,gint column,gfloat row_align,gfloat col_align - - -gtk_clist_row_is_visible -GtkVisibility -GtkCList *clist,gint row - - -gtk_clist_get_cell_type -GtkCellType -GtkCList *clist,gint row,gint column - - -gtk_clist_set_text -void -GtkCList *clist,gint row,gint column,const gchar *text - - -gtk_clist_get_text -gint -GtkCList *clist,gint row,gint column,gchar **text - - -gtk_clist_set_pixmap -void -GtkCList *clist,gint row,gint column,GdkPixmap *pixmap,GdkBitmap *mask - - -gtk_clist_get_pixmap -gint -GtkCList *clist,gint row,gint column,GdkPixmap **pixmap,GdkBitmap **mask - - -gtk_clist_set_pixtext -void -GtkCList *clist,gint row,gint column,const gchar *text,guint8 spacing,GdkPixmap *pixmap,GdkBitmap *mask - - -gtk_clist_get_pixtext -gint -GtkCList *clist,gint row,gint column,gchar **text,guint8 *spacing,GdkPixmap **pixmap,GdkBitmap **mask - - -gtk_clist_set_foreground -void -GtkCList *clist,gint row,GdkColor *color - - -gtk_clist_set_background -void -GtkCList *clist,gint row,GdkColor *color - - -gtk_clist_set_cell_style -void -GtkCList *clist,gint row,gint column,GtkStyle *style - - -gtk_clist_get_cell_style -GtkStyle * -GtkCList *clist,gint row,gint column - - -gtk_clist_set_row_style -void -GtkCList *clist,gint row,GtkStyle *style - - -gtk_clist_get_row_style -GtkStyle * -GtkCList *clist,gint row - - -gtk_clist_set_shift -void -GtkCList *clist,gint row,gint column,gint vertical,gint horizontal - - -gtk_clist_set_selectable -void -GtkCList *clist,gint row,gboolean selectable - - -gtk_clist_get_selectable -gboolean -GtkCList *clist,gint row - - -gtk_clist_prepend -gint -GtkCList *clist,gchar *text[] - - -gtk_clist_append -gint -GtkCList *clist,gchar *text[] - - -gtk_clist_insert -gint -GtkCList *clist,gint row,gchar *text[] - - -gtk_clist_remove -void -GtkCList *clist,gint row - - -gtk_clist_set_row_data -void -GtkCList *clist,gint row,gpointer data - - -gtk_clist_set_row_data_full -void -GtkCList *clist,gint row,gpointer data,GtkDestroyNotify destroy - - -gtk_clist_get_row_data -gpointer -GtkCList *clist,gint row - - -gtk_clist_find_row_from_data -gint -GtkCList *clist,gpointer data - - -gtk_clist_select_row -void -GtkCList *clist,gint row,gint column - - -gtk_clist_unselect_row -void -GtkCList *clist,gint row,gint column - - -gtk_clist_undo_selection -void -GtkCList *clist - - -gtk_clist_clear -void -GtkCList *clist - - -gtk_clist_get_selection_info -gint -GtkCList *clist,gint x,gint y,gint *row,gint *column - - -gtk_clist_select_all -void -GtkCList *clist - - -gtk_clist_unselect_all -void -GtkCList *clist - - -gtk_clist_swap_rows -void -GtkCList *clist,gint row1,gint row2 - - -gtk_clist_row_move -void -GtkCList *clist,gint source_row,gint dest_row - - -gtk_clist_set_compare_func -void -GtkCList *clist,GtkCListCompareFunc cmp_func - - -gtk_clist_set_sort_column -void -GtkCList *clist,gint column - - -gtk_clist_set_sort_type -void -GtkCList *clist,GtkSortType sort_type - - -gtk_clist_sort -void -GtkCList *clist - - -gtk_clist_set_auto_sort -void -GtkCList *clist,gboolean auto_sort - - -GTK_COLOR_SELECTION -#define GTK_COLOR_SELECTION(obj) GTK_CHECK_CAST (obj, gtk_color_selection_get_type (), GtkColorSelection) - - -GTK_COLOR_SELECTION_CLASS -#define GTK_COLOR_SELECTION_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_color_selection_get_type (), GtkColorSelectionClass) - - -GTK_IS_COLOR_SELECTION -#define GTK_IS_COLOR_SELECTION(obj) GTK_CHECK_TYPE (obj, gtk_color_selection_get_type ()) - - -GTK_COLOR_SELECTION_DIALOG -#define GTK_COLOR_SELECTION_DIALOG(obj) GTK_CHECK_CAST (obj, gtk_color_selection_dialog_get_type (), GtkColorSelectionDialog) - - -GTK_COLOR_SELECTION_DIALOG_CLASS -#define GTK_COLOR_SELECTION_DIALOG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_color_selection_dialog_get_type (), GtkColorSelectionDialogClass) - - -GTK_IS_COLOR_SELECTION_DIALOG -#define GTK_IS_COLOR_SELECTION_DIALOG(obj) GTK_CHECK_TYPE (obj, gtk_color_selection_dialog_get_type ()) - - -GtkColorSelection - - -GtkColorSelectionClass - - -GtkColorSelectionDialog - - -GtkColorSelectionDialogClass - - -GtkColorSelection -struct GtkColorSelection -{ - GtkVBox vbox; - - GtkWidget *wheel_area; - GtkWidget *value_area; - GtkWidget *sample_area; - GtkWidget *sample_area_eb; - - GtkWidget *scales[8]; - GtkWidget *entries[8]; - GtkWidget *opacity_label; - - GdkGC *wheel_gc; - GdkGC *value_gc; - GdkGC *sample_gc; - - GtkUpdateType policy; - gint use_opacity; - gint timer_active; - gint timer_tag; - gdouble values[8]; - gdouble old_values[8]; - - guchar *wheel_buf; - guchar *value_buf; - guchar *sample_buf; -}; - - -GtkColorSelectionDialog -struct GtkColorSelectionDialog -{ - GtkWindow window; - - GtkWidget *colorsel; - GtkWidget *main_vbox; - GtkWidget *ok_button; - GtkWidget *reset_button; - GtkWidget *cancel_button; - GtkWidget *help_button; -}; - - -gtk_color_selection_get_type -guint -void - - -gtk_color_selection_new -GtkWidget * -void - - -gtk_color_selection_set_update_policy -void -GtkColorSelection *colorsel,GtkUpdateType policy - - -gtk_color_selection_set_opacity -void -GtkColorSelection *colorsel,gint use_opacity - - -gtk_color_selection_set_color -void -GtkColorSelection *colorsel,gdouble *color - - -gtk_color_selection_get_color -void -GtkColorSelection *colorsel,gdouble *color - - -gtk_color_selection_dialog_get_type -guint -void - - -gtk_color_selection_dialog_new -GtkWidget * -const gchar *title - - -GTK_COMBO -#define GTK_COMBO(obj) GTK_CHECK_CAST (obj, gtk_combo_get_type (), GtkCombo) - - -GTK_COMBO_CLASS -#define GTK_COMBO_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_combo_get_type (), GtkComboClass) - - -GTK_IS_COMBO -#define GTK_IS_COMBO(obj) GTK_CHECK_TYPE (obj, gtk_combo_get_type ()) - - -GtkCombo - - -GtkComboClass - - -GtkCombo -struct GtkCombo { - GtkHBox hbox; - GtkWidget *entry; - GtkWidget *button; - GtkWidget *popup; - GtkWidget *popwin; - GtkWidget *list; - - guint entry_change_id; - guint list_change_id; - - guint value_in_list:1; - guint ok_if_empty:1; - guint case_sensitive:1; - guint use_arrows:1; - guint use_arrows_always:1; - - guint16 current_button; - guint activate_id; -}; - - -gtk_combo_get_type -guint -void - - -gtk_combo_new -GtkWidget * -void - - -gtk_combo_set_value_in_list -void -GtkCombo* combo,gint val,gint ok_if_empty - - -gtk_combo_set_use_arrows -void -GtkCombo* combo,gint val - - -gtk_combo_set_use_arrows_always -void -GtkCombo* combo,gint val - - -gtk_combo_set_case_sensitive -void -GtkCombo* combo,gint val - - -gtk_combo_set_item_string -void -GtkCombo* combo,GtkItem* item,const gchar* item_value - - -gtk_combo_set_popdown_strings -void -GtkCombo* combo,GList *strings - - -gtk_combo_disable_activate -void -GtkCombo* combo - - -gtk_accel_label_accelerator_width -#define gtk_accel_label_accelerator_width gtk_accel_label_get_accel_width - - -gtk_container_border_width -#define gtk_container_border_width gtk_container_set_border_width - - -gtk_notebook_current_page -#define gtk_notebook_current_page gtk_notebook_get_current_page - - -gtk_packer_configure -#define gtk_packer_configure gtk_packer_set_child_packing - - -gtk_paned_gutter_size -#define gtk_paned_gutter_size gtk_paned_set_gutter_size - - -gtk_paned_handle_size -#define gtk_paned_handle_size gtk_paned_set_handle_size - - -gtk_scale_value_width -#define gtk_scale_value_width gtk_scale_get_value_width - - -gtk_window_position -#define gtk_window_position gtk_window_set_position - - -gtk_toggle_button_set_state -#define gtk_toggle_button_set_state gtk_toggle_button_set_active - - -gtk_check_menu_item_set_state -#define gtk_check_menu_item_set_state gtk_check_menu_item_set_active - - -gtk_ctree_set_reorderable -#define gtk_ctree_set_reorderable(t,r) gtk_clist_set_reorderable((GtkCList*) (t),(r)) - - -gtk_style_apply_default_pixmap -#define gtk_style_apply_default_pixmap(s,gw,st,a,x,y,w,h) \ - gtk_style_apply_default_background (s,gw,TRUE,st,a,x,y,w,h) - - -GTK_TYPE_CONTAINER -#define GTK_TYPE_CONTAINER (gtk_container_get_type ()) - - -GTK_CONTAINER -#define GTK_CONTAINER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CONTAINER, GtkContainer)) - - -GTK_CONTAINER_CLASS -#define GTK_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CONTAINER, GtkContainerClass)) - - -GTK_IS_CONTAINER -#define GTK_IS_CONTAINER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CONTAINER)) - - -GTK_IS_CONTAINER_CLASS -#define GTK_IS_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CONTAINER)) - - -GTK_IS_RESIZE_CONTAINER -#define GTK_IS_RESIZE_CONTAINER(widget) (GTK_IS_CONTAINER (widget) && ((GtkContainer*) (widget))->resize_mode != GTK_RESIZE_PARENT) - - -GtkContainer - - -GtkContainerClass - - -GtkContainer -struct GtkContainer -{ - GtkWidget widget; - - GtkWidget *focus_child; - - guint border_width : 16; - guint need_resize : 1; - guint resize_mode : 2; - - - /* The list of children that requested a resize - */ - GSList *resize_widgets; -}; - - -gtk_container_get_type -GtkType -void - - -gtk_container_set_border_width -void -GtkContainer *container,guint border_width - - -gtk_container_add -void -GtkContainer *container,GtkWidget *widget - - -gtk_container_remove -void -GtkContainer *container,GtkWidget *widget - - -gtk_container_set_resize_mode -void -GtkContainer *container,GtkResizeMode resize_mode - - -gtk_container_check_resize -void -GtkContainer *container - - -gtk_container_foreach -void -GtkContainer *container,GtkCallback callback,gpointer callback_data - - -gtk_container_foreach_full -void -GtkContainer *container,GtkCallback callback,GtkCallbackMarshal marshal,gpointer callback_data,GtkDestroyNotify notify - - -gtk_container_children -GList * -GtkContainer *container - - -gtk_container_focus -gint -GtkContainer *container,GtkDirectionType direction - - -gtk_container_set_focus_child -void -GtkContainer *container,GtkWidget *child - - -gtk_container_set_focus_vadjustment -void -GtkContainer *container,GtkAdjustment *adjustment - - -gtk_container_set_focus_hadjustment -void -GtkContainer *container,GtkAdjustment *adjustment - - -gtk_container_register_toplevel -void -GtkContainer *container - - -gtk_container_unregister_toplevel -void -GtkContainer *container - - -gtk_container_get_toplevels -GList * -void - - -gtk_container_resize_children -void -GtkContainer *container - - -gtk_container_child_type -GtkType -GtkContainer *container - - -gtk_container_add_child_arg_type -void -const gchar *arg_name,GtkType arg_type,guint arg_flags,guint arg_id - - -gtk_container_query_child_args -GtkArg * -GtkType class_type,guint32 **arg_flags,guint *nargs - - -gtk_container_child_getv -void -GtkContainer *container,GtkWidget *child,guint n_args,GtkArg *args - - -gtk_container_child_setv -void -GtkContainer *container,GtkWidget *child,guint n_args,GtkArg *args - - -gtk_container_add_with_args -void -GtkContainer *container,GtkWidget *widget,const gchar *first_arg_name,... - - -gtk_container_addv -void -GtkContainer *container,GtkWidget *widget,guint n_args,GtkArg *args - - -gtk_container_child_set -void -GtkContainer *container,GtkWidget *child,const gchar *first_arg_name,... - - -gtk_container_queue_resize -void -GtkContainer *container - - -gtk_container_clear_resize_widgets -void -GtkContainer *container - - -gtk_container_arg_set -void -GtkContainer *container,GtkWidget *child,GtkArg *arg,GtkArgInfo *info - - -gtk_container_arg_get -void -GtkContainer *container,GtkWidget *child,GtkArg *arg,GtkArgInfo *info - - -gtk_container_child_args_collect -gchar * -GtkType object_type,GSList **arg_list_p,GSList **info_list_p,const gchar *first_arg_name,va_list args - - -gtk_container_child_arg_get_info -gchar * -GtkType object_type,const gchar *arg_name,GtkArgInfo **info_p - - -gtk_container_forall -void -GtkContainer *container,GtkCallback callback,gpointer callback_data - - -gtk_container_child_composite_name -gchar * -GtkContainer *container,GtkWidget *child - - -GTK_TYPE_CTREE -#define GTK_TYPE_CTREE (gtk_ctree_get_type ()) - - -GTK_CTREE -#define GTK_CTREE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CTREE, GtkCTree)) - - -GTK_CTREE_CLASS -#define GTK_CTREE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CTREE, GtkCTreeClass)) - - -GTK_IS_CTREE -#define GTK_IS_CTREE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CTREE)) - - -GTK_IS_CTREE_CLASS -#define GTK_IS_CTREE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CTREE)) - - -GTK_CTREE_ROW -#define GTK_CTREE_ROW(_node_) ((GtkCTreeRow *)(((GList *)(_node_))->data)) - - -GTK_CTREE_NODE -#define GTK_CTREE_NODE(_node_) ((GtkCTreeNode *)((_node_))) - - -GTK_CTREE_NODE_NEXT -#define GTK_CTREE_NODE_NEXT(_nnode_) ((GtkCTreeNode *)(((GList *)(_nnode_))->next)) - - -GTK_CTREE_NODE_PREV -#define GTK_CTREE_NODE_PREV(_pnode_) ((GtkCTreeNode *)(((GList *)(_pnode_))->prev)) - - -GTK_CTREE_FUNC -#define GTK_CTREE_FUNC(_func_) ((GtkCTreeFunc)(_func_)) - - -GtkCTreePos -typedef enum -{ - GTK_CTREE_POS_BEFORE, - GTK_CTREE_POS_AS_CHILD, - GTK_CTREE_POS_AFTER -} GtkCTreePos; - - -GtkCTreeLineStyle -typedef enum -{ - GTK_CTREE_LINES_NONE, - GTK_CTREE_LINES_SOLID, - GTK_CTREE_LINES_DOTTED, - GTK_CTREE_LINES_TABBED -} GtkCTreeLineStyle; - - -GtkCTreeExpanderStyle -typedef enum -{ - GTK_CTREE_EXPANDER_NONE, - GTK_CTREE_EXPANDER_SQUARE, - GTK_CTREE_EXPANDER_TRIANGLE, - GTK_CTREE_EXPANDER_CIRCULAR -} GtkCTreeExpanderStyle; - - -GtkCTreeExpansionType -typedef enum -{ - 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 -} GtkCTreeExpansionType; - - -GtkCTree - - -GtkCTreeClass - - -GtkCTreeRow - - -GtkCTreeNode - - -GtkCTreeFunc -void -GtkCTree *ctree, - GtkCTreeNode *node, - gpointer data - - -GtkCTreeGNodeFunc -gboolean -GtkCTree *ctree, - guint depth, - GNode *gnode, - GtkCTreeNode *cnode, - gpointer data - - -GtkCTreeCompareDragFunc -gboolean -GtkCTree *ctree, - GtkCTreeNode *source_node, - GtkCTreeNode *new_parent, - GtkCTreeNode *new_sibling - - -GtkCTree -struct GtkCTree -{ - GtkCList clist; - - GdkGC *lines_gc; - - gint tree_indent; - gint tree_spacing; - gint tree_column; - - guint line_style : 2; - guint expander_style : 2; - guint show_stub : 1; - - GtkCTreeCompareDragFunc drag_compare; -}; - - -GtkCTreeRow -struct GtkCTreeRow -{ - GtkCListRow row; - - GtkCTreeNode *parent; - GtkCTreeNode *sibling; - GtkCTreeNode *children; - - GdkPixmap *pixmap_closed; - GdkBitmap *mask_closed; - GdkPixmap *pixmap_opened; - GdkBitmap *mask_opened; - - guint16 level; - - guint is_leaf : 1; - guint expanded : 1; -}; - - -GtkCTreeNode -struct GtkCTreeNode { - GList list; -}; - - -gtk_ctree_get_type -GtkType -void - - -gtk_ctree_construct -void -GtkCTree *ctree,gint columns,gint tree_column,gchar *titles[] - - -gtk_ctree_new_with_titles -GtkWidget * -gint columns,gint tree_column,gchar *titles[] - - -gtk_ctree_new -GtkWidget * -gint columns,gint tree_column - - -gtk_ctree_insert_node -GtkCTreeNode * -GtkCTree *ctree,GtkCTreeNode *parent,GtkCTreeNode *sibling,gchar *text[],guint8 spacing,GdkPixmap *pixmap_closed,GdkBitmap *mask_closed,GdkPixmap *pixmap_opened,GdkBitmap *mask_opened,gboolean is_leaf,gboolean expanded - - -gtk_ctree_remove_node -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_insert_gnode -GtkCTreeNode * -GtkCTree *ctree,GtkCTreeNode *parent,GtkCTreeNode *sibling,GNode *gnode,GtkCTreeGNodeFunc func,gpointer data - - -gtk_ctree_export_to_gnode -GNode * -GtkCTree *ctree,GNode *parent,GNode *sibling,GtkCTreeNode *node,GtkCTreeGNodeFunc func,gpointer data - - -gtk_ctree_post_recursive -void -GtkCTree *ctree,GtkCTreeNode *node,GtkCTreeFunc func,gpointer data - - -gtk_ctree_post_recursive_to_depth -void -GtkCTree *ctree,GtkCTreeNode *node,gint depth,GtkCTreeFunc func,gpointer data - - -gtk_ctree_pre_recursive -void -GtkCTree *ctree,GtkCTreeNode *node,GtkCTreeFunc func,gpointer data - - -gtk_ctree_pre_recursive_to_depth -void -GtkCTree *ctree,GtkCTreeNode *node,gint depth,GtkCTreeFunc func,gpointer data - - -gtk_ctree_is_viewable -gboolean -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_last -GtkCTreeNode * -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_find_node_ptr -GtkCTreeNode * -GtkCTree *ctree,GtkCTreeRow *ctree_row - - -gtk_ctree_node_nth -GtkCTreeNode * -GtkCTree *ctree,guint row - - -gtk_ctree_find -gboolean -GtkCTree *ctree,GtkCTreeNode *node,GtkCTreeNode *child - - -gtk_ctree_is_ancestor -gboolean -GtkCTree *ctree,GtkCTreeNode *node,GtkCTreeNode *child - - -gtk_ctree_find_by_row_data -GtkCTreeNode * -GtkCTree *ctree,GtkCTreeNode *node,gpointer data - - -gtk_ctree_find_all_by_row_data -GList * -GtkCTree *ctree,GtkCTreeNode *node,gpointer data - - -gtk_ctree_find_by_row_data_custom -GtkCTreeNode * -GtkCTree *ctree,GtkCTreeNode *node,gpointer data,GCompareFunc func - - -gtk_ctree_find_all_by_row_data_custom -GList * -GtkCTree *ctree,GtkCTreeNode *node,gpointer data,GCompareFunc func - - -gtk_ctree_is_hot_spot -gboolean -GtkCTree *ctree,gint x,gint y - - -gtk_ctree_move -void -GtkCTree *ctree,GtkCTreeNode *node,GtkCTreeNode *new_parent,GtkCTreeNode *new_sibling - - -gtk_ctree_expand -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_expand_recursive -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_expand_to_depth -void -GtkCTree *ctree,GtkCTreeNode *node,gint depth - - -gtk_ctree_collapse -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_collapse_recursive -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_collapse_to_depth -void -GtkCTree *ctree,GtkCTreeNode *node,gint depth - - -gtk_ctree_toggle_expansion -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_toggle_expansion_recursive -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_select -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_select_recursive -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_unselect -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_unselect_recursive -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_real_select_recursive -void -GtkCTree *ctree,GtkCTreeNode *node,gint state - - -gtk_ctree_node_set_text -void -GtkCTree *ctree,GtkCTreeNode *node,gint column,const gchar *text - - -gtk_ctree_node_set_pixmap -void -GtkCTree *ctree,GtkCTreeNode *node,gint column,GdkPixmap *pixmap,GdkBitmap *mask - - -gtk_ctree_node_set_pixtext -void -GtkCTree *ctree,GtkCTreeNode *node,gint column,const gchar *text,guint8 spacing,GdkPixmap *pixmap,GdkBitmap *mask - - -gtk_ctree_set_node_info -void -GtkCTree *ctree,GtkCTreeNode *node,const gchar *text,guint8 spacing,GdkPixmap *pixmap_closed,GdkBitmap *mask_closed,GdkPixmap *pixmap_opened,GdkBitmap *mask_opened,gboolean is_leaf,gboolean expanded - - -gtk_ctree_node_set_shift -void -GtkCTree *ctree,GtkCTreeNode *node,gint column,gint vertical,gint horizontal - - -gtk_ctree_node_set_selectable -void -GtkCTree *ctree,GtkCTreeNode *node,gboolean selectable - - -gtk_ctree_node_get_selectable -gboolean -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_node_get_cell_type -GtkCellType -GtkCTree *ctree,GtkCTreeNode *node,gint column - - -gtk_ctree_node_get_text -gint -GtkCTree *ctree,GtkCTreeNode *node,gint column,gchar **text - - -gtk_ctree_node_get_pixmap -gint -GtkCTree *ctree,GtkCTreeNode *node,gint column,GdkPixmap **pixmap,GdkBitmap **mask - - -gtk_ctree_node_get_pixtext -gint -GtkCTree *ctree,GtkCTreeNode *node,gint column,gchar **text,guint8 *spacing,GdkPixmap **pixmap,GdkBitmap **mask - - -gtk_ctree_get_node_info -gint -GtkCTree *ctree,GtkCTreeNode *node,gchar **text,guint8 *spacing,GdkPixmap **pixmap_closed,GdkBitmap **mask_closed,GdkPixmap **pixmap_opened,GdkBitmap **mask_opened,gboolean *is_leaf,gboolean *expanded - - -gtk_ctree_node_set_row_style -void -GtkCTree *ctree,GtkCTreeNode *node,GtkStyle *style - - -gtk_ctree_node_get_row_style -GtkStyle * -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_node_set_cell_style -void -GtkCTree *ctree,GtkCTreeNode *node,gint column,GtkStyle *style - - -gtk_ctree_node_get_cell_style -GtkStyle * -GtkCTree *ctree,GtkCTreeNode *node,gint column - - -gtk_ctree_node_set_foreground -void -GtkCTree *ctree,GtkCTreeNode *node,GdkColor *color - - -gtk_ctree_node_set_background -void -GtkCTree *ctree,GtkCTreeNode *node,GdkColor *color - - -gtk_ctree_node_set_row_data -void -GtkCTree *ctree,GtkCTreeNode *node,gpointer data - - -gtk_ctree_node_set_row_data_full -void -GtkCTree *ctree,GtkCTreeNode *node,gpointer data,GtkDestroyNotify destroy - - -gtk_ctree_node_get_row_data -gpointer -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_node_moveto -void -GtkCTree *ctree,GtkCTreeNode *node,gint column,gfloat row_align,gfloat col_align - - -gtk_ctree_node_is_visible -GtkVisibility -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_set_indent -void -GtkCTree *ctree,gint indent - - -gtk_ctree_set_spacing -void -GtkCTree *ctree,gint spacing - - -gtk_ctree_set_show_stub -void -GtkCTree *ctree,gboolean show_stub - - -gtk_ctree_set_line_style -void -GtkCTree *ctree,GtkCTreeLineStyle line_style - - -gtk_ctree_set_expander_style -void -GtkCTree *ctree,GtkCTreeExpanderStyle expander_style - - -gtk_ctree_set_drag_compare_func -void -GtkCTree *ctree,GtkCTreeCompareDragFunc cmp_func - - -gtk_ctree_sort_node -void -GtkCTree *ctree,GtkCTreeNode *node - - -gtk_ctree_sort_recursive -void -GtkCTree *ctree,GtkCTreeNode *node - - -GTK_TYPE_CURVE -#define GTK_TYPE_CURVE (gtk_curve_get_type ()) - - -GTK_CURVE -#define GTK_CURVE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CURVE, GtkCurve)) - - -GTK_CURVE_CLASS -#define GTK_CURVE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CURVE, GtkCurveClass)) - - -GTK_IS_CURVE -#define GTK_IS_CURVE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CURVE)) - - -GTK_IS_CURVE_CLASS -#define GTK_IS_CURVE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CURVE)) - - -GtkCurve - - -GtkCurveClass - - -GtkCurve -struct GtkCurve -{ - GtkDrawingArea graph; - - gint cursor_type; - gfloat min_x; - gfloat max_x; - gfloat min_y; - gfloat max_y; - GdkPixmap *pixmap; - GtkCurveType curve_type; - gint height; /* (cached) graph height in pixels */ - gint grab_point; /* point currently grabbed */ - gint last; - - /* (cached) curve points: */ - gint num_points; - GdkPoint *point; - - /* control points: */ - gint num_ctlpoints; /* number of control points */ - gfloat (*ctlpoint)[2]; /* array of control points */ -}; - - -gtk_curve_get_type -GtkType -void - - -gtk_curve_new -GtkWidget * -void - - -gtk_curve_reset -void -GtkCurve *curve - - -gtk_curve_set_gamma -void -GtkCurve *curve, gfloat gamma - - -gtk_curve_set_range -void -GtkCurve *curve,gfloat min_x, gfloat max_x,gfloat min_y, gfloat max_y - - -gtk_curve_get_vector -void -GtkCurve *curve,int veclen, gfloat vector[] - - -gtk_curve_set_vector -void -GtkCurve *curve,int veclen, gfloat vector[] - - -gtk_curve_set_curve_type -void -GtkCurve *curve, GtkCurveType type - - -GTK_TYPE_DATA -#define GTK_TYPE_DATA (gtk_data_get_type ()) - - -GTK_DATA -#define GTK_DATA(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DATA, GtkData)) - - -GTK_DATA_CLASS -#define GTK_DATA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DATA, GtkDataClass)) - - -GTK_IS_DATA -#define GTK_IS_DATA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DATA)) - - -GTK_IS_DATA_CLASS -#define GTK_IS_DATA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATA)) - - -GtkData - - -GtkDataClass - - -GtkData -struct GtkData -{ - GtkObject object; -}; - - -gtk_data_get_type -GtkType -void - - -GtkDebugFlag -typedef enum { - GTK_DEBUG_OBJECTS = 1 << 0, - GTK_DEBUG_MISC = 1 << 1, - GTK_DEBUG_SIGNALS = 1 << 2, - GTK_DEBUG_DND = 1 << 3, - GTK_DEBUG_PLUGSOCKET = 1 << 4 -} GtkDebugFlag; - - -GTK_NOTE -#define GTK_NOTE(type,action) G_STMT_START { \ - if (gtk_debug_flags & GTK_DEBUG_##type) \ - { action; }; } G_STMT_END - - -GTK_NOTE -#define GTK_NOTE(type, action) - - -gtk_debug_flags -extern guint gtk_debug_flags; - - -GTK_TYPE_DIALOG -#define GTK_TYPE_DIALOG (gtk_dialog_get_type ()) - - -GTK_DIALOG -#define GTK_DIALOG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DIALOG, GtkDialog)) - - -GTK_DIALOG_CLASS -#define GTK_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DIALOG, GtkDialogClass)) - - -GTK_IS_DIALOG -#define GTK_IS_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DIALOG)) - - -GTK_IS_DIALOG_CLASS -#define GTK_IS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DIALOG)) - - -GtkDialog - - -GtkDialogClass - - -GtkDialogButton - - -GtkDialog -struct GtkDialog -{ - GtkWindow window; - - GtkWidget *vbox; - GtkWidget *action_area; -}; - - -gtk_dialog_get_type -GtkType -void - - -gtk_dialog_new -GtkWidget * -void - - -GtkDestDefaults -typedef enum { - GTK_DEST_DEFAULT_MOTION = 1 << 0, /* respond to "drag_motion" */ - GTK_DEST_DEFAULT_HIGHLIGHT = 1 << 1, /* auto-highlight */ - GTK_DEST_DEFAULT_DROP = 1 << 2, /* respond to "drag_drop" */ - GTK_DEST_DEFAULT_ALL = 0x07 -} GtkDestDefaults; - - -GtkTargetFlags -typedef enum { - GTK_TARGET_SAME_APP = 1 << 0, /*< nick=same-app >*/ - GTK_TARGET_SAME_WIDGET = 1 << 1 /*< nick=same-widget >*/ -} GtkTargetFlags; - - -gtk_drag_get_data -void -GtkWidget *widget,GdkDragContext *context,GdkAtom target,guint32 time - - -gtk_drag_finish -void -GdkDragContext *context,gboolean success,gboolean del,guint32 time - - -gtk_drag_get_source_widget -GtkWidget * -GdkDragContext *context - - -gtk_drag_highlight -void -GtkWidget *widget - - -gtk_drag_unhighlight -void -GtkWidget *widget - - -gtk_drag_dest_set -void -GtkWidget *widget,GtkDestDefaults flags,const GtkTargetEntry *targets,gint n_targets,GdkDragAction actions - - -gtk_drag_dest_set_proxy -void -GtkWidget *widget,GdkWindow *proxy_window,GdkDragProtocol protocol,gboolean use_coordinates - - -gtk_drag_dest_unset -void -GtkWidget *widget - - -gtk_drag_source_set -void -GtkWidget *widget,GdkModifierType start_button_mask,const GtkTargetEntry *targets,gint n_targets,GdkDragAction actions - - -gtk_drag_source_unset -void -GtkWidget *widget - - -gtk_drag_source_set_icon -void -GtkWidget *widget,GdkColormap *colormap,GdkPixmap *pixmap,GdkBitmap *mask - - -gtk_drag_begin -GdkDragContext * -GtkWidget *widget,GtkTargetList *targets,GdkDragAction actions,gint button,GdkEvent *event - - -gtk_drag_set_icon_widget -void -GdkDragContext *context,GtkWidget *widget,gint hot_x,gint hot_y - - -gtk_drag_set_icon_pixmap -void -GdkDragContext *context,GdkColormap *colormap,GdkPixmap *pixmap,GdkBitmap *mask,gint hot_x,gint hot_y - - -gtk_drag_set_icon_default -void -GdkDragContext *context - - -gtk_drag_set_default_icon -void -GdkColormap *colormap,GdkPixmap *pixmap,GdkBitmap *mask,gint hot_x,gint hot_y - - -gtk_drag_source_handle_event -void -GtkWidget *widget,GdkEvent *event - - -gtk_drag_dest_handle_event -void -GtkWidget *toplevel,GdkEvent *event - - -GTK_TYPE_DRAWING_AREA -#define GTK_TYPE_DRAWING_AREA (gtk_drawing_area_get_type ()) - - -GTK_DRAWING_AREA -#define GTK_DRAWING_AREA(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingArea)) - - -GTK_DRAWING_AREA_CLASS -#define GTK_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass)) - - -GTK_IS_DRAWING_AREA -#define GTK_IS_DRAWING_AREA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DRAWING_AREA)) - - -GTK_IS_DRAWING_AREA_CLASS -#define GTK_IS_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DRAWING_AREA)) - - -GtkDrawingArea - - -GtkDrawingAreaClass - - -GtkDrawingArea -struct GtkDrawingArea -{ - GtkWidget widget; - - gpointer draw_data; -}; - - -gtk_drawing_area_get_type -GtkType -void - - -gtk_drawing_area_new -GtkWidget * -void - - -gtk_drawing_area_size -void -GtkDrawingArea *darea,gint width,gint height - - -GTK_TYPE_EDITABLE -#define GTK_TYPE_EDITABLE (gtk_editable_get_type ()) - - -GTK_EDITABLE -#define GTK_EDITABLE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_EDITABLE, GtkEditable)) - - -GTK_EDITABLE_CLASS -#define GTK_EDITABLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_EDITABLE, GtkEditableClass)) - - -GTK_IS_EDITABLE -#define GTK_IS_EDITABLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_EDITABLE)) - - -GTK_IS_EDITABLE_CLASS -#define GTK_IS_EDITABLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EDITABLE)) - - -GtkEditable - - -GtkEditableClass - - -GtkTextFunction -void -GtkEditable *editable, guint32 time - - -GtkEditable -struct GtkEditable -{ - GtkWidget widget; - - /*< public >*/ - guint current_pos; - - guint selection_start_pos; - guint selection_end_pos; - guint has_selection : 1; - - /*< private >*/ - guint editable : 1; - guint visible : 1; - GdkIC *ic; - GdkICAttr *ic_attr; - - gchar *clipboard_text; -}; - - -gtk_editable_get_type -GtkType -void - - -gtk_editable_select_region -void -GtkEditable *editable,gint start,gint end - - -gtk_editable_insert_text -void -GtkEditable *editable,const gchar *new_text,gint new_text_length,gint *position - - -gtk_editable_delete_text -void -GtkEditable *editable,gint start_pos,gint end_pos - - -gtk_editable_get_chars -gchar * -GtkEditable *editable,gint start_pos,gint end_pos - - -gtk_editable_cut_clipboard -void -GtkEditable *editable - - -gtk_editable_copy_clipboard -void -GtkEditable *editable - - -gtk_editable_paste_clipboard -void -GtkEditable *editable - - -gtk_editable_claim_selection -void -GtkEditable *editable,gboolean claim,guint32 time - - -gtk_editable_delete_selection -void -GtkEditable *editable - - -gtk_editable_changed -void -GtkEditable *editable - - -gtk_editable_set_position -void -GtkEditable *editable,gint position - - -gtk_editable_get_position -gint -GtkEditable *editable - - -gtk_editable_set_editable -void -GtkEditable *editable,gboolean is_editable - - -GTK_TYPE_ENTRY -#define GTK_TYPE_ENTRY (gtk_entry_get_type ()) - - -GTK_ENTRY -#define GTK_ENTRY(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ENTRY, GtkEntry)) - - -GTK_ENTRY_CLASS -#define GTK_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ENTRY, GtkEntryClass)) - - -GTK_IS_ENTRY -#define GTK_IS_ENTRY(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ENTRY)) - - -GTK_IS_ENTRY_CLASS -#define GTK_IS_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ENTRY)) - - -GtkEntry - - -GtkEntryClass - - -GtkEntry -struct GtkEntry -{ - GtkEditable editable; - - GdkWindow *text_area; - GdkPixmap *backing_pixmap; - GdkCursor *cursor; - GdkWChar *text; - - guint16 text_size; /* allocated size */ - guint16 text_length; /* length in use */ - guint16 text_max_length; - gint scroll_offset; - guint visible : 1; /* deprecated - see editable->visible */ - guint32 timer; - guint button; - - /* The x-offset of each character (including the last insertion position) - * only valid when the widget is realized */ - gint *char_offset; - - /* Same as 'text', but in multibyte */ - gchar *text_mb; - /* If true, 'text' and 'text_mb' are not coherent */ - guint text_mb_dirty : 1; - /* If true, we use the encoding of wchar_t as the encoding of 'text'. - * Otherwise we use the encoding of multi-byte characters instead. */ - guint use_wchar : 1; -}; - - -gtk_entry_get_type -GtkType -void - - -gtk_entry_new -GtkWidget * -void - - -gtk_entry_new_with_max_length -GtkWidget * -guint16 max - - -gtk_entry_set_text -void -GtkEntry *entry,const gchar *text - - -gtk_entry_append_text -void -GtkEntry *entry,const gchar *text - - -gtk_entry_prepend_text -void -GtkEntry *entry,const gchar *text - - -gtk_entry_set_position -void -GtkEntry *entry,gint position - - -gtk_entry_get_text -gchar * -GtkEntry *entry - - -gtk_entry_select_region -void -GtkEntry *entry,gint start,gint end - - -gtk_entry_set_visibility -void -GtkEntry *entry,gboolean visible - - -gtk_entry_set_editable -void -GtkEntry *entry,gboolean editable - - -gtk_entry_set_max_length -void -GtkEntry *entry,guint16 max - - -GtkArrowType -typedef enum -{ - GTK_ARROW_UP, - GTK_ARROW_DOWN, - GTK_ARROW_LEFT, - GTK_ARROW_RIGHT -} GtkArrowType; - - -GtkAttachOptions -typedef enum -{ - GTK_EXPAND = 1 << 0, - GTK_SHRINK = 1 << 1, - GTK_FILL = 1 << 2 -} GtkAttachOptions; - - -GtkButtonBoxStyle -typedef enum -{ - GTK_BUTTONBOX_DEFAULT_STYLE, - GTK_BUTTONBOX_SPREAD, - GTK_BUTTONBOX_EDGE, - GTK_BUTTONBOX_START, - GTK_BUTTONBOX_END -} GtkButtonBoxStyle; - - -GtkCurveType -typedef enum -{ - GTK_CURVE_TYPE_LINEAR, /* linear interpolation */ - GTK_CURVE_TYPE_SPLINE, /* spline interpolation */ - GTK_CURVE_TYPE_FREE /* free form curve */ -} GtkCurveType; - - -GtkDirectionType -typedef enum -{ - GTK_DIR_TAB_FORWARD, - GTK_DIR_TAB_BACKWARD, - GTK_DIR_UP, - GTK_DIR_DOWN, - GTK_DIR_LEFT, - GTK_DIR_RIGHT -} GtkDirectionType; - - -GtkJustification -typedef enum -{ - GTK_JUSTIFY_LEFT, - GTK_JUSTIFY_RIGHT, - GTK_JUSTIFY_CENTER, - GTK_JUSTIFY_FILL -} GtkJustification; - - -GtkMatchType -typedef enum -{ - GTK_MATCH_ALL, /* "*A?A*" */ - GTK_MATCH_ALL_TAIL, /* "*A?AA" */ - GTK_MATCH_HEAD, /* "AAAA*" */ - GTK_MATCH_TAIL, /* "*AAAA" */ - GTK_MATCH_EXACT, /* "AAAAA" */ - GTK_MATCH_LAST -} GtkMatchType; - - -GtkMenuDirectionType -typedef enum -{ - GTK_MENU_DIR_PARENT, - GTK_MENU_DIR_CHILD, - GTK_MENU_DIR_NEXT, - GTK_MENU_DIR_PREV -} GtkMenuDirectionType; - - -GtkMenuFactoryType -typedef enum -{ - GTK_MENU_FACTORY_MENU, - GTK_MENU_FACTORY_MENU_BAR, - GTK_MENU_FACTORY_OPTION_MENU -} GtkMenuFactoryType; - - -GtkMetricType -typedef enum -{ - GTK_PIXELS, - GTK_INCHES, - GTK_CENTIMETERS -} GtkMetricType; - - -GtkOrientation -typedef enum -{ - GTK_ORIENTATION_HORIZONTAL, - GTK_ORIENTATION_VERTICAL -} GtkOrientation; - - -GtkCornerType -typedef enum -{ - GTK_CORNER_TOP_LEFT, - GTK_CORNER_BOTTOM_LEFT, - GTK_CORNER_TOP_RIGHT, - GTK_CORNER_BOTTOM_RIGHT -} GtkCornerType; - - -GtkPackType -typedef enum -{ - GTK_PACK_START, - GTK_PACK_END -} GtkPackType; - - -GtkPathPriorityType -typedef enum -{ - GTK_PATH_PRIO_LOWEST = 0, - GTK_PATH_PRIO_GTK = 4, - GTK_PATH_PRIO_APPLICATION = 8, - GTK_PATH_PRIO_RC = 12, - GTK_PATH_PRIO_HIGHEST = 15, - GTK_PATH_PRIO_MASK = 0x0f -} GtkPathPriorityType; - - -GtkPathType -typedef enum -{ - GTK_PATH_WIDGET, - GTK_PATH_WIDGET_CLASS, - GTK_PATH_CLASS -} GtkPathType; - - -GtkPolicyType -typedef enum -{ - GTK_POLICY_ALWAYS, - GTK_POLICY_AUTOMATIC, - GTK_POLICY_NEVER -} GtkPolicyType; - - -GtkPositionType -typedef enum -{ - GTK_POS_LEFT, - GTK_POS_RIGHT, - GTK_POS_TOP, - GTK_POS_BOTTOM -} GtkPositionType; - - -GtkPreviewType -typedef enum -{ - GTK_PREVIEW_COLOR, - GTK_PREVIEW_GRAYSCALE -} GtkPreviewType; - - -GtkReliefStyle -typedef enum -{ - GTK_RELIEF_NORMAL, - GTK_RELIEF_HALF, - GTK_RELIEF_NONE -} GtkReliefStyle; - - -GtkResizeMode -typedef enum -{ - GTK_RESIZE_PARENT, /* Pass resize request to the parent */ - GTK_RESIZE_QUEUE, /* Queue resizes on this widget */ - GTK_RESIZE_IMMEDIATE /* Perform the resizes now */ -} GtkResizeMode; - - -GtkSignalRunType -typedef enum /*< flags >*/ -{ - GTK_RUN_FIRST = 1 << 0, - GTK_RUN_LAST = 1 << 1, - GTK_RUN_BOTH = (GTK_RUN_FIRST | GTK_RUN_LAST), - GTK_RUN_NO_RECURSE = 1 << 2, - GTK_RUN_ACTION = 1 << 3, - GTK_RUN_NO_HOOKS = 1 << 4 -} GtkSignalRunType; - - -GtkScrollType -typedef enum -{ - GTK_SCROLL_NONE, - GTK_SCROLL_STEP_BACKWARD, - GTK_SCROLL_STEP_FORWARD, - GTK_SCROLL_PAGE_BACKWARD, - GTK_SCROLL_PAGE_FORWARD, - GTK_SCROLL_JUMP -} GtkScrollType; - - -GtkSelectionMode -typedef enum -{ - GTK_SELECTION_SINGLE, - GTK_SELECTION_BROWSE, - GTK_SELECTION_MULTIPLE, - GTK_SELECTION_EXTENDED -} GtkSelectionMode; - - -GtkShadowType -typedef enum -{ - GTK_SHADOW_NONE, - GTK_SHADOW_IN, - GTK_SHADOW_OUT, - GTK_SHADOW_ETCHED_IN, - GTK_SHADOW_ETCHED_OUT -} GtkShadowType; - - -GtkStateType -typedef enum -{ - GTK_STATE_NORMAL, - GTK_STATE_ACTIVE, - GTK_STATE_PRELIGHT, - GTK_STATE_SELECTED, - GTK_STATE_INSENSITIVE -} GtkStateType; - - -GtkSubmenuDirection -typedef enum -{ - GTK_DIRECTION_LEFT, - GTK_DIRECTION_RIGHT -} GtkSubmenuDirection; - - -GtkSubmenuPlacement -typedef enum -{ - GTK_TOP_BOTTOM, - GTK_LEFT_RIGHT -} GtkSubmenuPlacement; - - -GtkToolbarStyle -typedef enum -{ - GTK_TOOLBAR_ICONS, - GTK_TOOLBAR_TEXT, - GTK_TOOLBAR_BOTH -} GtkToolbarStyle; - - -GtkTroughType -typedef enum -{ - GTK_TROUGH_NONE, - GTK_TROUGH_START, - GTK_TROUGH_END, - GTK_TROUGH_JUMP -} GtkTroughType; - - -GtkUpdateType -typedef enum -{ - GTK_UPDATE_CONTINUOUS, - GTK_UPDATE_DISCONTINUOUS, - GTK_UPDATE_DELAYED -} GtkUpdateType; - - -GtkVisibility -typedef enum -{ - GTK_VISIBILITY_NONE, - GTK_VISIBILITY_PARTIAL, - GTK_VISIBILITY_FULL -} GtkVisibility; - - -GtkWindowPosition -typedef enum -{ - GTK_WIN_POS_NONE, - GTK_WIN_POS_CENTER, - GTK_WIN_POS_MOUSE -} GtkWindowPosition; - - -GtkWindowType -typedef enum -{ - GTK_WINDOW_TOPLEVEL, - GTK_WINDOW_DIALOG, - GTK_WINDOW_POPUP -} GtkWindowType; - - -GtkSortType -typedef enum -{ - GTK_SORT_ASCENDING, - GTK_SORT_DESCENDING -} GtkSortType; - - -GTK_TYPE_EVENT_BOX -#define GTK_TYPE_EVENT_BOX (gtk_event_box_get_type ()) - - -GTK_EVENT_BOX -#define GTK_EVENT_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_EVENT_BOX, GtkEventBox)) - - -GTK_EVENT_BOX_CLASS -#define GTK_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_EVENT_BOX, GtkEventBoxClass)) - - -GTK_IS_EVENT_BOX -#define GTK_IS_EVENT_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_EVENT_BOX)) - - -GTK_IS_EVENT_BOX_CLASS -#define GTK_IS_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EVENT_BOX)) - - -GtkEventBox - - -GtkEventBoxClass - - -GtkEventBox -struct GtkEventBox -{ - GtkBin bin; -}; - - -gtk_event_box_get_type -GtkType -void - - -gtk_event_box_new -GtkWidget * -void - - -GTK_MAJOR_VERSION -#define GTK_MAJOR_VERSION (1) - - -GTK_MINOR_VERSION -#define GTK_MINOR_VERSION (2) - - -GTK_MICRO_VERSION -#define GTK_MICRO_VERSION (3) - - -GTK_BINARY_AGE -#define GTK_BINARY_AGE (3) - - -GTK_INTERFACE_AGE -#define GTK_INTERFACE_AGE (1) - - -GTK_CHECK_VERSION -#define GTK_CHECK_VERSION(major,minor,micro) \ - (GTK_MAJOR_VERSION > (major) || \ - (GTK_MAJOR_VERSION == (major) && GTK_MINOR_VERSION > (minor)) || \ - (GTK_MAJOR_VERSION == (major) && GTK_MINOR_VERSION == (minor) && \ - GTK_MICRO_VERSION >= (micro))) - - -GTK_HAVE_CONTAINER_FOCUS_ADJUSTMENTS -#define GTK_HAVE_CONTAINER_FOCUS_ADJUSTMENTS 1-0-1 - - -GTK_HAVE_SIGNAL_INIT -#define GTK_HAVE_SIGNAL_INIT 1-0-2 - - -GTK_HAVE_FEATURES_1_1_0 -#define GTK_HAVE_FEATURES_1_1_0 1-1-0 - - -GTK_HAVE_FEATURES_1_1_2 -#define GTK_HAVE_FEATURES_1_1_2 1-1-2 - - -GTK_HAVE_FEATURES_1_1_4 -#define GTK_HAVE_FEATURES_1_1_4 1-1-4 - - -GTK_HAVE_FEATURES_1_1_5 -#define GTK_HAVE_FEATURES_1_1_5 1-1-5 - - -GTK_HAVE_FEATURES_1_1_6 -#define GTK_HAVE_FEATURES_1_1_6 1-1-6 - - -GTK_HAVE_FEATURES_1_1_7 -#define GTK_HAVE_FEATURES_1_1_7 1-1-7 - - -GTK_HAVE_FEATURES_1_1_8 -#define GTK_HAVE_FEATURES_1_1_8 1-1-8 - - -GTK_HAVE_FEATURES_1_1_9 -#define GTK_HAVE_FEATURES_1_1_9 1-1-9 - - -GTK_HAVE_FEATURES_1_1_10 -#define GTK_HAVE_FEATURES_1_1_10 1-1-10 - - -GTK_HAVE_FEATURES_1_1_11 -#define GTK_HAVE_FEATURES_1_1_11 1-1-11 - - -GTK_HAVE_FEATURES_1_1_12 -#define GTK_HAVE_FEATURES_1_1_12 1-1-12 - - -GTK_HAVE_FEATURES_1_1_13 -#define GTK_HAVE_FEATURES_1_1_13 1-1-13 - - -GTK_HAVE_FEATURES_1_1_14 -#define GTK_HAVE_FEATURES_1_1_14 1-1-14 - - -GTK_TYPE_FILE_SELECTION -#define GTK_TYPE_FILE_SELECTION (gtk_file_selection_get_type ()) - - -GTK_FILE_SELECTION -#define GTK_FILE_SELECTION(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FILE_SELECTION, GtkFileSelection)) - - -GTK_FILE_SELECTION_CLASS -#define GTK_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FILE_SELECTION, GtkFileSelectionClass)) - - -GTK_IS_FILE_SELECTION -#define GTK_IS_FILE_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FILE_SELECTION)) - - -GTK_IS_FILE_SELECTION_CLASS -#define GTK_IS_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FILE_SELECTION)) - - -GtkFileSelection - - -GtkFileSelectionClass - - -GtkFileSelection -struct GtkFileSelection -{ - GtkWindow window; - - GtkWidget *dir_list; - GtkWidget *file_list; - GtkWidget *selection_entry; - GtkWidget *selection_text; - GtkWidget *main_vbox; - GtkWidget *ok_button; - GtkWidget *cancel_button; - GtkWidget *help_button; - GtkWidget *history_pulldown; - GtkWidget *history_menu; - GList *history_list; - GtkWidget *fileop_dialog; - GtkWidget *fileop_entry; - gchar *fileop_file; - gpointer cmpl_state; - - GtkWidget *fileop_c_dir; - GtkWidget *fileop_del_file; - GtkWidget *fileop_ren_file; - - GtkWidget *button_area; - GtkWidget *action_area; - -}; - - -gtk_file_selection_get_type -GtkType -void - - -gtk_file_selection_new -GtkWidget * -const gchar *title - - -gtk_file_selection_set_filename -void -GtkFileSelection *filesel,const gchar *filename - - -gtk_file_selection_get_filename -gchar * -GtkFileSelection *filesel - - -gtk_file_selection_complete -void -GtkFileSelection *filesel,const gchar *pattern - - -gtk_file_selection_show_fileop_buttons -void -GtkFileSelection *filesel - - -gtk_file_selection_hide_fileop_buttons -void -GtkFileSelection *filesel - - -GTK_TYPE_FIXED -#define GTK_TYPE_FIXED (gtk_fixed_get_type ()) - - -GTK_FIXED -#define GTK_FIXED(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FIXED, GtkFixed)) - - -GTK_FIXED_CLASS -#define GTK_FIXED_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FIXED, GtkFixedClass)) - - -GTK_IS_FIXED -#define GTK_IS_FIXED(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FIXED)) - - -GTK_IS_FIXED_CLASS -#define GTK_IS_FIXED_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FIXED)) - - -GtkFixed - - -GtkFixedClass - - -GtkFixedChild - - -GtkFixed -struct GtkFixed -{ - GtkContainer container; - - GList *children; -}; - - -GtkFixedChild -struct GtkFixedChild -{ - GtkWidget *widget; - gint16 x; - gint16 y; -}; - - -gtk_fixed_get_type -GtkType -void - - -gtk_fixed_new -GtkWidget * -void - - -gtk_fixed_put -void -GtkFixed *fixed,GtkWidget *widget,gint16 x,gint16 y - - -gtk_fixed_move -void -GtkFixed *fixed,GtkWidget *widget,gint16 x,gint16 y - - -GTK_TYPE_FONT_SELECTION -#define GTK_TYPE_FONT_SELECTION (gtk_font_selection_get_type ()) - - -GTK_FONT_SELECTION -#define GTK_FONT_SELECTION(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION, GtkFontSelection)) - - -GTK_FONT_SELECTION_CLASS -#define GTK_FONT_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION, GtkFontSelectionClass)) - - -GTK_IS_FONT_SELECTION -#define GTK_IS_FONT_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION)) - - -GTK_IS_FONT_SELECTION_CLASS -#define GTK_IS_FONT_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FONT_SELECTION)) - - -GTK_TYPE_FONT_SELECTION_DIALOG -#define GTK_TYPE_FONT_SELECTION_DIALOG (gtk_font_selection_dialog_get_type ()) - - -GTK_FONT_SELECTION_DIALOG -#define GTK_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialog)) - - -GTK_FONT_SELECTION_DIALOG_CLASS -#define GTK_FONT_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialogClass)) - - -GTK_IS_FONT_SELECTION_DIALOG -#define GTK_IS_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION_DIALOG)) - - -GTK_IS_FONT_SELECTION_DIALOG_CLASS -#define GTK_IS_FONT_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FONT_SELECTION_DIALOG)) - - -GtkFontSelection - - -GtkFontSelectionClass - - -GtkFontSelectionDialog - - -GtkFontSelectionDialogClass - - -GTK_NUM_FONT_PROPERTIES -#define GTK_NUM_FONT_PROPERTIES 6 - - -GTK_NUM_STYLE_PROPERTIES -#define GTK_NUM_STYLE_PROPERTIES 5 - - -GtkFontMetricType -typedef enum -{ - GTK_FONT_METRIC_PIXELS, - GTK_FONT_METRIC_POINTS -} GtkFontMetricType; - - -GtkFontType -typedef enum -{ - GTK_FONT_BITMAP = 1 << 0, - GTK_FONT_SCALABLE = 1 << 1, - GTK_FONT_SCALABLE_BITMAP = 1 << 2, - - GTK_FONT_ALL = 0x07 -} GtkFontType; - - -GTK_NUM_FONT_FILTERS -#define GTK_NUM_FONT_FILTERS 2 - - -GtkFontFilterType -typedef enum -{ - GTK_FONT_FILTER_BASE, - GTK_FONT_FILTER_USER -} GtkFontFilterType; - - -GtkFontFilter - - -GtkFontFilter -struct GtkFontFilter -{ - gint font_type; - guint16 *property_filters[GTK_NUM_FONT_PROPERTIES]; - guint16 property_nfilters[GTK_NUM_FONT_PROPERTIES]; -}; - - -GtkFontSelection -struct GtkFontSelection -{ - GtkNotebook notebook; - - /* These are on the font page. */ - GtkWidget *main_vbox; - GtkWidget *font_label; - GtkWidget *font_entry; - GtkWidget *font_clist; - GtkWidget *font_style_entry; - GtkWidget *font_style_clist; - GtkWidget *size_entry; - GtkWidget *size_clist; - GtkWidget *pixels_button; - GtkWidget *points_button; - GtkWidget *filter_button; - GtkWidget *preview_entry; - GtkWidget *message_label; - - /* These are on the font info page. */ - GtkWidget *info_vbox; - GtkWidget *info_clist; - GtkWidget *requested_font_name; - GtkWidget *actual_font_name; - - /* These are on the filter page. */ - GtkWidget *filter_vbox; - GtkWidget *type_bitmaps_button; - GtkWidget *type_scalable_button; - GtkWidget *type_scaled_bitmaps_button; - GtkWidget *filter_clists[GTK_NUM_FONT_PROPERTIES]; - - GdkFont *font; - gint font_index; - gint style; - GtkFontMetricType metric; - /* The size is either in pixels or deci-points, depending on the metric. */ - gint size; - - /* This is the last size explicitly selected. When the user selects different - fonts we try to find the nearest size to this. */ - gint selected_size; - - /* These are the current property settings. They are indexes into the - strings in the GtkFontSelInfo properties array. */ - guint16 property_values[GTK_NUM_STYLE_PROPERTIES]; - - /* These are the base and user font filters. */ - GtkFontFilter filters[GTK_NUM_FONT_FILTERS]; -}; - - -GtkFontSelectionDialog -struct GtkFontSelectionDialog -{ - GtkWindow window; - - GtkWidget *fontsel; - - GtkWidget *main_vbox; - GtkWidget *action_area; - GtkWidget *ok_button; - /* The 'Apply' button is not shown by default but you can show/hide it. */ - GtkWidget *apply_button; - GtkWidget *cancel_button; - - /* If the user changes the width of the dialog, we turn auto-shrink off. */ - gint dialog_width; - gboolean auto_resize; -}; - - -gtk_font_selection_get_type -GtkType -void - - -gtk_font_selection_new -GtkWidget * -void - - -gtk_font_selection_get_font_name -gchar * -GtkFontSelection *fontsel - - -gtk_font_selection_get_font -GdkFont * -GtkFontSelection *fontsel - - -gtk_font_selection_set_font_name -gboolean -GtkFontSelection *fontsel,const gchar *fontname - - -gtk_font_selection_set_filter -void -GtkFontSelection *fontsel,GtkFontFilterType filter_type,GtkFontType font_type,gchar **foundries,gchar **weights,gchar **slants,gchar **setwidths,gchar **spacings,gchar **charsets - - -gtk_font_selection_get_preview_text -gchar * -GtkFontSelection *fontsel - - -gtk_font_selection_set_preview_text -void -GtkFontSelection *fontsel,const gchar *text - - -gtk_font_selection_dialog_get_type -GtkType -void - - -gtk_font_selection_dialog_new -GtkWidget * -const gchar *title - - -gtk_font_selection_dialog_get_font_name -gchar * -GtkFontSelectionDialog *fsd - - -gtk_font_selection_dialog_get_font -GdkFont * -GtkFontSelectionDialog *fsd - - -gtk_font_selection_dialog_set_font_name -gboolean -GtkFontSelectionDialog *fsd,const gchar *fontname - - -gtk_font_selection_dialog_set_filter -void -GtkFontSelectionDialog *fsd,GtkFontFilterType filter_type,GtkFontType font_type,gchar **foundries,gchar **weights,gchar **slants,gchar **setwidths,gchar **spacings,gchar **charsets - - -gtk_font_selection_dialog_get_preview_text -gchar * -GtkFontSelectionDialog *fsd - - -gtk_font_selection_dialog_set_preview_text -void -GtkFontSelectionDialog *fsd,const gchar *text - - -GTK_TYPE_FRAME -#define GTK_TYPE_FRAME (gtk_frame_get_type ()) - - -GTK_FRAME -#define GTK_FRAME(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FRAME, GtkFrame)) - - -GTK_FRAME_CLASS -#define GTK_FRAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FRAME, GtkFrameClass)) - - -GTK_IS_FRAME -#define GTK_IS_FRAME(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FRAME)) - - -GTK_IS_FRAME_CLASS -#define GTK_IS_FRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FRAME)) - - -GtkFrame - - -GtkFrameClass - - -GtkFrame -struct GtkFrame -{ - GtkBin bin; - - gchar *label; - gint16 shadow_type; - gint16 label_width; - gint16 label_height; - gfloat label_xalign; - gfloat label_yalign; -}; - - -gtk_frame_get_type -GtkType -void - - -gtk_frame_new -GtkWidget * -const gchar *label - - -gtk_frame_set_label -void -GtkFrame *frame,const gchar *label - - -gtk_frame_set_label_align -void -GtkFrame *frame,gfloat xalign,gfloat yalign - - -gtk_frame_set_shadow_type -void -GtkFrame *frame,GtkShadowType type - - -GTK_GAMMA_CURVE -#define GTK_GAMMA_CURVE(obj) \ - GTK_CHECK_CAST (obj, gtk_gamma_curve_get_type (), GtkGammaCurve) - - -GTK_GAMMA_CURVE_CLASS -#define GTK_GAMMA_CURVE_CLASS(klass) \ - GTK_CHECK_CLASS_CAST (klass, gtk_gamma_curve_get_type, GtkGammaCurveClass) - - -GTK_IS_GAMMA_CURVE -#define GTK_IS_GAMMA_CURVE(obj) \ - GTK_CHECK_TYPE (obj, gtk_gamma_curve_get_type ()) - - -GtkGammaCurve - - -GtkGammaCurveClass - - -GtkGammaCurve -struct GtkGammaCurve -{ - GtkVBox vbox; - - GtkWidget *table; - GtkWidget *curve; - GtkWidget *button[5]; /* spline, linear, free, gamma, reset */ - - gfloat gamma; - GtkWidget *gamma_dialog; - GtkWidget *gamma_text; -}; - - -gtk_gamma_curve_get_type -guint -void - - -gtk_gamma_curve_new -GtkWidget * -void - - -gtk_gc_get -GdkGC * -gint depth,GdkColormap *colormap,GdkGCValues *values,GdkGCValuesMask values_mask - - -gtk_gc_release -void -GdkGC *gc - - -GTK_HANDLE_BOX -#define GTK_HANDLE_BOX(obj) GTK_CHECK_CAST (obj, gtk_handle_box_get_type (), GtkHandleBox) - - -GTK_HANDLE_BOX_CLASS -#define GTK_HANDLE_BOX_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_handle_box_get_type (), GtkHandleBoxClass) - - -GTK_IS_HANDLE_BOX -#define GTK_IS_HANDLE_BOX(obj) GTK_CHECK_TYPE (obj, gtk_handle_box_get_type ()) - - -GtkHandleBox - - -GtkHandleBoxClass - - -GtkHandleBox -struct GtkHandleBox -{ - GtkBin bin; - - GdkWindow *bin_window; /* parent window for children */ - GdkWindow *float_window; - GtkShadowType shadow_type; - guint handle_position : 2; - guint float_window_mapped : 1; - guint child_detached : 1; - guint in_drag : 1; - guint shrink_on_detach : 1; - - gint snap_edge : 3; /* -1 == unset */ - - /* Variables used during a drag - */ - gint deskoff_x, deskoff_y; /* Offset between root relative coordinates - * and deskrelative coordinates */ - GtkAllocation attach_allocation; - GtkAllocation float_allocation; -}; - - -gtk_handle_box_get_type -guint -void - - -gtk_handle_box_new -GtkWidget * -void - - -gtk_handle_box_set_shadow_type -void -GtkHandleBox *handle_box,GtkShadowType type - - -gtk_handle_box_set_handle_position -void -GtkHandleBox *handle_box,GtkPositionType position - - -gtk_handle_box_set_snap_edge -void -GtkHandleBox *handle_box,GtkPositionType edge - - -GTK_HBUTTON_BOX -#define GTK_HBUTTON_BOX(obj) GTK_CHECK_CAST (obj, gtk_hbutton_box_get_type (), GtkHButtonBox) - - -GTK_HBUTTON_BOX_CLASS -#define GTK_HBUTTON_BOX_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_hbutton_box_get_type (), GtkHButtonBoxClass) - - -GTK_IS_HBUTTON_BOX -#define GTK_IS_HBUTTON_BOX(obj) GTK_CHECK_TYPE (obj, gtk_hbutton_box_get_type ()) - - -GtkHButtonBox - - -GtkHButtonBoxClass - - -GtkHButtonBox -struct GtkHButtonBox -{ - GtkButtonBox button_box; -}; - - -gtk_hbutton_box_get_type -guint -void - - -gtk_hbutton_box_new -GtkWidget * -void - - -gtk_hbutton_box_get_spacing_default -gint -void - - -gtk_hbutton_box_get_layout_default -GtkButtonBoxStyle -void - - -gtk_hbutton_box_set_spacing_default -void -gint spacing - - -gtk_hbutton_box_set_layout_default -void -GtkButtonBoxStyle layout - - -GTK_TYPE_HBOX -#define GTK_TYPE_HBOX (gtk_hbox_get_type ()) - - -GTK_HBOX -#define GTK_HBOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HBOX, GtkHBox)) - - -GTK_HBOX_CLASS -#define GTK_HBOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HBOX, GtkHBoxClass)) - - -GTK_IS_HBOX -#define GTK_IS_HBOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HBOX)) - - -GTK_IS_HBOX_CLASS -#define GTK_IS_HBOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HBOX)) - - -GtkHBox - - -GtkHBoxClass - - -GtkHBox -struct GtkHBox -{ - GtkBox box; -}; - - -gtk_hbox_get_type -GtkType -void - - -gtk_hbox_new -GtkWidget * -gboolean homogeneous,gint spacing - - -GTK_HPANED -#define GTK_HPANED(obj) GTK_CHECK_CAST (obj, gtk_hpaned_get_type (), GtkHPaned) - - -GTK_HPANED_CLASS -#define GTK_HPANED_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_hpaned_get_type (), GtkHPanedClass) - - -GTK_IS_HPANED -#define GTK_IS_HPANED(obj) GTK_CHECK_TYPE (obj, gtk_hpaned_get_type ()) - - -GtkHPaned - - -GtkHPanedClass - - -GtkHPaned -struct GtkHPaned -{ - GtkPaned paned; -}; - - -gtk_hpaned_get_type -guint -void - - -gtk_hpaned_new -GtkWidget * -void - - -GTK_HRULER -#define GTK_HRULER(obj) GTK_CHECK_CAST (obj, gtk_hruler_get_type (), GtkHRuler) - - -GTK_HRULER_CLASS -#define GTK_HRULER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_hruler_get_type (), GtkHRulerClass) - - -GTK_IS_HRULER -#define GTK_IS_HRULER(obj) GTK_CHECK_TYPE (obj, gtk_hruler_get_type ()) - - -GtkHRuler - - -GtkHRulerClass - - -GtkHRuler -struct GtkHRuler -{ - GtkRuler ruler; -}; - - -gtk_hruler_get_type -guint -void - - -gtk_hruler_new -GtkWidget * -void - - -GTK_TYPE_HSCALE -#define GTK_TYPE_HSCALE (gtk_hscale_get_type ()) - - -GTK_HSCALE -#define GTK_HSCALE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HSCALE, GtkHScale)) - - -GTK_HSCALE_CLASS -#define GTK_HSCALE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSCALE, GtkHScaleClass)) - - -GTK_IS_HSCALE -#define GTK_IS_HSCALE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HSCALE)) - - -GTK_IS_HSCALE_CLASS -#define GTK_IS_HSCALE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSCALE)) - - -GtkHScale - - -GtkHScaleClass - - -GtkHScale -struct GtkHScale -{ - GtkScale scale; -}; - - -gtk_hscale_get_type -GtkType -void - - -gtk_hscale_new -GtkWidget * -GtkAdjustment *adjustment - - -GTK_TYPE_HSCROLLBAR -#define GTK_TYPE_HSCROLLBAR (gtk_hscrollbar_get_type ()) - - -GTK_HSCROLLBAR -#define GTK_HSCROLLBAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HSCROLLBAR, GtkHScrollbar)) - - -GTK_HSCROLLBAR_CLASS -#define GTK_HSCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSCROLLBAR, GtkHScrollbarClass)) - - -GTK_IS_HSCROLLBAR -#define GTK_IS_HSCROLLBAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HSCROLLBAR)) - - -GTK_IS_HSCROLLBAR_CLASS -#define GTK_IS_HSCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSCROLLBAR)) - - -GtkHScrollbar - - -GtkHScrollbarClass - - -GtkHScrollbar -struct GtkHScrollbar -{ - GtkScrollbar scrollbar; -}; - - -gtk_hscrollbar_get_type -GtkType -void - - -gtk_hscrollbar_new -GtkWidget * -GtkAdjustment *adjustment - - -GTK_TYPE_HSEPARATOR -#define GTK_TYPE_HSEPARATOR (gtk_hseparator_get_type ()) - - -GTK_HSEPARATOR -#define GTK_HSEPARATOR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_HSEPARATOR, GtkHSeparator)) - - -GTK_HSEPARATOR_CLASS -#define GTK_HSEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSEPARATOR, GtkHSeparatorClass)) - - -GTK_IS_HSEPARATOR -#define GTK_IS_HSEPARATOR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_HSEPARATOR)) - - -GTK_IS_HSEPARATOR_CLASS -#define GTK_IS_HSEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSEPARATOR)) - - -GtkHSeparator - - -GtkHSeparatorClass - - -GtkHSeparator -struct GtkHSeparator -{ - GtkSeparator separator; -}; - - -gtk_hseparator_get_type -GtkType -void - - -gtk_hseparator_new -GtkWidget * -void - - -GTK_TYPE_IMAGE -#define GTK_TYPE_IMAGE (gtk_image_get_type ()) - - -GTK_IMAGE -#define GTK_IMAGE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_IMAGE, GtkImage)) - - -GTK_IMAGE_CLASS -#define GTK_IMAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IMAGE, GtkImageClass)) - - -GTK_IS_IMAGE -#define GTK_IS_IMAGE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_IMAGE)) - - -GTK_IS_IMAGE_CLASS -#define GTK_IS_IMAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IMAGE)) - - -GtkImage - - -GtkImageClass - - -GtkImage -struct GtkImage -{ - GtkMisc misc; - - GdkImage *image; - GdkBitmap *mask; -}; - - -gtk_image_get_type -GtkType -void - - -gtk_image_new -GtkWidget * -GdkImage *val,GdkBitmap *mask - - -gtk_image_set -void -GtkImage *image,GdkImage *val,GdkBitmap *mask - - -gtk_image_get -void -GtkImage *image,GdkImage **val,GdkBitmap **mask - - -GTK_TYPE_INPUT_DIALOG -#define GTK_TYPE_INPUT_DIALOG (gtk_input_dialog_get_type ()) - - -GTK_INPUT_DIALOG -#define GTK_INPUT_DIALOG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_INPUT_DIALOG, GtkInputDialog)) - - -GTK_INPUT_DIALOG_CLASS -#define GTK_INPUT_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_INPUT_DIALOG, GtkInputDialogClass)) - - -GTK_IS_INPUT_DIALOG -#define GTK_IS_INPUT_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_INPUT_DIALOG)) - - -GTK_IS_INPUT_DIALOG_CLASS -#define GTK_IS_INPUT_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_INPUT_DIALOG)) - - -GtkInputDialog - - -GtkInputDialogClass - - -GtkInputDialog -struct GtkInputDialog -{ - GtkDialog dialog; - - GtkWidget *axis_list; - GtkWidget *axis_listbox; - GtkWidget *mode_optionmenu; - - GtkWidget *close_button; - GtkWidget *save_button; - - GtkWidget *axis_items[GDK_AXIS_LAST]; - guint32 current_device; - - GtkWidget *keys_list; - GtkWidget *keys_listbox; -}; - - -gtk_input_dialog_get_type -GtkType -void - - -gtk_input_dialog_new -GtkWidget * -void - - -GTK_TYPE_INVISIBLE -#define GTK_TYPE_INVISIBLE (gtk_invisible_get_type ()) - - -GTK_INVISIBLE -#define GTK_INVISIBLE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_INVISIBLE, GtkInvisible)) - - -GTK_INVISIBLE_CLASS -#define GTK_INVISIBLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_INVISIBLE, GtkInvisibleClass)) - - -GTK_IS_INVISIBLE -#define GTK_IS_INVISIBLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_INVISIBLE)) - - -GTK_IS_INVISIBLE_CLASS -#define GTK_IS_INVISIBLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_INVISIBLE)) - - -GtkInvisible - - -GtkInvisibleClass - - -GtkInvisible -struct GtkInvisible -{ - GtkBin bin; -}; - - -gtk_invisible_get_type -GtkType -void - - -gtk_invisible_new -GtkWidget * -void - - -GTK_TYPE_ITEM -#define GTK_TYPE_ITEM (gtk_item_get_type ()) - - -GTK_ITEM -#define GTK_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ITEM, GtkItem)) - - -GTK_ITEM_CLASS -#define GTK_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ITEM, GtkItemClass)) - - -GTK_IS_ITEM -#define GTK_IS_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ITEM)) - - -GTK_IS_ITEM_CLASS -#define GTK_IS_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ITEM)) - - -GtkItem - - -GtkItemClass - - -GtkItem -struct GtkItem -{ - GtkBin bin; -}; - - -gtk_item_get_type -GtkType -void - - -gtk_item_select -void -GtkItem *item - - -gtk_item_deselect -void -GtkItem *item - - -gtk_item_toggle -void -GtkItem *item - - -GtkPrintFunc -void -gpointer func_data, - gchar *str - - -GtkTranslateFunc -gchar * -const gchar *path, - gpointer func_data - - -GtkItemFactoryCallback -void - - - -GtkItemFactoryCallback1 -void -gpointer callback_data, - guint callback_action, - GtkWidget *widget - - -GTK_TYPE_ITEM_FACTORY -#define GTK_TYPE_ITEM_FACTORY (gtk_item_factory_get_type ()) - - -GTK_ITEM_FACTORY -#define GTK_ITEM_FACTORY(object) (GTK_CHECK_CAST (object, GTK_TYPE_ITEM_FACTORY, GtkItemFactory)) - - -GTK_ITEM_FACTORY_CLASS -#define GTK_ITEM_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, GTK_TYPE_ITEM_FACTORY, GtkItemFactoryClass)) - - -GTK_IS_ITEM_FACTORY -#define GTK_IS_ITEM_FACTORY(object) (GTK_CHECK_TYPE (object, GTK_TYPE_ITEM_FACTORY)) - - -GTK_IS_ITEM_FACTORY_CLASS -#define GTK_IS_ITEM_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ITEM_FACTORY)) - - -GtkItemFactory - - -GtkItemFactoryClass - - -GtkItemFactoryEntry - - -GtkItemFactoryItem - - -GtkItemFactory -struct GtkItemFactory -{ - GtkObject object; - - gchar *path; - GtkAccelGroup *accel_group; - GtkWidget *widget; - GSList *items; - - GtkTranslateFunc translate_func; - gpointer translate_data; - GtkDestroyNotify translate_notify; -}; - - -GtkItemFactoryEntry -struct GtkItemFactoryEntry -{ - gchar *path; - gchar *accelerator; - - GtkItemFactoryCallback callback; - guint callback_action; - - /* possible values: - * NULL -> "" - * "" -> "" - * "" -> create a title item - * "<Item>" -> create a simple item - * "<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 - * "<Branch>" -> create an item to hold sub items - * "<LastBranch>" -> create a right justified item to hold sub items - */ - gchar *item_type; -}; -</STRUCT> -<STRUCT> -<NAME>GtkItemFactoryItem</NAME> -struct GtkItemFactoryItem -{ - gchar *path; - guint accelerator_key; - guint accelerator_mods; - guint modified : 1; - guint in_propagation : 1; - gchar *dummy; - - GSList *widgets; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_item_factory_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_new</NAME> -<RETURNS>GtkItemFactory *</RETURNS> -GtkType container_type,const gchar *path,GtkAccelGroup *accel_group -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_construct</NAME> -<RETURNS>void </RETURNS> -GtkItemFactory *ifactory,GtkType container_type,const gchar *path,GtkAccelGroup *accel_group -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_parse_rc</NAME> -<RETURNS>void </RETURNS> -const gchar *file_name -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_parse_rc_string</NAME> -<RETURNS>void </RETURNS> -const gchar *rc_string -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_parse_rc_scanner</NAME> -<RETURNS>void </RETURNS> -GScanner *scanner -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_add_foreign</NAME> -<RETURNS>void </RETURNS> -GtkWidget *accel_widget,const gchar *full_path,GtkAccelGroup *accel_group,guint keyval,GdkModifierType modifiers -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_from_widget</NAME> -<RETURNS>GtkItemFactory *</RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_path_from_widget</NAME> -<RETURNS>gchar *</RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_get_item</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkItemFactory *ifactory,const gchar *path -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_get_widget</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkItemFactory *ifactory,const gchar *path -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_get_widget_by_action</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkItemFactory *ifactory,guint action -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_get_item_by_action</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkItemFactory *ifactory,guint action -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_dump_items</NAME> -<RETURNS>void </RETURNS> -GtkPatternSpec *path_pspec,gboolean modified_only,GtkPrintFunc print_func,gpointer func_data -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_dump_rc</NAME> -<RETURNS>void </RETURNS> -const gchar *file_name,GtkPatternSpec *path_pspec,gboolean modified_only -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_print_func</NAME> -<RETURNS>void </RETURNS> -gpointer FILE_pointer,gchar *string -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_create_item</NAME> -<RETURNS>void </RETURNS> -GtkItemFactory *ifactory,GtkItemFactoryEntry *entry,gpointer callback_data,guint callback_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_create_items</NAME> -<RETURNS>void </RETURNS> -GtkItemFactory *ifactory,guint n_entries,GtkItemFactoryEntry *entries,gpointer callback_data -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_delete_item</NAME> -<RETURNS>void </RETURNS> -GtkItemFactory *ifactory,const gchar *path -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_delete_entry</NAME> -<RETURNS>void </RETURNS> -GtkItemFactory *ifactory,GtkItemFactoryEntry *entry -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_delete_entries</NAME> -<RETURNS>void </RETURNS> -GtkItemFactory *ifactory,guint n_entries,GtkItemFactoryEntry *entries -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_popup</NAME> -<RETURNS>void </RETURNS> -GtkItemFactory *ifactory,guint x,guint y,guint mouse_button,guint32 time -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_popup_with_data</NAME> -<RETURNS>void </RETURNS> -GtkItemFactory *ifactory,gpointer popup_data,GtkDestroyNotify destroy,guint x,guint y,guint mouse_button,guint32 time -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_popup_data</NAME> -<RETURNS>gpointer </RETURNS> -GtkItemFactory *ifactory -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_popup_data_from_widget</NAME> -<RETURNS>gpointer </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_set_translate_func</NAME> -<RETURNS>void </RETURNS> -GtkItemFactory *ifactory,GtkTranslateFunc func,gpointer data,GtkDestroyNotify notify -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_from_path</NAME> -<RETURNS>GtkItemFactory *</RETURNS> -const gchar *path -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_create_menu_entries</NAME> -<RETURNS>void </RETURNS> -guint n_entries,GtkMenuEntry *entries -</FUNCTION> -<FUNCTION> -<NAME>gtk_item_factories_path_delete</NAME> -<RETURNS>void </RETURNS> -const gchar *ifactory_path,const gchar *path -</FUNCTION> -<USER_FUNCTION> -<NAME>GtkItemFactoryCallback2</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget, - gpointer callback_data, - guint callback_action -</USER_FUNCTION> -<FUNCTION> -<NAME>gtk_item_factory_create_items_ac</NAME> -<RETURNS>void </RETURNS> -GtkItemFactory *ifactory,guint n_entries,GtkItemFactoryEntry *entries,gpointer callback_data,guint callback_type -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_LABEL</NAME> -#define GTK_TYPE_LABEL (gtk_label_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_LABEL</NAME> -#define GTK_LABEL(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_LABEL, GtkLabel)) -</MACRO> -<MACRO> -<NAME>GTK_LABEL_CLASS</NAME> -#define GTK_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_LABEL, GtkLabelClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_LABEL</NAME> -#define GTK_IS_LABEL(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_LABEL)) -</MACRO> -<MACRO> -<NAME>GTK_IS_LABEL_CLASS</NAME> -#define GTK_IS_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LABEL)) -</MACRO> -<STRUCT> -<NAME>GtkLabel</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkLabelClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkLabelWord</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkLabel</NAME> -struct GtkLabel -{ - GtkMisc misc; - - gchar *label; - GdkWChar *label_wc; - gchar *pattern; - - GtkLabelWord *words; - - guint max_width : 16; - guint jtype : 2; - gboolean wrap; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_label_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_label_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -const gchar *str -</FUNCTION> -<FUNCTION> -<NAME>gtk_label_set_text</NAME> -<RETURNS>void </RETURNS> -GtkLabel *label,const gchar *str -</FUNCTION> -<FUNCTION> -<NAME>gtk_label_set_justify</NAME> -<RETURNS>void </RETURNS> -GtkLabel *label,GtkJustification jtype -</FUNCTION> -<FUNCTION> -<NAME>gtk_label_set_pattern</NAME> -<RETURNS>void </RETURNS> -GtkLabel *label,const gchar *pattern -</FUNCTION> -<FUNCTION> -<NAME>gtk_label_set_line_wrap</NAME> -<RETURNS>void </RETURNS> -GtkLabel *label,gboolean wrap -</FUNCTION> -<FUNCTION> -<NAME>gtk_label_get</NAME> -<RETURNS>void </RETURNS> -GtkLabel *label,gchar **str -</FUNCTION> -<FUNCTION> -<NAME>gtk_label_parse_uline</NAME> -<RETURNS>guint </RETURNS> -GtkLabel *label,const gchar *string -</FUNCTION> -<MACRO> -<NAME>gtk_label_set</NAME> -# define gtk_label_set gtk_label_set_text -</MACRO> -<MACRO> -<NAME>GTK_TYPE_LAYOUT</NAME> -#define GTK_TYPE_LAYOUT (gtk_layout_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_LAYOUT</NAME> -#define GTK_LAYOUT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_LAYOUT, GtkLayout)) -</MACRO> -<MACRO> -<NAME>GTK_LAYOUT_CLASS</NAME> -#define GTK_LAYOUT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_LAYOUT, GtkLayoutClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_LAYOUT</NAME> -#define GTK_IS_LAYOUT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_LAYOUT)) -</MACRO> -<MACRO> -<NAME>GTK_IS_LAYOUT_CLASS</NAME> -#define GTK_IS_LAYOUT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LAYOUT)) -</MACRO> -<STRUCT> -<NAME>GtkLayout</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkLayoutClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkLayout</NAME> -struct GtkLayout { - GtkContainer container; - - GList *children; - - guint width; - guint height; - - guint xoffset; - guint yoffset; - - GtkAdjustment *hadjustment; - GtkAdjustment *vadjustment; - - GdkWindow *bin_window; - - GdkVisibilityState visibility; - gulong configure_serial; - gint scroll_x; - gint scroll_y; - - guint freeze_count; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_layout_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_layout_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkAdjustment *hadjustment,GtkAdjustment *vadjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_layout_put</NAME> -<RETURNS>void </RETURNS> -GtkLayout *layout,GtkWidget *widget,gint x,gint y -</FUNCTION> -<FUNCTION> -<NAME>gtk_layout_move</NAME> -<RETURNS>void </RETURNS> -GtkLayout *layout,GtkWidget *widget,gint x,gint y -</FUNCTION> -<FUNCTION> -<NAME>gtk_layout_set_size</NAME> -<RETURNS>void </RETURNS> -GtkLayout *layout,guint width,guint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_layout_get_hadjustment</NAME> -<RETURNS>GtkAdjustment *</RETURNS> -GtkLayout *layout -</FUNCTION> -<FUNCTION> -<NAME>gtk_layout_get_vadjustment</NAME> -<RETURNS>GtkAdjustment *</RETURNS> -GtkLayout *layout -</FUNCTION> -<FUNCTION> -<NAME>gtk_layout_set_hadjustment</NAME> -<RETURNS>void </RETURNS> -GtkLayout *layout,GtkAdjustment *adjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_layout_set_vadjustment</NAME> -<RETURNS>void </RETURNS> -GtkLayout *layout,GtkAdjustment *adjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_layout_freeze</NAME> -<RETURNS>void </RETURNS> -GtkLayout *layout -</FUNCTION> -<FUNCTION> -<NAME>gtk_layout_thaw</NAME> -<RETURNS>void </RETURNS> -GtkLayout *layout -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_LIST</NAME> -#define GTK_TYPE_LIST (gtk_list_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_LIST</NAME> -#define GTK_LIST(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_LIST, GtkList)) -</MACRO> -<MACRO> -<NAME>GTK_LIST_CLASS</NAME> -#define GTK_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_LIST, GtkListClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_LIST</NAME> -#define GTK_IS_LIST(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_LIST)) -</MACRO> -<MACRO> -<NAME>GTK_IS_LIST_CLASS</NAME> -#define GTK_IS_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LIST)) -</MACRO> -<STRUCT> -<NAME>GtkList</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkListClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkList</NAME> -struct GtkList -{ - GtkContainer container; - - GList *children; - GList *selection; - - GList *undo_selection; - GList *undo_unselection; - - GtkWidget *last_focus_child; - GtkWidget *undo_focus_child; - - guint htimer; - guint vtimer; - - gint anchor; - gint drag_pos; - GtkStateType anchor_state; - - guint selection_mode : 2; - guint drag_selection:1; - guint add_mode:1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_list_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_insert_items</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GList *items,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_append_items</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GList *items -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_prepend_items</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GList *items -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_remove_items</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GList *items -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_remove_items_no_unref</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GList *items -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_clear_items</NAME> -<RETURNS>void </RETURNS> -GtkList *list,gint start,gint end -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_select_item</NAME> -<RETURNS>void </RETURNS> -GtkList *list,gint item -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_unselect_item</NAME> -<RETURNS>void </RETURNS> -GtkList *list,gint item -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_select_child</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_unselect_child</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_child_position</NAME> -<RETURNS>gint </RETURNS> -GtkList *list,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_set_selection_mode</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GtkSelectionMode mode -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_extend_selection</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GtkScrollType scroll_type,gfloat position,gboolean auto_start_selection -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_start_selection</NAME> -<RETURNS>void </RETURNS> -GtkList *list -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_end_selection</NAME> -<RETURNS>void </RETURNS> -GtkList *list -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_select_all</NAME> -<RETURNS>void </RETURNS> -GtkList *list -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_unselect_all</NAME> -<RETURNS>void </RETURNS> -GtkList *list -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_scroll_horizontal</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GtkScrollType scroll_type,gfloat position -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_scroll_vertical</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GtkScrollType scroll_type,gfloat position -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_toggle_add_mode</NAME> -<RETURNS>void </RETURNS> -GtkList *list -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_toggle_focus_row</NAME> -<RETURNS>void </RETURNS> -GtkList *list -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_toggle_row</NAME> -<RETURNS>void </RETURNS> -GtkList *list,GtkWidget *item -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_undo_selection</NAME> -<RETURNS>void </RETURNS> -GtkList *list -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_end_drag_selection</NAME> -<RETURNS>void </RETURNS> -GtkList *list -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_LIST_ITEM</NAME> -#define GTK_TYPE_LIST_ITEM (gtk_list_item_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_LIST_ITEM</NAME> -#define GTK_LIST_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_LIST_ITEM, GtkListItem)) -</MACRO> -<MACRO> -<NAME>GTK_LIST_ITEM_CLASS</NAME> -#define GTK_LIST_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_LIST_ITEM, GtkListItemClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_LIST_ITEM</NAME> -#define GTK_IS_LIST_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_LIST_ITEM)) -</MACRO> -<MACRO> -<NAME>GTK_IS_LIST_ITEM_CLASS</NAME> -#define GTK_IS_LIST_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LIST_ITEM)) -</MACRO> -<STRUCT> -<NAME>GtkListItem</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkListItemClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkListItem</NAME> -struct GtkListItem -{ - GtkItem item; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_list_item_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_item_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_item_new_with_label</NAME> -<RETURNS>GtkWidget *</RETURNS> -const gchar *label -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_item_select</NAME> -<RETURNS>void </RETURNS> -GtkListItem *list_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_list_item_deselect</NAME> -<RETURNS>void </RETURNS> -GtkListItem *list_item -</FUNCTION> -<MACRO> -<NAME>GTK_PRIORITY_REDRAW</NAME> -#define GTK_PRIORITY_REDRAW (G_PRIORITY_HIGH_IDLE + 20) -</MACRO> -<MACRO> -<NAME>GTK_PRIORITY_RESIZE</NAME> -#define GTK_PRIORITY_RESIZE (G_PRIORITY_HIGH_IDLE + 10) -</MACRO> -<MACRO> -<NAME>GTK_PRIORITY_HIGH</NAME> -#define GTK_PRIORITY_HIGH G_PRIORITY_HIGH -</MACRO> -<MACRO> -<NAME>GTK_PRIORITY_INTERNAL</NAME> -#define GTK_PRIORITY_INTERNAL GTK_PRIORITY_REDRAW -</MACRO> -<MACRO> -<NAME>GTK_PRIORITY_DEFAULT</NAME> -#define GTK_PRIORITY_DEFAULT G_PRIORITY_DEFAULT_IDLE -</MACRO> -<MACRO> -<NAME>GTK_PRIORITY_LOW</NAME> -#define GTK_PRIORITY_LOW G_PRIORITY_LOW -</MACRO> -<USER_FUNCTION> -<NAME>GtkModuleInitFunc</NAME> -<RETURNS>void </RETURNS> -gint *argc, - gchar ***argv -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkKeySnoopFunc</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *grab_widget, - GdkEventKey *event, - gpointer func_data -</USER_FUNCTION> -<VARIABLE> -<NAME>gtk_major_version</NAME> -extern const guint gtk_major_version; -</VARIABLE> -<VARIABLE> -<NAME>gtk_minor_version</NAME> -extern const guint gtk_minor_version; -</VARIABLE> -<VARIABLE> -<NAME>gtk_micro_version</NAME> -extern const guint gtk_micro_version; -</VARIABLE> -<VARIABLE> -<NAME>gtk_binary_age</NAME> -extern const guint gtk_binary_age; -</VARIABLE> -<VARIABLE> -<NAME>gtk_interface_age</NAME> -extern const guint gtk_interface_age; -</VARIABLE> -<FUNCTION> -<NAME>gtk_check_version</NAME> -<RETURNS>gchar *</RETURNS> -guint required_major,guint required_minor,guint required_micro -</FUNCTION> -<FUNCTION> -<NAME>gtk_init</NAME> -<RETURNS>void </RETURNS> -int *argc,char ***argv -</FUNCTION> -<FUNCTION> -<NAME>gtk_init_check</NAME> -<RETURNS>gboolean </RETURNS> -int *argc,char ***argv -</FUNCTION> -<FUNCTION> -<NAME>gtk_exit</NAME> -<RETURNS>void </RETURNS> -gint error_code -</FUNCTION> -<FUNCTION> -<NAME>gtk_set_locale</NAME> -<RETURNS>gchar *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_events_pending</NAME> -<RETURNS>gint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_main_do_event</NAME> -<RETURNS>void </RETURNS> -GdkEvent *event -</FUNCTION> -<FUNCTION> -<NAME>gtk_main</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_main_level</NAME> -<RETURNS>guint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_main_quit</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_main_iteration</NAME> -<RETURNS>gint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_main_iteration_do</NAME> -<RETURNS>gint </RETURNS> -gboolean blocking -</FUNCTION> -<FUNCTION> -<NAME>gtk_true</NAME> -<RETURNS>gint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_false</NAME> -<RETURNS>gint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_grab_add</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_grab_get_current</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_grab_remove</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_init_add</NAME> -<RETURNS>void </RETURNS> -GtkFunction function,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_quit_add_destroy</NAME> -<RETURNS>void </RETURNS> -guint main_level,GtkObject *object -</FUNCTION> -<FUNCTION> -<NAME>gtk_quit_add</NAME> -<RETURNS>guint </RETURNS> -guint main_level,GtkFunction function,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_quit_add_full</NAME> -<RETURNS>guint </RETURNS> -guint main_level,GtkFunction function,GtkCallbackMarshal marshal,gpointer data,GtkDestroyNotify destroy -</FUNCTION> -<FUNCTION> -<NAME>gtk_quit_remove</NAME> -<RETURNS>void </RETURNS> -guint quit_handler_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_quit_remove_by_data</NAME> -<RETURNS>void </RETURNS> -gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_timeout_add</NAME> -<RETURNS>guint </RETURNS> -guint32 interval,GtkFunction function,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_timeout_add_full</NAME> -<RETURNS>guint </RETURNS> -guint32 interval,GtkFunction function,GtkCallbackMarshal marshal,gpointer data,GtkDestroyNotify destroy -</FUNCTION> -<FUNCTION> -<NAME>gtk_timeout_remove</NAME> -<RETURNS>void </RETURNS> -guint timeout_handler_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_idle_add</NAME> -<RETURNS>guint </RETURNS> -GtkFunction function,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_idle_add_priority</NAME> -<RETURNS>guint </RETURNS> -gint priority,GtkFunction function,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_idle_add_full</NAME> -<RETURNS>guint </RETURNS> -gint priority,GtkFunction function,GtkCallbackMarshal marshal,gpointer data,GtkDestroyNotify destroy -</FUNCTION> -<FUNCTION> -<NAME>gtk_idle_remove</NAME> -<RETURNS>void </RETURNS> -guint idle_handler_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_idle_remove_by_data</NAME> -<RETURNS>void </RETURNS> -gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_input_add_full</NAME> -<RETURNS>guint </RETURNS> -gint source,GdkInputCondition condition,GdkInputFunction function,GtkCallbackMarshal marshal,gpointer data,GtkDestroyNotify destroy -</FUNCTION> -<FUNCTION> -<NAME>gtk_input_remove</NAME> -<RETURNS>void </RETURNS> -guint input_handler_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_key_snooper_install</NAME> -<RETURNS>guint </RETURNS> -GtkKeySnoopFunc snooper,gpointer func_data -</FUNCTION> -<FUNCTION> -<NAME>gtk_key_snooper_remove</NAME> -<RETURNS>void </RETURNS> -guint snooper_handler_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_get_current_event</NAME> -<RETURNS>GdkEvent *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_get_event_widget</NAME> -<RETURNS>GtkWidget *</RETURNS> -GdkEvent *event -</FUNCTION> -<FUNCTION> -<NAME>gtk_propagate_event</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GdkEvent *event -</FUNCTION> -<MACRO> -<NAME>gtk_signal_default_marshaller</NAME> -#define gtk_signal_default_marshaller gtk_marshal_NONE__NONE -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_BOOL__NONE</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_BOOL__POINTER</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_BOOL__POINTER_POINTER_INT_INT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_BOOL__POINTER_INT_INT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_BOOL__POINTER_INT_INT_UINT</NAME> -#define gtk_marshal_BOOL__POINTER_INT_INT_UINT gtk_marshal_BOOL__POINTER_INT_INT_INT -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_BOOL__POINTER_INT_INT_INT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_BOOL__POINTER_STRING_STRING_POINTER</NAME> -#define gtk_marshal_BOOL__POINTER_STRING_STRING_POINTER gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_ENUM__ENUM</NAME> -#define gtk_marshal_ENUM__ENUM gtk_marshal_INT__INT -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_INT__INT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_INT__POINTER</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_INT__POINTER_CHAR_CHAR</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_NONE__BOOL</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__BOXED</NAME> -#define gtk_marshal_NONE__BOXED gtk_marshal_NONE__POINTER -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__POINTER</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_NONE__C_CALLBACK</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_NONE__C_CALLBACK_C_CALLBACK</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__ENUM</NAME> -#define gtk_marshal_NONE__ENUM gtk_marshal_NONE__INT -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__INT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__ENUM_FLOAT</NAME> -#define gtk_marshal_NONE__ENUM_FLOAT gtk_marshal_NONE__INT_FLOAT -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__INT_FLOAT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__ENUM_FLOAT_BOOL</NAME> -#define gtk_marshal_NONE__ENUM_FLOAT_BOOL gtk_marshal_NONE__INT_FLOAT_BOOL -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__INT_FLOAT_BOOL</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_NONE__INT_INT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_NONE__INT_INT_POINTER</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_NONE__NONE</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__OBJECT</NAME> -#define gtk_marshal_NONE__OBJECT gtk_marshal_NONE__POINTER -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__POINTER_INT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_NONE__POINTER_POINTER</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<FUNCTION> -<NAME>gtk_marshal_NONE__POINTER_POINTER_POINTER</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__POINTER_STRING_STRING</NAME> -#define gtk_marshal_NONE__POINTER_STRING_STRING gtk_marshal_NONE__POINTER_POINTER_POINTER -</MACRO> -<MACRO> -<NAME>gtk_marshal_NONE__POINTER_UINT</NAME> -#define gtk_marshal_NONE__POINTER_UINT gtk_marshal_NONE__POINTER_INT -</MACRO> -<MACRO> -<NAME>gtk_marshal_NONE__POINTER_UINT_ENUM</NAME> -#define gtk_marshal_NONE__POINTER_UINT_ENUM gtk_marshal_NONE__POINTER_INT_INT -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__POINTER_INT_INT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__POINTER_POINTER_UINT_UINT</NAME> -#define gtk_marshal_NONE__POINTER_POINTER_UINT_UINT gtk_marshal_NONE__POINTER_POINTER_INT_INT -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__POINTER_POINTER_INT_INT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__POINTER_INT_INT_POINTER_UINT_UINT</NAME> -#define gtk_marshal_NONE__POINTER_INT_INT_POINTER_UINT_UINT gtk_marshal_NONE__POINTER_INT_INT_POINTER_INT_INT -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__POINTER_INT_INT_POINTER_INT_INT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__POINTER_UINT_UINT</NAME> -#define gtk_marshal_NONE__POINTER_UINT_UINT gtk_marshal_NONE__POINTER_INT_INT -</MACRO> -<MACRO> -<NAME>gtk_marshal_NONE__STRING</NAME> -#define gtk_marshal_NONE__STRING gtk_marshal_NONE__POINTER -</MACRO> -<MACRO> -<NAME>gtk_marshal_NONE__STRING_INT_POINTER</NAME> -#define gtk_marshal_NONE__STRING_INT_POINTER gtk_marshal_NONE__POINTER_INT_POINTER -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__POINTER_INT_POINTER</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__UINT</NAME> -#define gtk_marshal_NONE__UINT gtk_marshal_NONE__INT -</MACRO> -<MACRO> -<NAME>gtk_marshal_NONE__UINT_POINTER_UINT_ENUM_ENUM_POINTER</NAME> -#define gtk_marshal_NONE__UINT_POINTER_UINT_ENUM_ENUM_POINTER gtk_marshal_NONE__INT_POINTER_INT_INT_INT_POINTER -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__INT_POINTER_INT_INT_INT_POINTER</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__UINT_POINTER_UINT_UINT_ENUM</NAME> -#define gtk_marshal_NONE__UINT_POINTER_UINT_UINT_ENUM gtk_marshal_NONE__INT_POINTER_INT_INT_INT -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__INT_POINTER_INT_INT_INT</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>gtk_marshal_NONE__UINT_STRING</NAME> -#define gtk_marshal_NONE__UINT_STRING gtk_marshal_NONE__INT_POINTER -</MACRO> -<FUNCTION> -<NAME>gtk_marshal_NONE__INT_POINTER</NAME> -<RETURNS>void </RETURNS> -GtkObject * object,GtkSignalFunc func,gpointer func_data,GtkArg * args -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_MENU</NAME> -#define GTK_TYPE_MENU (gtk_menu_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_MENU</NAME> -#define GTK_MENU(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_MENU, GtkMenu)) -</MACRO> -<MACRO> -<NAME>GTK_MENU_CLASS</NAME> -#define GTK_MENU_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_MENU, GtkMenuClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_MENU</NAME> -#define GTK_IS_MENU(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_MENU)) -</MACRO> -<MACRO> -<NAME>GTK_IS_MENU_CLASS</NAME> -#define GTK_IS_MENU_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MENU)) -</MACRO> -<STRUCT> -<NAME>GtkMenu</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkMenuClass</NAME> -</STRUCT> -<USER_FUNCTION> -<NAME>GtkMenuPositionFunc</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu, - gint *x, - gint *y, - gpointer user_data -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkMenuDetachFunc</NAME> -<RETURNS>void </RETURNS> -GtkWidget *attach_widget, - GtkMenu *menu -</USER_FUNCTION> -<STRUCT> -<NAME>GtkMenu</NAME> -struct GtkMenu -{ - GtkMenuShell menu_shell; - - GtkWidget *parent_menu_item; - GtkWidget *old_active_menu_item; - - GtkAccelGroup *accel_group; - GtkMenuPositionFunc position_func; - gpointer position_func_data; - - /* 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 - */ - GtkWidget *toplevel; - GtkWidget *tearoff_window; - - guint torn_off : 1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_menu_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_append</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_prepend</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_insert</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu,GtkWidget *child,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_popup</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu,GtkWidget *parent_menu_shell,GtkWidget *parent_menu_item,GtkMenuPositionFunc func,gpointer data,guint button,guint32 activate_time -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_reposition</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_popdown</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_get_active</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkMenu *menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_set_active</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu,guint index -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_set_accel_group</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu,GtkAccelGroup *accel_group -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_get_accel_group</NAME> -<RETURNS>GtkAccelGroup *</RETURNS> -GtkMenu *menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_get_uline_accel_group</NAME> -<RETURNS>GtkAccelGroup *</RETURNS> -GtkMenu *menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_ensure_uline_accel_group</NAME> -<RETURNS>GtkAccelGroup *</RETURNS> -GtkMenu *menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_attach_to_widget</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu,GtkWidget *attach_widget,GtkMenuDetachFunc detacher -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_detach</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_get_attach_widget</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkMenu *menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_detach</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_set_tearoff_state</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu,gboolean torn_off -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_set_title</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu,const gchar *title -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_reorder_child</NAME> -<RETURNS>void </RETURNS> -GtkMenu *menu,GtkWidget *child,gint position -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_MENU_BAR</NAME> -#define GTK_TYPE_MENU_BAR (gtk_menu_bar_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_MENU_BAR</NAME> -#define GTK_MENU_BAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_MENU_BAR, GtkMenuBar)) -</MACRO> -<MACRO> -<NAME>GTK_MENU_BAR_CLASS</NAME> -#define GTK_MENU_BAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_MENU_BAR, GtkMenuBarClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_MENU_BAR</NAME> -#define GTK_IS_MENU_BAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_MENU_BAR)) -</MACRO> -<MACRO> -<NAME>GTK_IS_MENU_BAR_CLASS</NAME> -#define GTK_IS_MENU_BAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MENU_BAR)) -</MACRO> -<STRUCT> -<NAME>GtkMenuBar</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkMenuBarClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkMenuBar</NAME> -struct GtkMenuBar -{ - GtkMenuShell menu_shell; - - GtkShadowType shadow_type; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_menu_bar_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_bar_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_bar_append</NAME> -<RETURNS>void </RETURNS> -GtkMenuBar *menu_bar,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_bar_prepend</NAME> -<RETURNS>void </RETURNS> -GtkMenuBar *menu_bar,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_bar_insert</NAME> -<RETURNS>void </RETURNS> -GtkMenuBar *menu_bar,GtkWidget *child,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_bar_set_shadow_type</NAME> -<RETURNS>void </RETURNS> -GtkMenuBar *menu_bar,GtkShadowType type -</FUNCTION> -<STRUCT> -<NAME>GtkMenuEntry</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkMenuPath</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkMenuFactory</NAME> -</STRUCT> -<USER_FUNCTION> -<NAME>GtkMenuCallback</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget, - gpointer user_data -</USER_FUNCTION> -<STRUCT> -<NAME>GtkMenuEntry</NAME> -struct GtkMenuEntry -{ - gchar *path; - gchar *accelerator; - GtkMenuCallback callback; - gpointer callback_data; - GtkWidget *widget; -}; -</STRUCT> -<STRUCT> -<NAME>GtkMenuPath</NAME> -struct GtkMenuPath -{ - char *path; - GtkWidget *widget; -}; -</STRUCT> -<STRUCT> -<NAME>GtkMenuFactory</NAME> -struct GtkMenuFactory -{ - gchar *path; - GtkMenuFactoryType type; - GtkAccelGroup *accel_group; - GtkWidget *widget; - GList *subfactories; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_menu_factory_new</NAME> -<RETURNS>GtkMenuFactory *</RETURNS> -GtkMenuFactoryType type -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_factory_destroy</NAME> -<RETURNS>void </RETURNS> -GtkMenuFactory *factory -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_factory_add_entries</NAME> -<RETURNS>void </RETURNS> -GtkMenuFactory *factory,GtkMenuEntry *entries,int nentries -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_factory_add_subfactory</NAME> -<RETURNS>void </RETURNS> -GtkMenuFactory *factory,GtkMenuFactory *subfactory,const char *path -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_factory_remove_paths</NAME> -<RETURNS>void </RETURNS> -GtkMenuFactory *factory,char **paths,int npaths -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_factory_remove_entries</NAME> -<RETURNS>void </RETURNS> -GtkMenuFactory *factory,GtkMenuEntry *entries,int nentries -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_factory_remove_subfactory</NAME> -<RETURNS>void </RETURNS> -GtkMenuFactory *factory,GtkMenuFactory *subfactory,const char *path -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_factory_find</NAME> -<RETURNS>GtkMenuPath *</RETURNS> -GtkMenuFactory *factory,const char *path -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_MENU_ITEM</NAME> -#define GTK_TYPE_MENU_ITEM (gtk_menu_item_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_MENU_ITEM</NAME> -#define GTK_MENU_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_MENU_ITEM, GtkMenuItem)) -</MACRO> -<MACRO> -<NAME>GTK_MENU_ITEM_CLASS</NAME> -#define GTK_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_MENU_ITEM, GtkMenuItemClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_MENU_ITEM</NAME> -#define GTK_IS_MENU_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_MENU_ITEM)) -</MACRO> -<MACRO> -<NAME>GTK_IS_MENU_ITEM_CLASS</NAME> -#define GTK_IS_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MENU_ITEM)) -</MACRO> -<STRUCT> -<NAME>GtkMenuItem</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkMenuItemClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkMenuItem</NAME> -struct GtkMenuItem -{ - GtkItem item; - - GtkWidget *submenu; - - guint accelerator_signal; - guint16 toggle_size; - guint16 accelerator_width; - - guint show_toggle_indicator : 1; - guint show_submenu_indicator : 1; - guint submenu_placement : 1; - guint submenu_direction : 1; - guint right_justify: 1; - guint timer; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_menu_item_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_item_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_item_new_with_label</NAME> -<RETURNS>GtkWidget *</RETURNS> -const gchar *label -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_item_set_submenu</NAME> -<RETURNS>void </RETURNS> -GtkMenuItem *menu_item,GtkWidget *submenu -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_item_remove_submenu</NAME> -<RETURNS>void </RETURNS> -GtkMenuItem *menu_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_item_set_placement</NAME> -<RETURNS>void </RETURNS> -GtkMenuItem *menu_item,GtkSubmenuPlacement placement -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_item_configure</NAME> -<RETURNS>void </RETURNS> -GtkMenuItem *menu_item,gint show_toggle_indicator,gint show_submenu_indicator -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_item_select</NAME> -<RETURNS>void </RETURNS> -GtkMenuItem *menu_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_item_deselect</NAME> -<RETURNS>void </RETURNS> -GtkMenuItem *menu_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_item_activate</NAME> -<RETURNS>void </RETURNS> -GtkMenuItem *menu_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_item_right_justify</NAME> -<RETURNS>void </RETURNS> -GtkMenuItem *menu_item -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_MENU_SHELL</NAME> -#define GTK_TYPE_MENU_SHELL (gtk_menu_shell_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_MENU_SHELL</NAME> -#define GTK_MENU_SHELL(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_MENU_SHELL, GtkMenuShell)) -</MACRO> -<MACRO> -<NAME>GTK_MENU_SHELL_CLASS</NAME> -#define GTK_MENU_SHELL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_MENU_SHELL, GtkMenuShellClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_MENU_SHELL</NAME> -#define GTK_IS_MENU_SHELL(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_MENU_SHELL)) -</MACRO> -<MACRO> -<NAME>GTK_IS_MENU_SHELL_CLASS</NAME> -#define GTK_IS_MENU_SHELL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MENU_SHELL)) -</MACRO> -<STRUCT> -<NAME>GtkMenuShell</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkMenuShellClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkMenuShell</NAME> -struct GtkMenuShell -{ - GtkContainer container; - - GList *children; - GtkWidget *active_menu_item; - GtkWidget *parent_menu_shell; - - guint active : 1; - guint have_grab : 1; - guint have_xgrab : 1; - guint button : 2; - guint ignore_leave : 1; - guint menu_flag : 1; - guint ignore_enter : 1; - - guint32 activate_time; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_menu_shell_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_shell_append</NAME> -<RETURNS>void </RETURNS> -GtkMenuShell *menu_shell,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_shell_prepend</NAME> -<RETURNS>void </RETURNS> -GtkMenuShell *menu_shell,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_shell_insert</NAME> -<RETURNS>void </RETURNS> -GtkMenuShell *menu_shell,GtkWidget *child,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_shell_deactivate</NAME> -<RETURNS>void </RETURNS> -GtkMenuShell *menu_shell -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_shell_select_item</NAME> -<RETURNS>void </RETURNS> -GtkMenuShell *menu_shell,GtkWidget *menu_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_shell_deselect</NAME> -<RETURNS>void </RETURNS> -GtkMenuShell *menu_shell -</FUNCTION> -<FUNCTION> -<NAME>gtk_menu_shell_activate_item</NAME> -<RETURNS>void </RETURNS> -GtkMenuShell *menu_shell,GtkWidget *menu_item,gboolean force_deactivate -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_MISC</NAME> -#define GTK_TYPE_MISC (gtk_misc_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_MISC</NAME> -#define GTK_MISC(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_MISC, GtkMisc)) -</MACRO> -<MACRO> -<NAME>GTK_MISC_CLASS</NAME> -#define GTK_MISC_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_MISC, GtkMiscClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_MISC</NAME> -#define GTK_IS_MISC(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_MISC)) -</MACRO> -<MACRO> -<NAME>GTK_IS_MISC_CLASS</NAME> -#define GTK_IS_MISC_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MISC)) -</MACRO> -<STRUCT> -<NAME>GtkMisc</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkMiscClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkMisc</NAME> -struct GtkMisc -{ - GtkWidget widget; - - gfloat xalign; - gfloat yalign; - - guint16 xpad; - guint16 ypad; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_misc_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_misc_set_alignment</NAME> -<RETURNS>void </RETURNS> -GtkMisc *misc,gfloat xalign,gfloat yalign -</FUNCTION> -<FUNCTION> -<NAME>gtk_misc_set_padding</NAME> -<RETURNS>void </RETURNS> -GtkMisc *misc,gint xpad,gint ypad -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_NOTEBOOK</NAME> -#define GTK_TYPE_NOTEBOOK (gtk_notebook_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_NOTEBOOK</NAME> -#define GTK_NOTEBOOK(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_NOTEBOOK, GtkNotebook)) -</MACRO> -<MACRO> -<NAME>GTK_NOTEBOOK_CLASS</NAME> -#define GTK_NOTEBOOK_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_NOTEBOOK, GtkNotebookClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_NOTEBOOK</NAME> -#define GTK_IS_NOTEBOOK(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_NOTEBOOK)) -</MACRO> -<MACRO> -<NAME>GTK_IS_NOTEBOOK_CLASS</NAME> -#define GTK_IS_NOTEBOOK_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_NOTEBOOK)) -</MACRO> -<MACRO> -<NAME>GTK_NOTEBOOK_PAGE</NAME> -#define GTK_NOTEBOOK_PAGE(_glist_) ((GtkNotebookPage *)((GList *)(_glist_))->data) -</MACRO> -<STRUCT> -<NAME>GtkNotebook</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkNotebookClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkNotebookPage</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkNotebook</NAME> -struct GtkNotebook -{ - GtkContainer container; - - GtkNotebookPage *cur_page; - GList *children; - GList *first_tab; - GList *focus_tab; - - GtkWidget *menu; - GdkWindow *panel; - - guint32 timer; - - guint16 tab_hborder; - guint16 tab_vborder; - - guint show_tabs : 1; - guint homogeneous : 1; - guint show_border : 1; - guint tab_pos : 2; - guint scrollable : 1; - guint in_child : 2; - guint click_child : 2; - guint button : 2; - guint need_timer : 1; - guint child_has_focus : 1; - guint have_visible_child : 1; -}; -</STRUCT> -<STRUCT> -<NAME>GtkNotebookPage</NAME> -struct GtkNotebookPage -{ - GtkWidget *child; - GtkWidget *tab_label; - GtkWidget *menu_label; - - guint default_menu : 1; - guint default_tab : 1; - guint expand : 1; - guint fill : 1; - guint pack : 1; - - GtkRequisition requisition; - GtkAllocation allocation; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_notebook_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_append_page</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,GtkWidget *tab_label -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_append_page_menu</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,GtkWidget *tab_label,GtkWidget *menu_label -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_prepend_page</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,GtkWidget *tab_label -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_prepend_page_menu</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,GtkWidget *tab_label,GtkWidget *menu_label -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_insert_page</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,GtkWidget *tab_label,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_insert_page_menu</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,GtkWidget *tab_label,GtkWidget *menu_label,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_remove_page</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,gint page_num -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_get_current_page</NAME> -<RETURNS>gint </RETURNS> -GtkNotebook *notebook -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_get_nth_page</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkNotebook *notebook,gint page_num -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_page_num</NAME> -<RETURNS>gint </RETURNS> -GtkNotebook *notebook,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_page</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,gint page_num -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_next_page</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_prev_page</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_show_border</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,gboolean show_border -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_show_tabs</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,gboolean show_tabs -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_tab_pos</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkPositionType pos -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_homogeneous_tabs</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,gboolean homogeneous -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_tab_border</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,guint border_width -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_tab_hborder</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,guint tab_hborder -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_tab_vborder</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,guint tab_vborder -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_scrollable</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,gboolean scrollable -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_popup_enable</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_popup_disable</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_get_tab_label</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkNotebook *notebook,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_tab_label</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,GtkWidget *tab_label -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_tab_label_text</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,const gchar *tab_text -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_get_menu_label</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkNotebook *notebook,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_menu_label</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,GtkWidget *menu_label -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_menu_label_text</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,const gchar *menu_text -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_query_tab_label_packing</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,gboolean *expand,gboolean *fill,GtkPackType *pack_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_set_tab_label_packing</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,gboolean expand,gboolean fill,GtkPackType pack_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_notebook_reorder_child</NAME> -<RETURNS>void </RETURNS> -GtkNotebook *notebook,GtkWidget *child,gint position -</FUNCTION> -<MACRO> -<NAME>GTK_OBJECT</NAME> -#define GTK_OBJECT(object) ( \ - GTK_IS_OBJECT (object) ? \ - (GtkObject*) (object) : \ - (GtkObject*) gtk_type_check_object_cast ((GtkTypeObject*) (object), GTK_TYPE_OBJECT) \ -) -</MACRO> -<MACRO> -<NAME>GTK_OBJECT_CLASS</NAME> -#define GTK_OBJECT_CLASS(klass) ( \ - GTK_IS_OBJECT_CLASS (klass) ? \ - (GtkObjectClass*) (klass) : \ - (GtkObjectClass*) gtk_type_check_class_cast ((GtkTypeClass*) (klass), GTK_TYPE_OBJECT) \ -) -</MACRO> -<MACRO> -<NAME>GTK_IS_OBJECT</NAME> -#define GTK_IS_OBJECT(object) ( \ - (object) != NULL && \ - GTK_IS_OBJECT_CLASS (((GtkObject*) (object))->klass) \ -) -</MACRO> -<MACRO> -<NAME>GTK_IS_OBJECT_CLASS</NAME> -#define GTK_IS_OBJECT_CLASS(klass) ( \ - (klass) != NULL && \ - GTK_FUNDAMENTAL_TYPE (((GtkObjectClass*) (klass))->type) == GTK_TYPE_OBJECT \ -) -</MACRO> -<MACRO> -<NAME>GTK_OBJECT_TYPE</NAME> -#define GTK_OBJECT_TYPE(obj) (GTK_OBJECT (obj)->klass->type) -</MACRO> -<MACRO> -<NAME>GTK_OBJECT_SIGNALS</NAME> -#define GTK_OBJECT_SIGNALS(obj) (GTK_OBJECT (obj)->klass->signals) -</MACRO> -<MACRO> -<NAME>GTK_OBJECT_NSIGNALS</NAME> -#define GTK_OBJECT_NSIGNALS(obj) (GTK_OBJECT (obj)->klass->nsignals) -</MACRO> -<ENUM> -<NAME>GtkObjectFlags</NAME> -typedef enum -{ - GTK_DESTROYED = 1 << 0, - GTK_FLOATING = 1 << 1, - GTK_CONNECTED = 1 << 2, - GTK_CONSTRUCTED = 1 << 3 -} GtkObjectFlags; -</ENUM> -<MACRO> -<NAME>GTK_OBJECT_FLAGS</NAME> -#define GTK_OBJECT_FLAGS(obj) (GTK_OBJECT (obj)->flags) -</MACRO> -<MACRO> -<NAME>GTK_OBJECT_DESTROYED</NAME> -#define GTK_OBJECT_DESTROYED(obj) ((GTK_OBJECT_FLAGS (obj) & GTK_DESTROYED) != 0) -</MACRO> -<MACRO> -<NAME>GTK_OBJECT_FLOATING</NAME> -#define GTK_OBJECT_FLOATING(obj) ((GTK_OBJECT_FLAGS (obj) & GTK_FLOATING) != 0) -</MACRO> -<MACRO> -<NAME>GTK_OBJECT_CONNECTED</NAME> -#define GTK_OBJECT_CONNECTED(obj) ((GTK_OBJECT_FLAGS (obj) & GTK_CONNECTED) != 0) -</MACRO> -<MACRO> -<NAME>GTK_OBJECT_CONSTRUCTED</NAME> -#define GTK_OBJECT_CONSTRUCTED(obj) ((GTK_OBJECT_FLAGS (obj) & GTK_CONSTRUCTED) != 0) -</MACRO> -<MACRO> -<NAME>GTK_OBJECT_SET_FLAGS</NAME> -#define GTK_OBJECT_SET_FLAGS(obj,flag) G_STMT_START{ (GTK_OBJECT_FLAGS (obj) |= (flag)); }G_STMT_END -</MACRO> -<MACRO> -<NAME>GTK_OBJECT_UNSET_FLAGS</NAME> -#define GTK_OBJECT_UNSET_FLAGS(obj,flag) G_STMT_START{ (GTK_OBJECT_FLAGS (obj) &= ~(flag)); }G_STMT_END -</MACRO> -<ENUM> -<NAME>GtkArgFlags</NAME> -typedef enum -{ - GTK_ARG_READABLE = 1 << 0, - GTK_ARG_WRITABLE = 1 << 1, - GTK_ARG_CONSTRUCT = 1 << 2, - GTK_ARG_CONSTRUCT_ONLY = 1 << 3, - GTK_ARG_CHILD_ARG = 1 << 4, - GTK_ARG_MASK = 0x1f, - - /* aliases - */ - GTK_ARG_READWRITE = GTK_ARG_READABLE | GTK_ARG_WRITABLE -} GtkArgFlags; -</ENUM> -<STRUCT> -<NAME>GtkObjectClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkObject</NAME> -struct GtkObject -{ - /* GtkTypeObject related fields: */ - GtkObjectClass *klass; - - - /* 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. - */ - guint32 flags; - - /* reference count. - * refer to the file docs/refcounting.txt on this issue. - */ - guint ref_count; - - /* A list of keyed data pointers, used for e.g. the list of signal - * handlers or an object's user_data. - */ - GData *object_data; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_object_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_class_user_signal_new</NAME> -<RETURNS>guint </RETURNS> -GtkObjectClass *klass,const gchar *name,GtkSignalRunType signal_flags,GtkSignalMarshaller marshaller,GtkType return_val,guint nparams,... -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_class_user_signal_newv</NAME> -<RETURNS>guint </RETURNS> -GtkObjectClass *klass,const gchar *name,GtkSignalRunType signal_flags,GtkSignalMarshaller marshaller,GtkType return_val,guint nparams,GtkType *params -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_new</NAME> -<RETURNS>GtkObject *</RETURNS> -GtkType type,const gchar *first_arg_name,... -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_newv</NAME> -<RETURNS>GtkObject *</RETURNS> -GtkType object_type,guint n_args,GtkArg *args -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_default_construct</NAME> -<RETURNS>void </RETURNS> -GtkObject *object -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_constructed</NAME> -<RETURNS>void </RETURNS> -GtkObject *object -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_sink</NAME> -<RETURNS>void </RETURNS> -GtkObject *object -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_ref</NAME> -<RETURNS>void </RETURNS> -GtkObject *object -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_unref</NAME> -<RETURNS>void </RETURNS> -GtkObject *object -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_weakref</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,GtkDestroyNotify notify,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_weakunref</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,GtkDestroyNotify notify,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_destroy</NAME> -<RETURNS>void </RETURNS> -GtkObject *object -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_getv</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,guint n_args,GtkArg *args -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_get</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *first_arg_name,... -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_set</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *first_arg_name,... -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_setv</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,guint n_args,GtkArg *args -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_query_args</NAME> -<RETURNS>GtkArg *</RETURNS> -GtkType class_type,guint32 **arg_flags,guint *n_args -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_set_data</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *key,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_set_data_full</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *key,gpointer data,GtkDestroyNotify destroy -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_remove_data</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *key -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_get_data</NAME> -<RETURNS>gpointer </RETURNS> -GtkObject *object,const gchar *key -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_remove_no_notify</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *key -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_set_user_data</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_get_user_data</NAME> -<RETURNS>gpointer </RETURNS> -GtkObject *object -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_class_add_signals</NAME> -<RETURNS>void </RETURNS> -GtkObjectClass *klass,guint *signals,guint nsignals -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_add_arg_type</NAME> -<RETURNS>void </RETURNS> -const gchar *arg_name,GtkType arg_type,guint arg_flags,guint arg_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_set_data_by_id</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,GQuark data_id,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_set_data_by_id_full</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,GQuark data_id,gpointer data,GtkDestroyNotify destroy -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_get_data_by_id</NAME> -<RETURNS>gpointer </RETURNS> -GtkObject *object,GQuark data_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_remove_data_by_id</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,GQuark data_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_remove_no_notify_by_id</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,GQuark key_id -</FUNCTION> -<MACRO> -<NAME>gtk_object_data_try_key</NAME> -#define gtk_object_data_try_key g_quark_try_string -</MACRO> -<MACRO> -<NAME>gtk_object_data_force_id</NAME> -#define gtk_object_data_force_id g_quark_from_string -</MACRO> -<FUNCTION> -<NAME>gtk_object_arg_set</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,GtkArg *arg,GtkArgInfo *info -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_arg_get</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,GtkArg *arg,GtkArgInfo *info -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_args_collect</NAME> -<RETURNS>gchar *</RETURNS> -GtkType object_type,GSList **arg_list_p,GSList **info_list_p,const gchar *first_arg_name,va_list var_args -</FUNCTION> -<FUNCTION> -<NAME>gtk_object_arg_get_info</NAME> -<RETURNS>gchar *</RETURNS> -GtkType object_type,const gchar *arg_name,GtkArgInfo **info_p -</FUNCTION> -<FUNCTION> -<NAME>gtk_trace_referencing</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *func,guint dummy,guint line,gboolean do_ref -</FUNCTION> -<MACRO> -<NAME>gtk_object_ref</NAME> -# define gtk_object_ref(o) G_STMT_START{gtk_trace_referencing((o),G_GNUC_PRETTY_FUNCTION,0,__LINE__,1);}G_STMT_END -</MACRO> -<MACRO> -<NAME>gtk_object_unref</NAME> -# define gtk_object_unref(o) G_STMT_START{gtk_trace_referencing((o),G_GNUC_PRETTY_FUNCTION,0,__LINE__,0);}G_STMT_END -</MACRO> -<MACRO> -<NAME>GTK_TYPE_OPTION_MENU</NAME> -#define GTK_TYPE_OPTION_MENU (gtk_option_menu_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_OPTION_MENU</NAME> -#define GTK_OPTION_MENU(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_OPTION_MENU, GtkOptionMenu)) -</MACRO> -<MACRO> -<NAME>GTK_OPTION_MENU_CLASS</NAME> -#define GTK_OPTION_MENU_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_OPTION_MENU, GtkOptionMenuClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_OPTION_MENU</NAME> -#define GTK_IS_OPTION_MENU(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_OPTION_MENU)) -</MACRO> -<MACRO> -<NAME>GTK_IS_OPTION_MENU_CLASS</NAME> -#define GTK_IS_OPTION_MENU_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_OPTION_MENU)) -</MACRO> -<STRUCT> -<NAME>GtkOptionMenu</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkOptionMenuClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkOptionMenu</NAME> -struct GtkOptionMenu -{ - GtkButton button; - - GtkWidget *menu; - GtkWidget *menu_item; - - guint16 width; - guint16 height; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_option_menu_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_option_menu_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_option_menu_get_menu</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkOptionMenu *option_menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_option_menu_set_menu</NAME> -<RETURNS>void </RETURNS> -GtkOptionMenu *option_menu,GtkWidget *menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_option_menu_remove_menu</NAME> -<RETURNS>void </RETURNS> -GtkOptionMenu *option_menu -</FUNCTION> -<FUNCTION> -<NAME>gtk_option_menu_set_history</NAME> -<RETURNS>void </RETURNS> -GtkOptionMenu *option_menu,guint index -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_PACKER</NAME> -#define GTK_TYPE_PACKER (gtk_packer_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_PACKER</NAME> -#define GTK_PACKER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PACKER, GtkPacker)) -</MACRO> -<MACRO> -<NAME>GTK_PACKER_CLASS</NAME> -#define GTK_PACKER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PACKER, GtkPackerClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_PACKER</NAME> -#define GTK_IS_PACKER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_PACKER)) -</MACRO> -<MACRO> -<NAME>GTK_IS_PACKER_CLASS</NAME> -#define GTK_IS_PACKER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PACKER)) -</MACRO> -<STRUCT> -<NAME>GtkPacker</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPackerClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPackerChild</NAME> -</STRUCT> -<ENUM> -<NAME>GtkPackerOptions</NAME> -typedef enum -{ - GTK_PACK_EXPAND = 1 << 0, /*< nick=expand >*/ - GTK_FILL_X = 1 << 1, - GTK_FILL_Y = 1 << 2 -} GtkPackerOptions; -</ENUM> -<ENUM> -<NAME>GtkSideType</NAME> -typedef enum -{ - GTK_SIDE_TOP, - GTK_SIDE_BOTTOM, - GTK_SIDE_LEFT, - GTK_SIDE_RIGHT -} GtkSideType; -</ENUM> -<ENUM> -<NAME>GtkAnchorType</NAME> -typedef enum -{ - GTK_ANCHOR_CENTER, - GTK_ANCHOR_NORTH, - GTK_ANCHOR_NORTH_WEST, - GTK_ANCHOR_NORTH_EAST, - GTK_ANCHOR_SOUTH, - GTK_ANCHOR_SOUTH_WEST, - GTK_ANCHOR_SOUTH_EAST, - GTK_ANCHOR_WEST, - GTK_ANCHOR_EAST, - 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 -} GtkAnchorType; -</ENUM> -<STRUCT> -<NAME>GtkPackerChild</NAME> -struct GtkPackerChild -{ - GtkWidget *widget; - - GtkAnchorType anchor; - GtkSideType side; - GtkPackerOptions options; - - guint use_default : 1; - - guint border_width : 16; - guint pad_x : 16; - guint pad_y : 16; - guint i_pad_x : 16; - guint i_pad_y : 16; -}; -</STRUCT> -<STRUCT> -<NAME>GtkPacker</NAME> -struct GtkPacker -{ - GtkContainer parent; - - GList *children; - - guint spacing; - - guint default_border_width : 16; - guint default_pad_x : 16; - guint default_pad_y : 16; - guint default_i_pad_x : 16; - guint default_i_pad_y : 16; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_packer_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_packer_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_packer_add_defaults</NAME> -<RETURNS>void </RETURNS> -GtkPacker *packer,GtkWidget *child,GtkSideType side,GtkAnchorType anchor,GtkPackerOptions options -</FUNCTION> -<FUNCTION> -<NAME>gtk_packer_add</NAME> -<RETURNS>void </RETURNS> -GtkPacker *packer,GtkWidget *child,GtkSideType side,GtkAnchorType anchor,GtkPackerOptions options,guint border_width,guint pad_x,guint pad_y,guint i_pad_x,guint i_pad_y -</FUNCTION> -<FUNCTION> -<NAME>gtk_packer_set_child_packing</NAME> -<RETURNS>void </RETURNS> -GtkPacker *packer,GtkWidget *child,GtkSideType side,GtkAnchorType anchor,GtkPackerOptions options,guint border_width,guint pad_x,guint pad_y,guint i_pad_x,guint i_pad_y -</FUNCTION> -<FUNCTION> -<NAME>gtk_packer_reorder_child</NAME> -<RETURNS>void </RETURNS> -GtkPacker *packer,GtkWidget *child,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_packer_set_spacing</NAME> -<RETURNS>void </RETURNS> -GtkPacker *packer,guint spacing -</FUNCTION> -<FUNCTION> -<NAME>gtk_packer_set_default_border_width</NAME> -<RETURNS>void </RETURNS> -GtkPacker *packer,guint border -</FUNCTION> -<FUNCTION> -<NAME>gtk_packer_set_default_pad</NAME> -<RETURNS>void </RETURNS> -GtkPacker *packer,guint pad_x,guint pad_y -</FUNCTION> -<FUNCTION> -<NAME>gtk_packer_set_default_ipad</NAME> -<RETURNS>void </RETURNS> -GtkPacker *packer,guint i_pad_x,guint i_pad_y -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_PANED</NAME> -#define GTK_TYPE_PANED (gtk_paned_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_PANED</NAME> -#define GTK_PANED(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PANED, GtkPaned)) -</MACRO> -<MACRO> -<NAME>GTK_PANED_CLASS</NAME> -#define GTK_PANED_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PANED, GtkPanedClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_PANED</NAME> -#define GTK_IS_PANED(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_PANED)) -</MACRO> -<MACRO> -<NAME>GTK_IS_PANED_CLASS</NAME> -#define GTK_IS_PANED_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PANED)) -</MACRO> -<STRUCT> -<NAME>GtkPaned</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPanedClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPaned</NAME> -struct GtkPaned -{ - GtkContainer container; - - GtkWidget *child1; - GtkWidget *child2; - - GdkWindow *handle; - GdkRectangle groove_rectangle; - GdkGC *xor_gc; - - /*< public >*/ - guint16 handle_size; - guint16 gutter_size; - - /*< private >*/ - gint child1_size; - gint last_allocation; - gint min_position; - gint max_position; - - guint position_set : 1; - guint in_drag : 1; - guint child1_shrink : 1; - guint child1_resize : 1; - guint child2_shrink : 1; - guint child2_resize : 1; - - gint16 handle_xpos; - gint16 handle_ypos; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_paned_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_paned_add1</NAME> -<RETURNS>void </RETURNS> -GtkPaned *paned,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_paned_add2</NAME> -<RETURNS>void </RETURNS> -GtkPaned *paned,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_paned_pack1</NAME> -<RETURNS>void </RETURNS> -GtkPaned *paned,GtkWidget *child,gboolean resize,gboolean shrink -</FUNCTION> -<FUNCTION> -<NAME>gtk_paned_pack2</NAME> -<RETURNS>void </RETURNS> -GtkPaned *paned,GtkWidget *child,gboolean resize,gboolean shrink -</FUNCTION> -<FUNCTION> -<NAME>gtk_paned_set_position</NAME> -<RETURNS>void </RETURNS> -GtkPaned *paned,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_paned_set_handle_size</NAME> -<RETURNS>void </RETURNS> -GtkPaned *paned,guint16 size -</FUNCTION> -<FUNCTION> -<NAME>gtk_paned_set_gutter_size</NAME> -<RETURNS>void </RETURNS> -GtkPaned *paned,guint16 size -</FUNCTION> -<FUNCTION> -<NAME>gtk_paned_compute_position</NAME> -<RETURNS>void </RETURNS> -GtkPaned *paned,gint allocation,gint child1_req,gint child2_req -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_PIXMAP</NAME> -#define GTK_TYPE_PIXMAP (gtk_pixmap_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_PIXMAP</NAME> -#define GTK_PIXMAP(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PIXMAP, GtkPixmap)) -</MACRO> -<MACRO> -<NAME>GTK_PIXMAP_CLASS</NAME> -#define GTK_PIXMAP_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PIXMAP, GtkPixmapClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_PIXMAP</NAME> -#define GTK_IS_PIXMAP(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_PIXMAP)) -</MACRO> -<MACRO> -<NAME>GTK_IS_PIXMAP_CLASS</NAME> -#define GTK_IS_PIXMAP_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PIXMAP)) -</MACRO> -<STRUCT> -<NAME>GtkPixmap</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPixmapClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPixmap</NAME> -struct GtkPixmap -{ - GtkMisc misc; - - GdkPixmap *pixmap; - GdkBitmap *mask; - - GdkPixmap *pixmap_insensitive; - guint build_insensitive : 1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_pixmap_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_pixmap_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GdkPixmap *pixmap,GdkBitmap *mask -</FUNCTION> -<FUNCTION> -<NAME>gtk_pixmap_set</NAME> -<RETURNS>void </RETURNS> -GtkPixmap *pixmap,GdkPixmap *val,GdkBitmap *mask -</FUNCTION> -<FUNCTION> -<NAME>gtk_pixmap_get</NAME> -<RETURNS>void </RETURNS> -GtkPixmap *pixmap,GdkPixmap **val,GdkBitmap **mask -</FUNCTION> -<FUNCTION> -<NAME>gtk_pixmap_set_build_insensitive</NAME> -<RETURNS>void </RETURNS> -GtkPixmap *pixmap,guint build -</FUNCTION> -<MACRO> -<NAME>GTK_PLUG</NAME> -#define GTK_PLUG(obj) GTK_CHECK_CAST (obj, gtk_plug_get_type (), GtkPlug) -</MACRO> -<MACRO> -<NAME>GTK_PLUG_CLASS</NAME> -#define GTK_PLUG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_plug_get_type (), GtkPlugClass) -</MACRO> -<MACRO> -<NAME>GTK_IS_PLUG</NAME> -#define GTK_IS_PLUG(obj) GTK_CHECK_TYPE (obj, gtk_plug_get_type ()) -</MACRO> -<STRUCT> -<NAME>GtkPlug</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPlugClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPlug</NAME> -struct GtkPlug -{ - GtkWindow window; - - GdkWindow *socket_window; - gint same_app; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_plug_get_type</NAME> -<RETURNS>guint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_plug_construct</NAME> -<RETURNS>void </RETURNS> -GtkPlug *plug, guint32 socket_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_plug_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -guint32 socket_id -</FUNCTION> -<MACRO> -<NAME>GTK_PREVIEW</NAME> -#define GTK_PREVIEW(obj) GTK_CHECK_CAST (obj, gtk_preview_get_type (), GtkPreview) -</MACRO> -<MACRO> -<NAME>GTK_PREVIEW_CLASS</NAME> -#define GTK_PREVIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_preview_get_type (), GtkPreviewClass) -</MACRO> -<MACRO> -<NAME>GTK_IS_PREVIEW</NAME> -#define GTK_IS_PREVIEW(obj) GTK_CHECK_TYPE (obj, gtk_preview_get_type ()) -</MACRO> -<STRUCT> -<NAME>GtkPreview</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPreviewInfo</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPreviewClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPreview</NAME> -struct GtkPreview -{ - GtkWidget widget; - - guchar *buffer; - guint16 buffer_width; - guint16 buffer_height; - - guint16 bpp; - guint16 rowstride; - - GdkRgbDither dither; - - guint type : 1; - guint expand : 1; -}; -</STRUCT> -<STRUCT> -<NAME>GtkPreviewInfo</NAME> -struct GtkPreviewInfo -{ - GdkVisual *visual; - GdkColormap *cmap; - - guchar *lookup; - - gdouble gamma; -}; -</STRUCT> -<UNION> -<NAME>GtkDitherInfo</NAME> -union GtkDitherInfo -{ - gushort s[2]; - guchar c[4]; -}; -</UNION> -<FUNCTION> -<NAME>gtk_preview_get_type</NAME> -<RETURNS>guint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_uninit</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkPreviewType type -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_size</NAME> -<RETURNS>void </RETURNS> -GtkPreview *preview,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_put</NAME> -<RETURNS>void </RETURNS> -GtkPreview *preview,GdkWindow *window,GdkGC *gc,gint srcx,gint srcy,gint destx,gint desty,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_draw_row</NAME> -<RETURNS>void </RETURNS> -GtkPreview *preview,guchar *data,gint x,gint y,gint w -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_set_expand</NAME> -<RETURNS>void </RETURNS> -GtkPreview *preview,gint expand -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_set_gamma</NAME> -<RETURNS>void </RETURNS> -double gamma -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_set_color_cube</NAME> -<RETURNS>void </RETURNS> -guint nred_shades,guint ngreen_shades,guint nblue_shades,guint ngray_shades -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_set_install_cmap</NAME> -<RETURNS>void </RETURNS> -gint install_cmap -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_set_reserved</NAME> -<RETURNS>void </RETURNS> -gint nreserved -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_set_dither</NAME> -<RETURNS>void </RETURNS> -GtkPreview *preview,GdkRgbDither dither -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_get_visual</NAME> -<RETURNS>GdkVisual *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_get_cmap</NAME> -<RETURNS>GdkColormap *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_get_info</NAME> -<RETURNS>GtkPreviewInfo *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_preview_reset</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<ENUM> -<NAME>GtkPrivateFlags</NAME> -typedef enum -{ - PRIVATE_GTK_USER_STYLE = 1 << 0, - PRIVATE_GTK_REDRAW_PENDING = 1 << 1, - PRIVATE_GTK_RESIZE_PENDING = 1 << 2, - PRIVATE_GTK_RESIZE_NEEDED = 1 << 3, - PRIVATE_GTK_LEAVE_PENDING = 1 << 4, - PRIVATE_GTK_HAS_SHAPE_MASK = 1 << 5, - PRIVATE_GTK_IN_REPARENT = 1 << 6, - PRIVATE_GTK_IS_OFFSCREEN = 1 << 7 -} GtkPrivateFlags; -</ENUM> -<MACRO> -<NAME>GTK_PRIVATE_FLAGS</NAME> -#define GTK_PRIVATE_FLAGS(wid) (GTK_WIDGET (wid)->private_flags) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_USER_STYLE</NAME> -#define GTK_WIDGET_USER_STYLE(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_USER_STYLE) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_REDRAW_PENDING</NAME> -#define GTK_WIDGET_REDRAW_PENDING(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_REDRAW_PENDING) != 0) -</MACRO> -<MACRO> -<NAME>GTK_CONTAINER_RESIZE_PENDING</NAME> -#define GTK_CONTAINER_RESIZE_PENDING(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_RESIZE_PENDING) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_RESIZE_NEEDED</NAME> -#define GTK_WIDGET_RESIZE_NEEDED(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_RESIZE_NEEDED) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_LEAVE_PENDING</NAME> -#define GTK_WIDGET_LEAVE_PENDING(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_LEAVE_PENDING) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_HAS_SHAPE_MASK</NAME> -#define GTK_WIDGET_HAS_SHAPE_MASK(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_HAS_SHAPE_MASK) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_IN_REPARENT</NAME> -#define GTK_WIDGET_IN_REPARENT(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_IN_REPARENT) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_IS_OFFSCREEN</NAME> -#define GTK_WIDGET_IS_OFFSCREEN(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_IS_OFFSCREEN) != 0) -</MACRO> -<MACRO> -<NAME>GTK_PRIVATE_SET_FLAG</NAME> -#define GTK_PRIVATE_SET_FLAG(wid,flag) G_STMT_START{ (GTK_PRIVATE_FLAGS (wid) |= (PRIVATE_ ## flag)); }G_STMT_END -</MACRO> -<MACRO> -<NAME>GTK_PRIVATE_UNSET_FLAG</NAME> -#define GTK_PRIVATE_UNSET_FLAG(wid,flag) G_STMT_START{ (GTK_PRIVATE_FLAGS (wid) &= ~(PRIVATE_ ## flag)); }G_STMT_END -</MACRO> -<MACRO> -<NAME>GTK_TYPE_PROGRESS</NAME> -#define GTK_TYPE_PROGRESS (gtk_progress_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_PROGRESS</NAME> -#define GTK_PROGRESS(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PROGRESS, GtkProgress)) -</MACRO> -<MACRO> -<NAME>GTK_PROGRESS_CLASS</NAME> -#define GTK_PROGRESS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PROGRESS, GtkProgressClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_PROGRESS</NAME> -#define GTK_IS_PROGRESS(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_PROGRESS)) -</MACRO> -<MACRO> -<NAME>GTK_IS_PROGRESS_CLASS</NAME> -#define GTK_IS_PROGRESS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PROGRESS)) -</MACRO> -<STRUCT> -<NAME>GtkProgress</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkProgressClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkProgress</NAME> -struct GtkProgress -{ - GtkWidget widget; - - GtkAdjustment *adjustment; - GdkPixmap *offscreen_pixmap; - gchar *format; - gfloat x_align; - gfloat y_align; - - guint show_text : 1; - guint activity_mode : 1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_progress_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_set_show_text</NAME> -<RETURNS>void </RETURNS> -GtkProgress *progress,gint show_text -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_set_text_alignment</NAME> -<RETURNS>void </RETURNS> -GtkProgress *progress,gfloat x_align,gfloat y_align -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_set_format_string</NAME> -<RETURNS>void </RETURNS> -GtkProgress *progress,gchar *format -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_set_adjustment</NAME> -<RETURNS>void </RETURNS> -GtkProgress *progress,GtkAdjustment *adjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_configure</NAME> -<RETURNS>void </RETURNS> -GtkProgress *progress,gfloat value,gfloat min,gfloat max -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_set_percentage</NAME> -<RETURNS>void </RETURNS> -GtkProgress *progress,gfloat percentage -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_set_value</NAME> -<RETURNS>void </RETURNS> -GtkProgress *progress,gfloat value -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_get_value</NAME> -<RETURNS>gfloat </RETURNS> -GtkProgress *progress -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_set_activity_mode</NAME> -<RETURNS>void </RETURNS> -GtkProgress *progress,guint activity_mode -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_get_current_text</NAME> -<RETURNS>gchar *</RETURNS> -GtkProgress *progress -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_get_text_from_value</NAME> -<RETURNS>gchar *</RETURNS> -GtkProgress *progress,gfloat value -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_get_current_percentage</NAME> -<RETURNS>gfloat </RETURNS> -GtkProgress *progress -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_get_percentage_from_value</NAME> -<RETURNS>gfloat </RETURNS> -GtkProgress *progress,gfloat value -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_PROGRESS_BAR</NAME> -#define GTK_TYPE_PROGRESS_BAR (gtk_progress_bar_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_PROGRESS_BAR</NAME> -#define GTK_PROGRESS_BAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PROGRESS_BAR, GtkProgressBar)) -</MACRO> -<MACRO> -<NAME>GTK_PROGRESS_BAR_CLASS</NAME> -#define GTK_PROGRESS_BAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PROGRESS_BAR, GtkProgressBarClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_PROGRESS_BAR</NAME> -#define GTK_IS_PROGRESS_BAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_PROGRESS_BAR)) -</MACRO> -<MACRO> -<NAME>GTK_IS_PROGRESS_BAR_CLASS</NAME> -#define GTK_IS_PROGRESS_BAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PROGRESS_BAR)) -</MACRO> -<STRUCT> -<NAME>GtkProgressBar</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkProgressBarClass</NAME> -</STRUCT> -<ENUM> -<NAME>GtkProgressBarStyle</NAME> -typedef enum -{ - GTK_PROGRESS_CONTINUOUS, - GTK_PROGRESS_DISCRETE -} GtkProgressBarStyle; -</ENUM> -<ENUM> -<NAME>GtkProgressBarOrientation</NAME> -typedef enum -{ - GTK_PROGRESS_LEFT_TO_RIGHT, - GTK_PROGRESS_RIGHT_TO_LEFT, - GTK_PROGRESS_BOTTOM_TO_TOP, - GTK_PROGRESS_TOP_TO_BOTTOM -} GtkProgressBarOrientation; -</ENUM> -<STRUCT> -<NAME>GtkProgressBar</NAME> -struct GtkProgressBar -{ - GtkProgress progress; - - GtkProgressBarStyle bar_style; - GtkProgressBarOrientation orientation; - - guint blocks; - gint in_block; - - gint activity_pos; - guint activity_step; - guint activity_blocks; - guint activity_dir : 1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_progress_bar_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_bar_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_bar_new_with_adjustment</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkAdjustment *adjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_bar_set_bar_style</NAME> -<RETURNS>void </RETURNS> -GtkProgressBar *pbar,GtkProgressBarStyle style -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_bar_set_discrete_blocks</NAME> -<RETURNS>void </RETURNS> -GtkProgressBar *pbar,guint blocks -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_bar_set_activity_step</NAME> -<RETURNS>void </RETURNS> -GtkProgressBar *pbar,guint step -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_bar_set_activity_blocks</NAME> -<RETURNS>void </RETURNS> -GtkProgressBar *pbar,guint blocks -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_bar_set_orientation</NAME> -<RETURNS>void </RETURNS> -GtkProgressBar *pbar,GtkProgressBarOrientation orientation -</FUNCTION> -<FUNCTION> -<NAME>gtk_progress_bar_update</NAME> -<RETURNS>void </RETURNS> -GtkProgressBar *pbar,gfloat percentage -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_RADIO_BUTTON</NAME> -#define GTK_TYPE_RADIO_BUTTON (gtk_radio_button_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_RADIO_BUTTON</NAME> -#define GTK_RADIO_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_RADIO_BUTTON, GtkRadioButton)) -</MACRO> -<MACRO> -<NAME>GTK_RADIO_BUTTON_CLASS</NAME> -#define GTK_RADIO_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_RADIO_BUTTON, GtkRadioButtonClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_RADIO_BUTTON</NAME> -#define GTK_IS_RADIO_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_RADIO_BUTTON)) -</MACRO> -<MACRO> -<NAME>GTK_IS_RADIO_BUTTON_CLASS</NAME> -#define GTK_IS_RADIO_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RADIO_BUTTON)) -</MACRO> -<STRUCT> -<NAME>GtkRadioButton</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkRadioButtonClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkRadioButton</NAME> -struct GtkRadioButton -{ - GtkCheckButton check_button; - - GSList *group; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_radio_button_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_radio_button_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GSList *group -</FUNCTION> -<FUNCTION> -<NAME>gtk_radio_button_new_from_widget</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkRadioButton *group -</FUNCTION> -<FUNCTION> -<NAME>gtk_radio_button_new_with_label</NAME> -<RETURNS>GtkWidget *</RETURNS> -GSList *group,const gchar *label -</FUNCTION> -<FUNCTION> -<NAME>gtk_radio_button_new_with_label_from_widget</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkRadioButton *group,const gchar *label -</FUNCTION> -<FUNCTION> -<NAME>gtk_radio_button_group</NAME> -<RETURNS>GSList *</RETURNS> -GtkRadioButton *radio_button -</FUNCTION> -<FUNCTION> -<NAME>gtk_radio_button_set_group</NAME> -<RETURNS>void </RETURNS> -GtkRadioButton *radio_button,GSList *group -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_RADIO_MENU_ITEM</NAME> -#define GTK_TYPE_RADIO_MENU_ITEM (gtk_radio_menu_item_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_RADIO_MENU_ITEM</NAME> -#define GTK_RADIO_MENU_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_RADIO_MENU_ITEM, GtkRadioMenuItem)) -</MACRO> -<MACRO> -<NAME>GTK_RADIO_MENU_ITEM_CLASS</NAME> -#define GTK_RADIO_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_RADIO_MENU_ITEM, GtkRadioMenuItemClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_RADIO_MENU_ITEM</NAME> -#define GTK_IS_RADIO_MENU_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_RADIO_MENU_ITEM)) -</MACRO> -<MACRO> -<NAME>GTK_IS_RADIO_MENU_ITEM_CLASS</NAME> -#define GTK_IS_RADIO_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RADIO_MENU_ITEM)) -</MACRO> -<STRUCT> -<NAME>GtkRadioMenuItem</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkRadioMenuItemClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkRadioMenuItem</NAME> -struct GtkRadioMenuItem -{ - GtkCheckMenuItem check_menu_item; - - GSList *group; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_radio_menu_item_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_radio_menu_item_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GSList *group -</FUNCTION> -<FUNCTION> -<NAME>gtk_radio_menu_item_new_with_label</NAME> -<RETURNS>GtkWidget *</RETURNS> -GSList *group,const gchar *label -</FUNCTION> -<FUNCTION> -<NAME>gtk_radio_menu_item_group</NAME> -<RETURNS>GSList *</RETURNS> -GtkRadioMenuItem *radio_menu_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_radio_menu_item_set_group</NAME> -<RETURNS>void </RETURNS> -GtkRadioMenuItem *radio_menu_item,GSList *group -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_RANGE</NAME> -#define GTK_TYPE_RANGE (gtk_range_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_RANGE</NAME> -#define GTK_RANGE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_RANGE, GtkRange)) -</MACRO> -<MACRO> -<NAME>GTK_RANGE_CLASS</NAME> -#define GTK_RANGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_RANGE, GtkRangeClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_RANGE</NAME> -#define GTK_IS_RANGE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_RANGE)) -</MACRO> -<MACRO> -<NAME>GTK_IS_RANGE_CLASS</NAME> -#define GTK_IS_RANGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RANGE)) -</MACRO> -<STRUCT> -<NAME>GtkRange</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkRangeClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkRange</NAME> -struct GtkRange -{ - GtkWidget widget; - - GdkWindow *trough; - GdkWindow *slider; - GdkWindow *step_forw; - GdkWindow *step_back; - - gint16 x_click_point; - gint16 y_click_point; - - guint8 button; - gint8 digits; - guint policy : 2; - guint scroll_type : 3; - guint in_child : 3; - guint click_child : 3; - guint need_timer : 1; - - guint32 timer; - - gfloat old_value; - gfloat old_lower; - gfloat old_upper; - gfloat old_page_size; - - GtkAdjustment *adjustment; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_range_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_get_adjustment</NAME> -<RETURNS>GtkAdjustment *</RETURNS> -GtkRange *range -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_set_update_policy</NAME> -<RETURNS>void </RETURNS> -GtkRange *range,GtkUpdateType policy -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_set_adjustment</NAME> -<RETURNS>void </RETURNS> -GtkRange *range,GtkAdjustment *adjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_draw_background</NAME> -<RETURNS>void </RETURNS> -GtkRange *range -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_clear_background</NAME> -<RETURNS>void </RETURNS> -GtkRange *range -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_draw_trough</NAME> -<RETURNS>void </RETURNS> -GtkRange *range -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_draw_slider</NAME> -<RETURNS>void </RETURNS> -GtkRange *range -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_draw_step_forw</NAME> -<RETURNS>void </RETURNS> -GtkRange *range -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_draw_step_back</NAME> -<RETURNS>void </RETURNS> -GtkRange *range -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_slider_update</NAME> -<RETURNS>void </RETURNS> -GtkRange *range -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_trough_click</NAME> -<RETURNS>gint </RETURNS> -GtkRange *range,gint x,gint y,gfloat *jump_perc -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_default_hslider_update</NAME> -<RETURNS>void </RETURNS> -GtkRange *range -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_default_vslider_update</NAME> -<RETURNS>void </RETURNS> -GtkRange *range -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_default_htrough_click</NAME> -<RETURNS>gint </RETURNS> -GtkRange *range,gint x,gint y,gfloat *jump_perc -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_default_vtrough_click</NAME> -<RETURNS>gint </RETURNS> -GtkRange *range,gint x,gint y,gfloat *jump_perc -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_default_hmotion</NAME> -<RETURNS>void </RETURNS> -GtkRange *range,gint xdelta,gint ydelta -</FUNCTION> -<FUNCTION> -<NAME>gtk_range_default_vmotion</NAME> -<RETURNS>void </RETURNS> -GtkRange *range,gint xdelta,gint ydelta -</FUNCTION> -<ENUM> -<NAME>GtkRcFlags</NAME> -typedef enum { - GTK_RC_FG = 1 << 0, - GTK_RC_BG = 1 << 1, - GTK_RC_TEXT = 1 << 2, - GTK_RC_BASE = 1 << 3 -} GtkRcFlags; -</ENUM> -<STRUCT> -<NAME>GtkRcStyle</NAME> -struct GtkRcStyle -{ - gchar *name; - gchar *font_name; - gchar *fontset_name; - gchar *bg_pixmap_name[5]; - - GtkRcFlags color_flags[5]; - GdkColor fg[5]; - GdkColor bg[5]; - GdkColor text[5]; - GdkColor base[5]; - - GtkThemeEngine *engine; - gpointer engine_data; - - /* Private */ - guint ref_count; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_rc_init</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_add_default_file</NAME> -<RETURNS>void </RETURNS> -const gchar *filename -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_set_default_files</NAME> -<RETURNS>void </RETURNS> -gchar **filenames -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_get_default_files</NAME> -<RETURNS>gchar **</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_parse</NAME> -<RETURNS>void </RETURNS> -const gchar *filename -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_parse_string</NAME> -<RETURNS>void </RETURNS> -const gchar *rc_string -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_reparse_all</NAME> -<RETURNS>gboolean </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_get_style</NAME> -<RETURNS>GtkStyle *</RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_add_widget_name_style</NAME> -<RETURNS>void </RETURNS> -GtkRcStyle *rc_style,const gchar *pattern -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_add_widget_class_style</NAME> -<RETURNS>void </RETURNS> -GtkRcStyle *rc_style,const gchar *pattern -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_add_class_style</NAME> -<RETURNS>void </RETURNS> -GtkRcStyle *rc_style,const gchar *pattern -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_style_new</NAME> -<RETURNS>GtkRcStyle *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_style_ref</NAME> -<RETURNS>void </RETURNS> -GtkRcStyle *rc_style -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_style_unref</NAME> -<RETURNS>void </RETURNS> -GtkRcStyle *rc_style -</FUNCTION> -<USER_FUNCTION> -<NAME>GtkImageLoader</NAME> -<RETURNS>GdkPixmap *</RETURNS> -GdkWindow *window, - GdkColormap *colormap, - GdkBitmap **mask, - GdkColor *transparent_color, - const gchar *filename -</USER_FUNCTION> -<FUNCTION> -<NAME>gtk_rc_set_image_loader</NAME> -<RETURNS>void </RETURNS> -GtkImageLoader loader -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_load_image</NAME> -<RETURNS>GdkPixmap *</RETURNS> -GdkColormap *colormap,GdkColor *transparent_color,const gchar *filename -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_find_pixmap_in_path</NAME> -<RETURNS>gchar *</RETURNS> -GScanner *scanner,const gchar *pixmap_file -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_find_module_in_path</NAME> -<RETURNS>gchar *</RETURNS> -const gchar *module_file -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_get_theme_dir</NAME> -<RETURNS>gchar *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_get_module_dir</NAME> -<RETURNS>gchar *</RETURNS> -void -</FUNCTION> -<ENUM> -<NAME>GtkRcTokenType</NAME> -typedef enum { - 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_BASE, - GTK_RC_TOKEN_TEXT, - GTK_RC_TOKEN_FONT, - GTK_RC_TOKEN_FONTSET, - 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_RC, - GTK_RC_TOKEN_HIGHEST, - GTK_RC_TOKEN_ENGINE, - GTK_RC_TOKEN_MODULE_PATH, - GTK_RC_TOKEN_LAST -} GtkRcTokenType; -</ENUM> -<FUNCTION> -<NAME>gtk_rc_parse_color</NAME> -<RETURNS>guint </RETURNS> -GScanner *scanner,GdkColor *color -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_parse_state</NAME> -<RETURNS>guint </RETURNS> -GScanner *scanner,GtkStateType *state -</FUNCTION> -<FUNCTION> -<NAME>gtk_rc_parse_priority</NAME> -<RETURNS>guint </RETURNS> -GScanner *scanner,GtkPathPriorityType *priority -</FUNCTION> -<MACRO> -<NAME>GTK_RULER</NAME> -#define GTK_RULER(obj) GTK_CHECK_CAST (obj, gtk_ruler_get_type (), GtkRuler) -</MACRO> -<MACRO> -<NAME>GTK_RULER_CLASS</NAME> -#define GTK_RULER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_ruler_get_type (), GtkRulerClass) -</MACRO> -<MACRO> -<NAME>GTK_IS_RULER</NAME> -#define GTK_IS_RULER(obj) GTK_CHECK_TYPE (obj, gtk_ruler_get_type ()) -</MACRO> -<STRUCT> -<NAME>GtkRuler</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkRulerClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkRulerMetric</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkRuler</NAME> -struct GtkRuler -{ - GtkWidget widget; - - GdkPixmap *backing_store; - GdkGC *non_gr_exp_gc; - GtkRulerMetric *metric; - gint xsrc, ysrc; - gint slider_size; - - /* The upper limit of the ruler (in points) */ - gfloat lower; - /* The lower limit of the ruler */ - gfloat upper; - /* The position of the mark on the ruler */ - gfloat position; - /* The maximum size of the ruler */ - gfloat max_size; -}; -</STRUCT> -<STRUCT> -<NAME>GtkRulerMetric</NAME> -struct GtkRulerMetric -{ - gchar *metric_name; - gchar *abbrev; - /* 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 */ - gfloat pixels_per_unit; - gfloat ruler_scale[10]; - gint subdivide[5]; /* five possible modes of subdivision */ -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_ruler_get_type</NAME> -<RETURNS>guint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_ruler_set_metric</NAME> -<RETURNS>void </RETURNS> -GtkRuler *ruler,GtkMetricType metric -</FUNCTION> -<FUNCTION> -<NAME>gtk_ruler_set_range</NAME> -<RETURNS>void </RETURNS> -GtkRuler *ruler,gfloat lower,gfloat upper,gfloat position,gfloat max_size -</FUNCTION> -<FUNCTION> -<NAME>gtk_ruler_draw_ticks</NAME> -<RETURNS>void </RETURNS> -GtkRuler *ruler -</FUNCTION> -<FUNCTION> -<NAME>gtk_ruler_draw_pos</NAME> -<RETURNS>void </RETURNS> -GtkRuler *ruler -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_SCALE</NAME> -#define GTK_TYPE_SCALE (gtk_scale_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_SCALE</NAME> -#define GTK_SCALE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SCALE, GtkScale)) -</MACRO> -<MACRO> -<NAME>GTK_SCALE_CLASS</NAME> -#define GTK_SCALE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCALE, GtkScaleClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_SCALE</NAME> -#define GTK_IS_SCALE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SCALE)) -</MACRO> -<MACRO> -<NAME>GTK_IS_SCALE_CLASS</NAME> -#define GTK_IS_SCALE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCALE)) -</MACRO> -<STRUCT> -<NAME>GtkScale</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkScaleClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkScale</NAME> -struct GtkScale -{ - GtkRange range; - - guint draw_value : 1; - guint value_pos : 2; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_scale_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_scale_set_digits</NAME> -<RETURNS>void </RETURNS> -GtkScale *scale,gint digits -</FUNCTION> -<FUNCTION> -<NAME>gtk_scale_set_draw_value</NAME> -<RETURNS>void </RETURNS> -GtkScale *scale,gboolean draw_value -</FUNCTION> -<FUNCTION> -<NAME>gtk_scale_set_value_pos</NAME> -<RETURNS>void </RETURNS> -GtkScale *scale,GtkPositionType pos -</FUNCTION> -<FUNCTION> -<NAME>gtk_scale_get_value_width</NAME> -<RETURNS>gint </RETURNS> -GtkScale *scale -</FUNCTION> -<FUNCTION> -<NAME>gtk_scale_draw_value</NAME> -<RETURNS>void </RETURNS> -GtkScale *scale -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_SCROLLBAR</NAME> -#define GTK_TYPE_SCROLLBAR (gtk_scrollbar_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_SCROLLBAR</NAME> -#define GTK_SCROLLBAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SCROLLBAR, GtkScrollbar)) -</MACRO> -<MACRO> -<NAME>GTK_SCROLLBAR_CLASS</NAME> -#define GTK_SCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCROLLBAR, GtkScrollbarClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_SCROLLBAR</NAME> -#define GTK_IS_SCROLLBAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SCROLLBAR)) -</MACRO> -<MACRO> -<NAME>GTK_IS_SCROLLBAR_CLASS</NAME> -#define GTK_IS_SCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCROLLBAR)) -</MACRO> -<STRUCT> -<NAME>GtkScrollbar</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkScrollbarClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkScrollbar</NAME> -struct GtkScrollbar -{ - GtkRange range; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_scrollbar_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_SCROLLED_WINDOW</NAME> -#define GTK_TYPE_SCROLLED_WINDOW (gtk_scrolled_window_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_SCROLLED_WINDOW</NAME> -#define GTK_SCROLLED_WINDOW(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SCROLLED_WINDOW, GtkScrolledWindow)) -</MACRO> -<MACRO> -<NAME>GTK_SCROLLED_WINDOW_CLASS</NAME> -#define GTK_SCROLLED_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCROLLED_WINDOW, GtkScrolledWindowClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_SCROLLED_WINDOW</NAME> -#define GTK_IS_SCROLLED_WINDOW(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SCROLLED_WINDOW)) -</MACRO> -<MACRO> -<NAME>GTK_IS_SCROLLED_WINDOW_CLASS</NAME> -#define GTK_IS_SCROLLED_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCROLLED_WINDOW)) -</MACRO> -<STRUCT> -<NAME>GtkScrolledWindow</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkScrolledWindowClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkScrolledWindow</NAME> -struct GtkScrolledWindow -{ - GtkBin container; - - GtkWidget *hscrollbar; - GtkWidget *vscrollbar; - - guint hscrollbar_policy : 2; - guint vscrollbar_policy : 2; - guint hscrollbar_visible : 1; - guint vscrollbar_visible : 1; - guint window_placement : 2; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_scrolled_window_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_scrolled_window_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkAdjustment *hadjustment,GtkAdjustment *vadjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_scrolled_window_set_hadjustment</NAME> -<RETURNS>void </RETURNS> -GtkScrolledWindow *scrolled_window,GtkAdjustment *hadjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_scrolled_window_set_vadjustment</NAME> -<RETURNS>void </RETURNS> -GtkScrolledWindow *scrolled_window,GtkAdjustment *hadjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_scrolled_window_get_hadjustment</NAME> -<RETURNS>GtkAdjustment *</RETURNS> -GtkScrolledWindow *scrolled_window -</FUNCTION> -<FUNCTION> -<NAME>gtk_scrolled_window_get_vadjustment</NAME> -<RETURNS>GtkAdjustment *</RETURNS> -GtkScrolledWindow *scrolled_window -</FUNCTION> -<FUNCTION> -<NAME>gtk_scrolled_window_set_policy</NAME> -<RETURNS>void </RETURNS> -GtkScrolledWindow *scrolled_window,GtkPolicyType hscrollbar_policy,GtkPolicyType vscrollbar_policy -</FUNCTION> -<FUNCTION> -<NAME>gtk_scrolled_window_set_placement</NAME> -<RETURNS>void </RETURNS> -GtkScrolledWindow *scrolled_window,GtkCornerType window_placement -</FUNCTION> -<FUNCTION> -<NAME>gtk_scrolled_window_add_with_viewport</NAME> -<RETURNS>void </RETURNS> -GtkScrolledWindow *scrolled_window,GtkWidget *child -</FUNCTION> -<STRUCT> -<NAME>GtkTargetList</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTargetEntry</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTargetEntry</NAME> -struct GtkTargetEntry { - gchar *target; - guint flags; - guint info; -}; -</STRUCT> -<STRUCT> -<NAME>GtkTargetPair</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTargetList</NAME> -struct GtkTargetList { - GList *list; - guint ref_count; -}; -</STRUCT> -<STRUCT> -<NAME>GtkTargetPair</NAME> -struct GtkTargetPair { - GdkAtom target; - guint flags; - guint info; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_target_list_new</NAME> -<RETURNS>GtkTargetList *</RETURNS> -const GtkTargetEntry *targets,guint ntargets -</FUNCTION> -<FUNCTION> -<NAME>gtk_target_list_ref</NAME> -<RETURNS>void </RETURNS> -GtkTargetList *list -</FUNCTION> -<FUNCTION> -<NAME>gtk_target_list_unref</NAME> -<RETURNS>void </RETURNS> -GtkTargetList *list -</FUNCTION> -<FUNCTION> -<NAME>gtk_target_list_add</NAME> -<RETURNS>void </RETURNS> -GtkTargetList *list,GdkAtom target,guint flags,guint info -</FUNCTION> -<FUNCTION> -<NAME>gtk_target_list_add_table</NAME> -<RETURNS>void </RETURNS> -GtkTargetList *list,const GtkTargetEntry *targets,guint ntargets -</FUNCTION> -<FUNCTION> -<NAME>gtk_target_list_remove</NAME> -<RETURNS>void </RETURNS> -GtkTargetList *list,GdkAtom target -</FUNCTION> -<FUNCTION> -<NAME>gtk_target_list_find</NAME> -<RETURNS>gboolean </RETURNS> -GtkTargetList *list,GdkAtom target,guint *info -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_owner_set</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *widget,GdkAtom selection,guint32 time -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_add_target</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GdkAtom selection,GdkAtom target,guint info -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_add_targets</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GdkAtom selection,const GtkTargetEntry *targets,guint ntargets -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_convert</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *widget,GdkAtom selection,GdkAtom target,guint32 time -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_data_set</NAME> -<RETURNS>void </RETURNS> -GtkSelectionData *selection_data,GdkAtom type,gint format,guchar *data,gint length -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_remove_all</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_clear</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *widget,GdkEventSelection *event -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_request</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *widget,GdkEventSelection *event -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_incr_event</NAME> -<RETURNS>gint </RETURNS> -GdkWindow *window,GdkEventProperty *event -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_notify</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *widget,GdkEventSelection *event -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_property_notify</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *widget,GdkEventProperty *event -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_data_copy</NAME> -<RETURNS>GtkSelectioData *</RETURNS> -GtkSelectionData *data -</FUNCTION> -<FUNCTION> -<NAME>gtk_selection_data_free</NAME> -<RETURNS>void </RETURNS> -GtkSelectionData *data -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_SEPARATOR</NAME> -#define GTK_TYPE_SEPARATOR (gtk_separator_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_SEPARATOR</NAME> -#define GTK_SEPARATOR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SEPARATOR, GtkSeparator)) -</MACRO> -<MACRO> -<NAME>GTK_SEPARATOR_CLASS</NAME> -#define GTK_SEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SEPARATOR, GtkSeparatorClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_SEPARATOR</NAME> -#define GTK_IS_SEPARATOR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SEPARATOR)) -</MACRO> -<MACRO> -<NAME>GTK_IS_SEPARATOR_CLASS</NAME> -#define GTK_IS_SEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SEPARATOR)) -</MACRO> -<STRUCT> -<NAME>GtkSeparator</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkSeparatorClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkSeparator</NAME> -struct GtkSeparator -{ - GtkWidget widget; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_separator_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<MACRO> -<NAME>GTK_SIGNAL_OFFSET</NAME> -#define GTK_SIGNAL_OFFSET(struct, field) (GTK_STRUCT_OFFSET (struct, field)) -</MACRO> -<USER_FUNCTION> -<NAME>GtkSignalMarshal</NAME> -<RETURNS>void </RETURNS> -GtkObject *object, - gpointer data, - guint nparams, - GtkArg *args, - GtkType *arg_types, - GtkType return_type -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkSignalDestroy</NAME> -<RETURNS>void </RETURNS> -gpointer data -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkEmissionHook</NAME> -<RETURNS>gboolean </RETURNS> -GtkObject *object, - guint signal_id, - guint n_params, - GtkArg *params, - gpointer data -</USER_FUNCTION> -<STRUCT> -<NAME>GtkSignalQuery</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkSignalQuery</NAME> -struct GtkSignalQuery -{ - GtkType object_type; - guint signal_id; - const gchar *signal_name; - guint is_user_signal : 1; - GtkSignalRunType signal_flags; - GtkType return_val; - guint nparams; - const GtkType *params; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_signal_lookup</NAME> -<RETURNS>guint </RETURNS> -const gchar *name,GtkType object_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_name</NAME> -<RETURNS>gchar *</RETURNS> -guint signal_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_n_emissions</NAME> -<RETURNS>guint </RETURNS> -GtkObject *object,guint signal_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_n_emissions_by_name</NAME> -<RETURNS>guint </RETURNS> -GtkObject *object,const gchar *name -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_emit_stop</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,guint signal_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_emit_stop_by_name</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *name -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_connect</NAME> -<RETURNS>guint </RETURNS> -GtkObject *object,const gchar *name,GtkSignalFunc func,gpointer func_data -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_connect_after</NAME> -<RETURNS>guint </RETURNS> -GtkObject *object,const gchar *name,GtkSignalFunc func,gpointer func_data -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_connect_object</NAME> -<RETURNS>guint </RETURNS> -GtkObject *object,const gchar *name,GtkSignalFunc func,GtkObject *slot_object -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_connect_object_after</NAME> -<RETURNS>guint </RETURNS> -GtkObject *object,const gchar *name,GtkSignalFunc func,GtkObject *slot_object -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_connect_full</NAME> -<RETURNS>guint </RETURNS> -GtkObject *object,const gchar *name,GtkSignalFunc func,GtkCallbackMarshal marshal,gpointer data,GtkDestroyNotify destroy_func,gint object_signal,gint after -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_connect_object_while_alive</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *signal,GtkSignalFunc func,GtkObject *alive_object -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_connect_while_alive</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *signal,GtkSignalFunc func,gpointer func_data,GtkObject *alive_object -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_disconnect</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,guint handler_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_disconnect_by_func</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,GtkSignalFunc func,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_disconnect_by_data</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_handler_block</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,guint handler_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_handler_block_by_func</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,GtkSignalFunc func,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_handler_block_by_data</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_handler_unblock</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,guint handler_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_handler_unblock_by_func</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,GtkSignalFunc func,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_handler_unblock_by_data</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_handler_pending</NAME> -<RETURNS>guint </RETURNS> -GtkObject *object,guint signal_id,gboolean may_be_blocked -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_handler_pending_by_func</NAME> -<RETURNS>guint </RETURNS> -GtkObject *object,guint signal_id,gboolean may_be_blocked,GtkSignalFunc func,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_handler_pending_by_id</NAME> -<RETURNS>gint </RETURNS> -GtkObject *object,guint handler_id,gboolean may_be_blocked -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_add_emission_hook</NAME> -<RETURNS>guint </RETURNS> -guint signal_id,GtkEmissionHook hook_func,gpointer data -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_add_emission_hook_full</NAME> -<RETURNS>guint </RETURNS> -guint signal_id,GtkEmissionHook hook_func,gpointer data,GDestroyNotify destroy -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_remove_emission_hook</NAME> -<RETURNS>void </RETURNS> -guint signal_id,guint hook_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_query</NAME> -<RETURNS>GtkSignalQuery *</RETURNS> -guint signal_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_init</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_new</NAME> -<RETURNS>guint </RETURNS> -const gchar *name,GtkSignalRunType signal_flags,GtkType object_type,guint function_offset,GtkSignalMarshaller marshaller,GtkType return_val,guint nparams,... -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_newv</NAME> -<RETURNS>guint </RETURNS> -const gchar *name,GtkSignalRunType signal_flags,GtkType object_type,guint function_offset,GtkSignalMarshaller marshaller,GtkType return_val,guint nparams,GtkType *params -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_emit</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,guint signal_id,... -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_emit_by_name</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *name,... -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_emitv</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,guint signal_id,GtkArg *params -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_emitv_by_name</NAME> -<RETURNS>void </RETURNS> -GtkObject *object,const gchar *name,GtkArg *params -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_handlers_destroy</NAME> -<RETURNS>void </RETURNS> -GtkObject *object -</FUNCTION> -<FUNCTION> -<NAME>gtk_signal_set_funcs</NAME> -<RETURNS>void </RETURNS> -GtkSignalMarshal marshal_func,GtkSignalDestroy destroy_func -</FUNCTION> -<MACRO> -<NAME>GTK_SOCKET</NAME> -#define GTK_SOCKET(obj) GTK_CHECK_CAST (obj, gtk_socket_get_type (), GtkSocket) -</MACRO> -<MACRO> -<NAME>GTK_SOCKET_CLASS</NAME> -#define GTK_SOCKET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_socket_get_type (), GtkSocketClass) -</MACRO> -<MACRO> -<NAME>GTK_IS_SOCKET</NAME> -#define GTK_IS_SOCKET(obj) GTK_CHECK_TYPE (obj, gtk_socket_get_type ()) -</MACRO> -<STRUCT> -<NAME>GtkSocket</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkSocketClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkSocket</NAME> -struct GtkSocket -{ - GtkContainer container; - - guint16 request_width; - guint16 request_height; - guint16 current_width; - guint16 current_height; - - GdkWindow *plug_window; - guint same_app : 1; - guint focus_in : 1; - guint have_size : 1; - guint need_map : 1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_socket_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_socket_get_type</NAME> -<RETURNS>guint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_socket_steal</NAME> -<RETURNS>void </RETURNS> -GtkSocket *socket,guint32 wid -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_SPIN_BUTTON</NAME> -#define GTK_TYPE_SPIN_BUTTON (gtk_spin_button_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_SPIN_BUTTON</NAME> -#define GTK_SPIN_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SPIN_BUTTON, GtkSpinButton)) -</MACRO> -<MACRO> -<NAME>GTK_SPIN_BUTTON_CLASS</NAME> -#define GTK_SPIN_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SPIN_BUTTON, GtkSpinButtonClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_SPIN_BUTTON</NAME> -#define GTK_IS_SPIN_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SPIN_BUTTON)) -</MACRO> -<MACRO> -<NAME>GTK_IS_SPIN_BUTTON_CLASS</NAME> -#define GTK_IS_SPIN_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SPIN_BUTTON)) -</MACRO> -<ENUM> -<NAME>GtkSpinButtonUpdatePolicy</NAME> -typedef enum -{ - GTK_UPDATE_ALWAYS, - GTK_UPDATE_IF_VALID -} GtkSpinButtonUpdatePolicy; -</ENUM> -<ENUM> -<NAME>GtkSpinType</NAME> -typedef enum -{ - 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 -} GtkSpinType; -</ENUM> -<STRUCT> -<NAME>GtkSpinButton</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkSpinButtonClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkSpinButton</NAME> -struct GtkSpinButton -{ - GtkEntry entry; - - GtkAdjustment *adjustment; - - GdkWindow *panel; - GtkShadowType shadow_type; - - guint32 timer; - guint32 ev_time; - - gfloat climb_rate; - gfloat timer_step; - - GtkSpinButtonUpdatePolicy update_policy; - - guint in_child : 2; - guint click_child : 2; - guint button : 2; - guint need_timer : 1; - guint timer_calls : 3; - guint digits : 3; - guint numeric : 1; - guint wrap : 1; - guint snap_to_ticks : 1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_spin_button_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_configure</NAME> -<RETURNS>void </RETURNS> -GtkSpinButton *spin_button,GtkAdjustment *adjustment,gfloat climb_rate,guint digits -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkAdjustment *adjustment,gfloat climb_rate,guint digits -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_set_adjustment</NAME> -<RETURNS>void </RETURNS> -GtkSpinButton *spin_button,GtkAdjustment *adjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_get_adjustment</NAME> -<RETURNS>GtkAdjustment *</RETURNS> -GtkSpinButton *spin_button -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_set_digits</NAME> -<RETURNS>void </RETURNS> -GtkSpinButton *spin_button,guint digits -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_get_value_as_float</NAME> -<RETURNS>gfloat </RETURNS> -GtkSpinButton *spin_button -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_get_value_as_int</NAME> -<RETURNS>gint </RETURNS> -GtkSpinButton *spin_button -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_set_value</NAME> -<RETURNS>void </RETURNS> -GtkSpinButton *spin_button,gfloat value -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_set_update_policy</NAME> -<RETURNS>void </RETURNS> -GtkSpinButton *spin_button,GtkSpinButtonUpdatePolicy policy -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_set_numeric</NAME> -<RETURNS>void </RETURNS> -GtkSpinButton *spin_button,gboolean numeric -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_spin</NAME> -<RETURNS>void </RETURNS> -GtkSpinButton *spin_button,GtkSpinType direction,gfloat increment -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_set_wrap</NAME> -<RETURNS>void </RETURNS> -GtkSpinButton *spin_button,gboolean wrap -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_set_shadow_type</NAME> -<RETURNS>void </RETURNS> -GtkSpinButton *spin_button,GtkShadowType shadow_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_set_snap_to_ticks</NAME> -<RETURNS>void </RETURNS> -GtkSpinButton *spin_button,gboolean snap_to_ticks -</FUNCTION> -<FUNCTION> -<NAME>gtk_spin_button_update</NAME> -<RETURNS>void </RETURNS> -GtkSpinButton *spin_button -</FUNCTION> -<MACRO> -<NAME>GTK_STATUSBAR</NAME> -#define GTK_STATUSBAR(obj) GTK_CHECK_CAST (obj, gtk_statusbar_get_type (), GtkStatusbar) -</MACRO> -<MACRO> -<NAME>GTK_STATUSBAR_CLASS</NAME> -#define GTK_STATUSBAR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_statusbar_get_type (), GtkStatusbarClass) -</MACRO> -<MACRO> -<NAME>GTK_IS_STATUSBAR</NAME> -#define GTK_IS_STATUSBAR(obj) GTK_CHECK_TYPE (obj, gtk_statusbar_get_type ()) -</MACRO> -<STRUCT> -<NAME>GtkStatusbar</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkStatusbarClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkStatusbarMsg</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkStatusbar</NAME> -struct GtkStatusbar -{ - GtkHBox parent_widget; - - GtkWidget *frame; - GtkWidget *label; - - GSList *messages; - GSList *keys; - - guint seq_context_id; - guint seq_message_id; -}; -</STRUCT> -<STRUCT> -<NAME>GtkStatusbarMsg</NAME> -struct GtkStatusbarMsg -{ - gchar *text; - guint context_id; - guint message_id; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_statusbar_get_type</NAME> -<RETURNS>guint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_statusbar_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_statusbar_get_context_id</NAME> -<RETURNS>guint </RETURNS> -GtkStatusbar *statusbar,const gchar *context_description -</FUNCTION> -<FUNCTION> -<NAME>gtk_statusbar_push</NAME> -<RETURNS>guint </RETURNS> -GtkStatusbar *statusbar,guint context_id,const gchar *text -</FUNCTION> -<FUNCTION> -<NAME>gtk_statusbar_pop</NAME> -<RETURNS>void </RETURNS> -GtkStatusbar *statusbar,guint context_id -</FUNCTION> -<FUNCTION> -<NAME>gtk_statusbar_remove</NAME> -<RETURNS>void </RETURNS> -GtkStatusbar *statusbar,guint context_id,guint message_id -</FUNCTION> -<STRUCT> -<NAME>GtkStyle</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkStyleClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkThemeEngine</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkRcStyle</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkWidget</NAME> -</STRUCT> -<MACRO> -<NAME>GTK_STYLE_NUM_STYLECOLORS</NAME> -#define GTK_STYLE_NUM_STYLECOLORS() (7 * 5) -</MACRO> -<MACRO> -<NAME>GTK_STYLE_ATTACHED</NAME> -#define GTK_STYLE_ATTACHED(style) (((GtkStyle*) (style))->attach_count > 0) -</MACRO> -<STRUCT> -<NAME>GtkStyle</NAME> -struct GtkStyle -{ - GtkStyleClass *klass; - - GdkColor fg[5]; - GdkColor bg[5]; - GdkColor light[5]; - GdkColor dark[5]; - GdkColor mid[5]; - GdkColor text[5]; - GdkColor base[5]; - - GdkColor black; - GdkColor white; - GdkFont *font; - - GdkGC *fg_gc[5]; - GdkGC *bg_gc[5]; - GdkGC *light_gc[5]; - GdkGC *dark_gc[5]; - GdkGC *mid_gc[5]; - GdkGC *text_gc[5]; - GdkGC *base_gc[5]; - GdkGC *black_gc; - GdkGC *white_gc; - - GdkPixmap *bg_pixmap[5]; - - /* private */ - - gint ref_count; - gint attach_count; - - gint depth; - GdkColormap *colormap; - - GtkThemeEngine *engine; - - gpointer engine_data; - - GtkRcStyle *rc_style; /* the Rc style from which this style - * was created - */ - GSList *styles; -}; -</STRUCT> -<STRUCT> -<NAME>GtkStyleClass</NAME> -struct GtkStyleClass -{ - gint xthickness; - gint ythickness; - - void (*draw_hline) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x1, - gint x2, - gint y); - void (*draw_vline) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint y1, - gint y2, - gint x); - void (*draw_shadow) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height); - void (*draw_polygon) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - GdkPoint *point, - gint npoints, - gboolean fill); - void (*draw_arrow) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - GtkArrowType arrow_type, - gboolean fill, - gint x, - gint y, - gint width, - gint height); - void (*draw_diamond) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height); - void (*draw_oval) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height); - void (*draw_string) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - const gchar *string); - void (*draw_box) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height); - void (*draw_flat_box) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height); - void (*draw_check) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height); - void (*draw_option) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height); - void (*draw_cross) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height); - void (*draw_ramp) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - GtkArrowType arrow_type, - gint x, - gint y, - gint width, - gint height); - void (*draw_tab) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height); - void (*draw_shadow_gap) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height, - GtkPositionType gap_side, - gint gap_x, - gint gap_width); - void (*draw_box_gap) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height, - GtkPositionType gap_side, - gint gap_x, - gint gap_width); - void (*draw_extension) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height, - GtkPositionType gap_side); - void (*draw_focus) (GtkStyle *style, - GdkWindow *window, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height); - void (*draw_slider) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height, - GtkOrientation orientation); - void (*draw_handle) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height, - GtkOrientation orientation); -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_style_new</NAME> -<RETURNS>GtkStyle *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_style_copy</NAME> -<RETURNS>GtkStyle *</RETURNS> -GtkStyle *style -</FUNCTION> -<FUNCTION> -<NAME>gtk_style_attach</NAME> -<RETURNS>GtkStyle *</RETURNS> -GtkStyle *style,GdkWindow *window -</FUNCTION> -<FUNCTION> -<NAME>gtk_style_detach</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style -</FUNCTION> -<FUNCTION> -<NAME>gtk_style_ref</NAME> -<RETURNS>GtkStyle *</RETURNS> -GtkStyle *style -</FUNCTION> -<FUNCTION> -<NAME>gtk_style_unref</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style -</FUNCTION> -<FUNCTION> -<NAME>gtk_style_set_background</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_style_apply_default_background</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,gboolean set_bg,GtkStateType state_type,GdkRectangle *area,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_hline</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,gint x1,gint x2,gint y -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_vline</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,gint y1,gint y2,gint x -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_shadow</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_polygon</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkPoint *points,gint npoints,gboolean fill -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_arrow</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GtkArrowType arrow_type,gboolean fill,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_diamond</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_oval</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_string</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,gint x,gint y,const gchar *string -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_box</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_flat_box</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_check</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_option</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_cross</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_ramp</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GtkArrowType arrow_type,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_tab</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_shadow_gap</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height,GtkPositionType gap_side,gint gap_x,gint gap_width -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_box_gap</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height,GtkPositionType gap_side,gint gap_x,gint gap_width -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_extension</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height,GtkPositionType gap_side -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_focus</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_slider</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height,GtkOrientation orientation -</FUNCTION> -<FUNCTION> -<NAME>gtk_draw_handle</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,gint x,gint y,gint width,gint height,GtkOrientation orientation -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_hline</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x1,gint x2,gint y -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_vline</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint y1,gint y2,gint x -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_shadow</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_polygon</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,GdkPoint *points,gint npoints,gboolean fill -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_arrow</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,GtkArrowType arrow_type,gboolean fill,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_diamond</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_oval</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_string</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,const gchar *string -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_box</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_flat_box</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_check</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_option</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_cross</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_ramp</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,GtkArrowType arrow_type,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_tab</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_shadow_gap</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height,GtkPositionType gap_side,gint gap_x,gint gap_width -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_box_gap</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height,GtkPositionType gap_side,gint gap_x,gint gap_width -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_extension</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height,GtkPositionType gap_side -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_focus</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_slider</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height,GtkOrientation orientation -</FUNCTION> -<FUNCTION> -<NAME>gtk_paint_handle</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style,GdkWindow *window,GtkStateType state_type,GtkShadowType shadow_type,GdkRectangle *area,GtkWidget *widget,gchar *detail,gint x,gint y,gint width,gint height,GtkOrientation orientation -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_TABLE</NAME> -#define GTK_TYPE_TABLE (gtk_table_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_TABLE</NAME> -#define GTK_TABLE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TABLE, GtkTable)) -</MACRO> -<MACRO> -<NAME>GTK_TABLE_CLASS</NAME> -#define GTK_TABLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TABLE, GtkTableClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TABLE</NAME> -#define GTK_IS_TABLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TABLE)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TABLE_CLASS</NAME> -#define GTK_IS_TABLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TABLE)) -</MACRO> -<STRUCT> -<NAME>GtkTable</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTableClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTableChild</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTableRowCol</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTable</NAME> -struct GtkTable -{ - GtkContainer container; - - GList *children; - GtkTableRowCol *rows; - GtkTableRowCol *cols; - guint16 nrows; - guint16 ncols; - guint16 column_spacing; - guint16 row_spacing; - guint homogeneous : 1; -}; -</STRUCT> -<STRUCT> -<NAME>GtkTableChild</NAME> -struct GtkTableChild -{ - GtkWidget *widget; - guint16 left_attach; - guint16 right_attach; - guint16 top_attach; - guint16 bottom_attach; - guint16 xpadding; - guint16 ypadding; - guint xexpand : 1; - guint yexpand : 1; - guint xshrink : 1; - guint yshrink : 1; - guint xfill : 1; - guint yfill : 1; -}; -</STRUCT> -<STRUCT> -<NAME>GtkTableRowCol</NAME> -struct GtkTableRowCol -{ - guint16 requisition; - guint16 allocation; - guint16 spacing; - guint need_expand : 1; - guint need_shrink : 1; - guint expand : 1; - guint shrink : 1; - guint empty : 1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_table_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_table_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -guint rows,guint columns,gboolean homogeneous -</FUNCTION> -<FUNCTION> -<NAME>gtk_table_resize</NAME> -<RETURNS>void </RETURNS> -GtkTable *table,guint rows,guint columns -</FUNCTION> -<FUNCTION> -<NAME>gtk_table_attach</NAME> -<RETURNS>void </RETURNS> -GtkTable *table,GtkWidget *child,guint left_attach,guint right_attach,guint top_attach,guint bottom_attach,GtkAttachOptions xoptions,GtkAttachOptions yoptions,guint xpadding,guint ypadding -</FUNCTION> -<FUNCTION> -<NAME>gtk_table_attach_defaults</NAME> -<RETURNS>void </RETURNS> -GtkTable *table,GtkWidget *widget,guint left_attach,guint right_attach,guint top_attach,guint bottom_attach -</FUNCTION> -<FUNCTION> -<NAME>gtk_table_set_row_spacing</NAME> -<RETURNS>void </RETURNS> -GtkTable *table,guint row,guint spacing -</FUNCTION> -<FUNCTION> -<NAME>gtk_table_set_col_spacing</NAME> -<RETURNS>void </RETURNS> -GtkTable *table,guint column,guint spacing -</FUNCTION> -<FUNCTION> -<NAME>gtk_table_set_row_spacings</NAME> -<RETURNS>void </RETURNS> -GtkTable *table,guint spacing -</FUNCTION> -<FUNCTION> -<NAME>gtk_table_set_col_spacings</NAME> -<RETURNS>void </RETURNS> -GtkTable *table,guint spacing -</FUNCTION> -<FUNCTION> -<NAME>gtk_table_set_homogeneous</NAME> -<RETURNS>void </RETURNS> -GtkTable *table,gboolean homogeneous -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_TEAROFF_MENU_ITEM</NAME> -#define GTK_TYPE_TEAROFF_MENU_ITEM (gtk_tearoff_menu_item_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_TEAROFF_MENU_ITEM</NAME> -#define GTK_TEAROFF_MENU_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TEAROFF_MENU_ITEM, GtkTearoffMenuItem)) -</MACRO> -<MACRO> -<NAME>GTK_TEAROFF_MENU_ITEM_CLASS</NAME> -#define GTK_TEAROFF_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TEAROFF_MENU_ITEM, GtkTearoffMenuItemClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TEAROFF_MENU_ITEM</NAME> -#define GTK_IS_TEAROFF_MENU_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TEAROFF_MENU_ITEM)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TEAROFF_MENU_ITEM_CLASS</NAME> -#define GTK_IS_TEAROFF_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TEAROFF_MENU_ITEM)) -</MACRO> -<STRUCT> -<NAME>GtkTearoffMenuItem</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTearoffMenuItemClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTearoffMenuItem</NAME> -struct GtkTearoffMenuItem -{ - GtkMenuItem menu_item; - - guint torn_off : 1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_tearoff_menu_item_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_tearoff_menu_item_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_TEXT</NAME> -#define GTK_TYPE_TEXT (gtk_text_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_TEXT</NAME> -#define GTK_TEXT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TEXT, GtkText)) -</MACRO> -<MACRO> -<NAME>GTK_TEXT_CLASS</NAME> -#define GTK_TEXT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TEXT, GtkTextClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TEXT</NAME> -#define GTK_IS_TEXT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TEXT)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TEXT_CLASS</NAME> -#define GTK_IS_TEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TEXT)) -</MACRO> -<STRUCT> -<NAME>GtkTextFont</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPropertyMark</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkText</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTextClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkPropertyMark</NAME> -struct GtkPropertyMark -{ - /* Position in list. */ - GList* property; - - /* Offset into that property. */ - guint offset; - - /* Current index. */ - guint index; -}; -</STRUCT> -<STRUCT> -<NAME>GtkText</NAME> -struct GtkText -{ - GtkEditable editable; - - GdkWindow *text_area; - - GtkAdjustment *hadj; - GtkAdjustment *vadj; - - GdkGC *gc; - - GdkPixmap* line_wrap_bitmap; - GdkPixmap* line_arrow_bitmap; - - /* GAPPED TEXT SEGMENT */ - - /* The text, a single segment of text a'la emacs, with a gap - * where insertion occurs. */ - union { GdkWChar *wc; guchar *ch; } text; -</STRUCT> -<FUNCTION> -<NAME>gtk_text_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkAdjustment *hadj,GtkAdjustment *vadj -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_set_editable</NAME> -<RETURNS>void </RETURNS> -GtkText *text,gboolean editable -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_set_word_wrap</NAME> -<RETURNS>void </RETURNS> -GtkText *text,gint word_wrap -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_set_line_wrap</NAME> -<RETURNS>void </RETURNS> -GtkText *text,gint line_wrap -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_set_adjustments</NAME> -<RETURNS>void </RETURNS> -GtkText *text,GtkAdjustment *hadj,GtkAdjustment *vadj -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_set_point</NAME> -<RETURNS>void </RETURNS> -GtkText *text,guint index -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_get_point</NAME> -<RETURNS>guint </RETURNS> -GtkText *text -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_get_length</NAME> -<RETURNS>guint </RETURNS> -GtkText *text -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_freeze</NAME> -<RETURNS>void </RETURNS> -GtkText *text -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_thaw</NAME> -<RETURNS>void </RETURNS> -GtkText *text -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_insert</NAME> -<RETURNS>void </RETURNS> -GtkText *text,GdkFont *font,GdkColor *fore,GdkColor *back,const char *chars,gint length -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_backward_delete</NAME> -<RETURNS>gint </RETURNS> -GtkText *text,guint nchars -</FUNCTION> -<FUNCTION> -<NAME>gtk_text_forward_delete</NAME> -<RETURNS>gint </RETURNS> -GtkText *text,guint nchars -</FUNCTION> -<MACRO> -<NAME>GTK_TEXT_INDEX</NAME> -#define GTK_TEXT_INDEX(t, index) (((t)->use_wchar) \ - ? ((index) < (t)->gap_position ? (t)->text.wc[index] : \ - (t)->text.wc[(index)+(t)->gap_size]) \ - : ((index) < (t)->gap_position ? (t)->text.ch[index] : \ - (t)->text.ch[(index)+(t)->gap_size])) -</MACRO> -<STRUCT> -<NAME>GtkThemeEngine</NAME> -struct GtkThemeEngine { - /* Fill in engine_data pointer in a GtkRcStyle by parsing contents - * of brackets. Returns G_TOKEN_NONE if succesfull, otherwise returns - * the token it expected but didn't get. - */ - guint (*parse_rc_style) (GScanner *scanner, GtkRcStyle *rc_style); - - /* Combine RC style data from src into dest. If - * dest->engine_data is NULL, it should be initialized to default - * values. - */ - void (*merge_rc_style) (GtkRcStyle *dest, GtkRcStyle *src); - - /* Fill in style->engine_data from rc_style->engine_data */ - void (*rc_style_to_style) (GtkStyle *style, GtkRcStyle *rc_style); - - /* Duplicate engine_data from src to dest. The engine_data will - * not subsequently be modified except by a call to realize_style() - * so if realize_style() does nothing, refcounting is appropriate. - */ - void (*duplicate_style) (GtkStyle *dest, GtkStyle *src); - - /* If style needs to initialize for a particular colormap/depth - * combination, do it here. style->colormap/style->depth will have - * been set at this point, and style itself initialized for - * the colormap - */ - void (*realize_style) (GtkStyle *new_style); - - /* If style needs to clean up for a particular colormap/depth - * combination, do it here. - */ - void (*unrealize_style) (GtkStyle *new_style); - - /* Clean up rc_style->engine_data before rc_style is destroyed */ - void (*destroy_rc_style) (GtkRcStyle *rc_style); - - /* Clean up style->engine_data before style is destroyed */ - void (*destroy_style) (GtkStyle *style); - - void (*set_background) (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type); -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_theme_engine_get</NAME> -<RETURNS>GtkThemeEngine *</RETURNS> -gchar *name -</FUNCTION> -<FUNCTION> -<NAME>gtk_theme_engine_ref</NAME> -<RETURNS>void </RETURNS> -GtkThemeEngine *engine -</FUNCTION> -<FUNCTION> -<NAME>gtk_theme_engine_unref</NAME> -<RETURNS>void </RETURNS> -GtkThemeEngine *engine -</FUNCTION> -<FUNCTION> -<NAME>gtk_themes_init</NAME> -<RETURNS>void </RETURNS> -int *argc,char ***argv -</FUNCTION> -<FUNCTION> -<NAME>gtk_themes_exit</NAME> -<RETURNS>void </RETURNS> -gint error_code -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_TIPS_QUERY</NAME> -#define GTK_TYPE_TIPS_QUERY (gtk_tips_query_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_TIPS_QUERY</NAME> -#define GTK_TIPS_QUERY(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TIPS_QUERY, GtkTipsQuery)) -</MACRO> -<MACRO> -<NAME>GTK_TIPS_QUERY_CLASS</NAME> -#define GTK_TIPS_QUERY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TIPS_QUERY, GtkTipsQueryClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TIPS_QUERY</NAME> -#define GTK_IS_TIPS_QUERY(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TIPS_QUERY)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TIPS_QUERY_CLASS</NAME> -#define GTK_IS_TIPS_QUERY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TIPS_QUERY)) -</MACRO> -<STRUCT> -<NAME>GtkTipsQuery</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTipsQueryClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTipsQuery</NAME> -struct GtkTipsQuery -{ - GtkLabel label; - - guint emit_always : 1; - guint in_query : 1; - gchar *label_inactive; - gchar *label_no_tip; - - GtkWidget *caller; - GtkWidget *last_crossed; - - GdkCursor *query_cursor; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_tips_query_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_tips_query_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_tips_query_start_query</NAME> -<RETURNS>void </RETURNS> -GtkTipsQuery *tips_query -</FUNCTION> -<FUNCTION> -<NAME>gtk_tips_query_stop_query</NAME> -<RETURNS>void </RETURNS> -GtkTipsQuery *tips_query -</FUNCTION> -<FUNCTION> -<NAME>gtk_tips_query_set_caller</NAME> -<RETURNS>void </RETURNS> -GtkTipsQuery *tips_query,GtkWidget *caller -</FUNCTION> -<FUNCTION> -<NAME>gtk_tips_query_set_labels</NAME> -<RETURNS>void </RETURNS> -GtkTipsQuery *tips_query,const gchar *label_inactive,const gchar *label_no_tip -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_TOGGLE_BUTTON</NAME> -#define GTK_TYPE_TOGGLE_BUTTON (gtk_toggle_button_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_TOGGLE_BUTTON</NAME> -#define GTK_TOGGLE_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TOGGLE_BUTTON, GtkToggleButton)) -</MACRO> -<MACRO> -<NAME>GTK_TOGGLE_BUTTON_CLASS</NAME> -#define GTK_TOGGLE_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOGGLE_BUTTON, GtkToggleButtonClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TOGGLE_BUTTON</NAME> -#define GTK_IS_TOGGLE_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TOGGLE_BUTTON)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TOGGLE_BUTTON_CLASS</NAME> -#define GTK_IS_TOGGLE_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOGGLE_BUTTON)) -</MACRO> -<STRUCT> -<NAME>GtkToggleButton</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkToggleButtonClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkToggleButton</NAME> -struct GtkToggleButton -{ - GtkButton button; - - guint active : 1; - guint draw_indicator : 1; - - GdkWindow *event_window; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_toggle_button_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_toggle_button_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_toggle_button_new_with_label</NAME> -<RETURNS>GtkWidget *</RETURNS> -const gchar *label -</FUNCTION> -<FUNCTION> -<NAME>gtk_toggle_button_set_mode</NAME> -<RETURNS>void </RETURNS> -GtkToggleButton *toggle_button,gboolean draw_indicator -</FUNCTION> -<FUNCTION> -<NAME>gtk_toggle_button_set_active</NAME> -<RETURNS>void </RETURNS> -GtkToggleButton *toggle_button,gboolean is_active -</FUNCTION> -<FUNCTION> -<NAME>gtk_toggle_button_get_active</NAME> -<RETURNS>gboolean </RETURNS> -GtkToggleButton *toggle_button -</FUNCTION> -<FUNCTION> -<NAME>gtk_toggle_button_toggled</NAME> -<RETURNS>void </RETURNS> -GtkToggleButton *toggle_button -</FUNCTION> -<MACRO> -<NAME>GTK_TOOLBAR</NAME> -#define GTK_TOOLBAR(obj) GTK_CHECK_CAST (obj, gtk_toolbar_get_type (), GtkToolbar) -</MACRO> -<MACRO> -<NAME>GTK_TOOLBAR_CLASS</NAME> -#define GTK_TOOLBAR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_toolbar_get_type (), GtkToolbarClass) -</MACRO> -<MACRO> -<NAME>GTK_IS_TOOLBAR</NAME> -#define GTK_IS_TOOLBAR(obj) GTK_CHECK_TYPE (obj, gtk_toolbar_get_type ()) -</MACRO> -<ENUM> -<NAME>GtkToolbarChildType</NAME> -typedef enum -{ - GTK_TOOLBAR_CHILD_SPACE, - GTK_TOOLBAR_CHILD_BUTTON, - GTK_TOOLBAR_CHILD_TOGGLEBUTTON, - GTK_TOOLBAR_CHILD_RADIOBUTTON, - GTK_TOOLBAR_CHILD_WIDGET -} GtkToolbarChildType; -</ENUM> -<ENUM> -<NAME>GtkToolbarSpaceStyle</NAME> -typedef enum -{ - GTK_TOOLBAR_SPACE_EMPTY, - GTK_TOOLBAR_SPACE_LINE -} GtkToolbarSpaceStyle; -</ENUM> -<STRUCT> -<NAME>GtkToolbarChild</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkToolbar</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkToolbarClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkToolbarChild</NAME> -struct GtkToolbarChild -{ - GtkToolbarChildType type; - GtkWidget *widget; - GtkWidget *icon; - GtkWidget *label; -}; -</STRUCT> -<STRUCT> -<NAME>GtkToolbar</NAME> -struct GtkToolbar -{ - GtkContainer container; - - gint num_children; - GList *children; - GtkOrientation orientation; - GtkToolbarStyle style; - gint space_size; /* big optional space between buttons */ - GtkToolbarSpaceStyle space_style; - - GtkTooltips *tooltips; - - gint button_maxw; - gint button_maxh; - GtkReliefStyle relief; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_toolbar_get_type</NAME> -<RETURNS>guint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkOrientation orientation,GtkToolbarStyle style -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_append_item</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkToolbar *toolbar,const char *text,const char *tooltip_text,const char *tooltip_private_text,GtkWidget *icon,GtkSignalFunc callback,gpointer user_data -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_prepend_item</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkToolbar *toolbar,const char *text,const char *tooltip_text,const char *tooltip_private_text,GtkWidget *icon,GtkSignalFunc callback,gpointer user_data -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_insert_item</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkToolbar *toolbar,const char *text,const char *tooltip_text,const char *tooltip_private_text,GtkWidget *icon,GtkSignalFunc callback,gpointer user_data,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_append_space</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_prepend_space</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_insert_space</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_append_element</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkToolbar *toolbar,GtkToolbarChildType type,GtkWidget *widget,const char *text,const char *tooltip_text,const char *tooltip_private_text,GtkWidget *icon,GtkSignalFunc callback,gpointer user_data -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_prepend_element</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkToolbar *toolbar,GtkToolbarChildType type,GtkWidget *widget,const char *text,const char *tooltip_text,const char *tooltip_private_text,GtkWidget *icon,GtkSignalFunc callback,gpointer user_data -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_insert_element</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkToolbar *toolbar,GtkToolbarChildType type,GtkWidget *widget,const char *text,const char *tooltip_text,const char *tooltip_private_text,GtkWidget *icon,GtkSignalFunc callback,gpointer user_data,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_append_widget</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar,GtkWidget *widget,const char *tooltip_text,const char *tooltip_private_text -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_prepend_widget</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar,GtkWidget *widget,const char *tooltip_text,const char *tooltip_private_text -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_insert_widget</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar,GtkWidget *widget,const char *tooltip_text,const char *tooltip_private_text,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_set_orientation</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar,GtkOrientation orientation -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_set_style</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar,GtkToolbarStyle style -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_set_space_size</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar,gint space_size -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_set_space_style</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar,GtkToolbarSpaceStyle space_style -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_set_tooltips</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar,gint enable -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_set_button_relief</NAME> -<RETURNS>void </RETURNS> -GtkToolbar *toolbar,GtkReliefStyle relief -</FUNCTION> -<FUNCTION> -<NAME>gtk_toolbar_get_button_relief</NAME> -<RETURNS>GtkReliefStyle </RETURNS> -GtkToolbar *toolbar -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_TOOLTIPS</NAME> -#define GTK_TYPE_TOOLTIPS (gtk_tooltips_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_TOOLTIPS</NAME> -#define GTK_TOOLTIPS(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TOOLTIPS, GtkTooltips)) -</MACRO> -<MACRO> -<NAME>GTK_TOOLTIPS_CLASS</NAME> -#define GTK_TOOLTIPS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOLTIPS, GtkTooltipsClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TOOLTIPS</NAME> -#define GTK_IS_TOOLTIPS(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TOOLTIPS)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TOOLTIPS_CLASS</NAME> -#define GTK_IS_TOOLTIPS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOLTIPS)) -</MACRO> -<STRUCT> -<NAME>GtkTooltips</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTooltipsClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTooltipsData</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTooltipsData</NAME> -struct GtkTooltipsData -{ - GtkTooltips *tooltips; - GtkWidget *widget; - gchar *tip_text; - gchar *tip_private; - GdkFont *font; - gint width; - GList *row; -}; -</STRUCT> -<STRUCT> -<NAME>GtkTooltips</NAME> -struct GtkTooltips -{ - GtkData data; - - GtkWidget *tip_window; - GtkTooltipsData *active_tips_data; - GList *tips_data_list; - - GdkGC *gc; - GdkColor *foreground; - GdkColor *background; - - guint delay : 30; - guint enabled : 1; - gint timer_tag; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_tooltips_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_tooltips_new</NAME> -<RETURNS>GtkTooltips *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_tooltips_enable</NAME> -<RETURNS>void </RETURNS> -GtkTooltips *tooltips -</FUNCTION> -<FUNCTION> -<NAME>gtk_tooltips_disable</NAME> -<RETURNS>void </RETURNS> -GtkTooltips *tooltips -</FUNCTION> -<FUNCTION> -<NAME>gtk_tooltips_set_delay</NAME> -<RETURNS>void </RETURNS> -GtkTooltips *tooltips,guint delay -</FUNCTION> -<FUNCTION> -<NAME>gtk_tooltips_set_tip</NAME> -<RETURNS>void </RETURNS> -GtkTooltips *tooltips,GtkWidget *widget,const gchar *tip_text,const gchar *tip_private -</FUNCTION> -<FUNCTION> -<NAME>gtk_tooltips_set_colors</NAME> -<RETURNS>void </RETURNS> -GtkTooltips *tooltips,GdkColor *background,GdkColor *foreground -</FUNCTION> -<FUNCTION> -<NAME>gtk_tooltips_data_get</NAME> -<RETURNS>GtkTooltipsData *</RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_tooltips_force_window</NAME> -<RETURNS>void </RETURNS> -GtkTooltips *tooltips -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_TREE</NAME> -#define GTK_TYPE_TREE (gtk_tree_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_TREE</NAME> -#define GTK_TREE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TREE, GtkTree)) -</MACRO> -<MACRO> -<NAME>GTK_TREE_CLASS</NAME> -#define GTK_TREE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE, GtkTreeClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TREE</NAME> -#define GTK_IS_TREE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TREE)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TREE_CLASS</NAME> -#define GTK_IS_TREE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE)) -</MACRO> -<MACRO> -<NAME>GTK_IS_ROOT_TREE</NAME> -#define GTK_IS_ROOT_TREE(obj) ((GtkObject*) GTK_TREE(obj)->root_tree == (GtkObject*)obj) -</MACRO> -<MACRO> -<NAME>GTK_TREE_ROOT_TREE</NAME> -#define GTK_TREE_ROOT_TREE(obj) (GTK_TREE(obj)->root_tree ? GTK_TREE(obj)->root_tree : GTK_TREE(obj)) -</MACRO> -<MACRO> -<NAME>GTK_TREE_SELECTION</NAME> -#define GTK_TREE_SELECTION(obj) (GTK_TREE_ROOT_TREE(obj)->selection) -</MACRO> -<ENUM> -<NAME>GtkTreeViewMode</NAME> -typedef enum -{ - GTK_TREE_VIEW_LINE, /* default view mode */ - GTK_TREE_VIEW_ITEM -} GtkTreeViewMode; -</ENUM> -<STRUCT> -<NAME>GtkTree</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTreeClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTree</NAME> -struct GtkTree -{ - GtkContainer container; - - GList *children; - - GtkTree* root_tree; /* owner of selection list */ - GtkWidget* tree_owner; - GList *selection; - guint level; - guint indent_value; - guint current_indent; - guint selection_mode : 2; - guint view_mode : 1; - guint view_line : 1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_tree_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_append</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,GtkWidget *tree_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_prepend</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,GtkWidget *tree_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_insert</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,GtkWidget *tree_item,gint position -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_remove_items</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,GList *items -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_clear_items</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,gint start,gint end -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_select_item</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,gint item -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_unselect_item</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,gint item -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_select_child</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,GtkWidget *tree_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_unselect_child</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,GtkWidget *tree_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_child_position</NAME> -<RETURNS>gint </RETURNS> -GtkTree *tree,GtkWidget *child -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_set_selection_mode</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,GtkSelectionMode mode -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_set_view_mode</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,GtkTreeViewMode mode -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_set_view_lines</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,guint flag -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_remove_item</NAME> -<RETURNS>void </RETURNS> -GtkTree *tree,GtkWidget *child -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_TREE_ITEM</NAME> -#define GTK_TYPE_TREE_ITEM (gtk_tree_item_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_TREE_ITEM</NAME> -#define GTK_TREE_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TREE_ITEM, GtkTreeItem)) -</MACRO> -<MACRO> -<NAME>GTK_TREE_ITEM_CLASS</NAME> -#define GTK_TREE_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_ITEM, GtkTreeItemClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TREE_ITEM</NAME> -#define GTK_IS_TREE_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TREE_ITEM)) -</MACRO> -<MACRO> -<NAME>GTK_IS_TREE_ITEM_CLASS</NAME> -#define GTK_IS_TREE_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_ITEM)) -</MACRO> -<MACRO> -<NAME>GTK_TREE_ITEM_SUBTREE</NAME> -#define GTK_TREE_ITEM_SUBTREE(obj) (GTK_TREE_ITEM(obj)->subtree) -</MACRO> -<STRUCT> -<NAME>GtkTreeItem</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTreeItemClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTreeItem</NAME> -struct GtkTreeItem -{ - GtkItem item; - - GtkWidget *subtree; - GtkWidget *pixmaps_box; - GtkWidget *plus_pix_widget, *minus_pix_widget; - - GList *pixmaps; /* pixmap node for this items color depth */ - - guint expanded : 1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_tree_item_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_item_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_item_new_with_label</NAME> -<RETURNS>GtkWidget *</RETURNS> -gchar *label -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_item_set_subtree</NAME> -<RETURNS>void </RETURNS> -GtkTreeItem *tree_item,GtkWidget *subtree -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_item_remove_subtree</NAME> -<RETURNS>void </RETURNS> -GtkTreeItem *tree_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_item_select</NAME> -<RETURNS>void </RETURNS> -GtkTreeItem *tree_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_item_deselect</NAME> -<RETURNS>void </RETURNS> -GtkTreeItem *tree_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_item_expand</NAME> -<RETURNS>void </RETURNS> -GtkTreeItem *tree_item -</FUNCTION> -<FUNCTION> -<NAME>gtk_tree_item_collapse</NAME> -<RETURNS>void </RETURNS> -GtkTreeItem *tree_item -</FUNCTION> -<VARIABLE> -<NAME>GTK_TYPE_ACCEL_FLAGS</NAME> -extern GtkType GTK_TYPE_ACCEL_FLAGS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_CALENDAR_DISPLAY_OPTIONS</NAME> -extern GtkType GTK_TYPE_CALENDAR_DISPLAY_OPTIONS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_CELL_TYPE</NAME> -extern GtkType GTK_TYPE_CELL_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_CLIST_DRAG_POS</NAME> -extern GtkType GTK_TYPE_CLIST_DRAG_POS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_BUTTON_ACTION</NAME> -extern GtkType GTK_TYPE_BUTTON_ACTION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_CTREE_POS</NAME> -extern GtkType GTK_TYPE_CTREE_POS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_CTREE_LINE_STYLE</NAME> -extern GtkType GTK_TYPE_CTREE_LINE_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_CTREE_EXPANDER_STYLE</NAME> -extern GtkType GTK_TYPE_CTREE_EXPANDER_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_CTREE_EXPANSION_TYPE</NAME> -extern GtkType GTK_TYPE_CTREE_EXPANSION_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_DEBUG_FLAG</NAME> -extern GtkType GTK_TYPE_DEBUG_FLAG; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_DEST_DEFAULTS</NAME> -extern GtkType GTK_TYPE_DEST_DEFAULTS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_TARGET_FLAGS</NAME> -extern GtkType GTK_TYPE_TARGET_FLAGS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_ARROW_TYPE</NAME> -extern GtkType GTK_TYPE_ARROW_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_ATTACH_OPTIONS</NAME> -extern GtkType GTK_TYPE_ATTACH_OPTIONS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_BUTTON_BOX_STYLE</NAME> -extern GtkType GTK_TYPE_BUTTON_BOX_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_CURVE_TYPE</NAME> -extern GtkType GTK_TYPE_CURVE_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_DIRECTION_TYPE</NAME> -extern GtkType GTK_TYPE_DIRECTION_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_JUSTIFICATION</NAME> -extern GtkType GTK_TYPE_JUSTIFICATION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_MATCH_TYPE</NAME> -extern GtkType GTK_TYPE_MATCH_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_MENU_DIRECTION_TYPE</NAME> -extern GtkType GTK_TYPE_MENU_DIRECTION_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_MENU_FACTORY_TYPE</NAME> -extern GtkType GTK_TYPE_MENU_FACTORY_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_METRIC_TYPE</NAME> -extern GtkType GTK_TYPE_METRIC_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_ORIENTATION</NAME> -extern GtkType GTK_TYPE_ORIENTATION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_CORNER_TYPE</NAME> -extern GtkType GTK_TYPE_CORNER_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_PACK_TYPE</NAME> -extern GtkType GTK_TYPE_PACK_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_PATH_PRIORITY_TYPE</NAME> -extern GtkType GTK_TYPE_PATH_PRIORITY_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_PATH_TYPE</NAME> -extern GtkType GTK_TYPE_PATH_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_POLICY_TYPE</NAME> -extern GtkType GTK_TYPE_POLICY_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_POSITION_TYPE</NAME> -extern GtkType GTK_TYPE_POSITION_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_PREVIEW_TYPE</NAME> -extern GtkType GTK_TYPE_PREVIEW_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_RELIEF_STYLE</NAME> -extern GtkType GTK_TYPE_RELIEF_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_RESIZE_MODE</NAME> -extern GtkType GTK_TYPE_RESIZE_MODE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_SIGNAL_RUN_TYPE</NAME> -extern GtkType GTK_TYPE_SIGNAL_RUN_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_SCROLL_TYPE</NAME> -extern GtkType GTK_TYPE_SCROLL_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_SELECTION_MODE</NAME> -extern GtkType GTK_TYPE_SELECTION_MODE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_SHADOW_TYPE</NAME> -extern GtkType GTK_TYPE_SHADOW_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_STATE_TYPE</NAME> -extern GtkType GTK_TYPE_STATE_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_SUBMENU_DIRECTION</NAME> -extern GtkType GTK_TYPE_SUBMENU_DIRECTION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_SUBMENU_PLACEMENT</NAME> -extern GtkType GTK_TYPE_SUBMENU_PLACEMENT; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_TOOLBAR_STYLE</NAME> -extern GtkType GTK_TYPE_TOOLBAR_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_TROUGH_TYPE</NAME> -extern GtkType GTK_TYPE_TROUGH_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_UPDATE_TYPE</NAME> -extern GtkType GTK_TYPE_UPDATE_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_VISIBILITY</NAME> -extern GtkType GTK_TYPE_VISIBILITY; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_WINDOW_POSITION</NAME> -extern GtkType GTK_TYPE_WINDOW_POSITION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_WINDOW_TYPE</NAME> -extern GtkType GTK_TYPE_WINDOW_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_SORT_TYPE</NAME> -extern GtkType GTK_TYPE_SORT_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_FONT_METRIC_TYPE</NAME> -extern GtkType GTK_TYPE_FONT_METRIC_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_FONT_TYPE</NAME> -extern GtkType GTK_TYPE_FONT_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_FONT_FILTER_TYPE</NAME> -extern GtkType GTK_TYPE_FONT_FILTER_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_OBJECT_FLAGS</NAME> -extern GtkType GTK_TYPE_OBJECT_FLAGS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_ARG_FLAGS</NAME> -extern GtkType GTK_TYPE_ARG_FLAGS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_PACKER_OPTIONS</NAME> -extern GtkType GTK_TYPE_PACKER_OPTIONS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_SIDE_TYPE</NAME> -extern GtkType GTK_TYPE_SIDE_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_ANCHOR_TYPE</NAME> -extern GtkType GTK_TYPE_ANCHOR_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_PRIVATE_FLAGS</NAME> -extern GtkType GTK_TYPE_PRIVATE_FLAGS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_PROGRESS_BAR_STYLE</NAME> -extern GtkType GTK_TYPE_PROGRESS_BAR_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_PROGRESS_BAR_ORIENTATION</NAME> -extern GtkType GTK_TYPE_PROGRESS_BAR_ORIENTATION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_RC_FLAGS</NAME> -extern GtkType GTK_TYPE_RC_FLAGS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_RC_TOKEN_TYPE</NAME> -extern GtkType GTK_TYPE_RC_TOKEN_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY</NAME> -extern GtkType GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_SPIN_TYPE</NAME> -extern GtkType GTK_TYPE_SPIN_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_TOOLBAR_CHILD_TYPE</NAME> -extern GtkType GTK_TYPE_TOOLBAR_CHILD_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_TOOLBAR_SPACE_STYLE</NAME> -extern GtkType GTK_TYPE_TOOLBAR_SPACE_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_TREE_VIEW_MODE</NAME> -extern GtkType GTK_TYPE_TREE_VIEW_MODE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_FUNDAMENTAL_TYPE</NAME> -extern GtkType GTK_TYPE_FUNDAMENTAL_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_WIDGET_FLAGS</NAME> -extern GtkType GTK_TYPE_WIDGET_FLAGS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_WINDOW_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_WINDOW_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_WINDOW_CLASS</NAME> -extern GtkType GTK_TYPE_GDK_WINDOW_CLASS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_IMAGE_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_IMAGE_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_VISUAL_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_VISUAL_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_FONT_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_FONT_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_WINDOW_HINTS</NAME> -extern GtkType GTK_TYPE_GDK_WINDOW_HINTS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_FUNCTION</NAME> -extern GtkType GTK_TYPE_GDK_FUNCTION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_FILL</NAME> -extern GtkType GTK_TYPE_GDK_FILL; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_FILL_RULE</NAME> -extern GtkType GTK_TYPE_GDK_FILL_RULE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_LINE_STYLE</NAME> -extern GtkType GTK_TYPE_GDK_LINE_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_CAP_STYLE</NAME> -extern GtkType GTK_TYPE_GDK_CAP_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_JOIN_STYLE</NAME> -extern GtkType GTK_TYPE_GDK_JOIN_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_CURSOR_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_CURSOR_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_FILTER_RETURN</NAME> -extern GtkType GTK_TYPE_GDK_FILTER_RETURN; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_VISIBILITY_STATE</NAME> -extern GtkType GTK_TYPE_GDK_VISIBILITY_STATE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_EVENT_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_EVENT_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_EVENT_MASK</NAME> -extern GtkType GTK_TYPE_GDK_EVENT_MASK; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_NOTIFY_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_NOTIFY_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_CROSSING_MODE</NAME> -extern GtkType GTK_TYPE_GDK_CROSSING_MODE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_MODIFIER_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_MODIFIER_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_SUBWINDOW_MODE</NAME> -extern GtkType GTK_TYPE_GDK_SUBWINDOW_MODE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_INPUT_CONDITION</NAME> -extern GtkType GTK_TYPE_GDK_INPUT_CONDITION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_STATUS</NAME> -extern GtkType GTK_TYPE_GDK_STATUS; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_BYTE_ORDER</NAME> -extern GtkType GTK_TYPE_GDK_BYTE_ORDER; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_GC_VALUES_MASK</NAME> -extern GtkType GTK_TYPE_GDK_GC_VALUES_MASK; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_SELECTION</NAME> -extern GtkType GTK_TYPE_GDK_SELECTION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_PROPERTY_STATE</NAME> -extern GtkType GTK_TYPE_GDK_PROPERTY_STATE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_PROP_MODE</NAME> -extern GtkType GTK_TYPE_GDK_PROP_MODE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_INPUT_SOURCE</NAME> -extern GtkType GTK_TYPE_GDK_INPUT_SOURCE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_INPUT_MODE</NAME> -extern GtkType GTK_TYPE_GDK_INPUT_MODE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_AXIS_USE</NAME> -extern GtkType GTK_TYPE_GDK_AXIS_USE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_TARGET</NAME> -extern GtkType GTK_TYPE_GDK_TARGET; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_SELECTION_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_SELECTION_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_EXTENSION_MODE</NAME> -extern GtkType GTK_TYPE_GDK_EXTENSION_MODE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_IM_STYLE</NAME> -extern GtkType GTK_TYPE_GDK_IM_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_IC_ATTRIBUTES_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_IC_ATTRIBUTES_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_WM_DECORATION</NAME> -extern GtkType GTK_TYPE_GDK_WM_DECORATION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_WM_FUNCTION</NAME> -extern GtkType GTK_TYPE_GDK_WM_FUNCTION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_COLOR_CONTEXT_MODE</NAME> -extern GtkType GTK_TYPE_GDK_COLOR_CONTEXT_MODE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_OVERLAP_TYPE</NAME> -extern GtkType GTK_TYPE_GDK_OVERLAP_TYPE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_DRAG_ACTION</NAME> -extern GtkType GTK_TYPE_GDK_DRAG_ACTION; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_DRAG_PROTOCOL</NAME> -extern GtkType GTK_TYPE_GDK_DRAG_PROTOCOL; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_RGB_DITHER</NAME> -extern GtkType GTK_TYPE_GDK_RGB_DITHER; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_ACCEL_GROUP</NAME> -extern GtkType GTK_TYPE_ACCEL_GROUP; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_SELECTION_DATA</NAME> -extern GtkType GTK_TYPE_SELECTION_DATA; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_STYLE</NAME> -extern GtkType GTK_TYPE_STYLE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_CTREE_NODE</NAME> -extern GtkType GTK_TYPE_CTREE_NODE; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_COLORMAP</NAME> -extern GtkType GTK_TYPE_GDK_COLORMAP; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_VISUAL</NAME> -extern GtkType GTK_TYPE_GDK_VISUAL; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_FONT</NAME> -extern GtkType GTK_TYPE_GDK_FONT; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_WINDOW</NAME> -extern GtkType GTK_TYPE_GDK_WINDOW; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_DRAG_CONTEXT</NAME> -extern GtkType GTK_TYPE_GDK_DRAG_CONTEXT; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_EVENT</NAME> -extern GtkType GTK_TYPE_GDK_EVENT; -</VARIABLE> -<VARIABLE> -<NAME>GTK_TYPE_GDK_COLOR</NAME> -extern GtkType GTK_TYPE_GDK_COLOR; -</VARIABLE> -<MACRO> -<NAME>GTK_TYPE_NUM_BUILTINS</NAME> -#define GTK_TYPE_NUM_BUILTINS (121) -</MACRO> -<ENUM> -<NAME>GtkFundamentalType</NAME> -typedef enum -{ - GTK_TYPE_INVALID, - GTK_TYPE_NONE, - - /* flat types */ - GTK_TYPE_CHAR, - GTK_TYPE_UCHAR, - GTK_TYPE_BOOL, - GTK_TYPE_INT, - GTK_TYPE_UINT, - GTK_TYPE_LONG, - GTK_TYPE_ULONG, - GTK_TYPE_FLOAT, - GTK_TYPE_DOUBLE, - GTK_TYPE_STRING, - GTK_TYPE_ENUM, - GTK_TYPE_FLAGS, - GTK_TYPE_BOXED, - GTK_TYPE_POINTER, - - /* structured types */ - GTK_TYPE_SIGNAL, - GTK_TYPE_ARGS, - GTK_TYPE_CALLBACK, - GTK_TYPE_C_CALLBACK, - GTK_TYPE_FOREIGN, - - /* base type node of the object system */ - GTK_TYPE_OBJECT -} GtkFundamentalType; -</ENUM> -<MACRO> -<NAME>GTK_TYPE_FLAT_FIRST</NAME> -#define GTK_TYPE_FLAT_FIRST GTK_TYPE_CHAR -</MACRO> -<MACRO> -<NAME>GTK_TYPE_FLAT_LAST</NAME> -#define GTK_TYPE_FLAT_LAST GTK_TYPE_POINTER -</MACRO> -<MACRO> -<NAME>GTK_TYPE_STRUCTURED_FIRST</NAME> -#define GTK_TYPE_STRUCTURED_FIRST GTK_TYPE_SIGNAL -</MACRO> -<MACRO> -<NAME>GTK_TYPE_STRUCTURED_LAST</NAME> -#define GTK_TYPE_STRUCTURED_LAST GTK_TYPE_FOREIGN -</MACRO> -<MACRO> -<NAME>GTK_TYPE_FUNDAMENTAL_LAST</NAME> -#define GTK_TYPE_FUNDAMENTAL_LAST GTK_TYPE_OBJECT -</MACRO> -<MACRO> -<NAME>GTK_TYPE_FUNDAMENTAL_MAX</NAME> -#define GTK_TYPE_FUNDAMENTAL_MAX (32) -</MACRO> -<MACRO> -<NAME>GTK_STRUCT_OFFSET</NAME> -#define GTK_STRUCT_OFFSET(struct, field) ((gint) offsetof (struct, field)) -</MACRO> -<MACRO> -<NAME>GTK_STRUCT_OFFSET</NAME> -#define GTK_STRUCT_OFFSET(struct, field) ((gint) ((gchar*) &((struct*) 0)->field)) -</MACRO> -<MACRO> -<NAME>GTK_CHECK_CAST</NAME> -# define GTK_CHECK_CAST(tobj, cast_type, cast) ((cast*) (tobj)) -</MACRO> -<MACRO> -<NAME>GTK_CHECK_CLASS_CAST</NAME> -# define GTK_CHECK_CLASS_CAST(tclass,cast_type,cast) ((cast*) (tclass)) -</MACRO> -<MACRO> -<NAME>GTK_CHECK_CAST</NAME> -# define GTK_CHECK_CAST(tobj, cast_type, cast) \ - ((cast*) gtk_type_check_object_cast ((GtkTypeObject*) (tobj), (cast_type))) -</MACRO> -<MACRO> -<NAME>GTK_CHECK_CLASS_CAST</NAME> -# define GTK_CHECK_CLASS_CAST(tclass,cast_type,cast) \ - ((cast*) gtk_type_check_class_cast ((GtkTypeClass*) (tclass), (cast_type))) -</MACRO> -<MACRO> -<NAME>GTK_CHECK_TYPE</NAME> -#define GTK_CHECK_TYPE(type_object, otype) ( \ - ((GtkTypeObject*) (type_object)) != NULL && \ - GTK_CHECK_CLASS_TYPE (((GtkTypeObject*) (type_object))->klass, (otype)) \ -) -</MACRO> -<MACRO> -<NAME>GTK_CHECK_CLASS_TYPE</NAME> -#define GTK_CHECK_CLASS_TYPE(type_class, otype) ( \ - ((GtkTypeClass*) (type_class)) != NULL && \ - gtk_type_is_a (((GtkTypeClass*) (type_class))->type, (otype)) \ -) -</MACRO> -<TYPEDEF> -<NAME>GtkType</NAME> -typedef guint GtkType; -</TYPEDEF> -<STRUCT> -<NAME>GtkTypeObject</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTypeClass</NAME> -</STRUCT> -<MACRO> -<NAME>GTK_TYPE_IDENTIFIER</NAME> -#define GTK_TYPE_IDENTIFIER (gtk_identifier_get_type ()) -</MACRO> -<FUNCTION> -<NAME>gtk_identifier_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_MAKE</NAME> -#define GTK_TYPE_MAKE(parent_t, seqno) (((seqno) << 8) | GTK_FUNDAMENTAL_TYPE (parent_t)) -</MACRO> -<MACRO> -<NAME>GTK_FUNDAMENTAL_TYPE</NAME> -#define GTK_FUNDAMENTAL_TYPE(type) ((GtkFundamentalType) ((type) & 0xFF)) -</MACRO> -<MACRO> -<NAME>GTK_TYPE_SEQNO</NAME> -#define GTK_TYPE_SEQNO(type) ((type) > 0xFF ? (type) >> 8 : (type)) -</MACRO> -<STRUCT> -<NAME>GtkArg</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkObject</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTypeInfo</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkTypeQuery</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkEnumValue</NAME> -</STRUCT> -<MACRO> -<NAME>GTK_SIGNAL_FUNC</NAME> -#define GTK_SIGNAL_FUNC(f) ((GtkSignalFunc) f) -</MACRO> -<USER_FUNCTION> -<NAME>GtkClassInitFunc</NAME> -<RETURNS>void </RETURNS> -gpointer klass -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkObjectInitFunc</NAME> -<RETURNS>void </RETURNS> -gpointer object, - gpointer klass -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkSignalFunc</NAME> -<RETURNS>void </RETURNS> - -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkFunction</NAME> -<RETURNS>gint </RETURNS> -gpointer data -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkDestroyNotify</NAME> -<RETURNS>void </RETURNS> -gpointer data -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkCallbackMarshal</NAME> -<RETURNS>void </RETURNS> -GtkObject *object, - gpointer data, - guint n_args, - GtkArg *args -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkSignalMarshaller</NAME> -<RETURNS>void </RETURNS> -GtkObject *object, - GtkSignalFunc func, - gpointer func_data, - GtkArg *args -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkArgGetFunc</NAME> -<RETURNS>void </RETURNS> -GtkObject*, GtkArg*, guint -</USER_FUNCTION> -<USER_FUNCTION> -<NAME>GtkArgSetFunc</NAME> -<RETURNS>void </RETURNS> -GtkObject*, GtkArg*, guint -</USER_FUNCTION> -<STRUCT> -<NAME>GtkTypeObject</NAME> -struct GtkTypeObject -{ - /* A pointer to the objects class. This will actually point to - * the derived objects class struct (which will be derived from - * GtkTypeClass). - */ - GtkTypeClass *klass; -}; -</STRUCT> -<STRUCT> -<NAME>GtkArg</NAME> -struct GtkArg -{ - GtkType type; - gchar *name; - - /* 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. - */ - union { - /* flat values */ - gchar char_data; - guchar uchar_data; - gboolean bool_data; - gint int_data; - guint uint_data; - glong long_data; - gulong ulong_data; - gfloat float_data; - gdouble double_data; - gchar *string_data; - gpointer pointer_data; - GtkObject *object_data; - - /* structured values */ - struct { - GtkSignalFunc f; - gpointer d; - } signal_data; - struct { - gint n_args; - GtkArg *args; - } args_data; - struct { - GtkCallbackMarshal marshal; - gpointer data; - GtkDestroyNotify notify; - } callback_data; - struct { - GtkFunction func; - gpointer func_data; - } c_callback_data; - struct { - gpointer data; - GtkDestroyNotify notify; - } foreign_data; - } d; -}; -</STRUCT> -<MACRO> -<NAME>GTK_VALUE_CHAR</NAME> -#define GTK_VALUE_CHAR(a) ((a).d.char_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_UCHAR</NAME> -#define GTK_VALUE_UCHAR(a) ((a).d.uchar_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_BOOL</NAME> -#define GTK_VALUE_BOOL(a) ((a).d.bool_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_INT</NAME> -#define GTK_VALUE_INT(a) ((a).d.int_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_UINT</NAME> -#define GTK_VALUE_UINT(a) ((a).d.uint_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_LONG</NAME> -#define GTK_VALUE_LONG(a) ((a).d.long_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_ULONG</NAME> -#define GTK_VALUE_ULONG(a) ((a).d.ulong_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_FLOAT</NAME> -#define GTK_VALUE_FLOAT(a) ((a).d.float_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_DOUBLE</NAME> -#define GTK_VALUE_DOUBLE(a) ((a).d.double_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_STRING</NAME> -#define GTK_VALUE_STRING(a) ((a).d.string_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_ENUM</NAME> -#define GTK_VALUE_ENUM(a) ((a).d.int_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_FLAGS</NAME> -#define GTK_VALUE_FLAGS(a) ((a).d.uint_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_BOXED</NAME> -#define GTK_VALUE_BOXED(a) ((a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_POINTER</NAME> -#define GTK_VALUE_POINTER(a) ((a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_OBJECT</NAME> -#define GTK_VALUE_OBJECT(a) ((a).d.object_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_SIGNAL</NAME> -#define GTK_VALUE_SIGNAL(a) ((a).d.signal_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_ARGS</NAME> -#define GTK_VALUE_ARGS(a) ((a).d.args_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_CALLBACK</NAME> -#define GTK_VALUE_CALLBACK(a) ((a).d.callback_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_C_CALLBACK</NAME> -#define GTK_VALUE_C_CALLBACK(a) ((a).d.c_callback_data) -</MACRO> -<MACRO> -<NAME>GTK_VALUE_FOREIGN</NAME> -#define GTK_VALUE_FOREIGN(a) ((a).d.foreign_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_CHAR</NAME> -#define GTK_RETLOC_CHAR(a) ((gchar*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_UCHAR</NAME> -#define GTK_RETLOC_UCHAR(a) ((guchar*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_BOOL</NAME> -#define GTK_RETLOC_BOOL(a) ((gboolean*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_INT</NAME> -#define GTK_RETLOC_INT(a) ((gint*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_UINT</NAME> -#define GTK_RETLOC_UINT(a) ((guint*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_LONG</NAME> -#define GTK_RETLOC_LONG(a) ((glong*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_ULONG</NAME> -#define GTK_RETLOC_ULONG(a) ((gulong*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_FLOAT</NAME> -#define GTK_RETLOC_FLOAT(a) ((gfloat*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_DOUBLE</NAME> -#define GTK_RETLOC_DOUBLE(a) ((gdouble*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_STRING</NAME> -#define GTK_RETLOC_STRING(a) ((gchar**) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_ENUM</NAME> -#define GTK_RETLOC_ENUM(a) ((gint*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_FLAGS</NAME> -#define GTK_RETLOC_FLAGS(a) ((guint*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_BOXED</NAME> -#define GTK_RETLOC_BOXED(a) ((gpointer*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_POINTER</NAME> -#define GTK_RETLOC_POINTER(a) ((gpointer*) (a).d.pointer_data) -</MACRO> -<MACRO> -<NAME>GTK_RETLOC_OBJECT</NAME> -#define GTK_RETLOC_OBJECT(a) ((GtkObject**) (a).d.pointer_data) -</MACRO> -<STRUCT> -<NAME>GtkTypeInfo</NAME> -struct GtkTypeInfo -{ - gchar *type_name; - guint object_size; - guint class_size; - GtkClassInitFunc class_init_func; - GtkObjectInitFunc object_init_func; - gpointer reserved_1; - gpointer reserved_2; - GtkClassInitFunc base_class_init_func; -}; -</STRUCT> -<STRUCT> -<NAME>GtkTypeQuery</NAME> -struct GtkTypeQuery -{ - GtkType type; - const gchar *type_name; - guint object_size; - guint class_size; -}; -</STRUCT> -<STRUCT> -<NAME>GtkEnumValue</NAME> -struct GtkEnumValue -{ - guint value; - gchar *value_name; - gchar *value_nick; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_type_init</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_unique</NAME> -<RETURNS>GtkType </RETURNS> -GtkType parent_type,const GtkTypeInfo *type_info -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_set_chunk_alloc</NAME> -<RETURNS>void </RETURNS> -GtkType type,guint n_chunks -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_name</NAME> -<RETURNS>gchar *</RETURNS> -guint type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_from_name</NAME> -<RETURNS>GtkType </RETURNS> -const gchar *name -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_parent</NAME> -<RETURNS>GtkType </RETURNS> -GtkType type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_class</NAME> -<RETURNS>gpointer </RETURNS> -GtkType type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_parent_class</NAME> -<RETURNS>gpointer </RETURNS> -GtkType type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_children_types</NAME> -<RETURNS>GList *</RETURNS> -GtkType type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_new</NAME> -<RETURNS>gpointer </RETURNS> -GtkType type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_free</NAME> -<RETURNS>void </RETURNS> -GtkType type,gpointer mem -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_describe_heritage</NAME> -<RETURNS>void </RETURNS> -GtkType type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_describe_tree</NAME> -<RETURNS>void </RETURNS> -GtkType type,gboolean show_size -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_is_a</NAME> -<RETURNS>gboolean </RETURNS> -GtkType type,GtkType is_a_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_check_object_cast</NAME> -<RETURNS>GtkTypeObject *</RETURNS> -GtkTypeObject *type_object,GtkType cast_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_check_class_cast</NAME> -<RETURNS>GtkTypeClass *</RETURNS> -GtkTypeClass *klass,GtkType cast_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_register_enum</NAME> -<RETURNS>GtkType </RETURNS> -const gchar *type_name,GtkEnumValue *values -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_register_flags</NAME> -<RETURNS>GtkType </RETURNS> -const gchar *type_name,GtkFlagValue *values -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_enum_get_values</NAME> -<RETURNS>GtkEnumValue *</RETURNS> -GtkType enum_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_flags_get_values</NAME> -<RETURNS>GtkFlagValue *</RETURNS> -GtkType flags_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_enum_find_value</NAME> -<RETURNS>GtkEnumValue *</RETURNS> -GtkType enum_type,const gchar *value_name -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_flags_find_value</NAME> -<RETURNS>GtkFlagValue *</RETURNS> -GtkType flag_type,const gchar *value_name -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_set_varargs_type</NAME> -<RETURNS>void </RETURNS> -GtkType foreign_type,GtkType varargs_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_get_varargs_type</NAME> -<RETURNS>GtkType </RETURNS> -GtkType foreign_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_type_query</NAME> -<RETURNS>GtkTypeQuery *</RETURNS> -GtkType type -</FUNCTION> -<MACRO> -<NAME>GTK_VBUTTON_BOX</NAME> -#define GTK_VBUTTON_BOX(obj) GTK_CHECK_CAST (obj, gtk_vbutton_box_get_type (), GtkVButtonBox) -</MACRO> -<MACRO> -<NAME>GTK_VBUTTON_BOX_CLASS</NAME> -#define GTK_VBUTTON_BOX_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_vbutton_box_get_type (), GtkVButtonBoxClass) -</MACRO> -<MACRO> -<NAME>GTK_IS_VBUTTON_BOX</NAME> -#define GTK_IS_VBUTTON_BOX(obj) GTK_CHECK_TYPE (obj, gtk_vbutton_box_get_type ()) -</MACRO> -<STRUCT> -<NAME>GtkVButtonBox</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVButtonBoxClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVButtonBox</NAME> -struct GtkVButtonBox -{ - GtkButtonBox button_box; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_vbutton_box_get_type</NAME> -<RETURNS>guint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_vbutton_box_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_vbutton_box_get_spacing_default</NAME> -<RETURNS>gint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_vbutton_box_set_spacing_default</NAME> -<RETURNS>void </RETURNS> -gint spacing -</FUNCTION> -<FUNCTION> -<NAME>gtk_vbutton_box_get_layout_default</NAME> -<RETURNS>GtkButtonBoxStyle </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_vbutton_box_set_layout_default</NAME> -<RETURNS>void </RETURNS> -GtkButtonBoxStyle layout -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_VBOX</NAME> -#define GTK_TYPE_VBOX (gtk_vbox_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_VBOX</NAME> -#define GTK_VBOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VBOX, GtkVBox)) -</MACRO> -<MACRO> -<NAME>GTK_VBOX_CLASS</NAME> -#define GTK_VBOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VBOX, GtkVBoxClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_VBOX</NAME> -#define GTK_IS_VBOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VBOX)) -</MACRO> -<MACRO> -<NAME>GTK_IS_VBOX_CLASS</NAME> -#define GTK_IS_VBOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VBOX)) -</MACRO> -<STRUCT> -<NAME>GtkVBox</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVBoxClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVBox</NAME> -struct GtkVBox -{ - GtkBox box; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_vbox_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_vbox_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -gboolean homogeneous,gint spacing -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_VIEWPORT</NAME> -#define GTK_TYPE_VIEWPORT (gtk_viewport_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_VIEWPORT</NAME> -#define GTK_VIEWPORT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VIEWPORT, GtkViewport)) -</MACRO> -<MACRO> -<NAME>GTK_VIEWPORT_CLASS</NAME> -#define GTK_VIEWPORT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VIEWPORT, GtkViewportClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_VIEWPORT</NAME> -#define GTK_IS_VIEWPORT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VIEWPORT)) -</MACRO> -<MACRO> -<NAME>GTK_IS_VIEWPORT_CLASS</NAME> -#define GTK_IS_VIEWPORT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VIEWPORT)) -</MACRO> -<STRUCT> -<NAME>GtkViewport</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkViewportClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkViewport</NAME> -struct GtkViewport -{ - GtkBin bin; - - GtkShadowType shadow_type; - GdkWindow *view_window; - GdkWindow *bin_window; - GtkAdjustment *hadjustment; - GtkAdjustment *vadjustment; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_viewport_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_viewport_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkAdjustment *hadjustment,GtkAdjustment *vadjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_viewport_get_hadjustment</NAME> -<RETURNS>GtkAdjustment *</RETURNS> -GtkViewport *viewport -</FUNCTION> -<FUNCTION> -<NAME>gtk_viewport_get_vadjustment</NAME> -<RETURNS>GtkAdjustment *</RETURNS> -GtkViewport *viewport -</FUNCTION> -<FUNCTION> -<NAME>gtk_viewport_set_hadjustment</NAME> -<RETURNS>void </RETURNS> -GtkViewport *viewport,GtkAdjustment *adjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_viewport_set_vadjustment</NAME> -<RETURNS>void </RETURNS> -GtkViewport *viewport,GtkAdjustment *adjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_viewport_set_shadow_type</NAME> -<RETURNS>void </RETURNS> -GtkViewport *viewport,GtkShadowType type -</FUNCTION> -<MACRO> -<NAME>GTK_VPANED</NAME> -#define GTK_VPANED(obj) GTK_CHECK_CAST (obj, gtk_vpaned_get_type (), GtkVPaned) -</MACRO> -<MACRO> -<NAME>GTK_VPANED_CLASS</NAME> -#define GTK_VPANED_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_vpaned_get_type (), GtkVPanedClass) -</MACRO> -<MACRO> -<NAME>GTK_IS_VPANED</NAME> -#define GTK_IS_VPANED(obj) GTK_CHECK_TYPE (obj, gtk_vpaned_get_type ()) -</MACRO> -<STRUCT> -<NAME>GtkVPaned</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVPanedClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVPaned</NAME> -struct GtkVPaned -{ - GtkPaned paned; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_vpaned_get_type</NAME> -<RETURNS>guint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_vpaned_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<MACRO> -<NAME>GTK_VRULER</NAME> -#define GTK_VRULER(obj) GTK_CHECK_CAST (obj, gtk_vruler_get_type (), GtkVRuler) -</MACRO> -<MACRO> -<NAME>GTK_VRULER_CLASS</NAME> -#define GTK_VRULER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_vruler_get_type (), GtkVRulerClass) -</MACRO> -<MACRO> -<NAME>GTK_IS_VRULER</NAME> -#define GTK_IS_VRULER(obj) GTK_CHECK_TYPE (obj, gtk_vruler_get_type ()) -</MACRO> -<STRUCT> -<NAME>GtkVRuler</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVRulerClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVRuler</NAME> -struct GtkVRuler -{ - GtkRuler ruler; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_vruler_get_type</NAME> -<RETURNS>guint </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_vruler_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_VSCALE</NAME> -#define GTK_TYPE_VSCALE (gtk_vscale_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_VSCALE</NAME> -#define GTK_VSCALE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VSCALE, GtkVScale)) -</MACRO> -<MACRO> -<NAME>GTK_VSCALE_CLASS</NAME> -#define GTK_VSCALE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VSCALE, GtkVScaleClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_VSCALE</NAME> -#define GTK_IS_VSCALE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VSCALE)) -</MACRO> -<MACRO> -<NAME>GTK_IS_VSCALE_CLASS</NAME> -#define GTK_IS_VSCALE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VSCALE)) -</MACRO> -<STRUCT> -<NAME>GtkVScale</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVScaleClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVScale</NAME> -struct GtkVScale -{ - GtkScale scale; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_vscale_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_vscale_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkAdjustment *adjustment -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_VSCROLLBAR</NAME> -#define GTK_TYPE_VSCROLLBAR (gtk_vscrollbar_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_VSCROLLBAR</NAME> -#define GTK_VSCROLLBAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VSCROLLBAR, GtkVScrollbar)) -</MACRO> -<MACRO> -<NAME>GTK_VSCROLLBAR_CLASS</NAME> -#define GTK_VSCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VSCROLLBAR, GtkVScrollbarClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_VSCROLLBAR</NAME> -#define GTK_IS_VSCROLLBAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VSCROLLBAR)) -</MACRO> -<MACRO> -<NAME>GTK_IS_VSCROLLBAR_CLASS</NAME> -#define GTK_IS_VSCROLLBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VSCROLLBAR)) -</MACRO> -<STRUCT> -<NAME>GtkVScrollbar</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVScrollbarClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVScrollbar</NAME> -struct GtkVScrollbar -{ - GtkScrollbar scrollbar; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_vscrollbar_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_vscrollbar_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkAdjustment *adjustment -</FUNCTION> -<MACRO> -<NAME>GTK_TYPE_VSEPARATOR</NAME> -#define GTK_TYPE_VSEPARATOR (gtk_vseparator_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_VSEPARATOR</NAME> -#define GTK_VSEPARATOR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VSEPARATOR, GtkVSeparator)) -</MACRO> -<MACRO> -<NAME>GTK_VSEPARATOR_CLASS</NAME> -#define GTK_VSEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VSEPARATOR, GtkVSeparatorClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_VSEPARATOR</NAME> -#define GTK_IS_VSEPARATOR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VSEPARATOR)) -</MACRO> -<MACRO> -<NAME>GTK_IS_VSEPARATOR_CLASS</NAME> -#define GTK_IS_VSEPARATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VSEPARATOR)) -</MACRO> -<STRUCT> -<NAME>GtkVSeparator</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVSeparatorClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkVSeparator</NAME> -struct GtkVSeparator -{ - GtkSeparator separator; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_vseparator_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_vseparator_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -void -</FUNCTION> -<ENUM> -<NAME>GtkWidgetFlags</NAME> -typedef enum -{ - GTK_TOPLEVEL = 1 << 4, - GTK_NO_WINDOW = 1 << 5, - GTK_REALIZED = 1 << 6, - GTK_MAPPED = 1 << 7, - GTK_VISIBLE = 1 << 8, - GTK_SENSITIVE = 1 << 9, - GTK_PARENT_SENSITIVE = 1 << 10, - GTK_CAN_FOCUS = 1 << 11, - GTK_HAS_FOCUS = 1 << 12, - GTK_CAN_DEFAULT = 1 << 13, - GTK_HAS_DEFAULT = 1 << 14, - GTK_HAS_GRAB = 1 << 15, - GTK_RC_STYLE = 1 << 16, - GTK_COMPOSITE_CHILD = 1 << 17, - GTK_NO_REPARENT = 1 << 18, - GTK_APP_PAINTABLE = 1 << 19, - GTK_RECEIVES_DEFAULT = 1 << 20 -} GtkWidgetFlags; -</ENUM> -<MACRO> -<NAME>GTK_TYPE_WIDGET</NAME> -#define GTK_TYPE_WIDGET (gtk_widget_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET</NAME> -#define GTK_WIDGET(widget) (GTK_CHECK_CAST ((widget), GTK_TYPE_WIDGET, GtkWidget)) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_CLASS</NAME> -#define GTK_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_WIDGET, GtkWidgetClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_WIDGET</NAME> -#define GTK_IS_WIDGET(widget) (GTK_CHECK_TYPE ((widget), GTK_TYPE_WIDGET)) -</MACRO> -<MACRO> -<NAME>GTK_IS_WIDGET_CLASS</NAME> -#define GTK_IS_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WIDGET)) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_TYPE</NAME> -#define GTK_WIDGET_TYPE(wid) (GTK_OBJECT_TYPE (wid)) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_STATE</NAME> -#define GTK_WIDGET_STATE(wid) (GTK_WIDGET (wid)->state) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_SAVED_STATE</NAME> -#define GTK_WIDGET_SAVED_STATE(wid) (GTK_WIDGET (wid)->saved_state) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_FLAGS</NAME> -#define GTK_WIDGET_FLAGS(wid) (GTK_OBJECT_FLAGS (wid)) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_TOPLEVEL</NAME> -#define GTK_WIDGET_TOPLEVEL(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_TOPLEVEL) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_NO_WINDOW</NAME> -#define GTK_WIDGET_NO_WINDOW(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_NO_WINDOW) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_REALIZED</NAME> -#define GTK_WIDGET_REALIZED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_REALIZED) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_MAPPED</NAME> -#define GTK_WIDGET_MAPPED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_MAPPED) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_VISIBLE</NAME> -#define GTK_WIDGET_VISIBLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_VISIBLE) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_DRAWABLE</NAME> -#define GTK_WIDGET_DRAWABLE(wid) (GTK_WIDGET_VISIBLE (wid) && GTK_WIDGET_MAPPED (wid)) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_SENSITIVE</NAME> -#define GTK_WIDGET_SENSITIVE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_SENSITIVE) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_PARENT_SENSITIVE</NAME> -#define GTK_WIDGET_PARENT_SENSITIVE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_PARENT_SENSITIVE) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_IS_SENSITIVE</NAME> -#define GTK_WIDGET_IS_SENSITIVE(wid) (GTK_WIDGET_SENSITIVE (wid) && \ - GTK_WIDGET_PARENT_SENSITIVE (wid)) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_CAN_FOCUS</NAME> -#define GTK_WIDGET_CAN_FOCUS(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_CAN_FOCUS) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_HAS_FOCUS</NAME> -#define GTK_WIDGET_HAS_FOCUS(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_FOCUS) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_CAN_DEFAULT</NAME> -#define GTK_WIDGET_CAN_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_CAN_DEFAULT) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_HAS_DEFAULT</NAME> -#define GTK_WIDGET_HAS_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_DEFAULT) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_HAS_GRAB</NAME> -#define GTK_WIDGET_HAS_GRAB(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_GRAB) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_RC_STYLE</NAME> -#define GTK_WIDGET_RC_STYLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_RC_STYLE) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_COMPOSITE_CHILD</NAME> -#define GTK_WIDGET_COMPOSITE_CHILD(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_COMPOSITE_CHILD) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_APP_PAINTABLE</NAME> -#define GTK_WIDGET_APP_PAINTABLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_APP_PAINTABLE) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_RECEIVES_DEFAULT</NAME> -#define GTK_WIDGET_RECEIVES_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_RECEIVES_DEFAULT) != 0) -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_SET_FLAGS</NAME> -#define GTK_WIDGET_SET_FLAGS(wid,flag) G_STMT_START{ (GTK_WIDGET_FLAGS (wid) |= (flag)); }G_STMT_END -</MACRO> -<MACRO> -<NAME>GTK_WIDGET_UNSET_FLAGS</NAME> -#define GTK_WIDGET_UNSET_FLAGS(wid,flag) G_STMT_START{ (GTK_WIDGET_FLAGS (wid) &= ~(flag)); }G_STMT_END -</MACRO> -<STRUCT> -<NAME>GtkRequisition</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkAllocation</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkSelectionData</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkWidgetClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkWidgetAuxInfo</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkWidgetShapeInfo</NAME> -</STRUCT> -<USER_FUNCTION> -<NAME>GtkCallback</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget, - gpointer data -</USER_FUNCTION> -<STRUCT> -<NAME>GtkRequisition</NAME> -struct GtkRequisition -{ - gint16 width; - gint16 height; -}; -</STRUCT> -<STRUCT> -<NAME>GtkAllocation</NAME> -struct GtkAllocation -{ - gint16 x; - gint16 y; - guint16 width; - guint16 height; -}; -</STRUCT> -<STRUCT> -<NAME>GtkSelectionData</NAME> -struct GtkSelectionData -{ - GdkAtom selection; - GdkAtom target; - GdkAtom type; - gint format; - guchar *data; - gint length; -}; -</STRUCT> -<STRUCT> -<NAME>GtkWidget</NAME> -struct GtkWidget -{ - /* The object structure needs to be the first - * element in the widget structure in order for - * the object mechanism to work correctly. This - * allows a GtkWidget pointer to be cast to a - * GtkObject pointer. - */ - GtkObject object; - - /* 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. - */ - guint16 private_flags; - - /* The state of the widget. There are actually only - * 5 widget states (defined in "gtkenums.h"). - */ - guint8 state; - - /* 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. - */ - guint8 saved_state; - - /* 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. - */ - gchar *name; - - /* 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. - */ - GtkStyle *style; - - /* The widgets desired size. - */ - GtkRequisition requisition; - - /* The widgets allocated size. - */ - GtkAllocation allocation; - - /* 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). - */ - GdkWindow *window; - - /* The widgets parent. - */ - GtkWidget *parent; -}; -</STRUCT> -<STRUCT> -<NAME>GtkWidgetAuxInfo</NAME> -struct GtkWidgetAuxInfo -{ - gint16 x; - gint16 y; - gint16 width; - gint16 height; -}; -</STRUCT> -<STRUCT> -<NAME>GtkWidgetShapeInfo</NAME> -struct GtkWidgetShapeInfo -{ - gint16 offset_x; - gint16 offset_y; - GdkBitmap *shape_mask; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_widget_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkType type,const gchar *first_arg_name,... -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_newv</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkType type,guint nargs,GtkArg *args -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_ref</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_unref</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_destroy</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_destroyed</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GtkWidget **widget_pointer -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GtkArg *arg -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_getv</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,guint nargs,GtkArg *args -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,const gchar *first_arg_name,... -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_setv</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,guint nargs,GtkArg *args -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_unparent</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_show</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_show_now</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_hide</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_show_all</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_hide_all</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_map</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_unmap</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_realize</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_unrealize</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_queue_draw</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_queue_draw_area</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_queue_clear</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_queue_clear_area</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,gint x,gint y,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_queue_resize</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_draw</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GdkRectangle *area -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_draw_focus</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_draw_default</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_size_request</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GtkRequisition *requisition -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_size_allocate</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GtkAllocation *allocation -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_child_requisition</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GtkRequisition *requisition -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_add_accelerator</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,const gchar *accel_signal,GtkAccelGroup *accel_group,guint accel_key,guint accel_mods,GtkAccelFlags accel_flags -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_remove_accelerator</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GtkAccelGroup *accel_group,guint accel_key,guint accel_mods -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_remove_accelerators</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,const gchar *accel_signal,gboolean visible_only -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_accelerator_signal</NAME> -<RETURNS>guint </RETURNS> -GtkWidget *widget,GtkAccelGroup *accel_group,guint accel_key,guint accel_mods -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_lock_accelerators</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_unlock_accelerators</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_accelerators_locked</NAME> -<RETURNS>gboolean </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_event</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *widget,GdkEvent *event -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_activate</NAME> -<RETURNS>gboolean </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_scroll_adjustments</NAME> -<RETURNS>gboolean </RETURNS> -GtkWidget *widget,GtkAdjustment *hadjustment,GtkAdjustment *vadjustment -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_reparent</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GtkWidget *new_parent -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_popup</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,gint x,gint y -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_intersect</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *widget,GdkRectangle *area,GdkRectangle *intersection -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_grab_focus</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_grab_default</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_name</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,const gchar *name -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_name</NAME> -<RETURNS>gchar *</RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_state</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GtkStateType state -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_sensitive</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,gboolean sensitive -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_app_paintable</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,gboolean app_paintable -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_parent</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GtkWidget *parent -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_parent_window</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GdkWindow *parent_window -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_parent_window</NAME> -<RETURNS>GdkWindow *</RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_uposition</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,gint x,gint y -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_usize</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_events</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,gint events -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_add_events</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,gint events -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_extension_events</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GdkExtensionMode mode -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_extension_events</NAME> -<RETURNS>GdkExtensionMode </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_toplevel</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_ancestor</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkWidget *widget,GtkType widget_type -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_colormap</NAME> -<RETURNS>GdkColormap *</RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_visual</NAME> -<RETURNS>GdkVisual *</RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_colormap</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GdkColormap *colormap -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_visual</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GdkVisual *visual -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_events</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_pointer</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,gint *x,gint *y -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_is_ancestor</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *widget,GtkWidget *ancestor -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_hide_on_delete</NAME> -<RETURNS>gint </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_style</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GtkStyle *style -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_rc_style</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_ensure_style</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_style</NAME> -<RETURNS>GtkStyle *</RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_restore_default_style</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_modify_style</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GtkRcStyle *style -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_composite_name</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,gchar *name -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_composite_name</NAME> -<RETURNS>gchar *</RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_reset_rc_styles</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_push_style</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_push_colormap</NAME> -<RETURNS>void </RETURNS> -GdkColormap *cmap -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_push_visual</NAME> -<RETURNS>void </RETURNS> -GdkVisual *visual -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_push_composite_child</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_pop_composite_child</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_pop_style</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_pop_colormap</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_pop_visual</NAME> -<RETURNS>void </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_default_style</NAME> -<RETURNS>void </RETURNS> -GtkStyle *style -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_default_colormap</NAME> -<RETURNS>void </RETURNS> -GdkColormap *colormap -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_set_default_visual</NAME> -<RETURNS>void </RETURNS> -GdkVisual *visual -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_default_style</NAME> -<RETURNS>GtkStyle *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_default_colormap</NAME> -<RETURNS>GdkColormap *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_get_default_visual</NAME> -<RETURNS>GdkVisual *</RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_shape_combine_mask</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,GdkBitmap *shape_mask,gint offset_x,gint offset_y -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_reset_shapes</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_path</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,guint *path_length,gchar **path,gchar **path_reversed -</FUNCTION> -<FUNCTION> -<NAME>gtk_widget_class_path</NAME> -<RETURNS>void </RETURNS> -GtkWidget *widget,guint *path_length,gchar **path,gchar **path_reversed -</FUNCTION> -<MACRO> -<NAME>gtk_widget_ref</NAME> -# define gtk_widget_ref gtk_object_ref -</MACRO> -<MACRO> -<NAME>gtk_widget_unref</NAME> -# define gtk_widget_unref gtk_object_unref -</MACRO> -<MACRO> -<NAME>GTK_TYPE_WINDOW</NAME> -#define GTK_TYPE_WINDOW (gtk_window_get_type ()) -</MACRO> -<MACRO> -<NAME>GTK_WINDOW</NAME> -#define GTK_WINDOW(obj) (GTK_CHECK_CAST (obj, GTK_TYPE_WINDOW, GtkWindow)) -</MACRO> -<MACRO> -<NAME>GTK_WINDOW_CLASS</NAME> -#define GTK_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, GTK_TYPE_WINDOW, GtkWindowClass)) -</MACRO> -<MACRO> -<NAME>GTK_IS_WINDOW</NAME> -#define GTK_IS_WINDOW(obj) (GTK_CHECK_TYPE (obj, GTK_TYPE_WINDOW)) -</MACRO> -<MACRO> -<NAME>GTK_IS_WINDOW_CLASS</NAME> -#define GTK_IS_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_TYPE (klass, GTK_TYPE_WINDOW)) -</MACRO> -<STRUCT> -<NAME>GtkWindow</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkWindowClass</NAME> -</STRUCT> -<STRUCT> -<NAME>GtkWindow</NAME> -struct GtkWindow -{ - GtkBin bin; - - gchar *title; - gchar *wmclass_name; - gchar *wmclass_class; - GtkWindowType type; - - GtkWidget *focus_widget; - GtkWidget *default_widget; - GtkWindow *transient_parent; - - gushort resize_count; - guint allow_shrink : 1; - guint allow_grow : 1; - guint auto_shrink : 1; - guint handling_resize : 1; - guint position : 2; - - /* The following flag is initially TRUE when a window is mapped. - * and will be set to FALSE after it is first positioned. - * It is also temporarily reset when the window's size changes. - * - * When TRUE, we move the window to the position the app set. - */ - guint use_uposition : 1; - guint modal : 1; -}; -</STRUCT> -<FUNCTION> -<NAME>gtk_window_get_type</NAME> -<RETURNS>GtkType </RETURNS> -void -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_new</NAME> -<RETURNS>GtkWidget *</RETURNS> -GtkWindowType type -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_set_title</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,const gchar *title -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_set_wmclass</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,const gchar *wmclass_name,const gchar *wmclass_class -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_set_policy</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,gint allow_shrink,gint allow_grow,gint auto_shrink -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_add_accel_group</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,GtkAccelGroup *accel_group -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_remove_accel_group</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,GtkAccelGroup *accel_group -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_set_position</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,GtkWindowPosition position -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_activate_focus</NAME> -<RETURNS>gint </RETURNS> -GtkWindow *window -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_activate_default</NAME> -<RETURNS>gint </RETURNS> -GtkWindow *window -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_set_transient_for</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,GtkWindow *parent -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_set_geometry_hints</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,GtkWidget *geometry_widget,GdkGeometry *geometry,GdkWindowHints geom_mask -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_set_default_size</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,gint width,gint height -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_set_modal</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,gboolean modal -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_set_focus</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,GtkWidget *focus -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_set_default</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,GtkWidget *defaultw -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_remove_embedded_xid</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,guint xid -</FUNCTION> -<FUNCTION> -<NAME>gtk_window_add_embedded_xid</NAME> -<RETURNS>void </RETURNS> -GtkWindow *window,guint xid -</FUNCTION> diff --git a/docs/reference/gtk/gtk-docs.sgml b/docs/reference/gtk/gtk-docs.sgml deleted file mode 100644 index 6042de1911..0000000000 --- a/docs/reference/gtk/gtk-docs.sgml +++ /dev/null @@ -1,293 +0,0 @@ -<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [ -<!entity hash "#"> -<!entity GtkAccelLabel SYSTEM "sgml/gtkaccellabel.sgml"> -<!entity GtkAdjustment SYSTEM "sgml/gtkadjustment.sgml"> -<!entity GtkAlignment SYSTEM "sgml/gtkalignment.sgml"> -<!entity GtkArrow SYSTEM "sgml/gtkarrow.sgml"> -<!entity GtkAspectFrame SYSTEM "sgml/gtkaspectframe.sgml"> -<!entity GtkButtonBox SYSTEM "sgml/gtkbbox.sgml"> -<!entity GtkBin SYSTEM "sgml/gtkbin.sgml"> -<!entity GtkBox SYSTEM "sgml/gtkbox.sgml"> -<!entity GtkButton SYSTEM "sgml/gtkbutton.sgml"> -<!entity GtkCalendar SYSTEM "sgml/gtkcalendar.sgml"> -<!entity GtkCheckButton SYSTEM "sgml/gtkcheckbutton.sgml"> -<!entity GtkCheckMenuItem SYSTEM "sgml/gtkcheckmenuitem.sgml"> -<!entity GtkCList SYSTEM "sgml/gtkclist.sgml"> -<!entity GtkColorSelection SYSTEM "sgml/gtkcolorsel.sgml"> -<!entity GtkColorSelectionDialog SYSTEM "sgml/gtkcolorseldlg.sgml"> -<!entity GtkCombo SYSTEM "sgml/gtkcombo.sgml"> -<!entity GtkContainer SYSTEM "sgml/gtkcontainer.sgml"> -<!entity GtkCTree SYSTEM "sgml/gtkctree.sgml"> -<!entity GtkCurve SYSTEM "sgml/gtkcurve.sgml"> -<!entity GtkData SYSTEM "sgml/gtkdata.sgml"> -<!entity GtkDialog SYSTEM "sgml/gtkdialog.sgml"> -<!entity GtkDrawingArea SYSTEM "sgml/gtkdrawingarea.sgml"> -<!entity GtkEditable SYSTEM "sgml/gtkeditable.sgml"> -<!entity GtkEntry SYSTEM "sgml/gtkentry.sgml"> -<!entity GtkEventBox SYSTEM "sgml/gtkeventbox.sgml"> -<!entity GtkFileSelection SYSTEM "sgml/gtkfilesel.sgml"> -<!entity GtkFixed SYSTEM "sgml/gtkfixed.sgml"> -<!entity GtkFontSelection SYSTEM "sgml/gtkfontsel.sgml"> -<!entity GtkFontSelectionDialog SYSTEM "sgml/gtkfontseldlg.sgml"> -<!entity GtkFrame SYSTEM "sgml/gtkframe.sgml"> -<!entity GtkGammaCurve SYSTEM "sgml/gtkgamma.sgml"> -<!entity GtkHandleBox SYSTEM "sgml/gtkhandlebox.sgml"> -<!entity GtkHButtonBox SYSTEM "sgml/gtkhbbox.sgml"> -<!entity GtkHBox SYSTEM "sgml/gtkhbox.sgml"> -<!entity GtkHPaned SYSTEM "sgml/gtkhpaned.sgml"> -<!entity GtkHRuler SYSTEM "sgml/gtkhruler.sgml"> -<!entity GtkHScale SYSTEM "sgml/gtkhscale.sgml"> -<!entity GtkHScrollbar SYSTEM "sgml/gtkhscrollbar.sgml"> -<!entity GtkHSeparator SYSTEM "sgml/gtkhseparator.sgml"> -<!entity GtkImage SYSTEM "sgml/gtkimage.sgml"> -<!entity GtkInputDialog SYSTEM "sgml/gtkinputdialog.sgml"> -<!entity GtkInvisible SYSTEM "sgml/gtkinvisible.sgml"> -<!entity GtkItem SYSTEM "sgml/gtkitem.sgml"> -<!entity GtkItemFactory SYSTEM "sgml/gtkitemfactory.sgml"> -<!entity GtkLabel SYSTEM "sgml/gtklabel.sgml"> -<!entity GtkLayout SYSTEM "sgml/gtklayout.sgml"> -<!entity GtkList SYSTEM "sgml/gtklist.sgml"> -<!entity GtkListItem SYSTEM "sgml/gtklistitem.sgml"> -<!entity GtkMenu SYSTEM "sgml/gtkmenu.sgml"> -<!entity GtkMenuBar SYSTEM "sgml/gtkmenubar.sgml"> -<!entity GtkMenuItem SYSTEM "sgml/gtkmenuitem.sgml"> -<!entity GtkMenuShell SYSTEM "sgml/gtkmenushell.sgml"> -<!entity GtkMisc SYSTEM "sgml/gtkmisc.sgml"> -<!entity GtkNotebook SYSTEM "sgml/gtknotebook.sgml"> -<!entity GtkObject SYSTEM "sgml/gtkobject.sgml"> -<!entity GtkOptionMenu SYSTEM "sgml/gtkoptionmenu.sgml"> -<!entity GtkPacker SYSTEM "sgml/gtkpacker.sgml"> -<!entity GtkPaned SYSTEM "sgml/gtkpaned.sgml"> -<!entity GtkPixmap SYSTEM "sgml/gtkpixmap.sgml"> -<!entity GtkPlug SYSTEM "sgml/gtkplug.sgml"> -<!entity GtkPreview SYSTEM "sgml/gtkpreview.sgml"> -<!entity GtkProgress SYSTEM "sgml/gtkprogress.sgml"> -<!entity GtkProgressBar SYSTEM "sgml/gtkprogressbar.sgml"> -<!entity GtkRadioButton SYSTEM "sgml/gtkradiobutton.sgml"> -<!entity GtkRadioMenuItem SYSTEM "sgml/gtkradiomenuitem.sgml"> -<!entity GtkRange SYSTEM "sgml/gtkrange.sgml"> -<!entity GtkRuler SYSTEM "sgml/gtkruler.sgml"> -<!entity GtkScale SYSTEM "sgml/gtkscale.sgml"> -<!entity GtkScrollbar SYSTEM "sgml/gtkscrollbar.sgml"> -<!entity GtkScrolledWindow SYSTEM "sgml/gtkscrolledwindow.sgml"> -<!entity GtkSeparator SYSTEM "sgml/gtkseparator.sgml"> -<!entity GtkSocket SYSTEM "sgml/gtksocket.sgml"> -<!entity GtkSpinButton SYSTEM "sgml/gtkspinbutton.sgml"> -<!entity GtkStatusbar SYSTEM "sgml/gtkstatusbar.sgml"> -<!entity GtkTable SYSTEM "sgml/gtktable.sgml"> -<!entity GtkTearoffMenuItem SYSTEM "sgml/gtktearoffmenuitem.sgml"> -<!entity GtkText SYSTEM "sgml/gtktext.sgml"> -<!entity GtkTipsQuery SYSTEM "sgml/gtktipsquery.sgml"> -<!entity GtkToggleButton SYSTEM "sgml/gtktogglebutton.sgml"> -<!entity GtkToolbar SYSTEM "sgml/gtktoolbar.sgml"> -<!entity GtkTooltips SYSTEM "sgml/gtktooltips.sgml"> -<!entity GtkTree SYSTEM "sgml/gtktree.sgml"> -<!entity GtkTreeItem SYSTEM "sgml/gtktreeitem.sgml"> -<!entity GtkVButtonBox SYSTEM "sgml/gtkvbbox.sgml"> -<!entity GtkVBox SYSTEM "sgml/gtkvbox.sgml"> -<!entity GtkViewport SYSTEM "sgml/gtkviewport.sgml"> -<!entity GtkVPaned SYSTEM "sgml/gtkvpaned.sgml"> -<!entity GtkVRuler SYSTEM "sgml/gtkvruler.sgml"> -<!entity GtkVScale SYSTEM "sgml/gtkvscale.sgml"> -<!entity GtkVScrollbar SYSTEM "sgml/gtkvscrollbar.sgml"> -<!entity GtkVSeparator SYSTEM "sgml/gtkvseparator.sgml"> -<!entity GtkWidget SYSTEM "sgml/gtkwidget.sgml"> -<!entity GtkWindow SYSTEM "sgml/gtkwindow.sgml"> -<!entity gtk-General SYSTEM "sgml/gtkmain.sgml"> -<!entity gtk-Feature-Test-Macros SYSTEM "sgml/gtkfeatures.sgml"> -<!entity gtk-Graphics-Contexts SYSTEM "sgml/gtkgc.sgml"> -<!entity gtk-Styles SYSTEM "sgml/gtkstyle.sgml"> -<!entity gtk-Themes SYSTEM "sgml/gtkthemes.sgml"> -<!entity gtk-Resource-Files SYSTEM "sgml/gtkrc.sgml"> -<!entity gtk-Keyboard-Accelerators SYSTEM "sgml/gtkaccelgroup.sgml"> -<!entity gtk-Selections SYSTEM "sgml/gtkselection.sgml"> -<!entity gtk-Drag-and-Drop SYSTEM "sgml/gtkdnd.sgml"> -<!entity gtk-Signals SYSTEM "sgml/gtksignal.sgml"> -<!entity gtk-Signal-Marshallers SYSTEM "sgml/gtkmarshal.sgml"> -<!entity gtk-Object-Properties SYSTEM "sgml/gtkarg.sgml"> -<!entity gtk-Types SYSTEM "sgml/gtktypeutils.sgml"> -<!entity gtk-Bindings SYSTEM "sgml/gtkbindings.sgml"> -<!entity gtk-Standard-Enumerations SYSTEM "sgml/gtkenums.sgml"> -<!entity gtk-Private-Information SYSTEM "sgml/gtkprivate.sgml"> - -<!entity index-Object-Tree SYSTEM "sgml/tree_index.sgml"> - -<!entity index-Objects-Grouped SYSTEM "objects_grouped.sgml"> -]> -<book id="index"> - <bookinfo> - <title>GTK+ Reference Manual - - - - GTK+ - -GTK+ is a multi-platform open source GUI Toolkit. Everything about -GTK+ from the object-oriented design to the Free Software LGPL -licensing allows you to code your project with the most freedom -possible. You can develop open software, free software, or even -commercial non-free software without having to spend a dime for -licenses or royalties. - - -GTK+ is a set of libraries to create graphical user interfaces. It -works on many Unix-like platforms, and a Windows version is in -development. GTK+ is released under the GNU Library General Public -License (GNU LGPL), which allows for flexible licensing of client -applications. GTK+ has a C-based object-oriented architecture that -allows for maximum flexibility. Bindings for other languages have -been written, including C++, Objective-C, Guile/Scheme, Perl, Python, -TOM, Ada95, Free Pascal, and Eiffel. - - -GTK+ consists of the following component libraries: - - - -GLib - -Provides many useful data types, macros, type conversions, -string utilities and a lexical scanner. Includes Win32 support. - - - - -GDK - -A wrapper for low-level windowing functions. - - - - -GTK+ - -An advanced widget set. - - - - - >k-General; - >k-Feature-Test-Macros; - >k-Graphics-Contexts; - >k-Styles; - >k-Themes; - >k-Resource-Files; - >k-Keyboard-Accelerators; - >k-Selections; - >k-Drag-and-Drop; - >k-Signals; - >k-Signal-Marshallers; - >k-Object-Properties; - >k-Types; - >k-Bindings; - >k-Standard-Enumerations; - >k-Private-Information; - - - - GTK+ Widgets and Objects - &index-Objects-Grouped; - - &GtkAccelLabel; - &GtkAdjustment; - &GtkAlignment; - &GtkArrow; - &GtkAspectFrame; - &GtkButtonBox; - &GtkBin; - &GtkBox; - &GtkButton; - &GtkCalendar; - &GtkCheckButton; - &GtkCheckMenuItem; - &GtkCList; - &GtkColorSelection; - &GtkColorSelectionDialog; - &GtkCombo; - &GtkContainer; - &GtkCTree; - &GtkCurve; - &GtkData; - &GtkDialog; - &GtkDrawingArea; - &GtkEditable; - &GtkEntry; - &GtkEventBox; - &GtkFileSelection; - &GtkFixed; - &GtkFontSelection; - &GtkFontSelectionDialog; - &GtkFrame; - &GtkGammaCurve; - &GtkHandleBox; - &GtkHButtonBox; - &GtkHBox; - &GtkHPaned; - &GtkHRuler; - &GtkHScale; - &GtkHScrollbar; - &GtkHSeparator; - &GtkImage; - &GtkInputDialog; - &GtkInvisible; - &GtkItem; - &GtkItemFactory; - &GtkLabel; - &GtkLayout; - &GtkList; - &GtkListItem; - &GtkMenu; - &GtkMenuBar; - &GtkMenuItem; - &GtkMenuShell; - &GtkMisc; - &GtkNotebook; - &GtkObject; - &GtkOptionMenu; - &GtkPacker; - &GtkPaned; - &GtkPixmap; - &GtkPlug; - &GtkPreview; - &GtkProgress; - &GtkProgressBar; - &GtkRadioButton; - &GtkRadioMenuItem; - &GtkRange; - &GtkRuler; - &GtkScale; - &GtkScrollbar; - &GtkScrolledWindow; - &GtkSeparator; - &GtkSocket; - &GtkSpinButton; - &GtkStatusbar; - &GtkTable; - &GtkTearoffMenuItem; - &GtkText; - &GtkTipsQuery; - &GtkToggleButton; - &GtkToolbar; - &GtkTooltips; - &GtkTree; - &GtkTreeItem; - &GtkVButtonBox; - &GtkVBox; - &GtkViewport; - &GtkVPaned; - &GtkVRuler; - &GtkVScale; - &GtkVScrollbar; - &GtkVSeparator; - &GtkWidget; - &GtkWindow; - - - - Index - - Object Hierarchy - &index-Object-Tree; - - - diff --git a/docs/reference/gtk/gtk-overrides.txt b/docs/reference/gtk/gtk-overrides.txt deleted file mode 100644 index 485996d6ed..0000000000 --- a/docs/reference/gtk/gtk-overrides.txt +++ /dev/null @@ -1,19 +0,0 @@ -# These are manually-edited to override or add declarations to those scanned -# from the GTK header files. - -# These haven't been given parameter names in the header files. - -GtkArgGetFunc -void -GtkObject *object, -GtkArg *arg, -guint arg_id - - - -GtkArgSetFunc -void -GtkObject *object, -GtkArg *arg, -guint arg_id - diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt deleted file mode 100644 index aa0908cd7b..0000000000 --- a/docs/reference/gtk/gtk-sections.txt +++ /dev/null @@ -1,2952 +0,0 @@ - -gtk/gtk.h - -
-gtkaccellabel -GtkAccelLabel -GtkAccelLabel -gtk_accel_label_new -gtk_accel_label_set_accel_widget -gtk_accel_label_get_accel_width -gtk_accel_label_refetch - -GTK_ACCEL_LABEL -GTK_IS_ACCEL_LABEL -GTK_TYPE_ACCEL_LABEL -gtk_accel_label_get_type -GTK_ACCEL_LABEL_CLASS -GTK_IS_ACCEL_LABEL_CLASS - -gtk_accel_label_accelerator_width -
- -
-gtkadjustment -GtkAdjustment -GtkAdjustment -gtk_adjustment_new -gtk_adjustment_set_value -gtk_adjustment_clamp_page -gtk_adjustment_changed -gtk_adjustment_value_changed - -GTK_ADJUSTMENT -GTK_IS_ADJUSTMENT -GTK_TYPE_ADJUSTMENT -gtk_adjustment_get_type -GTK_ADJUSTMENT_CLASS -GTK_IS_ADJUSTMENT_CLASS -
- -
-gtkalignment -GtkAlignment -GtkAlignment -gtk_alignment_new -gtk_alignment_set - -GTK_ALIGNMENT -GTK_IS_ALIGNMENT -GTK_TYPE_ALIGNMENT -gtk_alignment_get_type -GTK_ALIGNMENT_CLASS -GTK_IS_ALIGNMENT_CLASS -
- -
-gtkarrow -GtkArrow -GtkArrow -gtk_arrow_new -gtk_arrow_set - -GTK_ARROW -GTK_IS_ARROW -GTK_TYPE_ARROW -gtk_arrow_get_type -GTK_ARROW_CLASS -GTK_IS_ARROW_CLASS -
- -
-gtkaspectframe -GtkAspectFrame -GtkAspectFrame -gtk_aspect_frame_new -gtk_aspect_frame_set - -GTK_ASPECT_FRAME -GTK_IS_ASPECT_FRAME -GTK_TYPE_ASPECT_FRAME -gtk_aspect_frame_get_type -GTK_ASPECT_FRAME_CLASS -GTK_IS_ASPECT_FRAME_CLASS -
- -
-gtkbbox -GtkButtonBox -GtkButtonBox -GTK_BUTTONBOX_DEFAULT -gtk_button_box_get_child_size_default -gtk_button_box_get_child_ipadding_default -gtk_button_box_set_child_size_default -gtk_button_box_set_child_ipadding_default -gtk_button_box_get_spacing -gtk_button_box_get_layout -gtk_button_box_get_child_size -gtk_button_box_get_child_ipadding -gtk_button_box_set_spacing -gtk_button_box_set_layout -gtk_button_box_set_child_size -gtk_button_box_set_child_ipadding -gtk_button_box_child_requisition - -GTK_BUTTON_BOX -GTK_IS_BUTTON_BOX -GTK_TYPE_BUTTON_BOX -gtk_button_box_get_type -GTK_BUTTON_BOX_CLASS -GTK_IS_BUTTON_BOX_CLASS -
- -
-gtkbin -GtkBin -GtkBin - -GTK_BIN -GTK_IS_BIN -GTK_TYPE_BIN -gtk_bin_get_type -GTK_BIN_CLASS -GTK_IS_BIN_CLASS -
- -
-gtkbox -GtkBox -GtkBox -GtkBoxChild -gtk_box_pack_start -gtk_box_pack_end -gtk_box_pack_start_defaults -gtk_box_pack_end_defaults -gtk_box_set_homogeneous -gtk_box_set_spacing -gtk_box_reorder_child -gtk_box_query_child_packing -gtk_box_set_child_packing - -GTK_BOX -GTK_IS_BOX -GTK_TYPE_BOX -gtk_box_get_type -GTK_BOX_CLASS -GTK_IS_BOX_CLASS -
- -
-gtkbutton -GtkButton -GtkButton -gtk_button_new -gtk_button_new_with_label -gtk_button_pressed -gtk_button_released -gtk_button_clicked -gtk_button_enter -gtk_button_leave -gtk_button_set_relief -gtk_button_get_relief - -GTK_BUTTON -GTK_IS_BUTTON -GTK_TYPE_BUTTON -gtk_button_get_type -GTK_BUTTON_CLASS -GTK_IS_BUTTON_CLASS -
- -
-gtkcalendar -GtkCalendar -GtkCalendarDisplayOptions -GtkCalendar -gtk_calendar_new -gtk_calendar_select_month -gtk_calendar_select_day -gtk_calendar_mark_day -gtk_calendar_unmark_day -gtk_calendar_clear_marks -gtk_calendar_display_options -gtk_calendar_get_date -gtk_calendar_freeze -gtk_calendar_thaw - -GTK_CALENDAR -GTK_IS_CALENDAR -GTK_TYPE_CALENDAR -gtk_calendar_get_type -GTK_CALENDAR_CLASS -GTK_IS_CALENDAR_CLASS -
- -
-gtkcheckbutton -GtkCheckButton -GtkCheckButton -gtk_check_button_new -gtk_check_button_new_with_label - -GTK_CHECK_BUTTON -GTK_IS_CHECK_BUTTON -GTK_TYPE_CHECK_BUTTON -gtk_check_button_get_type -GTK_CHECK_BUTTON_CLASS -GTK_IS_CHECK_BUTTON_CLASS -
- -
-gtkcheckmenuitem -GtkCheckMenuItem -GtkCheckMenuItem -gtk_check_menu_item_new -gtk_check_menu_item_new_with_label -gtk_check_menu_item_set_state -gtk_check_menu_item_set_active -gtk_check_menu_item_set_show_toggle -gtk_check_menu_item_toggled - -GTK_CHECK_MENU_ITEM -GTK_IS_CHECK_MENU_ITEM -GTK_TYPE_CHECK_MENU_ITEM -gtk_check_menu_item_get_type -GTK_CHECK_MENU_ITEM_CLASS -GTK_IS_CHECK_MENU_ITEM_CLASS -
- -
-gtkclist -GtkCList -GtkCellType -GtkButtonAction -GTK_CLIST_FLAGS -GTK_CLIST_SET_FLAG -GTK_CLIST_UNSET_FLAG -GTK_CLIST_IN_DRAG -GTK_CLIST_ROW_HEIGHT_SET -GTK_CLIST_SHOW_TITLES -GTK_CLIST_CHILD_HAS_FOCUS -GTK_CLIST_ADD_MODE -GTK_CLIST_AUTO_SORT -GTK_CLIST_AUTO_RESIZE_BLOCKED -GTK_CLIST_REORDERABLE -GTK_CLIST_USE_DRAG_ICONS -GTK_CLIST_DRAW_DRAG_LINE -GTK_CLIST_DRAW_DRAG_RECT -GTK_CLIST_ROW -GTK_CELL_TEXT -GTK_CELL_PIXMAP -GTK_CELL_PIXTEXT -GTK_CELL_WIDGET -GtkCListCompareFunc -GtkCList -GtkCListColumn -GtkCListRow -GtkCellText -GtkCellPixmap -GtkCellPixText -GtkCellWidget -GtkCell -GtkCListCellInfo -GtkCListDestInfo -GtkCListDragPos -gtk_clist_construct -gtk_clist_new -gtk_clist_new_with_titles -gtk_clist_set_shadow_type -gtk_clist_set_selection_mode -gtk_clist_freeze -gtk_clist_thaw -gtk_clist_column_titles_show -gtk_clist_column_titles_hide -gtk_clist_column_title_active -gtk_clist_column_title_passive -gtk_clist_column_titles_active -gtk_clist_column_titles_passive -gtk_clist_set_column_title -gtk_clist_set_column_widget -gtk_clist_set_column_justification -gtk_clist_set_column_visibility -gtk_clist_set_column_resizeable -gtk_clist_set_column_auto_resize -gtk_clist_optimal_column_width -gtk_clist_set_column_width -gtk_clist_set_column_min_width -gtk_clist_set_column_max_width -gtk_clist_set_row_height -gtk_clist_moveto -gtk_clist_row_is_visible -gtk_clist_get_cell_type -gtk_clist_set_text -gtk_clist_get_text -gtk_clist_set_pixmap -gtk_clist_get_pixmap -gtk_clist_set_pixtext -gtk_clist_get_pixtext -gtk_clist_set_foreground -gtk_clist_set_background -gtk_clist_set_cell_style -gtk_clist_get_cell_style -gtk_clist_set_row_style -gtk_clist_get_row_style -gtk_clist_set_shift -gtk_clist_set_selectable -gtk_clist_get_selectable -gtk_clist_prepend -gtk_clist_append -gtk_clist_insert -gtk_clist_remove -gtk_clist_set_row_data -gtk_clist_set_row_data_full -gtk_clist_get_row_data -gtk_clist_find_row_from_data -gtk_clist_select_row -gtk_clist_unselect_row -gtk_clist_undo_selection -gtk_clist_clear -gtk_clist_get_selection_info -gtk_clist_select_all -gtk_clist_unselect_all -gtk_clist_swap_rows -gtk_clist_set_compare_func -gtk_clist_set_sort_column -gtk_clist_set_sort_type -gtk_clist_sort -gtk_clist_set_auto_sort -gtk_clist_columns_autosize -gtk_clist_get_column_title -gtk_clist_get_column_widget -gtk_clist_get_hadjustment -gtk_clist_get_vadjustment -gtk_clist_row_move -gtk_clist_set_button_actions -gtk_clist_set_hadjustment -gtk_clist_set_reorderable -gtk_clist_set_use_drag_icons -gtk_clist_set_vadjustment - -GTK_CLIST -GTK_IS_CLIST -GTK_TYPE_CLIST -gtk_clist_get_type -GTK_CLIST_CLASS -GTK_IS_CLIST_CLASS -
- -
-gtkcolorsel -GtkColorSelection -GtkColorSelection -gtk_color_selection_new -gtk_color_selection_set_update_policy -gtk_color_selection_set_opacity -gtk_color_selection_set_color -gtk_color_selection_get_color - -GTK_COLOR_SELECTION -GTK_IS_COLOR_SELECTION -gtk_color_selection_get_type -GTK_COLOR_SELECTION_CLASS -
- -
-gtkcolorseldlg -GtkColorSelectionDialog -GtkColorSelectionDialog -gtk_color_selection_dialog_new - -GTK_COLOR_SELECTION_DIALOG -GTK_IS_COLOR_SELECTION_DIALOG -gtk_color_selection_dialog_get_type -GTK_COLOR_SELECTION_DIALOG_CLASS -
- -
-gtkcombo -GtkCombo -GtkCombo -gtk_combo_new -gtk_combo_set_popdown_strings -gtk_combo_set_value_in_list -gtk_combo_set_use_arrows -gtk_combo_set_use_arrows_always -gtk_combo_set_case_sensitive -gtk_combo_set_item_string -gtk_combo_disable_activate - -GTK_COMBO -GTK_IS_COMBO -gtk_combo_get_type -GTK_COMBO_CLASS -
- -
-gtkcontainer -GtkContainer -GTK_IS_RESIZE_CONTAINER -GtkContainer -gtk_container_border_width -gtk_container_add -gtk_container_remove -gtk_container_set_resize_mode -gtk_container_check_resize -gtk_container_foreach -gtk_container_foreach_full -gtk_container_children -gtk_container_focus -gtk_container_set_focus_child -gtk_container_set_focus_vadjustment -gtk_container_set_focus_hadjustment -gtk_container_register_toplevel -gtk_container_unregister_toplevel -gtk_container_resize_children -gtk_container_child_type -gtk_container_add_child_arg_type -gtk_container_query_child_args -gtk_container_child_getv -gtk_container_child_setv -gtk_container_add_with_args -gtk_container_addv -gtk_container_child_set -gtk_container_queue_resize -gtk_container_clear_resize_widgets -gtk_container_arg_set -gtk_container_arg_get -gtk_container_child_args_collect -gtk_container_child_arg_get_info -gtk_container_forall -gtk_container_child_composite_name -gtk_container_get_toplevels -gtk_container_set_border_width - -GTK_CONTAINER -GTK_IS_CONTAINER -GTK_TYPE_CONTAINER -gtk_container_get_type -GTK_CONTAINER_CLASS -GTK_IS_CONTAINER_CLASS -
- -
-gtkctree -GtkCTree -GTK_CTREE_ROW -GTK_CTREE_NODE -GTK_CTREE_NODE_NEXT -GTK_CTREE_NODE_PREV -GTK_CTREE_FUNC -GtkCTreePos -GtkCTreeLineStyle -GtkCTreeExpanderStyle -GtkCTreeExpansionType -GtkCTreeFunc -GtkCTreeGNodeFunc -GtkCTreeCompareDragFunc -GtkCTree -GtkCTreeRow -GtkCTreeNode -gtk_ctree_construct -gtk_ctree_new_with_titles -gtk_ctree_new -gtk_ctree_insert_node -gtk_ctree_remove_node -gtk_ctree_insert_gnode -gtk_ctree_export_to_gnode -gtk_ctree_post_recursive -gtk_ctree_post_recursive_to_depth -gtk_ctree_pre_recursive -gtk_ctree_pre_recursive_to_depth -gtk_ctree_is_viewable -gtk_ctree_last -gtk_ctree_find_node_ptr -gtk_ctree_find -gtk_ctree_is_ancestor -gtk_ctree_find_by_row_data -gtk_ctree_find_all_by_row_data -gtk_ctree_find_by_row_data_custom -gtk_ctree_find_all_by_row_data_custom -gtk_ctree_is_hot_spot -gtk_ctree_move -gtk_ctree_expand -gtk_ctree_expand_recursive -gtk_ctree_expand_to_depth -gtk_ctree_collapse -gtk_ctree_collapse_recursive -gtk_ctree_collapse_to_depth -gtk_ctree_toggle_expansion -gtk_ctree_toggle_expansion_recursive -gtk_ctree_select -gtk_ctree_select_recursive -gtk_ctree_unselect -gtk_ctree_unselect_recursive -gtk_ctree_real_select_recursive -gtk_ctree_node_set_text -gtk_ctree_node_set_pixmap -gtk_ctree_node_set_pixtext -gtk_ctree_set_node_info -gtk_ctree_node_set_shift -gtk_ctree_node_set_selectable -gtk_ctree_node_get_selectable -gtk_ctree_node_get_cell_type -gtk_ctree_node_get_text -gtk_ctree_node_get_pixmap -gtk_ctree_node_get_pixtext -gtk_ctree_get_node_info -gtk_ctree_node_set_row_style -gtk_ctree_node_get_row_style -gtk_ctree_node_set_cell_style -gtk_ctree_node_get_cell_style -gtk_ctree_node_set_foreground -gtk_ctree_node_set_background -gtk_ctree_node_set_row_data -gtk_ctree_node_set_row_data_full -gtk_ctree_node_get_row_data -gtk_ctree_node_moveto -gtk_ctree_node_is_visible -gtk_ctree_set_indent -gtk_ctree_set_spacing -gtk_ctree_set_reorderable -gtk_ctree_set_line_style -gtk_ctree_set_expander_style -gtk_ctree_set_drag_compare_func -gtk_ctree_sort_node -gtk_ctree_sort_recursive -gtk_ctree_node_nth -gtk_ctree_set_show_stub - -GTK_CTREE -GTK_IS_CTREE -GTK_TYPE_CTREE -gtk_ctree_get_type -GTK_CTREE_CLASS -GTK_IS_CTREE_CLASS -
- -
-GtkCurve -gtkcurve -GtkCurve -gtk_curve_new -gtk_curve_reset -gtk_curve_set_gamma -gtk_curve_set_range -gtk_curve_get_vector -gtk_curve_set_vector -gtk_curve_set_curve_type - -GTK_CURVE -GTK_IS_CURVE -GTK_TYPE_CURVE -gtk_curve_get_type -GTK_CURVE_CLASS -GTK_IS_CURVE_CLASS -
- -
-gtkdata -GtkData -GtkData - -GTK_DATA -GTK_IS_DATA -GTK_TYPE_DATA -gtk_data_get_type -GTK_DATA_CLASS -GTK_IS_DATA_CLASS -
- -
-gtkdialog -GtkDialog -GtkDialog -GtkDialogButton -gtk_dialog_new - -GTK_DIALOG -GTK_IS_DIALOG -GTK_TYPE_DIALOG -gtk_dialog_get_type -GTK_DIALOG_CLASS -GTK_IS_DIALOG_CLASS -
- -
-gtkdrawingarea -GtkDrawingArea -GtkDrawingArea -gtk_drawing_area_new -gtk_drawing_area_size - -GTK_DRAWING_AREA -GTK_IS_DRAWING_AREA -gtk_drawing_area_get_type -GTK_DRAWING_AREA_CLASS -
- -
-gtkeditable -GtkEditable -GtkTextFunction -GtkEditable -gtk_editable_select_region -gtk_editable_insert_text -gtk_editable_delete_text -gtk_editable_get_chars -gtk_editable_cut_clipboard -gtk_editable_copy_clipboard -gtk_editable_paste_clipboard -gtk_editable_claim_selection -gtk_editable_delete_selection -gtk_editable_changed -gtk_editable_set_position -gtk_editable_get_position -gtk_editable_set_editable - -GTK_EDITABLE -GTK_IS_EDITABLE -GTK_TYPE_EDITABLE -gtk_editable_get_type -GTK_EDITABLE_CLASS -GTK_IS_EDITABLE_CLASS -
- -
-gtkentry -GtkEntry -GtkEntry -gtk_entry_new -gtk_entry_new_with_max_length -gtk_entry_set_text -gtk_entry_append_text -gtk_entry_prepend_text -gtk_entry_set_position -gtk_entry_get_text -gtk_entry_select_region -gtk_entry_set_visibility -gtk_entry_set_editable -gtk_entry_set_max_length - -GTK_ENTRY -GTK_IS_ENTRY -GTK_TYPE_ENTRY -gtk_entry_get_type -GTK_ENTRY_CLASS -GTK_IS_ENTRY_CLASS -
- -
-gtkeventbox -GtkEventBox -GtkEventBox -gtk_event_box_new - -GTK_EVENT_BOX -GTK_IS_EVENT_BOX -GTK_TYPE_EVENT_BOX -gtk_event_box_get_type -GTK_EVENT_BOX_CLASS -GTK_IS_EVENT_BOX_CLASS -
- -
-gtkfilesel -GtkFileSelection -GtkFileSelection -gtk_file_selection_new -gtk_file_selection_set_filename -gtk_file_selection_get_filename -gtk_file_selection_complete -gtk_file_selection_show_fileop_buttons -gtk_file_selection_hide_fileop_buttons - -GTK_FILE_SELECTION -GTK_IS_FILE_SELECTION -GTK_TYPE_FILE_SELECTION -gtk_file_selection_get_type -GTK_FILE_SELECTION_CLASS -GTK_IS_FILE_SELECTION_CLASS -
- -
-gtkfixed -GtkFixed -GtkFixed -GtkFixedChild -gtk_fixed_new -gtk_fixed_put -gtk_fixed_move - -GTK_FIXED -GTK_IS_FIXED -GTK_TYPE_FIXED -gtk_fixed_get_type -GTK_FIXED_CLASS -GTK_IS_FIXED_CLASS -
- -
-gtkfontsel -GtkFontSelection -GtkFontSelection -gtk_font_selection_new -gtk_font_selection_get_font -gtk_font_selection_get_font_name -gtk_font_selection_set_font_name -gtk_font_selection_get_preview_text -gtk_font_selection_set_preview_text -gtk_font_selection_set_filter - - -GTK_FONT_SELECTION -GTK_IS_FONT_SELECTION -GTK_TYPE_FONT_SELECTION -gtk_font_selection_get_type -GTK_FONT_SELECTION_CLASS -GTK_IS_FONT_SELECTION_CLASS - -GTK_NUM_FONT_PROPERTIES -GTK_NUM_STYLE_PROPERTIES -GTK_NUM_FONT_FILTERS -GtkFontMetricType -GtkFontFilter -
- -
-gtkfontseldlg -GtkFontSelectionDialog -GtkFontSelectionDialog -gtk_font_selection_dialog_new -gtk_font_selection_dialog_get_font -gtk_font_selection_dialog_get_font_name -gtk_font_selection_dialog_set_font_name -gtk_font_selection_dialog_get_preview_text -gtk_font_selection_dialog_set_preview_text -gtk_font_selection_dialog_set_filter -GtkFontType -GtkFontFilterType - - -GTK_FONT_SELECTION_DIALOG -GTK_IS_FONT_SELECTION_DIALOG -GTK_TYPE_FONT_SELECTION_DIALOG -gtk_font_selection_dialog_get_type -GTK_FONT_SELECTION_DIALOG_CLASS -GTK_IS_FONT_SELECTION_DIALOG_CLASS -
- -
-gtkframe -GtkFrame -GtkFrame -gtk_frame_new -gtk_frame_set_label -gtk_frame_set_label_align -gtk_frame_set_shadow_type - -GTK_FRAME -GTK_IS_FRAME -GTK_TYPE_FRAME -gtk_frame_get_type -GTK_FRAME_CLASS -GTK_IS_FRAME_CLASS -
- -
-gtkgamma -GtkGammaCurve -GtkGammaCurve -gtk_gamma_curve_new - -GTK_GAMMA_CURVE -GTK_IS_GAMMA_CURVE -gtk_gamma_curve_get_type -GTK_GAMMA_CURVE_CLASS -
- -
-gtkhandlebox -GtkHandleBox -GtkHandleBox -gtk_handle_box_new -gtk_handle_box_set_shadow_type -gtk_handle_box_set_handle_position -gtk_handle_box_set_snap_edge - -GTK_HANDLE_BOX -GTK_IS_HANDLE_BOX -gtk_handle_box_get_type -GTK_HANDLE_BOX_CLASS -
- -
-gtkhbbox -GtkHButtonBox -GtkHButtonBox -gtk_hbutton_box_new -gtk_hbutton_box_get_spacing_default -gtk_hbutton_box_get_layout_default -gtk_hbutton_box_set_spacing_default -gtk_hbutton_box_set_layout_default - -GTK_HBUTTON_BOX -GTK_IS_HBUTTON_BOX -gtk_hbutton_box_get_type -GTK_HBUTTON_BOX_CLASS -
- -
-gtkhbox -GtkHBox -GtkHBox -gtk_hbox_new - -GTK_HBOX -GTK_IS_HBOX -GTK_TYPE_HBOX -gtk_hbox_get_type -GTK_HBOX_CLASS -GTK_IS_HBOX_CLASS -
- -
-gtkhpaned -GtkHPaned -GtkHPaned -gtk_hpaned_new - -GTK_HPANED -GTK_IS_HPANED -gtk_hpaned_get_type -GTK_HPANED_CLASS -
- -
-gtkhruler -GtkHRuler -GtkHRuler -gtk_hruler_new - -GTK_HRULER -GTK_IS_HRULER -gtk_hruler_get_type -GTK_HRULER_CLASS -
- -
-gtkhscale -GtkHScale -GtkHScale -gtk_hscale_new - -GTK_HSCALE -GTK_TYPE_HSCALE -GTK_IS_HSCALE -GTK_IS_HSCALE_CLASS -gtk_hscale_get_type -GTK_HSCALE_CLASS -
- -
-gtkhscrollbar -GtkHScrollbar -GtkHScrollbar -gtk_hscrollbar_new - -GTK_HSCROLLBAR -GTK_TYPE_HSCROLLBAR -GTK_IS_HSCROLLBAR -GTK_IS_HSCROLLBAR_CLASS -gtk_hscrollbar_get_type -GTK_HSCROLLBAR_CLASS -
- -
-gtkhseparator -GtkHSeparator -GtkHSeparator -gtk_hseparator_new - -GTK_HSEPARATOR -GTK_IS_HSEPARATOR -GTK_TYPE_HSEPARATOR -gtk_hseparator_get_type -GTK_HSEPARATOR_CLASS -GTK_IS_HSEPARATOR_CLASS -
- -
-gtkimage -GtkImage -GtkImage -gtk_image_new -gtk_image_set -gtk_image_get - -GTK_IMAGE -GTK_TYPE_IMAGE -GTK_IS_IMAGE -GTK_IS_IMAGE_CLASS -gtk_image_get_type -GTK_IMAGE_CLASS -
- -
-gtkinputdialog -GtkInputDialog -GtkInputDialog -gtk_input_dialog_new - -GTK_INPUT_DIALOG -GTK_TYPE_INPUT_DIALOG -GTK_IS_INPUT_DIALOG -GTK_IS_INPUT_DIALOG_CLASS -gtk_input_dialog_get_type -GTK_INPUT_DIALOG_CLASS -
- -
-gtkinvisible -GtkInvisible -GtkInvisible -gtk_invisible_new - -GTK_INVISIBLE -GTK_IS_INVISIBLE -GTK_TYPE_INVISIBLE -gtk_invisible_get_type -GTK_INVISIBLE_CLASS -GTK_IS_INVISIBLE_CLASS -
- -
-gtkitem -GtkItem -GtkItem -gtk_item_select -gtk_item_deselect -gtk_item_toggle - -GTK_ITEM -GTK_IS_ITEM -GTK_TYPE_ITEM -gtk_item_get_type -GTK_ITEM_CLASS -GTK_IS_ITEM_CLASS -
- -
-gtkitemfactory -GtkItemFactory -GtkPrintFunc -GtkTranslateFunc -GtkItemFactoryCallback -GtkItemFactoryCallback1 -GtkItemFactoryCallback2 -GtkItemFactory -GtkItemFactoryEntry -GtkItemFactoryItem -gtk_item_factory_new -gtk_item_factory_construct -gtk_item_factory_parse_rc -gtk_item_factory_parse_rc_string -gtk_item_factory_parse_rc_scanner -gtk_item_factory_from_widget -gtk_item_factory_path_from_widget -gtk_item_factory_get_widget -gtk_item_factory_get_widget_by_action -gtk_item_factory_dump_items -gtk_item_factory_dump_rc -gtk_item_factory_print_func -gtk_item_factory_create_item -gtk_item_factory_create_items -gtk_item_factory_create_items_ac -gtk_item_factory_delete_item -gtk_item_factory_delete_entry -gtk_item_factory_delete_entries -gtk_item_factory_popup -gtk_item_factory_popup_with_data -gtk_item_factory_popup_data -gtk_item_factory_popup_data_from_widget -gtk_item_factory_from_path -gtk_item_factory_create_menu_entries -gtk_item_factories_path_delete -gtk_item_factory_set_translate_func - -GTK_ITEM_FACTORY -GTK_IS_ITEM_FACTORY -GTK_TYPE_ITEM_FACTORY -gtk_item_factory_get_type -GTK_ITEM_FACTORY_CLASS -GTK_IS_ITEM_FACTORY_CLASS -
- -
-gtklabel -GtkLabel -GtkLabel -GtkLabelWord -gtk_label_new -gtk_label_set -gtk_label_set_pattern -gtk_label_set_justify -gtk_label_get -gtk_label_parse_uline -gtk_label_set_line_wrap -gtk_label_set_text - -GTK_LABEL -GTK_IS_LABEL -GTK_TYPE_LABEL -gtk_label_get_type -GTK_LABEL_CLASS -GTK_IS_LABEL_CLASS -
- -
-gtklayout -GtkLayout -GtkLayout -gtk_layout_new -gtk_layout_put -gtk_layout_move -gtk_layout_set_size -gtk_layout_freeze -gtk_layout_thaw -gtk_layout_get_hadjustment -gtk_layout_get_vadjustment -gtk_layout_set_hadjustment -gtk_layout_set_vadjustment - -GTK_LAYOUT -GTK_IS_LAYOUT -GTK_TYPE_LAYOUT -gtk_layout_get_type -GTK_LAYOUT_CLASS -GTK_IS_LAYOUT_CLASS -
- -
-gtklist -GtkList -GtkList -gtk_list_new -gtk_list_insert_items -gtk_list_append_items -gtk_list_prepend_items -gtk_list_remove_items -gtk_list_remove_items_no_unref -gtk_list_clear_items -gtk_list_select_item -gtk_list_unselect_item -gtk_list_select_child -gtk_list_unselect_child -gtk_list_child_position -gtk_list_set_selection_mode -gtk_list_extend_selection -gtk_list_start_selection -gtk_list_end_selection -gtk_list_select_all -gtk_list_unselect_all -gtk_list_scroll_horizontal -gtk_list_scroll_vertical -gtk_list_toggle_add_mode -gtk_list_toggle_focus_row -gtk_list_toggle_row -gtk_list_undo_selection -gtk_list_end_drag_selection - -GTK_LIST -GTK_IS_LIST -GTK_TYPE_LIST -gtk_list_get_type -GTK_LIST_CLASS -GTK_IS_LIST_CLASS -
- -
-gtklistitem -GtkListItem -GtkListItem -gtk_list_item_new -gtk_list_item_new_with_label -gtk_list_item_select -gtk_list_item_deselect - -GTK_LIST_ITEM -GTK_IS_LIST_ITEM -GTK_TYPE_LIST_ITEM -gtk_list_item_get_type -GTK_LIST_ITEM_CLASS -GTK_IS_LIST_ITEM_CLASS -
- -
-gtkmenu -GtkMenu -GtkMenu -gtk_menu_new -gtk_menu_append -gtk_menu_prepend -gtk_menu_insert -gtk_menu_reorder_child -gtk_menu_popup -gtk_menu_set_accel_group -gtk_menu_set_title - -gtk_menu_popdown -gtk_menu_reposition -gtk_menu_get_active -gtk_menu_set_active -gtk_menu_set_tearoff_state -gtk_menu_attach_to_widget -gtk_menu_detach -gtk_menu_get_attach_widget -GtkMenuPositionFunc -GtkMenuDetachFunc - -GTK_MENU -GTK_IS_MENU -GTK_TYPE_MENU -gtk_menu_get_type -GTK_MENU_CLASS -GTK_IS_MENU_CLASS -
- -
-gtkmenubar -GtkMenuBar -GtkMenuBar -gtk_menu_bar_new -gtk_menu_bar_append -gtk_menu_bar_prepend -gtk_menu_bar_insert -gtk_menu_bar_set_shadow_type - -GTK_MENU_BAR -GTK_IS_MENU_BAR -GTK_TYPE_MENU_BAR -gtk_menu_bar_get_type -GTK_MENU_BAR_CLASS -GTK_IS_MENU_BAR_CLASS -
- -
-gtkmenuitem -GtkMenuItem -GtkMenuItem -gtk_menu_item_new -gtk_menu_item_new_with_label -gtk_menu_item_set_submenu -gtk_menu_item_remove_submenu -gtk_menu_item_set_placement -gtk_menu_item_configure -gtk_menu_item_select -gtk_menu_item_deselect -gtk_menu_item_activate -gtk_menu_item_right_justify - -GTK_MENU_ITEM -GTK_IS_MENU_ITEM -GTK_TYPE_MENU_ITEM -gtk_menu_item_get_type -GTK_MENU_ITEM_CLASS -GTK_IS_MENU_ITEM_CLASS -
- -
-gtkmenushell -GtkMenuShell -GtkMenuShell -gtk_menu_shell_append -gtk_menu_shell_prepend -gtk_menu_shell_insert -gtk_menu_shell_deactivate -gtk_menu_shell_select_item -gtk_menu_shell_activate_item -GtkMenuDirectionType - -GTK_MENU_SHELL -GTK_IS_MENU_SHELL -GTK_TYPE_MENU_SHELL -gtk_menu_shell_get_type -GTK_MENU_SHELL_CLASS -GTK_IS_MENU_SHELL_CLASS -
- -
-gtkmisc -GtkMisc -GtkMisc -gtk_misc_set_alignment -gtk_misc_set_padding - -GTK_MISC -GTK_IS_MISC -GTK_TYPE_MISC -gtk_misc_get_type -GTK_MISC_CLASS -GTK_IS_MISC_CLASS -
- -
-gtknotebook -GtkNotebook -GtkNotebook -GTK_NOTEBOOK_PAGE -GtkNotebookPage -gtk_notebook_new -gtk_notebook_append_page -gtk_notebook_append_page_menu -gtk_notebook_prepend_page -gtk_notebook_prepend_page_menu -gtk_notebook_insert_page -gtk_notebook_insert_page_menu -gtk_notebook_remove_page -gtk_notebook_current_page -gtk_notebook_page_num -gtk_notebook_set_page -gtk_notebook_next_page -gtk_notebook_prev_page -gtk_notebook_reorder_child -gtk_notebook_set_tab_pos -gtk_notebook_set_show_tabs -gtk_notebook_set_show_border -gtk_notebook_set_scrollable -gtk_notebook_set_tab_border -gtk_notebook_popup_enable -gtk_notebook_popup_disable -gtk_notebook_get_current_page -gtk_notebook_get_menu_label -gtk_notebook_get_nth_page -gtk_notebook_get_tab_label -gtk_notebook_query_tab_label_packing -gtk_notebook_set_homogeneous_tabs -gtk_notebook_set_menu_label -gtk_notebook_set_menu_label_text -gtk_notebook_set_tab_hborder -gtk_notebook_set_tab_label -gtk_notebook_set_tab_label_packing -gtk_notebook_set_tab_label_text -gtk_notebook_set_tab_vborder - -GTK_NOTEBOOK -GTK_IS_NOTEBOOK -GTK_TYPE_NOTEBOOK -gtk_notebook_get_type -GTK_NOTEBOOK_CLASS -GTK_IS_NOTEBOOK_CLASS -
- -
-gtkobject -GtkObject -GTK_OBJECT_TYPE -GTK_OBJECT_SIGNALS -GTK_OBJECT_NSIGNALS -GtkObjectFlags -GTK_OBJECT_FLAGS -GTK_OBJECT_DESTROYED -GTK_OBJECT_FLOATING -GTK_OBJECT_CONNECTED -GTK_OBJECT_CONSTRUCTED -GTK_OBJECT_SET_FLAGS -GTK_OBJECT_UNSET_FLAGS -GtkArgFlags -GtkObject -gtk_object_class_user_signal_new -gtk_object_class_user_signal_newv -gtk_object_new -gtk_object_newv -gtk_object_constructed -gtk_object_default_construct -gtk_object_sink -gtk_object_ref -gtk_object_unref -gtk_object_weakref -gtk_object_weakunref -gtk_object_destroy -gtk_object_getv -gtk_object_set -gtk_object_setv -gtk_object_query_args -gtk_object_set_data -gtk_object_set_data_full -gtk_object_remove_data -gtk_object_get_data -gtk_object_remove_no_notify -gtk_object_set_user_data -gtk_object_get_user_data -gtk_object_class_add_signals -gtk_object_add_arg_type -gtk_object_set_data_by_id -gtk_object_set_data_by_id_full -gtk_object_get_data_by_id -gtk_object_remove_data_by_id -gtk_object_remove_no_notify_by_id -gtk_object_data_try_key -gtk_object_data_force_id -gtk_object_arg_set -gtk_object_arg_get -gtk_object_args_collect -gtk_object_arg_get_info -gtk_trace_referencing - -GTK_OBJECT -GTK_IS_OBJECT -gtk_object_get_type -GTK_OBJECT_CLASS -GTK_IS_OBJECT_CLASS -
- -
-gtkoptionmenu -GtkOptionMenu -GtkOptionMenu -gtk_option_menu_new -gtk_option_menu_get_menu -gtk_option_menu_set_menu -gtk_option_menu_remove_menu -gtk_option_menu_set_history - -GTK_OPTION_MENU -GTK_IS_OPTION_MENU -GTK_TYPE_OPTION_MENU -gtk_option_menu_get_type -GTK_OPTION_MENU_CLASS -GTK_IS_OPTION_MENU_CLASS -
- -
-gtkpacker -GtkPacker -GtkPackerOptions -GtkSideType -GtkAnchorType -GtkPackerChild -GtkPacker -gtk_packer_new -gtk_packer_add_defaults -gtk_packer_add -gtk_packer_configure -gtk_packer_reorder_child -gtk_packer_set_spacing -gtk_packer_set_default_border_width -gtk_packer_set_default_pad -gtk_packer_set_default_ipad -gtk_packer_set_child_packing - -GTK_PACKER -GTK_IS_PACKER -GTK_TYPE_PACKER -gtk_packer_get_type -GTK_PACKER_CLASS -GTK_IS_PACKER_CLASS -
- -
-gtkpaned -GtkPaned -GtkPaned -gtk_paned_add1 -gtk_paned_add2 -gtk_paned_handle_size -gtk_paned_gutter_size -gtk_paned_compute_position -gtk_paned_pack1 -gtk_paned_pack2 -gtk_paned_set_gutter_size -gtk_paned_set_handle_size -gtk_paned_set_position - -GTK_PANED -GTK_IS_PANED -GTK_TYPE_PANED -gtk_paned_get_type -GTK_PANED_CLASS -GTK_IS_PANED_CLASS -
- -
-gtkpixmap -GtkPixmap -GtkPixmap -gtk_pixmap_new -gtk_pixmap_set -gtk_pixmap_get -gtk_pixmap_set_build_insensitive - -GTK_PIXMAP -GTK_IS_PIXMAP -GTK_TYPE_PIXMAP -gtk_pixmap_get_type -GTK_PIXMAP_CLASS -GTK_IS_PIXMAP_CLASS -
- -
-gtkplug -GtkPlug -GtkPlug -gtk_plug_construct -gtk_plug_new - -GTK_PLUG -GTK_IS_PLUG -gtk_plug_get_type -GTK_PLUG_CLASS -
- -
-gtkpreview -GtkPreview -GtkPreviewInfo -GtkDitherInfo -GtkPreview -gtk_preview_uninit -gtk_preview_new -gtk_preview_size -gtk_preview_put -gtk_preview_draw_row -gtk_preview_set_expand -gtk_preview_set_gamma -gtk_preview_set_color_cube -gtk_preview_set_install_cmap -gtk_preview_set_reserved -gtk_preview_set_dither -gtk_preview_get_visual -gtk_preview_get_cmap -gtk_preview_get_info -gtk_preview_reset - -GTK_PREVIEW -GTK_IS_PREVIEW -gtk_preview_get_type -GTK_PREVIEW_CLASS -
- -
-gtkprogress -GtkProgress -GtkProgress -gtk_progress_set_show_text -gtk_progress_set_text_alignment -gtk_progress_set_format_string -gtk_progress_set_adjustment -gtk_progress_set_percentage -gtk_progress_set_value -gtk_progress_get_value -gtk_progress_set_activity_mode -gtk_progress_get_current_text -gtk_progress_get_text_from_value -gtk_progress_get_current_percentage -gtk_progress_get_percentage_from_value -gtk_progress_configure - -GTK_PROGRESS -GTK_TYPE_PROGRESS -GTK_IS_PROGRESS -gtk_progress_get_type -GTK_PROGRESS_CLASS -GTK_IS_PROGRESS_CLASS -
- -
-gtkprogressbar -GtkProgressBar -GtkProgressBarStyle -GtkProgressBarOrientation -GtkProgressBar -gtk_progress_bar_new -gtk_progress_bar_new_with_adjustment -gtk_progress_bar_set_bar_style -gtk_progress_bar_set_discrete_blocks -gtk_progress_bar_set_activity_step -gtk_progress_bar_set_activity_blocks -gtk_progress_bar_set_orientation -gtk_progress_bar_update - -GTK_PROGRESS_BAR -GTK_TYPE_PROGRESS_BAR -GTK_IS_PROGRESS_BAR -GTK_IS_PROGRESS_BAR_CLASS -gtk_progress_bar_get_type -GTK_PROGRESS_BAR_CLASS -
- -
-gtkradiobutton -GtkRadioButton -GtkRadioButton -gtk_radio_button_new -gtk_radio_button_new_from_widget -gtk_radio_button_new_with_label -gtk_radio_button_new_with_label_from_widget -gtk_radio_button_group -gtk_radio_button_set_group - -GTK_RADIO_BUTTON -GTK_IS_RADIO_BUTTON -GTK_TYPE_RADIO_BUTTON -gtk_radio_button_get_type -GTK_RADIO_BUTTON_CLASS -GTK_IS_RADIO_BUTTON_CLASS -
- -
-gtkradiomenuitem -GtkRadioMenuItem -GtkRadioMenuItem -gtk_radio_menu_item_new -gtk_radio_menu_item_new_with_label -gtk_radio_menu_item_group -gtk_radio_menu_item_set_group - -GTK_RADIO_MENU_ITEM -GTK_IS_RADIO_MENU_ITEM -GTK_TYPE_RADIO_MENU_ITEM -gtk_radio_menu_item_get_type -GTK_RADIO_MENU_ITEM_CLASS -GTK_IS_RADIO_MENU_ITEM_CLASS -
- -
-gtkrange -GtkRange -GtkRange -gtk_range_get_adjustment -gtk_range_set_update_policy -gtk_range_set_adjustment -gtk_range_draw_background -gtk_range_draw_trough -gtk_range_draw_slider -gtk_range_draw_step_forw -gtk_range_draw_step_back -gtk_range_slider_update -gtk_range_trough_click -gtk_range_default_hslider_update -gtk_range_default_vslider_update -gtk_range_default_htrough_click -gtk_range_default_vtrough_click -gtk_range_default_hmotion -gtk_range_default_vmotion -gtk_range_clear_background - -GTK_RANGE -GTK_TYPE_RANGE -GTK_IS_RANGE -gtk_range_get_type -GTK_RANGE_CLASS -GTK_IS_RANGE_CLASS -
- -
-gtkruler -GtkRuler -GtkRuler -GtkRulerMetric -gtk_ruler_set_metric -gtk_ruler_set_range - -GTK_RULER -GTK_IS_RULER -gtk_ruler_get_type -GTK_RULER_CLASS - -gtk_ruler_draw_ticks -gtk_ruler_draw_pos -
- -
-gtkscale -GtkScale -GtkScale -gtk_scale_set_digits -gtk_scale_set_draw_value -gtk_scale_set_value_pos -gtk_scale_get_value_width - -GTK_SCALE -GTK_TYPE_SCALE -GTK_IS_SCALE -gtk_scale_get_type -GTK_SCALE_CLASS -GTK_IS_SCALE_CLASS - -gtk_scale_value_width -gtk_scale_draw_value -
- -
-gtkscrollbar -GtkScrollbar -GtkScrollbar - -GTK_SCROLLBAR -GTK_TYPE_SCROLLBAR -GTK_IS_SCROLLBAR -gtk_scrollbar_get_type -GTK_SCROLLBAR_CLASS -GTK_IS_SCROLLBAR_CLASS -
- -
-gtkscrolledwindow -GtkScrolledWindow -GtkScrolledWindow -gtk_scrolled_window_new -gtk_scrolled_window_get_hadjustment -gtk_scrolled_window_get_vadjustment -gtk_scrolled_window_set_policy -gtk_scrolled_window_add_with_viewport -gtk_scrolled_window_set_hadjustment -gtk_scrolled_window_set_placement -gtk_scrolled_window_set_vadjustment - -GTK_SCROLLED_WINDOW -GTK_IS_SCROLLED_WINDOW -GTK_TYPE_SCROLLED_WINDOW -gtk_scrolled_window_get_type -GTK_SCROLLED_WINDOW_CLASS -GTK_IS_SCROLLED_WINDOW_CLASS -
- -
-gtkseparator -GtkSeparator -GtkSeparator - -GTK_SEPARATOR -GTK_IS_SEPARATOR -GTK_TYPE_SEPARATOR -gtk_separator_get_type -GTK_SEPARATOR_CLASS -GTK_IS_SEPARATOR_CLASS -
- -
-gtksocket -GtkSocket -GtkSocket -gtk_socket_new -gtk_socket_steal - -GTK_SOCKET -GTK_IS_SOCKET -gtk_socket_get_type -GTK_SOCKET_CLASS -
- -
-gtkspinbutton -GtkSpinButton -GtkSpinButtonUpdatePolicy -GtkSpinType -GtkSpinButton -gtk_spin_button_configure -gtk_spin_button_new -gtk_spin_button_set_adjustment -gtk_spin_button_get_adjustment -gtk_spin_button_set_digits -gtk_spin_button_get_value_as_float -gtk_spin_button_get_value_as_int -gtk_spin_button_set_value -gtk_spin_button_set_update_policy -gtk_spin_button_set_numeric -gtk_spin_button_spin -gtk_spin_button_set_wrap -gtk_spin_button_set_shadow_type -gtk_spin_button_set_snap_to_ticks -gtk_spin_button_update - -GTK_SPIN_BUTTON -GTK_IS_SPIN_BUTTON -GTK_TYPE_SPIN_BUTTON -gtk_spin_button_get_type -GTK_SPIN_BUTTON_CLASS -GTK_IS_SPIN_BUTTON_CLASS -
- -
-gtkstatusbar -GtkStatusbar -GtkStatusbar -GtkStatusbarMsg -gtk_statusbar_new -gtk_statusbar_get_context_id -gtk_statusbar_push -gtk_statusbar_pop -gtk_statusbar_remove - -GTK_STATUSBAR -GTK_IS_STATUSBAR -gtk_statusbar_get_type -GTK_STATUSBAR_CLASS -
- -
-gtktable -GtkTable -GtkTable -GtkTableChild -GtkTableRowCol -gtk_table_new -gtk_table_resize -gtk_table_attach -gtk_table_attach_defaults -gtk_table_set_row_spacing -gtk_table_set_col_spacing -gtk_table_set_row_spacings -gtk_table_set_col_spacings -gtk_table_set_homogeneous - -GTK_TABLE -GTK_IS_TABLE -GTK_TYPE_TABLE -gtk_table_get_type -GTK_TABLE_CLASS -GTK_IS_TABLE_CLASS -
- -
-gtktearoffmenuitem -GtkTearoffMenuItem -GtkTearoffMenuItem -gtk_tearoff_menu_item_new - -GTK_TEAROFF_MENU_ITEM -GTK_IS_TEAROFF_MENU_ITEM -GTK_TYPE_TEAROFF_MENU_ITEM -gtk_tearoff_menu_item_get_type -GTK_TEAROFF_MENU_ITEM_CLASS -GTK_IS_TEAROFF_MENU_ITEM_CLASS -
- -
-gtktext -GtkText -GtkTextFont -GtkPropertyMark -GtkText -gtk_text_new -gtk_text_set_editable -gtk_text_set_word_wrap -gtk_text_set_line_wrap -gtk_text_set_adjustments -gtk_text_set_point -gtk_text_get_point -gtk_text_get_length -gtk_text_freeze -gtk_text_thaw -gtk_text_insert -gtk_text_backward_delete -gtk_text_forward_delete -GTK_TEXT_INDEX - -GTK_TEXT -GTK_IS_TEXT -GTK_TYPE_TEXT -gtk_text_get_type -GTK_TEXT_CLASS -GTK_IS_TEXT_CLASS -
- -
-gtktipsquery -GtkTipsQuery -GtkTipsQuery -gtk_tips_query_new -gtk_tips_query_start_query -gtk_tips_query_stop_query -gtk_tips_query_set_caller -gtk_tips_query_set_labels - -GTK_TIPS_QUERY -GTK_IS_TIPS_QUERY -GTK_TYPE_TIPS_QUERY -gtk_tips_query_get_type -GTK_TIPS_QUERY_CLASS -GTK_IS_TIPS_QUERY_CLASS -
- -
-gtktogglebutton -GtkToggleButton -GtkToggleButton -gtk_toggle_button_new -gtk_toggle_button_new_with_label -gtk_toggle_button_set_mode -gtk_toggle_button_set_state -gtk_toggle_button_toggled -gtk_toggle_button_get_active -gtk_toggle_button_set_active - -GTK_TOGGLE_BUTTON -GTK_IS_TOGGLE_BUTTON -GTK_TYPE_TOGGLE_BUTTON -gtk_toggle_button_get_type -GTK_TOGGLE_BUTTON_CLASS -GTK_IS_TOGGLE_BUTTON_CLASS -
- -
-gtktoolbar -GtkToolbar -GtkToolbarChildType -GtkToolbarSpaceStyle -GtkToolbarChild -GtkToolbar -gtk_toolbar_new -gtk_toolbar_append_item -gtk_toolbar_prepend_item -gtk_toolbar_insert_item -gtk_toolbar_append_space -gtk_toolbar_prepend_space -gtk_toolbar_insert_space -gtk_toolbar_append_element -gtk_toolbar_prepend_element -gtk_toolbar_insert_element -gtk_toolbar_append_widget -gtk_toolbar_prepend_widget -gtk_toolbar_insert_widget -gtk_toolbar_set_orientation -gtk_toolbar_set_style -gtk_toolbar_set_space_size -gtk_toolbar_set_space_style -gtk_toolbar_set_tooltips -gtk_toolbar_set_button_relief -gtk_toolbar_get_button_relief - -GTK_TOOLBAR -GTK_IS_TOOLBAR -gtk_toolbar_get_type -GTK_TOOLBAR_CLASS -
- -
-gtktooltips -GtkTooltips -GtkTooltipsData -GtkTooltips -gtk_tooltips_new -gtk_tooltips_enable -gtk_tooltips_disable -gtk_tooltips_set_delay -gtk_tooltips_set_tip -gtk_tooltips_set_colors -gtk_tooltips_data_get -gtk_tooltips_force_window - -GTK_TOOLTIPS -GTK_IS_TOOLTIPS -GTK_TYPE_TOOLTIPS -gtk_tooltips_get_type -GTK_TOOLTIPS_CLASS -GTK_IS_TOOLTIPS_CLASS -
- -
-gtktree -GtkTree -GTK_IS_ROOT_TREE -GTK_TREE_ROOT_TREE -GTK_TREE_SELECTION -GtkTreeViewMode -GtkTree -gtk_tree_new -gtk_tree_append -gtk_tree_prepend -gtk_tree_insert -gtk_tree_remove_items -gtk_tree_clear_items -gtk_tree_select_item -gtk_tree_unselect_item -gtk_tree_select_child -gtk_tree_unselect_child -gtk_tree_child_position -gtk_tree_set_selection_mode -gtk_tree_set_view_mode -gtk_tree_set_view_lines -gtk_tree_remove_item - -GTK_TREE -GTK_IS_TREE -GTK_TYPE_TREE -gtk_tree_get_type -GTK_TREE_CLASS -GTK_IS_TREE_CLASS -
- -
-gtktreeitem -GtkTreeItem -GTK_TREE_ITEM_SUBTREE -GtkTreeItem -gtk_tree_item_new -gtk_tree_item_new_with_label -gtk_tree_item_set_subtree -gtk_tree_item_remove_subtree -gtk_tree_item_select -gtk_tree_item_deselect -gtk_tree_item_expand -gtk_tree_item_collapse - -GTK_TREE_ITEM -GTK_IS_TREE_ITEM -GTK_TYPE_TREE_ITEM -gtk_tree_item_get_type -GTK_TREE_ITEM_CLASS -GTK_IS_TREE_ITEM_CLASS -
- -
-gtkvbbox -GtkVButtonBox -GtkVButtonBox -gtk_vbutton_box_new -gtk_vbutton_box_get_spacing_default -gtk_vbutton_box_set_spacing_default -gtk_vbutton_box_get_layout_default -gtk_vbutton_box_set_layout_default - -GTK_VBUTTON_BOX -GTK_IS_VBUTTON_BOX -gtk_vbutton_box_get_type -GTK_VBUTTON_BOX_CLASS -
- -
-gtkvbox -GtkVBox -GtkVBox -gtk_vbox_new - -GTK_VBOX -GTK_IS_VBOX -GTK_TYPE_VBOX -gtk_vbox_get_type -GTK_VBOX_CLASS -GTK_IS_VBOX_CLASS -
- -
-gtkviewport -GtkViewport -GtkViewport -gtk_viewport_new -gtk_viewport_get_hadjustment -gtk_viewport_get_vadjustment -gtk_viewport_set_hadjustment -gtk_viewport_set_vadjustment -gtk_viewport_set_shadow_type - -GTK_VIEWPORT -GTK_IS_VIEWPORT -GTK_TYPE_VIEWPORT -gtk_viewport_get_type -GTK_VIEWPORT_CLASS -GTK_IS_VIEWPORT_CLASS -
- -
-gtkvpaned -GtkVPaned -GtkVPaned -gtk_vpaned_new - -GTK_VPANED -GTK_IS_VPANED -gtk_vpaned_get_type -GTK_VPANED_CLASS -
- -
-gtkvruler -GtkVRuler -GtkVRuler -gtk_vruler_new - -GTK_VRULER -GTK_IS_VRULER -gtk_vruler_get_type -GTK_VRULER_CLASS -
- -
-gtkvscale -GtkVScale -GtkVScale -gtk_vscale_new - -GTK_VSCALE -GTK_TYPE_VSCALE -GTK_IS_VSCALE -gtk_vscale_get_type -GTK_VSCALE_CLASS -GTK_IS_VSCALE_CLASS -
- -
-gtkvscrollbar -GtkVScrollbar -GtkVScrollbar -gtk_vscrollbar_new - -GTK_VSCROLLBAR -GTK_TYPE_VSCROLLBAR -GTK_IS_VSCROLLBAR -gtk_vscrollbar_get_type -GTK_VSCROLLBAR_CLASS -GTK_IS_VSCROLLBAR_CLASS -
- -
-gtkvseparator -GtkVSeparator -GtkVSeparator -gtk_vseparator_new - -GTK_VSEPARATOR -GTK_IS_VSEPARATOR -GTK_TYPE_VSEPARATOR -gtk_vseparator_get_type -GTK_VSEPARATOR_CLASS -GTK_IS_VSEPARATOR_CLASS -
- -
-gtkwidget -GtkWidget -GtkWidgetFlags -GTK_WIDGET_TYPE -GTK_WIDGET_STATE -GTK_WIDGET_SAVED_STATE -GTK_WIDGET_FLAGS -GTK_WIDGET_TOPLEVEL -GTK_WIDGET_NO_WINDOW -GTK_WIDGET_REALIZED -GTK_WIDGET_MAPPED -GTK_WIDGET_VISIBLE -GTK_WIDGET_DRAWABLE -GTK_WIDGET_SENSITIVE -GTK_WIDGET_PARENT_SENSITIVE -GTK_WIDGET_IS_SENSITIVE -GTK_WIDGET_CAN_FOCUS -GTK_WIDGET_HAS_FOCUS -GTK_WIDGET_CAN_DEFAULT -GTK_WIDGET_RECEIVES_DEFAULT -GTK_WIDGET_HAS_DEFAULT -GTK_WIDGET_HAS_GRAB -GTK_WIDGET_RC_STYLE -GTK_WIDGET_COMPOSITE_CHILD -GTK_WIDGET_APP_PAINTABLE -GTK_WIDGET_SET_FLAGS -GTK_WIDGET_UNSET_FLAGS -GtkCallback -GtkRequisition -GtkAllocation -GtkSelectionData -GtkWidget -GtkWidgetAuxInfo -GtkWidgetShapeInfo -gtk_widget_new -gtk_widget_newv -gtk_widget_ref -gtk_widget_unref -gtk_widget_destroy -gtk_widget_destroyed -gtk_widget_get -gtk_widget_getv -gtk_widget_set -gtk_widget_setv -gtk_widget_unparent -gtk_widget_show -gtk_widget_show_now -gtk_widget_hide -gtk_widget_show_all -gtk_widget_hide_all -gtk_widget_map -gtk_widget_unmap -gtk_widget_realize -gtk_widget_unrealize -gtk_widget_queue_draw -gtk_widget_queue_resize -gtk_widget_draw -gtk_widget_draw_focus -gtk_widget_draw_default -gtk_widget_size_request -gtk_widget_get_child_requisition -gtk_widget_size_allocate -gtk_widget_add_accelerator -gtk_widget_remove_accelerator -gtk_widget_remove_accelerators -gtk_widget_accelerator_signal -gtk_widget_event -gtk_widget_activate -gtk_widget_reparent -gtk_widget_popup -gtk_widget_intersect -gtk_widget_grab_focus -gtk_widget_grab_default -gtk_widget_set_name -gtk_widget_get_name -gtk_widget_set_state -gtk_widget_set_sensitive -gtk_widget_set_parent -gtk_widget_set_parent_window -gtk_widget_get_parent_window -gtk_widget_set_uposition -gtk_widget_set_usize -gtk_widget_set_events -gtk_widget_add_events -gtk_widget_set_extension_events -gtk_widget_get_extension_events -gtk_widget_get_toplevel -gtk_widget_get_ancestor -gtk_widget_get_colormap -gtk_widget_set_colormap -gtk_widget_get_visual -gtk_widget_set_visual -gtk_widget_get_events -gtk_widget_get_pointer -gtk_widget_is_ancestor -gtk_widget_hide_on_delete -gtk_widget_set_style -gtk_widget_set_rc_style -gtk_widget_ensure_style -gtk_widget_get_style -gtk_widget_restore_default_style -gtk_widget_reset_rc_styles -gtk_widget_push_style -gtk_widget_push_colormap -gtk_widget_push_visual -gtk_widget_pop_style -gtk_widget_pop_colormap -gtk_widget_pop_visual -gtk_widget_set_default_style -gtk_widget_set_default_colormap -gtk_widget_set_default_visual -gtk_widget_get_default_style -gtk_widget_get_default_colormap -gtk_widget_get_default_visual -gtk_widget_shape_combine_mask -gtk_widget_path -gtk_widget_class_path -gtk_widget_get_composite_name -gtk_widget_lock_accelerators -gtk_widget_modify_style -gtk_widget_pop_composite_child -gtk_widget_push_composite_child -gtk_widget_queue_clear -gtk_widget_queue_clear_area -gtk_widget_queue_draw_area -gtk_widget_reset_shapes -gtk_widget_set_app_paintable -gtk_widget_set_composite_name -gtk_widget_set_scroll_adjustments -gtk_widget_unlock_accelerators - -GTK_WIDGET -GTK_IS_WIDGET -GTK_TYPE_WIDGET -gtk_widget_get_type -GTK_WIDGET_CLASS -GTK_IS_WIDGET_CLASS -
- -
-gtkwindow -GtkWindow -GtkWindow -gtk_window_new -gtk_window_set_title -gtk_window_set_wmclass -gtk_window_set_focus -gtk_window_set_default -gtk_window_set_policy -gtk_window_add_accel_group -gtk_window_remove_accel_group -gtk_window_position -gtk_window_activate_focus -gtk_window_activate_default -gtk_window_set_modal -gtk_window_add_embedded_xid -gtk_window_remove_embedded_xid -gtk_window_set_default_size -gtk_window_set_geometry_hints -gtk_window_set_position -gtk_window_set_transient_for - -GTK_WINDOW -GTK_IS_WINDOW -GTK_TYPE_WINDOW -gtk_window_get_type -GTK_WINDOW_CLASS -GTK_IS_WINDOW_CLASS -
- - -
-gtkmain -General -gtk_set_locale -gtk_init -gtk_init_check -gtk_exit -gtk_events_pending -gtk_main -gtk_main_level -gtk_main_quit -gtk_main_iteration -gtk_main_iteration_do -gtk_main_do_event - -GtkModuleInitFunc - - -gtk_true -gtk_false - - -gtk_grab_add -gtk_grab_get_current -gtk_grab_remove - - -gtk_init_add -gtk_quit_add_destroy -gtk_quit_add -gtk_quit_add_full -gtk_quit_remove -gtk_quit_remove_by_data - - -gtk_timeout_add_full -gtk_timeout_add -gtk_timeout_remove - - -gtk_idle_add -gtk_idle_add_priority -gtk_idle_add_full -gtk_idle_remove -gtk_idle_remove_by_data - - -gtk_input_add_full -gtk_input_remove - - -GTK_PRIORITY_REDRAW -GTK_PRIORITY_RESIZE -GTK_PRIORITY_HIGH -GTK_PRIORITY_INTERNAL -GTK_PRIORITY_DEFAULT -GTK_PRIORITY_LOW - - -gtk_key_snooper_install -GtkKeySnoopFunc -gtk_key_snooper_remove - - -gtk_get_current_event -gtk_get_event_widget -gtk_propagate_event -
- - -
-gtkfeatures -Feature Test Macros -gtk_major_version -gtk_minor_version -gtk_micro_version -gtk_binary_age -gtk_interface_age -gtk_check_version - -GTK_MAJOR_VERSION -GTK_MINOR_VERSION -GTK_MICRO_VERSION -GTK_BINARY_AGE -GTK_INTERFACE_AGE -GTK_HAVE_CONTAINER_FOCUS_ADJUSTMENTS -GTK_HAVE_SIGNAL_INIT -GTK_HAVE_FEATURES_1_1_0 -GTK_HAVE_FEATURES_1_1_2 -GTK_HAVE_FEATURES_1_1_4 -GTK_HAVE_FEATURES_1_1_5 -GTK_HAVE_FEATURES_1_1_6 -GTK_HAVE_FEATURES_1_1_7 -GTK_HAVE_FEATURES_1_1_8 -GTK_HAVE_FEATURES_1_1_9 -GTK_HAVE_FEATURES_1_1_10 -GTK_HAVE_FEATURES_1_1_11 -GTK_HAVE_FEATURES_1_1_12 -GTK_HAVE_FEATURES_1_1_13 -GTK_HAVE_FEATURES_1_1_14 -
- - -
-gtkgc -Graphics Contexts -gtk_gc_get -gtk_gc_release -
- -
-gtkstyle -Styles -GTK_STYLE_NUM_STYLECOLORS -GTK_STYLE_ATTACHED -GtkStyle -GtkStyleClass -gtk_style_new -gtk_style_copy -gtk_style_attach -gtk_style_detach -gtk_style_ref -gtk_style_unref -gtk_style_set_background -gtk_style_apply_default_background -gtk_style_apply_default_pixmap -gtk_draw_hline -gtk_draw_vline -gtk_draw_shadow -gtk_draw_polygon -gtk_draw_arrow -gtk_draw_diamond -gtk_draw_oval -gtk_draw_string -gtk_draw_box -gtk_draw_box_gap -gtk_draw_check -gtk_draw_cross -gtk_draw_extension -gtk_draw_flat_box -gtk_draw_focus -gtk_draw_handle -gtk_draw_option -gtk_draw_ramp -gtk_draw_shadow_gap -gtk_draw_slider -gtk_draw_tab -gtk_paint_arrow -gtk_paint_box -gtk_paint_box_gap -gtk_paint_check -gtk_paint_cross -gtk_paint_diamond -gtk_paint_extension -gtk_paint_flat_box -gtk_paint_focus -gtk_paint_handle -gtk_paint_hline -gtk_paint_option -gtk_paint_oval -gtk_paint_polygon -gtk_paint_ramp -gtk_paint_shadow -gtk_paint_shadow_gap -gtk_paint_slider -gtk_paint_string -gtk_paint_tab -gtk_paint_vline -
- -
-gtkthemes -Themes -GtkThemeEngine -gtk_theme_engine_get -gtk_theme_engine_ref -gtk_theme_engine_unref -gtk_themes_init -gtk_themes_exit -
- -
-gtkrc -Resource Files -GtkRcStyle -GtkRcFlags -GtkImageLoader -GtkRcTokenType -gtk_rc_get_style -gtk_rc_add_widget_name_style -gtk_rc_add_widget_class_style -gtk_rc_add_class_style -gtk_rc_parse -gtk_rc_parse_string -gtk_rc_reparse_all -gtk_rc_add_default_file -gtk_rc_get_default_files -gtk_rc_set_default_files -gtk_rc_parse_color -gtk_rc_parse_state -gtk_rc_parse_priority -gtk_rc_find_module_in_path -gtk_rc_find_pixmap_in_path -gtk_rc_get_module_dir -gtk_rc_get_theme_dir -gtk_rc_set_image_loader -gtk_rc_load_image -gtk_rc_style_new -gtk_rc_style_ref -gtk_rc_style_unref - -gtk_rc_init -
- -
-gtkaccelgroup -Keyboard Accelerators -GtkAccelGroup -GtkAccelEntry -gtk_accel_group_new -gtk_accel_group_get_default -gtk_accel_group_ref -gtk_accel_group_unref -gtk_accel_group_activate -gtk_accel_groups_activate -gtk_accel_group_attach -gtk_accel_group_detach -gtk_accel_group_lock -gtk_accel_group_unlock -gtk_accel_group_get_entry -gtk_accel_group_lock_entry -gtk_accel_group_unlock_entry -gtk_accel_group_add -gtk_accel_group_remove -gtk_accel_group_handle_add -gtk_accel_group_handle_remove -gtk_accel_group_create_add -gtk_accel_group_create_remove -gtk_accel_group_marshal_add -gtk_accel_group_marshal_remove -gtk_accel_groups_from_object -gtk_accel_group_entries_from_object -gtk_accelerator_valid -gtk_accelerator_parse -gtk_accelerator_name -gtk_accelerator_set_default_mod_mask -gtk_accelerator_get_default_mod_mask -
- -
-gtkselection -Selections -GtkTargetEntry -GtkTargetList -GtkTargetPair -gtk_target_list_new -gtk_target_list_ref -gtk_target_list_unref -gtk_target_list_add -gtk_target_list_add_table -gtk_target_list_remove -gtk_target_list_find -gtk_selection_owner_set -gtk_selection_add_target -gtk_selection_add_targets -gtk_selection_convert -gtk_selection_data_set -gtk_selection_remove_all -gtk_selection_data_copy -gtk_selection_data_free - -gtk_selection_clear -gtk_selection_incr_event -gtk_selection_notify -gtk_selection_property_notify -gtk_selection_request -
- -
-gtkdnd -Drag and Drop -GtkDestDefaults -GtkTargetFlags - -gtk_drag_dest_set -gtk_drag_dest_set_proxy -gtk_drag_dest_unset -gtk_drag_finish -gtk_drag_get_data -gtk_drag_get_source_widget -gtk_drag_highlight -gtk_drag_unhighlight - -gtk_drag_begin -gtk_drag_set_icon_widget -gtk_drag_set_icon_pixmap -gtk_drag_set_icon_default -gtk_drag_set_default_icon -gtk_drag_source_set -gtk_drag_source_set_icon -gtk_drag_source_unset - -gtk_drag_source_handle_event -gtk_drag_dest_handle_event -
- - -
-gtksignal -Signals -GTK_SIGNAL_OFFSET -GtkSignalMarshal -GtkSignalDestroy -GtkEmissionHook -GtkSignalQuery -GtkSignalRunType -gtk_signal_init -gtk_signal_new -gtk_signal_newv -gtk_signal_lookup -gtk_signal_name -gtk_signal_emit -gtk_signal_emit_by_name -gtk_signal_emitv -gtk_signal_emitv_by_name -gtk_signal_n_emissions -gtk_signal_n_emissions_by_name -gtk_signal_emit_stop -gtk_signal_emit_stop_by_name -gtk_signal_connect -gtk_signal_connect_after -gtk_signal_connect_object -gtk_signal_connect_object_after -gtk_signal_connect_full -gtk_signal_connect_while_alive -gtk_signal_connect_object_while_alive -gtk_signal_disconnect -gtk_signal_disconnect_by_func -gtk_signal_disconnect_by_data -gtk_signal_handler_block -gtk_signal_handler_block_by_func -gtk_signal_handler_block_by_data -gtk_signal_handler_unblock -gtk_signal_handler_unblock_by_func -gtk_signal_handler_unblock_by_data -gtk_signal_handler_pending -gtk_signal_handler_pending_by_func -gtk_signal_handler_pending_by_id -gtk_signal_handlers_destroy -gtk_signal_set_funcs -gtk_signal_query -gtk_signal_add_emission_hook -gtk_signal_add_emission_hook_full -gtk_signal_remove_emission_hook -
- -
-gtkmarshal -Signal Marshallers -gtk_signal_default_marshaller - - -gtk_marshal_BOOL__POINTER_INT_INT_UINT -gtk_marshal_BOOL__POINTER_STRING_STRING_POINTER -gtk_marshal_ENUM__ENUM -gtk_marshal_NONE__BOXED -gtk_marshal_NONE__ENUM -gtk_marshal_NONE__ENUM_FLOAT -gtk_marshal_NONE__ENUM_FLOAT_BOOL -gtk_marshal_NONE__OBJECT -gtk_marshal_NONE__POINTER_STRING_STRING -gtk_marshal_NONE__POINTER_UINT -gtk_marshal_NONE__POINTER_UINT_ENUM -gtk_marshal_NONE__POINTER_POINTER_UINT_UINT -gtk_marshal_NONE__POINTER_INT_INT_POINTER_UINT_UINT -gtk_marshal_NONE__POINTER_UINT_UINT -gtk_marshal_NONE__STRING -gtk_marshal_NONE__STRING_INT_POINTER -gtk_marshal_NONE__UINT -gtk_marshal_NONE__UINT_POINTER_UINT_ENUM_ENUM_POINTER -gtk_marshal_NONE__UINT_POINTER_UINT_UINT_ENUM -gtk_marshal_NONE__UINT_STRING -gtk_marshal_BOOL__NONE -gtk_marshal_BOOL__POINTER -gtk_marshal_BOOL__POINTER_INT_INT -gtk_marshal_BOOL__POINTER_INT_INT_INT -gtk_marshal_BOOL__POINTER_POINTER_INT_INT -gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER -gtk_marshal_INT__INT -gtk_marshal_INT__POINTER -gtk_marshal_INT__POINTER_CHAR_CHAR -gtk_marshal_NONE__BOOL -gtk_marshal_NONE__C_CALLBACK -gtk_marshal_NONE__C_CALLBACK_C_CALLBACK -gtk_marshal_NONE__INT -gtk_marshal_NONE__INT_FLOAT -gtk_marshal_NONE__INT_FLOAT_BOOL -gtk_marshal_NONE__INT_INT -gtk_marshal_NONE__INT_INT_POINTER -gtk_marshal_NONE__INT_POINTER -gtk_marshal_NONE__INT_POINTER_INT_INT_INT -gtk_marshal_NONE__INT_POINTER_INT_INT_INT_POINTER -gtk_marshal_NONE__NONE -gtk_marshal_NONE__POINTER -gtk_marshal_NONE__POINTER_INT -gtk_marshal_NONE__POINTER_INT_INT -gtk_marshal_NONE__POINTER_INT_INT_POINTER_INT_INT -gtk_marshal_NONE__POINTER_INT_POINTER -gtk_marshal_NONE__POINTER_POINTER -gtk_marshal_NONE__POINTER_POINTER_INT_INT -gtk_marshal_NONE__POINTER_POINTER_POINTER -
- -
-gtkarg -Object Properties -GtkArgInfo -gtk_arg_new -gtk_arg_copy -gtk_arg_free -gtk_args_collect -gtk_args_collect_cleanup -gtk_arg_get_info -gtk_arg_type_new_static -gtk_args_query -gtk_arg_name_strip_type -gtk_arg_info_equal -gtk_arg_info_hash -
- -
-gtktypeutils -Types -GtkType -GtkFundamentalType -GTK_TYPE_NUM_BUILTINS -GTK_TYPE_FLAT_FIRST -GTK_TYPE_FLAT_LAST -GTK_TYPE_STRUCTURED_FIRST -GTK_TYPE_STRUCTURED_LAST -GTK_TYPE_FUNDAMENTAL_LAST -GTK_TYPE_FUNDAMENTAL_MAX -GTK_STRUCT_OFFSET -GTK_CHECK_CAST -GTK_CHECK_CLASS_CAST -GTK_CHECK_TYPE -GTK_CHECK_CLASS_TYPE -GTK_TYPE_IDENTIFIER -gtk_identifier_get_type -GTK_TYPE_MAKE -GTK_FUNDAMENTAL_TYPE -GTK_TYPE_SEQNO -GTK_SIGNAL_FUNC -GtkClassInitFunc -GtkObjectInitFunc -GtkSignalFunc -GtkFunction -GtkDestroyNotify -GtkCallbackMarshal -GtkSignalMarshaller -GtkArgGetFunc -GtkArgSetFunc -GtkTypeObject -GtkArg -GTK_VALUE_CHAR -GTK_VALUE_UCHAR -GTK_VALUE_BOOL -GTK_VALUE_INT -GTK_VALUE_UINT -GTK_VALUE_LONG -GTK_VALUE_ULONG -GTK_VALUE_FLOAT -GTK_VALUE_DOUBLE -GTK_VALUE_STRING -GTK_VALUE_ENUM -GTK_VALUE_FLAGS -GTK_VALUE_BOXED -GTK_VALUE_POINTER -GTK_VALUE_OBJECT -GTK_VALUE_SIGNAL -GTK_VALUE_ARGS -GTK_VALUE_CALLBACK -GTK_VALUE_C_CALLBACK -GTK_VALUE_FOREIGN -GTK_RETLOC_CHAR -GTK_RETLOC_UCHAR -GTK_RETLOC_BOOL -GTK_RETLOC_INT -GTK_RETLOC_UINT -GTK_RETLOC_LONG -GTK_RETLOC_ULONG -GTK_RETLOC_FLOAT -GTK_RETLOC_DOUBLE -GTK_RETLOC_STRING -GTK_RETLOC_ENUM -GTK_RETLOC_FLAGS -GTK_RETLOC_BOXED -GTK_RETLOC_POINTER -GTK_RETLOC_OBJECT -GtkTypeInfo -GtkTypeQuery -GtkTypeClass -GtkEnumValue -gtk_type_init -gtk_type_unique -gtk_type_set_chunk_alloc -gtk_type_name -gtk_type_from_name -gtk_type_parent -gtk_type_class -gtk_type_parent_class -gtk_type_children_types -gtk_type_new -gtk_type_free -gtk_type_describe_heritage -gtk_type_describe_tree -gtk_type_is_a -gtk_type_check_object_cast -gtk_type_check_class_cast -gtk_type_register_enum -gtk_type_register_flags -gtk_type_enum_get_values -gtk_type_flags_get_values -gtk_type_enum_find_value -gtk_type_flags_find_value -gtk_type_set_varargs_type -gtk_type_get_varargs_type -gtk_type_query - -GTK_TYPE_ACCEL_FLAGS -GTK_TYPE_CALENDAR_DISPLAY_OPTIONS -GTK_TYPE_CELL_TYPE -GTK_TYPE_CLIST_DRAG_POS -GTK_TYPE_BUTTON_ACTION -GTK_TYPE_CTREE_POS -GTK_TYPE_CTREE_LINE_STYLE -GTK_TYPE_CTREE_EXPANDER_STYLE -GTK_TYPE_CTREE_EXPANSION_TYPE -GTK_TYPE_DEBUG_FLAG -GTK_TYPE_DEST_DEFAULTS -GTK_TYPE_TARGET_FLAGS -GTK_TYPE_ARROW_TYPE -GTK_TYPE_ATTACH_OPTIONS -GTK_TYPE_BUTTON_BOX_STYLE -GTK_TYPE_CURVE_TYPE -GTK_TYPE_DIRECTION_TYPE -GTK_TYPE_JUSTIFICATION -GTK_TYPE_MATCH_TYPE -GTK_TYPE_MENU_DIRECTION_TYPE -GTK_TYPE_MENU_FACTORY_TYPE -GTK_TYPE_METRIC_TYPE -GTK_TYPE_ORIENTATION -GTK_TYPE_CORNER_TYPE -GTK_TYPE_PACK_TYPE -GTK_TYPE_PATH_PRIORITY_TYPE -GTK_TYPE_PATH_TYPE -GTK_TYPE_POLICY_TYPE -GTK_TYPE_POSITION_TYPE -GTK_TYPE_PREVIEW_TYPE -GTK_TYPE_RELIEF_STYLE -GTK_TYPE_RESIZE_MODE -GTK_TYPE_SIGNAL_RUN_TYPE -GTK_TYPE_SCROLL_TYPE -GTK_TYPE_SELECTION_MODE -GTK_TYPE_SHADOW_TYPE -GTK_TYPE_STATE_TYPE -GTK_TYPE_SUBMENU_DIRECTION -GTK_TYPE_SUBMENU_PLACEMENT -GTK_TYPE_TOOLBAR_STYLE -GTK_TYPE_TROUGH_TYPE -GTK_TYPE_UPDATE_TYPE -GTK_TYPE_VISIBILITY -GTK_TYPE_WINDOW_POSITION -GTK_TYPE_WINDOW_TYPE -GTK_TYPE_SORT_TYPE -GTK_TYPE_FONT_METRIC_TYPE -GTK_TYPE_FONT_TYPE -GTK_TYPE_FONT_FILTER_TYPE -GTK_TYPE_OBJECT_FLAGS -GTK_TYPE_ARG_FLAGS -GTK_TYPE_PACKER_OPTIONS -GTK_TYPE_SIDE_TYPE -GTK_TYPE_ANCHOR_TYPE -GTK_TYPE_PRIVATE_FLAGS -GTK_TYPE_PROGRESS_BAR_STYLE -GTK_TYPE_PROGRESS_BAR_ORIENTATION -GTK_TYPE_RC_FLAGS -GTK_TYPE_RC_TOKEN_TYPE -GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY -GTK_TYPE_SPIN_TYPE -GTK_TYPE_TOOLBAR_CHILD_TYPE -GTK_TYPE_TOOLBAR_SPACE_STYLE -GTK_TYPE_TREE_VIEW_MODE -GTK_TYPE_FUNDAMENTAL_TYPE -GTK_TYPE_WIDGET_FLAGS -GTK_TYPE_GDK_WINDOW_TYPE -GTK_TYPE_GDK_WINDOW_CLASS -GTK_TYPE_GDK_IMAGE_TYPE -GTK_TYPE_GDK_VISUAL_TYPE -GTK_TYPE_GDK_FONT_TYPE -GTK_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE -GTK_TYPE_GDK_WINDOW_HINTS -GTK_TYPE_GDK_FUNCTION -GTK_TYPE_GDK_FILL -GTK_TYPE_GDK_FILL_RULE -GTK_TYPE_GDK_LINE_STYLE -GTK_TYPE_GDK_CAP_STYLE -GTK_TYPE_GDK_JOIN_STYLE -GTK_TYPE_GDK_CURSOR_TYPE -GTK_TYPE_GDK_FILTER_RETURN -GTK_TYPE_GDK_VISIBILITY_STATE -GTK_TYPE_GDK_EVENT_TYPE -GTK_TYPE_GDK_EVENT_MASK -GTK_TYPE_GDK_NOTIFY_TYPE -GTK_TYPE_GDK_CROSSING_MODE -GTK_TYPE_GDK_MODIFIER_TYPE -GTK_TYPE_GDK_SUBWINDOW_MODE -GTK_TYPE_GDK_INPUT_CONDITION -GTK_TYPE_GDK_STATUS -GTK_TYPE_GDK_BYTE_ORDER -GTK_TYPE_GDK_GC_VALUES_MASK -GTK_TYPE_GDK_SELECTION -GTK_TYPE_GDK_PROPERTY_STATE -GTK_TYPE_GDK_PROP_MODE -GTK_TYPE_GDK_INPUT_SOURCE -GTK_TYPE_GDK_INPUT_MODE -GTK_TYPE_GDK_AXIS_USE -GTK_TYPE_GDK_TARGET -GTK_TYPE_GDK_SELECTION_TYPE -GTK_TYPE_GDK_EXTENSION_MODE -GTK_TYPE_GDK_IM_STYLE -GTK_TYPE_GDK_IC_ATTRIBUTES_TYPE -GTK_TYPE_GDK_WM_DECORATION -GTK_TYPE_GDK_WM_FUNCTION -GTK_TYPE_GDK_COLOR_CONTEXT_MODE -GTK_TYPE_GDK_OVERLAP_TYPE -GTK_TYPE_GDK_DRAG_ACTION -GTK_TYPE_GDK_DRAG_PROTOCOL -GTK_TYPE_GDK_RGB_DITHER -GTK_TYPE_ACCEL_GROUP -GTK_TYPE_SELECTION_DATA -GTK_TYPE_STYLE -GTK_TYPE_CTREE_NODE -GTK_TYPE_GDK_COLORMAP -GTK_TYPE_GDK_VISUAL -GTK_TYPE_GDK_FONT -GTK_TYPE_GDK_WINDOW -GTK_TYPE_GDK_DRAG_CONTEXT -GTK_TYPE_GDK_EVENT -GTK_TYPE_GDK_COLOR -
- -
-gtkbindings -Bindings -GtkPatternSpec -gtk_pattern_spec_init -gtk_pattern_spec_free_segs -gtk_pattern_match -gtk_pattern_match_string -gtk_pattern_match_simple -GtkBindingSet -GtkBindingEntry -GtkBindingSignal -GtkBindingArg -gtk_binding_set_new -gtk_binding_set_by_class -gtk_binding_set_find -gtk_bindings_activate -gtk_binding_set_activate -gtk_binding_entry_add -gtk_binding_entry_clear -gtk_binding_entry_add_signal -gtk_binding_set_add_path -gtk_binding_entry_remove -gtk_binding_entry_add_signall -gtk_binding_parse_binding -
- -
-gtkenums -Standard Enumerations -GtkAccelFlags -GtkArrowType -GtkAttachOptions -GtkButtonBoxStyle -GtkCornerType -GtkCurveType -GtkDirectionType -GtkJustification -GtkMatchType -GtkMetricType -GtkOrientation -GtkPackType -GtkPathPriorityType -GtkPathType -GtkPolicyType -GtkPositionType -GtkPreviewType -GtkReliefStyle -GtkResizeMode -GtkScrollType -GtkSelectionMode -GtkShadowType -GtkStateType -GtkSubmenuDirection -GtkSubmenuPlacement -GtkToolbarStyle -GtkTroughType -GtkUpdateType -GtkVisibility -GtkWindowPosition -GtkWindowType -GtkSortType -
- -
-gtkprivate -Private Information -gtk/gtkprivate.h -GtkPrivateFlags -GTK_PRIVATE_FLAGS -GTK_WIDGET_USER_STYLE -GTK_WIDGET_REDRAW_PENDING -GTK_CONTAINER_RESIZE_PENDING -GTK_WIDGET_RESIZE_NEEDED -GTK_WIDGET_LEAVE_PENDING -GTK_WIDGET_HAS_SHAPE_MASK -GTK_WIDGET_IN_REPARENT -GTK_WIDGET_IS_OFFSCREEN -GTK_PRIVATE_SET_FLAG -GTK_PRIVATE_UNSET_FLAG - - -GtkMenuCallback -GtkMenuEntry -GtkMenuPath -GtkMenuFactory -GtkMenuFactoryType -gtk_menu_factory_new -gtk_menu_factory_destroy -gtk_menu_factory_add_entries -gtk_menu_factory_add_subfactory -gtk_menu_factory_remove_paths -gtk_menu_factory_remove_entries -gtk_menu_factory_remove_subfactory -gtk_menu_factory_find - -GtkDebugFlag -gtk_debug_flags -GTK_NOTE -
- diff --git a/docs/reference/gtk/gtk.args b/docs/reference/gtk/gtk.args deleted file mode 100644 index 56aaf56253..0000000000 --- a/docs/reference/gtk/gtk.args +++ /dev/null @@ -1,846 +0,0 @@ - -GtkAccelLabel::accel_widget -GtkWidget -rw - - - -GtkAlignment::xalign -gfloat -rw - - - -GtkAlignment::yalign -gfloat -rw - - - -GtkAlignment::xscale -gfloat -rw - - - -GtkAlignment::yscale -gfloat -rw - - - -GtkArrow::arrow_type -GtkArrowType -rw - - - -GtkArrow::shadow_type -GtkShadowType -rw - - - -GtkBox::spacing -gint -rw - - - -GtkBox::homogeneous -gboolean -rw - - - -GtkButton::label -GtkString -rw - - - -GtkButton::relief -GtkReliefStyle -rw - - - -GtkCList::n_columns -guint -rwX - - - -GtkCList::shadow_type -GtkShadowType -rw - - - -GtkCList::selection_mode -GtkSelectionMode -rw - - - -GtkCList::row_height -guint -rw - - - -GtkCList::reorderable -gboolean -rw - - - -GtkCList::titles_active -gboolean -rw - - - -GtkCList::use_drag_icons -gboolean -rw - - - -GtkContainer::border_width -gulong -rw - - - -GtkContainer::resize_mode -GtkResizeMode -rw - - - -GtkContainer::child -GtkWidget -w - - - -GtkCTree::n_columns -guint -rwX - - - -GtkCTree::tree_column -guint -rwX - - - -GtkCTree::indent -guint -rw - - - -GtkCTree::spacing -guint -rw - - - -GtkCTree::show_stub -gboolean -rw - - - -GtkCTree::line_style -GtkCTreeLineStyle -rw - - - -GtkCTree::expander_style -GtkCTreeExpanderStyle -rw - - - -GtkEditable::text_position -gint -rw - - - -GtkEditable::editable -gboolean -rw - - - -GtkEntry::max_length -guint -rw - - - -GtkEntry::visibility -gboolean -rw - - - -GtkFrame::label -GtkString -rw - - - -GtkFrame::label_xalign -gfloat -rw - - - -GtkFrame::label_yalign -gfloat -rw - - - -GtkFrame::shadow -GtkShadowType -rw - - - -GtkHandleBox::shadow -GtkShadowType -rw - - - -GtkHScale::adjustment -GtkAdjustment -rwx - - - -GtkHScrollbar::adjustment -GtkAdjustment -rwx - - - -GtkLabel::label -GtkString -rw - - - -GtkLabel::pattern -GtkString -rw - - - -GtkLabel::justify -GtkJustification -rw - - - -GtkMenuBar::shadow -GtkShadowType -rw - - - -GtkMisc::xalign -gfloat -rw - - - -GtkMisc::yalign -gfloat -rw - - - -GtkMisc::xpad -gint -rw - - - -GtkMisc::ypad -gint -rw - - - -GtkNotebook::page -gint -rw - - - -GtkNotebook::tab_pos -GtkPositionType -rw - - - -GtkNotebook::tab_border -guint -w - - - -GtkNotebook::tab_hborder -guint -rw - - - -GtkNotebook::tab_vborder -guint -rw - - - -GtkNotebook::show_tabs -gboolean -rw - - - -GtkNotebook::show_border -gboolean -rw - - - -GtkNotebook::scrollable -gboolean -rw - - - -GtkNotebook::enable_popup -gboolean -rw - - - -GtkObject::user_data -gpointer -rw - - - -GtkObject::signal -GtkSignal -w - - - -GtkObject::signal_after -GtkSignal -w - - - -GtkObject::object_signal -GtkSignal -w - - - -GtkObject::object_signal_after -GtkSignal -w - - - -GtkPacker::spacing -guint -rw - - - -GtkPacker::default_border_width -guint -rw - - - -GtkPacker::default_pad_x -guint -rw - - - -GtkPacker::default_pad_y -guint -rw - - - -GtkPacker::default_ipad_x -guint -rw - - - -GtkPacker::default_ipad_y -guint -rw - - - -GtkProgress::activity_mode -gboolean -rw - - - -GtkProgress::show_text -gboolean -rw - - - -GtkProgress::text_xalign -gfloat -rw - - - -GtkProgress::text_yalign -gfloat -rw - - - -GtkProgressBar::adjustment -GtkAdjustment -rwx - - - -GtkProgressBar::orientation -GtkProgressBarOrientation -rw - - - -GtkProgressBar::bar_style -GtkProgressBarStyle -rw - - - -GtkProgressBar::activity_step -guint -rw - - - -GtkProgressBar::activity_blocks -guint -rw - - - -GtkProgressBar::discrete_blocks -guint -rw - - - -GtkRadioButton::group -GtkRadioButton -w - - - -GtkRange::update_policy -GtkUpdateType -rw - - - -GtkScale::digits -gint -rw - - - -GtkScale::draw_value -gboolean -rw - - - -GtkScale::value_pos -GtkPositionType -rw - - - -GtkScrolledWindow::hadjustment -GtkAdjustment -rwx - - - -GtkScrolledWindow::vadjustment -GtkAdjustment -rwx - - - -GtkScrolledWindow::hscrollbar_policy -GtkPolicyType -rw - - - -GtkScrolledWindow::vscrollbar_policy -GtkPolicyType -rw - - - -GtkScrolledWindow::window_placement -GtkCornerType -rw - - - -GtkSpinButton::adjustment -GtkAdjustment -rw - - - -GtkSpinButton::climb_rate -gfloat -rw - - - -GtkSpinButton::digits -guint -rw - - - -GtkSpinButton::snap_to_ticks -gboolean -rw - - - -GtkSpinButton::numeric -gboolean -rw - - - -GtkSpinButton::wrap -gboolean -rw - - - -GtkSpinButton::update_policy -GtkSpinButtonUpdatePolicy -rw - - - -GtkSpinButton::shadow_type -GtkShadowType -rw - - - -GtkSpinButton::value -gfloat -rw - - - -GtkTable::n_rows -guint -rw - - - -GtkTable::n_columns -guint -rw - - - -GtkTable::row_spacing -guint -rw - - - -GtkTable::column_spacing -guint -rw - - - -GtkTable::homogeneous -gboolean -rw - - - -GtkText::hadjustment -GtkAdjustment -rwx - - - -GtkText::vadjustment -GtkAdjustment -rwx - - - -GtkText::line_wrap -gboolean -rw - - - -GtkText::word_wrap -gboolean -rw - - - -GtkTipsQuery::emit_always -gboolean -rw - - - -GtkTipsQuery::caller -GtkWidget -rw - - - -GtkTipsQuery::label_inactive -GtkString -rw - - - -GtkTipsQuery::label_no_tip -GtkString -rw - - - -GtkToggleButton::active -gboolean -rw - - - -GtkToggleButton::draw_indicator -gboolean -rw - - - -GtkViewport::hadjustment -GtkAdjustment -rwx - - - -GtkViewport::vadjustment -GtkAdjustment -rwx - - - -GtkViewport::shadow_type -GtkShadowType -rw - - - -GtkVScale::adjustment -GtkAdjustment -rwx - - - -GtkVScrollbar::adjustment -GtkAdjustment -rwx - - - -GtkWidget::name -GtkString -rw - - - -GtkWidget::parent -GtkContainer -rw - - - -GtkWidget::x -gint -rw - - - -GtkWidget::y -gint -rw - - - -GtkWidget::width -gint -rw - - - -GtkWidget::height -gint -rw - - - -GtkWidget::visible -gboolean -rw - - - -GtkWidget::sensitive -gboolean -rw - - - -GtkWidget::app_paintable -gboolean -rw - - - -GtkWidget::can_focus -gboolean -rw - - - -GtkWidget::has_focus -gboolean -rw - - - -GtkWidget::can_default -gboolean -rw - - - -GtkWidget::has_default -gboolean -rw - - - -GtkWidget::receives_default -gboolean -rw - - - -GtkWidget::composite_child -gboolean -rw - - - -GtkWidget::style -GtkStyle -rw - - - -GtkWidget::events -GdkEventMask -rw - - - -GtkWidget::extension_events -GdkEventMask -rw - - - -GtkWindow::type -GtkWindowType -rw - - - -GtkWindow::title -GtkString -rw - - - -GtkWindow::auto_shrink -gboolean -rw - - - -GtkWindow::allow_shrink -gboolean -rw - - - -GtkWindow::allow_grow -gboolean -rw - - - -GtkWindow::modal -gboolean -rw - - - -GtkWindow::window_position -GtkWindowPosition -rw - - diff --git a/docs/reference/gtk/gtk.hierarchy b/docs/reference/gtk/gtk.hierarchy deleted file mode 100644 index dbf000ed21..0000000000 --- a/docs/reference/gtk/gtk.hierarchy +++ /dev/null @@ -1,93 +0,0 @@ -GtkObject - GtkWidget - GtkMisc - GtkLabel - GtkAccelLabel - GtkTipsQuery - GtkArrow - GtkImage - GtkPixmap - GtkContainer - GtkBin - GtkAlignment - GtkFrame - GtkAspectFrame - GtkButton - GtkToggleButton - GtkCheckButton - GtkRadioButton - GtkOptionMenu - GtkItem - GtkMenuItem - GtkCheckMenuItem - GtkRadioMenuItem - GtkTearoffMenuItem - GtkListItem - GtkTreeItem - GtkWindow - GtkColorSelectionDialog - GtkDialog - GtkInputDialog - GtkFileSelection - GtkFontSelectionDialog - GtkPlug - GtkEventBox - GtkHandleBox - GtkScrolledWindow - GtkViewport - GtkBox - GtkButtonBox - GtkHButtonBox - GtkVButtonBox - GtkVBox - GtkColorSelection - GtkGammaCurve - GtkHBox - GtkCombo - GtkStatusbar - GtkCList - GtkCTree - GtkFixed - GtkNotebook - GtkFontSelection - GtkPaned - GtkHPaned - GtkVPaned - GtkLayout - GtkList - GtkMenuShell - GtkMenu - GtkMenuBar - GtkPacker - GtkSocket - GtkTable - GtkToolbar - GtkTree - GtkCalendar - GtkDrawingArea - GtkCurve - GtkEditable - GtkEntry - GtkSpinButton - GtkText - GtkRuler - GtkHRuler - GtkVRuler - GtkRange - GtkScale - GtkHScale - GtkVScale - GtkScrollbar - GtkHScrollbar - GtkVScrollbar - GtkSeparator - GtkHSeparator - GtkVSeparator - GtkInvisible - GtkPreview - GtkProgress - GtkProgressBar - GtkData - GtkAdjustment - GtkTooltips - GtkItemFactory diff --git a/docs/reference/gtk/gtk.signals b/docs/reference/gtk/gtk.signals deleted file mode 100644 index 336b40d731..0000000000 --- a/docs/reference/gtk/gtk.signals +++ /dev/null @@ -1,1097 +0,0 @@ - -GtkAdjustment::changed -void -GtkAdjustment *adjustment - - - -GtkAdjustment::value-changed -void -GtkAdjustment *adjustment - - - -GtkButton::pressed -void -GtkButton *button - - - -GtkButton::released -void -GtkButton *button - - - -GtkButton::clicked -void -GtkButton *button - - - -GtkButton::enter -void -GtkButton *button - - - -GtkButton::leave -void -GtkButton *button - - - -GtkCalendar::month-changed -void -GtkCalendar *calendar - - - -GtkCalendar::day-selected -void -GtkCalendar *calendar - - - -GtkCalendar::day-selected-double-click -void -GtkCalendar *calendar - - - -GtkCalendar::prev-month -void -GtkCalendar *calendar - - - -GtkCalendar::next-month -void -GtkCalendar *calendar - - - -GtkCalendar::prev-year -void -GtkCalendar *calendar - - - -GtkCalendar::next-year -void -GtkCalendar *calendar - - - -GtkCheckMenuItem::toggled -void -GtkCheckMenuItem *checkmenuitem - - - -GtkCList::select-row -void -GtkCList *clist -gint row -gint column -GdkEventButton *event - - - -GtkCList::unselect-row -void -GtkCList *clist -gint row -gint column -GdkEventButton *event - - - -GtkCList::row-move -void -GtkCList *clist -gint arg1 -gint arg2 - - - -GtkCList::click-column -void -GtkCList *clist -gint column - - - -GtkCList::resize-column -void -GtkCList *clist -gint column -gint width - - - -GtkCList::toggle-focus-row -void -GtkCList *clist - - - -GtkCList::select-all -void -GtkCList *clist - - - -GtkCList::unselect-all -void -GtkCList *clist - - - -GtkCList::undo-selection -void -GtkCList *clist - - - -GtkCList::start-selection -void -GtkCList *clist - - - -GtkCList::end-selection -void -GtkCList *clist - - - -GtkCList::toggle-add-mode -void -GtkCList *clist - - - -GtkCList::extend-selection -void -GtkCList *clist -GtkScrollType scroll_type -gfloat position -gboolean auto_start_selection - - - -GtkCList::scroll-vertical -void -GtkCList *clist -GtkScrollType scroll_type -gfloat position - - - -GtkCList::scroll-horizontal -void -GtkCList *clist -GtkScrollType scroll_type -gfloat position - - - -GtkCList::abort-column-resize -void -GtkCList *clist - - - -GtkColorSelection::color-changed -void -GtkColorSelection *colorselection - - - -GtkContainer::add -void -GtkContainer *container -GtkWidget *widget - - - -GtkContainer::remove -void -GtkContainer *container -GtkWidget *widget - - - -GtkContainer::check-resize -void -GtkContainer *container - - - -GtkContainer::focus -GtkDirectionType -GtkContainer *container -GtkDirectionType direction - - - -GtkContainer::set-focus-child -void -GtkContainer *container -GtkWidget *widget - - - -GtkCTree::tree-select-row -void -GtkCTree *ctree -GList *node -gint column - - - -GtkCTree::tree-unselect-row -void -GtkCTree *ctree -GList *node -gint column - - - -GtkCTree::tree-expand -void -GtkCTree *ctree -GList *node - - - -GtkCTree::tree-collapse -void -GtkCTree *ctree -GList *node - - - -GtkCTree::tree-move -void -GtkCTree *ctree -GList *node -GList *new_parent -GList *new_sibling - - - -GtkCTree::change-focus-row-expansion -void -GtkCTree *ctree -GtkCTreeExpansionType expansion - - - -GtkCurve::curve-type-changed -void -GtkCurve *curve - - - -GtkData::disconnect -void -GtkData *data - - - -GtkEditable::changed -void -GtkEditable *editable - - - -GtkEditable::insert-text -void -GtkEditable *editable -gchar *new_text -gint new_text_length -gint *position - - - -GtkEditable::delete-text -void -GtkEditable *editable -gint start_pos -gint end_pos - - - -GtkEditable::activate -void -GtkEditable *editable - - - -GtkEditable::set-editable -void -GtkEditable *editable -gboolean is_editable - - - -GtkEditable::move-cursor -void -GtkEditable *editable -gint x -gint y - - - -GtkEditable::move-word -void -GtkEditable *editable -gint num_words - - - -GtkEditable::move-page -void -GtkEditable *editable -gint x -gint y - - - -GtkEditable::move-to-row -void -GtkEditable *editable -gint row - - - -GtkEditable::move-to-column -void -GtkEditable *editable -gint column - - - -GtkEditable::kill-char -void -GtkEditable *editable -gint direction - - - -GtkEditable::kill-word -void -GtkEditable *editable -gint direction - - - -GtkEditable::kill-line -void -GtkEditable *editable -gint direction - - - -GtkEditable::cut-clipboard -void -GtkEditable *editable - - - -GtkEditable::copy-clipboard -void -GtkEditable *editable - - - -GtkEditable::paste-clipboard -void -GtkEditable *editable - - - -GtkHandleBox::child-attached -void -GtkHandleBox *handlebox -GtkWidget *widget - - - -GtkHandleBox::child-detached -void -GtkHandleBox *handlebox -GtkWidget *widget - - - -GtkInputDialog::enable-device -void -GtkInputDialog *inputdialog -gint deviceid - - - -GtkInputDialog::disable-device -void -GtkInputDialog *inputdialog -gint deviceid - - - -GtkItem::select -void -GtkItem *item - - - -GtkItem::deselect -void -GtkItem *item - - - -GtkItem::toggle -void -GtkItem *item - - - -GtkList::selection-changed -void -GtkList *list - - - -GtkList::select-child -void -GtkList *list -GtkWidget *widget - - - -GtkList::unselect-child -void -GtkList *list -GtkWidget *widget - - - -GtkListItem::toggle-focus-row -void -GtkListItem *listitem - - - -GtkListItem::select-all -void -GtkListItem *listitem - - - -GtkListItem::unselect-all -void -GtkListItem *listitem - - - -GtkListItem::undo-selection -void -GtkListItem *listitem - - - -GtkListItem::start-selection -void -GtkListItem *listitem - - - -GtkListItem::end-selection -void -GtkListItem *listitem - - - -GtkListItem::toggle-add-mode -void -GtkListItem *listitem - - - -GtkListItem::extend-selection -void -GtkListItem *listitem -GtkScrollType scroll_type -gfloat position -gboolean auto_start_selection - - - -GtkListItem::scroll-vertical -void -GtkListItem *listitem -GtkScrollType scroll_type -gfloat position - - - -GtkListItem::scroll-horizontal -void -GtkListItem *listitem -GtkScrollType scroll_type -gfloat position - - - -GtkMenuItem::activate -void -GtkMenuItem *menuitem - - - -GtkMenuItem::activate-item -void -GtkMenuItem *menuitem - - - -GtkMenuShell::deactivate -void -GtkMenuShell *menushell - - - -GtkMenuShell::selection-done -void -GtkMenuShell *menushell - - - -GtkMenuShell::move-current -void -GtkMenuShell *menushell -GtkMenuDirectionType direction - - - -GtkMenuShell::activate-current -void -GtkMenuShell *menushell -gboolean force_hide - - - -GtkMenuShell::cancel -void -GtkMenuShell *menushell - - - -GtkNotebook::switch-page -void -GtkNotebook *notebook -GtkNotebookPage *page -gint page_num - - - -GtkObject::destroy -void -GtkObject *object - - - -GtkStatusbar::text-pushed -void -GtkStatusbar *statusbar -guint context_id -gchar *text - - - -GtkStatusbar::text-popped -void -GtkStatusbar *statusbar -guint context_id -gchar *text - - - -GtkTipsQuery::start-query -void -GtkTipsQuery *tipsquery - - - -GtkTipsQuery::stop-query -void -GtkTipsQuery *tipsquery - - - -GtkTipsQuery::widget-entered -void -GtkTipsQuery *tipsquery -GtkWidget *widget -gchar *tip_text -gchar *tip_private - - - -GtkTipsQuery::widget-selected -gboolean -GtkTipsQuery *tipsquery -GtkWidget *widget -gchar *tip_text -gchar *tip_private -GdkEventButton *event - - - -GtkToggleButton::toggled -void -GtkToggleButton *togglebutton - - - -GtkToolbar::orientation-changed -void -GtkToolbar *toolbar -GtkOrientation orientation - - - -GtkToolbar::style-changed -void -GtkToolbar *toolbar -GtkToolbarStyle style - - - -GtkTree::selection-changed -void -GtkTree *tree - - - -GtkTree::select-child -void -GtkTree *tree -GtkWidget *widget - - - -GtkTree::unselect-child -void -GtkTree *tree -GtkWidget *widget - - - -GtkTreeItem::collapse -void -GtkTreeItem *treeitem - - - -GtkTreeItem::expand -void -GtkTreeItem *treeitem - - - -GtkWidget::show -void -GtkWidget *widget - - - -GtkWidget::hide -void -GtkWidget *widget - - - -GtkWidget::map -void -GtkWidget *widget - - - -GtkWidget::unmap -void -GtkWidget *widget - - - -GtkWidget::realize -void -GtkWidget *widget - - - -GtkWidget::unrealize -void -GtkWidget *widget - - - -GtkWidget::draw -void -GtkWidget *widget -GdkRectangle *area - - - -GtkWidget::draw-focus -void -GtkWidget *widget - - - -GtkWidget::draw-default -void -GtkWidget *widget - - - -GtkWidget::size-request -void -GtkWidget *widget -GtkRequisition *requisition - - - -GtkWidget::size-allocate -void -GtkWidget *widget -GtkAllocation *allocation - - - -GtkWidget::state-changed -void -GtkWidget *widget -GtkStateType state - - - -GtkWidget::parent-set -void -GtkWidget *widget -GtkObject *old_parent - - - -GtkWidget::style-set -void -GtkWidget *widget -GtkStyle *previous_style - - - -GtkWidget::add-accelerator -void -GtkWidget *widget -guint accel_signal_id -GtkAccelGroup *accel_group -guint accel_key -GdkModifierType accel_mods -GtkAccelFlags accel_flags - - - -GtkWidget::remove-accelerator -void -GtkWidget *widget -GtkAccelGroup *accel_group -guint accel_key -GdkModifierType accel_mods - - - -GtkWidget::grab-focus -void -GtkWidget *widget - - - -GtkWidget::event -gboolean -GtkWidget *widget -GdkEvent *event - - - -GtkWidget::button-press-event -gboolean -GtkWidget *widget -GdkEventButton *event - - - -GtkWidget::button-release-event -gboolean -GtkWidget *widget -GdkEventButton *event - - - -GtkWidget::motion-notify-event -gboolean -GtkWidget *widget -GdkEventMotion *event - - - -GtkWidget::delete-event -gboolean -GtkWidget *widget -GdkEvent *event - - - -GtkWidget::destroy-event -gboolean -GtkWidget *widget -GdkEvent *event - - - -GtkWidget::expose-event -gboolean -GtkWidget *widget -GdkEventExpose *event - - - -GtkWidget::key-press-event -gboolean -GtkWidget *widget -GdkEventKey *event - - - -GtkWidget::key-release-event -gboolean -GtkWidget *widget -GdkEventKey *event - - - -GtkWidget::enter-notify-event -gboolean -GtkWidget *widget -GdkEventCrossing *event - - - -GtkWidget::leave-notify-event -gboolean -GtkWidget *widget -GdkEventCrossing *event - - - -GtkWidget::configure-event -gboolean -GtkWidget *widget -GdkEventConfigure *event - - - -GtkWidget::focus-in-event -gboolean -GtkWidget *widget -GdkEventFocus *event - - - -GtkWidget::focus-out-event -gboolean -GtkWidget *widget -GdkEventFocus *event - - - -GtkWidget::map-event -gboolean -GtkWidget *widget -GdkEvent *event - - - -GtkWidget::unmap-event -gboolean -GtkWidget *widget -GdkEvent *event - - - -GtkWidget::property-notify-event -gboolean -GtkWidget *widget -GdkEventProperty *event - - - -GtkWidget::selection-clear-event -gboolean -GtkWidget *widget -GdkEventSelection *event - - - -GtkWidget::selection-request-event -gboolean -GtkWidget *widget -GdkEventSelection *event - - - -GtkWidget::selection-notify-event -gboolean -GtkWidget *widget -GdkEventSelection *event - - - -GtkWidget::selection-get -void -GtkWidget *widget -GtkSelectionData *data -guint info -guint time - - - -GtkWidget::selection-received -void -GtkWidget *widget -GtkSelectionData *data -guint time - - - -GtkWidget::proximity-in-event -gboolean -GtkWidget *widget -GdkEventProximity *event - - - -GtkWidget::proximity-out-event -gboolean -GtkWidget *widget -GdkEventProximity *event - - - -GtkWidget::drag-begin -void -GtkWidget *widget -GdkDragContext *drag_context - - - -GtkWidget::drag-end -void -GtkWidget *widget -GdkDragContext *drag_context - - - -GtkWidget::drag-data-delete -void -GtkWidget *widget -GdkDragContext *drag_context - - - -GtkWidget::drag-leave -void -GtkWidget *widget -GdkDragContext *drag_context -guint time - - - -GtkWidget::drag-motion -gboolean -GtkWidget *widget -GdkDragContext *drag_context -gint x -gint y -guint time - - - -GtkWidget::drag-drop -gboolean -GtkWidget *widget -GdkDragContext *drag_context -gint x -gint y -guint time - - - -GtkWidget::drag-data-get -void -GtkWidget *widget -GdkDragContext *drag_context -GtkSelectionData *data -guint info -guint time - - - -GtkWidget::drag-data-received -void -GtkWidget *widget -GdkDragContext *drag_context -gint x -gint y -GtkSelectionData *data -guint info -guint time - - - -GtkWidget::client-event -gboolean -GtkWidget *widget -GdkEventClient *event - - - -GtkWidget::no-expose-event -gboolean -GtkWidget *widget -GdkEventNoExpose *event - - - -GtkWidget::visibility-notify-event -gboolean -GtkWidget *widget -GdkEvent *event - - - -GtkWidget::debug-msg -void -GtkWidget *widget -gchar *message - - - -GtkWindow::set-focus -void -GtkWindow *window -GtkWidget *widget - - diff --git a/docs/reference/gtk/gtk.types b/docs/reference/gtk/gtk.types deleted file mode 100644 index 1bc77ae576..0000000000 --- a/docs/reference/gtk/gtk.types +++ /dev/null @@ -1,96 +0,0 @@ -#include - -gtk_accel_label_get_type -gtk_adjustment_get_type -gtk_alignment_get_type -gtk_arrow_get_type -gtk_aspect_frame_get_type -gtk_bin_get_type -gtk_box_get_type -gtk_button_get_type -gtk_button_box_get_type -gtk_calendar_get_type -gtk_check_button_get_type -gtk_check_menu_item_get_type -gtk_clist_get_type -gtk_color_selection_get_type -gtk_color_selection_dialog_get_type -gtk_combo_get_type -gtk_container_get_type -gtk_ctree_get_type -gtk_curve_get_type -gtk_data_get_type -gtk_dialog_get_type -gtk_drawing_area_get_type -gtk_editable_get_type -gtk_entry_get_type -gtk_event_box_get_type -gtk_file_selection_get_type -gtk_fixed_get_type -gtk_font_selection_get_type -gtk_font_selection_dialog_get_type -gtk_frame_get_type -gtk_gamma_curve_get_type -gtk_handle_box_get_type -gtk_hbox_get_type -gtk_hbutton_box_get_type -gtk_hpaned_get_type -gtk_hruler_get_type -gtk_hscale_get_type -gtk_hscrollbar_get_type -gtk_hseparator_get_type -gtk_identifier_get_type -gtk_image_get_type -gtk_input_dialog_get_type -gtk_invisible_get_type -gtk_item_get_type -gtk_item_factory_get_type -gtk_label_get_type -gtk_layout_get_type -gtk_list_get_type -gtk_list_item_get_type -gtk_menu_get_type -gtk_menu_bar_get_type -gtk_menu_item_get_type -gtk_menu_shell_get_type -gtk_misc_get_type -gtk_notebook_get_type -gtk_object_get_type -gtk_option_menu_get_type -gtk_packer_get_type -gtk_paned_get_type -gtk_pixmap_get_type -gtk_plug_get_type -gtk_preview_get_type -gtk_progress_get_type -gtk_progress_bar_get_type -gtk_radio_button_get_type -gtk_radio_menu_item_get_type -gtk_range_get_type -gtk_ruler_get_type -gtk_scale_get_type -gtk_scrollbar_get_type -gtk_scrolled_window_get_type -gtk_separator_get_type -gtk_socket_get_type -gtk_spin_button_get_type -gtk_statusbar_get_type -gtk_table_get_type -gtk_tearoff_menu_item_get_type -gtk_text_get_type -gtk_tips_query_get_type -gtk_toggle_button_get_type -gtk_toolbar_get_type -gtk_tooltips_get_type -gtk_tree_get_type -gtk_tree_item_get_type -gtk_vbox_get_type -gtk_vbutton_box_get_type -gtk_viewport_get_type -gtk_vpaned_get_type -gtk_vruler_get_type -gtk_vscale_get_type -gtk_vscrollbar_get_type -gtk_vseparator_get_type -gtk_widget_get_type -gtk_window_get_type diff --git a/docs/reference/gtk/objects_grouped.sgml b/docs/reference/gtk/objects_grouped.sgml deleted file mode 100644 index 3b546dc9c3..0000000000 --- a/docs/reference/gtk/objects_grouped.sgml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - -Windows & Dialogs - GtkWindow - GtkDialog - GtkColorSelectionDialog - GtkFileSelection - GtkFontSelectionDialog - GtkInputDialog - -Containers - GtkHBox - GtkVBox - GtkTable - GtkToolbar - GtkHandleBox - GtkNotebook - GtkFrame - GtkAspectFrame - GtkFixed - GtkPacker - GtkLayout - GtkScrolledWindow - GtkViewport - GtkEventBox - GtkAlignment - GtkHButtonBox - GtkVButtonBox - GtkHPaned - GtkVPaned - - -Labels & Buttons - GtkLabel - GtkAccelLabel - GtkButton - GtkCheckButton - GtkToggleButton - GtkRadioButton - -Data Entry Widgets - GtkEntry - GtkText - GtkSpinButton - GtkOptionMenu - GtkCombo - GtkHScale - GtkVScale - -Lists & Trees - GtkCList - GtkCTree - GtkList - GtkListItem - GtkTree - GtkTreeItem - -Tooltips - GtkTooltips - GtkTipsQuery - - -Menus & Menu Bars - GtkMenuBar - GtkMenu - GtkMenuItem - GtkCheckMenuItem - GtkRadioMenuItem - GtkTearoffMenuItem - -Graphical Widgets - GtkDrawingArea - GtkImage - GtkPixmap - GtkPreview - GtkCurve - GtkGammaCurve - -Misc. Widgets - GtkArrow - GtkCalendar - GtkProgressBar - GtkStatusbar - GtkHRuler - GtkVRuler - GtkHScrollbar - GtkVScrollbar - GtkHSeparator - GtkVSeparator - GtkColorSelection - GtkFontSelection - - -Abstract Base Classes - GtkWidget - GtkObject - GtkContainer - GtkBin - GtkBox - GtkButtonBox - GtkData - GtkEditable - GtkItem - GtkMenuShell - GtkMisc - GtkPaned - GtkProgress - GtkRange - GtkRuler - GtkScale - GtkScrollbar - GtkSeparator - -Integrating with other X Applications - GtkPlug - GtkSocket - -Misc. Objects - GtkAdjustment - GtkItemFactory - GtkInvisible - - - diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml deleted file mode 100644 index 8cd00ccc29..0000000000 --- a/docs/reference/gtk/tmpl/gtk-unused.sgml +++ /dev/null @@ -1,629 +0,0 @@ - -Menu Factory - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@path: -@type: -@accel_group: -@widget: -@subfactories: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@factory: -@path: -@Returns: - - - - - - - - - - - - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - - - - - - -@GTK_MENU_FACTORY_MENU: -@GTK_MENU_FACTORY_MENU_BAR: -@GTK_MENU_FACTORY_OPTION_MENU: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - - - - - - -@factory: -@entries: -@nentries: - - - - - - -@path: -@widget: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - - - -Determines the way that the the preview widget behaves -when the size it is allocated is larger than the requested -size. See gtk_preview_set_expand(). - - - - - - - - - - - - - - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - - - - - - - - - - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - - - - - - -@factory: -@paths: -@npaths: - - - - - - -@factory: - - - - - - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@type: -@action: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - - - - - - -@GTK_DEBUG_OBJECTS: -@GTK_DEBUG_MISC: -@GTK_DEBUG_SIGNALS: -@GTK_DEBUG_DND: -@GTK_DEBUG_PLUGSOCKET: - - - -Determines the snap edge of a handlebox. The snap edge is -the edge of the detached child that must be aligned -with the corresponding edge of the "ghost" left -behind when the child was detached to reattach -the torn-off window. See gtk_handle_box_set_snap_edge(). - - - - - -Determines the side of the handlebox where the handle is drawn. - - - - - - - - - - - - - - - - - - - - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@type: -@Returns: - - - - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@factory: -@entries: -@nentries: - - - - - - - - - - - - -@widget: -@user_data: - - - - - - - - - - - - -@factory: -@subfactory: -@path: - - -Debugging - - - - - - - -@ruler: the gtkruler - - - - - - - - - - - - - - - - - - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - -@factory: -@subfactory: -@path: - - - - - - -@path: -@accelerator: -@callback: -@callback_data: -@widget: - - - - - - -@ruler: the gtkruler - - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkaccelgroup.sgml b/docs/reference/gtk/tmpl/gtkaccelgroup.sgml deleted file mode 100644 index ccf0ce427a..0000000000 --- a/docs/reference/gtk/tmpl/gtkaccelgroup.sgml +++ /dev/null @@ -1,314 +0,0 @@ - -Keyboard Accelerators - - - - - - - - - - - - - - - - - - - -@ref_count: -@lock_count: -@modifier_mask: -@attach_objects: - - - - - - -@accel_group: -@accelerator_key: -@accelerator_mods: -@accel_flags: -@object: -@signal_id: - - - - - - -@Returns: - - - - - - - -@Returns: - - - - - - - -@accel_group: -@Returns: - - - - - - - -@accel_group: - - - - - - - -@accel_group: -@accel_key: -@accel_mods: -@Returns: - - - - - - - -@object: -@accel_key: -@accel_mods: -@Returns: - - - - - - - -@accel_group: -@object: - - - - - - - -@accel_group: -@object: - - - - - - - -@accel_group: - - - - - - - -@accel_group: - - - - - - - -@accel_group: -@accel_key: -@accel_mods: -@Returns: - - - - - - - -@accel_group: -@accel_key: -@accel_mods: - - - - - - - -@accel_group: -@accel_key: -@accel_mods: - - - - - - - -@accel_group: -@accel_key: -@accel_mods: -@accel_flags: -@object: -@accel_signal: - - - - - - - -@accel_group: -@accel_key: -@accel_mods: -@object: - - - - - - - -@object: -@accel_signal_id: -@accel_group: -@accel_key: -@accel_mods: -@accel_flags: - - - - - - - -@object: -@accel_group: -@accel_key: -@accel_mods: - - - - - - - -@class_type: -@signal_flags: -@handler_offset: -@Returns: - - - - - - - -@class_type: -@signal_flags: -@handler_offset: -@Returns: - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - -@object: -@func: -@func_data: -@args: - - - - - - - -@object: -@Returns: - - - - - - - -@object: -@Returns: - - - - - - - -@keyval: -@modifiers: -@Returns: - - - - - - - -@accelerator: -@accelerator_key: -@accelerator_mods: - - - - - - - -@accelerator_key: -@accelerator_mods: -@Returns: - - - - - - - -@default_mod_mask: - - - - - - - -@Returns: - - diff --git a/docs/reference/gtk/tmpl/gtkaccellabel.sgml b/docs/reference/gtk/tmpl/gtkaccellabel.sgml deleted file mode 100644 index 7676b5c705..0000000000 --- a/docs/reference/gtk/tmpl/gtkaccellabel.sgml +++ /dev/null @@ -1,132 +0,0 @@ - -GtkAccelLabel - - -a label which displays an accelerator key on the right of the text. - - - -The #GtkAccelLabel widget is a subclass of #GtkLabel that also displays an -accelerator key on the right of the label text, e.g. 'Ctl+S'. -It is commonly used in menus to show the keyboard short-cuts for commands. - - -The accelerator key to display is not set explicitly. -Instead, the #GtkAccelLabel displays the accelerators which have been added to -a particular widget. This widget is set by calling -gtk_accel_label_set_accel_widget(). - - -For example, a #GtkMenuItem widget may have an accelerator added to emit the -"activate" signal when the 'Ctl+S' key combination is pressed. -A #GtkAccelLabel is created and added to the #GtkMenuItem, and -gtk_accel_label_set_accel_widget() is called with the #GtkMenuItem as the -second argument. The #GtkAccelLabel will now display 'Ctl+S' after its label. - - -Note that creating a #GtkMenuItem with gtk_menu_item_new_with_label() (or -one of the similar functions for #GtkCheckMenuItem and #GtkRadioMenuItem) -automatically adds a #GtkAccelLabel to the #GtkMenuItem and calls -gtk_accel_label_set_accel_widget() to set it up for you. - - -A #GtkAccelLabel will only display accelerators which have GTK_ACCEL_VISIBLE -set (see #GtkAccelFlags). -A #GtkAccelLabel can display multiple accelerators and even signal names, -though it is almost always used to display just one accelerator key. - - - -Creating a simple menu item with an accelerator key. - - GtkWidget *save_item; - GtkAccelGroup *accel_group; - - /* Create a #GtkAccelGroup and add it to the window. */ - accel_group = gtk_accel_group_new (); - gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); - - /* Create the menu item using the convenience function. */ - save_item = gtk_menu_item_new_with_label ("Save"); - gtk_widget_show (save_item); - gtk_container_add (GTK_CONTAINER (menu), save_item); - - /* Now add the accelerator to the #GtkMenuItem. Note that since we called - gtk_menu_item_new_with_label() to create the #GtkMenuItem the - #GtkAccelLabel is automatically set up to display the #GtkMenuItem - accelerators. We just need to make sure we use GTK_ACCEL_VISIBLE here. */ - gtk_widget_add_accelerator (save_item, "activate", accel_group, - GDK_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); - - - - - - - - -Keyboard Accelerators - -installing and using keyboard short-cuts. - - - -#GtkItemFactory -an easier way to create menus. - - - - - - - -The #GtkAccelLabel-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkAccelLabel. - - -@string: the label string. -@Returns: a new #GtkAccelLabel. - - - - -Sets the widget whose accelerators are to be shown. - - -@accel_label: a #GtkAccelLabel. -@accel_widget: the widget whose accelerators are to be displayed. - - - - -Returns the width needed to display the accelerator key(s). -This is used by menus to align all of the #GtkMenuItem widgets, and shouldn't -be needed by applications. - - -@accel_label: a #GtkAccelLabel. -@Returns: - - - - -Recreates the string representing the accelerator keys. -This should not be needed since the string is automatically updated whenever -accelerators are added or removed from the associated widget. - - -@accel_label: a #GtkAccelLabel. -@Returns: always returns FALSE. - - - - -The widget whose accelerators are to be shown by the #GtkAccelLabel. - - diff --git a/docs/reference/gtk/tmpl/gtkadjustment.sgml b/docs/reference/gtk/tmpl/gtkadjustment.sgml deleted file mode 100644 index bef7149651..0000000000 --- a/docs/reference/gtk/tmpl/gtkadjustment.sgml +++ /dev/null @@ -1,154 +0,0 @@ - -GtkAdjustment - - -a #GtkObject representing an adjustable bounded value. - - - -The #GtkAdjustment object represents a value which has an associated lower -and upper bound, together with step and page increments, and a page size. -It is used within several GTK+ widgets, including -#GtkSpinButton, #GtkViewport, and #GtkRange (which is a base class for -#GtkHScrollbar, #GtkVScrollbar, #GtkHScale, and #GtkVScale). - - -The #GtkAdjustment object does not update the value itself. Instead -it is left up to the owner of the #GtkAdjustment to control the value. - - -The owner of the #GtkAdjustment typically calls the -gtk_adjustment_value_changed() and gtk_adjustment_changed() functions -after changing the value and its bounds. This results in the emission of the -"value_changed" or "changed" signal respectively. - - - - - - - - - -The #GtkAdjustment-struct struct contains the following fields. - - - - - - -#gfloat lower; -the minimum value. - - - -#gfloat upper; -the maximum value. - - - -#gfloat value; -the current value. - - - -#gfloat step_increment; -the increment to use to make minor changes to the value. -In a #GtkScrollbar this increment is used when the mouse is clicked on the -arrows at the top and bottom of the scrollbar, to scroll by a small amount. - - - - -#gfloat page_increment; -the increment to use to make major changes to the value. -In a #GtkScrollbar this increment is used when the mouse is clicked in the -trough, to scroll by a large amount. - - - - -#gfloat page_size; -the page size. -In a #GtkScrollbar this is the size of the area which is currently visible. - - - - - - - - - - -Creates a new #GtkAdjustment. - - -@value: the initial value. -@lower: the minimum value. -@upper: the maximum value. -@step_increment: the step increment. -@page_increment: the page increment. -@page_size: the page size. -@Returns: a new #GtkAdjustment. - - - - -Sets the #GtkAdjustment value. - - -@adjustment: a #GtkAdjustment. -@value: the new value. - - - - -Updates the #GtkAdjustment @value to ensure that the range between @lower -and @upper is in the current page (i.e. between @value and @value + -@page_size). -If the range is larger than the page size, then only the start of it will -be in the current page. -A "changed" signal will be emitted if the value is changed. - - -@adjustment: a #GtkAdjustment. -@lower: the lower value. -@upper: the upper value. - - - - -Emits a "changed" signal from the #GtkAdjustment. -This is typically called by the owner of the #GtkAdjustment after it has -changed any of the #GtkAdjustment fields other than the value. - - -@adjustment: - - - - -Emits a "value_changed" signal from the #GtkAdjusmtent. -This is typically called by the owner of the #GtkAdjustment after it has -changed the #GtkAdjustment value field. - - -@adjustment: - - - - -Emitted when one or more of the #GtkAdjustment fields have been changed, -other than the value field. - - -@adjustment: the object which received the signal. - - - -Emitted when the #GtkAdjustment value field has been changed. - - -@adjustment: the object which received the signal. - diff --git a/docs/reference/gtk/tmpl/gtkalignment.sgml b/docs/reference/gtk/tmpl/gtkalignment.sgml deleted file mode 100644 index 39338e9bb0..0000000000 --- a/docs/reference/gtk/tmpl/gtkalignment.sgml +++ /dev/null @@ -1,99 +0,0 @@ - -GtkAlignment - - -a widget which controls the alignment and size of its child. - - - -The #GtkAlignment widget controls the alignment and size of its child widget. -It has four settings: xscale, yscale, xalign, and yalign. - - -The scale settings are used to specify how much the child widget should -expand to fill the space allocated to the #GtkAlignment. -The values can range from 0 (meaning the child doesn't expand at all) to -1 (meaning the child expands to fill all of the available space). - - -The align settings are used to place the child widget within the available -area. The values range from 0 (top or left) to 1 (bottom or right). -Of course, if the scale settings are both set to 1, the alignment settings -have no effect. - - - - - - - - - -The #GtkAlignment-struct struct contains private data only, and should -be accessed using the functions below. - - - - - -Creates a new #GtkAlignment. - - -@xalign: the horizontal alignment of the child widget, from 0 (left) to 1 -(right). -@yalign: the vertical alignment of the child widget, from 0 (top) to 1 -(bottom). -@xscale: the amount that the child widget expands horizontally to fill up -unused space, from 0 to 1. -A value of 0 indicates that the child widget should never expand. -A value of 1 indicates that the child widget will expand to fill all of the -space allocated for the #GtkAlignment. -@yscale: the amount that the child widget expands vertically to fill up -unused space, from 0 to 1. The values are similar to @xscale. -@Returns: the new #GtkAlignment. - - - - -Sets the #GtkAlignment values. - - -@alignment: a #GtkAlignment. -@xalign: the horizontal alignment of the child widget, from 0 (left) to 1 -(right). -@yalign: the vertical alignment of the child widget, from 0 (top) to 1 -(bottom). -@xscale: the amount that the child widget expands horizontally to fill up -unused space, from 0 to 1. -A value of 0 indicates that the child widget should never expand. -A value of 1 indicates that the child widget will expand to fill all of the -space allocated for the #GtkAlignment. -@yscale: the amount that the child widget expands vertically to fill up -unused space, from 0 to 1. The values are similar to @xscale. - - - - -the horizontal alignment of the child widget, from 0 (left) to 1 (right). - - - - -the vertical alignment of the child widget, from 0 (top) to 1 (bottom). - - - - -the amount that the child widget expands horizontally to fill up -unused space, from 0 to 1. -A value of 0 indicates that the child widget should never expand. -A value of 1 indicates that the child widget will expand to fill all of the -space allocated for the #GtkAlignment. - - - - -the amount that the child widget expands vertically to fill up -unused space, from 0 to 1. The values are similar to @xscale. - - diff --git a/docs/reference/gtk/tmpl/gtkarg.sgml b/docs/reference/gtk/tmpl/gtkarg.sgml deleted file mode 100644 index 8e97cc2e2f..0000000000 --- a/docs/reference/gtk/tmpl/gtkarg.sgml +++ /dev/null @@ -1,202 +0,0 @@ - -Implementation of Object Properties - - -Utility function to manipulate lists of named, typed arguments. - - - -All the functions in here are marked a Non-public. -We describe it anyway because it is occasionally useful -to understand how the work is done. - - -Arguments are a way of describing a named parameter to a function. -They have two important roles within gtk+: - - - -they describe object properties. -This means that they present an interface to get and set a named-type -for any type of object in a consistent way. -(All the relevant functions to do this start with gtk_object_set -or gtk_object_get). - - - - -they describe signal arguments. -This is a lot less often needed but still useful. -Usually if you are just emitting or creating a particular signal -it is more convenient to just use gtk_signal_emit() or gtk_signal_new(). -However if you are writing a function to emit or create an arbitrary -signal, you must use gtk_signal_emitv() or gtk_signal_newv(). - - - - - - - -#GtkObject. - - - - -A structure containing information about the argument. -Returned by gtk_arg_get_info(). - - -@class_type: if the argument is an object, this is the object class type. -@name: the name of the argument. -@type: the type of the argument; it may be an object's type -or a fundamental type. -@arg_flags: flags applicable to the argument (i.e. readable, writable, -and whether it needs to be constructed). -@full_name: the object name and argument name separated by ::, -e.g. "GtkObject::user_data" or "GtkButton::label". -@arg_id: the unique argument identified. -@seq_id: ??? - - - -Creates a new argument of a certain type, set to 0 or NULL. - - -@arg_type: the type of the argument. -@Returns: the newly created #GtkArg. - - - - -It will either copy data into an existing argument or allocate a new argument -and copy the data. Strings are duplicated. All other pointers and -values are copied (shallowly-- that is the pointers themselves are -copied, not the data they point to.) - - -You should call gtk_arg_reset() on dest_arg before calling this -if the argument may contain string data that you want freed. - - -@src_arg: the argument to duplicate. -@dest_arg: the argument to copy over (or NULL to create a new #GtkArg). -@Returns: the new #GtkArg (or dest_arg, if it was not NULL). - - - - -Frees the argument, and optionally its contents. - - -@arg: the argument to free. -@free_contents: whether to free the string, if it is a string. - - - - -Private: given a hashtable of argument information it takes a vararg -list and parses it into arguments (in the form of lists of #GtkArgs -and lists of #GtkArgInfos. - - -The list of arguments starts with first_arg_name then the first argument's -value. Followed by any number of additional name/argument pairs, -terminated with NULL. - - -@object_type: the type of object we are collecting arguments for. -@arg_info_hash_table: a hashtable mapping from names of arguments -to their #GtkArgInfos. -@arg_list_p: a returned list of arguments obtained from parsing the -varargs. -@info_list_p: a returned list of the #GtkArgInfos. -@first_arg_name: the name of the first argument. -@var_args: a va_list containing the value of the first argument, -followed by name/value pairs, followed by NULL. -@Returns: an error message on failure, or NULL otherwise. - - - - -Private: erase lists of arguments returned from gtk_args_collect(). - - -@arg_list: arg_list_p returned from gtk_args_collect(). -@info_list: info_list_p returned from gtk_args_collect(). - - - - -Private: get information about an argument. - - -@object_type: the type of object. -@arg_info_hash_table: the hashtable of #GtkArgInfos. -@arg_name: the name of the argument to lookup. -@info_p: the argument info. -@Returns: an error message on failure, or NULL otherwise. - - - - -Create a new argument registered with a class. - - -@base_class_type: the basic type having the arguments, almost alway -GTK_TYPE_OBJECT, except if your defining a different type argument -that gets a different namespace. #GtkContainer does this to define -per-child arguments of the container. -@arg_name: name of the argument to create. (must be a static constant string) -@class_n_args_offset: offset into the base class structure that tells -the number of arguments. -@arg_info_hash_table: hashtable of #GtkArgInfos. -@arg_type: type of the argument. -@arg_flags: flags of the argument. -@arg_id: ??? -@Returns: the new #GtkArgInfo. - - - - -Private: from a class type and its arginfo hashtable, -get an array of #GtkArgs that this object accepts. - - -@class_type: the class type. -@arg_info_hash_table: the hashtable of #GtkArgInfos. -@arg_flags: returned array of argument flags. -@n_args_p: the number of arguments this object accepts. -@Returns: the array of arguments (or NULL on error). - - - - -Given a fully qualified argument name (e.g. "GtkButton::label") -it returns just the argument name (e.g. "label") unless -the argument name was invalid, in which case it returns NULL. - - -@arg_name: the fully-qualified argument name. -@Returns: the base argument name. - - - - -A #GCompareFunc for hashing #GtkArgInfos. - - -@arg_info_1: a #GtkArgInfo. -@arg_info_2: a #GtkArgInfo. -@Returns: whether the arguments are the same. - - - - -A #GHashFunc for hashing #GtkArgInfos. - - -@arg_info: a #GtkArgInfo. -@Returns: a hash value for that #GtkArgInfo. - - diff --git a/docs/reference/gtk/tmpl/gtkarrow.sgml b/docs/reference/gtk/tmpl/gtkarrow.sgml deleted file mode 100644 index dd3eaf25bb..0000000000 --- a/docs/reference/gtk/tmpl/gtkarrow.sgml +++ /dev/null @@ -1,89 +0,0 @@ - -GtkArrow - - -produces an arrow pointing in one of the four cardinal directions. - - - -GtkArrow should be used to draw simple arrows that need to point in -one of the four cardinal directions (up, down, left, or right). The -style of the arrow can be one of shadow in, shadow out, etched in, or -etched out. Note that these directions and style types may be -ammended in versions of Gtk to come. - - -GtkArrow will fill any space alloted to it, but since it is inherited -from #GtkMisc, it can be padded and/or aligned, to fill exactly the -space the programmer desires. - - -Arrows are created with a call to gtk_arrow_new(). The direction or -style of an arrow can be changed after creation by using gtk_arrow_set(). - - - - - - - -gtk_paint_arrow() -the function used internally to paint the arrow. - - - - - - - -The #GtkArrow-struct containes the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#gint16 arrow_type; -the direction of the arrow, one of #GtkArrowType. - - - -#gint16 shadow_type; -the style of the arrow, one of #GtkShadowType. - - - - - - - -Creates a new arrow widget. - - -@arrow_type: a valid #GtkArrowType. -@shadow_type: a valid #GtkShadowType. -@Returns: the new #GtkArrow widget. - - - - -Sets the direction and style of the #GtkArrow, @arrow. - - -@arrow: a widget of type #GtkArrow. -@arrow_type: a valid #GtkArrowType. -@shadow_type: a valid #GtkShadowType. - - - - -the arrow direction, one of #GtkArrowType. - - - - -the arrow style, one of #GtkShadowType. - - diff --git a/docs/reference/gtk/tmpl/gtkaspectframe.sgml b/docs/reference/gtk/tmpl/gtkaspectframe.sgml deleted file mode 100644 index 4abe32b7c7..0000000000 --- a/docs/reference/gtk/tmpl/gtkaspectframe.sgml +++ /dev/null @@ -1,65 +0,0 @@ - -GtkAspectFrame - - -A frame that constrains its child to a particular aspect ratio. - - - -The #GtkAspectFrame is useful when you want -pack a widget so that it can resize but always retains -the same aspect ratio. For instance, one might be -drawing a small preview of a larger image. #GtkAspectFrame -derives from #GtkFrame, so it can draw a label and -a frame around the child. The frame will be -"shrink-wrapped" to the size of the child. - - - - - - - - - - - - - - - -Create a new #GtkAspectFrame. - - -@label: Label text. -@xalign: Horizontal lignment of the child within the allocation of -the #GtkAspectFrame. This ranges from 0.0 (left aligned) -to 1.0 (right aligned) -@yalign: Vertical lignment of the child within the allocation of -the #GtkAspectFrame. This ranges from 0.0 (left aligned) -to 1.0 (right aligned) -@ratio: The desired aspect ratio. -@obey_child: If %TRUE, @ratio is ignored, and the aspect - ratio is taken from the requistion of the child. -@Returns: the new #GtkAspectFrame. - -@ratio: The desired aspect ratio. - - - - -Set parameters for an existing #GtkAspectFrame. - - -@aspect_frame: a #GtkAspectFrame -@xalign: Horizontal lignment of the child within the allocation of -the #GtkAspectFrame. This ranges from 0.0 (left aligned) -to 1.0 (right aligned) -@yalign: Vertical lignment of the child within the allocation of -the #GtkAspectFrame. This ranges from 0.0 (left aligned) -to 1.0 (right aligned) -@ratio: The desired aspect ratio. -@obey_child: If %TRUE, @ratio is ignored, and the aspect - ratio is taken from the requistion of the child. - - diff --git a/docs/reference/gtk/tmpl/gtkbbox.sgml b/docs/reference/gtk/tmpl/gtkbbox.sgml deleted file mode 100644 index a73be12568..0000000000 --- a/docs/reference/gtk/tmpl/gtkbbox.sgml +++ /dev/null @@ -1,202 +0,0 @@ - -GtkButtonBox - - -Base class for #GtkHButtonBox and #GtkVButtonBox - - - -The primary purpose of this class is to keep track of the various properties -of #GtkHButtonBox and #GtkVButtonBox widgets. - - -gtk_button_box_get_child_size_default() retrieves the default minimum width and height -for widgets in any button box. gtk_button_box_set_child_size_default() -changes the default minimum child widget size. - - -gtk_button_box_get_child_size() retrieves the minimum width and height -for widgets in a given button box. gtk_button_box_set_child_size() -allows those properties to be changed. - - -gtk_button_box_get_child_ipadding_default() gets the default number of pixels of -horizontal and vertical padding that are applied to each button in every button box. -gtk_button_box_set_child_ipadding_default() allows these defaults to be -changed. - - -The internal padding of buttons can be retrieved and changed per button box using -gtk_button_box_get_child_ipadding() and gtk_button_box_set_child_ipadding() -respectively. - - -gtk_button_box_get_spacing() and gtk_button_box_set_spacing() retrieve and -change default number of pixels between buttons, respectively. - - -gtk_button_box_get_layout() and gtk_button_box_set_layout() retrieve and alter the method -used to spread the buttons in a button box across the container, respectively. - - - - - - - - - - -#GtkVButtonBox -Vertical sub-class of #GtkButtonBox. - - -#GtkHButtonBox -Horizontal sub-class of #GtkButtonBox. - - - - - - -This is a read-only struct; no members should be modified directly. - - - - - -Used internally only. - - - - - - -Retrieves the default minimum width and height for all button boxes, and -places the values in @min_width and @min_height, respectively. - - -@min_width: the default minimum width of a child widget. -@min_height: the default minimum height of a child widget. - - - - -The internal padding of a button is the amount of space between the outside -of the button and the widget it contains. This function gets the default -amount of horizontal and vertical padding, placing the results in @ipad_x -and @ipad_y, respectively. - - -@ipad_x: the default horizontal internal button padding. -@ipad_y: the default vertical internal button padding. - - - - -Sets the default size of child buttons. - - -@min_width: minimum default width for child buttons. -@min_height: minimum default height for child buttons. - - - - -Sets the default number of pixels that pad each button in every button box. - - -@ipad_x: new default horizontal padding. -@ipad_y: new default vertical padding. - - - - -Retrieves how much space a button box is placing between each child button. - - -@widget: a #GtkButtonBox. -@Returns: the current spacing applied to the buttons in @widget. - - - - -Retrieves the method being used to arrange the buttons in a button box. - - -@widget: a #GtkButtonBox. -@Returns: the method used to layout buttons in @widget. - - - - -Retrieves the current width and height of all child widgets in a button box. -@min_width and @min_height are filled with those values, respectively. - - -@widget: a #GtkButtonBox. -@min_width: the width of the buttons contained by @widget. -@min_height: the height of the buttons contained by @widget. - - - - -Gets the default number of pixels that pad the buttons in a given button box. - - -@widget: a #GtkButtonBox. -@ipad_x: the horizontal padding used by buttons in @widget. -@ipad_y: the vertical padding used by buttons in @widget. - - - - -Sets the amount of spacing between buttons in a given button box. - - -@widget: a #GtkButtonBox. -@spacing: the number of pixels of spacing. - - - - -Changes the way buttons are arranged in their container. - - -@widget: a #GtkButtonBox. -@layout_style: the new layout style. - - - - -Sets a new default size for the children of a given button box. - - -@widget: a #GtkButtonBox. -@min_width: a default width for buttons in @widget. -@min_height: a default height for buttons in @widget. - - - - -Changes the amount of internal padding used by all buttons in a given button -box. - - -@widget: a #GtkButtonBox. -@ipad_x: the horizontal padding that should be used by each button in @widget. -@ipad_y: the vertical padding that should be used by each button in @widget. - - - - -This is an internally used function and should never be called from an -application. - - -@widget: -@nvis_children: -@width: -@height: - - diff --git a/docs/reference/gtk/tmpl/gtkbin.sgml b/docs/reference/gtk/tmpl/gtkbin.sgml deleted file mode 100644 index 400fc8e2b7..0000000000 --- a/docs/reference/gtk/tmpl/gtkbin.sgml +++ /dev/null @@ -1,42 +0,0 @@ - -GtkBin - - -a container with just one child. - - - -The #GtkBin widget is a container with just one child. -It is not very useful itself, but it is useful for deriving subclasses, -since it provides common code needed for handling a single child widget. - - -Many GTK+ widgets are subclasses of #GtkBin, including #GtkWindow, #GtkButton, -#GtkFrame, #GtkHandleBox, and #GtkScrolledWindow. - - - - - - - - - -The #GtkBin-struct struct contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#GtkWidget *child; -the child widget. - - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkbindings.sgml b/docs/reference/gtk/tmpl/gtkbindings.sgml deleted file mode 100644 index a5c84f097d..0000000000 --- a/docs/reference/gtk/tmpl/gtkbindings.sgml +++ /dev/null @@ -1,243 +0,0 @@ - -Bindings - - - - - - - - - - - - - - - - - - - -@match_type: -@pattern_length: -@pattern: -@pattern_reversed: -@user_data: -@seq_id: - - - - - - -@pspec: -@pattern: - - - - - - - -@pspec: - - - - - - - -@pspec: -@string_length: -@string: -@string_reversed: -@Returns: - - - - - - - -@pspec: -@string: -@Returns: - - - - - - - -@pattern: -@string: -@Returns: - - - - - - - -@set_name: -@priority: -@widget_path_pspecs: -@widget_class_pspecs: -@class_branch_pspecs: -@entries: -@current: - - - - - - -@keyval: -@modifiers: -@binding_set: -@destroyed: -@in_emission: -@set_next: -@hash_next: -@signals: - - - - - - -@next: -@signal_name: -@n_args: -@args: - - - - - - -@arg_type: - - - - - - -@set_name: -@Returns: - - - - - - - -@object_class: -@Returns: - - - - - - - -@set_name: -@Returns: - - - - - - - -@object: -@keyval: -@modifiers: -@Returns: - - - - - - - -@binding_set: -@keyval: -@modifiers: -@object: -@Returns: - - - - - - - - - - - - - - -@binding_set: -@keyval: -@modifiers: - - - - - - - -@binding_set: -@keyval: -@modifiers: -@signal_name: -@n_args: -@Varargs: - - - - - - - -@binding_set: -@path_type: -@path_pattern: -@priority: - - - - - - - -@binding_set: -@keyval: -@modifiers: - - - - - - - -@binding_set: -@keyval: -@modifiers: -@signal_name: -@binding_args: - - - - - - - -@scanner: -@Returns: - - diff --git a/docs/reference/gtk/tmpl/gtkbox.sgml b/docs/reference/gtk/tmpl/gtkbox.sgml deleted file mode 100644 index 442da31201..0000000000 --- a/docs/reference/gtk/tmpl/gtkbox.sgml +++ /dev/null @@ -1,366 +0,0 @@ - -GtkBox - - -a base class for box containers - - - -GtkBox is an abstract widget which encapsulates functionallity for a -particular kind of container, one that organizes a variable number of -widgets into a rectangular area. GtkBox currently has two derived -classes, #GtkHBox and #GtkVBox. - - -The rectangular area of a GtkBox is organized into either a single row -or a single column of child widgets depending upon whether the box is -of type #GtkHBox or #GtkVBox, respectively. Thus, all children of a -GtkBox are allocated one dimension in common, which is the height of a -row, or the width of a column. - - -GtkBox uses a notion of packing. Packing refers to -adding widgets with reference to a particular position in a -#GtkContainer. For a GtkBox, there are two reference positions: the -start and the end of the box. For a -#GtkVBox, the start is defined as the top of the box and the end is -defined as the bottom. For a #GtkHBox the start is defined as the -left side and the end is defined as the right side. - - -Use repeated calls to gtk_box_pack_start() to pack widgets into a -GtkBox from start to end. Use gtk_box_pack_end() to add widgets from -end to start. You may intersperse these calls and add widgets from -both ends of the same GtkBox. - - -Use gtk_box_pack_start_defaults() or gtk_box_pack_end_defaults() -to pack widgets into a GtkBox if you do not need to specify the -expand, fill, or -padding attributes of the child to be -added. - - -Because GtkBox is a #GtkContainer, you may also use -gtk_container_add() to insert widgets into the box, and they will be -packed as if with gtk_box_pack_start_defaults(). Use -gtk_container_remove() to remove widgets from the GtkBox. - - -Use gtk_box_set_homogeneous() to specify whether or not all children -of the GtkBox are forced to get the same amount of space. - - -Use gtk_box_set_spacing() to determine how much space will be -minimally placed between all children in the GtkBox. - - -Use gtk_box_reorder_child() to move a GtkBox child to a different -place in the box. - - -Use gtk_box_set_child_packing() to reset the -expand, fill, -and padding attributes of any GtkBox child. -Use gtk_box_query_child_packing() to query these fields. - - - - - - - -#GtkHBox -a derived class that organizes widgets into a row. - - - -#GtkVBox -a derived class that organizes widgets into a column. - - - -#GtkFrame -a #GtkWidget useful for drawing a border around a GtkBox. - - - -#GtkTable -a #GtkContainer for organizing widgets into a grid, -rather than independent rows or columns. - - - -#GtkLayout -a #GtkContainer for organizing widgets into arbitrary -layouts. - - - - - - - - -The #GtkBox-struct describes an instance of GtkBox and contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#GList * children; -a list of children belonging the GtkBox. The data is a list of -structures of type #GtkBoxChild-struct. - - - -#gint16 spacing; -the number of pixels to put between children of the GtkBox, zero -by default. Use gtk_box_set_spacing() to set this field. - - - -#guint homogeneous; -a flag that if %TRUE forces all children to get equal space in -the GtkBox; %FALSE by default. Use gtk_box_set_homogeneous() to set this -field. - - - - - - - -The #GtkBoxChild-struct holds a child widget of GtkBox and describes -how the child is to be packed into the GtkBox. Use -gtk_box_query_child_packing() and gtk_box_set_child_packing() to query -and reset the padding, -expand, fill, -and pack fields. - - -#GtkBoxChild-struct contains the following fields. (These fields -should be considered read-only. They should never be directly set by an -application.) - - - - - - -#GtkWidget * widget; -the child widget, packed into the GtkBox. - - - -#guint16 padding; -the number of extra pixels to put between this child and its -neighbors, set when packed, zero by default. - - - -#guint expand; -flag indicates whether extra space should be given to this -child. Any extra space given to the parent GtkBox is divided up among -all children with this attribute set to %TRUE; set when packed, %TRUE by -default. - - - -#guint fill; -flag indicates whether any extra space given to this child due to its -expand attribute being set is actually -allocated to the child, rather than being used as padding -around the widget; set when packed, %TRUE by default. - - - -#guint pack; one of -#GtkPackType indicating whether the child is packed with reference to -the start (top/left) or end (bottom/right) of the GtkBox. - - - - -@widget: -@padding: -@expand: -@fill: -@pack: - - - -Adds @child to @box, packed with reference to the start of @box. The -@child is packed after any other child packed with reference to the -start of @box. - - -@box: a #GtkBox. -@child: the #GtkWidget to be added to @box. -@expand: %TRUE if the new child is to be given extra space allocated to -@box. The extra space will be divided evenly between all children of -@box that use this option. -@fill: %TRUE if space given to @child by the @expand option is -actually allocated to @child, rather than just padding it. This -parameter has no effect if @expand is set to %FALSE. A child is -always allocated the full height of a #GtkHBox and the full width of a -#GtkVBox. This option affects the other dimension. -@padding: extra space in pixels to put between this child and its -neighbors, over and above the global amount specified by -spacing in #GtkBox-struct. If @child is a -widget at one of the reference ends of @box, then @padding pixels are also put -between @child and the reference edge of @box. - - - - -Adds @child to @box, packed with reference to the end of @box. The -@child is packed after (away from end of) any other child packed with reference to the -end of @box. - - -@box: a #GtkBox. -@child: the #GtkWidget to be added to @box. -@expand: %TRUE if the new child is to be given extra space allocated to -@box. The extra space will be divided evenly between all children of -@box that use this option. -@fill: %TRUE if space given to @child by the @expand option is -actually allocated to @child, rather than just padding it. This -parameter has no effect if @expand is set to %FALSE. A child is -always allocated the full height of a #GtkHBox and the full width of a -#GtkVBox. This option affects the other dimension. -@padding: extra space in pixels to put between this child and its -neighbors, over and above the global amount specified by -spacing in #GtkBox-struct. If @child is a -widget at one of the reference ends of @box, then @padding pixels are also put -between @child and the reference edge of @box. - - - - -Adds @widget to @box, packed with reference to the start of @box. The -child is packed after any other child packed with reference to the -start of @box. - - -Parameters for how to pack the child @widget, -expand, fill, -and padding in #GtkBoxChild-struct, are given their default -values, %TRUE, %TRUE, and 0, respectively. - - -@box: a #GtkBox. -@widget: the #GtkWidget to be added to @box. - - - - -Adds @widget to @box, packed with reference to the end of @box. The -child is packed after (away from end of) any other child packed with -reference to the end of @box. - - -Parameters for how to pack the child @widget, -expand, fill, -and padding in #GtkBoxChild-struct, are given their default -values, %TRUE, %TRUE, and 0, respectively. - - -@box: a #GtkBox. -@widget: the #GtkWidget to be added to @box. - - - - -Sets the homogeneous field of -#GtkBox-struct, controlling whether or not all children of @box are -given equal space in the box. - - -@box: a #GtkBox. -@homogeneous: a boolean value, %TRUE to create equal allotments, -%FALSE for variable allotments. - - - - -Sets the spacing field of #GtkBox-struct, -which is the number of pixels to place between children of @box. - - -@box: a #GtkBox. -@spacing: the number of pixels to put between children. - - - - -Moves @child to a new @position in the list of @box children. The -list is the children field of -#GtkBox-struct, and contains both widgets packed #GTK_PACK_START as -well as widgets packed #GTK_PACK_END, in the order that these widgets -were added to @box. - - -A widget's position in the @box children list determines where the -widget is packed into @box. A child widget at some position in the -list will be packed just after all other widgets of the same packing -type that appear earlier in the list. A negative value of @position is -interpreted as position 0. - - -@box: a #GtkBox. -@child: the #GtkWidget to move. -@position: the new position for @child in the -children list of #GtkBox-struct, starting -from 0. - - - - -Returns information about how @child is packed into @box. - - -@box: a #GtkBox. -@child: the #GtkWidget of the child to query. -@expand: the returned value of the expand -field in #GtkBoxChild-struct. -@fill: the returned value of the fill field -in #GtkBoxChild-struct. -@padding: the returned value of the padding -field in #GtkBoxChild-struct. -@pack_type: the returned value of the pack -field in #GtkBoxChild-struct. - - - - -Sets the way @child is packed into @box. - - -@box: a #GtkBox. -@child: the #GtkWidget of the child to set. -@expand: the new value of the expand field -in #GtkBoxChild-struct. -@fill: the new value of the fill field in -#GtkBoxChild-struct. -@padding: the new value of the padding -field in #GtkBoxChild-struct. -@pack_type: the new value of the pack field -in #GtkBoxChild-struct. - - - - -the minimum amount of space to put between children. Refers to the -spacing field of #GtkBox-struct. - - - - -how to allocate space for children, equally or variably. Refers to -the homogeneous field of #GtkBox-struct. - - diff --git a/docs/reference/gtk/tmpl/gtkbutton.sgml b/docs/reference/gtk/tmpl/gtkbutton.sgml deleted file mode 100644 index 7438cf40c7..0000000000 --- a/docs/reference/gtk/tmpl/gtkbutton.sgml +++ /dev/null @@ -1,158 +0,0 @@ - -GtkButton - - -A widget that creates a signal when clicked on. - - - -The #GtkButton widget is generally used to attach a function to that -is called when the button is pressed. The various signals and how to use -them are outlined below. - - -The #GtkButton widget can hold any valid child widget. That is it can -hold most any other standard #GtkWidget. The most commonly used child is -the #GtkLabel. - - - - - - - - - -This should not be accessed directly. Use the accessor functions below. - - - - - -Creates a new #GtkButton widget. - - -@Returns: The newly created #GtkButton widget. - - - - -Creates a #GtkButton widget with a #GtkLabel child containing the given -text. - - -@label: The text you want the #GtkLabel to hold. -@Returns: The newly created #GtkButton widget. - - - - -Emits a #GtkButton::pressed signal to the given #GtkButton. - - -@button: The #GtkButton you want to send the signal to. - - - - -Emits a #GtkButton::released signal to the given #GtkButton. - - -@button: The #GtkButton you want to send the signal to. - - - - -Emits a #GtkButton::clicked signal to the given #GtkButton. - - -@button: The #GtkButton you want to send the signal to. - - - - -Emits a #GtkButton::enter signal to the given #GtkButton. - - -@button: The #GtkButton you want to send the signal to. - - - - -Emits a #GtkButton::leave signal to the given #GtkButton. - - -@button: The #GtkButton you want to send the signal to. - - - - -Sets the relief style of the edges of the given #GtkButton widget. -Three styles exist, GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE. -The default style is, as one can guess, GTK_RELIEF_NORMAL. - - - - -@button: The #GtkButton you want to set relief styles of. -@newstyle: The GtkReliefStyle as described above. - - - - -Returns the current relief style of the given #GtkButton. - - -@button: The #GtkButton you want the #GtkReliefStyle from. -@Returns: The current #GtkReliefStyle - - - - -Emitted when the button is initially pressed. - - -@button: the object which received the signal. - - - -Emitted when a button which is pressed is released, no matter where the -mouse cursor is. - - -@button: the object which received the signal. - - - -Emitted when a button clicked on by the mouse and the cursor stays on the -button. If the cursor is not on the button when the mouse button is released, -the signal is not emitted. - - -@button: the object which received the signal. - - - -Emitted when the mouse cursor enters the region of the button. - - -@button: the object which received the signal. - - - -Emitted when the mouse cursor leaves the region of the button. - - -@button: the object which received the signal. - - - -The text within the child #GtkLabel of the #GtkButton. Only useful if -there is actually a #GtkLabel inside of the #GtkButton. - - - - -The #GtkReliefStyle as outlined in gtk_button_set_relief(). - - diff --git a/docs/reference/gtk/tmpl/gtkcalendar.sgml b/docs/reference/gtk/tmpl/gtkcalendar.sgml deleted file mode 100644 index b7bc326498..0000000000 --- a/docs/reference/gtk/tmpl/gtkcalendar.sgml +++ /dev/null @@ -1,240 +0,0 @@ - -GtkCalendar - - -display a calendar and/or allow the user to select a date. - - - -#GtkCalendar is a widget that displays a calendar, one month at a time. -It can be created with gtk_calendar_new(). - - -The month and year currently displayed can be altered with -gtk_calendar_select_month(). The exact day can be selected from the displayed -month using gtk_calendar_select_day(). - - -FIXME: (check)To place a visual marker on a particular day, use -gtk_calendar_mark_day() and to remove the marker, gtk_calendar_unmark_day(). -Alternative, all marks can be cleared with gtk_calendar_clear_marks(). - - -The way in which the calendar itself is displayed can be altered using -gtk_calendar_display_options(). - - -The selected date can be retrieved from a #GtkCalendar using -gtk_calendar_get_date(). - - -If performing many 'mark' operations, the calendar can be frozen to prevent -flicker, using gtk_calendar_freeze(), and 'thawed' again using -gtk_calendar_thaw(). - - - - - - - - - -num_marked_dates is an integer containing the -number of days that have a mark over them. - - -marked_date is an array containing the day numbers -that currently have a mark over them. - - -month, year, and -selected_day contain the currently visible month, -year, and selected day respectively. - - -All of these fields should be considered read only, and everything in this -struct should only be modified using the functions provided below. - - - - - - - - - - -GTK_CALENDAR_SHOW_HEADING -Specifies that the month and year should be displayed. - - -GTK_CALENDAR_SHOW_DAY_NAMES -Specifies that three letter day descriptions should be present. - - -GTK_CALENDAR_NO_MONTH_CHANGE -Prevents the user from switching months with the calendar. - - -GTK_CALENDAR_SHOW_WEEK_NUMBERS -Displays each week numbers of the current year, down the left side of -the calendar. - - -GTK_CALENDAR_WEEK_START_MONDAY -Starts the calendar week on Monday, instead of the default Sunday. - - - - - -@GTK_CALENDAR_SHOW_HEADING: -@GTK_CALENDAR_SHOW_DAY_NAMES: -@GTK_CALENDAR_NO_MONTH_CHANGE: -@GTK_CALENDAR_SHOW_WEEK_NUMBERS: -@GTK_CALENDAR_WEEK_START_MONDAY: - - - -Creates a new calendar. FIXME:default date. - - -@Returns: a #GtkCalendar. - - - - -Shifts the calendar to a different month. - - -@calendar: a #GtkCalendar. -@month: a month number. -@year: the year the month is in. -@Returns: FIXME. - - - - -Selects a day from the current month. - - -@calendar: a #GtkCalendar. -@day: the day number to select. - - - - - - - -@calendar: -@day: -@Returns: - - - - - - - -@calendar: -@day: -@Returns: - - - - - - - -@calendar: - - - - - - - -@calendar: -@flags: - - - - - - - -@calendar: -@year: -@month: -@day: - - - - -Locks the display of the calendar until it is thawed with gtk_calendar_thaw(). - - -@calendar: a #GtkCalendar. - - - - -Defrosts a calendar; all the changes made since the last -gtk_calendar_freeze() are displayed. - - -@calendar: a #GtkCalendar. - - - - -Emitted when the user clicks a button to change the selected month on a -calendar. - - -@calendar: the object which received the signal. - - - -Emitted when the user selects a day. - - -@calendar: the object which received the signal. - - - - - - -@calendar: the object which received the signal. - - - - - - -@calendar: the object which received the signal. - - - - - - -@calendar: the object which received the signal. - - - - - - -@calendar: the object which received the signal. - - - - - - -@calendar: the object which received the signal. - diff --git a/docs/reference/gtk/tmpl/gtkcheckbutton.sgml b/docs/reference/gtk/tmpl/gtkcheckbutton.sgml deleted file mode 100644 index cf2929b1d6..0000000000 --- a/docs/reference/gtk/tmpl/gtkcheckbutton.sgml +++ /dev/null @@ -1,59 +0,0 @@ - -GtkCheckButton - - -create widgets with a discrete toggle button. - - - -A #GtkCheckButton places a discrete #GtkToggleButton next to a widget, (usually a #GtkLabel). See the section on #GtkToggleButton widgets for more information about toggle/check buttons. - - -The important signal ('toggled') is also inherited from #GtkToggleButton. - - - - - - -#GtkCheckMenuItem -add check buttons to your menus. - - -#GtkButton -a more general button. - - -#GtkToggleButton -#GtkCheckButton's parent. - - -#GtkRadioButton -group check buttons together. - - - - - - -toggle_button is a #GtkToggleButton representing the actual toggle button that composes the check button. - - - - - -Creates a new #GtkCheckButton. - - -@Returns: a #GtkWidget. - - - - -Creates a new #GtkCheckButton with a #GtkLabel to the right of it. - - -@label: the text for the check button. -@Returns: a #GtkWidget. - - diff --git a/docs/reference/gtk/tmpl/gtkcheckmenuitem.sgml b/docs/reference/gtk/tmpl/gtkcheckmenuitem.sgml deleted file mode 100644 index 0cbac1879e..0000000000 --- a/docs/reference/gtk/tmpl/gtkcheckmenuitem.sgml +++ /dev/null @@ -1,108 +0,0 @@ - -GtkCheckMenuItem - - -a menu item with a check box. - - - -A #GtkCheckMenuItem is a menu item that maintains the state of a boolean -value in addition to a #GtkMenuItem's usual role in activating application -code. - - - -A check box indicating the state of the boolean value is displayed -at the left side of the #GtkMenuItem. Activating the #GtkMenuItem -toggles the value. - - - - - - - - - -The #GtkCheckMenuItem-struct struct contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#guint active; -TRUE if the check box is active. - - - - - - - - -Creates a new #GtkCheckMenuItem. - - -@Returns: a new #GtkCheckMenuItem. - - - - -Creates a new #GtkCheckMenuItem with a label. - - -@label: the string to use for the label. -@Returns: a new #GtkCheckMenuItem. - - - - -This macro is provided to preserve compatibility with older code. -New code should use gtk_check_menu_item_set_active() function instead. - - - - - - -Sets the active state of the menu item's check box. - - -@check_menu_item: a #GtkCheckMenuItem. -@is_active: boolean value indicating whether the check box is active. - - - - -Controls whether the check box is shown at all times. -Normally the check box is shown only when it is active or while the -menu item is selected. - - -@menu_item: a #GtkCheckMenuItem. -@always: boolean value indicating whether to always show the check box. - - - - -Emits the GtkCheckMenuItem::toggled signal. - - -@check_menu_item: a #GtkCheckMenuItem. - - - - -This signal is emitted when the state of the check box is changed. - - - -A signal handler can examine the active -field of the #GtkCheckMenuItem-struct struct to discover the new state. - - -@checkmenuitem: the object which received the signal. - diff --git a/docs/reference/gtk/tmpl/gtkclist.sgml b/docs/reference/gtk/tmpl/gtkclist.sgml deleted file mode 100644 index 12adbd8cdd..0000000000 --- a/docs/reference/gtk/tmpl/gtkclist.sgml +++ /dev/null @@ -1,1317 +0,0 @@ - -GtkCList - - -A multi-columned scrolling list widget. - - - -The #GtkCList widget is a very useful multi-columned scrolling list. It can display -data in nicely aligned vertical columns, with titles at the top of the list. - - - - - - - - - -This is the embodiment of the #GtkCList widget. This structure contains -only private data, and should be accessed only via the CList API. - - - - - -Identifies the type of element in the current cell of the CList. Cells can -contain text, pixmaps, or both. Unfortunately support for %GTK_CELL_WIDGET -was never completed. - - -@GTK_CELL_EMPTY: -@GTK_CELL_TEXT: -@GTK_CELL_PIXMAP: -@GTK_CELL_PIXTEXT: -@GTK_CELL_WIDGET: - - - -Values for specifying what mouse button events a CList will -react to. - - -@GTK_BUTTON_IGNORED: -@GTK_BUTTON_SELECTS: -@GTK_BUTTON_DRAGS: -@GTK_BUTTON_EXPANDS: - - - -Reads the current flags of the specified CList. - - -@clist: The #GtkCList widget from which to get the flags - - - - -A macro to set a particular flag for the specified CList. - - -@clist: The #GtkCList widget to affect. -@flag: A single #GtkCList flag to set. NOTE: Do not add the GTK_ prefix. - - - - -A macro to clear a particular flag for the specified CList. - - -@clist: The #GtkCList widget to affect. -@flag: A single #GtkCList flag to clear. NOTE: Do not add the GTK_ prefix. - - - - -A macro to check whether the #GtkCList is in "drag mode." - - -@clist: The #GtkCList to check. - - - - -A macro to check whether the #GtkCList's row height is set. - - -@clist: The #GtkCList to check. - - - - -A macro to check whether the flag for showing the -widget's column titles is set. - - -@clist: The #GtkCList widget to check. - - - - -A macro to check whether a child widget of the CList -has the focus. - - -@clist: The #GtkCList widget to check. - - - - -A macro to test whether the CList is in "add mode." - - -@clist: The #GtkCList widget to check. - - - - - -A macro to test whether the CList has automatic sorting -switched on. - - -@clist: The #GtkCList widget to check. - - - - - -A macro to check if automatic resizing of columns is blocked. - - -@clist: The #GtkCList widget to check. - - - - - -A macro to test if the CList's columns are re-orderable - - -@clist: The #GtkCList widget to check. - - - - - -A macro to check if the USE_DRAG_ICONS property is enabled. - - -@clist: The #GtkCList widget to check. - - - - - -A macro to check if the DRAW_DRAG_LINE property is enabled. - - -@clist: The #GtkCList widget to check. - - - - - -A macro to check if the DRAW_DRAG_RECT property is enabled. - - -@clist: The #GtkCList widget to check. - - - - - -A macro to cast a GList element to a CListRow pointer. - - -@_glist_: The GList element to convert. - - - - -A macro to cast a generic #GtkCList cell item to a GtkCellText pointer. - - -@cell: The #GtkCList cell item to convert. - - - - -A macro to cast a generic #GtkCList cell item to a GtkCellPixmap pointer. - - -@cell: The #GtkCList cell item to convert. - - - - -A macro to cast a generic #GtkCList cell item to a GtkCellPixText pointer. - - -@cell: The #GtkCList cell item to convert. - - - - -A macro to cast a generic #GtkCList cell item to a GtkCellWidget pointer. - - -@cell: The #GtkCList cell item to convert. - - - - -Function prototype for the compare function callback. - - -@clist: The #GtkCList that is affected. -@ptr1: A #gconstpointer to the first node to compare. -@ptr2: A #gconstpointer to the second node to compare. -@Returns: 0 if the nodes are equal, less than 0 if the first node should -come before the second, and greater than 1 if the second come before the -first. - - - - -A structure that the #GtkCList widget uses to keep track of information -about its columns. - - -@title: -@area: -@button: -@window: -@width: -@min_width: -@max_width: -@justification: -@visible: -@width_set: -@resizeable: -@auto_resize: -@button_passive: - - - -A structure that the #GtkCList widget uses to keep track of information -about its rows. - - -@cell: -@state: -@foreground: -@background: -@style: -@data: -@destroy: -@fg_set: -@bg_set: -@selectable: - - - -A structure that the #GtkCList widget uses to keep track of #GtkCList cells -that contain text. - - -@type: -@vertical: -@horizontal: -@style: -@text: - - - -A structure that the #GtkCList widget uses to keep track of #GtkCList cells -that contain a GdkPixmap. - - -@type: -@vertical: -@horizontal: -@style: -@pixmap: -@mask: - - - -A structure that the #GtkCList widget uses to keep track of #GtkCList cells -that contain a combination of text and a GdkPixmap. - - -@type: -@vertical: -@horizontal: -@style: -@text: -@spacing: -@pixmap: -@mask: - - - -A structure that the #GtkCList widget uses to keep track of #GtkCList cells -that contain another widget. - - -@type: -@vertical: -@horizontal: -@style: -@widget: - - - -A generic structure that the #GtkCList widget uses to keep track of the -contents of each of its cells. - - -@type: -@vertical: -@horizontal: -@style: -@widget: - - - -A simple structure that the #GtkCList widget uses to keep track -of the location of a cell. - - -@row: -@column: - - - -A simple structure that the #GtkCList widget uses to track -a cell for a drag operation. - - -@cell: -@insert_pos: - - - -An enumeration for drag operations. - - -@GTK_CLIST_DRAG_NONE: -@GTK_CLIST_DRAG_BEFORE: -@GTK_CLIST_DRAG_INTO: -@GTK_CLIST_DRAG_AFTER: - - - -Initializes a previously allocated #GtkCList widget for use. This should not -normally be used to create a #GtkCList widget. Use gtk_clist_new() instead. - - -@clist: A pointer to an uninitialized #GtkCList widget. -@columns: The number of columns the #GtkCList should have. -@titles: An array of strings that should be used as the titles i -of the columns. There should be enough strings in the array for -the number of columns specified. - - - - -Creates a new #GtkCList widget for use. - - -@columns: The number of columns the #GtkCList should have. -@Returns: A pointer to a new GtkCList object. - - - - -Creates a new #GtkCList widget with column titles for use. - - -@columns: The number of columns the #GtkCList should have. -@titles: A string array of titles for the widget. There should be -enough strings in the array for the specified number of columns. -@Returns: A pointer to a new GtkCList object. - - - - -Sets the shadow type for the specified CList. Changing this value -will cause the #GtkCList to update its visuals. - - -@clist: The #GtkCList to affect. -@type: The GtkShadowType desired. - - - - -Sets the selection mode for the specified CList. This allows you to -set whether only one or more than one item can be selected at a time -in the widget. Note that setting the widget's selection mode to one -of GTK_SELECTION_BROWSE or GTK_SELECTION_SINGLE will cause all the -items in the #GtkCList to become deselected. - - -@clist: The #GtkCList to affect. -@mode: The GtkSelectionMode type to set for this CList. - - - - -Causes the #GtkCList to stop updating its visuals until a matching call to -gtk_clist_thaw() is made. This function is useful if a lot of changes -will be made to the widget that may cause a lot of visual updating to -occur. Note that calls to gtk_clist_freeze() can be nested. - - -@clist: The #GtkCList to freeze. - - - - -Causes the specified #GtkCList to allow visual updates. - - -@clist: The #GtkCList to thaw. - - - - -This function causes the #GtkCList to show its column titles, if -they are not already showing. - - -@clist: The #GtkCList to affect. - - - - -Causes the #GtkCList to hide its column titles, if they are currently -showing. - - -@clist: The #GtkCList to affect. - - - - -Sets the specified column in the #GtkCList to become selectable. You can -then respond to events from the user clicking on a title button, and take -appropriate action. - - -@clist: The #GtkCList to affect. -@column: The column to make active, counting from 0. - - - - -Causes the specified column title button to become passive, i.e., does -not respond to events, such as the user clicking on it. - - -@clist: The #GtkCList to affect. -@column: The column to make passive, counting from 0. - - - - -Causes all column title buttons to become active. This is the same -as calling gtk_clist_column_title_active() for each column. - - -@clist: The #GtkCList to affect. - - - - -Causes all column title buttons to become passive. This is the same -as calling gtk_clist_column_title_passive() for each column. - - -@clist: The #GtkCList to affect. - - - - -Sets the title for the specified column. - - -@clist: The #GtkCList to affect. -@column: The column whose title should be changed. -@title: A string to be the column's title. - - - - -Sets a widget to be used as the specified column's title. This -can be used to place a pixmap or something else as the column -title, instead of the standard text. - - -@clist: The #GtkCList to affect. -@column: The column whose title should be a widget. -@widget: A pointer to a previously create widget. - - - - -Sets the justification to be used for all text in the specified -column. - - -@clist: The #GtkCList to affect. -@column: The column which should be affected. -@justification: A GtkJustification value for the column. - - - - -Allows you to set whether a specified column in the #GtkCList should -be hidden or shown. Note that at least one column must always be -showing, so attempting to hide the last visible column will be -ignored. - - -@clist: The #GtkCList to affect. -@column: The column to set visibility. -@visible: %TRUE or %FALSE. - - - - -Lets you specify whether a specified column should be resizeable -by the user. Note that turning on resizeability for the column will -automatically shut off auto-resizing, but turning off resizeability -will NOT turn on auto-resizing. This must be done manually via a -call to gtk_clist_set_column_auto_resize(). - - -@clist: The #GtkCList to affect. -@column: The column on which to set resizeability. -@resizeable: %TRUE or %FALSE. - - - - -Lets you specify whether a column should be automatically resized -by the widget when data is added or removed. Enabling auto-resize -on a column explicity disallows user-resizing of the column. - - -@clist: The #GtkCList to affect. -@column: The column on which to set auto-resizing. -@auto_resize: %TRUE or %FALSE. - - - - -Gets the required width in pixels that is needed to show -everything in the specified column. - - -@clist: The #GtkCList to check. -@column: The column to check. -@Returns: The required width in pixels for the column. - - - - -Causes the column specified for the #GtkCList to be set to -a specified width. - - -@clist: The #GtkCList to affect. -@column: The column to set the width. -@width: The width, in pixels. - - - - -Causes the column specified to have a minimum width, preventing -the user from resizing it smaller than that specified. - - -@clist: The #GtkCList to affect. -@column: The column to set the minimum width. -@min_width: The width, in pixels. - - - - -Causes the column specified to have a maximum width, preventing -the user from resizing it larger than that specified. - - -@clist: The #GtkCList to affect. -@column: The column to set the maximum width. -@max_width: The width, in pixels. - - - - -Causes the #GtkCList to have a specified height for its -rows. Setting the row height to 0 allows the #GtkCList to adjust -automatically to data in the row. - - -@clist: The #GtkCList to affect. -@height: The height, in pixels. - - - - -Tells the CList widget to visually move to the specified -row and column. - - -@clist: The #GtkCList to affect. -@row: The row to which to move. -@column: The column to which to move. -@row_align: A value between 0 and 1 that describes the positioning of -the row in relation to the viewable area of the CList's contents. -@col_align: A value between 0 and 1 that describes the positioning of -the column in relation to the viewable area of the CList's contents. - - - - -Checks how the specified row is visible. - - -@clist: The #GtkCList to affect. -@row: The row to query. -@Returns: A #GtkVisibility value that tells you how the row is visible. - - - - -Checks the type of cell at the location specified. - - -@clist: The #GtkCList to affect. -@row: The row of the cell. -@column: The column of the cell. -@Returns: A #GtkCellType value describing the cell. - - - - -Sets the displayed text in the specified cell. - - -@clist: The #GtkCList to affect. -@row: The row of the cell. -@column: The column of the cell. -@text: The text to set in the cell. - - - - -Gets the text for the specified cell. - - -@clist: The #GtkCList to affect. -@row: The row to query. -@column: The column to query. -@text: A pointer to a pointer to store the text. -@Returns: 1 if the cell's text could be retrieved, 0 otherwise. - - - - -Sets a pixmap for the specified cell. - - -@clist: The #GtkCList to affect. -@row: The row of the cell. -@column: The column of the cell. -@pixmap: A pointer to a #GdkPixmap to place in the cell. -@mask: A pointer to a #GdkBitmap mask for the cell. - - - - -Gets the pixmap and bitmap mask of the specified cell. The returned mask value can be NULL. - - -@clist: The #GtkCList to affect. -@row: The row of the cell. -@column: The column of the cell. -@pixmap: A pointer to a pointer to store the cell's #GdkPixmap. -@mask: A pointer to a pointer to store the cell's #GdkBitmap mask. -@Returns: 1 if the cell's pixmap could be retrieved, 0 otherwise. - - - - -Sets text and a pixmap/bitmap on the specified cell. - - -@clist: The #GtkCList to affect. -@row: The row of the cell. -@column: The column of the cell. -@text: The text to set in the cell. -@spacing: The spacing between the cell's text and pixmap. -@pixmap: A pointer to a #GdkPixmap for the cell. -@mask: A pointer to a #GdkBitmap mask for the cell. - - - - -Gets the text, pixmap and bitmap mask for the specified cell. - - -@clist: The #GtkCList to affect. -@row: The row to query. -@column: The column to query. -@text: A pointer to a pointer to store the text. -@spacing: A pointer to a #guint8 to store the spacing. -@pixmap: A pointer to a #GdkPixmap pointer to store the cell's pixmap. -@mask: A pointer to a #GdkBitmap pointer to store the cell's bitmap mask. -@Returns: 1 if the retrieval was successful, 0 otherwise. - - - - -Sets the foreground color for the specified row. - - -@clist: The #GtkCList to affect. -@row: The row to affect. -@color: A pointer to a #GdkColor structure. - - - - -Sets the background color for the specified row. - - -@clist: The #GtkCList to affect. -@row: The row to affect. -@color: A pointer to a #GdkColor structure. - - - - -Sets the style for the specified cell. - - -@clist: The #GtkCList to affect. -@row: The row of the cell. -@column: The column of the cell. -@style: A pointer to a #GtkStyle structure. - - - - -Gets the current style of the specified cell. - - -@clist: The #GtkCList to affect. -@row: The row of the cell. -@column: The column of the cell. -@Returns: A #GtkStyle object. - - - - -Sets the style for all cells in the specified row. - - -@clist: The #GtkCList to affect. -@row: The row to affect. -@style: A pointer to a #GtkStyle to set. - - - - -Gets the style set for the specified row. - - -@clist: The #GtkCList to affect. -@row: The row to query. -@Returns: The #GtkStyle of the row. - - - - -Sets the vertical and horizontal shift of the specified cell. - - -@clist: The #GtkCList to affect. -@row: The row of the cell. -@column: The column of the cell. -@vertical: The value to set for the vertical shift. -@horizontal: The value to set for the vertical shift. - - - - -Sets whether the specified row is selectable or not. - - -@clist: The #GtkCList to affect. -@row: The row to affect. -@selectable: %TRUE or %FALSE. - - - - -Gets whether the specified row is selectable or not. - - -@clist: The #GtkCList to affect. -@row: The row to query. -@Returns: A #gboolean value. - - - - -Adds a row to the CList at the top. - - -@clist: The #GtkCList to affect. -@text: An array of strings to add. -@Returns: The number of the row added. - - - - -Adds a row to the CList at the bottom. - - -@clist: The #GtkCList to affect. -@text: An array of strings to add. -@Returns: The number of the row added. - - - - -Adds a row of text to the CList at the specified position. - - -@clist: The #GtkCList to affect. -@row: The row where the text should be inserted. -@text: An array of string to add. -@Returns: The number of the row added. - - - - -Removes the specified row from the CList. - - -@clist: The #GtkCList to affect. -@row: The row to remove. - - - - -Sets data for the specified row. This is the same as calling gtk_clist_set_row_data_full(clist, row, data, NULL). - - -@clist: The #GtkCList to affect. -@row: The row to affect. -@data: The data to set for the row. - - - - -Sets the data for specified row, with a callback when the row is destroyed. - - -@clist: The #GtkCList to affect. -@row: The row to affect. -@data: The data to set for the row. -@destroy: A #GtkDestroyNotify function to be called when the row is destroyed. - - - - -Gets the currently set data for the specified row. - - -@clist: The #GtkCList to affect. -@row: The row to query. -@Returns: The data set for the row. - - - - -Searches the CList for the row with the specified data. - - -@clist: The #GtkCList to search. -@data: The data to search for a match. -@Returns: The number of the matching row, or -1 if no match could be found. - - - - -Selects the specified row. Causes the "select-row" signal to be emitted for the specified row and column. - - -@clist: The #GtkCList to affect. -@row: The row to select. -@column: The column to select. - - - - -Unselects the specified row. Causes the "unselect-row" signal to be emitted for the specified row and column. - - -@clist: The #GtkCList to affect. -@row: The row to select. -@column: The column to select. - - - - -Undoes the last selection for an "extended selection mode" CList. - - -@clist: The #GtkCList to affect. - - - - -Removes all the CList's rows. - - -@clist: The #GtkCList to affect. - - - - -Gets the row and column at the specified pixel position in the CList. - - -@clist: The #GtkCList to affect. -@x: The horizontal pixel position to check. -@y: The vertical pixel position to check.. -@row: Pointer to a #gint to store the row value. -@column: Pointer to a #gint to store the column value. -@Returns: 1 if row/column is returned and in range, 0 otherwise. - - - - -Selects all rows in the CList. This function has no affect for a -CList in "single" or "browse" selection mode. - - -@clist: The #GtkCList to affect. - - - - -Unselects all rows in the CList. - - -@clist: The #GtkCList to affect. - - - - -Swaps the two specified rows with each other. - - -@clist: The #GtkCList to affect. -@row1: Number of the first row. -@row2: Number of the second row. - - - - -Sets the compare function of the #GtkClist to @cmp_func. If @cmp_func is NULL, -then the default compare function is used. The default compare function sorts -ascending or with the type set by gtk_clist_set_sort_type() by the column set -by gtk_clist_set_sort_column(). - - -@clist: The #GtkCList to affect. -@cmp_func: The #GtkCompareFunction to use. - - - - -Sets the sort column of the clist. The sort column is used by the -default compare function to determine which column to sort by. - - -@clist: The #GtkCList to affect. -@column: The column to sort by - - - - -Sets the sort type of the #GtkClist. This is either GTK_SORT_ASCENDING for -ascening sort or GTK_SORT_DESCENDING for descending sort. - - -@clist: The #GtkCList to affect. -@sort_type: the #GtkSortType to use - - - - -Sorts the #GtkClist according to the current compare function, which -can be set with the gtk_clist_set_compare_func() function. - - -@clist: The #GtkCList to sort. - - - - -Turns on or off auto sort of the #GtkCList. If auto sort is on, then the CList will be resorted when a row is inserted into the CList. - - -@clist: The #GtkCList to affect. -@auto_sort: whether auto sort should be on or off - - - - -Auto-sizes all columns in the CList and returns the total width of the CList. - - -@clist: The #GtkCList to affect. -@Returns: The total width of the CList. - - - - -Gets the current title of the specified column - - -@clist: The #GtkCList to affect. -@column: The column to query. -@Returns: The title of the column. - - - - -Gets the widget in the column header for the specified column. - - -@clist: The #GtkCList to affect. -@column: The column to query. -@Returns: Pointer to a #GtkWidget for the column header. - - - - -Gets the #GtkAdjustment currently being used for the horizontal -aspect. - - -@clist: The #GtkCList to check. -@Returns: A #GtkAdjustment object, or NULL if none is currently -being used. - - - - -Gets the #GtkAdjustment currently being used for the vertical -aspect. - - -@clist: The #GtkCList to check. -@Returns: A #GtkAdjustment object, or NULL if none is currently -being used. - - - - -Allows you to move a row from one position to another in the -list. - - -@clist: The #GtkCList to affect. -@source_row: The original position of the row to move. -@dest_row: The position to which the row should be moved. - - - - -Sets the action(s) that the specified mouse button will have -on the CList. - - -@clist: The #GtkCList to affect. -@button: The mouse button to set. -@button_actions: A logically OR'd value of #GtkButtonAction values -for the button. - - - - -Allows you to set the #GtkAdjustment to be used for the horizontal -aspect of the #GtkCList widget. - - -@clist: The #GtkCList to affect. -@adjustment: A pointer to a #GtkAdjustment widget, or NULL. - - - - -Sets whether the CList's rows are re-orderable using drag-and-drop. - - -@clist: The #GtkCList to affect. -@reorderable: %TRUE or %FALSE. - - - - -Determines whether the #GtkClist should use icons when -doing drag-and-drop operations. - - -@clist: The #GtkCList to affect. -@use_icons: %TRUE or %FALSE. - - - - -Allows you to set the #GtkAdjustment to be used for the vertical -aspect of the #GtkCList widget. - - -@clist: The #GtkCList to affect. -@adjustment: A pointer to a #GtkAdjustment widget, or NULL. - - - - -This signal is emitted when the user selects a row in the list. -It is emitted for every row that is selected in a multi-selection or -by calling gtk_clist_select_all(). - - -@clist: The object which received the signal. -@row: The row selected. -@column: The column where the selection occured. -@event: A #GdkEvent structure for the selection. - - - -This signal is emitted when the user unselects a row in the list. -It is emitted for every row that is unselected in a multi-selection or -by calling gtk_clist_unselect_all(). It is also emitted for the -previously selected row in a "single" or "browse" mode CList. - - -@clist: The object which received the signal. -@row: The selected row -@column: The column where the selection occured. -@event: - - - -This signal is emitted when a row is moved. - - -@clist: The object which received the signal. -@arg1: The source position of the row. -@arg2: The destination position of the row. - - - -This signal is emitted when a column title is clicked. - - -@clist: The object which received the signal. -@column: The number of the column. - - - -This signal is emitted when a column is resized. - - -@clist: The object which received the signal. -@column: The number of the column -@width: The new width of the column. - - - - - - -@clist: The object which received the signal. - - - -This signal is emitted when all the rows are selected in a CList. - - -@clist: the object which received the signal. - - - -This signal is emitted when all rows are unselected in a CList. - - -@clist: the object which received the signal. - - - -This signal is emitted when an undo selection occurs in the CList, -probably via calling gtk_clist_undo_selection(). - - -@clist: the object which received the signal. - - - -This signal is emitted when a drag-selection is started in -a multiple-selection CList. - - -@clist: the object which received the signal. - - - -This signal is emitted when a selection ends in a -multiple selection CList. - - -@clist: the object which received the signal. - - - -This signal is emitted when "add mode" is toggled. - - -@clist: the object which received the signal. - - - -This signal is emitted when the selection is extended. - - -@clist: the object which received the signal. -@scroll_type: A #GtkScrollType value of any scrolling operation the -occured during the selection. -@position: A value between 0.0 and 1.0. -@auto_start_selection: %TRUE or %FALSE. - - - -This signal is emitted when the CList is scrolled vertically. - - -@clist: the object which received the signal. -@scroll_type: A #GtkScrollType value of how the scroll operation occured. -@position: A value between 0.0 and 1.0. - - - -This signal is emitted when the CList is scrolled horizontally. - - -@clist: the object which received the signal. -@scroll_type: A #GtkScrollType value of how the scroll operation occured. -@position: a value between 0.0 and 1.0. - - - -This signal is emitted when a column resize is aborted. - - -@clist: the object which received the signal. - - - -An integer value for a column. - - - - -Sets the shadowing for the CList. - - - - -Sets the type of selection mode for the CList. - - - - -An integer value representing the height of a row in pixels. - - - - -A boolean value for determining if the user can re-order the CList's -columns. - - - - -A boolean value for setting whether the column titles can be -clicked. - - - - -A boolean value for setting whether to use icons during drag -operations. - - diff --git a/docs/reference/gtk/tmpl/gtkcolorsel.sgml b/docs/reference/gtk/tmpl/gtkcolorsel.sgml deleted file mode 100644 index f3152384c1..0000000000 --- a/docs/reference/gtk/tmpl/gtkcolorsel.sgml +++ /dev/null @@ -1,109 +0,0 @@ - -GtkColorSelection - - -a widget used to select a color. - - - -The #GtkColorSelection is a widget that is used to select -a color. It consists of a color wheel and number of sliders -and entry boxes for color parameters such as hue, saturation, -value, red, green, blue, and opacity. It is found on the standard -color selection dialog box #GtkColorSelectionDialog. - - - - - - - - - -The #GtkColorSelection-struct struct contains private data only, -and should be accessed using the functions below. - - - - - -Create a new #GtkColorSelection. - - -@Returns: a #GtkColorSelection. - - - - -Sets the policy controlling when the color_changed signals are emitted. -The available policies are: - - - -%GTK_UPDATE_CONTINUOUS - signals are sent continuously as the color -selection changes. - - - - -%GTK_UPDATE_DISCONTINUOUS - signals are sent only when the mouse -button is released. - - - - -%GTK_UPDATE_DELAYED - signals are sent when the mouse button is -released or when the mouse has been motionless for a period of -time. - - - - - -@colorsel: a #GtkColorSelection. -@policy: a #GtkUpdateType value indicating the desired policy. - - - - -Controls whether opacity can be set with the #GtkColorSelection. -If this functionality is enabled, the necessary additional widgets -are added to the #GtkColorSelection and the opacity value can be -retrieved via the fourth value in the color array returned by -the gtk_color_selection_get_color() function. - - -@colorsel: a #GtkColorSelection. -@use_opacity: a boolean indicating whether the opacity selection -is enabled. - - - - -Sets the color in the #GtkColorSelection. The widgets are updated -to reflect the new color. - - -@colorsel: a #GtkColorSelection. -@color: a color array consisting of 4 gfloat values for red, green, -blue, and opacity. - - - - -Retrieve the currently selected color value. - - -@colorsel: a #GtkColorSelection -@color: a color array consisting of 4 gfloat values for red, green, -blue, and opacity. - - - - -This signal is emitted when the color changes in the #GtkColorSelection -according to its update policy. - - -@colorselection: the object which received the signal. - diff --git a/docs/reference/gtk/tmpl/gtkcolorseldlg.sgml b/docs/reference/gtk/tmpl/gtkcolorseldlg.sgml deleted file mode 100644 index e043e77be6..0000000000 --- a/docs/reference/gtk/tmpl/gtkcolorseldlg.sgml +++ /dev/null @@ -1,70 +0,0 @@ - -GtkColorSelectionDialog - - -a standard dialog box for selecting a color. - - - -The #GtkColorSelectionDialog provides a standard dialog which -allows the user to select a color much like the #GtkFileSelection -provides a standard dialog for file selection. - - - - - - - - - -The #GtkColorSelectionDialog-struct struct contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#GtkWidget *colorsel; -The #GtkColorSelection widget contained within the -dialog. Use this widget and its gtk_color_selection_get_color() -function to gain access to the selected color. Connect a handler -for this widget's color_changed signal to be notified when the -color changes. - - - - -#GtkWidget *ok_button; -The OK button widget contained within the dialog. -Connect a handler for the clicked event. - - - - -#GtkWidget *cancel_button; -The cancel button widget contained within the dialog. -Connect a handler for the clicked event. - - - - -#GtkWidget *help_button; -The help button widget contained within the dialog. -Connect a handler for the clicked event. - - - - - - - - - -Creates a new #GtkColorSelectionDialog. - - -@title: a string containing the title text for the dialog. -@Returns: a #GtkColorSelectionDialog. diff --git a/docs/reference/gtk/tmpl/gtkcombo.sgml b/docs/reference/gtk/tmpl/gtkcombo.sgml deleted file mode 100644 index 7113bbe6e4..0000000000 --- a/docs/reference/gtk/tmpl/gtkcombo.sgml +++ /dev/null @@ -1,204 +0,0 @@ - -GtkCombo - - -a text entry field with a dropdown list. - - - -The #GtkCombo widget consists of a single-line text entry field and a drop-down -list. The drop-down list is displayed when the user clicks on a small arrow -button to the right of the entry field. - - -The drop-down list is a #GtkList widget and can be accessed using the -list member of the #GtkCombo-struct. -List elements can contain arbitrary widgets, but if an element is not a -plain label, then you must use the gtk_list_set_item_string() function. -This sets the string which will be placed in the text entry field when the -item is selected. - - -By default, the user can step through the items in the list using the -arrow (cursor) keys, though this behaviour can be turned off with -gtk_combo_set_use_arrows(). - - -Normally the arrow keys are only active when the contents of the text entry -field matches one of the items in the list. If the contents of the entry field -do not match any of the list items, then pressing the arrow keys does nothing. -However, by calling gtk_combo_set_use_arrows_always() you can specify that the -arrow keys are always active. If the contents of the entry field does not match -any of the items in the list, then pressing the up or down arrow key will set -the entry field to the last or first item in the list, respectively. - - - -Creating a #GtkCombo widget with simple text items. - - GtkWidget *combo; - GList *items = NULL; - - items = g_list_append (items, "First Item"); - items = g_list_append (items, "Second Item"); - items = g_list_append (items, "Third Item"); - items = g_list_append (items, "Fourth Item"); - items = g_list_append (items, "Fifth Item"); - - combo = gtk_combo_new (); - gtk_combo_set_popdown_strings (GTK_COMBO (combo), items); - - - - -Creating a #GtkCombo widget with a complex item. - - GtkWidget *combo, *item, *hbox, *arrow, *label; - - combo = gtk_combo_new (); - - item = gtk_list_item_new (); - gtk_widget_show (item); - - /* You can put almost anything into the GtkListItem widget. Here we will use - a horizontal box with an arrow and a label in it. */ - hbox = gtk_hbox_new (FALSE, 3); - gtk_container_add (GTK_CONTAINER (item), hbox); - gtk_widget_show (hbox); - - arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_OUT); - gtk_widget_show (arrow); - gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 0); - - label = gtk_label_new ("First Item"); - gtk_widget_show (label); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - - /* You must set the string to display in the entry field when the item is - selected. */ - gtk_combo_set_item_string (GTK_COMBO (combo), GTK_ITEM (item), "1st Item"); - - /* Now we simply add the item to the combo's list. */ - gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), item); - - - - - - - - - - -The #GtkFixedChild-struct struct contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#GtkWidget *entry; -the text entry field. - - - -#GtkWidget *list; -the list shown in the drop-down window. - - - - - - - - -Creates a new #GtkCombo. - - -@Returns: a new #GtkCombo. - - - - -Convenience function to set all of the items in the popup list. -(See the example above.) - - -@combo: a #GtkCombo. -@strings: a list of strings. - - - - -Specifies whether the value entered in the text entry field must match one of -the values in the list. If this is set then the user will not be able to -perform any other action until a valid value has been entered. - - -If an empty field is acceptable, the @ok_if_empty parameter should be TRUE. - - -@combo: a #GtkCombo. -@val: TRUE if the value entered must match one of the values in the list. -@ok_if_empty: TRUE if an empty value is considered valid. - - - - -Specifies if the arrow (cursor) keys can be used to step through the items in -the list. This is on by default. - - -@combo: a #GtkCombo. -@val: TRUE if the arrow keys can be used to step through the items in the list. - - - - -Specifies if the arrow keys will still work even if the current contents of the -#GtkEntry field do not match any of the list items. - - -@combo: a #GtkCombo. -@val: - - - - -Specifies whether the text entered into the #GtkEntry field and the text in -the list items is case sensitive. - - -This may be useful, for example, when you have called -gtk_combo_set_value_in_list() to limit the values entered, but you are not -worried about differences in case. - - -@combo: a #GtkCombo. -@val: - - - - -Sets the string to place in the #GtkEntry field when a particular list item is -selected. This is needed if the list item is not a simple label. - - -@combo: a #GtkCombo. -@item: a #GtkItem which -@item_value: the string to place in the #GtkEntry when @item is selected. - - - - -Stops the #GtkCombo widget from showing the popup list when the #GtkEntry -emits the "activate" signal, i.e. when the Return key is pressed. -This may be useful if, for example. you want the Return key to close a dialog -instead. - - -@combo: a #GtkCombo. - - diff --git a/docs/reference/gtk/tmpl/gtkcontainer.sgml b/docs/reference/gtk/tmpl/gtkcontainer.sgml deleted file mode 100644 index d6782383c4..0000000000 --- a/docs/reference/gtk/tmpl/gtkcontainer.sgml +++ /dev/null @@ -1,404 +0,0 @@ - -GtkContainer - - - - - - - - - - - - - - - - - - - - - - - - - -@widget: - - - - - - - - - - - - - - -@container: -@widget: - - - - - - - -@container: -@widget: - - - - - - - -@container: -@resize_mode: - - - - - - - -@container: - - - - - - - -@container: -@callback: -@callback_data: - - - - - - - -@container: -@callback: -@marshal: -@callback_data: -@notify: - - - - - - - -@container: -@Returns: - - - - - - - -@container: -@direction: -@Returns: - - - - - - - -@container: -@child: - - - - - - - -@container: -@adjustment: - - - - - - - -@container: -@adjustment: - - - - - - - -@container: - - - - - - - -@container: - - - - - - - -@container: - - - - - - - -@container: -@Returns: - - - - - - - -@arg_name: -@arg_type: -@arg_flags: -@arg_id: - - - - - - - -@class_type: -@arg_flags: -@nargs: -@Returns: - - - - - - - -@container: -@child: -@n_args: -@args: - - - - - - - -@container: -@child: -@n_args: -@args: - - - - - - - -@container: -@widget: -@first_arg_name: -@Varargs: - - - - - - - -@container: -@widget: -@n_args: -@args: - - - - - - - -@container: -@child: -@first_arg_name: -@Varargs: - - - - - - - -@container: - - - - - - - -@container: - - - - - - - -@container: -@child: -@arg: -@info: - - - - - - - -@container: -@child: -@arg: -@info: - - - - - - - -@object_type: -@arg_list_p: -@info_list_p: -@first_arg_name: -@args: -@Returns: - - - - - - - -@object_type: -@arg_name: -@info_p: -@Returns: - - - - - - - -@container: -@callback: -@callback_data: - - - - - - - -@container: -@child: -@Returns: - - - - - - - -@Returns: - - - - - - - -@container: -@border_width: - - - - - - - -@container: the object which received the signal. -@widget: - - - - - - -@container: the object which received the signal. -@widget: - - - - - - -@container: the object which received the signal. - - - - - - -@container: the object which received the signal. -@direction: -@Returns: - - - - - - -@container: the object which received the signal. -@widget: - - - - - - - - - - - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkctree.sgml b/docs/reference/gtk/tmpl/gtkctree.sgml deleted file mode 100644 index 1979f30d3b..0000000000 --- a/docs/reference/gtk/tmpl/gtkctree.sgml +++ /dev/null @@ -1,1257 +0,0 @@ - -GtkCTree - - -a widget displaying a hierarchical tree. - - - -The #GtkCTree widget is used for showing a hierarchical tree -to the user, for example a directory tree. - - -The tree is internally represented as a set of #GtkCTreeNode structures. - - -The interface has much in common with the #GtkCList widget: rows (nodes) -can be selected by the user etc. - - -Positions in the tree are often indicated by two arguments, a -parent and a sibling, both #GtkCTreeNode pointers. If the parent -is %NULL, the position is at the root of the tree and if the sibling -is %NULL, it will be the last child of parent, otherwise it will be -inserted just before the sibling. - - - - - - - - - -The #GtkCTree-struct contains the following user-accessible fields. -These fields should be considered read-only; to set the values, -use the methods below. - - - - - - -#gint tree_indent; -The number of pixels each successive level of the tree is -indented in the display. - - - -#gint tree_spacing; -The space in pixels between the graphical tree and the text in the -node. - - - -#gint tree_column; -The index of the column for which the tree graphics is drawn. - - - -#GtkCTreeLineStyle line_style; -The style in which the lines in the tree graphics are drawn. - - - -#GtkCTreeExpanderStyle expander_style; -The style in which the expander buttons are drawn. - - - -#GtkCTreeExpanderStyle expander_style; -FIXME. - - - - - - - - -Used to get the #GtkCTreeRow structure corresponding to the given #GtkCTreeNode. - - -@_node_: - - - - - - - -@_node_: - - - - -FIXME - - -@_nnode_: - - - - -FIXME - - -@_pnode_: - - - - - - - -@_func_: - - - - -A value specifying the position of a new node relative to an old one. - - - - - - -GTK_CTREE_POS_BEFORE -As a sibling, before the specified node. - - - -GTK_CTREE_POS_AS_CHILD -As a child of the specified node. - - - -GTK_CTREE_POS_AFTER -As a sibling, after the specified node. - - - - - - -@GTK_CTREE_POS_BEFORE: -@GTK_CTREE_POS_AS_CHILD: -@GTK_CTREE_POS_AFTER: - - - -The appearance of the lines in the tree graphics. - - - - - - -GTK_CTREE_LINES_NONE -No lines. - - - -GTK_CTREE_LINES_SOLID -Solid lines. - - - -GTK_CTREE_LINES_DOTTED -Dotted lines. - - - -GTK_CTREE_LINES_TABBED -FIXME. - - - - - - - -@GTK_CTREE_LINES_NONE: -@GTK_CTREE_LINES_SOLID: -@GTK_CTREE_LINES_DOTTED: -@GTK_CTREE_LINES_TABBED: - - - -The appearance of the expander buttons, i.e. the small buttons -which expand or contract parts of the tree when pressed. - - - - - - - -GTK_CTREE_EXPANDER_NONE -No expanders. - - - -GTK_CTREE_EXPANDER_SQUARE -Square expanders. - - - -GTK_CTREE_EXPANDER_TRIANGLE -Triangular expanders. - - - -GTK_CTREE_EXPANDER_CIRCULAR -Round expanders. - - - - - - - -@GTK_CTREE_EXPANDER_NONE: -@GTK_CTREE_EXPANDER_SQUARE: -@GTK_CTREE_EXPANDER_TRIANGLE: -@GTK_CTREE_EXPANDER_CIRCULAR: - - - -How to expand or collapse a part of a tree. - - - - - - -GTK_CTREE_EXPANSION_EXPAND -Expand this node. - - - -GTK_CTREE_EXPANSION_EXPAND_RECURSIVE -Expand this node and everything below it in the hierarchy. - - - -GTK_CTREE_EXPANSION_COLLAPSE -Collapse this node. - - - -GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE -Collapse this node and everything below it in the hierarchy. - - - -GTK_CTREE_EXPANSION_TOGGLE -Toggle this node (i.e. expand if collapsed and vice versa). - - - -GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE -Toggle this node and everything below it in the hierarchy. - - - - - - - - -@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: - - - -A generic callback type to do something with a particular node. - - -@ctree: The #GtkCTree object. -@node: The #GtkCTreeNode in the tree. -@data: The user data associated with the node. - - - - -FIXME - - -@ctree: -@depth: -@gnode: -@cnode: -@data: -@Returns: - - - - -FIXME - - -@ctree: -@source_node: -@new_parent: -@new_sibling: -@Returns: - - - - -A structure representing a single row in the tree graph. -The values inside the structure should be considered read-only. -This structure is derived from the #GtkCListRow structure. - - - - - - -#GtkCTreeNode *parent; -The parent node of the node corresponding to this row. - - - - -#GtkCTreeNode *sibling; -The next sibling node of the node corresponding to this row. - - - - -#GtkCTreeNode *children; -The first child node corresponding to this row; to access -the other children, just use the siblings of that node. - - - - -#GdkPixmap *pixmap_closed; - The pixmap to be shown when the node is collapsed. - - - - -#GdkBitmap *mask_closed; - The mask for the above pixmap. - - - - -#GdkPixmap *pixmap_opened; - The pixmap to be shown when the node is expanded. - - - - -#GdkBitmap *mask_opened; - The mask for the above pixmap. - - - - -#guint16 level; -The level of this node in the tree. - - - - - -#guint is_leaf : 1; -Whether this row is a leaf. - - - - -#guint expanded : 1; -Whether the children of this row are visible. - - - - - - -@row: -@parent: -@sibling: -@children: -@pixmap_closed: -@mask_closed: -@pixmap_opened: -@mask_opened: -@level: -@is_leaf: -@expanded: - - - -This structure is opaque - you should use the -macros #GTK_CTREE_ROW, #GTK_CTREE_NODE_NEXT etc. as well -as the functions below to access it. - - -@list: - - - -This function is not usually used by users. - - -@ctree: -@columns: -@tree_column: -@titles: - - - - -Create a new #GtkCTree widget with the given titles for the columns. - - -@columns: Number of columns. -@tree_column: Which column has the tree graphic; 0 = leftmost. -@titles: The titles for the columns. -@Returns: The #GtkCTree widget. - - - - -Create a new #GtkCTree widget. - - -@columns: Number of columns. -@tree_column: Which columns has the tree graphic. -@Returns: The new #GtkCTree widget. - - - - -Insert a new node to the tree. The position is specified through -the parent-sibling notation, as explained in the introduction above. - - -@ctree: The #GtkCTree widget. -@parent: The parent node to be. -@sibling: The sibling node to be. -@text: The texts to be shown in each column. -@spacing: The extra space between the pixmap and the text. -@pixmap_closed: The pixmap to be used when the node is collapsed. Can be %NULL. -@mask_closed: The mask for the above pixmap. Can be %NULL. -@pixmap_opened: The pixmap to be used when the children are visible. Can be %NULL. -@mask_opened: The mask for the above pixmap. Can be %NULL. -@is_leaf: Whether this node is going to be a leaf. -@expanded: Whether this node should start out expanded or not. -@Returns: - - - - -Remove the node and all nodes underneath it from the tree. - - -@ctree: The widget. -@node: The node to be removed. - - - - -FIXME - - -@ctree: -@parent: -@sibling: -@gnode: -@func: -@data: -@Returns: - - - - -FIXME - - -@ctree: -@parent: -@sibling: -@node: -@func: -@data: -@Returns: - - - - -Recursively apply a function to all nodes of the tree at or below a certain -node. -The function is called for each node after it has been called -for that node's children. - - -@ctree: -@node: The node where to start. %NULL means to start at the root. -@func: The function to apply to each node. -@data: A closure argument given to each invocation of the function. - - - - -Recursively apply a function to nodes up to a certain depth. -The function is called for each node after it has been called -for that node's children. - - -@ctree: -@node: The node where to start. -@depth: The maximum absolute depth for applying the function. If depth is negative, this function just calls #gtk_ctree_post_recursive. -@func: The function to apply to each node. -@data: A closure argument given to each invocation of the function. - - - - -Recursively apply a function to all nodes of the tree at or below a certain -node. -The function is called for each node after it has been called -for its parent. - - -@ctree: -@node: The node where to start. %NULL means to start at the root. -@func: The function to apply to each node. -@data: A closure argument given to each invocation of the function. - - - - -Recursively apply a function to nodes up to a certain depth. -The function is called for each node after it has been called -for that node's children. - - -@ctree: -@node: The node where to start. -@depth: The maximum absolute depth for applying the function. If depth is negative, this function just calls #gtk_ctree_post_recursive. -@func: The function to apply to each node. -@data: A closure argument given to each invocation of the function. - - - - -This function checks whether the given node is viewable i.e. so that -all of its parent nodes are expanded. This is different from being -actually visible: the node can be viewable but outside the scrolling -area of the window. - - -@ctree: -@node: -@Returns: Whether the node is viewable. - - - - -Returns the last child of the last child of the last child... -of the given node. - - -@ctree: -@node: -@Returns: - - - - -Finds the node pointer given a #GtkCTreeRow structure. - - -@ctree: -@ctree_row: -@Returns: The node pointer. - - - - - - - -@ctree: -@node: The node to start searching from. May be %NULL. -@child: -@Returns: True if @child is on some level a child (grandchild...) of the @node. - - - - - - - -@ctree: -@node: -@child: -@Returns: True is @node is an ancestor of @child. - - - - -Finds a node in the tree under @node that has the given user data pointer. - - -@ctree: -@node: -@data: -@Returns: The node, or %NULL if not found. - - - - -Finds all nodes in the tree under @node that have the given user data pointer. - - -@ctree: -@node: -@data: -@Returns: A list of nodes that have the given data pointer. - - - - -Find the first node under @node whose row data pointer fulfills -a custom criterion. - - -@ctree: -@node: The node where to start searching. -@data: User data for the criterion function. -@func: The criterion function. -@Returns: The first node found. - - - - -Find all nodes under @node whose row data pointer fulfills -a custom criterion. - - - -@ctree: -@node: The node where to start searching. -@data: User data for the criterion function. -@func: The criterion function. -@Returns: A list of all nodes found. - - - - - - -@ctree: -@x: -@y: -@Returns: True if the given coordinates lie on an expander button. - - - - -Move a node in the tree to another location. - - -@ctree: -@node: The node to be moved. -@new_parent: The new parent-to-be of the node. -@new_sibling: The new sibling-to-be of the node. - - - - -Expand one node. - - -@ctree: -@node: - - - - -Expand one node and all nodes underneath. - - -@ctree: -@node: - - - - -Expand a node and its children up to the depth given. - - -@ctree: -@node: -@depth: The (absolute) depth up to which to expand nodes. - - - - -Collapse one node. - - -@ctree: -@node: - - - - -Collapse one node and all its subnodes. - - -@ctree: -@node: - - - - -Collapse a node and its children up to the depth given. - - -@ctree: -@node: -@depth: The (absolute) depth up to which to collapse nodes. - - - - -Toggle a node, i.e. if it is collapsed, expand it and vice versa. - - -@ctree: -@node: - - - - -Toggle the expansion of a node and all its children. - - -@ctree: -@node: - - - - -Cause the given node to be selected and emit the appropriate signal. - - -@ctree: -@node: - - - - -Cause the given node and its subnodes to be selected and emit the appropriate signal(s). - - -@ctree: -@node: - - - - -Unselect the given node and emit the appropriate signal. - - -@ctree: -@node: - - - - -Unselect the given node and its subnodes and emit the appropriate signal(s). - - -@ctree: -@node: - - - - -The function that implements both #gtk_ctree_select_recursive and -#gtk_ctree_unselect_recursive. - - -@ctree: -@node: -@state: True for selecting, false for unselecting. - - - - -Set the text in a node. - - -@ctree: -@node: -@column: The column whose text to change. -@text: The new text. - - - - -FIXME - - -@ctree: -@node: -@column: -@pixmap: -@mask: - - - - -FIXME - - -@ctree: -@node: -@column: -@text: -@spacing: -@pixmap: -@mask: - - - - -Change the information. Most parameters correspond -to the parameters of #gtk_ctree_insert_node. - - -@ctree: -@node: -@text: The text to be in the tree column. -@spacing: -@pixmap_closed: -@mask_closed: -@pixmap_opened: -@mask_opened: -@is_leaf: -@expanded: - - - - -Shift the given cell the given amounts in pixels. - - -@ctree: -@node: -@column: -@vertical: -@horizontal: - - - - - - - -@ctree: -@node: -@selectable: Whether this node can be selected by the user. - - - - - - - -@ctree: -@node: -@Returns: Whether this node can be selected by the user. - - - - - - - -@ctree: -@node: -@column: -@Returns: The type of the given cell. - - - - - - - -@ctree: -@node: -@column: -@text: If nonnull, the pointer to the text string is assigned to *@text. -@Returns: True if the given cell has text in it. - - - - - - - -@ctree: -@node: -@column: -@pixmap: If nonnull, the pointer to the pixmap is returned through this. -@mask: If nonnull, the pointer to the mask is returned through this. -@Returns: True if the given cell contains a pixmap. - - - - -Get the parameters of a cell containing both a pixmap and text. - - -@ctree: -@node: -@column: -@text: -@spacing: -@pixmap: -@mask: -@Returns: - - - - -Get information corresponding to a node. -Any of the return parameters can be null. - - -@ctree: -@node: -@text: -@spacing: -@pixmap_closed: -@mask_closed: -@pixmap_opened: -@mask_opened: -@is_leaf: -@expanded: -@Returns: - - - - -Set the style of a row. - - -@ctree: -@node: -@style: - - - - -Get the style of a row. - - -@ctree: -@node: -@Returns: - - - - -Set the style of an individual cell. - - -@ctree: -@node: -@column: -@style: - - - - -Get the style of an individual cell. - - -@ctree: -@node: -@column: -@Returns: - - - - - - - -@ctree: -@node: -@color: - - - - - - - -@ctree: -@node: -@color: - - - - -Set the custom data associated with a node. - - -@ctree: -@node: -@data: - - - - -This is the full interface to setting row data, so that a destructor -can be given for the data. - - -@ctree: -@node: -@data: -@destroy: The routine to be called when @data is no longer needed. - - - - - - - -@ctree: -@node: -@Returns: - - - - -This function makes the given column of the given node visible by -scrolling. - - -@ctree: -@node: The node to be made visible. -@column: The column to be made visible. -@row_align: Where in the window the row should appear. -@col_align: Where in the window the column should appear. - - - - - - - -@ctree: -@node: -@Returns: True if the node is currently inside the bounds of the window. -Note that this function can return true even if the node is not -viewable, if the node's ancestor is visible. - - - - - - - -@ctree: -@indent: The number of pixels to shift the levels of the tree. - - - - -The spacing between the tree graphic and the actual node content. - - -@ctree: -@spacing: - - - - - - - -@t: -@r: - - - - - - - -@ctree: -@line_style: - - - - - - - -@ctree: -@expander_style: - - - - -FIXME - - -@ctree: -@cmp_func: - - - - -Sort the children of a node. See #GtkCList for how to set the sorting -criteria etc. - - -@ctree: -@node: - - - - -Sort the descendants of a node. See #GtkCList for how to set the sorting -criteria etc. - - -@ctree: -@node: - - - - - - - -@ctree: -@row: -@Returns: The node corresponding to the @row th row. - - - - - - - -@ctree: -@show_stub: - - - - -Emitted when a row is selected. - - -@ctree: the object which received the signal. -@node: The node corresponding to the selected row. -@column: The column which was selected. - - - -Emitted when a node is unselected. - - -@ctree: the object which received the signal. -@node: The node corresponding to the selected row. -@column: - - - -Emitted when a node is expanded. - - -@ctree: the object which received the signal. -@node: - - - -Emitted when a node is collapsed. - - -@ctree: the object which received the signal. -@node: - - - -Emitted when a node is moved. - - -@ctree: the object which received the signal. -@node: The node that is moved. -@new_parent: The new parent of the node. -@new_sibling: The new sibling of the node. - - - -The row which has the focus is either collapsed or expanded -or toggled. - - -@ctree: the object which received the signal. -@expansion: What is being done. - - - -The number of columns in the tree. - - - - -The column in which the actual tree graphic appears. - - - - -The number of pixels to indent the tree levels. - - - - -The number of pixels between the tree and the columns. - - - - -FIXME - - - - -The style of the lines in the tree graphic. - - - - -The style of the expander buttons. - - diff --git a/docs/reference/gtk/tmpl/gtkcurve.sgml b/docs/reference/gtk/tmpl/gtkcurve.sgml deleted file mode 100644 index e8ada7ac68..0000000000 --- a/docs/reference/gtk/tmpl/gtkcurve.sgml +++ /dev/null @@ -1,125 +0,0 @@ - -GtkCurve - - -allows direct editing of a curve. - - - -The #GtkCurve widget allows the user to edit a curve covering a range of -values. It is typically used to fine-tune color balances in graphics -applications like the Gimp. - - -The #GtkCurve widget has 3 modes of operation - spline, linear and free. -In spline mode the user places points on the curve which are automatically -connected together into a smooth curve. In linear mode the user places points -on the curve which are connected by straight lines. In free mode the user can -draw the points of the curve freely, and they are not connected at all. - - - - - - -#GtkGammaCurve -a subclass for editing gamma curves. - - - - - - - - -The #GtkCurve-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkCurve. - - -@Returns: a new #GtkCurve. - - - - -Resets the curve to a straight line from the minimum x & y values to the -maximum x & y values (i.e. from the bottom-left to the top-right corners). -The curve type is not changed. - - -@curve: a #GtkCurve. - - - - -Recomputes the entire curve using the given gamma value. -A gamma value of 1 results in a straight line. Values greater than 1 result -in a curve above the straight line. Values less than 1 result in a curve -below the straight line. The curve type is changed to %GTK_CURVE_TYPE_FREE. -FIXME: Needs a more precise definition of gamma. - - -@curve: a #GtkCurve. -@gamma: the gamma value. - - - - -Sets the minimum and maximum x & y values of the curve. -The curve is also reset with a call to gtk_curve_reset(). - - -@curve: a #GtkCurve. -@min_x: the minimum x value. -@max_x: the maximum x value. -@min_y: the minimum y value. -@max_y: the maximum y value. - - - - -Returns a vector of points representing the curve. - - -@curve: a #GtkCurve. -@veclen: the number of points to calculate. -@vector: returns the points. - - - - -Sets the vector of points on the curve. -The curve type is set to %GTK_CURVE_TYPE_FREE. - - -@curve: a #GtkCurve. -@veclen: the number of points. -@vector: the points on the curve. - - - - -Sets the type of the curve. The curve will remain unchanged except when -changing from a free curve to a linear or spline curve, in which case the -curve will be changed as little as possible. - - -@curve: a #GtkCurve. -@type: the type of the curve. - - - - -Emitted when the curve type has been changed. -The curve type can be changed explicitly with a call to -gtk_curve_set_curve_type(). It is also changed as a side-effect of -calling gtk_curve_reset() or gtk_curve_set_gamma(). - - -@curve: the object which received the signal. - diff --git a/docs/reference/gtk/tmpl/gtkdata.sgml b/docs/reference/gtk/tmpl/gtkdata.sgml deleted file mode 100644 index e24459d5d2..0000000000 --- a/docs/reference/gtk/tmpl/gtkdata.sgml +++ /dev/null @@ -1,38 +0,0 @@ - -GtkData - - -abstract base class for objects containing data. - - - -The #GtkData object is a very simple object intended to be used as a base -class for objects which contain data (i.e. the 'Model' in the object-oriented -Model/View/Controller framework). - - -Currently it is not very useful since all it provides is a "disconnect" signal. -This signal could be emitted by a #GtkData subclass to notify any 'Views' -that they should disconnect from the #GtkData (the 'Model'), possibly just -before the #GtkData is destroyed. - - - - - - - - - -The #GtkData-struct struct contains no public fields. - - - - - -Emitted to notify any views on the #GtkData object to disconnect from it, -possibly because the #GtkData object is about to be destroyed. - - -@data: the object which received the signal. - diff --git a/docs/reference/gtk/tmpl/gtkdebug.sgml b/docs/reference/gtk/tmpl/gtkdebug.sgml deleted file mode 100644 index 12195b2279..0000000000 --- a/docs/reference/gtk/tmpl/gtkdebug.sgml +++ /dev/null @@ -1,42 +0,0 @@ - -Debugging - - - - - - - - - - - - - - - - - - - -@GTK_DEBUG_OBJECTS: -@GTK_DEBUG_MISC: -@GTK_DEBUG_SIGNALS: -@GTK_DEBUG_DND: -@GTK_DEBUG_PLUGSOCKET: - - - - - - - - - - - - -@type: -@action: - - diff --git a/docs/reference/gtk/tmpl/gtkdialog.sgml b/docs/reference/gtk/tmpl/gtkdialog.sgml deleted file mode 100644 index 9c0b709470..0000000000 --- a/docs/reference/gtk/tmpl/gtkdialog.sgml +++ /dev/null @@ -1,119 +0,0 @@ - -GtkDialog - - - -create popup windows. - - - -Dialog boxes are a convenient way to prompt the user for a small amount of -input, eg. to display -a message, ask a question, or anything else that does not require extensive -effort on the user's part. - - -Gtk+ treats a dialog as a window split horizontally. The top section is a -#GtkVBox, and is where widgets such as a #GtkLabel or a #GtkEntry should be -packed. The second area is known as the action_area. This is generally used -for packing buttons into the dialog which may perform functions such as cancel, ok, or apply. The two -areas are separated by a #GtkHSeparator. - - -#GtkDialog boxes are created with a call to gtk_dialog_new(). - - -If 'dialog' is a newly created dialog, the two primary areas of the window -can be accessed as GTK_DIALOG(dialog)->vbox and GTK_DIALOG(dialog)->action_area, -as can be seen from the example, below. - - -A 'modal' dialog (that is, one which freezes the rest of the application -from user input), can be created by calling gtk_window_set_modal() on the dialog. Use the -GTK_WINDOW() macro to cast the widget returned from gtk_dialog_new() into a -#GtkWindow. - - - -Using a #GtkDialog to keep the user informed. - - -/* Function to open a dialog box displaying the message provided. */ - -void quick_message(#gchar *message) { - - #GtkWidget *dialog, *label, *okay_button; - - /* Create the widgets */ - - dialog = gtk_dialog_new(); - label = gtk_label_new (message); - okay_button = gtk_button_new_with_label("Okay"); - - /* Ensure that the dialog box is destroyed when the user clicks ok. */ - - gtk_signal_connect_object (GTK_OBJECT (okay_button), "clicked", - GTK_SIGNAL_FUNC (gtk_widget_destroy), dialog); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->action_area), - okay_button); - - /* Add the label, and show everything we've added to the dialog. */ - - gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), - label); - gtk_widget_show_all (dialog); -} - - - - - - - - - - -#GtkVBox -Pack widgets vertically. - - -#GtkWindow -Alter the properties of your dialog box. - - -#GtkButton -Add them to the action_area to get a -response from the user. - - - - - - -window is a #GtkWindow, but should not be -modified directly, (use the functions provided, such as -gtk_window_set_title(). See the #GtkWindow section for more). - - -vbox is a #GtkVBox - the main part of the dialog box. - - -action_area is a #GtkHBox packed below the dividing #GtkHSeparator in the dialog. It is treated exactly the same as any other #GtkHBox. - - - - - -Deprecated. - - - - - -Creates a new dialog box. Widgets should not be packed into this #GtkWindow -directly, but into the vbox and action_area, as described above. - - -@Returns: a #GtkWidget - the newly created dialog box. - - diff --git a/docs/reference/gtk/tmpl/gtkdnd.sgml b/docs/reference/gtk/tmpl/gtkdnd.sgml deleted file mode 100644 index e8a32624d4..0000000000 --- a/docs/reference/gtk/tmpl/gtkdnd.sgml +++ /dev/null @@ -1,345 +0,0 @@ - -Drag and Drop - - -Functions for controlling drag and drop handling. - - - -GTK+ has a rich set of functions for doing inter-process -communication via the drag-and-drop metaphore. GTK+ -can do drag and drop (DND) via multiple protocols. -The currently supported protocols are the Xdnd and -Motif protocols. - -As well as the functions listed here, applications -may need to use some facilities provided for -Selections. -Also, the Drag and Drop API makes use of signals -in the #GtkWidget class. - - - - - - - - - -The #GtkDestfaults enumeration specifies the various -types of action that will be taken on behalf -of the user for a drag destination site. - - - - - - -GTK_DEST_DEFAULT_MOTION - - If set for a widget, GTK+, during a drag over this - widget will check if the drag matches this widget's - list of possible targets and actions. - GTK+ will then call gtk_drag_status() as appropriate. - - - - -GTK_DEST_DEFAULT_HIGHLIGHT - - If set for a widget, GTK+ will draw a highlight on - this widget as long as a drag is over this widget - and the wiget drag format and action is accetable. - - - -GTK_DEST_DEFAULT_DROP - - If set for a widget, when a drop occurs, GTK+ will - will check if the drag matches this widget's - list of possible targets and actions. If so, - GTK+ will call gtk_drag_data_get() on behalf - of the widget. Whether or not the drop is succesful, - GTK+ will call gtk_drag_finish(). If the action - was a move, then if the drag was succesful, then - %TRUE will be passed for the @delete parameter - to gtk_drag_finish(). - - - - -GTK_DEST_DEFAULT_ALL - - If set, specifies that all default actions should - be taken. - - - - - -@GTK_DEST_DEFAULT_MOTION: -@GTK_DEST_DEFAULT_HIGHLIGHT: -@GTK_DEST_DEFAULT_DROP: -@GTK_DEST_DEFAULT_ALL: - - - -The #GtkTargetFlags enumeration is used to specifies -constraints on an entry in a GtkTargetTable. - - - %GTK_TARGET_SAME_APP - - - If this is set, the target will only be selected - for drags within a single application. - - - - %GTK_TARGET_SAME_WIDGET - - - If this is set, the target will only be selected - for drags within a single widget. - - - - - -@GTK_TARGET_SAME_APP: -@GTK_TARGET_SAME_WIDGET: - - - -Set a widget as a potential drop destination. - - -@widget: a widget -@flags: the flags that specify what actions GTK+ should take - on behalf of a widget for drops onto that widget. The @targets - and @actions fields only are used if %GTK_DEST_DEFAULT_MOTION - or %GTK_DEST_DEFAULT_DROP are given. -@targets: a pointer to an array of #GtkTargetEntry indicating - the drop types that this widget will accept. -@n_targets: the number of entries in @targets. -@actions: a bitmask of possible actions for a drop onto this - widget. - - - - -Set this widget as a proxy for drops to another window. - - -@widget: a #GtkWidget -@proxy_window: the window to which to forward drag events -@protocol: the drag protocol which the @proxy_window accepts - (You can use gdk_drag_get_protocol() to determine this) -@use_coordinates: If true, send the same coordinates to the - destination, because it is a embedded - subwindow. - - - - -Clear information about a drop destination set with -gtk_drag_dest_set(). The widget will no longer receive -notification of drags. - - -@widget: a #GtkWidget - - - - -Inform the drag source that the drop is finished, and -that the data of the drag will no longer be required. - - -@context: the drag context. -@success: a flag indicating whether the drop was succesful -@del: a flag indicating whether the source should delete the - original data. (This should be %TRUE for a move) -@time: the timestamp from the "drag_data_drop" signal. - - - - -Get the data associated with a drag. When the data -is received or the retrieval fails, GTK+ will emit a -"drag_data_received" signal. Failure of the retrieval -is indicated by the length field of the @selection_data -signal parameter being negative. However, when gtk_drag_get_data() -is called implicitely because the %GTK_DRAG_DEFAULT_DROP was set, -then the widget will not receive notification of failed -drops. - - -@widget: the widget that will receive the "drag_data_received" - signal. -@context: the drag context -@target: the target (form of the data) to retrieve. -@time: a timestamp for retrieving the data. This will - generally be the time received in a "drag_data_motion" - or "drag_data_drop" signal. - - - - -Determine the source widget for a drag. - - -@context: a (destination side) drag context. -@Returns: if the drag is occurring within a single application, - a pointer to the source widget. Otherwise, NULL. - - - - -Draw a highlight around a widget. This will attach -handlers to "expose_event" and "draw", so the highlight -will continue to be displayed until gtk_drag_unhighlight -is called. - - -@widget: a widget to highlight - - - - -Remove a highlight set by gtk_drag_highlight() from -a widget. -is called. - - -@widget: a widget to remove the highlight from. - - - - -Initiate a drag on the source side. The function -only needs to be used when the application is -starting drags itself, and is not needed when -gtk_drag_source_set() is used. - - -@widget: the source widget. -@targets: The targets (data formats) in which the - source can provide the data. -@actions: A bitmask of the allowed drag actions for this - drag. -@button: The button the user clicked to start the drag. -@event: The event that triggered the start of the - drag. Usually -@Returns: The context for this drag. - - - - -Change the icon for a widget to a given widget. GTK+ -will not destroy the icon, so if you don't want -it to persist, you should connect to the "drag_end" -signal and destroy it yourself. - - -@context: the context for a drag. (This must be called - with a context for the source side of a drag) -@widget: A toplevel window to use as an icon. -@hot_x: The X offset within @widget of the hotspot. -@hot_y: The Y offset within @widget of the hotspot. - - - - -Sets a given pixmap as the icon for a given drag. -GTK+ retains a reference count for the arguments, and -will release them when they are no longer needed. - - -@context: the context for a drag. (This must be called - with a context for the source side of a drag) -@colormap: the colormap of the icon -@pixmap: the image data for the icon -@mask: the transparency mask for an image. -@hot_x: The X offset within @widget of the hotspot. -@hot_y: The Y offset within @widget of the hotspot. - - - - -Set the icon for a particular drag to the default -icon. - - -@context: the context for a drag. (This must be called - with a context for the source side of a drag) - - - - -Change the default drag icon. GTK+ retains a reference count for the -arguments, and will release them when they are no longer needed. - - -@colormap: the colormap of the icon -@pixmap: the image data for the icon -@mask: the transparency mask for an image. -@hot_x: The X offset within @widget of the hotspot. -@hot_y: The Y offset within @widget of the hotspot. - - - - -Sets up a widget so that GTK+ will start a drag -operation when the user clicks and drags on the -widget. The widget must have a window. - - -@widget: a #GtkWidget -@start_button_mask: the bitmask of buttons that can start the drag -@targets: the table of targets that the drag will support -@n_targets: the number of items in @targets -@actions: the bitmask of possible actions for a drag from this - widget. - - - - -Sets the icon that will be used for drags from a -particular widget. GTK+ retains a reference count -for the arguments, and will release them when -they are no longer needed. - - -@widget: a #GtkWidget -@colormap: the colormap of the icon -@pixmap: the image data for the icon -@mask: the transparency mask for an image. - - - - -Undo the effects of gtk_drag_source_set(). - - -@widget: a #GtkWidget - - - - -Internal function. - - -@widget: -@event: - - - - -Internal function. - - -@toplevel: -@event: - - diff --git a/docs/reference/gtk/tmpl/gtkdrawingarea.sgml b/docs/reference/gtk/tmpl/gtkdrawingarea.sgml deleted file mode 100644 index 94cf07e042..0000000000 --- a/docs/reference/gtk/tmpl/gtkdrawingarea.sgml +++ /dev/null @@ -1,110 +0,0 @@ - -GtkDrawingArea - - -a widget for custom user interface elements. - - - -The #GtkDrawingArea widget is used for creating custom -user interface elements. After creating a drawing -area, the application may want to connect to: - - - - Mouse and button press signals to respond to input from - the user. - - - - - The "realize" signal to take any necessary actions - when the widget - - - - - The "size_allocate" signal to take any necessary actions - when the widget changes size. - - - - - The "expose_event" signal to handle redrawing the - contents of the widget. - - - -As a convenience, the #GtkDrawingArea widget synthesizes -a "configure_event" when the widget is realized -and any time the size of a widget changes when it -is realized. It often suffices to connect to this -signal instead of "realize" and "size_allocate". - - -The following code portion demonstrates using a drawing -area to implement a widget that draws a circle. -As this example demonstrates, an expose handler should -draw only the pixels within the requested area and -should draw or clear all these pixels. - - -gboolean -expose_event (GdkWidget *widget, GdkEventExpose *event, gpointer data) -{ - gdk_window_clear_area (widget->window, - event->area.x, event->area.y, - event->area.width, event->area.height); - gdk_gc_set_clip_rectangle (widget->style->fg_gc[widget->state], - &event->area); - gdk_draw_arc (widget->window, - widget->style->fg_gc[widget->state], - TRUE, - 0, 0, widget->allocation.width, widget->allocation.height, - 0, 64 * 360); - gdk_gc_set_clip_rectangle (widget->style->fg_gc[widget->state], - NULL); - - return TRUE; -} -[...] - GtkWidget *drawing_area = gdk_drawing_area_new (); - gdk_drawing_area_size (GTK_DRAWING_AREA (drawing_area), - 100, 100); - gtk_signal_connect (GTK_OBJECT (drawing_area), - - - - - - - - - -The #GtkDrawingArea-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Create a new drawing area. - - -@Returns: - - - - -Set the size that the drawing area will request -in response to a "size_request" signal. The -drawing area may actually be allocated a size -larger than this depending on how it is packed -within the enclosing containers. - - -@darea: a #GtkDrawingArea. -@width: the width to request. -@height: the height to request. - - diff --git a/docs/reference/gtk/tmpl/gtkeditable.sgml b/docs/reference/gtk/tmpl/gtkeditable.sgml deleted file mode 100644 index 0d292c9e50..0000000000 --- a/docs/reference/gtk/tmpl/gtkeditable.sgml +++ /dev/null @@ -1,442 +0,0 @@ - -GtkEditable - - -Base class for text-editing widgets. - - - -The #GtkEditable class is a base class for widgets -for editing text, such as #GtkEntry and #GtkText. It -cannot be instantiated by itself. The editable -class contains functions for generically manipulating -an editable widget, a large number of action signals -used for key bindings, and several signals that -an application can connect to to modify the behavior -of a widget. - - - -As an example of the latter usage, by connecting -the following handler to "insert_text", an application -can convert all entry into a widget into uppercase. - - - Forcing entry to uppercase - -#include <ctype.h> - -void -insert_text_handler (GtkEditable *editable, - const gchar *text, - gint length, - gint *position, - gpointer data) -{ - int i; - gchar *result = g_new (gchar, length); - - for (i=0; i<length; i++) - result[i] = islower(text[i]) ? toupper(text[i]) : text[i]; - - gtk_signal_handler_block_by_func (GTK_OBJECT (editable), - GTK_SIGNAL_FUNC (insert_text_handler), - data); - gtk_editable_insert_text (editable, result, length, position); - gtk_signal_handler_unblock_by_func (GTK_OBJECT (editable), - GTK_SIGNAL_FUNC (insert_text_handler), - data); - - gtk_signal_emit_stop_by_name (GTK_OBJECT (editable), "insert_text"); - - g_free (result); -} - - - - - - - - - - - -The #GtkEditable structure contains the following fields. -(These fields should be considered read-only. They should -never be set by an application.) - - - - - - -#guint selection_start; -the starting position of the selected characters - in the widget. - - - -#guint selection_end; -the end position of the selected characters - in the widget. - - - -#guint editable; -a flag indicating whether or not the widget is -editable by the user. - - - - - -@current_pos: -@selection_start_pos: -@selection_end_pos: -@has_selection: - - - -Callback function for old method of setting key bindings. -No longer publically used. - - -@editable: -@time: - - - - -Selects a region of text. The characters that -are selected are those characters at positions from -@start_pos up to, but not including @end_pos. If -@end_pos is negative, then the the characters selected -will be those characters from @start_pos to the end -of the text. - - -@editable: a #GtkEditable widget. -@start: the starting position. -@end: the end position. - - - - -Insert text at a given position. - - -@editable: a #GtkEditable widget. -@new_text: the text to insert. -@new_text_length: the length of the text to insert, in bytes -@position: an inout parameter. The caller initializes it to - the position at which to insert the text. After the - call it points at the position after the newly - inserted text. - - - - -Delete a sequence of characters. The characters that -are deleted are those characters at positions from -@start_pos up to, but not including @end_pos. If -@end_pos is negative, then the the characters deleted -will be those characters from @start_pos to the end -of the text. - - -@editable: a #GtkEditable widget. -@start_pos: the starting position. -@end_pos: the end position. - - - - -Retrieves a sequence of characters. The characters that -are retrieved are those characters at positions from -@start_pos up to, but not including @end_pos. If -@end_pos is negative, then the the characters retrieved -will be those characters from @start_pos to the end -of the text. - - -@editable: a #GtkEditable widget. -@start_pos: the starting position. -@end_pos: the end position. -@Returns: the characters in the indicated region. - The result must be freed with g_free() when - the application is finished with it. - - - - -Causes the characters in the current selection to -be copied to the clipboard and then deleted from -the widget. - - -@editable: a #GtkEditable widget. - - - - -Causes the characters in the current selection to -be copied to the clipboard. - - -@editable: a #GtkEditable widget. - - - - -Causes the contents of the clipboard to be pasted into -the given widget at the current cursor position. - - -@editable: a #GtkEditable widget. - - - - -Claim or disclaim ownership of the PRIMARY X selection. - - -@editable: a #GtkEditable widget. -@claim: if %TRUE, claim the selection, otherwise, disclaim it. -@time: the timestamp for claiming the selection. - - - - -Deletes the current contents of the widgets selection and -disclaims the selection. - - -@editable: a #GtkEditable widget. - - - - -Causes the "changed" signal to be emitted. - - -@editable: a #GtkEditable widget. - - - - -Sets the cursor position. - - -@editable: a #GtkEditable widget. -@position: the position of the cursor. The cursor is displayed - before the character with the given (base 0) index - in the widget. The value must be less than or - equal to the number of characters in the widget. - A value of -1 indicates that the position should - be set after the last character in the entry. - Note that this position is in characters, not in - bytes. - - - - -Retrieves the current cursor position. - - -@editable: a #GtkEditable widget. -@Returns: the position of the cursor. The cursor is displayed - before the character with the given (base 0) index - in the widget. The value will be less than or - equal to the number of characters in the widget. - Note that this position is in characters, not in - bytes. - - - - -Determines if the user can edit the text in the editable -widget or not. - - -@editable: a #GtkEditable widget. -@is_editable: %TRUE if the user is allowed to edit the text - in the widget. - - - - -Indicates that the user has changed the contents -of the widget. - - -@editable: the object which received the signal. - - - -This signal is emitted when text is inserted into -the widget by the user. The default handler for -this signal will normally be responsible for inserting -the text, so by connecting to this signal and then -stopping the signal with gtk_signal_emit_stop(), it -is possible to modify the inserted text, or prevent -it from being inserted entirely. - - -@editable: the object which received the signal. -@new_text: the new text to insert. -@new_text_length: the length of the new text. -@position: the position at which to insert the new text. - this is an in-out paramter. After the signal - emission is finished, it should point after - the newly inserted text. - - - -This signal is emitted when text is deleted from -the widget by the user. The default handler for -this signal will normally be responsible for inserting -the text, so by connecting to this signal and then -stopping the signal with gtk_signal_emit_stop(), it -is possible to modify the inserted text, or prevent -it from being inserted entirely. The @start_pos -and @end_pos parameters are interpreted as for -gtk_editable_delete_text() - - -@editable: the object which received the signal. -@start_pos: the starting position. -@end_pos: the end position. - - - -Indicates that the user has activated the widget -in some fashion. Generally, this will be done -with a keystroke. (The default binding for this -action is Return for #GtkEntry and -Control-Return for #GtkText.) - - -@editable: the object which received the signal. - - - -Determines if the user can edit the text in the editable -widget or not. This is meant to be overriden by -child classes and should not generally useful to -applications. - - -@editable: the object which received the signal. -@is_editable: %TRUE if the user is allowed to edit the text - in the widget. - - - -An action signal. Move the cursor position. - - -@editable: the object which received the signal. -@x: horizontal distance to move the cursor. -@y: vertical distance to move the cursor. - - - -An action signal. Move the cursor by words. - - -@editable: the object which received the signal. -@num_words: The number of words to move the -cursor. (Can be negative). - - - -An action signal. Move the cursor by pages. - - -@editable: the object which received the signal. -@x: Number of pages to move the cursor horizontally. -@y: Number of pages to move the cursor vertically. - - - -An action signal. Move the cursor to the given row. - - -@editable: the object which received the signal. -@row: the row to move to. (A negative value indicates - the last row) - - - -An action signal. Move the cursor to the given column. - - -@editable: the object which received the signal. -@column: the column to move to. (A negative value indicates - the last column) - - - -An action signal. Delete a single character. - - -@editable: the object which received the signal. -@direction: the direction in which to delete. Positive - indicates forward deletion, negative, backwards deletion. - - - -An action signal. Delete a single word. - - -@editable: the object which received the signal. -@direction: the direction in which to delete. Positive - indicates forward deletion, negative, backwards deletion. - - - -An action signal. Delete a single line. - - -@editable: the object which received the signal. -@direction: the direction in which to delete. Positive - indicates forward deletion, negative, backwards deletion. - - - -An action signal. Causes the characters in the current -selection to be copied to the clipboard and then deleted from -the widget. - - -@editable: the object which received the signal. - - - -An action signal. Causes the characters in the current selection to -be copied to the clipboard. - - -@editable: the object which received the signal. - - - -An action signal. Causes the contents of the clipboard to -be pasted into the editable widget at the current cursor -position. - - -@editable: the object which received the signal. - - - -The position of the cursor. - - - - -A boolean indicating whether the widget is editable by -the user. - - diff --git a/docs/reference/gtk/tmpl/gtkentry.sgml b/docs/reference/gtk/tmpl/gtkentry.sgml deleted file mode 100644 index 73d3b22735..0000000000 --- a/docs/reference/gtk/tmpl/gtkentry.sgml +++ /dev/null @@ -1,185 +0,0 @@ - -GtkEntry - - -a single line text entry field. - - - -The #GtkEntry widget is a single line text entry -widget. A fairly large set of key bindings are supported -by default. If the entered text is longer than the allocation -of the widget, the widget will scroll so that the cursor -position is visible. - - - - - - - -#GtkText -a widget for handling multi-line text entry. - - - - - - - -The #GtkEntry-struct struct contains only private data. - - - - - -Creates a new #GtkEntry widget. - - -@Returns: a new #GtkEntry. - - - - -Creates a new #GtkEntry widget with the given maximum -length. - - -Note: the existance of this function is inconsistent -with the rest of the GTK+ API. The normal setup would -be to just require the user to make an extra call -to gtk_entry_set_max_length() instead. It is not -expected that this function will be removed, but -it would be better practice not to use it. - - -@max: the new maximum length. -@Returns: a new #GtkEntry. - - - - -Sets the text in the widget to the given -value, replacing the current contents. - - -@entry: a #GtkEntry. -@text: the new text. - - - - -Appends the given text to the contents of the widget. - - -@entry: a #GtkEntry. -@text: the text to append. - - - - -Prepends the given text to the contents of th ewidget. - - -@entry: a #GtkEntry. -@text: the text to prepend. - - - - -Sets the cursor position in an entry to the given -value. This function is obsolete. You should use -gtk_editable_set_position() instead. - - -@entry: a #GtkEntry. -@position: the position of the cursor. The cursor is displayed - before the character with the given (base 0) index - in the widget. The value must be less than or - equal to the number of characters in the widget. - A value of -1 indicates that the position should - be set after the last character in the entry. - Note that this position is in characters, not in - bytes. - - - - -Retrieve the contents of the entry widget. The returned -pointer points to internally allocated storage in the -widget and must not be freed, modified or stored. For -this reason, this function is deprecated. Use -gtk_editable_get_chars() instead. - - -@entry: a #GtkEntry. -@Returns: the pointer the the contents of the text widget as a - string. - - - - -Selects a region of text. The characters that -are selected are those characters at positions from -@start_pos up to, but not including @end_pos. If -@end_pos is negative, then the the characters selected -will be those characters from @start_pos to the end -of the text. This function is obsolete. You should -use gtk_editable_select_region() instead. - - -@entry: a #GtkEntry. -@start: the starting position. -@end: the end position. - - - - -Sets whether the contents of the entry are visible or -not. When visibility is set to %FALSE, characters -are displayed as asterisks (*'s), and will also appear -that way when the text in the entry widget is copied -elsewhere. - - -@entry: a #GtkEntry. -@visible: %TRUE if the contents of the entry are displayd - as plaintext. - - - - -Determines if the user can edit the text in the editable -widget or not. This function is obsolete. You should -use gtk_editable_set_editable() instead. - - -@entry: a #GtkEntry. -@editable: %TRUE if the user is allowed to edit the text - in the widget. - - - - -Sets the maximum allowed length of the contents -of the widget. If the current contents are longer -than the given length, then they will be truncated -to fit. - - -@entry: a #GtkEntry. -@max: the new maximum length. - - - - -Determines the maximum allowed length of the contents -of the widget. See gtk_entry_set_max_length(). - - - - -Determines whether the contents of the entry widget -are visible or not. See gtk_entry_set_visibility(). - - diff --git a/docs/reference/gtk/tmpl/gtkenums.sgml b/docs/reference/gtk/tmpl/gtkenums.sgml deleted file mode 100644 index 33ffe7f812..0000000000 --- a/docs/reference/gtk/tmpl/gtkenums.sgml +++ /dev/null @@ -1,340 +0,0 @@ - -Standard Enumerations - - - - - - - - - - - - - - - - - - - -@GTK_ACCEL_VISIBLE: -@GTK_ACCEL_SIGNAL_VISIBLE: -@GTK_ACCEL_LOCKED: -@GTK_ACCEL_MASK: - - - - - - -@GTK_ARROW_UP: -@GTK_ARROW_DOWN: -@GTK_ARROW_LEFT: -@GTK_ARROW_RIGHT: - - - - - - -@GTK_EXPAND: -@GTK_SHRINK: -@GTK_FILL: - - - - - - -@GTK_BUTTONBOX_DEFAULT_STYLE: -@GTK_BUTTONBOX_SPREAD: -@GTK_BUTTONBOX_EDGE: -@GTK_BUTTONBOX_START: -@GTK_BUTTONBOX_END: - - - - - - -@GTK_CORNER_TOP_LEFT: -@GTK_CORNER_BOTTOM_LEFT: -@GTK_CORNER_TOP_RIGHT: -@GTK_CORNER_BOTTOM_RIGHT: - - - - - - -@GTK_CURVE_TYPE_LINEAR: -@GTK_CURVE_TYPE_SPLINE: -@GTK_CURVE_TYPE_FREE: - - - - - - -@GTK_DIR_TAB_FORWARD: -@GTK_DIR_TAB_BACKWARD: -@GTK_DIR_UP: -@GTK_DIR_DOWN: -@GTK_DIR_LEFT: -@GTK_DIR_RIGHT: - - - - - - -@GTK_JUSTIFY_LEFT: -@GTK_JUSTIFY_RIGHT: -@GTK_JUSTIFY_CENTER: -@GTK_JUSTIFY_FILL: - - - - - - -@GTK_MATCH_ALL: -@GTK_MATCH_ALL_TAIL: -@GTK_MATCH_HEAD: -@GTK_MATCH_TAIL: -@GTK_MATCH_EXACT: -@GTK_MATCH_LAST: - - - - - - -@GTK_PIXELS: -@GTK_INCHES: -@GTK_CENTIMETERS: - - - - - - -@GTK_ORIENTATION_HORIZONTAL: -@GTK_ORIENTATION_VERTICAL: - - - - - - -@GTK_PACK_START: -@GTK_PACK_END: - - - - - - -@GTK_PATH_PRIO_LOWEST: -@GTK_PATH_PRIO_GTK: -@GTK_PATH_PRIO_APPLICATION: -@GTK_PATH_PRIO_RC: -@GTK_PATH_PRIO_HIGHEST: -@GTK_PATH_PRIO_MASK: - - - - - - -@GTK_PATH_WIDGET: -@GTK_PATH_WIDGET_CLASS: -@GTK_PATH_CLASS: - - - - - - -@GTK_POLICY_ALWAYS: -@GTK_POLICY_AUTOMATIC: -@GTK_POLICY_NEVER: - - - - - - -@GTK_POS_LEFT: -@GTK_POS_RIGHT: -@GTK_POS_TOP: -@GTK_POS_BOTTOM: - - - -An enumeration which describes whether a preview -contains grayscale or red-green-blue data. - - - - - - -GTK_PREVIEW_COLOR -the preview contains red-green-blue data. - - - -GTK_PREVIEW_GRAYSCALE -The preview contains grayscale data. - - - - - -@GTK_PREVIEW_COLOR: -@GTK_PREVIEW_GRAYSCALE: - - - - - - -@GTK_RELIEF_NORMAL: -@GTK_RELIEF_HALF: -@GTK_RELIEF_NONE: - - - - - - -@GTK_RESIZE_PARENT: -@GTK_RESIZE_QUEUE: -@GTK_RESIZE_IMMEDIATE: - - - - - - -@GTK_SCROLL_NONE: -@GTK_SCROLL_STEP_BACKWARD: -@GTK_SCROLL_STEP_FORWARD: -@GTK_SCROLL_PAGE_BACKWARD: -@GTK_SCROLL_PAGE_FORWARD: -@GTK_SCROLL_JUMP: - - - - - - -@GTK_SELECTION_SINGLE: -@GTK_SELECTION_BROWSE: -@GTK_SELECTION_MULTIPLE: -@GTK_SELECTION_EXTENDED: - - - - - - -@GTK_SHADOW_NONE: -@GTK_SHADOW_IN: -@GTK_SHADOW_OUT: -@GTK_SHADOW_ETCHED_IN: -@GTK_SHADOW_ETCHED_OUT: - - - - - - -@GTK_STATE_NORMAL: -@GTK_STATE_ACTIVE: -@GTK_STATE_PRELIGHT: -@GTK_STATE_SELECTED: -@GTK_STATE_INSENSITIVE: - - - - - - -@GTK_DIRECTION_LEFT: -@GTK_DIRECTION_RIGHT: - - - - - - -@GTK_TOP_BOTTOM: -@GTK_LEFT_RIGHT: - - - - - - -@GTK_TOOLBAR_ICONS: -@GTK_TOOLBAR_TEXT: -@GTK_TOOLBAR_BOTH: - - - - - - -@GTK_TROUGH_NONE: -@GTK_TROUGH_START: -@GTK_TROUGH_END: -@GTK_TROUGH_JUMP: - - - - - - -@GTK_UPDATE_CONTINUOUS: -@GTK_UPDATE_DISCONTINUOUS: -@GTK_UPDATE_DELAYED: - - - - - - -@GTK_VISIBILITY_NONE: -@GTK_VISIBILITY_PARTIAL: -@GTK_VISIBILITY_FULL: - - - - - - -@GTK_WIN_POS_NONE: -@GTK_WIN_POS_CENTER: -@GTK_WIN_POS_MOUSE: - - - - - - -@GTK_WINDOW_TOPLEVEL: -@GTK_WINDOW_DIALOG: -@GTK_WINDOW_POPUP: - - - - - - -@GTK_SORT_ASCENDING: -@GTK_SORT_DESCENDING: - diff --git a/docs/reference/gtk/tmpl/gtkeventbox.sgml b/docs/reference/gtk/tmpl/gtkeventbox.sgml deleted file mode 100644 index 8dc8fbcd93..0000000000 --- a/docs/reference/gtk/tmpl/gtkeventbox.sgml +++ /dev/null @@ -1,33 +0,0 @@ - -GtkEventBox - - -a widget used to catch events for widgets which do not have their own window. - - - -The #GtkEventBox widget is a subclass of #GtkBin which also has its own window. -It is useful since it allows you to catch events for widgets which do not -have their own window. - - - - - - - - - -The #GtkEventBox-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkEventBox. - - -@Returns: a new #GtkEventBox. - - diff --git a/docs/reference/gtk/tmpl/gtkfeatures.sgml b/docs/reference/gtk/tmpl/gtkfeatures.sgml deleted file mode 100644 index b1d62c4771..0000000000 --- a/docs/reference/gtk/tmpl/gtkfeatures.sgml +++ /dev/null @@ -1,63 +0,0 @@ - -Version Information - - -variables and functions to check the GTK+ version. - - - -This section describes the variables and functions available to test the -version of the GTK+ library in use. -FIXME: probably merge with other general stuff. - - - - - - - - - -The major version number of the GTK+ library. -(e.g. in GTK+ version 1.2.5 this is 1.) - - - - - -The minor version number of the GTK+ library. -(e.g. in GTK+ version 1.2.5 this is 2.) - - - - - -The micro version number of the GTK+ library. -(e.g. in GTK+ version 1.2.5 this is 5.) - - - - - - - - - - - - - - - - - -Checks that the GTK+ library in use is compatable with the given version. - - -@required_major: the required major version. -@required_minor: the required major version. -@required_micro: the required major version. -@Returns: NULL if the GTK+ library is compatable with the given version, or -a string describing the version mismatch. - - diff --git a/docs/reference/gtk/tmpl/gtkfilesel.sgml b/docs/reference/gtk/tmpl/gtkfilesel.sgml deleted file mode 100644 index 9ac71c75c9..0000000000 --- a/docs/reference/gtk/tmpl/gtkfilesel.sgml +++ /dev/null @@ -1,167 +0,0 @@ - -GtkFileSelection - - -prompt the user for a file or directory name. - - - -GtkFileSelection should be used to retrieve file or directory names from the user. It will create a new dialog window containing a directory list, and a file list corresponding to the current working directory. The filesystem can be navigated using the directory list or the drop-down history menu. Alternatively, the TAB key can be used to navigate using filename completion - common in text based editors such as emacs and jed. - - -File selection dialogs are created with a call to gtk_file_selection_new(). - - -The default filename can be set using gtk_file_selection_set_filename() and the selected filename retrieved using gtk_file_selection_get_filename(). - - -Use gtk_file_selection_complete() to display files that match a given pattern. This can be used for example, to show only *.txt files, or only files beginning with gtk*. - - -Simple file operations; create directory, delete file, and rename file, are available from buttons at the top of the dialog. These can be hidden using gtk_file_selection_hide_fileop_buttons() and shown again using gtk_file_selection_show_fileop_buttons(). - - - -Getting a filename from the user - - -/* The file selection widget and the string to store the chosen filename */ - -GtkWidget *file_selector; -gchar *selected_filename; - -void store_filename(GtkFileSelection *selector, gpointer user_data) { - selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION(file_selector)); -} - -void create_file_selection(void) { - - /* Create the selector */ - - file_selector = gtk_file_selection_new("Please select a file for editing."); - - gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), - "clicked", GTK_SIGNAL_FUNC (store_filename), NULL); - - /* Ensure that the dialog box is destroyed when the user clicks a button. */ - - gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), - "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), - (gpointer) file_selector); - - gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->cancel_button), - "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), - (gpointer) file_selector); - - /* Display that dialog */ - - gtk_widget_show (file_selector); -} - - - - - - - - - - -#GtkDialog -Add your own widgets into the #GtkFileSelection. - - - - - - -The #GtkFileSelection struct contains the following #GtkWidget fields: - - - - - - -*fileop_dialog; -the dialog box used to display the #GtkFileSelection. It can be customized by adding/removing widgets from it using the standard #GtkDialog functions. - - - -*dir_list, *file_list; -the two #GtkCList widgets corresponding to directories and files. - - - -*ok_button, *cancel_button; -the two main buttons that signals should be connected to in order to perform an action when the user hits either OK or Cancel. - - - -*history_pulldown; -the #GtkOptionMenu used to create the drop-down directory history. - - - -*fileop_c_dir, *fileop_del_file, *fileop_ren_file; -the buttons that appear at the top of the file selection dialog. These "operation buttons" can be hidden and redisplayed with gtk_file_selection_hide_fileop_buttons() and gtk_file_selection_show_fileop_buttons() respectively. - - - - - - - - - -Creates a new file selection dialog box. By default it will contain a #GtkCList of the application's current working directory, and a file listing. Operation buttons that allow the user to create a directory, delete files and rename files, are also present. - - -@title: a message that will be placed in the file requestor's titlebar. -@Returns: the new file selection. - - - - -Sets a default path for the file requestor. If @filename includes a directory path, then the requestor will open with that path as its current working directory. - - - -@filesel: a #GtkFileSelection. -@filename: a string to set as the default file name. - - - - -Retrieves the currently selected filename from the file selection dialog. If no file is selected then the selected directory path is returned. - - -@filesel: a #GtkFileSelection -@Returns: a string containing the selected file's full path. - - - - -Will attempt to match @pattern to a valid filename in the current directory. If a match can be made, the matched filename will appear in the text entry field of the file selection dialog. -If a partial match can be made, the "Files" list will contain those file names which have been partially matched. - - -@filesel: a #GtkFileSelection. -@pattern: a string of characters which may or may not match any filenames in the current directory. - - - - -Shows the file operation buttons, if they have previously been hidden. The rest of the widgets in the dialog will be resized accordingly. - - -@filesel: a #GtkFileSelection. - - - - -Hides the file operation buttons that normally appear at the top of the dialog. Useful if you wish to create a custom file selector, based on #GtkFileSelection. - - -@filesel: a #GtkFileSelection. - - diff --git a/docs/reference/gtk/tmpl/gtkfixed.sgml b/docs/reference/gtk/tmpl/gtkfixed.sgml deleted file mode 100644 index c72b4e743c..0000000000 --- a/docs/reference/gtk/tmpl/gtkfixed.sgml +++ /dev/null @@ -1,102 +0,0 @@ - -GtkFixed - - -a container which supports fixed sizes and positions of its children. - - - -The #GtkFixed widget is a container which can place child widgets at fixed -positions and with fixed sizes, given in pixels. - - - - - - - - - - -The #GtkFixed-struct struct contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#GList *children; -a list of #GtkFixedChild elements, containing the child widgets and -their positions. - - - - - - - - -The #GtkFixedChild-struct struct contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#GtkWidget *widget; -the child #GtkWidget. - - - -#gint16 x; -the horizontal position of the widget within the #GtkFixed -container. - - - -#gint16 y; -the vertical position of the widget within the #GtkFixed -container. - - - - - -@widget: -@x: -@y: - - - -Creates a new #GtkFixed. - - -@Returns: a new #GtkFixed. - - - - -Adds a widget to a #GtkFixed container at the given position. - - -@fixed: a #GtkFixed. -@widget: the widget to add. -@x: the horizontal position to place the widget at. -@y: the vertical position to place the widget at. - - - - -Moves a child of a #GtkFixed container to the given position. - - -@fixed: a #GtkFixed. -@widget: the child widget. -@x: the horizontal position to move the widget to. -@y: the vertical position to move the widget to. - - diff --git a/docs/reference/gtk/tmpl/gtkfontsel.sgml b/docs/reference/gtk/tmpl/gtkfontsel.sgml deleted file mode 100644 index d888b18f10..0000000000 --- a/docs/reference/gtk/tmpl/gtkfontsel.sgml +++ /dev/null @@ -1,134 +0,0 @@ - -GtkFontSelection - - -a widget for selecting fonts. - - - -The #GtkFontSelection widget lists the available fonts, styles and sizes, -allowing the user to select a font. -It is used in the #GtkFontSelectionDialog widget to provide a dialog box for -selecting fonts. - - -To set the font which is initially selected, use -gtk_font_selection_set_font_name(). - - -To get the selected font use gtk_font_selection_get_font() -or gtk_font_selection_get_font_name(). - - -To change the text which is shown in the preview area, use -gtk_font_selection_set_preview_text(). - - -Filters can be used to limit the fonts shown. There are 2 filters in the -#GtkFontSelection - a base filter and a user filter. The base filter -can not be changed by the user, so this can be used when the user must choose -from the restricted set of fonts (e.g. for a terminal-type application you may -want to force the user to select a fixed-width font). The user filter can be -changed or reset by the user, by using the 'Reset Filter' button or changing -the options on the 'Filter' page of the widget. - - - - - - - -#GtkFontSelectionDialog -a dialog box which uses #GtkFontSelection. - - - - - - - -The #GtkFontSelection struct contains private data only, and should -only be accessed using the functions below. - - - - - -Creates a new #GtkFontSelection. - - -@Returns: a new #GtkFontSelection. - - - - -Gets the currently-selected font. - - -@fontsel: a #GtkFontSelection. -@Returns: the currently-selected font, or NULL if no font is selected. - - - - -Gets the currently-selected font name. - - -@fontsel: a #GtkFontSelection. -@Returns: - - - - -Sets the currently-selected font. - - -@fontsel: a #GtkFontSelection. -@fontname: a fontname. -@Returns: TRUE if the font was found. - - - - -Gets the text displayed in the preview area. - - -@fontsel: a #GtkFontSelection. -@Returns: the text displayed in the preview area. - - - - -Sets the text displayed in the preview area. - - -@fontsel: a #GtkFontSelection. -@text: the text to display in the preview area. - - - - -Sets one of the two font filters, to limit the fonts shown. - - -@fontsel: a #GtkFontSelection. -@filter_type: which of the two font filters to set, either -#GTK_FONT_FILTER_BASE or #GTK_FONT_FILTER_USER. The user filter -can be changed by the user, but the base filter is permanent. -@font_type: the types of font to be shown. This is a bitwise combination of -#GTK_FONT_BITMAP, #GTK_FONT_SCALABLE and #GTK_FONT_SCALABLE_BITMAP, -or #GTK_FONT_ALL to show all three font types. -@foundries: a NULL-terminated array of strings containing foundry names which -will be shown, or NULL to show all foundries. -@weights: a NULL-terminated array of strings containing weight names which -will be shown, or NULL to show all weights. -@slants: a NULL-terminated array of strings containing slant names which -will be shown, or NULL to show all slants. -@setwidths: a NULL-terminated array of strings containing setwidth names which -will be shown, or NULL to show all setwidths. -@spacings: a NULL-terminated array of strings containing spacings which -will be shown, or NULL to show all spacings. -@charsets: a NULL-terminated array of strings containing charset names which -will be shown, or NULL to show all charsets. - - diff --git a/docs/reference/gtk/tmpl/gtkfontseldlg.sgml b/docs/reference/gtk/tmpl/gtkfontseldlg.sgml deleted file mode 100644 index a1df4d8038..0000000000 --- a/docs/reference/gtk/tmpl/gtkfontseldlg.sgml +++ /dev/null @@ -1,178 +0,0 @@ - -GtkFontSelectionDialog - - -a dialog box for selecting fonts. - - - -The #GtkFontSelectionDialog widget is a dialog box for selecting a font. - - -To set the font which is initially selected, use -gtk_font_selection_dialog_set_font_name(). - - -To get the selected font use gtk_font_selection_dialog_get_font() -or gtk_font_selection_dialog_get_font_name(). - - -To change the text which is shown in the preview area, use -gtk_font_selection_dialog_set_preview_text(). - - -Filters can be used to limit the fonts shown. There are 2 filters in the -#GtkFontSelectionDialog - a base filter and a user filter. The base filter -can not be changed by the user, so this can be used when the user must choose -from the restricted set of fonts (e.g. for a terminal-type application you may -want to force the user to select a fixed-width font). The user filter can be -changed or reset by the user, by using the 'Reset Filter' button or changing -the options on the 'Filter' page of the dialog. - - - -Setting a filter to show only fixed-width fonts. - - gchar *spacings[] = { "c", "m", NULL }; - gtk_font_selection_dialog_set_filter (GTK_FONT_SELECTION_DIALOG (fontsel), - GTK_FONT_FILTER_BASE, GTK_FONT_ALL, - NULL, NULL, NULL, NULL, spacings, NULL); - - - - -To allow only true scalable fonts to be selected use: - - - -Setting a filter to show only true scalable fonts. - - gtk_font_selection_dialog_set_filter (GTK_FONT_SELECTION_DIALOG (fontsel), - GTK_FONT_FILTER_BASE, GTK_FONT_SCALABLE, - NULL, NULL, NULL, NULL, NULL, NULL); - - - - - - - - -#GtkFontSelection -the underlying widget for selecting fonts. - - - - - - - -The #GtkFontSelectionDialog struct contains private data only, and should -only be accessed using the functions below. - - - - - -Creates a new #GtkFontSelectionDialog. - - -@title: the title of the dialog box. -@Returns: a new #GtkFontSelectionDialog. - - - - -Gets the currently-selected font. - - -@fsd: a #GtkFontSelectionDialog. -@Returns: the currently-selected font, or NULL if no font is selected. - - - - -Gets the currently-selected font name. - - -@fsd: a #GtkFontSelectionDialog. -@Returns: the currently-selected font name, or NULL if no font is selected. - - - - -Sets the currently-selected font. - - -@fsd: a #GtkFontSelectionDialog. -@fontname: a fontname. -@Returns: TRUE if the font was found. - - - - -Gets the text displayed in the preview area. - - -@fsd: a #GtkFontSelectionDialog. -@Returns: the text displayed in the preview area. - - - - -Sets the text displayed in the preview area. - - -@fsd: a #GtkFontSelectionDialog. -@text: the text to display in the preview area. - - - - -Sets one of the two font filters, to limit the fonts shown. - - -@fsd: a #GtkFontSelectionDialog. -@filter_type: which of the two font filters to set, either -#GTK_FONT_FILTER_BASE or #GTK_FONT_FILTER_USER. The user filter -can be changed by the user, but the base filter is permanent. -@font_type: the types of font to be shown. This is a bitwise combination of -#GTK_FONT_BITMAP, #GTK_FONT_SCALABLE and #GTK_FONT_SCALABLE_BITMAP, -or #GTK_FONT_ALL to show all three font types. -@foundries: a NULL-terminated array of strings containing foundry names which -will be shown, or NULL to show all foundries. -@weights: a NULL-terminated array of strings containing weight names which -will be shown, or NULL to show all weights. -@slants: a NULL-terminated array of strings containing slant names which -will be shown, or NULL to show all slants. -@setwidths: a NULL-terminated array of strings containing setwidth names which -will be shown, or NULL to show all setwidths. -@spacings: a NULL-terminated array of strings containing spacings which -will be shown, or NULL to show all spacings. -@charsets: a NULL-terminated array of strings containing charset names which -will be shown, or NULL to show all charsets. - - - - -A set of bit flags used to specify the type of fonts shown -when calling gtk_font_selection_dialog_set_filter() or -gtk_font_selection_set_filter(). - - -@GTK_FONT_BITMAP: bitmap fonts. -@GTK_FONT_SCALABLE: scalable fonts. -@GTK_FONT_SCALABLE_BITMAP: scaled bitmap fonts. -@GTK_FONT_ALL: a bitwise combination of all of the above. - - - -A set of bit flags used to specify the filter being set -when calling gtk_font_selection_dialog_set_filter() or -gtk_font_selection_set_filter(). - - -@GTK_FONT_FILTER_BASE: the base filter, which can't be changed by the user. -@GTK_FONT_FILTER_USER: the user filter, which can be changed from within the -'Filter' page of the #GtkFontSelection widget. - diff --git a/docs/reference/gtk/tmpl/gtkframe.sgml b/docs/reference/gtk/tmpl/gtkframe.sgml deleted file mode 100644 index a675fc909b..0000000000 --- a/docs/reference/gtk/tmpl/gtkframe.sgml +++ /dev/null @@ -1,89 +0,0 @@ - -GtkFrame - - -A bin with a decorative frame and optional label. - - - -The frame widget is a Bin that surrounds its child -with a decorative frame and an optional label. -If present, the label is drawn in a gap in the -top side of the frame. The position of the -label can be controlled with gtk_frame_set_label_align(). - - - - - - - - - - - - - - - -Create a new Frame, with optional label @label. -If @label is %NULL, the label is omitted. - - -@label: -@Returns: - - - - - -Set the text of the label. If @label is %NULL, -the current label, if any, is removed. - - -@frame: -@label: - - - - -Set the alignment of the Frame widget's label. The -default value for a newly created Frame is 0.0. - - -@frame: The Frame widget. -@xalign: The position of the label along the top edge - of the widget. A value of 0.0 represents left alignment; - 1.0 represents right alignment. -@yalign: The y alignment of the label. Currently ignored. - - - - -Set the shadow type for the Frame widget. - - -@frame: The Frame widget. -@type: New shadow type. - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkgamma.sgml b/docs/reference/gtk/tmpl/gtkgamma.sgml deleted file mode 100644 index 28f392d5c1..0000000000 --- a/docs/reference/gtk/tmpl/gtkgamma.sgml +++ /dev/null @@ -1,40 +0,0 @@ - -GtkGammaCurve - - -a subclass of #GtkCurve for editing gamma curves. - - - -The #GtkGammaCurve widget is a subclass of #GtkCurve specifically for -editing gamma curves, which are used in graphics applications such as the -Gimp. - - -The #GammaCurve widget shows a curve which the user can edit with the mouse -just like a #GtkCurve widget. On the right of the curve it also displays -5 buttons, 3 of which change between the 3 curve modes (spline, linear and -free), and the other 2 set the curve to a particular gamma value, or reset it -to a straight line. - - - - - - - - - -The #GtkGammaCurve-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkGammaCurve. - - -@Returns: a new #GtkGammaCurve. - - diff --git a/docs/reference/gtk/tmpl/gtkgc.sgml b/docs/reference/gtk/tmpl/gtkgc.sgml deleted file mode 100644 index 7304c49122..0000000000 --- a/docs/reference/gtk/tmpl/gtkgc.sgml +++ /dev/null @@ -1,45 +0,0 @@ - -Graphics Contexts - - -provides access to a shared pool of #GdkGC objects. - - - -These functions provide access to a shared pool of #GdkGC objects. -When a new #GdkGC is needed, gtk_gc_get() is called with the required depth, -colormap and #GdkGCValues. If a #GdkGC with the required properties already -exists then that is returned. If not, a new #GdkGC is created. -When the #GdkGC is no longer needed, gtk_gc_release() is called. - - - - - - - - - -Gets a #GdkGC with the given depth, colormap and #GdkGCValues. -If a #GdkGC with the given properties already exists then it is returned, -otherwise a new #GdkGC is created. -The returned #GdkGC should be released with gtk_gc_release() when it is no -longer needed. - - -@depth: the depth of the #GdkGC to create. -@colormap: the #GdkColormap (FIXME: I don't know why this is needed). -@values: a #GdkGCValues struct containing settings for the #GdkGC. -@values_mask: a set of flags indicating which of the fields in @values has -been set. -@Returns: a #GdkGC. - - - - -Releases a #GdkGC allocated using gtk_gc_get(). - - -@gc: a #GdkGC. - - diff --git a/docs/reference/gtk/tmpl/gtkhandlebox.sgml b/docs/reference/gtk/tmpl/gtkhandlebox.sgml deleted file mode 100644 index e823a7a563..0000000000 --- a/docs/reference/gtk/tmpl/gtkhandlebox.sgml +++ /dev/null @@ -1,157 +0,0 @@ - -GtkHandleBox - - -a widget for detachable window portions. - - - -The #GtkHandleBox widget allows a portion of a window to be "torn -off". It is a bin widget which displays its child and a handle that -the user can drag to tear off a separate window (the float -window) containing the child widget. A thin -ghost is drawn in the original location of the -handlebox. By dragging the separate window back to its original -location, it can be reattached. - - -When reattaching, the ghost and float window, must be aligned -along one of the edges, the snap edge. -This either can be specified by the application programmer -explicitely, or GTK+ will pick a reasonable default based -on the handle position. - - -To make detaching and reattaching the handlebox as minimally confusing -as possible to the user, it is important to set the snap edge so that -the snap edge does not move when the handlebox is deattached. For -instance, if the handlebox is packed at the bottom of a VBox, then -when the handlebox is detached, the bottom edge of the handlebox's -allocation will remain fixed as the height of the handlebox shrinks, -so the snap edge should be set to %GTK_POS_BOTTOM. - - - - - - - - - -The #GtkHandleBox-struct struct contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -GtkShadowType shadow_type; -The shadow type for the entry. (See gtk_handle_box_set_shadow_type()). - - - -GtkPositionType handle_position; -The position of the handlebox's handle with respect -to the child. (See gtk_handle_box_set_handle_position()) - - - -gint snap_edge; -A value of type #GtkPosition type indicating snap edge for the widget. -(See gtk_handle_box_set_snap_edge). The value of -1 indicates -that this value has not been set. - - - -#gboolean child_detached; -A boolean value indicating whether the handlebox's -child is attached or detached. - - - - - - - - - - - -Create a new handle box. - - -@Returns: a new #GtkHandleBox. - - - - -Sets the type of shadow to be drawn around the border -of the - - -@handle_box: a #GtkHandleBox -@type: the shadow type. - - - - -Sets the side of the handlebox where the handle is drawn. - - -@handle_box: a #GtkHandleBox -@position: the side of the handlebox where the handle should be drawn. - - - - -Sets the snap edge of a handlebox. The snap edge is -the edge of the detached child that must be aligned -with the corresponding edge of the "ghost" left -behind when the child was detached to reattach -the torn-off window. Usually, the snap edge should -be chosen so that it stays in the same place on -the screen when the handlebox is torn off. - - -If the snap edge is not set, then an appropriate value -will be guessed from the handle position. If the -handle position is %GTK_POS_RIGHT or %GTK_POS_LEFT, -then the snap edge will be %GTK_POS_TOP, otherwise -it will be %GTK_POS_LEFT. - - -@handle_box: a #GtkHandleBox -@edge: the snap edge, or -1 to unset the value; in which -case GTK+ will try to guess an appropriate value -in the future. - - - - -This signal is emitted when the contents of the -handlebox are reattached to the main window. - - -@handlebox: the object which received the signal. -@widget: the child widget of the handlebox. - (this argument provides no extra information - and is here only for backwards-compatibility) - - - -This signal is emitted when the contents of the -handlebox are detached from the main window. - - -@handlebox: the object which received the signal. -@widget: the child widget of the handlebox. - (this argument provides no extra information - and is here only for backwards-compatibility) - - - -Determines the shadow type for the handlebox. - - diff --git a/docs/reference/gtk/tmpl/gtkhbbox.sgml b/docs/reference/gtk/tmpl/gtkhbbox.sgml deleted file mode 100644 index 889f2cf039..0000000000 --- a/docs/reference/gtk/tmpl/gtkhbbox.sgml +++ /dev/null @@ -1,98 +0,0 @@ - -GtkHButtonBox - - -a container for arranging button horizontally. - - - -A button box should be used to provide a consistent layout of buttons -throughout your application. There is one default layout and a default -spacing value that are persistant across all #HButtonBox widgets. - - -The layout/spacing can then be altered by the programmer, or if desired, by -the user to alter the 'feel' of a program to a small degree. - - -A #HButtonBox is created with gtk_hbutton_box_new(). Buttons are packed into -a button box the same way as any other box, using gtk_box_pack_start() or -gtk_box_pack_end(). - - -The default spacing between buttons can be set with -gtk_hbutton_box_set_spacing_default() and queried with -gtk_hbutton_box_get_spacing_default(). - - -The arrangement and layout of the buttons can be changed using -gtk_hbutton_box_set_layout_default() and queried with -gtk_hbutton_box_get_layout_default(). - - - - - - -#GtkBox -Used to pack widgets into button boxes. - -#GtkButtonBox -Provides functions for controlling button boxes. - - -#GtkVButtonBox -Pack buttons vertically - - - - - - -button_box is the #GtkHButtonBox widget itself and -should not be modified directly. - - - - - -Creates a new horizontal button box. - - -@Returns: a new button box #GtkWidget. - - - - -Retrieves the current default spacing for horizontal button boxes. This is the number of pixels -to be placed between the buttons when they are arranged. - - -@Returns: the default number of pixels between buttons. - - - - -Retrieves the current layout used to arrange buttons in button box widgets. - - -@Returns: the current #GtkButtonBoxStyle. - - - - -Changes the default spacing that is placed between widgets in an -horizontal button box. - - -@spacing: an integer value. - - - - -Sets a new layout mode that will be used by all button boxes. - - -@layout: a new #GtkButtonBoxStyle. - - diff --git a/docs/reference/gtk/tmpl/gtkhbox.sgml b/docs/reference/gtk/tmpl/gtkhbox.sgml deleted file mode 100644 index 49b359b763..0000000000 --- a/docs/reference/gtk/tmpl/gtkhbox.sgml +++ /dev/null @@ -1,46 +0,0 @@ - -GtkHBox - - -horizontal container box - - - -GtkHBox is a container that organizes child widgets into a single row. - - - -Use the #GtkBox packing interface to determine the arrangement, -spacing, width, and alignment of GtkHBox children. - - - -All children are allocated the same height. - - - - - - - -#GtkVBox -a sister class that organizes widgets into a column. - - - - - - - - - - - -Creates a new GtkHBox. - - -@homogeneous: %TRUE if all children are to be given equal space allotments. -@spacing: the number of pixels to place by default between children. -@Returns: a new GtkHBox. - - diff --git a/docs/reference/gtk/tmpl/gtkhpaned.sgml b/docs/reference/gtk/tmpl/gtkhpaned.sgml deleted file mode 100644 index 19f42a4101..0000000000 --- a/docs/reference/gtk/tmpl/gtkhpaned.sgml +++ /dev/null @@ -1,32 +0,0 @@ - -GtkHPaned - - -A container with two panes arranged horizontally. - - - -The HPaned widget is a container widget with two -children arranged horizontally. The division between -the two panes is adjustable by the user by dragging -a handle. See #GtkPaned for details. - - - - - - - - - - - - - - -Create a new #GtkHPaned - - -@Returns: the new #GtkHPaned - - diff --git a/docs/reference/gtk/tmpl/gtkhruler.sgml b/docs/reference/gtk/tmpl/gtkhruler.sgml deleted file mode 100644 index e6ceadc291..0000000000 --- a/docs/reference/gtk/tmpl/gtkhruler.sgml +++ /dev/null @@ -1,36 +0,0 @@ - -GtkHRuler - - -A horizontal ruler. - - - -The HRuler widget is a widget arranged horizontally creating a ruler that is -utilized around other widgets such as a text widget. The ruler is used to show -the location of the mouse on the window and to show the size of the window in -specified units. The available units of measurement are GTK_PIXELS, GTK_INCHES -and GTK_CENTIMETERS. GTK_PIXELS is the default. -rulers. - - - - - - - - - -The #GtkHRuler struct contains private data and should be accessed -with the functions below. - - - - - -Creates a new horizontal ruler. - - -@Returns: the new GTKHRuler. - - diff --git a/docs/reference/gtk/tmpl/gtkhscale.sgml b/docs/reference/gtk/tmpl/gtkhscale.sgml deleted file mode 100644 index e23b095834..0000000000 --- a/docs/reference/gtk/tmpl/gtkhscale.sgml +++ /dev/null @@ -1,44 +0,0 @@ - -GtkHScale - - -a horizontal slider widget for selecting a value from a range. - - - -The #GtkHScale widget is used to allow the user to select a value using -a horizontal slider. -A #GtkAdjustment is used to set the initial value, the lower -and upper bounds, and the step and page increments. - - -The position to show the current value, and the number of decimal places -shown can be set using the parent #GtkScale class's functions. - - - - - - - - - -The #GtkHScale-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkHScale. - - -@adjustment: the #GtkAdjustment which sets the range of the scale. -@Returns: a new #GtkHScale. - - - - -the #GtkAdjustment which sets the range of the scale. - - diff --git a/docs/reference/gtk/tmpl/gtkhscrollbar.sgml b/docs/reference/gtk/tmpl/gtkhscrollbar.sgml deleted file mode 100644 index 5317f3eae9..0000000000 --- a/docs/reference/gtk/tmpl/gtkhscrollbar.sgml +++ /dev/null @@ -1,40 +0,0 @@ - -GtkHScrollbar - - -A horizontal scrollbar - - - -The HScrollbar widget is a widget arranged horizontally creating a scroll -bar. See #GtkScrollbar for details on scrollbars. #GtkAdjustment pointers may be -added to handle the adjustment of the scrollbars or it may be left NULL in which -case one will be created you. See #GtkAdjustment for details. - - - - - - - - - -The #GtkHScrollbar struct contains private data and should be accessed -unsing the functions below. - - - - - -Creates a new horizontal scrollbar. - - -@adjustment: -@Returns: the new GTKHScrollbar - - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkhseparator.sgml b/docs/reference/gtk/tmpl/gtkhseparator.sgml deleted file mode 100644 index 6eaa96a747..0000000000 --- a/docs/reference/gtk/tmpl/gtkhseparator.sgml +++ /dev/null @@ -1,45 +0,0 @@ - -GtkHSeparator - - -a horizontal separator. - - - -The #GtkHSeparator widget is a horizontal separator, used to group the -widgets within a window. It displays a horizontal line with a shadow to -make it appear sunken into the interface. - - - -The #GtkHSeparator widget is not used as a separator within menus. -To create a separator in a menu create an empty #GtkMenuItem widget using -gtk_menu_item_new() and add it to the menu with gtk_menu_append(). - - - - - - - -#GtkVSeparator -a vertical separator. - - - - - - -The #GtkHSeparator-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkHSeparator. - - -@Returns: a new #GtkHSeparator. - - diff --git a/docs/reference/gtk/tmpl/gtkimage.sgml b/docs/reference/gtk/tmpl/gtkimage.sgml deleted file mode 100644 index 4e6b178ac6..0000000000 --- a/docs/reference/gtk/tmpl/gtkimage.sgml +++ /dev/null @@ -1,60 +0,0 @@ - -GtkImage - - -A widget displaying a graphical image - - - -The #GtkImage widget displays a graphical image. The image is typically created -using gdk_image_new. - - -The pixels in a #GtkImage may be manipulated by the application after creation, -as #GtkImage store the pixel data on the client side. If you wish to store the -pixel data on the server side (thus not allowing manipulation of the data after -creation) you should use #GtkPixmap. - - - - -#GtkPixmap, #GdkRgb - - - - -This struct contain private data only and should be accessed by the functions -below. - - - - - -Creates the new GtkImage using the value and the mask. - - -@val: -@mask: a GDKBitmap that indicates which parts of the image should be transparent. -@Returns: the GtkImage - - - - -Sets the GtkImage - - -@image: a #GdkPixmap -@val: -@mask: a GDKBitmap that indicates which parts of the image should be transparent. - - - - -Gets the GtkImage - - -@image: a #GdkPixmap -@val: -@mask: a GDKBitmap that indicates which parts of the image should be transparent. - - diff --git a/docs/reference/gtk/tmpl/gtkinputdialog.sgml b/docs/reference/gtk/tmpl/gtkinputdialog.sgml deleted file mode 100644 index 691cd1e5a5..0000000000 --- a/docs/reference/gtk/tmpl/gtkinputdialog.sgml +++ /dev/null @@ -1,63 +0,0 @@ - -GtkInputDialog - - -Configure devices for the XInput extension. - - - -#GtkInputDialog displays a dialog which allows the user -to configure XInput extension devices. For each -device, they can control the mode of the device -(disabled, screen-relative, or window-relative), -the mapping of axes to coordinates, and the -mapping of the devices macro keys to key press -events. - - -#GtkInputDialog contains two buttons to which -the application can connect; one for closing -the dialog, and one for saving the changes. -No actions are bound to these by default. -The changes that the user makes take effect -immediately. - - - - - - - - - - - - - - -Creates a new #GtkInputDialog. - - -@Returns: the new #GtkInputDialog. - - - - -This signal is emitted when the user changes the -mode of a device from #GDK_MODE_DISABLED to a -#GDK_MODE_SCREEN or #GDK_MODE_WINDOW. - - -@inputdialog: the object which received the signal. -@deviceid: The ID of the newly enabled device. - - - -This signal is emitted when the user changes the -mode of a device from a #GDK_MODE_SCREEN or #GDK_MODE_WINDOW -to #GDK_MODE_ENABLED. - - -@inputdialog: the object which received the signal. -@deviceid: The ID of the newly disabled device. - diff --git a/docs/reference/gtk/tmpl/gtkinvisible.sgml b/docs/reference/gtk/tmpl/gtkinvisible.sgml deleted file mode 100644 index 50d2f76aab..0000000000 --- a/docs/reference/gtk/tmpl/gtkinvisible.sgml +++ /dev/null @@ -1,35 +0,0 @@ - -GtkInvisible - - -internally-used widget which is not displayed. - - - -The #GtkInvisible widget is used internally in GTK+, and is probably not useful -for application developers. - - -It is used for reliable pointer grabs and selection handling in the code -for drag-and-drop. - - - - - - - - - -The #GtkInvisible-struct struct contains no public fields. - - - - - -Creates a new #GtkInvisible. - - -@Returns: a new #GtkInvisible. - - diff --git a/docs/reference/gtk/tmpl/gtkitem.sgml b/docs/reference/gtk/tmpl/gtkitem.sgml deleted file mode 100644 index eec61acc59..0000000000 --- a/docs/reference/gtk/tmpl/gtkitem.sgml +++ /dev/null @@ -1,69 +0,0 @@ - -GtkItem - - -abstract base class for #GtkMenuItem, #GtkListItem and #GtkTreeItem. - - - -The #GtkItem widget is an abstract base class for #GtkMenuItem, #GtkListItem -and #GtkTreeItem. - - - - - - - - - -The #GtkItem-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Emits the "select" signal on the given item. - - -@item: a #GtkItem. - - - - -Emits the "deselect" signal on the given item. - - -@item: a #GtkItem. - - - - -Emits the "toggle" signal on the given item. - - -@item: a #GtkItem. - - - - -Emitted when the item is selected. - - -@item: the object which received the signal. - - - -Emitted when the item is deselected. - - -@item: the object which received the signal. - - - -Emitted when the item is toggled. - - -@item: the object which received the signal. - diff --git a/docs/reference/gtk/tmpl/gtkitemfactory.sgml b/docs/reference/gtk/tmpl/gtkitemfactory.sgml deleted file mode 100644 index bbe4ac0fec..0000000000 --- a/docs/reference/gtk/tmpl/gtkitemfactory.sgml +++ /dev/null @@ -1,350 +0,0 @@ - -GtkItemFactory - - - - - - - - - - - - - - - - - - - - - - - - - -@func_data: -@str: - - - - - - - -@path: -@func_data: -@Returns: - - - - - - - - - - - - - - -@callback_data: -@callback_action: -@widget: - - - - - - - -@widget: -@callback_data: -@callback_action: - - - - - - - -@path: -@accelerator: -@callback: -@callback_action: -@item_type: - - - - - - -@path: -@accelerator_key: -@accelerator_mods: -@modified: -@in_propagation: -@dummy: -@widgets: - - - - - - -@container_type: -@path: -@accel_group: -@Returns: - - - - - - - -@ifactory: -@container_type: -@path: -@accel_group: - - - - - - - -@file_name: - - - - - - - -@rc_string: - - - - - - - -@scanner: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: -@Returns: - - - - - - - -@ifactory: -@path: -@Returns: - - - - - - - -@ifactory: -@action: -@Returns: - - - - - - - -@path_pspec: -@modified_only: -@print_func: -@func_data: - - - - - - - -@file_name: -@path_pspec: -@modified_only: - - - - - - - -@FILE_pointer: -@string: - - - - - - - -@ifactory: -@entry: -@callback_data: -@callback_type: - - - - - - - -@ifactory: -@n_entries: -@entries: -@callback_data: - - - - - - - -@ifactory: -@n_entries: -@entries: -@callback_data: -@callback_type: - - - - - - - -@ifactory: -@path: - - - - - - - -@ifactory: -@entry: - - - - - - - -@ifactory: -@n_entries: -@entries: - - - - - - - -@ifactory: -@x: -@y: -@mouse_button: -@time: - - - - - - - -@ifactory: -@popup_data: -@destroy: -@x: -@y: -@mouse_button: -@time: - - - - - - - -@ifactory: -@Returns: - - - - - - - -@widget: -@Returns: - - - - - - - -@path: -@Returns: - - - - - - - -@n_entries: -@entries: - - - - - - - -@ifactory_path: -@path: - - - - - - - -@ifactory: -@func: -@data: -@notify: - - diff --git a/docs/reference/gtk/tmpl/gtklabel.sgml b/docs/reference/gtk/tmpl/gtklabel.sgml deleted file mode 100644 index 5511322ca8..0000000000 --- a/docs/reference/gtk/tmpl/gtklabel.sgml +++ /dev/null @@ -1,138 +0,0 @@ - -GtkLabel - - -A widget that displays a small to medium amount of text. - - - -The #GtkLabel widget is usually used directly by the programmer to display -word(s) describing an adjacent widget or its use. It is also used internally -by Gtk+ as #GtkButton labels, #GtkMenu items, and many other widgets which -use text. - - - - - - - - - -This should not be accessed directly. Use the accessor functions as -described below. - - - - - -Internal to #GtkLabel. - - - - - -Creates a new label with the given string of text inside it. You can -pass NULL to get an empty label widget. - - -@str: The string you want to display in the #GtkLabel -@Returns: The newly allocated #GtkLabel widget - - - - -Aliases gtk_label_set_text. Probably used for backward compatibility with -Gtk+ 1.0.x. - - - - - - -The pattern of underlines you want under the existing text within the -#GtkLabel widget. For example if the current text of the label says -"FooBarBaz" passing a pattern of "___ ___" will underline -"Foo" and "Baz" but not "Bar". - - -@label: The #GtkLabel you want to set the pattern to. -@pattern: The pattern as described above. - - - - -Set where the text within the #GtkLabel will align to. This can be one of -four values: GTK_JUSTIFY_LEFT, GTK_JUSTIFY_RIGHT, GTK_JUSTIFY_CENTER, -and GTK_JUSTIFY_FILL. GTK_JUSTIFY_CENTER is the default value when the -widget is first created with gtk_label_new(). - - -@label: The #GtkLabel widget you want to set justification for. -@jtype: The #GtkJustification type as described above. - - - - -Gets the current string of text within the #GtkLabel and writes it to -the given str argument. It does not make a copy of this string so you -must not write to it. - - -@label: The #GtkLabel widget you want to get the text from. -@str: The reference to the pointer you want to point to the text. - - - - -Parses the given string for underscores and converts the next -character to an underlined character. The last character that -was underlined will have its lower-cased accelerator keyval returned (i.e. -"_File" would return the keyval for "f". This is -probably only used within the Gtk+ library itself for menu items and such. - - -@label: The #GtkLabel you want to affect. -@string: The string you want to parse for underlines. -@Returns: The lowercase keyval of the last character underlined. - - - - -Toggles line wrapping within the #GtkLabel widget. TRUE makes it break -lines if text exceeds the widget's size. FALSE lets the text get cut off -by the edge of the widget if it exceeds the widget size. - - -@label: The #GtkLabel you want to set line wrapping for. -@wrap: TRUE turns it on; FALSE turns it off. - - - - -Sets the text within the #GtkLabel widget. It overwrites any text that -was there before. Note that underlines that were there before do not -get overwritten. If you want to erase underlines just send NULL to -gtk_label_set_pattern(). - - -@label: The #GtkLabel you want to set the text for. -@str: The text you want to add. - - - - -The actual label text. Do not write to this pointer, it is not copied. - - - - -The pattern of underlines under the existing text. Do not change the -pointer, it isn't copied. - - - - -The #GtkJustification setting. See gtk_label_set_justify() for more info. - - diff --git a/docs/reference/gtk/tmpl/gtklayout.sgml b/docs/reference/gtk/tmpl/gtklayout.sgml deleted file mode 100644 index ded7a594cc..0000000000 --- a/docs/reference/gtk/tmpl/gtklayout.sgml +++ /dev/null @@ -1,116 +0,0 @@ - -GtkLayout - - - - - - - - - - - - - - - - - - - - - - - - - -@hadjustment: -@vadjustment: -@Returns: - - - - - - - -@layout: -@widget: -@x: -@y: - - - - - - - -@layout: -@widget: -@x: -@y: - - - - - - - -@layout: -@width: -@height: - - - - - - - -@layout: - - - - - - - -@layout: - - - - - - - -@layout: -@Returns: - - - - - - - -@layout: -@Returns: - - - - - - - -@layout: -@adjustment: - - - - - - - -@layout: -@adjustment: - - diff --git a/docs/reference/gtk/tmpl/gtklist.sgml b/docs/reference/gtk/tmpl/gtklist.sgml deleted file mode 100644 index 85d8c8a871..0000000000 --- a/docs/reference/gtk/tmpl/gtklist.sgml +++ /dev/null @@ -1,372 +0,0 @@ - -GtkList - - -Widget for packing a list of selectable items. - - - -The GtkList widget is a container whose children are displayed -vertically in order, and can be selected. - -The list has many selection modes, which are programmer selective and -depend on how many elements are able to be selected at the same time. - - - - - - -#GtkContainer -For functions that apply to every #GtkContainer -(like #GtkList). - - -#GtkListitem -Children of a #GtkList widget must be of this -type. - - - - - - - - - -@container: the parent class object -@children: a GList with the children of the list; belonging to #GtkListitem -@selection: a GList with selected items of the list -@undo_selection: -@undo_unselection: -@last_focus_child: -@undo_focus_child: -@htimer: -@vtimer: -@anchor: -@drag_pos: -@anchor_state: -@selection_mode: the selection mode of the list -@drag_selection: -@add_mode: - - - -Creates a new #GtkList. - - -@Returns: the newly created #GtkList - - - - -Inserts @items into the @list at the position @position. The @GList items -must not be freed after. - - -@list: the list widget. -@items: the items. -@position: the position to insert @items, starting at 0. - - - - -Adds @items to the end of the @list. - - -@list: the list widget. -@items: the items. - - - - -Inserts @items at the beginning of the @list. - - -@list: the list widget. -@items: the items. - - - - -Removes the @items from the @list. - - -@list: the list widget. -@items: the items to remove. - - - - -Removes the @items from the @list, without unreferencing them. It -may be useful if you want to move the items from one list to another. - - -@list: the list widget. -@items: the items. - - - - -Removes the items between index @start (included) and @end (excluded) -from the @list. If @end is negative, or greater than the number of -children of @list, it's assumed to be exactly the number of -elements. If @start is greater than or equal to @end, nothing is -done. - - -@list: the list widget. -@start: the index of the first item to remove. -@end: the index of the lest item to remove plus one. - - - - -Selects the child number @item of the @list. Nothing happens if @item -is out of bounds. The signal GtkList::select-child will be emitted. - - -@list: the list widget. -@item: the index of the child to select. - - - - -Unselects the child number @item of the @list. Nothing happens if -@item is out of bounds. The signal GtkList::unselect-child will be -emitted. - - -@list: the list widget. -@item: the index of the child to unselect. - - - - -Selects the given @child. The signal GtkList::select-child will be -emitted. - - -@list: the list widget -@child: the child to select. - - - - -Unselects the given @child. The signal GtkList::unselect-child will be -emitted. - - -@list: the list widget. -@child: the child to unselect. - - - - -Searches the children of @list for the index of @child. - - -@list: the list widget. -@child: the child to look for. -@Returns: the index of the child, -1 if not found. - - - - -Set the list selection mode. The selection mode can be any value in -#GtkSelectionMode: - - -#GTK_SELECTION_SINGLE - -Zero or one element may be selected. - - - - -#GTK_SELECTION_BROWSE - -Exactly one element is always selected (this can be false after you have -changed the selection mode). - - - - -#GTK_SELECTION_MULTIPLE - -Any number of elements may be selected. Clicks toggle the state of an -item. - - - - -#GTK_SELECTION_EXTENDED - -Any number of elements may be selected. Click-drag selects a range of -elements; the Ctrl key may be used to enlarge the selection, and -Shift key to select between the focus and the child pointed to. - - - - - -@list: the list widget. -@mode: the new selection mode. - - - - -Extends the selection by moving the anchor according to @scroll_type. Only -in #GTK_SELECTION_EXTENDED. - - -@list: the list widget. -@scroll_type: the direction and length. -@position: the position if @scroll_type is #GTK_SCROLL_JUMP. -@auto_start_selection: if #TRUE, gtk_list_start_selection is automatically -carried out before extending the selection. - - - - -Starts a selection (or part of selection) at the focused child. Only in -#GTK_SELECTION_EXTENDED mode. - - -@list: the list widget. - - - - -Ends the selection. Used with #gtk_list_extend_selection and -#gtk_list_start_selection. Only in #GTK_SELECTION_EXTENDED. - - -@list: - - - - -Selects all children of @list. A signal will be emitted for each -newly selected child. - - -@list: the list widget. - - - - -Unselects all children of @list. A signal will be emitted for each -newly unselected child. - - -@list: the list widget. - - - - -Scrolls @list horizontaly. This supposes that the list is packed into a -scrolled window or something similar, and adjustments are well -set. Step and page increment are those from the horizontal adjustment -of @list. Backward means to the left, and forward to the -right. Out of bounds values are truncated. -@scroll_type may be any valid #GtkScrollType. If @scroll_type is -#GTK_SCROLL_NONE, nothing is done. If it's #GTK_SCROLL_JUMP, the list -scrolls to the ratio @position: 0 is full left, 1 is full right. - - -@list: the list widget. -@scroll_type: the scrolling type. -@position: the position if @scroll_type is #GTK_SCROLL_JUMP - - - - -Scrolls @list vertically. This supposes that the list is packed into a -scrolled window or something similar, and adjustments are well -set. Step and page increment are those from the vertical adjustment -of @list. Backward means up, and forward down. Out of bounds values are -truncated. -@scroll_type may be any valid #GtkScrollType. If @scroll_type is -#GTK_SCROLL_NONE, nothing is done. If it's #GTK_SCROLL_JUMP, the list -scrolls to the ratio @position: 0 is top, 1 is bottom. - - -@list: the list widget. -@scroll_type: the scrolling type. -@position: the position if @scroll_type is #GTK_SCROLL_JUMP - - - - -Toggles between adding to the selection and beginning a new selection. Only -in #GTK_SELECTION_EXTENDED. Useful with #gtk_list_extend_selection. - - -@list: the list widget. - - - - -Toggles the focus row. If the focus row is selected, it's -unselected. If the focus row is unselected, it's selected. If the -selection mode of @list is #GTK_SELECTION_BROWSE, this has no effect, -as the selection is always at the focus row. - - -@list: the list widget. - - - - -Toggles the child @item of list. If the selection mode of @list is -#GTK_SELECTION_BROWSE, the item is selected, and the others are -unselected. - - -@list: the list widget. -@item: the child to toggle. - - - - -Restores the selection in the last state, only if selection mode is -#GTK_SELECTION_EXTENDED. If this function is called twice, the selection is -cleared. This function sometimes gives stranges "last states". - - -@list: the list widget. - - - - -Stops the drag selection mode and ungrabs the pointer. This has no -effect if a drag selection is not active. - - -@list: the list widget. - - - - -The selection of the widget has just changed. - - -@list: the object which received the signal. - - - -The child @widget has just been selected. - - -@list: the object which received the signal. -@widget: the newly selected child. - - - -The child @widget has just been unselected. - - -@list: the object which received the signal. -@widget: the newly unselected child. - diff --git a/docs/reference/gtk/tmpl/gtklistitem.sgml b/docs/reference/gtk/tmpl/gtklistitem.sgml deleted file mode 100644 index 696726c07a..0000000000 --- a/docs/reference/gtk/tmpl/gtklistitem.sgml +++ /dev/null @@ -1,145 +0,0 @@ - -GtkListItem - - -an item in a #GtkList. - - - -The #GtkListItem widget is used for each item in a #GtkList. - - - - - - - - -#GtkList -the parent list widget. - - - - - - - - -The #GtkListItem struct contains private data only, and should -only be accessed using the functions below. - - - - - -Creates a new #GtkListitem. - - -@Returns: a new #GtkListItem. - - - - -Creates a new #GtkListItem with a child label containing the given string. - - -@label: the string to use for the child label. -@Returns: a new #GtkListItem with a child #GtkLabel with the text set to -@label. - - - - -Selects the item, by emitting the item's "select" signal. -Depending on the selection mode of the list, this may cause other items to -be deselected. - - -@list_item: a #GtkListItem. - - - - -Deselects the item, by emitting the item's "deselect" signal. - - -@list_item: a #GtkListItem. - - - - - - - -@listitem: the object which received the signal. - - - - - - -@listitem: the object which received the signal. - - - - - - -@listitem: the object which received the signal. - - - - - - -@listitem: the object which received the signal. - - - - - - -@listitem: the object which received the signal. - - - - - - -@listitem: the object which received the signal. - - - - - - -@listitem: the object which received the signal. - - - - - - -@listitem: the object which received the signal. -@scroll_type: -@position: -@auto_start_selection: - - - - - - -@listitem: the object which received the signal. -@scroll_type: -@position: - - - - - - -@listitem: the object which received the signal. -@scroll_type: -@position: - diff --git a/docs/reference/gtk/tmpl/gtkmain.sgml b/docs/reference/gtk/tmpl/gtkmain.sgml deleted file mode 100644 index 5ef24dce3e..0000000000 --- a/docs/reference/gtk/tmpl/gtkmain.sgml +++ /dev/null @@ -1,533 +0,0 @@ - -General - - -Mainloop and event handling - - - -GTK uses an event oriented programming model. While conventional C programs -have control over the program flow all the time this does not apply to -applications written using GTK. Instead you set up some objects and -register some functions (callbacks) to be called whenever -some event occurs and give control to the GTK mainloop (e.g. by calling -gtk_main). - - - - Typical <function>main</function> function for a GTK application - -int -main (int argc, char **argv) -{ - /* Initialize i18n support */ - gtk_set_locale (); - - /* Initialize the widget set */ - gtk_init (&argc, &argv); - - /* Create the main window */ - mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL); - - /* Set up our GUI elements */ - ... - - /* Show the application window */ - gtk_widget_showall (mainwin); - - /* Let the user interact with our application */ - gtk_main (); - - /* The user lost interest */ - gtk_exit (0); -} - - - - - - - - - -Sets the current locale according to the program environment. This is the -same as calling the libc function setlocale(LC_ALL, "") but also takes -care of the locale specific setup of the windowing system used by GDK. - - - -You should call this function before gtk_init to -support internationalization of your GTK+ applications. - - -@Returns: A string corresponding to the locale set. - - - - -Call this function before using any other GTK functions in your GUI -applications. It will initialize everything needed to operate the toolkit and -parses some standard command line options. argc and -argv are adjusted accordingly so your own code will -never see those standard arguments. - - - - -This function will terminate your program if it was unable to initialize -the GUI for some reason. If you want your program to fall back to a -textual interface you want to call gtk_init_check -instead. - - - -@argc: Address of the argc parameter of your -main function. Changed if any arguments were -handled. -@argv: Address of the argv parameter of -main. Any parameters understood by -gtk_init are stripped before return. - - - - -This function does the same work as gtk_init with only -a single change: It does not terminate the program if the GUI can't be -initialized. Instead it returns %FALSE on failure. - - -This way the application can fall back to some other means of communication -with the user - for example a curses or command line interface. - - -@argc: A reference to the argc of the main - function. -@argv: A reference to the argv of the main - function. -@Returns: %TRUE if the GUI has been successful initialized, -%FALSE otherwise. - - - - -Terminate the program and return the given exit code to the caller. -This function will shut down the GUI and free all resources allocated -for GTK. - - -@error_code: Return value to pass to the caller. This is dependend on the -target system but at least on Unix systems %0 means -success. - - - - -Check if any events are pending. This can be used to update the GUI -and invoke timeouts etc. while doing some time intensive computation. - - - - Updating the GUI during a long computation - - /* computation going on */ -... - while (gtk_events_pending ()) - gtk_main_iteration (); -... - /* computation continued */ - - - -@Returns: %TRUE if any events are pending, %FALSE otherwise. - - - - - - - - - - - - - - -@Returns: - - - - - - - - - - - - - - -@Returns: - - - - - - - -@blocking: -@Returns: - - - - - - - -@event: - - - - - - - -@argc: -@argv: - - - - -All this function does it to return TRUE. This can be useful for example -if you want to inhibit the deletion of a window. Of course you should -not do this as the user expects a reaction from clicking the close -icon of the window... - - - - A persistent window - -##include <gtk/gtk.h> - -int -main (int argc, char **argv) -{ - GtkWidget *win, *but; - - gtk_init( &argc, &argv ); - - win = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_signal_connect (GTK_OBJECT(win), "delete-event", - (GtkSignalFunc) gtk_true, NULL); - gtk_signal_connect (GTK_OBJECT(win), "destroy", - (GtkSignalFunc) gtk_main_quit, NULL); - - but = gtk_button_new_with_label ("Close yourself. I mean it!"); - gtk_signal_connect_object ( - GTK_OBJECT (but), "clicked", - (GtkSignalFunc) gtk_object_destroy, (gpointer) win ); - gtk_container_add (GTK_CONTAINER (win), but); - - gtk_widget_show_all (win); - gtk_main (); - return 0; -} - - - -@Returns: %TRUE - - - - -Analogical to gtk_true this function does nothing -but always returns %FALSE. - - -@Returns: %FALSE - - - - - - - -@widget: - - - - - - - -@Returns: - - - - - - - -@widget: - - - - - - - -@function: -@data: - - - - - - - -@main_level: -@object: - - - - - - - -@main_level: -@function: -@data: -@Returns: - - - - - - - -@main_level: -@function: -@marshal: -@data: -@destroy: -@Returns: - - - - - - - -@quit_handler_id: - - - - - - - -@data: - - - - - - - -@interval: -@function: -@marshal: -@data: -@destroy: -@Returns: - - - - - - - -@interval: -@function: -@data: -@Returns: - - - - - - - -@timeout_handler_id: - - - - - - - -@function: -@data: -@Returns: - - - - - - - -@priority: -@function: -@data: -@Returns: - - - - - - - -@priority: -@function: -@marshal: -@data: -@destroy: -@Returns: - - - - - - - -@idle_handler_id: - - - - - - - -@data: - - - - - - - -@source: -@condition: -@function: -@marshal: -@data: -@destroy: -@Returns: - - - - - - - -@input_handler_id: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@snooper: -@func_data: -@Returns: - - - - - - - -@grab_widget: -@event: -@func_data: -@Returns: - - - - - - - -@snooper_handler_id: - - - - - - - -@Returns: - - - - - - - -@event: -@Returns: - - - - - - - -@widget: -@event: - - diff --git a/docs/reference/gtk/tmpl/gtkmarshal.sgml b/docs/reference/gtk/tmpl/gtkmarshal.sgml deleted file mode 100644 index 9163b99bf8..0000000000 --- a/docs/reference/gtk/tmpl/gtkmarshal.sgml +++ /dev/null @@ -1,91 +0,0 @@ - -Signal Marshallers - - -Functions to adapt C structures to native calling convention. - - - -What are Signal Marshallers? - -Marshals are functions which all have the same prototype: -they take a #GtkObject, a #GtkSignalFunc, a #gpointer, -and an array of argument values. -The functions are names gtk_marshall_RETURNTYPE__PARAMTYPE1_PARAMTYPE2.... - - -They then call a native function: the GtkObject is the first -parameter passed in. The arguments are passed in the native -calling convention: chars, shorts, ints, longs may be packed -on the stack, or tucked in registers: it doesn't matter -because the same calling convention will be generated -inside the gtkmarshal code as is expected where you define -your handlers. - - -So the function named: - -gtk_marshal_BOOL__POINTER_INT_INT_UINT(GtkObject*, GtkSignalFunc, gpointer, GtkArg*); - -will call the #GtkSignalFunc assuming it was a function with signature: - -gboolean sigfunc(gpointer,gint,gint,guint); - - - - -Writing Custom Marshals - -Marshals are primarily used as arguments to gtk_signal_new(). -Sometimes, you may find that a marshaller you need isn't available -in the standard list. Then you have to write your own. - - -If you wish to define a signal with a new type of argument list. -Suppose you want 2 pointers and 2 integers. -You would write: - -typedef int (*GtkSignal_INT__POINTER_POINTER_INT_INT)( - gpointer, gpointer, gint, gint -); - -void marshal_INT__POINTER_POINTER_INT_INT(GtkObject* object, - GtkSignalFunc func, - gpointer func_data, - GtkArg* args) -{ - GtkSignal_NONE__POINTER_POINTER_INT_INT rfunc; - gint* return_val; - return_val = GTK_RETLOC_INT(args[4]); - rfunc = (GtkSignal_INT__POINTER_POINTER_INT_INT)func; - *return_val = (*rfunc)(object, - GTK_VALUE_POINTER(args[0]), - GTK_VALUE_POINTER(args[1]), - GTK_VALUE_INT(args[2]), - GTK_VALUE_INT(args[3]), - func_data); -} - - - - - - - - - -#GtkSignal -The signal handling functions (of which marshallers are -really an implementation detail). - - - - - - - -A marshaller that returns void and takes no extra parameters. - - - - diff --git a/docs/reference/gtk/tmpl/gtkmenu.sgml b/docs/reference/gtk/tmpl/gtkmenu.sgml deleted file mode 100644 index 8e3a4a48a5..0000000000 --- a/docs/reference/gtk/tmpl/gtkmenu.sgml +++ /dev/null @@ -1,278 +0,0 @@ - -GtkMenu - - -a drop down menu widget. - - - -A #GtkMenu is a #GtkMenuShell that implements a drop down menu consisting of -a list of #GtkMenuItem objects which can be navigated and activated by the -user to perform application functions. - - - -A #GtkMenu is most commonly dropped down by activating a #GtkMenuItem in a -#GtkMenuBar or popped up by activating a #GtkMenuItem in another #GtkMenu. - - - -A #GtkMenu can also be popped up by activating a #GtkOptionMenu. -Other composite widgets such as the #GtkNotebook can pop up a #GtkMenu -as well. - - - -Applications can display a #GtkMenu as a popup menu by calling the -gtk_menu_popup() function. The example below shows how an application -can pop up a menu when the 3rd mouse button is pressed. - - - -Connecting the popup signal handler. - - /* connect our handler which will popup the menu */ - gtk_signal_connect_object(GTK_OBJECT(window), "button_press_event", - GTK_SIGNAL_FUNC (my_popup_handler), GTK_OBJECT(menu)); - - - - -Signal handler which displays a popup menu. - -static gint -my_popup_handler(GtkWidget *widget, GdkEvent *event) -{ - GtkMenu *menu; - GdkEventButton *event_button; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_MENU (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - /* The "widget" is the menu that was supplied when - * gtk_signal_connect_object was called. - */ - menu = GTK_MENU (widget); - - if (event->type == GDK_BUTTON_PRESS) - { - event_button = (GdkEventButton *) event; - if (event_button->button == 3) - { - gtk_menu_popup (menu, NULL, NULL, NULL, NULL, - event_button->button, event_button->time); - return TRUE; - } - } - - return FALSE; -} - - - - - - - - - - -The #GtkMenu-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkMenu. - - -@Returns: a new #GtkMenu. - - - - -Adds a new #GtkMenuItem to the end of the menu's item list. - - -@menu: a #GtkMenu. -@child: The #GtkMenuItem to add. - - - - -Adds a new #GtkMenuItem to the beginning of the menu's item list. - - -@menu: a #GtkMenu. -@child: The #GtkMenuItem to add. - - - - -Adds a new #GtkMenuItem to the menu's item list at the position -indicated by @position. - - -@menu: a #GtkMenu. -@child: The #GtkMenuItem to add. -@position: The position in the item list where @child is added. -Positions are numbered from 0 to n-1. - - - - -Moves a #GtkMenuItem to a new position within the #GtkMenu. - - -@menu: a #GtkMenu. -@child: the #GtkMenuItem to move. -@position: the new position to place @child. Positions are numbered from -0 to n-1. - - - - -Displays a menu and makes it available for selection. Applications can use -this function to display context-sensitive menus, and will typically supply -NULL for the @parent_menu_shell, @parent_menu_item, @func and @data -parameters. The default menu positioning function will position the menu -at the current pointer position. - - -@menu: a #GtkMenu. -@parent_menu_shell: the menu shell containing the triggering menu item. -@parent_menu_item: the menu item whose activation triggered the popup. -@func: a user supplied function used to position the menu. -@data: user supplied data to be passed to @func. -@button: the button which was pressed to initiate the event. -@activate_time: the time at which the activation event occurred. - - - - -Set the #GtkAccelGroup which holds global accelerators for the menu. - - -@menu: a #GtkMenu. -@accel_group: the #GtkAccelGroup to be associated with the menu. - - - - -Sets the title string for the menu. The title is displayed when the menu -is shown as a tearoff menu. - - -@menu: a #GtkMenu. -@title: a string containing the title for the menu. - - - - -Removes the menu from the screen. - - -@menu: a #GtkMenu. - - - - -Repositions the menu according to its position function. - - -@menu: a #GtkMenu. - - - - -Returns the selected menu item from the menu. This is used by the -#GtkOptionMenu. - - -@menu: a #GtkMenu. -@Returns: the #GtkMenuItem that was last selected in the menu. If a -selection has not yet been made, the first menu item is selected. - - - - -Selects the specified menu item within the menu. This is used by the -#GtkOptionMenu. - - -@menu: a #GtkMenu. -@index: the index of the menu item to select. Index values are from -0 to n-1. - - - - -Changes the tearoff state of the menu. A menu is normally displayed -as drop down menu which persists as long as the menu is active. It can -also be displayed as a tearoff menu which persists until it is closed -or reattached. - - -@menu: a #GtkMenu. -@torn_off: If TRUE, menu is displayed as a tearoff menu. - - - - -Attaches the menu to the widget and provides a callback function that will -be invoked when the menu calls gtk_menu_detach() during its destruction. - - -@menu: a #GtkMenu. -@attach_widget: the #GtkWidget that the menu will be attached to. -@detacher: the user supplied callback function that will be called when -the menu calls gtk_menu_detach(). - - - - -Detaches the menu from the widget to which it had been attached. -This function will call the callback function, @detacher, provided -when the gtk_menu_attach_to_widget() function was called. - - -@menu: a #GtkMenu. - - - - -Returns the #GtkWidget that the menu is attached to. - - -@menu: a #GtkMenu. -@Returns: the #GtkWidget that the menu is attached to. - - - - -A user function supplied when calling gtk_menu_popup() which controls the -positioning of the menu when it is displayed. The function sets the @x -and @y parameters to the coordinates where the menu is to be drawn. - - -@menu: a #GtkMenu. -@x: address of the #gint representing the horizontal position where the -menu shall be drawn. This is an output parameter. -@y: address of the #gint representing the vertical position where the -menu shall be drawn. This is an output parameter. -@user_data: the data supplied by the user in the gtk_menu_popup() @data -parameter. - - - - -A user function supplied when calling gtk_menu_attach_to_widget() which -will be called when the menu is later detached from the widget. - - -@attach_widget: the #GtkWidget that the menu is being detached from. -@menu: the #GtkMenu being detached. - - diff --git a/docs/reference/gtk/tmpl/gtkmenubar.sgml b/docs/reference/gtk/tmpl/gtkmenubar.sgml deleted file mode 100644 index 8fad04298c..0000000000 --- a/docs/reference/gtk/tmpl/gtkmenubar.sgml +++ /dev/null @@ -1,73 +0,0 @@ - -GtkMenuBar - - -A subclass widget for #GtkMenuShell which holds #GtkMenuItem widgets - - - -The #GtkMenuBar is a subclass of #GtkMenuShell which contains one to many #GtkMenuItem. The result is a standard menu bar which can hold many menu items. #GtkMenuBar allows for a shadow type to be set for aesthetic purposes. The shadow types are defined in the #gtk_menu_bar_set_shadow_type function. - - - - -#GtkMenuShell, #GtkMenu, #GtkMenuItem - - - - -The #GtkMenuBar struct contains the following fields. (These fields should be considered read-only. They should never be set by an application.) - - - - - -Creates the new #GtkMenuBar - - -@Returns: the #GtkMenuBar - - - - -Adds a new #GtkMenuItem to the end of the GtkMenuBar - - -@menu_bar: a #GtkMenuBar -@child: the #GtkMenuItem to add - - - - -Adds a new #GtkMenuItem to the beginning of the GtkMenuBar - - -@menu_bar: a #GtkMenuBar -@child: the #GtkMenuItem to add - - - - -Adds a new #GtkMenuItem to the GtkMenuBar at the position defined by @position - - -@menu_bar: a #GtkMenuBar -@child: the #GtkMenuItem to add -@position: the position in the item list where the @child is added. - - - - -Sets the shadow type to use on the GtkMenuBar. The shadow types to use are: -GTK_SHADOW_NONE, GTK_SHADOW_IN, GTK_SHADOW_OUT, GTK_SHADOW_ETCHED_IN, and GTK_SHADOW_ETCHED_OUT - - -@menu_bar: a #GtkMenuBar -@type: the GtkShadowtype - - - - -Used by #GtkMenuBar to determine the shadow type. - - diff --git a/docs/reference/gtk/tmpl/gtkmenufactory.sgml b/docs/reference/gtk/tmpl/gtkmenufactory.sgml deleted file mode 100644 index 77a9754c46..0000000000 --- a/docs/reference/gtk/tmpl/gtkmenufactory.sgml +++ /dev/null @@ -1,132 +0,0 @@ - -Menu Factory - - - - - - - - - - - - - - - - - - - -@widget: -@user_data: - - - - - - - -@path: -@accelerator: -@callback: -@callback_data: -@widget: - - - - - - -@path: -@widget: - - - - - - -@path: -@type: -@accel_group: -@widget: -@subfactories: - - - - - - -@type: -@Returns: - - - - - - - -@factory: - - - - - - - -@factory: -@entries: -@nentries: - - - - - - - -@factory: -@subfactory: -@path: - - - - - - - -@factory: -@paths: -@npaths: - - - - - - - -@factory: -@entries: -@nentries: - - - - - - - -@factory: -@subfactory: -@path: - - - - - - - -@factory: -@path: -@Returns: - - diff --git a/docs/reference/gtk/tmpl/gtkmenuitem.sgml b/docs/reference/gtk/tmpl/gtkmenuitem.sgml deleted file mode 100644 index 3dd96a4cff..0000000000 --- a/docs/reference/gtk/tmpl/gtkmenuitem.sgml +++ /dev/null @@ -1,151 +0,0 @@ - -GtkMenuItem - - -the widget used for item in menus - - - -The #GtkMenuItem widget and the derived widgets are the only valid -childs for menus. Their function is to correctly handle highlighting, -alignment, events and submenus. - - -As it derives from #GtkBin it can hold any valid child widget, altough -only a few are really useful. - - - - - - -#GtkBin -for how to handle the child. - - -#GtkItem -is the abstract class for all sorts of items. - - -#GtkMenuShell -is always the parent of #GtkMenuItem. - - - - - - - - - -@item: the parent class object -@submenu: the submenu attached to this item; read only - - - -Creates a new #GtkMenuItem. - - -@Returns: the newly created #GtkMenuItem - - - - -Creates a new #GtkMenuItem whose child is a simple #GtlLabel. - - -@label: the text for the label -@Returns: the newly created #GtkMenuItem - - - - -Sets the widget submenu, or changes it. - - -@menu_item: the menu item widget -@submenu: the submenu - - - - -Removes the widget's submenu. - - -@menu_item: the menu item widget - - - - -Specifies the placement of the submenu around the menu item. The placement -is usually #GTK_LEFT_RIGHT for menu items in a popup menu and -#GTK_TOP_BOTTOM in menu bars. - - -This function is useless in usual applications. - - -@menu_item: the menu item -@placement: the submenu placement - - - - -Sets whether the menu item should show a submenu indicator, which is a right -arrow. - - -@menu_item: the menu item -@show_toggle_indicator: unused -@show_submenu_indicator: whether to show the arrow or not - - - - -Emits the "select" signal on the given item. Behaves exactly like -#gtk_item_select. - - -@menu_item: the menu item - - - - -Emits the "deselect" signal on the given item. Behaves exactly like -#gtk_item_deselect. - - -@menu_item: the menu item - - - - -Emits the "activate" signal on the given item - - -@menu_item: the menu item - - - - -Sets the menu item to be right-justified. Only useful for menu bars. - - -@menu_item: the menu item - - - - -Emitted when the item is activated. - - -@menuitem: the object which received the signal. - - - -Emitted when the item is activated, but also if the menu item has a -submenu. For normal applications, the relevant signal is "activate". - - -@menuitem: the object which received the signal. - diff --git a/docs/reference/gtk/tmpl/gtkmenushell.sgml b/docs/reference/gtk/tmpl/gtkmenushell.sgml deleted file mode 100644 index 4c00a7a7a3..0000000000 --- a/docs/reference/gtk/tmpl/gtkmenushell.sgml +++ /dev/null @@ -1,179 +0,0 @@ - -GtkMenuShell - - -a base class for menu objects. - - - -A #GtkMenuShell is the abstract base class used to derive the -#GtkMenu and #GtkMenuBar subclasses. - - - -A #GtkMenuShell is a container of #GtkMenuItem objects arranged in a -list which can be navigated, selected, and activated by the user to perform -application functions. A #GtkMenuItem can have a submenu associated with it, -allowing for nested hierarchical menus. - - - - - - - - - -The #GtkMenuShell-struct struct contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#GList *children; -The list of #GtkMenuItem objects contained by this #GtkMenuShell. - - - - - - - - -Adds a new #GtkMenuItem to the end of the menu shell's item list. - - -@menu_shell: a #GtkMenuShell. -@child: The #GtkMenuItem to add. - - - - -Adds a new #GtkMenuItem to the beginning of the menu shell's item list. - - -@menu_shell: a #GtkMenuShell. -@child: The #GtkMenuItem to add. - - - - -Adds a new #GtkMenuItem to the menu shell's item list at the position -indicated by @position. - - -@menu_shell: a #GtkMenuShell. -@child: The #GtkMenuItem to add. -@position: The position in the item list where @child is added. -Positions are numbered from 0 to n-1. - - - - -Deactivates the menu shell. Typically this results in the menu shell -being erased from the screen. - - -@menu_shell: a #GtkMenuShell. - - - - -Selects the menu item from the menu shell. - - -@menu_shell: a #GtkMenuShell. -@menu_item: The #GtkMenuItem to select. - - - - -Activates the menu item within the menu shell. - - -@menu_shell: a #GtkMenuShell. -@menu_item: The #GtkMenuItem to activate. -@force_deactivate: If TRUE, force the deactivation of the menu shell -after the menu item is activated. - - - - -An enumeration representing directional movements within a menu. - - - - - - -GTK_MENU_DIR_PARENT -To the parent menu shell. - - - -GTK_MENU_DIR_CHILD -To the submenu, if any, associated with the item. - - - -GTK_MENU_DIR_NEXT -To the next menu item. - - - -GTK_MENU_DIR_PREV -To the previous menu item. - - - - - -@GTK_MENU_DIR_PARENT: -@GTK_MENU_DIR_CHILD: -@GTK_MENU_DIR_NEXT: -@GTK_MENU_DIR_PREV: - - - -This signal is emitted when a menu shell is deactivated. - - -@menushell: the object which received the signal. - - - -This signal is emitted when a selection has been completed within a menu -shell. - - -@menushell: the object which received the signal. - - - -An action signal which moves the current menu item in the direction -specified by @direction. - - -@menushell: the object which received the signal. -@direction: the direction to move. - - - -An action signal that activates the current menu item within the menu -shell. - - -@menushell: the object which received the signal. -@force_hide: if TRUE, hide the menu after activating the menu item. - - - -An action signal which cancels the selection within the menu shell. -Causes the GtkMenuShell::selection-done signal to be emitted. - - -@menushell: the object which received the signal. - diff --git a/docs/reference/gtk/tmpl/gtkmisc.sgml b/docs/reference/gtk/tmpl/gtkmisc.sgml deleted file mode 100644 index 861f363324..0000000000 --- a/docs/reference/gtk/tmpl/gtkmisc.sgml +++ /dev/null @@ -1,104 +0,0 @@ - -GtkMisc - - -a base class for widgets with alignments and padding. - - - -The #GtkMisc widget is an abstract widget which is not useful itself, but -is used to derive subclasses which have alignment and padding attributes. - - -The horizontal and vertical padding attributes allows extra space to be -added around the widget. - - -The horizontal and vertical alignment attributes enable the widget to be -positioned within its allocated area. Note that if the widget is added to -a container in such a way that it expands automatically to fill its -allocated area, the alignment settings will not alter the widgets position. - - - - - - - - - -The #GtkMisc-struct struct contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#gfloat xalign; -the horizontal alignment, from 0 (left) to 1 (right). - - - -#gfloat yalign; -the vertical alignment, from 0 (top) to 1 (bottom). - - - -#guint16 xpad; -the amount of space to add on the left and right of the widget, -in pixels. - - - -#guint16 ypad; -the amount of space to add on the top and bottom of the widget, -in pixels. - - - - - - - -Sets the alignment of the widget. - - -@misc: a #GtkMisc. -@xalign: the horizontal alignment, from 0 (left) to 1 (right). -@yalign: the vertical alignment, from 0 (top) to 1 (bottom). - - - - -Sets the amount of space to add around the widget. - - -@misc: a #GtkMisc. -@xpad: the amount of space to add on the left and right of the widget, -in pixels. -@ypad: the amount of space to add on the top and bottom of the widget, -in pixels. - - - - -the horizontal alignment, from 0 (left) to 1 (right). - - - - -the vertical alignment, from 0 (top) to 1 (bottom). - - - - -the amount of space to add on the left and right of the widget, in pixels. - - - - -the amount of space to add on the top and bottom of the widget, in pixels. - - diff --git a/docs/reference/gtk/tmpl/gtknotebook.sgml b/docs/reference/gtk/tmpl/gtknotebook.sgml deleted file mode 100644 index bc8cb99e26..0000000000 --- a/docs/reference/gtk/tmpl/gtknotebook.sgml +++ /dev/null @@ -1,482 +0,0 @@ - -GtkNotebook - - -Set of pages with bookmarks. - - - -The #GtkNotebook widget is a #GtkContainer whose children are pages that -can be accessed through bookmarks. The pages are displayed all at the same -place. - - - - - - -#GtkContainer -For functions that apply to every #GtkContainer -(like #GtkList). - - - - - - - - - -@container: the parent class object -@cur_page: the currently displayed page -@children: a GList with the children of the notebook; belonging to -#GtkNotebookPage -@first_tab: -@focus_tab: -@menu: -@panel: -@timer: -@tab_hborder: -@tab_vborder: -@show_tabs: -@homogeneous: -@show_border: -@tab_pos: -@scrollable: -@in_child: -@click_child: -@button: -@need_timer: -@child_has_focus: -@have_visible_child: - - - -Extracts the contents of the current element of #GList @_glist_ as a -#GtkNotebookPage. - - -@_glist_: - - - - -The #GtkNotebookPage structure is used to store the pages of a notebook. It -is not an object. - - -@child: the contents of the page -@tab_label: the label shown in the bookmark -@menu_label: the label shown in the popup menu -@default_menu: -@default_tab: -@expand: -@fill: -@pack: -@requisition: -@allocation: - - - -Creates a new #GtkNotebook widget - - -@Returns: the newly created G=#GtkNotebook - - - - -Appends to @notebook a page whose content is @child, and whose bookmark is -@tab_label. - - -@notebook: the notebook widget -@child: the content of the new page -@tab_label: the bookmark for the page - - - - -Appends to @notebook a page whose content is @child, whose bookmark is -@tab_label, and whose menu label is @menu_label. - - -@notebook: the notebook widget -@child: the content of the new page -@tab_label: the bookmark of the page -@menu_label: the menu label of the page - - - - -Prepends to @notebook a page whose content is @child, whose bookmark is -@tab_label, and whose menu label is @menu_label. - - -@notebook: the notebook widget -@child: the content of the new page -@tab_label: the bookmark of the page - - - - -Appends to @notebook a page whose content is @child, whose bookmark is -@tab_label, and whose menu label is @menu_label. - - -@notebook: the notebook widget -@child: the content of the new page -@tab_label: the bookmark of the page -@menu_label: the menu label of the page - - - - -Inserts in @notebook a new page whose content is @child, and whose -bookmark is @tab_label. The page is inserted just -before the page number @position, starting with 0. If @position is out of -bounds, it is assumed to be the current number of pages. - - -@notebook: the notebook widget -@child: the content of the new page -@tab_label: the bookmark of the page -@position: the position to insert the page - - - - -Inserts in @notebook a new page whose content is @child, whose bookmark is -@tab_label, and whose menu label is @menu_label. The page is inserted just -before the page number @position, starting with 0. If @position is out of -bounds, it is assumed to be the current number of pages. - - -@notebook: the notebook widget -@child: the content of the new page -@tab_label: the bookmark of the page -@menu_label: the menu label of the page -@position: the position to insert the page - - - - -Removes the page @page_num form @notebook. Pages are numbered starting at -zero. Negative values stand for the last page; too large values are -ignored. - - -@notebook: the notebook widget -@page_num: the page number - - - - -Compatibility macro; in gtkcompat.h. - - - - - - -Returns the page number of @child in @notebook. - - -@notebook: the notebook widget -@child: the child -@Returns: the page number, or -1 if @child is not in @notebook - - - - -Switches to the page number @page_num. Negative values stand for the last -page; too large values are ignored. - - -@notebook: the notebook widget -@page_num: the page number - - - - -Switches to the next page. Nothing happens if the current page is the last -page. - - -@notebook: the notebook widget. - - - - -Switches to the previous page. Nothing happens if the current page is the -first page. - - -@notebook: the notebook widget - - - - -Moves the page @child, so that it appears in position @position. Out of -bounds @position will be clamped. - - -@notebook: the notebook widget -@child: the child to deplace -@position: the new position - - - - -Sets the position of the bookmarks. - - -@notebook: the notebook widget -@pos: the position - - - - -Sets whether to show the bookmarks or not. - - -@notebook: the notebook widget -@show_tabs: a boolean value - - - - -Sets whether to show the border of the notebook or not. Bookmarks are in the -border. - - -@notebook: the notebook widget -@show_border: a boolean value - - - - -Sets whether the bookmarks area may be scrollable or not if there are too -many bookmarks to fit in the allocated area. - - -@notebook: the notebook widget -@scrollable: a boolean value - - - - -Sets whether there should be a border around the bookmarks or not. - - -@notebook: the notebook widget -@border_width: a boolean value - - - - -Sets whether the tabs should have a horizontal border. - - -@notebook: the notebook widget -@tab_hborder: a boolean value - - - - -Sets whether the tabs should have a vertical border. - - -@notebook: the notebook widget -@tab_vborder: a boolean value - - - - -Enables the popup menu: if the user clicks with the right mouse button on -the bookmarks, a menu with all the pages will be popped up. - - -@notebook: the notebook widget - - - - -Disables the popup menu - - -@notebook: the notebook widget - - - - -Returns the page number of the current page. - - -@notebook: the notebook widget -@Returns: the page number - - - - -Returns the menu label of the page @child. NULL is returned if @child is not -in @notebook or NULL if it has the default menu label. - - -@notebook: the notebook widget -@child: the page -@Returns: the menu label - - - - -Returns the content of the page number @page_num, or NULL if @page_num is -out of bounds. - - -@notebook: the notebook widget -@page_num: the page number -@Returns: the content of the page - - - - -Returns the menu tab of the page @child. NULL is returned if @child is not -in @notebook or NULL if it has the default tab label. - - -@notebook: the notebook widget -@child: the page -@Returns: the tab label - - - - -Looks for the packing attributes of the bookmarks of @child. - - -@notebook: the notebook widget -@child: the page -@expand: a pointer to return the expand value (or NULL) -@fill: a pointer to return the fill value (or NULL) -@pack_type: a pointer to return the pack_type (or NULL) - - - - -Sets whether the tabs must have all the same size or not. - - -@notebook: the notebook widget -@homogeneous: a boolean value - - - - -Changes the menu label of @child. Nothing happens if @child is not in -@notebook. - - -@notebook: the notebook widget -@child: the page -@menu_label: the menu label, or NULL for default - - - - -Creates a new label and sets it as the menu label of @child. - - -@notebook: the notebook widget -@child: the page -@menu_text: the label text - - - - -Changes the bookmark label of @child. Nothing happens if @child is not in -@notebook. - - -@notebook: the notebook widget -@child: the page -@tab_label: the bookmark label, or NULL for default - - - - -Sets the packing parameters for the bookmark of @child. See -#GtkBoxPackStart for the exact meanings. - - -@notebook: the notebook widget -@child: the child widget -@expand: whether to expand the bookmark or not -@fill: whether the bookmark should fill the allocated area or not -@pack_type: the position of the bookmark - - - - -Creates a new label and sets it as the bookmark label of @child. - - -@notebook: the notebook widget -@child: the page -@tab_text: the label text - - - - -Emitted when the user or a function changes the current page. - - -@notebook: the object which received the signal. -@page: the new current page -@page_num: the index of the page - - - -The current page - - - - -The position of the bookmarks - - - - -Whether the bookmarks have a border or not - - - - -Whether the bookmarks have a horizontal border or not - - - - -Whether the bookmarks have a vertical border or not - - - - -Whether to show the bookmarks or not - - - - -Whether to show the border or not - - - - -Whether the bookmarks should be scrollable or not - - - - -Whether the popup menu is enabled or not - - diff --git a/docs/reference/gtk/tmpl/gtkobject.sgml b/docs/reference/gtk/tmpl/gtkobject.sgml deleted file mode 100644 index 43a2acffad..0000000000 --- a/docs/reference/gtk/tmpl/gtkobject.sgml +++ /dev/null @@ -1,916 +0,0 @@ - -GtkObject - - -The base class of the Gtk type hierarchy. - - - -Description - -GtkObject is the root of the gtk+ type hierarchy. It serves -a similar roles as java's Object class. It is used -by the type-casting system to represent the base composite type. - - -Objects have arguments that are -name/typed-value pairs. -They may be readable or writable (or both or neither). -The special handlers in every object are responsible for -setting and getting these parameters. -If the handler for a given argument must -be called before the object may be used, be sure the -#GTK_ARG_CONSTRUCT or #GTK_ARG_CONSTRUCT_ONLY flags -are set; otherwise they are set only when the user does so. - - -Object also store a simpler association table, sometimes -called the object_data. This is just an efficient mapping from -a fixed set of strings to a gpointer. This can be used as -arbitrary extra members. Notice that each new field name -allocates a new quark, so it is probably best only to use -this for fields with fixed names. - - -The primary difference between object_data and arguments is that -the object defines two functions which set and get each type of argument. -The object just has a table to store its object data in: it does not -receive notice when data changes. - - -Objects are reference counted; this means that we maintain -a count of how many references (usually in the form of a pointer) -are being held to this object. -To indicate that you reference an object, call gtk_object_ref(). -The object will not be freed until everyone calls -gtk_object_unref(). - - -In order to reduce the chances of a memory leak, gtk+ defines -"floating objects". All objects created with gtk_object_new() -start out floating with a reference count of 1. -In order to reduce that initial reference count you should gtk_object_sink() -them, but usually the parent widget you add the child to will -sink the object. - -So, because gtk_widget_set_parent() sinks the object from -gtk_container_add(), there are no memory leaks in this code: - - - button = gtk_button_new_with_label("Hi Mom!"); - gtk_container_add(GTK_CONTAINER(window), button); - /* Button may not be used anymore since we don't retain a reference - * to it. */ - - -Likewise, the following code attaches the same adjustment to two -ranges: - - - adjustment = (GtkAdjustment*) gtk_adjustment_new(0,10,0,0,0,0); - gtk_range_set_adjustment(range1, adjustment); - gtk_range_set_adjustment(range2, adjustment); - - -Note that we could put as many set_adjustments as we like: cleanup is easy -because they all retain a reference but only one sinks the initial reference -count. If it is possible for "range1" to stop retaining its reference -then we need to enclose the lines using "adjustment" with ref/unref -to guarantee the the object won't be deleted: - - - adjustment = (GtkAdjustment*) gtk_adjustment_new(0,10,0,0,0,0); - gtk_object_ref(GTK_OBJECT(adjustment)); - gtk_range_set_adjustment(range1, adjustment); - gtk_range_set_adjustment(range1, another_adjustment); - /* With the initial reference, `adjustment' would have - * been deleted as `range1' lost its reference to it. */ - gtk_range_set_adjustment(range2, adjustment); - gtk_object_unref(GTK_OBJECT(adjustment)); - - - - -Be careful with reference counting: if two objects reference eachother -then they will always have at least reference count 1, even if -there are no other pointers to them. This means that they -will never be freed. More precisely, you must be certain that -your references never can form cycles. - - -If you find yourself forming cyclic references, perhaps you -can convert some of them to weak-references. -A weak-reference is one that holds a pointer to an object, -but doesn't increase the reference count. To insure -the object is valid when the referer tries to use it, -the referer registers a callback that will be invoked -after the object has been destroyed (but before its memory is actually -deallocated). This callback must prevent the weak-reference from -being used again. - - - -Brief Glossary - - - -argument - -A typed-variable identified by ObjectType::argument_name. It may be -readable, writable, both or none. For example, -"GtkButton::label" is a read/write string-valued argument. - - - - -constructed - - - - - -destroyed - - - - - -finalization - - - - - -floating - - - - - -object data - - - - - -reference count - - - - - -weak-reference - - - - - - - - - -GtkType, GtkArg, gtk-signals. - - - - -The object itself. You should never use these members directly- -instead you the accessing macros. - - -@klass: a pointer to the GtkObjectClass (or deriver) which contains -the methods defined by this object. -@flags: the state of the object: whether it has been constructed -or destroyed, for example. -@ref_count: a reference count. It is incremented when new -pointers to this object are made, and decremented when the -pointers are deleted. When the reference count -returns to 0, the object is deleted. By default, objects -have reference count 0 when created. -@object_data: - - - -Get the type of an object. - - -@obj: the object whose type we wish to get. - - - - -Get the array of signals defined for this object. - - -@obj: the object to fetch the signals from. - - - - -Get the number of signals defined by this object. - - -@obj: the object to query. - - - - -Tells about the state of the object. - - -@GTK_DESTROYED: the GtkObject has had gtk_object_destroyed() invoked on it -and is processing the shutdown callback. -@GTK_FLOATING: whether the object is orphaned. Objects that take -strong hold of an object may gtk_object_sink() it, after obtaining -there own references, if they believe they are nearly primary -ownership of the object. -GTK_CONNECTED: refers to whether are signals are connected to this -object. -@GTK_CONSTRUCTED: refers to whether the arguments for this object are -ready. - - - -Get the #GtkObjectFlags for an object without directly -accessing its members. - - -@obj: the object whose flags are returned. - - - - -Test whether a GtkObject has had gtk_object_destroyed() invoked on it. - - -@obj: the object to examine. - - - - -When an object is created, it has an initial reference count -of 1 and is floating. Sinking the object -refers to decrementing that original reference count. - - -@obj: the object to examine. - - - - -Test whether a GtkObject has had a signal connected to it. - - -@obj: the object to examine. - - - - -Test whether a GtkObject's arguments have been prepared. - - -@obj: the object to examine. - - - - -Turn on certain object flags. (Private) - - -@obj: the object to affect. -@flag: the flags to set. - - - - -Turn off certain object flags. (Private) - - -@obj: the object to affect. -@flag: the flags to unset. - - - - -Possible flags indicating how an argument should be treated. - - -@GTK_ARG_READABLE: the argument is readable. (i.e. can be queried) -@GTK_ARG_WRITABLE: the argument is writable. (i.e. settable) -@GTK_ARG_CONSTRUCT: the argument needs construction. -@GTK_ARG_CONSTRUCT_ONLY: the argument needs construction (and will -be set once during object creation), but is otherwise cannot be -set. Hence this flag is not allowed with #GTK_ARG_WRITABLE, -and is redundant with #GTK_ARG_CONSTRUCT. -@GTK_ARG_CHILD_ARG: an argument type that applies to (and may be different for) -each child. Used by #GtkContainer. -@GTK_ARG_MASK: the bitwise-OR of all the flags. -@GTK_ARG_READWRITE: the argument is readable and writable. - - - -Define a signal-handler for a new signal on an already defined -object. - - -See the signal documentation for more general information. - - -@klass: the object class to define the signal for. -@name: the name of the signal. -@signal_flags: the default emission behavior for the signal. -See gtk_signal_new(). -@marshaller: a function that will take an array of GtkArgs -and invoke the appropriate handler with the normal calling -conventions. -@return_val: specify the return-value type for the signal -(or GTK_TYPE_NONE for no return-value). -@nparams: specify the number of parameters the signal -receives from the caller of gtk_signal_emit(). -@Varargs: list of nparams #GtkTypes to pass to the signal handlers. -@Returns: the signal id. (See #GtkSignals) - - - - -Define a signal-handler for a new signal on an already defined -object. - - -@klass: the object class to define the signal for. -@name: the name of the signal. -@signal_flags: the default emission behavior for the signal. -See gtk_signal_new(). -@marshaller: takes a GtkObject, a #GtkSignalFunc, and an array -of arguments, and invokes the function using the appropriate -calling conventions. Usually just select a function -out of gtkmarshal.h. -@return_val: specify the return-value type for the signal (possibly -#GTK_TYPE_NONE). -@nparams: specify the number of parameters the signal -receives from the caller of gtk_signal_emit(). -@params: array of #GtkTypes the signal handlers for this signal -should have in their prototype (of length nparams). -@Returns: the signal id. (See #GtkSignals) - - - - -Construct an object given its arguments, enumerated in the call to the -function. - - -@type: the type identifying this object. Returned by gtk_type_unique() -although (for a properly-written object it should be accessible through -#GTK_TYPE_FOO.) -@first_arg_name: name of the first argument to set when constructing -the object. -@Varargs: the first argument's value, followed by any number of -name/argument-value pairs, terminated with NULL. -@Returns: the new GtkObject. - - - - -Construct an object with an array of arguments. - - -@object_type: the type of the object to create. -@n_args: the number of arguments to set. -@args: an array of n_args arguments (which are name and value pairs). -@Returns: the new GtkObject. - - - - -Mark an allocated object as constructed. -This is used for situations -that require precise control of the construction process. - - -This is done when gtk_object_default_construct() is inadequate. -In #GtkCList the need arises because #GtkCList does construction work that -must happen after its derivers. This work -cannot be done in an initializer function, so an alternate -constructor is mandatory. It calls gtk_object_constructed() to -indicate it has done its job, so that no other constructor will -be invoked. - - -Normally this function is just automatically run from -gtk_object_default_construct(). - - -@object: object which has been constructed. This is usually -done automatically by gtk_object_new() and gtk_object_newv(). - - - - -This function is called to construct arguments that haven't been initialized -but have the #GTK_ARG_CONSTRUCT flag set. - - -All number arguments are set to 0. All pointers and strings -are set to NULL. - - -Normally invoked by gtk_object_new() automatically; gtk_type_new() can -be used to bypass it. - - -@object: the object to initialize. - - - - -Decrement the initial count given to the object. -Additional invocations have no effect. - - -This is designed to free the user from worrying about -dereferencing an object that they have just created. -So long as the object is sunk at some point, the reference count -will be set properly. - - -furthermore it may be sunk multiple times. -Only the first time will actually dereference. - - -The basic outline is: when you create an object it is floating. -Setting its parent causes it to be sunk, however its parent -has obtained a reference, so its reference count is one. - - -@object: the object to sink. - - - - -Increase the reference count of the object. - - -@object: the object to reference. - - - - -Decrease the reference count of an object. When its reference -count drops to 0, the object is deleted. - - -If it was not already destroyed, it will be, with gtk_object_destroy(), -then weak links are notified, then the object-data is freed -and the memory for the object itself is freed using gtk_type_free(). - - -@object: the object to dereference. - - - - -Adds a weak reference callback to an object. - - -Weak references are a mechanism to safely keep a pointer to -an object without using the reference counting -mechansim. They use a callback function to receive -notice that the object is about to be freed (aka finalized). -This happens after the destroy -callback has been run. - - -@object: object to weakly reference. -@notify: callback to invoke before the object is freed. -@data: extra data to pass to #notify. - - - - -Removes a weak reference callback to an object. - - -@object: object stop weakly referencing. -@notify: callback to search for. -@data: data to search for. - - - - -Calls the object's shutdown handler. - - -The memory for the object itself won't be deleted until -its reference count drops to 0, though. -See gtk_object_unref(). - - -@object: the object to destroy. - - - - -Gets an array of argument values from an object. - - -@object: the object to get arguments from. -@n_args: the number of arguments to query. -@args: the arguments to fill in. - - - - -This function sets multiple arguments of an object. - - -It takes an object, then a list of name/value pairs -in a list, followed by NULL. - - - - -void set_box_properties(GtkBox* box) -{ - gtk_object_set(GTK_OBJECT(box), "homogeneous", TRUE, - "spacing", 8, - NULL); -} - - - - - -@object: the object whose arguments should be set. -@first_arg_name: the name of the first argument to set. -@Varargs: the value of the first argument, followed optionally -by more name/value pairs, followed by NULL. - - - -Set an array of arguments. - - -@object: the object whose arguments should be set. -@n_args: the number of arguments to set. -@args: the desired values, as an array of #GtkArgs (which contain -the names, types, and values of the arguments). - - - - -Get all the arguments that may be used for a given type. - - -In Java, this type of mechanism is called -introspection. It is used by applications -like Glade, that have to determine what can be done to an object -at run-time. - - -@class_type: the GtkType of the ObjectClass -(returned from GTK_OBJECT_CLASS(class)->type for example). -@arg_flags: if non-NULL, obtains the #GtkArgFlags that apply to -each argument. You must g_free() this if you request it. -@n_args: the number of arguments is returned in this field. -@Returns: an array of arguments, that you must deallocate with g_free(). - - - - -Each object carries around a table of associations from -strings to pointers. This function lets you set an association. - - -If the object already had an association with that name, -the old association will be destroyed. - - -@object: object containing the associations. -@key: name of the key. -@data: data to associate with that key. - - - - -Like gtk_object_set_data() except it adds notification -for when the association is destroyed, either by -gtk_object_remove_data() or when the object is destroyed. - - -@object: object containing the associations. -@key: name of the key. -@data: data to associate with that key. -@destroy: function to call when the association is destroyed. - - - - -Remove a specified datum from the object's data associations (the object_data). -Subsequent calls to gtk_object_get_data() will return NULL. - - -If you specified a destroy handler with gtk_object_set_data_full(), -it will be invoked. - - - -@object: the object maintaining the association. -@key: name of the key for that association. - - - - -Get a named field from the object's table of associations (the object_data). - - -@object: the object maintaining the associations. -@key: name of the key for that association. -@Returns: the data if found, or NULL if no such data exists. - - - - -Remove a specified datum from the object's data associations (the object_data), -without invoking the association's destroy handler. - - -Just like gtk_object_remove_data() except that any destroy handler -will be ignored. -Therefore this only affects data set using gtk_object_set_data_full(). - - -@object: the object maintaining the association. -@key: name of the key for that association. - - - - -For convenience, every object offers a generic user data -pointer. The function set it. - - -This function is equivalent to: - - - gtk_object_set_data(object, "user_data", data); - - - - -@object: the object whose user data should be set. -@data: the new value for the user data. - - - - -Get the object's user data pointer. - - -This is intended to be a pointer for your convenience in -writing applications. - - -@object: the object. -@Returns: the user data field for object. - - - - -Add an array of signals to a #GtkObjectClass. -Usually this is called when registering a new type of object. - - -@klass: the object class to append signals to. -@signals: the signals to append. -@nsignals: the number of signals being appended. - - - - -Add a new type of argument to an object class. -Usually this is called when registering a new type of object. - - -@arg_name: fully qualify object name, for example GtkObject::user_data. -@arg_type: type of the argument. -@arg_flags: bitwise-OR of the #GtkArgFlags enum. (Whether the argument is -settable or gettable, whether it is set when the object is constructed.) -@arg_id: an internal number, passed in from here to the "set_arg" and -"get_arg" handlers of the object. - - - - -Just like gtk_object_set_data() except that it takes -a #GQuark instead of a string, so it is slightly faster. - - -Use gtk_object_data_try_key() and gtk_object_data_force_id() -to get an id from a string. - - -@object: object containing the associations. -@data_id: quark of the key. -@data: data to associate with that key. - - - - -Just like gtk_object_set_data_full() except that it takes -a #GQuark instead of a string, so it is slightly faster. - - -Use gtk_object_data_try_key() and gtk_object_data_force_id() -to get an id from a string. - - -@object: object containing the associations. -@data_id: quark of the key. -@data: data to associate with that key. -@destroy: function to call when the association is destroyed. - - - - -Just like gtk_object_get_data() except that it takes -a #GQuark instead of a string, so it is slightly faster. - - -Use gtk_object_data_try_key() and gtk_object_data_force_id() -to get an id from a string. - - -@object: object containing the associations. -@data_id: quark of the key. -@Returns: the data if found, or NULL if no such data exists. - - - - -Just like gtk_object_remove_data() except that it takes -a #GQuark instead of a string, so it is slightly faster. - - -Remove a specified datum from the object's data associations. -Subsequent calls to gtk_object_get_data() will return NULL. - - -Use gtk_object_data_try_key() and gtk_object_data_force_id() -to get an id from a string. - - -@object: object containing the associations. -@data_id: quark of the key. - - - - -Just like gtk_object_remove_no_notify() except that it takes -a #GQuark instead of a string, so it is slightly faster. - - -Use gtk_object_data_try_key() and gtk_object_data_force_id() -to get an id from a string. - - -@object: object containing the associations. -@data_id: quark of the key. - - - - -Sees whether a certain quark exists. -Returns that quark if so. - - -Although this is currently the same as g_quark_try_string(), -it might someday be different, for example, if GQuarks -and object data are converted to separate mechanisms, -so it is good to use this macro. - - - - - - -Makes a quark from a string, possibly allocating a new quark. - - -Although this is currently the same as g_quark_from_string(), -it might someday be different, for example, if GQuarks -and object data are converted to separate mechanisms, -so it is good to use this macro. - - - - - - -Private function to set an argument and argument info to an object. - - -@object: the object whose argument should be set. -@arg: the argument. -@info: infomation about this type of argument in general. - - - - -Private function to get an argument and argument info from an object. - - -@object: the object whose argument should be retrieved. -@arg: the argument, for the name on input, the rest is filled on output. -@info: a #GtkArgInfo structure to optionally fill in. - - - - -Private: Gets an array of #GtkArgs from a va_list C structure. - - -@object_type: the type of object to collect arguments for. -@arg_list_p: pointer to be filled in with a list of parsed arguments. -@info_list_p: optional pointer for a returned list #GtkArgInfos. -@first_arg_name: name of first argument. -@var_args: value of first argument, followed by more key/value pairs, -terminated by NULL. -@Returns: an error message, or NULL on success. -It is the caller's responsibility to call g_free() in the event of error. - - - - -Query information about an argument type. - - -@object_type: type of object to query about. -@arg_name: name of the argument. -@info_p: pointer to be filled in with a pointer to the GtkArgInfo. -@Returns: an error message, or NULL on success. -It is the caller's responsibility to call g_free() in the event of error. - - - - -Private: print debugging information while doing a gtk_object_ref() or -a gtk_object_unref(). - - -@object: object to reference or unreference. -@func: name of caller's function to print (used within macros). -@dummy: unused. -@line: line number (used within macros). -@do_ref: whether to reference or unreference. - - - - -Indicates that an object is being destroyed. - - -@object: the object which received the signal. - - - -A pointer for convenience when programming applications. - - - - -Setting this with a GtkType of GTK_TYPE_SIGNAL connects -the signal to the object. - - - - -Setting this with a GtkType of GTK_TYPE_SIGNAL connects -the signal to the object, so that the signal is always run -after other user handlers and the default handler. - - - - -Setting this with a GtkType of GTK_TYPE_SIGNAL connects -the signal to the object, so that the user data and objects -and swapped when the signal handler is invoked. - - -This is useful for handlers that are primarily notifying -other objects and could just invoke an already existing function -if the parameters were swapped. -See gtk_signal_connect_object() for more details. - - - - -Setting this with a GtkType of GTK_TYPE_SIGNAL connects -the signal to the object, so that the user data and objects -and swapped when the signal handler is invoked, -and so that the handler is invoked after all others. - - -See gtk_signal_connect_object_after() for more details. - - diff --git a/docs/reference/gtk/tmpl/gtkoptionmenu.sgml b/docs/reference/gtk/tmpl/gtkoptionmenu.sgml deleted file mode 100644 index 9bc5aab887..0000000000 --- a/docs/reference/gtk/tmpl/gtkoptionmenu.sgml +++ /dev/null @@ -1,71 +0,0 @@ - -GtkOptionMenu - - -a widget used to choose from a list of valid choices. - - - -A #GtkOptionMenu is a widget that allows the user to choose from a -list of valid choices. The #GtkOptionMenu displays the selected -choice. When activated the #GtkOptionMenu displays a popup #GtkMenu -which allows the user to make a new choice. - - - - - - - -The #GtkOptionMenu-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkOptionMenu. - - -@Returns: a new #GtkOptionMenu. - - - - -Returns the #GtkMenu associated with the #GtkOptionMenu. - - -@option_menu: a #GtkOptionMenu. -@Returns: the #GtkMenu associated with the #GtkOptionMenu. - - - - -Provides the #GtkMenu that is popped up to allow the user to choose -a new value. You should provide a simple menu avoiding the -use of tearoff menu items, submenus, and accelerators. - - -@option_menu: a #GtkOptionMenu. -@menu: the #GtkMenu to associate with the #GtkOptionMenu. - - - - -Removes the menu from the option menu. - - -@option_menu: a #GtkOptionMenu. - - - - -Selects the menu item specified by @index making it the newly -selected value for the option menu. - - -@option_menu: a #GtkOptionMenu. -@index: the index of the menu item to select. Index values are from -0 to n-1. - - diff --git a/docs/reference/gtk/tmpl/gtkpacker.sgml b/docs/reference/gtk/tmpl/gtkpacker.sgml deleted file mode 100644 index 3302b5d06f..0000000000 --- a/docs/reference/gtk/tmpl/gtkpacker.sgml +++ /dev/null @@ -1,219 +0,0 @@ - -GtkPacker - - - - - - - - - - - - - - - - - - - - - - - - - -@GTK_PACK_EXPAND: -@GTK_FILL_X: -@GTK_FILL_Y: - - - - - - -@GTK_SIDE_TOP: -@GTK_SIDE_BOTTOM: -@GTK_SIDE_LEFT: -@GTK_SIDE_RIGHT: - - - - - - -@GTK_ANCHOR_CENTER: -@GTK_ANCHOR_NORTH: -@GTK_ANCHOR_NORTH_WEST: -@GTK_ANCHOR_NORTH_EAST: -@GTK_ANCHOR_SOUTH: -@GTK_ANCHOR_SOUTH_WEST: -@GTK_ANCHOR_SOUTH_EAST: -@GTK_ANCHOR_WEST: -@GTK_ANCHOR_EAST: -@GTK_ANCHOR_N: -@GTK_ANCHOR_NW: -@GTK_ANCHOR_NE: -@GTK_ANCHOR_S: -@GTK_ANCHOR_SW: -@GTK_ANCHOR_SE: -@GTK_ANCHOR_W: -@GTK_ANCHOR_E: - - - - - - -@widget: -@anchor: -@side: -@options: -@use_default: -@border_width: -@pad_x: -@pad_y: -@i_pad_x: -@i_pad_y: - - - - - - -@Returns: - - - - - - - -@packer: -@child: -@side: -@anchor: -@options: - - - - - - - -@packer: -@child: -@side: -@anchor: -@options: -@border_width: -@pad_x: -@pad_y: -@i_pad_x: -@i_pad_y: - - - - - - - - - - - - - - -@packer: -@child: -@position: - - - - - - - -@packer: -@spacing: - - - - - - - -@packer: -@border: - - - - - - - -@packer: -@pad_x: -@pad_y: - - - - - - - -@packer: -@i_pad_x: -@i_pad_y: - - - - - - - -@packer: -@child: -@side: -@anchor: -@options: -@border_width: -@pad_x: -@pad_y: -@i_pad_x: -@i_pad_y: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkpaned.sgml b/docs/reference/gtk/tmpl/gtkpaned.sgml deleted file mode 100644 index db7f80bd36..0000000000 --- a/docs/reference/gtk/tmpl/gtkpaned.sgml +++ /dev/null @@ -1,181 +0,0 @@ - -GtkPaned - - -Base class for widgets with two adjustable panes - - - -GtkPaned is the base class for widgets with two panes, -arranged either horizontally (#GtkHPaned) or -vertically (#GtkVPaned). Child widgets are -added to the panes of the widget with -gtk_paned_pack1() and gtk_paned_pack2(). The division -beween the two children is set by default from the -size requests of the children, but it can be adjusted -by the user. - - -A paned widget draws a separator between the two -child widgets and a small handle that the user -can drag to adjust the division. It does not -draw any relief around the children or around -the separator. (The space in which the separator -is called the gutter). Often, it is useful -to put each child inside a #GtkFrame with the -shadow type set to %GTK_SHADOW_IN so that the -gutter appears as a ridge. - - -Each child has two options that can be set, -@resize and @shrink. If @resize is true, then when the -#GtkPaned is resized, that child will expand -or shrink along with the paned widget. If @shrink -is true, then when that child can be made smaller -than it's requisition by the user. Setting @shrink -to FALSE allows the application to set a minimum -size. If @resize is false for both children, then -this is treated as if @resize is true for both -children. - - -The application can set the position of the slider -as if it were set by the user, by calling -gtk_paned_set_position(). - - - - Creating a paned widget with minimum sizes - -GtkWidget *hpaned = gtk_hpaned_new(); -GtkWidget *frame1 = gtk_frame_new(NULL); -GtkWidget *frame2 = gtk_frame_new(NULL); -gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN); -gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN); - -gtk_widget_set_usize (hpaned, 200 + GTK_PANED (hpaned)->gutter_size, -1); - -gtk_paned_pack1 (GTK_PANED (hpaned), frame1, TRUE, FALSE); -gtk_widget_set_usize (frame1, 50, -1); - -gtk_paned_pack2 (GTK_PANED (hpaned), frame1, FALSE, FALSE); -gtk_widget_set_usize (frame1, 50, -1); - - - - - - - - - - - - -@handle_size: -@gutter_size: - - - -Add a child to the top or left pane with -default parameters. This is equivalent -to - -gtk_paned_pack1(paned, FALSE, TRUE); - - - -@paned: a paned widget -@child: the child to add - - - - -Add a child to the bottom or right pane with default -parameters. This is equivalent to - -gtk_paned_pack1(paned, FALSE, FALSE); - - - -@paned: a paned widget -@child: the child to add - - - - -Old name for gtk_paned_set_handle_size() - - - - - - -Old name for gtk_paned_set_gutter_size() - - - - - - -Internal function used by #GtkHPaned and #GtkVPaned - - -@paned: -@allocation: -@child1_req: -@child2_req: - - - - -Add a child to the top or left pane. - - -@paned: a paned widget -@child: the child to add -@resize: should this child expand when the paned widget is resized. -@shrink: can this child be made smaller than its requsition. - - - - -Add a child to the bottom or right pane. - - -@paned: a paned widget -@child: the child to add -@resize: should this child expand when the paned widget is resized. -@shrink: can this child be made smaller than its requsition. - - - - -Set the width of the gutter. (The area between the two panes). - - -@paned: a paned widget -@size: the width of the widget in pixels - - - - -Set the the handle size to @size x @size pixels. - - -@paned: a paned widget -@size: the size in pixels - - - - -Set the position of the separator, as if set by the user. -If position is negative, the remembered position is -forgotten, and the division is recomputed from the -the requisitions of the children. - - -@paned: a paned widget -@position: the new position of the separator. - - diff --git a/docs/reference/gtk/tmpl/gtkpixmap.sgml b/docs/reference/gtk/tmpl/gtkpixmap.sgml deleted file mode 100644 index 6a3fca54ad..0000000000 --- a/docs/reference/gtk/tmpl/gtkpixmap.sgml +++ /dev/null @@ -1,75 +0,0 @@ - -GtkPixmap - - -a widget displaying a graphical image or icon. - - - -The #GtkPixmap widget displays a graphical image or icon. -The icon is typically created using gdk_pixmap_colormap_create_from_xpm() -or gdk_pixmap_colormap_create_from_xpm_d(). - - -The pixels in a #GtkPixmap cannot be manipulated by the application after -creation, since under the X Window system the pixel data is stored on the -X server and so is not available to the client application. -If you want to create graphical images which can be manipulated by the -application, look at #GtkImage and #GdkRGB. - - - - - - - - - -The #GtkPixmap-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkPixmap, using the given GDK pixmap and mask. - - -@pixmap: a #GDKPixmap. -@mask: a #GDKBitmap which indicates which parts of the @pixmap should be -transparent. -@Returns: a new #GtkPixmap. - - - - -Sets the #GdkPixmap and #GdkBitmap mask. - - -@pixmap: a #GtkPixmap. -@val: a #GdkPixmap. -@mask: a #GdkBitmap, which indicates which parts of the @pixmap should be -transparent. This can be NULL, in which case none of the @pixmap is -transparent. - - - - -Gets the current #GdkPixmap and #GdkBitmap mask. - - -@pixmap: a #GtkPixmap. -@val: returns the current #GdkPixmap. -@mask: returns the current #GdkBitmap mask. - - - - - - - -@pixmap: a #GtkPixmap. -@build: set to TRUE if an extra pixmap should be automatically created to use -when the pixmap is insensitive. - - diff --git a/docs/reference/gtk/tmpl/gtkplug.sgml b/docs/reference/gtk/tmpl/gtkplug.sgml deleted file mode 100644 index 74fa49ee2f..0000000000 --- a/docs/reference/gtk/tmpl/gtkplug.sgml +++ /dev/null @@ -1,57 +0,0 @@ - -GtkPlug - - -Toplevel for embedding into other processes. - - - -Together with #GtkSocket, #GtkPlug provides the ability -to embed widgets from one process into another process -in a fashion that is transparent to the user. One -process creates a #GtkSocket widget and, passes the -XID of that widgets window to the other process, -which then creates a #GtkPlug window with that XID. -Any widgets contained in the #GtkPlug then will appear -inside the first applications window. - - - - - - - -#GtkSocket -the widget that a #GtkPlug plugs into. - - - - - - - - - - - - - -Finish the creation of a #GtkPlug widget. This function -will generally only be used by classes deriving -from #GtkPlug. - - -@plug: a #GtkPlug widget. -@socket_id: the XID of the socket's window. - - - - -Create a new plug widget inside the #GtkSocket identified -by @socket_id. - - -@socket_id: the XID of the socket's window. -@Returns: the new #GtkPlug widget. - - diff --git a/docs/reference/gtk/tmpl/gtkpreview.sgml b/docs/reference/gtk/tmpl/gtkpreview.sgml deleted file mode 100644 index 8ab4dbb3da..0000000000 --- a/docs/reference/gtk/tmpl/gtkpreview.sgml +++ /dev/null @@ -1,256 +0,0 @@ - -GtkPreview - - -a widget to display RGB or grayscale data. - - - -The #GtkPreview widget provides a simple interface -used to display images as RGB or grayscale data. - - - - - - - -#GdkRGB -the backend used by #GtkPreview. - - - - - - - -The #GtkPreview-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Contains information about global properties -of preview widgets. - -The #GtkPreviewInfo struct contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#GdkVisual *visual; -the visual used by all previews. - - - -#GdkColormap *cmap; -the colormap used by all previews. - - - -gdouble gamma; -the gamma correction value used by all previews (See gtk_preview_set_gamma()). - - - - - - - - -@visual: -@cmap: -@lookup: -@gamma: - - - -This union not used in GTK+. - - - - - -This function is deprecated and does nothing. - - - - - - -Create a new preview widget. - - -@type: the type data contained by the widget. -(Grayscale or RGB) -@Returns: - - - - -Set the size that the preview widget will request -in response to a "size_request" signal. The -drawing area may actually be allocated a size -larger than this depending on how it is packed -within the enclosing containers. The effect -of this is determined by whether the preview -is set to expand or not (see gtk_preview_expand()) - - -@preview: a #GtkPreview. -@width: the new width. -@height: the new height. - - - - -Takes a portion of the contents of a preview widget -and draws it onto the given drawable, @window. - - -@preview: a #GtkPreview. -@window: a window or pixmap. -@gc: The graphics context for the operation. Only the - clip mask for this GC matters. -@srcx: the x coordinate of the upper left corner in the source image. -@srcy: the y coordinate of the upper left corner in the source image. -@destx: the x coordinate of the upper left corner in the destination image. -@desty: the y coordinate of the upper left corner in the destination image. -@width: the width of the rectangular portion to draw. -@height: the height of the rectangular portion to draw. - - - - -Sets the data for a portion of a row. - - -@preview: a #GtkPreview. -@data: the new data for the portion. It should contain - @w bytes of data if the preview is of type - GTK_TYPE_GRAYSCALE, and 3*@w bytes of data - if the preview is of type GTK_TYPE_COLOR. -@x: the starting value on the row to set. -@y: the row to change. -@w: the number of pixels in the row to change. - - - - -Determines the way that the the preview widget behaves -when the size it is allocated is larger than the requested -size. If @expand is %FALSE, then the preview's window -and buffer will be no larger than the size set with -gtk_preview_size(), and the data set will be centered -in the allocation if it is larger. If @expand is %TRUE -then the window and buffer will expand with the allocation; -the application is responsible for catching -the "size_allocate" signal and providing the data -appropriate for this size. - - -@preview: a #GtkPreview. -@expand: whether the preview's window should expand or not. - - - - -Set the gamma-correction value for all preview widgets. -(This function will eventually be replaced with a -function that sets a per-preview-widget gamma value). -The resulting intensity is given by: -destination_value * pow (source_value/255, 1/gamma). -The gamma value is applied when the data is -set with gtk_preview_draw_row() so changing this -value will not affect existing data in preview -widgets. - - -@gamma: the new gamma value. - - - - -This function is deprecated and does nothing. GdkRGB -automatically picks an optimium color cube for the -display. - - -@nred_shades: ignored -@ngreen_shades: ignored -@nblue_shades: ignored -@ngray_shades: ignored - - - - -This function is deprecated -and does nothing. GdkRGB will automatically pick -a private colormap if it cannot allocate sufficient -colors. - - -@install_cmap: ignored. - - - - -This function is deprecated and does nothing. - - -@nreserved: ignored. - - - - -Set the dithering mode for the display. - - -@preview: a #GtkPreview. -@dither: the dithering mode. - - - - -Returns the visual used by preview widgets. This -function is deprecated, and you should use -gdk_rgb_get_visual() instead. - - -@Returns: the visual for previews. - - - - -Returns the colormap used by preview widgets. This -function is deprecated, and you should use -gdk_rgb_get_cmap() instead. - - -@Returns: the colormap for previews. - - - - -Return a #GtkPreviewInfo structure containing -global information about preview widgets. - - -@Returns: a #GtkPreviewInfo structure. The return - value belongs to GTK+ and must not be modified - or freed. - - - - -This function is deprecated and does nothing. It was -once used for changing the colormap and visual on the fly. - - - - diff --git a/docs/reference/gtk/tmpl/gtkprivate.sgml b/docs/reference/gtk/tmpl/gtkprivate.sgml deleted file mode 100644 index 3be551b997..0000000000 --- a/docs/reference/gtk/tmpl/gtkprivate.sgml +++ /dev/null @@ -1,120 +0,0 @@ - -Private Information - - - - - - - - - - - - - - - - - - - -@PRIVATE_GTK_USER_STYLE: -@PRIVATE_GTK_REDRAW_PENDING: -@PRIVATE_GTK_RESIZE_PENDING: -@PRIVATE_GTK_RESIZE_NEEDED: -@PRIVATE_GTK_LEAVE_PENDING: -@PRIVATE_GTK_HAS_SHAPE_MASK: -@PRIVATE_GTK_IN_REPARENT: -@PRIVATE_GTK_IS_OFFSCREEN: - - - - - - -@wid: - - - - - - - -@obj: - - - - - - - -@obj: - - - - - - - -@obj: - - - - - - - -@obj: - - - - - - - -@obj: - - - - - - - -@obj: - - - - - - - -@obj: - - - - - - - -@obj: - - - - - - - -@wid: -@flag: - - - - - - - -@wid: -@flag: - - diff --git a/docs/reference/gtk/tmpl/gtkprogress.sgml b/docs/reference/gtk/tmpl/gtkprogress.sgml deleted file mode 100644 index c883498459..0000000000 --- a/docs/reference/gtk/tmpl/gtkprogress.sgml +++ /dev/null @@ -1,204 +0,0 @@ - -GtkProgress - - -the base class for #GtkProgressBar. - - - -A #GtkProgress is the abstract base class used to derive -a #GtkProgressBar which provides a visual representation of -the progress of a long running operation. - - - - - - - - -The #GtkProgress-struct struct contains private data only. -and should be accessed using the functions below. - - - - -Controls whether progress text is shown. - - -@progress: a #GtkProgress. -@show_text: a boolean indicating whether the progress text -is shown. - - - -Controls the alignment of the text within the progress bar area. - - -@progress: a #GtkProgress. -@x_align: a number between 0.0 and 1.0 indicating the horizontal -alignment of the progress text within the #GtkProgress. -@y_align: a number between 0.0 and 1.0 indicating the vertical -alignment of the progress text within the #GtkProgress. - - - - -Sets a format string used to display text indicating the -current progress. The string can contain the following substitution characters: - - - - -%%v - the current progress value. - - - - -%%l - the lower bound for the progress value. - - - - -%%u - the upper bound for the progress value. - - - - -%%p - the current progress percentage. - - - - - -@progress: a #GtkProgress. -@format: a string used to display progress text. - - - - -Associates a #GtkAdjustment with the #GtkProgress. A #GtkAdjustment -is used to represent the upper and lower bounds and the step interval -of the underlying value for which progress is shown. - - -@progress: a #GtkProgress. -@adjustment: the #GtkAdjustment to be associated with the #GtkProgress. - - - - -Sets the current percentage completion for the #GtkProgress. - - -@progress: a #GtkProgress. -@percentage: the percentage complete which must be between 0.0 -and 1.0. - - - - -Sets the value within the #GtkProgress to an absolute value. -The value must be within the valid range of values for the -underlying #GtkAdjustment. - - -@progress: a #GtkProgress. -@value: the value indicating the current completed amount. - - - - -Returns the current progress complete value. - - -@progress: a #GtkProgress. -@Returns: the current progress complete value. - - - - -A #GtkProgress can be in one of two different modes: percentage -mode (the default) and activity mode. In activity mode, the -progress is simply indicated as activity rather than as a percentage -complete. - - -@progress: a #GtkProgress. -@activity_mode: a boolean, TRUE for activity mode. - - - - -Returns the current text associated with the #GtkProgress. This -text is the based on the underlying format string after any substitutions -are made. - - -@progress: a #GtkProgress. -@Returns: the text indicating the current progress. - - - - -Returns the text indicating the progress based on the supplied value. -The current value for the #GtkProgress remains unchanged. - - -@progress: a #GtkProgress. -@value: an absolute progress value to use when formatting the progress text. -@Returns: a string indicating the progress. - - - - -Returns the current progress as a percentage. - - -@progress: a #GtkProgress. -@Returns: a number between 0.0 and 1.0 indicating the percentage complete. - - - - -Returns the progress as a percentage calculated from the supplied -absolute progress value. - - -@progress: a #GtkProgress. -@value: an absolute progress value. -@Returns: a number between 0.0 and 1.0 indicating the percentage complete -represented by @value. - - - - -Allows the configuration of the minimum, maximum, and current values for -the #GtkProgress. - - -@progress: a #GtkProgress. -@value: the current progress value. -@min: the minimum progress value. -@max: the maximum progress value. - - - - -A boolean indicating whether activity mode is enabled. - - - - -A boolean indicating whether the progress is shown as text. - - - - -A number between 0.0 and 1.0 specifying the horizontal alignment. - - - - -A number between 0.0 and 1.0 specifying the vertical alignment. - diff --git a/docs/reference/gtk/tmpl/gtkprogressbar.sgml b/docs/reference/gtk/tmpl/gtkprogressbar.sgml deleted file mode 100644 index 8fa367b82e..0000000000 --- a/docs/reference/gtk/tmpl/gtkprogressbar.sgml +++ /dev/null @@ -1,218 +0,0 @@ - -GtkProgressBar - - -a widget which indicates progress visually. - - - -The #GtkProgressBar is typically used to display the progress of a long -running operation. It provides a visual clue that processing -is underway. The #GtkProgressBar can be used in two different -modes: percentage mode and activity mode. - - - -When an application can determine how much work needs to take place -(e.g. read a fixed number of bytes from a file) and can monitor its -progress, it can use the #GtkProgressBar in percentage mode and the user -sees a growing bar indicating the percentage of the work that has -been completed. In this mode, the application is required to call -either the gtk_progress_set_percentage() or gtk_progress_set_value() -functions periodically to update the progress bar. - - - -When an application has no accurate way of knowing the amount of work -to do, it can use the #GtkProgressBar in activity mode. In this mode -the progress bar shows activity by a block moving back and forth within -the progress area. - - - -There is quite a bit of flexibility provided to control the appearance -of the #GtkProgressBar. Functions are provided to control the -orientation of the bar, optional text which can be displayed along with -the bar, and the style in which the bar grows. - - - - - - - - - -The #GtkProgressBar-struct struct contains private data only, -and should be accessed using the functions below. - - - - - -An enumeration representing the styles for drawing the progress bar. - - - - - - -GTK_PROGRESS_CONTINUOUS -The progress bar grows in a smooth, continuous manner. - - - -GTK_PROGRESS_DISCRETE -The progress bar grows in discrete, visible blocks. - - - - - - - -An enumeration representing possible orientations and growth -directions for the visible progress bar. - - - - - - -GTK_PROGRESS_LEFT_TO_RIGHT -A horizontal progress bar growing from left to right. - - - -GTK_PROGRESS_RIGHT_TO_LEFT -A horizontal progress bar growing from right to left. - - - -GTK_PROGRESS_BOTTOM_TO_TOP -A vertical progress bar growing from bottom to top. - - - -GTK_PROGRESS_TOP_TO_BOTTOM -A vertical progress bar growing from top to bottom. - - - - - - - -Creates a new #GtkProgressBar. - - -@Returns: a #GtkProgressBar. - - - - -Creates a new #GtkProgressBar with an associated #GtkAdjustment. - - -@adjustment: a #GtkAdjustment. -@Returns: a #GtkProgressBar. - - - - -Sets the style of the #GtkProgressBar. The default style is -%GTK_PROGRESS_CONTINUOUS. - - -@pbar: a #GtkProgressBar. -@style: a #GtkProgressBarStyle value indicating the desired style. - - - - -Sets the number of blocks that the progress bar is divided into -when the style is %GTK_PROGRESS_DISCRETE. - - -@pbar: a #GtkProgressBar. -@blocks: number of individual blocks making up the bar. - - - - -Sets the step value used when the progress bar is in activity -mode. The step is the amount by which the progress is incremented -each iteration. - - -@pbar: a #GtkProgressBar. -@step: the amount which the progress is incremented in activity -mode. - - - - -Sets the number of blocks used when the progress bar is in activity -mode. Larger numbers make the visible block smaller. - - -@pbar: a #GtkProgressBar. -@blocks: number of blocks which can fit within the progress bar area. - - - - -Sets the orientation of the progress bar. This controls whether -the bar is horizontal or vertical and the direction in which it -grows. - - -@pbar: a #GtkProgressBar. -@orientation: a #GtkProgressBarOrientation value which specifies the -orientation and growth direction of the bar. - - - - -This function is deprecated. Please use gtk_progress_set_value() or -gtk_progress_set_percentage() instead. - - -@pbar: a #GtkProgressBar. -@percentage: the new percent complete value. - - - - -a #GtkAdjustment to be used with the #GtkProgressBar. - - - - -a #GtkProgressBarOrientation value which specifies the -orientation and growth direction of the bar. - - - - -a #GtkProgressBarStyle value which specifies the -visual style of the bar in percentage mode. - - - - -The increment used for each iteration in activity mode. - - - - -The number of blocks which can fit in the progress bar -area in activity mode. - - - - -The number of blocks which which make up progress bar -when it is shown in %GTK_PROGRESS_DISCRETE style. - - diff --git a/docs/reference/gtk/tmpl/gtkradiobutton.sgml b/docs/reference/gtk/tmpl/gtkradiobutton.sgml deleted file mode 100644 index 2419f64d90..0000000000 --- a/docs/reference/gtk/tmpl/gtkradiobutton.sgml +++ /dev/null @@ -1,159 +0,0 @@ - -GtkRadioButton - - -A choice from multiple check buttons. - - - -A single radio button performs the same basic function as a #GtkCheckButton, -as it's position in the object hierarchy reflects. It is only when multiple -radio buttons are grouped together that they become a different user -interface component in their own right. - -Every radio button is a member of some group of radio buttons. When one is selected, all other -radio buttons in the same group are deselected. A #GtkRadioButton is one way -of giving the user a choice from many options. - - -Radio button widgets are created with gtk_radio_button_new(), passing NULL -as the argument if this is the first radio button in a group. In subsequent -calls, the group you wish to add this button to should be passed as an -argument. Optionally, gtk_radio_button_new_with_label() can be used if you -want a text label on the radio button. - - -Alternatively, when adding widgets to an existing group of radio buttons, -use gtk_radio_button_new_from_widget() with a #GtkRadioButton that already -has a group assigned to it. The convenience function -gtk_radio_button_new_with_label_from_widget() is also provided. - - -To retrieve the group a #GtkRadioButton is assigned to, use -gtk_radio_button_group(). - - -To remove a #GtkRadioButton from one group and make it part of a new one, use gtk_radio_button_set_group(). - - - -How to create a group of two radio buttons. - - -void create_radio_buttons(void) { - - GtkWidget *window, *radio1, *radio2, *box, *entry; - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - box = gtk_vbox_new(TRUE, 2); - - /* Create a radio button with a #GtkEntry widget */ - radio1 = gtk_radio_button_new(NULL); - entry = gtk_entry_new(); - gtk_container_add(GTK_CONTAINER(radio1), entry); - - - /* Create a radio button with a label */ - radio2 = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON(radio1), - "I'm the second radio button."); - - /* Pack them into a box, then show all the widgets */ - gtk_box_pack_start (GTK_BOX (box), radio1, TRUE, TRUE, 2); - gtk_box_pack_start(GTK_BOX(box), radio2, TRUE, TRUE, 2); - gtk_container_add(GTK_CONTAINER(window), box); - gtk_widget_show_all (window); - return; -} - - - - - - - - - -#GtkOptionMenu -Another way of offering the user a single choice from -many. - - - - - - - -Contains only private data that should be read and manipulated using the -functions below. - - - - - -Creates a new #GtkRadioButton. To be of any practical value, a widget should -then be packed into the radio button. - - -@group: an existing radio button group, or NULL if you are creating a new group. -@Returns: a new radio button. - - - - -Creates a new #GtkRadioButton, adding it to the same group as @group. As -with gtk_radio_button_new(), a widget should be packed into the radio button. - - -@group: an existing #GtkRadioButton. -@Returns: a new radio button. - - - - -Creates a new #GtkRadioButton with a text label. - - -@group: an existing radio button group, or NULL if you are creating a new -group. -@label: the text label to display next to the radio button. -@Returns: a new radio button. - - - - -Creates a new #GtkRadioButton with a text label, adding it to the same group -as @group. - - -@group: an existing #GtkRadioButton. -@label: a text string to display next to the radio button. -@Returns: a new radio button. - - - - -Retrieves the group assigned to a radio button. - - -@radio_button: a #GtkRadioButton. -@Returns: a linked list containing all the radio buttons in the same group -as @radio_button. - - - - -Sets a #GtkRadioButton's group. It should be noted that this does not change -the layout of your interface in any way, so if you are changing the group, -it is likely you will need to re-arrange the user interface to reflect these -changes. - - -@radio_button: a #GtkRadioButton. -@group: an existing radio button group, such as one returned from -gtk_radio_button_group(). - - - - -Sets a new group for a radio button. - - diff --git a/docs/reference/gtk/tmpl/gtkradiomenuitem.sgml b/docs/reference/gtk/tmpl/gtkradiomenuitem.sgml deleted file mode 100644 index 3e9f1f6664..0000000000 --- a/docs/reference/gtk/tmpl/gtkradiomenuitem.sgml +++ /dev/null @@ -1,92 +0,0 @@ - -GtkRadioMenuItem - - -A choice from multiple check menu items. - - - -A radio menu item is a check menu item that belongs to a group. At each -instant exactly one of the radio menu items from a group is selected. - - -The correct way to create a group of radio menu items is aproximativly -this: - - - -How to create a group of radio menu items. - -GList *group = NULL; -GtkWidget *item; -gint i; - -for(i = 0; i < 5; i++) -{ - item = gtk_radio_menu_item_new_with_label (group, "This is an example"); - group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (item)); - if (i == 1) - gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE); -} - - - - - - - -#GtkMenuItem -because a radio menu item is a menu item. - - -#GtkCheckItem -to know how to handle the check. - - - - - - -The structure contains only provate data that must be accessed through -the interface functions. - - - - - -Creates a new #GtkRadioMenuItem. - - -@group: the group to wich the radio menu item is to be attached -@Returns: the newly created radio menu item - - - - -Creates a new #GtkRadioMenuItem whose child is a simple #GtlLabel. - - -@group: the group to wich the radio menu item is to be attached -@label: the text for the label -@Returns: the newly created radio menu item - - - - -Returns the group to which the radio menu item belongs, as a #GList of -#GtkRadioMenuItem. The list belongs to GTK+ and should not be freed. - - -@radio_menu_item: the radio menu item -@Returns: its group - - - - -Sets the group of a radio menu item, or changes it. - - -@radio_menu_item: the radio menu item -@group: the new group - - diff --git a/docs/reference/gtk/tmpl/gtkrange.sgml b/docs/reference/gtk/tmpl/gtkrange.sgml deleted file mode 100644 index fcf22cdc60..0000000000 --- a/docs/reference/gtk/tmpl/gtkrange.sgml +++ /dev/null @@ -1,182 +0,0 @@ - -GtkRange - - - - - - - - - - - - - - - - - - - - - - - - - -@range: -@Returns: - - - - - - - -@range: -@policy: - - - - - - - -@range: -@adjustment: - - - - - - - -@range: - - - - - - - -@range: - - - - - - - -@range: - - - - - - - -@range: - - - - - - - -@range: - - - - - - - -@range: - - - - - - - -@range: -@x: -@y: -@jump_perc: -@Returns: - - - - - - - -@range: - - - - - - - -@range: - - - - - - - -@range: -@x: -@y: -@jump_perc: -@Returns: - - - - - - - -@range: -@x: -@y: -@jump_perc: -@Returns: - - - - - - - -@range: -@xdelta: -@ydelta: - - - - - - - -@range: -@xdelta: -@ydelta: - - - - - - - -@range: - - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkrc.sgml b/docs/reference/gtk/tmpl/gtkrc.sgml deleted file mode 100644 index 17281a0bc5..0000000000 --- a/docs/reference/gtk/tmpl/gtkrc.sgml +++ /dev/null @@ -1,782 +0,0 @@ - -Resource Files - - -Routines for handling resource files - - - -GTK+ provides resource file mechanism for configuring -various aspects of the operation of a GTK+ program -at runtime. - - -Default files - -An application can cause GTK+ to parse a specific RC -file by calling gtk_rc_parse(). In addition to this, -certain files will be read at the end of gtk_init(). -Unless modified, the files looked for will be .gtkrc -in the users home directory, and -$localstatedir/gtk/gtkrc -($localstatedir defaults to -/usr/local/etc). - - -The set of these default files -can be retrieved with gtk_rc_get_default_files() -and modified with gtk_rc_add_default_file() and -gtk_rc_set_default_files(). - - -For each default file, in addition to the file itself, -GTK+ will look for a locale-specific file that will -be parsed in addition to the main file. For instance, -if LANG is set to ja_JP.ujis, -when loading the default file ~/.gtkrc -then GTK+ looks for ~/.gtkrc.ja_JP.ujis, -~/.gtkrc.ja_JP, and -~/.gtkrc.ja, and parses the -first one it finds. - - - -Pathnames and patterns - -A resource file defines a number of styles and key bindings and -attaches them to particular widgets. The attachment is done -by the widget, widget_class, -and class declarations. As an example -of such a statement: - -widget "mywindow.*.GtkEntry" style "my-entry-class" - -attaches the style "my-entry-class" -to all widgets whose widget class -matches the pattern -"mywindow.*.GtkEntry". - - -The patterns here are given in the standard shell glob -syntax. The "?" wildcard matches -any character, while "*" matches -zero or more of any character. The three types of -matching are against the widget path, the -class path and the class -heirarchy. Both the widget and the class paths consists of a -"." separated list of all the -parents of the widget and the widget itself from -outermost to innermost. The difference is that in -the widget path, the name assigned by -gtk_widget_set_name() is used -if present, otherwise the class name of the widget, while -for the widget path, the class name is always used. - - -So, if you have a GtkEntry named -"myentry", inside of a of a window -named "mywindow", then the -widget path is: - -"mwindow.GtkHBox.myentry" - -while the class path is: - -"GtkWindow.GtkHBox.GtkEntry" - - - -Matching against class is a little different. The pattern -match is done against all class names in the widgets -class heirarchy (not the layout heirarchy) in sequence, so the -pattern: - -class "GtkButton" style "my-style" - -will match not just GtkButton widgets, -but also GtkToggleButton and -GtkCheckButton widgets, since -those classes derive from GtkButton. - - - -Toplevel declarations - -An RC file is a text file which is composed of a sequence -of declarations. '#' characters delimit comments and -the portion of a line after a '#' is ignored when parsing -an RC file. - - - -The possible toplevel declarations are: - - - - binding name - { ... } - - Declare a binding set - - - - class pattern - [ style | binding [ : priority ]] - name - - Specify a style or binding set for a particular - branch of the inheritance heirarchy. - - - - include filename - - Parse another file at this point - - - - module_path path> - - Sets a path (a list of directories separated - by colons) that will be searched for theme engines referenced in - RC files. - - - - pixmap_path path> - - Sets a path (a list of directories separated - by colons) that will be searched for pixmaps referenced in - RC files. - - - - style name [ = - parent ] { ... } - - Declare a style - - - - widget pattern - [ style | binding [ : priority ]] - name - - Specify a style or binding set for a particular - group of widgets by matching on the widget pathname. - - - - widget_class pattern - [ style | binding [ : priority ]] - name - - Specify a style or binding set for a particular - group of widgets by matching on the class pathname. - - - - - - -Styles - -A RC style is specified by a style -declaration in a RC file, and then bound to widgets -with a widget, widget_class, -or class declaration. All styles -applying to a particular widget are composited together -with widget declarations overriding -widget_class declarations which, in -turn, override widget declarations. -Within each type of declaration, later declarations override -earlier ones. - - - -Within a style declaration, the possible -elements are: - - - - bg[state] = - color - - - Set color used for the background of most widgets. - - - - - fg[state] = - color - - - Set color used for the foreground of most widgets. - - - - - base[state] = - color - - - Set color used for the background of widgets displaying - editable text. This color is used for the background - of, among others, #GtkText, #GtkEntry, #GtkList, and #GtkClist. - - - - - text[state] = - color - - - Set color used for foreground of widgets using - base for the background color. - - - - - bg_text[state] = - color - - - Set a background pixmap to be used in place of - the bg color (or for #GtkText, - in place of the base color. - - - - - font = font - - - Set the font for a widget. - - - - - fontset = font - - - Set the fontset for a widget. Overrides any - font declarations. - - - - - - -The colors and background pixmaps are specified as a function of the -state of the widget. The states are: - - - - NORMAL - - - A color used for a widget in its normal state - - - - - ACTIVE - - - A variant of the NORMAL color used when the - widget is in the %GTK_STATE_ACTIVE state, and also for - the trough of a ScrollBar, tabs of a NoteBook - other than the current tab and similar areas. - Frequently, this should be a darker variant - of the NORMAL color. - - - - - PRELIGHT - - - A color used for widgets in the %GTK_STATE_PRELIGHT state. This - state is the used for Buttons and MenuItems - that have the mouse cursor over them, and for - their children. - - - - - SELECTED - - - A color used to highlight data selected by the user. - for instance, the selected ListItems in a List widget, and the - selection in an Editable widget. - - - - - INSENSITIVE - - - A color used for the background of widgets that have - been set insenstivie with gtk_widget_set_senstive() - - - - - - - -Colors can be specified as a string "&hash;rrrrggggbbbb", -"&hash;rrrgggbbb", "&hash;rrggbb", -or "&hash;rgb", where r -g, and b are -hex digits, or they can be specified as a triplet of floats -{ r, g, -b}. - - - -Key bindings - -Key bindings allow the user to specify actions to be -taken on particular key presses. The form of a binding -set declaration is: - - - -binding name { - bind key { - signalname (param, ...) - ... - } - ... -} - - - -key is a string consisting of a -series of modifiers followed by the name of a key. The -modifiers can be: - -<alt> -<control> -<mod1> -<mod2> -<mod3> -<mod4> -<mod5> -<release> -<shft> -<shift> - -<shft> is an alias for -<shift> and -<alt> is an alias for -<mod1>. - - - -The action that is bound to the key is a sequence -of signal names (strings) followed by parameters for -each signal. The signals must be action signals. -(See gtk_signal_new()). Each parameter can be -a float, integer, string, or unquoted string -representing an enumeration value. The types of -the parameters specified must match the types of the -parameters of the signal. - - - -Binding sets are connected to widgets in the -same manner as styles, with one addition. -A priority can be specified for each pattern, -and within each type of pattern, binding sets -override other binding sets first by priority, -and only then by order of specification. (Later -overrides earlier). The priorities that can -be specified are (highest to lowest): - -HIGHEST -RC -APPLICATION -GTK -LOWEST - -RC is the default for bindings -read from an RC file, APPLICATION -should be used for bindings an application sets -up, and GTK is used for bindings -that GTK+ creates internally. - - - - - - - - - - -The #GtkRcStyle structure is used to represent a set -of information about the appearance of a widget. -This can later be composited together with other -#GtkRcStyle structures to form a #GtkStyle. - - -@name: -@font_name: -@fontset_name: -@bg_pixmap_name: -@color_flags: -@fg: -@bg: -@text: -@base: -@engine: -@engine_data: -@ref_count: - - - -The #GtkRcFlags enumeration is used as a bitmask -to specify which fields of a #GtkRcStyle have been -set for each state. - - - %GTK_RC_FG - - - If present, the foreground color has been set for this state. - - - - %GTK_RC_BG - - - If present, the background color has been set for this state. - - - - %GTK_RC_TEXT - - - If present, the text color has been set for this state. - - - - %GTK_RC_BASE - - - If present, the base color has been set for this state. - - - - - -@GTK_RC_FG: -@GTK_RC_BG: -@GTK_RC_TEXT: -@GTK_RC_BASE: - - - -A GtkImageLoader is used to load a filename found in -a RC file. - - -@window: the window for creating image -@colormap: the colormap for this image -@mask: a pointer to the location to store the mask -@transparent_color: the transparent color for the image -@filename: filename to load -@Returns: a #GtkPixmap representing @filename - - - - -The #GtkRcTokenType enumeration represents the tokens -in the RC file. It is exposed so that theme engines -can reuse these tokens when parsing the theme-engine -specific portions of a RC file. - - -@GTK_RC_TOKEN_INVALID: -@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_BASE: -@GTK_RC_TOKEN_TEXT: -@GTK_RC_TOKEN_FONT: -@GTK_RC_TOKEN_FONTSET: -@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_RC: -@GTK_RC_TOKEN_HIGHEST: -@GTK_RC_TOKEN_ENGINE: -@GTK_RC_TOKEN_MODULE_PATH: -@GTK_RC_TOKEN_LAST: - - - -Finds all matching RC styles for a given widget, -composites them together, and then creates a -#GtkStyle representing the composite appearance. -(GTK+ actually keeps a cache of previously -created styles, so a new style may not be -created.) - - -@widget: a #GtkWidget -@Returns: the resulting style. The caller should -reference the result, since GTK+ will retain the -initial reference count itself for the cache -of created styles. - - - - -Add a RcStyle that will be looked up by a match against -the widget's pathname. This is equivalent to a: - -widget PATTERN style STYLE - -statement in a RC file. - - -@rc_style: the #GtkRcStyle to use for widgets matching @pattern -@pattern: the pattern - - - - -Add a RcStyle that will be looked up by a match against -the widget's class pathname. This is equivalent to a: - - -widget_class PATTERN style STYLE - -statement in a RC file. - - -@rc_style: the #GtkRcStyle to use for widgets matching @pattern -@pattern: the pattern - - - - -Add a RcStyle that will be looked up by a matching against -the class heirarchy of the widget. This is equivalent to a: - -class PATTERN style STYLE - -statement in a RC file. - - -@rc_style: the #GtkRcStyle to use for widgets deriving from @pattern -@pattern: the pattern - - - - -Parse a given resource file. - - -@filename: the filename of a file to parse. - - - - -Parse resource information directly from a string. - - -@rc_string: a string to parse. - - - - -If the modification time on any previously read file -has changed, discard all style information -and then reread all previously read RC files. - - -@Returns: %TRUE if the files were reread. - - - - -Adds a file to the list of files to be parsed at the -end of gtk_init(). - - -@filename: the pathname to the file. - - - - -Retrieves the current list of RC files that will be parsed -at the end of gtk_init() - - -@Returns: A NULL terminated array of filenames. This memory -is owned by GTK+ and must not be freed by the application. -If you want to store this information, you should make a -copy. - - - - -Sets the list of files that GTK+ will read at the -end of gtk_init() - - -@filenames: A %NULL terminated list of filenames. - - - - -Parses a color in the format expected in a RC file. - - -@scanner: a #GtkScanner -@color: a pointer to a #GtkColor structure in which to store the result -@Returns: %G_TOKEN_NONE if parsing suceeded, otherwise the token -that was expected but not found. - - - - -Parses a #GtkStateType variable from the format expected -in a RC file. - - -@scanner: a #GtkScanner (must be initialized for parsing an RC file) -@state: A pointer to a #GtkStateType variable in which to -store the result. -@Returns: %G_TOKEN_NONE if parsing suceeded, otherwise the token -that was expected but not found. - - - - -Parses a #GtkPathPriorityType variable from the format expected -in a RC file. - - -@scanner: a #GtkScanner (must be initialized for parsing an RC file) -@priority: A pointer to #GtkPathPriorityType variable in which -to store the result. -@Returns: %G_TOKEN_NONE if parsing suceeded, otherwise the token -that was expected but not found. - - - - -Looks up a file in the current module path. - - -@module_file: The name of the module to search for. -@Returns: The filename, if found. (Must be freed with g_free()), -otherwise %NULL. - - - - -Looks up a file in the current pixmap path. If the file is -not found, it outputs a warning message using g_warning() -and returns %NULL. - - -@scanner: a #GtkScanner. Used for printing out warning messages -if the file is not found. -@pixmap_file: The name of the file to search for. -@Returns: The filename, if found. (Must be freed with g_free()), -otherwise %NULL. - - - - -Returns the directory in which GTK+ will look for -theme engines. - - -@Returns: The directory. (Must be freed with g_free()) - - - - -Returns the standard directory in which themes should -be installed. (GTK+ does not actually use this directory -itself.) - - -@Returns: The directory. (Must be freed with g_free()) - - - - -Sets the function that GTK+ will use to load images - - -@loader: the #GtkImageLoader to use - - - - -Internal function. Loads an image using the current -image loader. - - -@colormap: the colormap to use for the image -@transparent_color: the transparent color for the image -@filename: the filename of the image file -@Returns: a #GtkPixmap representing @filename - - - - -Create a new #GtkRcStyle with no fields set and -a reference count of 1. - - -@Returns: the newly create #GtkRcStyle - - - - -Increment the reference count of a #GtkRcStyle. - - -@rc_style: a #GtkRcStyle - - - - -Decrement the reference count of a #GtkRcStyle and -free if the result is 0. - - -@rc_style: a #GtkRcStyle - - - - -Internal function. - - - - diff --git a/docs/reference/gtk/tmpl/gtkruler.sgml b/docs/reference/gtk/tmpl/gtkruler.sgml deleted file mode 100644 index 7f9330de31..0000000000 --- a/docs/reference/gtk/tmpl/gtkruler.sgml +++ /dev/null @@ -1,62 +0,0 @@ - -GtkRuler - - -Base class for horizontal or vertical rulers - - - -The GTKRuler widget is a base class for horizontal and vertical rulers. Rulers -are used to show the mouse pointer's location in a window. The ruler can either -be horizontal or vertical on the window. Within the ruler a small triangle -indicates the location of the mouse relative to the horixontal or vertical -ruler. See #GtkHRuler to learn how to create a new horizontal ruler. See -#GtkVRuler to learn how to create a new vertical ruler. - - - - -#GtkHRuler, #GtkVRuler - - - - -All distances are in 1/72nd's of an inch. (According to Adobe thats a point, but -points are really 1/72.27 in.) - - - - - -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. - - -@metric_name: -@abbrev: -@pixels_per_unit: -@ruler_scale: -@subdivide: - - - -This calls the #GTKMetricType to set the ruler to units defined. Available units -are GTK_PIXELS, GTK_INCHES, or GTK_CENTIMETERS. The default unit of measurement -is GTK_PIXELS. - - -@ruler: the gtkruler -@metric: the unit of measurement - - - - -This sets the range of the ruler using gfloat lower, gfloat upper, gfloat position, and gfloat max_size. - - -@ruler: the gtkruler -@lower: the upper limit of the ruler -@upper: the lower limit of the ruler -@position: the mark on the ruler -@max_size: the maximum size of the ruler - - diff --git a/docs/reference/gtk/tmpl/gtkscale.sgml b/docs/reference/gtk/tmpl/gtkscale.sgml deleted file mode 100644 index e34f3e25e3..0000000000 --- a/docs/reference/gtk/tmpl/gtkscale.sgml +++ /dev/null @@ -1,97 +0,0 @@ - -GtkScale - - -a base class for #GtkHScale and #GtkVScale. - - - -The #GtkScale widget is an abstract class, used only for deriving the -subclasses #GtkHScale and #GtkVScale. - - - - - - - - - -The #GtkScale-struct struct contains the following fields. -(These fields should be considered read-only. They should never be set by -an application.) - - - - - - -#guint draw_value; -non-zero if the scale's current value is displayed next to the -slider. - - - -#guint value_pos; -the position in which the textual value is displayed, selected from -#GtkPositionType. - - - - - - - - -Sets the number of decimal places that are displayed in the value. - - -@scale: a #GtkScale. -@digits: the number of decimal places to display, e.g. use 1 to display 1.0, -2 to display 1.00 etc. - - - - -Specifies whether the current value is displayed as a string next to the -slider. - - -@scale: a #GtkScale. -@draw_value: - - - - -Sets the position in which the current value is displayed. - - -@scale: a #GtkScale. -@pos: the position in which the current value is displayed. - - - - -An internal function used to get the maximum width needed to display the value -string. - - -@scale: a #GtkScale. -@Returns: the maximum width needed to display the value string. - - - - -The number of decimal places that are displayed in the value. - - - - -If the current value is displayed as a string next to the slider. - - - - -The position in which the current value is displayed. - - diff --git a/docs/reference/gtk/tmpl/gtkscrollbar.sgml b/docs/reference/gtk/tmpl/gtkscrollbar.sgml deleted file mode 100644 index 3c3834826c..0000000000 --- a/docs/reference/gtk/tmpl/gtkscrollbar.sgml +++ /dev/null @@ -1,35 +0,0 @@ - -GtkScrollbar - - -base class for #GtkHScrollbar and GtkVScrollbar. - - - -The #GtkScrollbar widget is an abstract base class for #GtkHScrollbar and -#GtkVScrollbar. It is not very useful in itself. - - - - - - - -#GtkHScrollbar -a horizontal scrollbar. - - - -#GtkVScrollbar -a vertical scrollbar. - - - - - - - -The #GtkScrollbar struct does not contain any public data. - - - diff --git a/docs/reference/gtk/tmpl/gtkscrolledwindow.sgml b/docs/reference/gtk/tmpl/gtkscrolledwindow.sgml deleted file mode 100644 index 92c6db77f4..0000000000 --- a/docs/reference/gtk/tmpl/gtkscrolledwindow.sgml +++ /dev/null @@ -1,191 +0,0 @@ - -GtkScrolledWindow - - - -Adds scrollbars to its child widget. - - - -#GtkScrolledWindow is a #GtkBin subclass: it's a container -the accepts a single child widget. #GtkScrolledWindow adds scrollbars -to the child widget. - - - -The scrolled window can work in two ways. Some widgets have native -scrolling support; these widgets have "slots" for #GtkAdjustment -objects. The scrolled window installs #GtkAdjustment objects in the -child window's slots using the set_scroll_adjustments_signal, found in -#GtkWidgetClass. (Conceptually, these widgets implement a "Scrollable" -interface; because GTK+ 1.2 lacks multiple inheritance, this interface -is hackily implemented as a signal in #GtkWidgetClass.) - - - -The second way to use the scrolled window is useful with widgets that -lack the set_scroll_adjustments_signal. The #GtkViewport widget acts as -a proxy, implementing scrollability for child widgets that lack their -own scrolling capabilities. - - - -If a widget has native scrolling abilities, it can be added to the -#GtkScrolledWindow with gtk_container_add(). If a widget does not, you -must first add the widget to a #GtkViewport, then add the GtkViewport -to the scrolled window. The convenience function -gtk_scrolled_window_add_with_viewport() does exactly this, so you can -ignore the presence of the viewport. - - - - -#GtkViewport, #GtkAdjustment, #GtkWidgetClass - - - - -There are no public fields in the #GtkScrolledWindow struct; it should -only be accessed using the functions below. - - - - - -Creates a new scrolled window. The two arguments are the scrolled -window's adjustments; these will be shared with the scrollbars and the -child widget to keep the bars in sync with the child. Usually you want -to pass NULL for the adjustments, which will cause the scrolled window -to create them for you. - - -@hadjustment: Horizontal adjustment. -@vadjustment: Vertical adjustment. -@Returns: New scrolled window. - - - - -Returns the horizontal scrollbar's adjustment, used to connect the -horizontal scrollbar to the child widget's horizontal scroll -functionality. - - -@scrolled_window: A #GtkScrolledWindow. -@Returns: The horizontal #GtkAdjustment. - - - - -Returns the vertical scrollbar's adjustment, used to connect the -vertical scrollbar to the child widget's vertical scroll -functionality. - - -@scrolled_window: A #GtkScrolledWindow. -@Returns: The vertical #GtkAdjustment. - - - - -Sets the scrollbar policy for the horizontal and vertical scrollbars. -The policy determines when the scrollbar should appear; it is a value -from the #GtkPolicyType enumeration. If %GTK_POLICY_ALWAYS, the -scrollbar is always present; if %GTK_POLICY_NEVER, the scrollbar is -never present; if %GTK_POLICY_AUTOMATIC, the scrollbar is present only -if needed (that is, if the slider part of the bar would be smaller -than the trough - the display is larger than the page size). - - -@scrolled_window: A #GtkScrolledWindow. -@hscrollbar_policy: Policy for horizontal bar. -@vscrollbar_policy: Policy for vertical bar. - - - - -Used to add children without native scrolling capabilities. This is -simply a convenience function; it is equivalent to adding the -unscrollable child to a viewport, then adding the viewport to the -scrolled window. If a child has native scrolling, use -gtk_container_add() instead of this function. - - - -The viewport scrolls the child by moving its #GdkWindow, and takes the -size of the child to be the size of its toplevel #GdkWindow. This will -be very wrong for most widgets that support native scrolling; for -example, if you add a #GtkCList with a viewport, the whole widget will -scroll, including the column headings. Thus #GtkCList supports -scrolling already, and should not be used with the #GtkViewport proxy. - - - -A widget supports scrolling natively if the -set_scroll_adjustments_signal field in #GtkWidgetClass is non-zero, -i.e. has been filled in with a valid signal identifier. - - -@scrolled_window: A #GtkScrolledWindow. -@child: Widget you want to scroll. - - - - -Sets the #GtkAdjustment for the horizontal scrollbar. - - -@scrolled_window: A #GtkScrolledWindow. -@hadjustment: Horizontal scroll adjustment. - - - - -Determines the location of the child widget with respect to the -scrollbars. The default is %GTK_CORNER_TOP_LEFT, meaning the child is -in the top left, with the scrollbars underneath and to the right. -Other values in #GtkCornerType are %GTK_CORNER_TOP_RIGHT, -%GTK_CORNER_BOTTOM_LEFT, and %GTK_CORNER_BOTTOM_RIGHT. - - -@scrolled_window: A #GtkScrolledWindow. -@window_placement: Position of the child window. - - - - -Sets the #GtkAdjustment for the vertical scrollbar. - - -@scrolled_window: A #GtkScrolledWindow. -@hadjustment: - -@vadjustment: Vertical scroll adjustment. - - - - -Horizontal adjustment. See gtk_scrolled_window_set_hadjustment(), gtk_scrolled_window_get_hadjustment(). - - - - -Vertical adjustment. See gtk_scrolled_window_set_vadjustment(), gtk_scrolled_window_get_vadjustment(). - - - - -Horizontal scrollbar policy (show scrollbar always, never, or "when appropriate"). - - - - -Vertical scrollbar policy (show scrollbar always, never, or "when appropriate"). - - - - -Position of child window with respect to scrollbars; top left, top -right, bottom left, bottom right. - - diff --git a/docs/reference/gtk/tmpl/gtkselection.sgml b/docs/reference/gtk/tmpl/gtkselection.sgml deleted file mode 100644 index a819f84cab..0000000000 --- a/docs/reference/gtk/tmpl/gtkselection.sgml +++ /dev/null @@ -1,271 +0,0 @@ - -Selections - - -Functions for handling inter-process communication via selections. - - - - -See the documentation for #GtkWidget for descriptions -of the "selection_get" and "selection_received" signals. - - - - - - - - - -A #GtkTargetEntry structure represents a single type of -data than can be supplied for by a widget for a selection -or for supplied or received during drag-and-drop. It -contains a string representing the drag type, a flags -field (used only for drag and drop - see #GtkTargetFlags), -and an application assigned integer ID. The integer -ID will later be passed as a signal parameter for signals -like "selection_get". It allows the application to identify -the target type without extensive string compares. - - -@target: -@flags: -@info: - - - -A #GtkTargetList structure is a reference counted list -of #GtkTargetPair. It is used to represent the same -information as a table of #GtkTargetEntry, but in -an efficient form. This structure should be treated as -opaque. - - -@list: -@ref_count: - - - -Internally used structure in the drag-and-drop and -selection handling code. - - -@target: -@flags: -@info: - - - -Create a new #GtkTargetList from an array of #GtkTargetEntry. - - -@targets: Pointer to an array of #GtkTargetEntry -@ntargets: number of entries in @targets. -@Returns: the new #GtkTargetList. - - - - -Increase the reference count of a #GtkTargetList by one. - - -@list: a #GtkTargetList - - - - -Decrease the reference count of a #GtkTargetList by one. -If the resulting reference count is zero, free the list. - - -@list: a #GtkTargetList - - - - -Add another target to a #GtkTargetList - - -@list: a #GtkTargetList -@target: the interned atom representing the target -@flags: the flags for this target -@info: an ID that will be passed back to the application - - - - -Add a table of #GtkTargetEntry into a target list - - -@list: a #GtkTargetList -@targets: the table of #GtkTargetEntry -@ntargets: number of targets in the table - - - - -Remove a target from a target list - - -@list: a #GtkTargetList -@target: the interned atom representing the target - - - - -Look up a given target in a #GtkTargetList - - -@list: a #GtkTargetList -@target: an interned atom representing the target to search for -@info: a pointer to the location to store application info for target -@Returns: %TRUE if the target was found, otherwise %FALSE - - - - -Claim ownership of a given selection for a particular widget, -or, if @widget is %NULL, release ownership of the selection. - - -@widget: a #GtkWidget, or %NULL. -@selection: an interned atom representing the selection to claim -@time: the time stamp for claiming the selection -@Returns: %TRUE if the operation succeeded - - - - -Add specified target to the list of supported targets for a -given widget and selection. - - -@widget: a #GtkTarget -@selection: the selection -@target: target to add. -@info: A unsigned integer which will be passed back to the application. - - - - -Add a table of targets to the list of supported targets -for a given widget and selection. - - -@widget: a #GtkWidget -@selection: the selection -@targets: a table of targets to add -@ntargets: number of entries in @targets - - - - -Request the contents of a selection. When received, -a "selection_received" signal will be generated. - - -@widget: The widget which acts as requestor -@selection: Which selection to get -@target: Form of information desired (e.g., STRING) -@time: Time of request (usually of triggering event) - In emergency, you could use GDK_CURRENT_TIME -@Returns: TRUE if requested succeeded. FALSE if we could not process - request. (e.g., there was already a request in process for - this widget). - - - - -Store new data into a GtkSelectionData object. Should -_only_ by called from a selection handler callback. -Null terminates the stored data. - - -@selection_data: -@type: the type of selection data -@format: format (number of bits in a unit) -@data: pointer to the data (will be copied) -@length: length of the data - - - - -Removes all handlers and unsets ownership of all -selections for a widget. Called when widget is being -destroyed. This function will not generally be -called by applications. - - -@widget: a #GtkWidget - - - - -Make a copy of a #GtkSelection data structure and its -data. - - -@data: a pointer to a #GtkSelectionData structure. -@Returns: a pointer to a copy of @data. - - - - -Free a #GtkSelectionData structure returned from -gtk_selection_data_copy(). - - -@data: a pointer to a #GtkSelectionData structure. - - - - -Internal function. - - -@widget: -@event: -@Returns: - - - - -Internal function. - - -@window: -@event: -@Returns: - - - - -Internal function. - - -@widget: -@event: -@Returns: - - - - -Internal function. - - -@widget: -@event: -@Returns: - - - - -Internal function. - - -@widget: -@event: -@Returns: - - diff --git a/docs/reference/gtk/tmpl/gtkseparator.sgml b/docs/reference/gtk/tmpl/gtkseparator.sgml deleted file mode 100644 index 997fd31fe2..0000000000 --- a/docs/reference/gtk/tmpl/gtkseparator.sgml +++ /dev/null @@ -1,23 +0,0 @@ - -GtkSeparator - - -a base class for #GtkHSeparator and #GtkVseparator. - - - -The #GtkSeparator widget is an abstract class, used only for deriving the -subclasses #GtkHSeparator and #GtkVSeparator. - - - - - - - - - -The #GtkSeparator-struct struct contains private data only. - - - diff --git a/docs/reference/gtk/tmpl/gtksignal.sgml b/docs/reference/gtk/tmpl/gtksignal.sgml deleted file mode 100644 index aab2ec0c46..0000000000 --- a/docs/reference/gtk/tmpl/gtksignal.sgml +++ /dev/null @@ -1,928 +0,0 @@ - -Signals - - -Object methods and callbacks. - - - -What are signals? - -Signals are a way to get notification when something happens -and to customize object behavior according to the -user's needs. -Every signal is uniquely identified by a name, -"class_name::signal_name", where signal_name might be something like -"clicked" and class_name might be "GtkButton". Note that some other class -may also define a "clicked" callback, so long as it doesn't derive from -#GtkButton. - - -When they are created, they are also assigned a unique positive integer, -the signal id (1 is the first signal id- 0 is used to flag an error). -Each is also tied to an array of types that describes -the prototype of the function pointer(s) (handlers) you may -connect to the signal. Finally, every signal has -a default handler that is given by a function pointer -in its class structure: it is run by default whenever the -signal is emitted. (It is possible that a signal will -be emitted and a user-defined handler will prevent the default handler -from being run.) - - -Signals are used by everyone, but they are only -created on a per class basis-- so you should call -call gtk_signal_new() unless you are writing -a new #GtkObject type. However, if you want to make a new signal -for an existing type, you may use gtk_object_class_user_signal_new() -to create a signal that doesn't correspond to a class's builtin -methods. - - - -How are signals used? - -There are two basic actions in the signal handling game. -If you want notification of an event, you must connect -a function pointer and a data pointer to that signal; the data pointer -will be passed as the last argument to the function (so long as you -are using the default marshalling functions). -You will receive a connection id, a unique positive integer -corresponding to that attachment. - - -Functions that want to notify the user of certain actions, -emit signals. - - - -Basic Terminology - - - -signal -A class method, e.g. GtkButton::clicked. -More precisely it is a unique class-branch/signal-name pair. -This means you may not define a signal handler for a class which -derives from GtkButton that is called clicked, -but it is okay to share signals names if they are separate in -the class tree. - - - - -default handler -The object's internal method which is invoked -when the signal is emitted. - - - - -user-defined handler -A function pointer and data connected -to a signal (for a particular object). -There are really two types: those which are connected -normally, and those which are connected by one -of the connect_after functions. The connect_after handlers -are always run after the default handler. -Many toolkits refer to these as callbacks. - - - - -emission -the whole process of emitting a signal, -including the invocation of all -the different handler types mentioned above. - - - - -signal id -The unique positive (nonzero) integer -used to identify a signal. It can be used instead of -a name to many functions for a slight performance -improvement. - - - - -connection id -The unique positive (nonzero) integer -used to identify the connection of a user-defined handler -to a signal. Notice that it is allowed to connect the -same function-pointer/user-data pair twice, so -there is no guarantee that a function-pointer/user-data -maps to a unique connection id. - - - - - - - -A brief note on how they work. - -The functions responsible for translating an array of #GtkArgs -to your C compiler's normal semantics are called Marshallers. -They are identified by -gtk_marshal_return_value__parameter_list() -for example a C function returning a gboolean and taking a gint -can be invoked by using gtk_marshal_BOOL__INT(). -Not all possibly combinations of return/params are available, -of course, so if you are writing a #GtkObject with parameters -you might have to write a marshaller. - - - - - - - - -#GtkObject -The base class for things which emit signals. - - - - - - - - - - -@struct: -@field: - - - - -This is currently a hack left in for a scheme wrapper library. -It may be removed. - - -Don't use it. - - -@object: The object which emits the signal. -@data: The user data associated with the hook. -@nparams: The number of parameters to the function. -@args: The actual values of the arguments. -@arg_types: The types of the arguments. -@return_type: The type of the return value from the function -or #GTK_TYPE_NONE for no return value. - - - - -A function which you can use to clean up when the -signal handler is destroyed. - - -For example, if your handler requires a few variables -that you made into a struct and allocated (using g_new() -or something), then you will probably want to free -it as soon as the hook is destroyed. This will -allow you to do that. (For this in particular -it is convenient to pass g_free() as a #GtkSignalDestroy -function). - - -@data: The user data associated with the hook that is being -destroyed. - - - - -A simple function pointer to get invoked when the -signal is emitted. This allows you tie a hook to the signal type, -so that it will trap all emissions of that signal, from any object. - - -You may not attach these to signals created with the -#GTK_RUN_NO_HOOKS flag. - - -@object: the object which emits the signal. -@signal_id: the unique integer identify the signal type. -@n_params: the number of parameters to the function, -not including return value. -@params: the parameters to the function. A pointer to -the return value is passed as a last element. -@data: the user data associated with the hook. -@Returns: whether it wished to be removed. If it returns -TRUE, the signal hook is disconnected (and destroyed). - - - - -This structure contains all the information about a particular -signal: its name, the type it affects, the signature of the handlers, -and its unique identifying integer. - - -@object_type: -@signal_id: -@signal_name: -@is_user_signal: -@signal_flags: -@return_val: -@nparams: -@params: - - - -These configure the signal's emission. They control -whether the signal can be emitted recursively on an object -and -whether to run the default method before or after the user-defined handlers. - - - - - -GTK_RUN_FIRST -Run the default handler before the connected user-defined -handlers. - - - - -GTK_RUN_LAST -Run the default handler after the connected -user-defined handlers. -(Handlers registered as "after" always run after the default handler though) - - - - -GTK_RUN_BOTH -Run the default handler twice, -once before the user-defined handlers, -and -once after. - - - - -GTK_RUN_NO_RECURSE -Whether to prevent a handler or hook -from reemitting the signal from within itself. -Attempts to -emit the signal while it is running will result in the signal -emission being restarted once it is done with the current processing. - -You must be -careful to avoid having two handlers endlessly reemitting signals, -gtk_signal_n_emissions() can be helpful. - - - - -GTK_RUN_ACTION -The signal is an action you can -invoke without any particular setup or cleanup. -The signal is treated no differently, but some -other code can determine if the signal is appropriate to -delegate to user control. For example, key binding sets -only allow bindings of ACTION signals to keystrokes. - - - - -GTK_RUN_NO_HOOKS -This prevents the connection of emission hooks -to the signal. - - - - - -@GTK_RUN_FIRST: -@GTK_RUN_LAST: -@GTK_RUN_BOTH: -@GTK_RUN_NO_RECURSE: -@GTK_RUN_ACTION: -@GTK_RUN_NO_HOOKS: - - - - - - - - - - -Create a new signal type. (This is usually done in the -class initializer.) - - -@name: the event name for the signal, e.g. "clicked". -@signal_flags: a combination of GTK_RUN flags -specifying detail of when the default handler is to be invoked. -You should at least specify #GTK_RUN_FIRST -or #GTK_RUN_LAST. -@object_type: the type of object this signal pertains to. -It will also pertain to derivers of this type automatically. -@function_offset: How many bytes the function pointer is in -the class structure for this type. Used to invoke a class -method generically. -@marshaller: the function to translate between an array -of GtkArgs and the native calling convention. Usually they -are identified just by the type of arguments they take: -for example, gtk_marshal_BOOL__STRING() describes a marshaller -which takes a string and returns a boolean value. -@return_val: the type of return value, or GTK_TYPE_NONE for a signal -without a return value. -@nparams: the number of parameter the handlers may take. -@Varargs: a list of GTK_TYPE_*, one for each parameter. -@Returns: the signal id. - - - - -Create a new signal type. (This is usually done in a -class initializer.) - - -This function take the types as an array, instead of a list -following the arguments. Otherwise the same as gtk_signal_new(). - - -@name: the name of the signal to create. -@signal_flags: see gtk_signal_new(). -@object_type: the type of GtkObject to associate the signal with. -@function_offset: how many bytes the function pointer is in -the class structure for this type. -@marshaller: -@return_val: the type of the return value, or GTK_TYPE_NONE if -you don't want a return value. -@nparams: the number of parameters to the user-defined handlers. -@params: an array of GtkTypes, describing the prototype to -the callbacks. -@Returns: the signal id. - - - - -Given the name of the signal and the type of object it connects -to, get the signal's identifying integer. Emitting the signal -by number is somewhat faster than using the name each time. - - -It also tries the ancestors of the given type. - - -@name: the signal's name, e.g. clicked. -@object_type: the type that the signal operates on, e.g. #GTK_TYPE_BUTTON. -@Returns: the signal's identifying number, or 0 if no signal was found. - - - - -Given the signal's identifier, find its name. - - -Two different signals may have the same name, if they have differing types. - - -@signal_id: the signal's identifying number. -@Returns: the signal name, or NULL if the signal number was invalid. - - - - -Emit a signal. This causes the default handler and user-defined -handlers to be run. - - -Here is what gtk_signal_emit() does: - - -1. Calls the default handler and the user-connected handlers. -The default handler will be called first if -GTK_RUN_FIRST is set, and last if GTK_RUN_LAST is set. - - -2. Calls all handlers connected with the "after" flag set. - - -@object: the object that emits the signal. -@signal_id: the signal identifier. -@Varargs: the parameters to the function, followed -by a pointer to the return type, if any. - - - - -Emit a signal. This causes the default handler and user-connected -handlers to be run. - - -@object: the object that emits the signal. -@name: the name of the signal. -@Varargs: the parameters to the function, followed -by a pointer to the return type, if any. - - - - -Emit a signal. This causes the default handler and user-connected -handlers to be run. This differs from gtk_signal_emit() by taking -an array of GtkArgs instead of using C's varargs mechanism. - - -@object: the object to emit the signal to. -@signal_id: the signal identifier. -@params: an array of GtkArgs, one for each parameter, -followed by one which is a pointer to the return type. - - - - -Emit a signal by name. This causes the default handler and user-connected -handlers to be run. This differs from gtk_signal_emit() by taking -an array of GtkArgs instead of using C's varargs mechanism. - - -@object: the object to emit the signal to. -@name: the name of the signal. -@params: an array of GtkArgs, one for each parameter, -followed by one which is a pointer to the return type. - - - - -Find out the recursion depth of emissions for a particular type -of signal and object. (So it will -always return 0 or 1 if #GTK_RUN_NO_RECURSE is specified) -This is a way to avoid recursion: you can see if -you are currently running in that signal handler and emit it only -if you are. - -Another way to look at it is that this number increases -by one when #gtk_signal_emit(), et al, are called, -and decreases by one when #gtk_signal_emit() returns. - - -@object: the object with the signal handler. -@signal_id: the signal id. -@Returns: the recursion depth of emissions of this signal for this -object. - - - - -Find out the recursion depth of emissions for a particular type -of signal and object. Just like gtk_signal_n_emissions() -except it will lookup the signal id for you. - - -@object: the object with the signal handler. -@name: the signal name. -@Returns: the recursion depth of emissions of this signal for this -object. - - - - -This function aborts a signal's current emission. - - -It will prevent the default method from running, -if the signal was #GTK_RUN_LAST and you connected -normally (i.e. without the "after" flag). - - -It will print a warning if used on a signal which -isn't being emitted. - - -@object: the object whose signal handlers you wish to stop. -@signal_id: the signal identifier, as returned by gtk_signal_lookup(). - - - - -This function aborts a signal's current emission. - -It is just like -gtk_signal_emit_stop() -except it will lookup the signal id for you. - - -@object: the object whose signal handlers you wish to stop. -@name: the name of the signal you wish to stop. - - - - -Attach a function pointer and user data to a signal for -a particular object. - - -The GtkSignalFunction takes a GtkObject as its first parameter. -It will be the same object as the one you're connecting -the hook to. The func_data will be passed as the last parameter -to the hook. - - -All else being equal, signal handlers are invoked in the order -connected (see gtk_signal_emit() for the other details of -which order things are called in). - - -Here is how one passes an integer as user data, -for when you just want to specify a constant int -as parameter to your function: - - - -static void button_clicked_int(GtkButton* button, gpointer func_data) -{ - g_print("button pressed: %d\n", GPOINTER_TO_INT(func_data)); -} - -/* By calling this function, you will make the g_print above - * execute, printing the number passed as `to_print'. */ -static void attach_print_signal(GtkButton* button, gint to_print) -{ - gtk_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(button_clicked_int), - GINT_TO_POINTER(to_print)); -} - - - -@object: the object associated with the signal, e.g. if a button -is getting pressed, this is that button. -@name: name of the signal. -@func: function pointer to attach to the signal. -@func_data: value to pass as to your function (through the marshaller). -@Returns: the connection id. - - - - -Attach a function pointer and user data to a signal -so that this handler will be called after the other handlers. - - -@object: the object associated with the signal. -@name: name of the signal. -@func: function pointer to attach to the signal. -@func_data: value to pass as to your function (through the marshaller). -@Returns: the unique identifier for this attachment: the connection id. - - - - -This function is for registering a callback that will -call another object's callback. That is, -instead of passing the object which is responsible -for the event as the first parameter of the callback, -it is switched with the user data (so the object which emits -the signal will be the last parameter, which is where the -user data usually is). - - -This is useful for passing a standard function in as a callback. -For example, if you wanted a button's press to gtk_widget_show() -some widget, you could write: - - - -gtk_signal_connect_object(button, "clicked", gtk_widget_show, window); - - - -@object: the object which emits the signal. -@name: the name of the signal. -@func: the function to callback. -@slot_object: the object to pass as the first parameter to func. -(Though it pretends to take an object, you can -really pass any gpointer as the #slot_object .) -@Returns: the connection id. - - - - -Attach a signal hook to a signal, passing in an alternate -object as the first parameter, and guaranteeing -that the default handler and all normal -handlers are called first. - - -@object: the object associated with the signal. -@name: name of the signal. -@func: function pointer to attach to the signal. -@slot_object: the object to pass as the first parameter to #func. -@Returns: the connection id. - - - - -Attach a function pointer and user data to a signal with -more control. - - -@object: the object which emits the signal. For example, a button -in the button press signal. -@name: the name of the signal. -@func: function pointer to attach to the signal. -@marshal: the function marshal, see the gtkmarshall documentation for -more details, but briefly: the marshaller is a function which takes -the #GtkObject which emits the signal, the user data, the number of the -arguments, and the array of arguments. It is responsible for -calling the function in the appropriate calling convention. -gtk_signal_default_marshaller is usually fine. -(This shows up, for example, when worrying about matching -c++ or other languages' calling conventions.) -@data: the user data associated with the function. -@destroy_func: function to call when this particular hook is -disconnected. -@object_signal: whether this is an object signal-- basically an "object -signal" is one that wants its user_data and object fields switched, -which is useful for calling functions which operate on another -object primarily. -@after: whether to invoke the user-defined handler after the signal, or to let -the signal's default behavior preside (i.e. depending on #GTK_RUN_FIRST -and #GTK_RUN_LAST). -@Returns: the connection id. - - - - -Attach a function pointer and another GtkObject to a signal. - - -This function takes an object whose "destroy" signal -should be trapped. -That way, you don't have to clean up the -signal handler when you destroy the object. -It is a little less efficient though. - - -(Instead you may call gtk_signal_disconnect_by_data(), if you want -to explicitly delete all attachments to this object. This -is perhaps not recommended since it could be confused -with an integer masquerading as a pointer (through GINT_AS_POINTER).) - - -@object: the object that emits the signal. -@signal: -@func: function pointer to attach to the signal. -@func_data: pointer to pass to func. -@alive_object: object whose death should cause the handler connection -to be destroyed. - -@name: name of the signal. - - - - -These signal connectors are for signals which refer to objects, -so they must not be called after the object is deleted. - - -Unlike gtk_signal_connect_while_alive(), -this swaps the object and user data, making it suitable for -use with functions which primarily operate on the user data. - - -This function acts just like gtk_signal_connect_object() except -it traps the "destroy" signal to prevent you from having to -clean up the handler. - - -@object: the object associated with the signal. -@signal: -@func: function pointer to attach to the signal. -@alive_object: the user data, which must be an object, whose destruction -should signal the removal of this signal. - -@name: name of the signal. - - - - -Destroy a user-defined handler connection. - - -@object: the object which the handler pertains to. -@handler_id: the connection id. - - - - -Destroy all connections for a particular object, with -the given function-pointer and user-data. - - -@object: the object which emits the signal. -@func: the function pointer to search for. -@data: the user data to search for. - - - - -Destroy all connections for a particular object, with -the given user-data. - - -@object: the object which emits the signal. -@data: the user data to search for. - - - - -Prevent an user-defined handler from being invoked. All other -signal processing will go on as normal, but this particular -handler will ignore it. - - -@object: the object which emits the signal to block. -@handler_id: the connection id. - - - - -Prevent a user-defined handler from being invoked, by reference to -the user-defined handler's function pointer and user data. (It may result in -multiple hooks being blocked, if you've called connect multiple times.) - - -@object: the object which emits the signal to block. -@func: the function pointer of the handler to block. -@data: the user data of the handler to block. - - - - -Prevent all user-defined handlers with a certain user data from being invoked. - - -@object: the object which emits the signal we want to block. -@data: the user data of the handlers to block. - - - - -Undo a block, by connection id. Note that undoing a block doesn't -necessarily make the hook callable, because if you block a -hook twice, you must unblock it twice. - - -@object: the object which emits the signal we want to unblock. -@handler_id: the emission handler identifier, as returned by -gtk_signal_connect(), etc. - - - - -Undo a block, by function pointer and data. -Note that undoing a block doesn't -necessarily make the hook callable, because if you block a -hook twice, you must unblock it twice. - - -@object: the object which emits the signal we want to unblock. -@func: the function pointer to search for. -@data: the user data to search for. - - - - -Undo block(s), to all signals for a particular object -with a particular user-data pointer - - -@object: the object which emits the signal we want to unblock. -@data: the user data to search for. - - - - -Returns a connection id corresponding to a given signal id and object. - - -One example of when you might use this is when the arguments -to the signal are difficult to compute. A class implementor -may opt to not emit the signal if no one is attached anyway, -thus saving the cost of building the arguments. - - -@object: the object to search for the desired user-defined handler. -@signal_id: the number of the signal to search for. -@may_be_blocked: whether it is acceptable to return a blocked -handler. -@Returns: the connection id, if a connection was found. 0 otherwise. - - - - -Returns a connection id corresponding to a given signal id, object, function -pointer and user data. - - -@object: the object to search for the desired handler. -@signal_id: the number of the signal to search for. -@may_be_blocked: whether it is acceptable to return a blocked -handler. -@func: the function pointer to search for. -@data: the user data to search for. -@Returns: the connection id, if a handler was found. 0 otherwise. - - - - -Returns whether a connection id is valid (and optionally not blocked). - - -@object: the object to search for the desired handler. -@handler_id: the connection id. -@may_be_blocked: whether it is acceptable to return a blocked -handler. -@Returns: TRUE if the signal exists and wasn't blocked, -unless #may_be_blocked was specified. FALSE otherwise. - - - - -Destroy all the signal handlers connected to an object. -This is done automatically when the object is destroyed. - - -This function is labeled private. - - -@object: the object whose signal handlers should be destroyed. - - - - -These set default functions to call when the user didn't -supply a function when connecting. (These are rarely -used, and probably only for language bindings) - - -By default, there are no such functions. - - -@marshal_func: the function to invoke on every handlers for which there -isn't a function pointer. May be NULL. -@destroy_func: the function to invoke when each hook is destroyed. -May be NULL. - - - - -Obtain information about a signal. - - -@signal_id: the signal type identifier. -@Returns: a pointer to a GtkSignalQuery structure -which contains all the information, or NULL. -The pointer is allocated just for you: you must g_free() it. - - - - -Add an emission hook for a type of signal, for any object. - - -@signal_id: the type of signal to hook for. -@hook_func: the function to invoke to handle the emission hook. -@data: the user data passed in to hook_func. -@Returns: the id (that you may pass as a parameter -to gtk_signal_remove_emission_hook()). - - - - -Add an emission hook for a type of signal, for any object. -(with control of what happens when the hook is -destroyed). - - -@signal_id: the type of signal add the hook for. -@hook_func: the function to invoke to handle the hook. -@data: the user data passed in to hook_func. -@destroy: a function to invoke when the hook is destroyed, -to clean up any allocation done just for this -signal handler. -@Returns: the id (that you may pass as a parameter -to gtk_signal_remove_emission_hook()). - - - - -Delete an emission hook. (see gtk_signal_add_emission_hook()) - - -@signal_id: the id of the signal type. -@hook_id: the id of the emission handler, returned by add_emission_hook(). - - diff --git a/docs/reference/gtk/tmpl/gtksocket.sgml b/docs/reference/gtk/tmpl/gtksocket.sgml deleted file mode 100644 index 6023b10441..0000000000 --- a/docs/reference/gtk/tmpl/gtksocket.sgml +++ /dev/null @@ -1,122 +0,0 @@ - -GtkSocket - - -Container for widgets from other processes. - - - -Together with #GtkPlug, #GtkSocket provides the ability -to embed widgets from one process into another process -in a fashion that is transparent to the user. One -process creates a #GtkSocket widget and, passes the -XID of that widget's window to the other process, -which then creates a #GtkPlug window with that XID. -Any widgets contained in the #GtkPlug then will appear -inside the first applications window. - - - -The XID of the socket's window is obtained by using -the GTK_WINDOW_XWINDOW() macro from the header -file <gdk/gdkx.h>. Before using this macro, -the socket must have been realized, and for hence, -have been added to its parent. - - - Obtaining the XID of a socket - -#include <gdk/gdkx.h> - -GtkWidget *socket = gtk_socket_new(); -gtk_widget_show (socket); -gtk_container_add (GTK_CONTAINER (parent), socket); - -/* The following call is only necessary if one of - * the ancestors of the socket is not yet visible. - */ -gtk_widget_realize (socket); -g_print ("The XID of the sockets window is %#x\n", - GDK_WINDOW_XWINDOW (socket->window)); - - - - - -Note that if you pass the XID of the socket to another -process that will create a plug in the socket, you -must make sure that the socket widget is not destroyed -until that plug is created. Violating this rule will -cause unpredictable consequences, the most likely -consequence being that the plug will appear as a -separate toplevel window. You can check if the plug -has been created by examining the -plug_window field of the -#GtkSocket structure. If this field is non-NULL, -then the plug has been succesfully created inside -of the socket. - - - -When GTK+ is notified that the embedded window has been -destroyed, then it will destroy the socket as well. You -should always, therefore, be prepared for your sockets -to be destroyed at any time when the main event loop -is running. - - - -A socket can also be used to swallow arbitrary -pre-existing top-level windows using gtk_socket_steal(), -though the integration when this is done will not be as close -as between a #GtkPlug and a #GtkSocket. - - - - - - -#GtkPlug -the widget that plugs into a #GtkSocket. - - - - - - - -The #GtkEditable structure contains the following field. -(This field should be considered read-only. It should -never be set by an application.) - - - - - - -#GdkWindow *plug_window; -the window embedded inside this #GtkSocket. - - - - - - - - -Create a new empty #GtkSocket. - - -@Returns: the new #GtkSocket. - - - - -Reparents a pre-existing toplevel window into a -#GtkSocket. - - -@socket: a #GtkSocket. -@wid: the XID of an existing toplevel window. - - diff --git a/docs/reference/gtk/tmpl/gtkspinbutton.sgml b/docs/reference/gtk/tmpl/gtkspinbutton.sgml deleted file mode 100644 index 6bed4c17f9..0000000000 --- a/docs/reference/gtk/tmpl/gtkspinbutton.sgml +++ /dev/null @@ -1,367 +0,0 @@ - -GtkSpinButton - - -retrieve an integer or floating-point number from the user. - - - -A #GtkSpinButton is an ideal way to allow the user to set the value of some attribute. Rather than having to directly type a number into a #GtkEntry, #GtkSpinButton allows the user to click on one of two arrows to increment or decrement the displayed value. A value can still be typed in, with the bonus that it can be checked to ensure it is in a given range. - - -The main properties of a #GtkSpinButton are through a #GtkAdjustment. See the #GtkAdjustment section for more details about an adjustment's properties. - - -#GtkSpinButton widgets are created with a call to gtk_spin_button_new(). - - -The #GtkAdjustment of a spin button can be set or retrieved with a call to gtk_spin_button_set_adjustment() or gtk_spin_button_get_adjustment(), respectively. - - -The number of digits after the decimal point of a spin button can be altered with gtk_spin_button_set_digits(). - - -To retrieve values from a spin button, use gtk_spin_button_get_value_as_float() if you require a floating point number, or gtk_spin_button_get_value_as_int() if you require an integer. - - -To set the value of a #GtkSpinButton, use gtk_spin_button_set_value(). To change the update behaviour of a spin button, use gtk_spin_button_set_update_policy(). - - -When a spin button reaches it's upper or lower limit, it can either stop spinning, or wrap around and continue spinning from the opposite limit. For example, if five is the upper limit and the lower limit is zero, upon reaching the value five, the spin button can change it's value back to zero and continue spinning upwards. -This behaviour is set with gtk_spin_button_set_wrap(). - - -A border around a spin button's arrows can be created using gtk_spin_button_set_shadow_type(). - - -A number may be entered that is invalid, given a spin button's range. An erroneous number can be corrected as soon as the spin button is 'activated' using gtk_spin_button_snap_to_ticks(), which will alter the current value to the nearest step increment. (See #GtkAdjustment for step increments). - - -Because a spin contains a #GtkEntry, alphabetic characters may be entered. These can be ignored by using gtk_spin_button_set_numeric() with a value of TRUE. Then only numeric values, '-' and a decimal point will be accepted. - - -To manually increment or decrement the spin button, use gtk_spin_button_spin(), and to force an update (refresh), use gtk_spin_button_update(). - - - -Using a GtkSpinButton to get an integer. - - -/* Provides a function to retrieve an integer value from a GtkSpinButton - * and creates a spin button to model percentage values. - */ - -gint grab_int_value (GtkSpinButton *a_spinner, gpointer user_data) { - return gtk_spin_button_get_value_as_int (a_spinner); -} - -void create_integer_spin_button(void) { - - GtkWidget *window, *spinner; - GtkAdjustment *spinner_adj; - - spinner_adj = (GtkAdjustment *) gtk_adjustment_new(50.0, 0.0, 100.0, 1.0, 5.0, 5.0); - - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_container_set_border_width (GTK_CONTAINER (window), 5); - - /* creates the spinner, with no decimal places */ - spinner = gtk_spin_button_new (spinner_adj, 1.0, 0); - gtk_container_add (GTK_CONTAINER(window), spinner); - - gtk_widget_show_all (window); - return; -} - - - - - - - -Using a GtkSpinButton to get a floating point value. - - -/* Provides a function to retrieve a floating point value from a - * GtkSpinButton, and creates a high precision spin button. - */ - -gfloat grab_int_value (GtkSpinButton *a_spinner, gpointer user_data) { - return gtk_spin_button_get_value_as_float (a_spinner); -} - -void create_floating_spin_button(void) { - - GtkWidget *window, *spinner; - GtkAdjustment *spinner_adj; - - spinner_adj = (GtkAdjustment *) gtk_adjustment_new(2.500, 0.0, 5.0, 0.001, 0.1, 0.1); - - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_container_set_border_width (GTK_CONTAINER (window), 5); - - /* creates the spinner, with three decimal places */ - spinner = gtk_spin_button_new (spinner_adj, 0.001, 3); - gtk_container_add (GTK_CONTAINER(window), spinner); - - gtk_widget_show_all (window); - return; -} - - - - - - - - - -#GtkEntry -retrieve text rather than numbers. - - - - - - -entry is the #GtkEntry part of the #GtkSpinButton widget, and can be used accordingly. All other fields contain private data and should only be modified using the functions below. - - - - - - - - - - -GTK_UPDATE_ALWAYS -When refreshing your #GtkSpinButton, the value is always displayed. - - -GTK_UPDATE_IF_VALID -When refreshing your #GtkSpinButton, the value is only displayed if it is valid within the bounds of the spin button's #GtkAdjustment. - - - - -@GTK_UPDATE_ALWAYS: -@GTK_UPDATE_IF_VALID: - - - - - - - - -GTK_SPIN_STEP_FORWARD, -GTK_SPIN_STEP_BACKWARD, -GTK_SPIN_PAGE_FORWARD, -GTK_SPIN_PAGE_BACKWARD -These values spin a #GtkSpinButton by the relevant values of the spin button's #GtkAdjustment. - - -GTK_SPIN_HOME, -GTK_SPIN_END -These set the spin button's value to the minimum or maxmimum possible values, (set by it's #GtkAdjustment), respectively. - - -GTK_SPIN_USER_DEFINED -The programmer must specify the exact amount to spin the #GtkSpinButton. - - - - -@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: - - - -Changes the properties of an existing spin button. The adjustment, climb rate, and number of decimal places are all changed accordingly, after this function call. - - -@spin_button: a #GtkSpinButton. -@adjustment: a #GtkAdjustment. -@climb_rate: the new climb rate. -@digits: the number of decimal places to display in the spin button. - - - - -Creates a new #GtkSpinButton. - - -@adjustment: the #GtkAdjustment object that this spin button should use. -@climb_rate: specifies how much the spin button changes when an arrow is clicked on. -@digits: the number of decimal places to display. -@Returns: a #GtkWidget. - - - - -Changes which #GtkAdjustment is associated with a spin button. - - -@spin_button: a #GtkSpinButton. -@adjustment: a #GtkAdjustment. - - - - -Retrieves the #GtkAdjustment used by a given spin button. - - -@spin_button: a #GtkSpinButton. -@Returns: a #GtkAdjustment. - - - - -Alters the number of decimal places that are displayed in a spin button. - - -@spin_button: a #GtkSpinButton. -@digits: the number of decimal places. - - - - -Retrieves the current value of a #GtkSpinButton. If the number has no decimal places, it is converted to a float before the function returns. - - -@spin_button: a #GtkSpinButton. -@Returns: the value of @spin_button as a #gfloat. - - - - -Retrieves the current integer value of a #GtkSpinButton. - - -@spin_button: a #GtkSpinButton. -@Returns: the value of @spin_button as a #gint. - - - - -Sets the value of a spin button. - - -@spin_button: a #GtkSpinButton. -@value: the new floating point value. - - - - -Changes the way a spin button refreshes and updates itself. See %GtkSpinButtonUpdatePolicy for more information. - - -@spin_button: a #GtkSpinButton. -@policy: the new update policy. - - - - -Sets how the spin button's #GtkEntry reacts to alphabetic characters. A value of TRUE to @numeric means that all non-numeric characters (except '-' and a decimal point) are ignored. - - -@spin_button: a #GtkSpinButton. -@numeric: whether letters should be ignored. - - - - -Performs an explicit 'spin' on a spin button. - - -@spin_button: a #GtkSpinButton. -@direction: the type of spin to perform. -@increment: the amount to spin. - - - - -Sets a spin button's value to the lower limit when it's upper limit is reached, and vice versa. - - -@spin_button: a #GtkSpinButton. -@wrap: defaults to FALSE, set to TRUE to make the spin button wrap. - - - - -Creates a border around the arrows of a #GtkSpinButton. The type of border is determined by @shadow_type. - - -@spin_button: a #GtkSpinButton -@shadow_type: the new border type. - - - - -Sets whether a number typed into a spin button should be snapped to the nearest step increment. - - -@spin_button: a #GtkButton. -@snap_to_ticks: TRUE or FALSE. - - - - -Refreshes a spin button. The behaviour of the update is determined by gtk_spin_button_set_update_policy(). - - -@spin_button: a #GtkSpinButton. - - - - -the #GtkAdjustment that defines a spin button's main properties. - - - - -the amount a spin button changes when an arrow is clicked. - - - - -the number of decimal places to display. - - - - -whether erroneous values are automatically changed to a spin button's nearest step increment. - - - - -whether non-numeric characters should be ignored. - - - - -whether a spin button should wrap upon reaching its limits. - - - - -how a spin button should be updated. - - - - -the type of border that surrounds the arrows of a spin button. - - - - -reads the current value, or sets a new value. - - diff --git a/docs/reference/gtk/tmpl/gtkstatusbar.sgml b/docs/reference/gtk/tmpl/gtkstatusbar.sgml deleted file mode 100644 index f751cd051e..0000000000 --- a/docs/reference/gtk/tmpl/gtkstatusbar.sgml +++ /dev/null @@ -1,129 +0,0 @@ - -GtkStatusbar - - -report messages of minor importance to the user. - - - -A #GtkStatusbar is usually placed along the bottom of an application's main -#GtkWindow. It may provide a regular commentary of the application's status -(as is usually the case in a web browser, for example), or may be used to -simply output a message when the status changes, (when an upload is complete -in an FTP client, for example). - - -Status bars in Gtk+ maintain a stack of messages. The message at -the top of the each bar's stack is the one that will currently be displayed. - - -Any messages added to a statusbar's stack must specify a context_id -that is used to uniquely identify the source of a message. This context_id can be -generated by gtk_statusbar_get_context_id(), given a message and the -statusbar that it will be added to. Note that messages are stored in a -stack, and when choosing which message to display, the stack structure is -adhered to, regardless of the context identifier of a message. - - -Status bars are created using gtk_statusbar_new(). - - -Messages are added to the bar's stack with gtk_statusbar_push(). - - -The message at the top of the stack can be removed using gtk_statusbar_pop(). A message can be removed from anywhere in the stack if it's message_id was recorded at the time it was added. This is done using gtk_statusbar_remove(). - - - - - - -#GtkDialog -another way of reporting information to the user. - - - - - - -Contains private data that should be modified with the functions described below. - - - - - -Holds the data for a statusbar message. text holds the actual text string. context_id is the context that this message is associated with, and message_id is this particular message's identifier. However, these fields should not be modified directly. - - -@text: -@context_id: -@message_id: - - - -Creates a new #GtkStatusbar ready for messages. - - -@Returns: the new #GtkStatusbar. - - - - -Returns a new context identifier, given a description of the actual context. - - -@statusbar: a #GtkStatusbar. -@context_description: textual description of what context the new message is -being used in. -@Returns: an integer id. - - - - -Pushes a new message onto a statusbar's stack. - - -@statusbar: a #GtkStatusbar. -@context_id: the message's context id, as returned by -gkt_statusbar_get_context_id(). -@text: the message to add to the statusbar. -@Returns: the message's new message id for use with gtk_statusbar_remove(). - - - - -Removes the message at the top of a #GtkStatusBar's stack. - - -@statusbar: a #GtkStatusBar. -@context_id: a context identifier. - - - - -Forces the removal of a message from a statusbar's stack. The exact context_id and message_id must be specified. - - -@statusbar: a #GtkStatusBar. -@context_id: a context identifier. -@message_id: a message identifier, as returned by gtk_statusbar_push(). - - - - -Is emitted whenever a new message gets pushed onto a statusbar's stack. - - -@statusbar: the object which received the signal. -@context_id: the context id of the relevant message/statusbar. -@text: the message that was pushed. - - - -Is emitted whenever a new message is popped off a statusbar's stack. - - -@statusbar: the object which received the signal. -@context_id: the context id of the relevant message/statusbar. -@text: the message that was just popped. - diff --git a/docs/reference/gtk/tmpl/gtkstyle.sgml b/docs/reference/gtk/tmpl/gtkstyle.sgml deleted file mode 100644 index 0fbac43c7b..0000000000 --- a/docs/reference/gtk/tmpl/gtkstyle.sgml +++ /dev/null @@ -1,887 +0,0 @@ - -Styles - - - - - - - - - - - - - - - - - - - - - - - - - - -@style: - - - - - - - -@klass: -@fg: -@bg: -@light: -@dark: -@mid: -@text: -@base: -@black: -@white: -@font: -@fg_gc: -@bg_gc: -@light_gc: -@dark_gc: -@mid_gc: -@text_gc: -@base_gc: -@black_gc: -@white_gc: -@bg_pixmap: -@ref_count: -@attach_count: -@depth: -@colormap: -@engine: -@engine_data: -@rc_style: -@styles: - - - - - - -@xthickness: -@ythickness: -@draw_hline: -@draw_vline: -@draw_shadow: -@draw_polygon: -@draw_arrow: -@draw_diamond: -@draw_oval: -@draw_string: -@draw_box: -@draw_flat_box: -@draw_check: -@draw_option: -@draw_cross: -@draw_ramp: -@draw_tab: -@draw_shadow_gap: -@draw_box_gap: -@draw_extension: -@draw_focus: -@draw_slider: -@draw_handle: - - - - - - -@Returns: - - - - - - - -@style: -@Returns: - - - - - - - -@style: -@window: -@Returns: - - - - - - - -@style: - - - - - - - -@style: -@Returns: - - - - - - - -@style: - - - - - - - -@style: -@window: -@state_type: - - - - - - - -@style: -@window: -@set_bg: -@state_type: -@area: -@x: -@y: -@width: -@height: - - - - - - - -@s: -@gw: -@st: -@a: -@x: -@y: -@w: -@h: - - - - - - - -@style: -@window: -@state_type: -@x1: -@x2: -@y: - - - - - - - -@style: -@window: -@state_type: -@y1: -@y2: -@x: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@points: -@npoints: -@fill: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@arrow_type: -@fill: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@x: -@y: -@string: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: -@gap_side: -@gap_x: -@gap_width: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: -@gap_side: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: -@orientation: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@arrow_type: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: -@gap_side: -@gap_x: -@gap_width: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: -@orientation: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@arrow_type: -@fill: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: -@gap_side: -@gap_x: -@gap_width: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: -@gap_side: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: -@orientation: - - - - - - - -@style: -@window: -@state_type: -@area: -@widget: -@detail: -@x1: -@x2: -@y: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@points: -@npoints: -@fill: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@arrow_type: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: -@gap_side: -@gap_x: -@gap_width: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: -@orientation: - - - - - - - -@style: -@window: -@state_type: -@area: -@widget: -@detail: -@x: -@y: -@string: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@area: -@widget: -@detail: -@y1: -@y2: -@x: - - diff --git a/docs/reference/gtk/tmpl/gtktable.sgml b/docs/reference/gtk/tmpl/gtktable.sgml deleted file mode 100644 index 74fe50b426..0000000000 --- a/docs/reference/gtk/tmpl/gtktable.sgml +++ /dev/null @@ -1,228 +0,0 @@ - -GtkTable - - -Pack widgets in regular patterns. - - - -The GtkTable functions allow the programmer to arrange widgets in rows and -columns, making it easy to align many widgets next to each other, -horizontally and vertically. - - -Tables are created with a call to gtk_table_new(), the size of which can -later be changed with gtk_table_resize(). - - -Widgets can be added to a table using gtk_table_attach() or the more -convenient (but slightly less flexible) gtk_table_attach_defaults(). - - -To alter the space next to a specific row, use gtk_table_set_row_spacing(), -and for a column, gtk_table_set_col_spacing(). - -The gaps between all rows or columns can be changed by calling -gtk_table_set_row_spacings() or gtk_table_set_col_spacings() respectively. - - -gtk_table_set_homogeneous(), can be used to set whether all cells in the -table will resize themselves to the size of the largest widget in the table. - - - - - - -#GtkVBox -For packing widgets vertically only. - - -#GtkHBox -For packing widgets horizontally only. - - - - - - -The GtkTable structure holds the data for the actual table itself. - -children is a #GList of all the widgets the table contains. rows and columns are pointers to #GtkTableRowCol structures, which contain the default spacing and expansion details for the #GtkTable's rows and columns, respectively. - - -nrows and ncols are 16bit integers storing the number of rows and columns the table has. - - - - - -The widget field is a pointer to the widget that -this %GtkTableChild structure is keeping track of. -The left_attach, -right_attach, -top_attach, and -bottom_attach fields specify the row and column -numbers which make up the invisible rectangle that the child widget is packed into. - - -xpadding and ypadding -specify the space between this widget and the surrounding table cells. - - -@widget: -@left_attach: -@right_attach: -@top_attach: -@bottom_attach: -@xpadding: -@ypadding: -@xexpand: -@yexpand: -@xshrink: -@yshrink: -@xfill: -@yfill: - - - -These fields should be considered read-only and not be modified directly. - - -@requisition: -@allocation: -@spacing: -@need_expand: -@need_shrink: -@expand: -@shrink: -@empty: - - - -Used to create a new table widget. An initial size must be given by specifying how many rows and columns the table should have, although this can be changed later with gtk_table_resize(). - - -@rows: The number of rows the new table should have. -@columns: The number of columns the new table should have. -@homogeneous: If set to TRUE, all table cells are resized to the size of the cell -containing the largest widget. -@Returns: A pointer to the the newly created table widget. - - - - -If you need to change a table's size after it has been created, this function allows you to do so. - - -@table: The #GtkTable you wish to change the size of. -@rows: The new number of rows. -@columns: The new number of columns. - - - - -Adds a widget to a table. The number of 'cells' that a widget will occupy is -specified by @left_attach, @right_attach, @top_attach and @bottom_attach. -These each represent the leftmost, rightmost, uppermost and lowest column -and row numbers of the table. (Columns and rows are indexed from zero). - - -@table: The #GtkTable to add a new widget to. -@child: The widget to add. -@left_attach: the column number to attach the left side of a child widget to. -@right_attach: the column number to attach the right side of a child widget to. -@top_attach: the row number to attach the left side of a child widget to. -@bottom_attach: the column number to attach the right side of a child widget to. -@xoptions: Used to specify the properties of the child widget when the table is resized. -@yoptions: The same as xoptions, except this field determines behaviour of vertical resizing. -@xpadding: An integer value specifying the padding on the left and right of the widget being added to the table. -@ypadding: The amount of padding above and below the child widget. - - - - -As there are many options associated with gtk_table_attach(), this convenience function provides the programmer with a means to add children to a table with identical padding and expansion options. - - -@table: The table to add a new child widget to. -@widget: The child widget to add. -@left_attach: The column number to attach the left side of the child widget to. -@right_attach: The column number to attach the right side of the child widget to. -@top_attach: The row number to attach the top of the child widget to. -@bottom_attach: The row number to attach the bottom of the child widget to. - - - - -changes the space between a given table row and its surrounding rows. - - -@table: a #GtkTable containing the row whose properties you wish to change. -@row: row number whose spacing will be changed. -@spacing: number of pixels that the spacing should take up. - - - - -alters the amount of space between a given table column and the adjacent columns. - - -@table: a #GtkTable. -@column: the column whose spacing should be changed. -@spacing: number of pixels that the spacing should take up. - - - - -sets the space between every row in @table equal to @spacing. - - -@table: a #GtkTable. -@spacing: the number of pixels of space to place between every row in the table. - - - - -sets the space between every column in @table equal to @spacing. - - -@table: a #GtkTable. -@spacing: the number of pixels of space to place between every column in the table. - - - - -changes the homogenous property of table cells. Ie. whether all cells are an equal size or not. - - -@table: The GtkTable you wish to set the homogeneous properties of. -@homogeneous: Set to TRUE to ensure all table cells are the same size. Set -to FALSE if this is not your desired behaviour. - - - - -set or retrieve the number of rows in a table. - - - - -set or retrieve the number of columnsin a table. - - - - -set or retrieve the number of pixels of space between each row. - - - - -set or retrieve the number of pixels of space between each column. - - - - -whether each cell in the table should be the same size or not. - - diff --git a/docs/reference/gtk/tmpl/gtktearoffmenuitem.sgml b/docs/reference/gtk/tmpl/gtktearoffmenuitem.sgml deleted file mode 100644 index b155db59cc..0000000000 --- a/docs/reference/gtk/tmpl/gtktearoffmenuitem.sgml +++ /dev/null @@ -1,53 +0,0 @@ - -GtkTearoffMenuItem - - -a menu item used to tear off and reattach its menu. - - - -a #GtkTearoffMenuItem is a special #GtkMenuItem which is used to -tear off and reattach its menu. - - - -When its menu is shown normally, the #GtkTearoffMenuItem is drawn as a -dotted line indicating that the menu can be torn off. Activating it -causes its menu to be torn off and displayed in its own window -as a tearoff menu. - - - -When its menu is shown as a tearoff menu, the #GtkTearoffMenuItem is drawn -as a dotted line which has a left pointing arrow graphic indicating that -the tearoff menu can be reattached. Activating it will erase the tearoff -menu window. - - - - - - - -#GtkMenu -for further discussion of menus in GTK. - - - - - - - -The #GtkTearoffMenuItem-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkTearoffMenuItem. - - -@Returns: a new #GtkTearoffMenuItem. - - diff --git a/docs/reference/gtk/tmpl/gtktext.sgml b/docs/reference/gtk/tmpl/gtktext.sgml deleted file mode 100644 index 968a3e2864..0000000000 --- a/docs/reference/gtk/tmpl/gtktext.sgml +++ /dev/null @@ -1,239 +0,0 @@ - -GtkText - - -text widget which allows display and manipulation of arbitrary text - - - -A #GtkText widget allows one to display any given text and manipulate it -by deleting from one point to another, selecting a region, and various -other functions as outlined below. It is inherited from #GtkEditable. - - - - - - - - - -Most of the #GtkText-struct struct members should not be accessed directly. -Listed below are a few exceptions and how to use them. - - - - - - -GtkAdjustment *hadj; -Allows you to see the state of an attached horizontal #GtkScrollbar. -See #GtkAdjustment for more info. This allows easy access to the adjustments -of the #GtkText struct without having to keep track of ones that you initialize -at widget creation. - - - -GtkAdjustment *vadj; -Same as hadj except it involves the vertical #GtkScrollbar. - - - - - - - - - -Internal #GtkText data type. - - - - - - -Internal #GtkText data type. Should not be access directly. - - - -@property: -@offset: -@index: - - - -Creates a new #GtkText widget, initialized with the given pointers to -#GtkAdjustments. These pointers can be used to track the viewing position -of the #GtkText widget. Passing NULL to either or both of them will make -the #GtkText create it's own. You can set these later with the function -gtk_text_set_adjustment() - - -@hadj: horizontal adjustment. -@vadj: vertical adjustment. -@Returns: the new #GtkText widget. - - - - -Set whether the #GtkText widget can be edited by the user or not. This -still allows you the programmer to make changes with the various #GtkText -functions. - - -@text: the #GtkText widget -@editable: %TRUE makes it editable, %FALSE makes it immutable by the user - - - - -Sets whether the #GtkText widget wraps words down to the next line if it -can't be completed on the current line. - - -@text: the #GtkText widget -@word_wrap: %TRUE makes it word wrap, %FALSE disables word wrapping - - - - -Controls how #GtkText handles long lines of continuous text. If line wrap -is on, the line is broken when it reaches the extent of the #GtkText widget -viewing area and the rest is displayed on the next line. If it is not set, -the line continues regardless size of current viewing area. Similar to word -wrap but it disregards word boundaries. - - -@text: the #GtkText widget -@line_wrap: %TRUE turns line wrap on, %FALSE turns it off - - - - -Allows you to set #GtkAdjustment pointers which in turn allows you to -keep track of the viewing position of the #GtkText widget. - - -@text: the #GtkText widget -@hadj: the horizontal adjustment -@vadj: the vertical adjustment - - - - -Sets the cursor at the given point. In this case a point constitutes -the number of characters from the extreme upper left corner of the #GtkText -widget. - - -@text: the #GtkText widget -@index: the number of characters from the upper left corner - - - - -Gets the current position of the cursor as the number of characters from -the upper left corner of the #GtkText widget. - - -@text: the #GtkText widget -@Returns: the number of characters from the upper left corner - - - - -Returns the length of the all the text contained within the #GtkText widget; -disregards current point position. - - -@text: the #GtkText widget -@Returns: the length of the text - - - - -Freezes the #GtkText widget which disallows redrawing of the widget until -it is thawed. This is useful if a large number of changes are going to -made to the text within the widget, reducing the amount of flicker seen -by the user. - - -@text: the #GtkText widget - - - - -Allows the #GtkText widget to be redrawn again by GTK. - - -@text: the #GtkText widget - - - - -Inserts given text into the #GtkText widget with the given properties as -outlined below. - - -@text: the #GtkText widget -@font: the #GdkFont to use -@fore: the foreground color to insert with -@back: the background color to insert with -@chars: the actual text to be inserted -@length: the length of the text to be inserted, passing -1 makes it insert -all the text. - - - - -Deletes from the current point position backward the given number of -characters. - - -@text: the #GtkText widget -@nchars: the number of characters to delete -@Returns: %TRUE if the operation was successful, otherwise returns %FALSE - - - - -Deletes from the current point position forward the given number of -characters. - - -@text: the #GtkText widget -@nchars: the number of characters to delete -@Returns: %TRUE if the operation was successful, otherwise returns %FALSE - - - - -Returns the character at the given index within the #GtkText widget. - - -@t: the #GtkText widget -@index: the number of characters from the upper left corner - - - - -Used by the #GtkText widget to keep track of the size of it's horizontal -text. - - - - -Used by the #GtkText widget to keep track of the size of it's vertical -text. - - - - -Boolean value indicating whether line wrap is enabled or not. - - - - -Boolean value indicated whether word wrap is enabled or not. - - diff --git a/docs/reference/gtk/tmpl/gtkthemes.sgml b/docs/reference/gtk/tmpl/gtkthemes.sgml deleted file mode 100644 index 7dd4163a76..0000000000 --- a/docs/reference/gtk/tmpl/gtkthemes.sgml +++ /dev/null @@ -1,73 +0,0 @@ - -Themes - - - - - - - - - - - - - - - - - - - -@parse_rc_style: -@merge_rc_style: -@rc_style_to_style: -@duplicate_style: -@realize_style: -@unrealize_style: -@destroy_rc_style: -@destroy_style: -@set_background: - - - - - - -@name: -@Returns: - - - - - - - -@engine: - - - - - - - -@engine: - - - - - - - -@argc: -@argv: - - - - - - - -@error_code: - - diff --git a/docs/reference/gtk/tmpl/gtktipsquery.sgml b/docs/reference/gtk/tmpl/gtktipsquery.sgml deleted file mode 100644 index 7f7949a1db..0000000000 --- a/docs/reference/gtk/tmpl/gtktipsquery.sgml +++ /dev/null @@ -1,160 +0,0 @@ - -GtkTipsQuery - - -displays help about widgets in the user interface. - - - -The #GtkTipsQuery widget is a subclass of #GtkLabel which is used to display -help about widgets in a user interface. - - -A query is started with a call to gtk_tips_query_start_query(), usually -when some kind of 'Help' button is pressed. The #GtkTipsQuery then grabs all -events, stopping the user interface from functioning normally. -Then as the user moves the mouse over the widgets, the #GtkTipsQuery displays -each widget's tooltip text. - - -By connecting to the "widget-entered" or "widget-selected" signals, it is -possible to customize the #GtkTipsQuery to perform other actions when widgets -are entered or selected. For example, a help browser could be opened with -documentation on the widget selected. - - -At some point a call to gtk_tips_query_stop_query() must be made in order to -stop the query and return the interface to its normal state. -The gtk_tips_query_set_caller() function can be used to specify a widget -which the user can select to stop the query (often the same button used to -start the query). - - - - - - -#GtkTooltips -the object which handles tooltips. - - - - - - -The #GtkTipsQuery-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkTipsQuery. - - -@Returns: a new #GtkTipsQuery. - - - - -Starts a query. -The #GtkTipsQuery widget will take control of the mouse and as the mouse -moves it will display the tooltip of the widget beneath the mouse. - - -@tips_query: a #GtkTipsQuery. - - - - -Stops a query. - - -@tips_query: a #GtkTipsQuery. - - - - -Sets the widget which initiates the query, usually a button. -If the @caller is selected while the query is running, the query is -automatically stopped. - - -@tips_query: a #GtkTipsQuery. -@caller: the widget which initiates the query. - - - - -Sets the text to display when the query is not in effect, -and the text to display when the query is in effect but the widget beneath -the pointer has no tooltip. - - -@tips_query: a #GtkTipsQuery. -@label_inactive: the text to display when the query is not running. -@label_no_tip: the text to display when the query is running but the widget -beneath the pointer has no tooltip. - - - - -Emitted when the query is started. - - -@tipsquery: the object which received the signal. - - - -Emitted when the query is stopped. - - -@tipsquery: the object which received the signal. - - - -Emitted when a widget is entered by the pointer while the query is in effect. - - -@tipsquery: the object which received the signal. -@widget: the widget that was entered by the pointer. -@tip_text: the widget's tooltip. -@tip_private: the widget's private tooltip (see gtk_tooltips_set_tip()). - - - -Emitted when a widget is selected during a query. - - -@tipsquery: the object which received the signal. -@widget: the widget that was selected. -@tip_text: the widget's tooltip. -@tip_private: the widget's private tooltip (see gtk_tooltips_set_tip()). -@event: the button press or button release event. -@Returns: TRUE if the query should be stopped. - - - -TRUE if the widget-entered and widget-selected signals are emitted even when -the widget has no tooltip set. - - - - -The widget that starts the tips query, usually a button. -If it is selected while the query is in effect the query is automatically -stopped. - - - - -The text to display in the #GtkTipsQuery widget when the query is not in -effect. - - - - -The text to display in the #GtkTipsQuery widget when the query is running -and the widget that the pointer is over has no tooltip. - - diff --git a/docs/reference/gtk/tmpl/gtktogglebutton.sgml b/docs/reference/gtk/tmpl/gtktogglebutton.sgml deleted file mode 100644 index 83dd4acbb1..0000000000 --- a/docs/reference/gtk/tmpl/gtktogglebutton.sgml +++ /dev/null @@ -1,162 +0,0 @@ - -GtkToggleButton - - -create buttons which retain their state. - - - -A #GtkToggleButton is a #GtkButton which will remain 'pressed-in' when -clicked. Clicking again will cause the toggle button to return to it's -normal state. - - -A toggle button is created by calling either gtk_toggle_button_new() or -gtk_toggle_button_new_with_label(). If using the former, it is advisable to -pack a widget, (such as a #GtkLabel and/or a #GtkPixmap), into the toggle -button's container. (See #GtkButton for more information). - - -The state of a #GtkToggleButton can be set specifically using -gtk_toggle_button_set_active(), and retrieved using -gtk_toggle_button_get_active(). - - -To simply switch the state of a toggle button, use gtk_toggle_button_toggled. - - -Creating two #GtkToggleButton widgets. - - -void make_toggles(void) { - GtkWidget *dialog, *toggle1, *toggle2; - - dialog = gtk_dialog_new(); - toggle1 = gtk_toggle_button_new_with_label("Hi, i'm a toggle button."); - - /* Makes this toggle button invisible */ - gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle1), TRUE); - - gtk_signal_connect (GTK_OBJECT (toggle1), "toggled", - GTK_SIGNAL_FUNC (output_state), NULL); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->action_area), - toggle1, FALSE, FALSE, 2); - - toggle2 = gtk_toggle_button_new_with_label("Hi, i'm another toggle button."); - gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle2), FALSE); - gtk_signal_connect (GTK_OBJECT (toggle2), "toggled", - GTK_SIGNAL_FUNC (output_state), NULL); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->action_area), - toggle2, FALSE, FALSE, 2); - - gtk_widget_show_all (dialog); -} - - - - - - - - -#GtkButton -a more general button. - - -#GtkCheckButton -another way of presenting a toggle option. - - -#GtkCheckMenuItem -a #GtkToggleButton as a menu item. - - - - - - -The #GtkToggleButton struct contains private data only, and should be manipulated using the functions below. - - - - - -Creates a new toggle button. A widget should be packed into the button, as in gtk_button_new(). - - -@Returns: a new toggle button. - - - - -Creates a new toggle button with a text label. - - -@label: a string containing the message to be placed in the toggle button. -@Returns: a new toggle button. - - - - -Determines whether or not the toggle button is drawn on screen. The default mode is FALSE, which results in the button being displayed. To make the button invisible, set draw_indicator to TRUE. - - -@toggle_button: a #GtkToggleButton. -@draw_indicator: TRUE or FALSE. - - - - -This is a deprecated macro, and is only maintained for compatability reasons. - - - - - - -Changes the state of the toggle button. - - -@toggle_button: a #GtkToggleButton. - - - - -Queries a #GtkToggleButton and returns it's current state. Returns TRUE if -the toggle button is pressed in and FALSE if it is raised. - - -@toggle_button: a #GtkToggleButton. -@Returns: a #gboolean value. - - - - -Sets the status of the toggle button. Set to TRUE if you want the -GtkToggleButton to be 'pressed in', and FALSE to raise it. -This action causes the toggled signal to be emitted. - - -@toggle_button: a #GtkToggleButton. -@is_active: TRUE or FALSE. - - - - -Should be connected if you wish to perform an action whenever the -#GtkToggleButton's state is changed. - - -@togglebutton: the object which received the signal. - - - -Sets whether the toggle button should be pressed in or not. - - - - -A value of TRUE causes the toggle button to be invisible. FALSE displays it -again. - - diff --git a/docs/reference/gtk/tmpl/gtktoolbar.sgml b/docs/reference/gtk/tmpl/gtktoolbar.sgml deleted file mode 100644 index 3ed9166ad8..0000000000 --- a/docs/reference/gtk/tmpl/gtktoolbar.sgml +++ /dev/null @@ -1,321 +0,0 @@ - -GtkToolbar - - -create bars of buttons and other widgets. - - - -A toolbar is created with a call to gtk_toolbar_new(). - - -Buttons with text and/or images are added with gtk_toolbar_append_item(), gtk_toolbar_prepend_item(), and gtk_toolbar_insert_item(). - - -Any of #GtkToggleButton, #GtkRadioButton, or an arbitrary widget can be added to the toolbar with gtk_toolbar_append_element(), gtk_toolbar_prepend_element(), and gtk_toolbar_insert_element(). - - -Widgets can be visibily grouped by adding gaps between widgets using gtk_toolbar_append_space(), gtk_toolbar_prepend_space, and gtk_toolbar_insert_space(). - - - - - - -#GtkToolTips -Change the properties of a #GtkToolbar's #GtkTooltips. - - -#GtkTipsQuery -Make use of the private tips of toolbar elements. - - - - - - -num_children is an integer specifying how many toolbar items the #GtkToolbar contains. children is a #GList of the child widgets of the toolbar. - - -orientation - - - - - -is used to set the type of new elements that are added to a #GtkToolbar. - - -SPACE is just a space in the style of the toolbar's GtkToolbarSpaceStyle. BUTTON denotes a #GtkButton. TOGGLEBUTTON denotes a #GtkToggleButton, RADIOBUTTON denotes a #GtkRadioButton, and WIDGET denotes a standard #GtkWidget. - - -@GTK_TOOLBAR_CHILD_SPACE: -@GTK_TOOLBAR_CHILD_BUTTON: -@GTK_TOOLBAR_CHILD_TOGGLEBUTTON: -@GTK_TOOLBAR_CHILD_RADIOBUTTON: -@GTK_TOOLBAR_CHILD_WIDGET: - - - - - - -@GTK_TOOLBAR_SPACE_EMPTY: -@GTK_TOOLBAR_SPACE_LINE: - - - - - - -@type: -@widget: -@icon: -@label: - - - -creates a new toolbar. - - -@orientation: a #GtkOrientation. It determines whether the toolbar appears horizontally or vertically. -@style: a #GtkToolbarStyle. It determines if the toolbar will contain buttons with just labels, just images, or both. -@Returns: the newly created toolbar. - - - - -adds a new button to the beginning (left or top edges) of the given toolbar. - - -@toolbar: a #GtkToolbar. -@text: give your toolbar button a label. -@tooltip_text: a string that appears when the user holds the mouse over this item. -@tooltip_private_text: use with #GtkTipsQuery. -@icon: a #GtkWidget that should be used as the button's icon. -@callback: the function to be executed when the button is pressed. -@user_data: a pointer to any data you wish to be passed to the callback. -@Returns: the new toolbar item as a #GtkWidget. - - - - -adds a new button to the beginning of the given toolbar. - - -@toolbar: a #GtkToolbar. -@text: give your toolbar button a label. -@tooltip_text: a string that appears when the user holds the mouse over this item. -@tooltip_private_text: use with #GtkTipsQuery. -@icon: a #GtkWidget that should be used as the button's icon. -@callback: the function to be executed when the button is pressed. -@user_data: a pointer to any data you wish to be passed to the callback. -@Returns: the new toolbar item as a #GtkWidget. - - - - -inserts a new item into the toolbar. You must specify the position in the toolbar where it will be inserted. - - -@toolbar: a #GtkToolbar. -@text: give your toolbar button a label. -@tooltip_text: a string that appears when the user holds the mouse over this item. -@tooltip_private_text: use with #GtkTipsQuery. -@icon: a #GtkWidget that should be used as the button's icon. -@callback: the function to be executed when the button is pressed. -@user_data: a pointer to any data you wish to be passed to the callback. -@position: the number of widgets to insert this item after. -@Returns: the new toolbar item as a #GtkWidget. - - - - -adds a new space to the end of the toolbar. - - -@toolbar: a #GtkToolbar. - - - - -adds a new space to the beginning of the toolbar. - - -@toolbar: a #GtkToolbar. - - - - -inserts a new space in the toolbar at the specified position. - - -@toolbar: a #GtkToolbar -@position: the number of widgets after which a space should be inserted. - - - - -adds a new element to the end of a toolbar. - - -@toolbar: a #GtkToolbar. -@type: a value of type #GtkToolbarChildType that determines what @widget will be. -@widget: a #GtkWidget to add to the toolbar. (FIXME: double check this). -@text: the element's label. -@tooltip_text: the element's tooltip. -@tooltip_private_text: used for context-sensitive help about this toolbar element. -@icon: a #GtkWidget that provides pictorial representation of the element's function. -@callback: the function to be executed when the button is pressed. -@user_data: any data you wish to pass to the callback. -@Returns: the new toolbar element as a #GtkWidget. - - - - -adds a new element to the beginning of a toolbar. - - -@toolbar: a #GtkToolbar. -@type: a value of type #GtkToolbarChildType that determines what @widget will be. -@widget: a #GtkWidget to add to the toolbar. (FIXME: double check this). -@text: the element's label. -@tooltip_text: the element's tooltip. -@tooltip_private_text: used for context-sensitive help about this toolbar element. -@icon: a #GtkWidget that provides pictorial representation of the element's function. -@callback: the function to be executed when the button is pressed. -@user_data: any data you wish to pass to the callback. -@Returns: the new toolbar element as a #GtkWidget. - - - - - - - -@toolbar: a #GtkToolbar. -@type: a value of type #GtkToolbarChildType that determines what @widget will be. -@widget: a #GtkWidget to add to the toolbar. (FIXME: double check this). -@text: the element's label. -@tooltip_text: the element's tooltip. -@tooltip_private_text: used for context-sensitive help about this toolbar element. -@icon: a #GtkWidget that provides pictorial representation of the element's function. -@callback: the function to be executed when the button is pressed. -@user_data: any data you wish to pass to the callback. -@position: the number of widgets to insert this element after. -@Returns: the new toolbar element as a #GtkWidget. - - - - - - - -@toolbar: -@widget: -@tooltip_text: -@tooltip_private_text: - - - - - - - -@toolbar: -@widget: -@tooltip_text: -@tooltip_private_text: - - - - - - - -@toolbar: -@widget: -@tooltip_text: -@tooltip_private_text: -@position: - - - - -sets whether a toolbar should appear horizontally or vertically. - - -@toolbar: a #GtkToolbar. -@orientation: a new #GtkOrientation. - - - - -alters the view of @toolbar to display either icons only, text only, or both. - - -@toolbar: a #GtkToolbar. -@style: the new style for @toolbar. - - - - -should be used to set the number of pixels each item of space takes up in a toolbar. - - -@toolbar: a #GtkToolbar. -@space_size: the new number of pixels that spaces should consume. - - - - -sets whether a 'space' in the toolbar appears as a line or just plain empty space. - - -@toolbar: a #GtkToolbar. -@space_style: the new style for the toolbar's spaces. - - - - -sets if the tooltips of a toolbar should be active or not. - - -@toolbar: a #GtkToolbar. -@enable: set to 0 to disable the tooltips, or 1 to enable them. - - - - - - - -@toolbar: -@relief: - - - - - - - -@toolbar: -@Returns: - - - - -should be used if you wish to perform an action when the orientation of a toolbar is changed. - - -@toolbar: the object which received the signal. -@orientation: the new #GtkOrientation of the toolbar. - - - -should be used if you wish to perform an action when ever the style of a toolbar is adjusted. For example, this would be a useful signal to connect to if you want to display more items on the toolbar when it is in icon-only mode; each item takes less space on the bar. - - -@toolbar: the object which received the signal. -@style: the new #GtkToolbarStyle of @toolbar. - diff --git a/docs/reference/gtk/tmpl/gtktooltips.sgml b/docs/reference/gtk/tmpl/gtktooltips.sgml deleted file mode 100644 index b6349b70b5..0000000000 --- a/docs/reference/gtk/tmpl/gtktooltips.sgml +++ /dev/null @@ -1,176 +0,0 @@ - -GtkTooltips - - -Add tips to your widgets. - - - -Tooltips are the messages that appear next to a widget when the mouse pointer is held over it for a short amount of time. They are especially helpful for adding more verbose descriptions of things such as buttons in a toolbar. - - -An individual tooltip belongs to a group of tooltips. A group is created with a call to gtk_tooltips_new(). Every tooltip in the group can then be turned off with a call to gtk_tooltips_disable() and enabled with gtk_tooltips_enable(). - - -The length of time the user must keep the mouse over a widget before the tip is shown, can be altered with gtk_tooltips_set_delay(). This is set on a 'per group of tooltips' basis. - - -To assign a tip to a particular #GtkWidget, gtk_tooltips_set_tip() is used. - - - -Tooltips can only be set on widgets which have their own X window. -To check if a widget has its own window use 'GTK_WIDGET_NO_WINDOW (widget)'. -To add a tooltip to a widget that doesn't have its own window, place the -widget inside a #GtkEventBox and add a tooltip to that instead. - - - -The default appearance of all tooltips in a program is determined by the current gtk theme that the user has selected. - - -Information about the tooltip (if any) associated with an arbitrary widget can be retrieved using gtk_tooltips_data_get(). - - - -Adding tooltips to buttons. - - GtkWidget *load_button, *save_button, *hbox; - GtkTooltips *button_bar_tips; - - button_bar_tips = gtk_tooltips_new(); - - /* Create the buttons and pack them into a #GtkHBox */ - hbox = gtk_hbox_new(TRUE, 2); - - load_button = gtk_button_new_with_label("Load a file"); - gtk_box_pack_start(GTK_BOX (hbox), load_button, TRUE, TRUE, 2); - gtk_widget_show(load_button); - - save_button = gtk_button_new_with_label("Save a file"); - gtk_box_pack_start(GTK_BOX (hbox), save_button, TRUE, TRUE, 2); - gtk_widget_show(save_button); - gtk_widget_show(hbox); - - /* Add the tips */ - gtk_tooltips_set_tip(GTK_TOOLTIPS (button_bar_tips), load_button, - "Load a new document into this window", - "Requests the filename of a document. - This will then be loaded into the current - window, replacing the contents of whatever - is already loaded."); - gtk_tooltips_set_tip(GTK_TOOLTIPS (button_bar_tips), save_button, - "Saves the current document to a file", - "If you have saved the document previously, - then the new version will be saved over the - old one. Otherwise, you will be prompted for - a filename."); - - - - - - - -#GtkToolbar -Create groups of widgets with their own tooltips. - - -#GtkTipsQuery -Query tooltips to create context-sensitive help. - - - - - -Holds information about a group of tooltips. Fields should be changed using the functions provided, rather than directly accessing the struct's members. - - - - - -tooltips is the #GtkTooltips group that this tooltip belongs to. widget is the #GtkWidget that this tooltip data is associated with. tip_text is a string containing the tooltip message itself. - -tip_private is a string that is not shown as the default tooltip. Instead, this message may be more informative and go towards forming a context-sensitive help system for your application. (FIXME: how to actually "switch on" private tips?) - - -@tooltips: -@widget: -@tip_text: -@tip_private: -@font: -@width: -@row: - - - -Creates an empty group of tooltips. This function initialises a #GtkTooltips structure. Without at least one such structure, you can not add tips to your application. - - -@Returns: a new #GtkTooltips group for you to use. - - - - -Allows the user to see your tooltips as they navigate your application. - - -@tooltips: a #GtkTooltips. - - - - -Causes all tooltips in @tooltips to become inactive. Any widgets that have tips associated with that group will no longer display their tips until they are enabled again with gtk_tooltips_enable(). - - -@tooltips: a #GtkTooltips. - - - - -Sets the time between the user moving the mouse over a widget and the widget's tooltip appearing. - - -@tooltips: a #GtkTooltips. -@delay: an integer value representing seconds (FIXME: double-check this). - - - - -Adds a tooltip containing the message @tip_text to the specified #GtkWidget. - - -@tooltips: a #GtkTooltips. -@widget: the #GtkWidget you wish to associate the tip with. -@tip_text: a string containing the tip itself. -@tip_private: a string of any further information that may be useful if the user gets stuck. - - - - -This function is unimplemented because tooltip colors are instead -determined by the theme. - - -@tooltips: a #GtkTooltip -@background: a #GdkColor that your tooltip text will be shown in. -@foreground: a #GdkColor that your tooltip backgrounds will be shown in. - - - - -Retrieves any #GtkTooltipsData previously associated with the given widget. - - -@widget: a #GtkWidget. -@Returns: a #GtkTooltipsData struct, or NULL if the widget has no tooltip. - - - - -Soon as I play with this, I'll report what it does. - - -@tooltips: - - diff --git a/docs/reference/gtk/tmpl/gtktree.sgml b/docs/reference/gtk/tmpl/gtktree.sgml deleted file mode 100644 index b42794aec5..0000000000 --- a/docs/reference/gtk/tmpl/gtktree.sgml +++ /dev/null @@ -1,296 +0,0 @@ - -GtkTree - - -A treelist widget. - - - -The #GtkTree widget is a container that shows users a list of items, in a tree format complete with branches and leafnodes. Branches can be expanded to show their child items, or collapsed to hide them. - - - - -#GtkTreeList for the items to put into a #GtkTree. - - -#GtkScrolledWindow for details on how to scroll around a #GtkTree. - - - - - -struct _GtkTree -{ - GtkContainer container; - GList *children; - GtkTree* root_tree; /* owner of selection list */ - GtkWidget* tree_owner; - GList *selection; - guint level; - guint indent_value; - guint current_indent; - guint selection_mode : 2; - guint view_mode : 1; - guint view_line : 1; -}; - - - - - - -A macro that returns a boolean value which indicates if @obj is a root tree or not. - - -@obj: A pointer to the #GtkTree. @obj will accept any pointer, but if the pointer does not point to a #GtkTree, the results are undefined. - - - - -A macro that returns the root tree of @obj. - - -If @obj is already a root tree, @obj is cast to #GtkTree and returned. - - -@obj: A pointer to the #GtkTree. @obj will accept any pointer, but if the pointer does not point to a #GtkTree, the results are undefined. - - - - -A macro that returns a GList that contains the selection of the root tree of @obj. - - -@obj: A pointer to the #GtkTree. @obj will accept any pointer, but it the pointer does not point to a #GtkTree, the results are undefined. - - - - - - - -@GTK_TREE_VIEW_LINE: -@GTK_TREE_VIEW_ITEM: - - - -Creates a new #GtkTree. - - -@Returns: A pointer to the newly allocated widget. - - - - -Adds the #GtkTreeItem in @tree_item to the end of the items in @tree. - - -@tree: A pointer to a #GtkTree. -@tree_item: A pointer to the #GtkWidget that is to be appended to the tree. - - - - -Adds the #GtkTreeItem in @tree_item to the start of the items in @tree. - - -@tree: A pointer to a #GtkTree. -@tree_item: A pointer to the #GtkWidget that is to be prepended to the tree. - - - - -Adds the #GtkTreeItem in @tree_item to the list of items in @tree at the position indicated by @position. - - -@tree: A pointer to a #GtkTree. -@tree_item: A pointer to the #GtkWidget that is to be added to the tree. -@position: A #gint that indicates the position in the tree, that the tree_item is to be added at. - - - - -Removes a list of items from the #GtkTree in @tree. - - -If only one item is to be removed from the #GtkTree, gtk_container_remove() can be used instead. - - -Removing an item from a #GtkTree dereferences the item, and thus usually destroys the item and any subtrees it may contain. If the item is not to be destroyed, use gtk_object_ref() before removing it. - - -@tree: A pointer to a #GtkTree. -@items: A pointer to a #GList that contains the items to be removed. - - - - -Removes the items at positions between @start and @end from the #GtkTree @tree. - - -Removing an item from a #GtkTree dereferences the item, and thus usually destroys the item and any subtrees it may contain. If the item is not to be destroyed, use gtk_object_ref() before removing it. - - -@tree: A pointer to a #GtkTree. -@start: A gint. -@end: A gint. - - - - -Emits the #select_item signal for the child at position @item, and thus selects it (unless it is unselected in a signal handler). - - -@tree: A pointer to a #GtkTree. -@item: A gint. - - - - -Emits the #unselect_item for the child at position @item, and thus unselects it. - - -@tree: A pointer to a #GtkTree. -@item: A gint. - - - - -Emits the #select_item signal for the child @tree_item, and thus selects it (unless it is unselected in a signal handler). - - -@tree: A pointer to a #GtkTree. -@tree_item: A pointer to the #GtkWidget that is to be selected. - - - - -Emits the #unselect_item signal for the child @tree_item, and thus unselects it. - - -@tree: A pointer to a #GtkTree. -@tree_item: A pointer to the #GtkWidget that is to be selected. - - - - -Returns the position of @child in the #GtkTree @tree. - - -If @child is not a child of @tree, then -1 is returned. - - -@tree: A pointer to a #GtkTree. -@child: A pointer to a #GtkWidget. -@Returns: A gint. - - - - -Sets the selection mode for the #GtkTree @tree. - - -@mode can be one of - - - - -%GTK_SELECTION_SINGLE for when only one item can be selected at a time. - - - - -%GTK_SELECTION_BROWSE for when one item must be selected. - - - - -%GTK_SELECTION_MULTIPLE for when many items can be selected at once. - - - - -%GTK_SELECTION_EXTENDED Reserved for later use. - - - - -The selection mode is only defined for a root tree, as the root tree "owns" the selection. - - -The default mode is %GTK_SELECTION_SINGLE. - - -@tree: A pointer to a #GtkTree. -@mode: A #GtkSelectionMode. - - - - -Sets the 'viewmode' for the #GtkTree in @tree. The 'viewmode' defines how the tree looks when an item is selected. - - -@mode can be one of: - - - - -%GTK_TREE_VIEW_LINE : When an item is selected the entire #GtkTreeItem is highlighted. - - - - -%GTK_TREE_VIEW_ITEM : When an item is selected only the selected item's child widget is highlighted. - - - - -The default mode is %GTK_TREE_VIEW_LINE. - - -@tree: A pointer to a #GtkTree. -@mode: A #GtkTreeViewMode. - - - - -Sets whether or not the connecting lines between branches and children are drawn. - - -@tree: A pointer to a #GtkTree. -@flag: A guint, indicating %TRUE, or %FALSE. - - - - -Removes the item @child from the #GtkTree @tree. - - -@tree: A pointer to a #GtkTree. -@child: A pointer to the #GtkWidget that is to be removed from the tree. - - - - -This signal is emitted by the root tree whenever the selection changes. - - -@tree: the object which received the signal. - - - -This signal is emitted by @tree whenever @widget is about to be selected. - - -@tree: the object which received the signal. -@widget: The child that is about to be selected. - - - -This signal is emitted by @tree whenever @widget is about to be unselected. - - -@tree: the object which received the signal. -@widget: The child that is about to be unselected. - diff --git a/docs/reference/gtk/tmpl/gtktreeitem.sgml b/docs/reference/gtk/tmpl/gtktreeitem.sgml deleted file mode 100644 index 8c39ed77fa..0000000000 --- a/docs/reference/gtk/tmpl/gtktreeitem.sgml +++ /dev/null @@ -1,110 +0,0 @@ - -GtkTreeItem - - - - - - - - - - - - - - - - - - - - - - - - - -@obj: - - - - - - - -@Returns: - - - - - - - -@label: -@Returns: - - - - - - - -@tree_item: -@subtree: - - - - - - - -@tree_item: - - - - - - - -@tree_item: - - - - - - - -@tree_item: - - - - - - - -@tree_item: - - - - - - - -@tree_item: - - - - - - - -@treeitem: the object which received the signal. - - - - - - -@treeitem: the object which received the signal. - diff --git a/docs/reference/gtk/tmpl/gtktypeutils.sgml b/docs/reference/gtk/tmpl/gtktypeutils.sgml deleted file mode 100644 index 792223a84f..0000000000 --- a/docs/reference/gtk/tmpl/gtktypeutils.sgml +++ /dev/null @@ -1,869 +0,0 @@ - -Types - - -Handle run-time type creation. - - - -Gtk's type system is extensible. Because of that, types have to be -managed at runtime. - - - - - - - - - -@GtkType is unique integer identifying the type. The guts of the -information about the type is held in a private struct named -GtkTypeNode. - - - - - -@GtkFundamentalType is an enumerated type which lists all the possible -fundamental types (e.g. char, uchar, int, long, float, etc). - - -@GTK_TYPE_INVALID: -@GTK_TYPE_NONE: -@GTK_TYPE_CHAR: -@GTK_TYPE_UCHAR: -@GTK_TYPE_BOOL: -@GTK_TYPE_INT: -@GTK_TYPE_UINT: -@GTK_TYPE_LONG: -@GTK_TYPE_ULONG: -@GTK_TYPE_FLOAT: -@GTK_TYPE_DOUBLE: -@GTK_TYPE_STRING: -@GTK_TYPE_ENUM: -@GTK_TYPE_FLAGS: -@GTK_TYPE_BOXED: -@GTK_TYPE_POINTER: -@GTK_TYPE_SIGNAL: -@GTK_TYPE_ARGS: -@GTK_TYPE_CALLBACK: -@GTK_TYPE_C_CALLBACK: -@GTK_TYPE_FOREIGN: -@GTK_TYPE_OBJECT: - - - -No idea. - - - - - - -The first "flat" (no struct) enumerated type value. - - - - - - -The last "flat" (no struct) enumerated type value. - - - - - - -The first structured enumerated type value. - - - - - - -The last structured enumerated type value. - - - - - - -The highest-numbered structured or flat enumerated type value. - - - - - - -The highest maximum fundamental enumerated type value. - - - - - - -Use in place of offsetof(), which is used if it exists. - - -@struct: The type of the structure. -@field: The field within the structure. - - - - -Cast the object in @tobj into @cast. If GTK_NO_CHECK_CASTS is -defined, just cast it. Otherwise, check to see if we can cast @tobj -into a @cast. - - -@tobj: a pointer to a GtkObject. -@cast_type: a Gtk type. -@cast: a C type - - - - -Cast the object in @tobj into @cast. If GTK_NO_CHECK_CASTS is -defined, just cast it. Otherwise, check to see if we can cast @tobj -into a @cast. - - -@tclass: a pointer to a GtkClassInitFunc -@cast_type: a Gtk type. -@cast: a C type - - - - -Determines whether @type_object is a type of @otype. - - -@type_object: A GtkTypeObject object. -@otype: - - - - -Determines whether @type_class is a type of @otype. - - -@type_class: A GtkTypeClass class. -@otype: - - - - -Hide the name of gtk_identifier_get_type - - - - - - -Get the type of GtkIdentifier. - - -@Returns: GtkType -- the enumerated type of something. - - - - -Combine a fundemantal type and a sequence number to create a gtk type. - - -@parent_t: -@seqno: - - - - -Convert a gtk type into a fundamental type - - -@type: - - - - -Convert a gtk type into its sequence number - - -@type: - - - - -Just a macroized cast into a GtkSignalFunc - - -@f: - - - - -Define a function pointer. - - -@klass: a gpointer - - - - -Define a function pointer. - - -@object: a gpointer -@klass: a gpointer - - - - -Define a function pointer. - - - - - - -Define a function pointer. - - -@data: gpointer -@Returns: gint - - - - -Define a function pointer. - - -@data: gpointer - - - - -Define a function pointer. - - -@object: GtkObject* -@data: gpointer -@n_args: guint -@args: GtkArg* - - - - -Define a function pointer. - - -@object: GtkObject* -@func: GtkSignalFunc -@func_data: gpointer -@args: GtkArg* - - - - -Define a function pointer. Deprecated. - - -@object: -@arg: -@arg_id: - - - - -Define a function pointer. Deprecated. - - -@object: -@arg: -@arg_id: - - - - -A GtkTypeObject defines the minimum structure requirements -for type instances. Type instances returned from gtk_type_new () -and initialized through a GtkObjectInitFunc need to directly inherit -from this structure or at least copy its fields one by one. - - -@klass: - - - -This is a structure that we use to pass in typed values (and names). - - -@type: -@name: - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_CHAR - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_UCHAR - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_BOOL - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_INT - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_UINT - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_LONG - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_ULONG - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_FLOAT - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_DOUBLE - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_STRING - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_ENUM - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_FLAGS - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_BOXED - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_POINTER - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_OBJECT - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_SIGNAL - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_ARGS - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_CALLBACK - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_C_CALLBACK - - -@a: - - - - -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_C_FOREIGN - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_CHAR - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_UCHAR - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_BOOL - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_INT - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_UINT - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_LONG - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_ULONG - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_FLOAT - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_DOUBLE - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_STRING - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_ENUM - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_FLAGS - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_BOXED - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_POINTER - - -@a: - - - - -If the GtkArg contains a pointer to the value, this macro will be a pointer to a GTK_TYPE_OBJECT - - -@a: - - - - -Holds information about the type. @gtk_type_name returns the name. -@object_size is somehow set to the number of bytes that an instance of -the object will occupy. @class_init_func holds the type's -initialization function. @object_init_func holds the initialization -function for an instance of the object. @reserved_1 is used for -GtkEnumValue to hold the enumerated values. - - -@type_name: -@object_size: -@class_size: -@class_init_func: -@object_init_func: -@reserved_1: -@reserved_2: -@base_class_init_func: - - - -A structure used to return values from @gtk_type_query. - - -@type: -@type_name: -@object_size: -@class_size: - - - -The base structure for a Gtk Type. Every type inherits this as a base structure. - - - - - -A structure which contains a single enum value, and its name, and it's -nickname. - - -@value: -@value_name: -@value_nick: - - - -Initialize the data structures associated with gtk types. - - - - - - -Create a new, unique type. - - -@parent_type: if zero, a fundamental type is created. -@type_info: must not be null, and @type_info->type_name must also not be null. -@Returns: the new GtkType. - - - - -Set the mem_chunk size so it will hold @n_chunks of the objects of that @type. - - -@type: There must be an unlocked TypeNode associated with this type otherwise nothing happens. -@n_chunks: - - - - - - -@type: a GtkType -@Returns: a pointer to the name of a type, or NULL if it has none. - - - - -Get the internal representation of a type given its name. - - -@name: the name of a gtk type -@Returns: a GtkType - - - - - - - -@type: a GtkType -@Returns: the GtkType of the parent - - - - -Return a gpointer pointing to the class of @type or NULL if there was -any trouble identifying @type. Initialize the class if necessary. - - -@type: a GtkType -@Returns: gpointer to the klass. - - - - -Return the class of the parent. Initialize the class if necessary. -Return NULL if anything goes wrong. - - -@type: GtkType -@Returns: gpointer to the klass. - - - - -Return the pointer to the type's children's types. - - -@type: GtkType -@Returns: pointer to a GList - - - - -Create a new object of a given type, and return a gpointer to it. -Returns NULL if you give it an invalid type. It allocates the object -out of the type's memory chunk if there is a memory chunk. The object -has all the proper initializers called. - - -@type: GtkType -@Returns: gpointer to a GtkTypeObject - - - - -Given the type of an object and a pointer to it, the object is freed. - - -@type: GtkType -@mem: gpointer to the object - - - - -Print the types @type inherits from. - - -@type: GtkType - - - - -Given a @type, describe all of its children, and their children. Only -show the size if @show_size is true. - - -@type: GtkType -@show_size: gboolean - - - - -Look in the type hierarchy to see if @type has @is_a_type among its -ancestors. Do so with a simple lookup, not a loop. - - -@type: GtkType -@is_a_type: GtkType -@Returns: - - - - -Given a pointer to a GtkTypeObject @type_object, and a GtkType @cast_type, -make sure that it's okay to cast @type_object into a @cast_type. - - -@type_object: GtkTypeObject* -@cast_type: GtkType -@Returns: the same GtkTypeObject* as @type_object - - - - -Given a GtkTypeClass pointer @klass, and a GtkType @cast_type, make -sure that it's okay to cast something of that @klass into a @cast_type. - - -@klass: GtkTypeClass* -@cast_type: GtkType -@Returns: Always return @klass. - - - - -Register a new set of enum @values and give them the name in -@type_name. - - -@type_name: must not be null. -@values: GtkEnumValue* -@Returns: - - - - -Register a new set of flags @values and give them the name in -@type_name. - - -@type_name: must not be null. -@values: GtkFlagValue* -@Returns: - - - - -If @enum_type has values, then return a pointer to all of them. - - -@enum_type: GtkType -@Returns: GtkEnumValue* - - - - -If @flags_type has values, then return a pointer to all of them. - - -@flags_type: -@Returns: GtkFlagValue* - - - - -Return a pointer to one of @enum_type's GtkEnumValues's whose name (or nickname) matches @value_name. - - -@enum_type: GtkType -@value_name: -@Returns: GtkEnumValue* - - - - -Return a pointer to one of @flag_type's GtkFlagValue's whose name (or nickname) matches @value_name. - - -@flag_type: GtkType -@value_name: -@Returns: GtkFlagValue* - - - - -Set the varargs type for a fundamental type @foreign_type. - - -@foreign_type: Must be a GtkType with a sequence number of zero. Must not be a -fundamental type. -@varargs_type: Must be a GtkType which is either structured or flag, or NONE. - - - - -Get the varargs type associated with @foreign_type - - -@foreign_type: GtkType -@Returns: GtkType - - - - -Given a type, return various interesting parameters of the type. - - -@type: GtkType -@Returns: GtkTypeQuery* - - diff --git a/docs/reference/gtk/tmpl/gtkvbbox.sgml b/docs/reference/gtk/tmpl/gtkvbbox.sgml deleted file mode 100644 index 1468ae50cb..0000000000 --- a/docs/reference/gtk/tmpl/gtkvbbox.sgml +++ /dev/null @@ -1,96 +0,0 @@ - -GtkVButtonBox - - -a container for arranging buttons vertically. - - - -A button box should be used to provide a consistent layout of buttons -throughout your application. There is one default layout and a default -spacing value that are persistant across all #VButtonBox widgets. - - -The layout/spacing can then be altered by the programmer, or if desired, by -the user to alter the 'feel' of a program to a small degree. - - -A #VButtonBox is created with gtk_vbutton_box_new(). Buttons are packed into -a button box the same way as any other box, using gtk_box_pack_start() or -gtk_box_pack_end(). - - -The default spacing between buttons can be set with -gtk_vbutton_box_set_spacing_default() and queried with -gtk_vbutton_box_get_spacing_default(). - - -The arrangement and layout of the buttons can be changed using -gtk_vbutton_box_set_layout_default() and queried with -gtk_vbutton_box_get_layout_default(). - - - - - - -#GtkBox -Used to pack widgets into button boxes. - -#GtkButtonBox -Provides functions for controlling button boxes. - - -#GtkHButtonBox -Pack buttons horizontally. - - - - - - - - - -@button_box: the #GtkButtonBox that this class is derived from. - - - -Creates a new vertical button box. - - -@Returns: a new button box #GtkWidget. - - - - -Retrieves the current default spacing for vertical button boxes. This is the number of pixels -to be placed between the buttons when they are arranged. - - -@Returns: the default number of pixels between buttons. - - - - -Changes the default spacing that is placed between widgets in an -vertical button box. - - -@spacing: an integer value. - - - - -Retrieves the current layout used to arrange buttons in button box widgets. - - -@Returns: the current #GtkButtonBoxStyle. - - - - -Sets a new layout mode that will be used by all button boxes. - - -@layout: a new #GtkButtonBoxStyle. diff --git a/docs/reference/gtk/tmpl/gtkvbox.sgml b/docs/reference/gtk/tmpl/gtkvbox.sgml deleted file mode 100644 index 5883016710..0000000000 --- a/docs/reference/gtk/tmpl/gtkvbox.sgml +++ /dev/null @@ -1,46 +0,0 @@ - -GtkVBox - - -vertical container box - - - -GtkVBox is a container that organizes child widgets into a single column. - - - -Use the #GtkBox packing interface to determine the arrangement, -spacing, height, and alignment of GtkVBox children. - - - -All children are allocated the same width. - - - - - - - -#GtkHBox -a sister class that organizes widgets into a row. - - - - - - - - - - - -Creates a new GtkVBox. - - -@homogeneous: %TRUE if all children are to be given equal space allotments. -@spacing: the number of pixels to place by default between children. -@Returns: a new GtkVBox. - - diff --git a/docs/reference/gtk/tmpl/gtkviewport.sgml b/docs/reference/gtk/tmpl/gtkviewport.sgml deleted file mode 100644 index 6ce665c5fe..0000000000 --- a/docs/reference/gtk/tmpl/gtkviewport.sgml +++ /dev/null @@ -1,92 +0,0 @@ - -GtkViewport - - - - - - - - - - - - - - - - - - - - - - - - - -@hadjustment: -@vadjustment: -@Returns: - - - - - - - -@viewport: -@Returns: - - - - - - - -@viewport: -@Returns: - - - - - - - -@viewport: -@adjustment: - - - - - - - -@viewport: -@adjustment: - - - - - - - -@viewport: -@type: - - - - - - - - - - - - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkvpaned.sgml b/docs/reference/gtk/tmpl/gtkvpaned.sgml deleted file mode 100644 index edcff3251e..0000000000 --- a/docs/reference/gtk/tmpl/gtkvpaned.sgml +++ /dev/null @@ -1,32 +0,0 @@ - -GtkVPaned - - -A container with two panes arranged vertically. - - - -The VPaned widget is a container widget with two -children arranged vertically. The division between -the two panes is adjustable by the user by dragging -a handle. See #GtkPaned for details. - - - - - - - - - - - - - - -Create a new #GtkVPaned - - -@Returns: the new #GtkVPaned - - diff --git a/docs/reference/gtk/tmpl/gtkvruler.sgml b/docs/reference/gtk/tmpl/gtkvruler.sgml deleted file mode 100644 index aad5d12e25..0000000000 --- a/docs/reference/gtk/tmpl/gtkvruler.sgml +++ /dev/null @@ -1,36 +0,0 @@ - -GtkVRuler - - -A vertical ruler. - - - -The VRuler widget is a widget arranged vertically creating a ruler that is -utilized around other widgets such as a text widget. The ruler is used to show -the location of the mouse on the window and to show the size of the window in -specified units. The available units of measurement are GTK_PIXELS, GTK_INCHES -and GTK_CENTIMETERS. GTK_PIXELS is the default. -rulers. - - - - - - - - - -The #GtkVRuler struct contains private data and should be accessed -using the functions below. - - - - - -Creates a new vertical ruler - - -@Returns: the new GTKVRuler. - - diff --git a/docs/reference/gtk/tmpl/gtkvscale.sgml b/docs/reference/gtk/tmpl/gtkvscale.sgml deleted file mode 100644 index 81a6ffa294..0000000000 --- a/docs/reference/gtk/tmpl/gtkvscale.sgml +++ /dev/null @@ -1,44 +0,0 @@ - -GtkVScale - - -a vertical slider widget for selecting a value from a range. - - - -The #GtkVScale widget is used to allow the user to select a value using -a vertical slider. -A #GtkAdjustment is used to set the initial value, the lower -and upper bounds, and the step and page increments. - - -The position to show the current value, and the number of decimal places -shown can be set using the parent #GtkScale class's functions. - - - - - - - - - -The #GtkVScale-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkVScale. - - -@adjustment: the #GtkAdjustment which sets the range of the scale. -@Returns: a new #GtkVScale. - - - - -the #GtkAdjustment which sets the range of the scale. - - diff --git a/docs/reference/gtk/tmpl/gtkvscrollbar.sgml b/docs/reference/gtk/tmpl/gtkvscrollbar.sgml deleted file mode 100644 index 758fd43349..0000000000 --- a/docs/reference/gtk/tmpl/gtkvscrollbar.sgml +++ /dev/null @@ -1,40 +0,0 @@ - -GtkVScrollbar - - -A vertical scrollbar - - - -The VScrollbar widget is a widget arranged vertically creating a scroll bar. See -#GtkScrollbar for details on scrollbars. #GtkAdjustment pointers may be added to -handle the adjustment of the scrollbars or it may be left NULL in which case one -will be created you. See #GtkAdjustment for details. - - - - - - - - - -The #GtkVScrollbar struct contains private data and should be accessed -using the functions below. - - - - - -Creates a new vertical scrollbar. - - -@adjustment: -@Returns: the new GTKVScrollbar - - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkvseparator.sgml b/docs/reference/gtk/tmpl/gtkvseparator.sgml deleted file mode 100644 index dd4606d37e..0000000000 --- a/docs/reference/gtk/tmpl/gtkvseparator.sgml +++ /dev/null @@ -1,38 +0,0 @@ - -GtkVSeparator - - -a vertical separator. - - - -The #GtkVSeparator widget is a vertical separator, used to group the -widgets within a window. It displays a vertical line with a shadow to -make it appear sunken into the interface. - - - - - - -#GtkHSeparator -a horizontal separator. - - - - - - -The #GtkVSeparator-struct struct contains private data only, and -should be accessed using the functions below. - - - - - -Creates a new #GtkVSeparator. - - -@Returns: a new #GtkVSeparator. - - diff --git a/docs/reference/gtk/tmpl/gtkwidget.sgml b/docs/reference/gtk/tmpl/gtkwidget.sgml deleted file mode 100644 index 515a535e50..0000000000 --- a/docs/reference/gtk/tmpl/gtkwidget.sgml +++ /dev/null @@ -1,1711 +0,0 @@ - -GtkWidget - - - - - - - - - - - - - - - - - - - - - - - - - -@GTK_TOPLEVEL: -@GTK_NO_WINDOW: -@GTK_REALIZED: -@GTK_MAPPED: -@GTK_VISIBLE: -@GTK_SENSITIVE: -@GTK_PARENT_SENSITIVE: -@GTK_CAN_FOCUS: -@GTK_HAS_FOCUS: -@GTK_CAN_DEFAULT: -@GTK_HAS_DEFAULT: -@GTK_HAS_GRAB: -@GTK_RC_STYLE: -@GTK_COMPOSITE_CHILD: -@GTK_NO_REPARENT: -@GTK_APP_PAINTABLE: -@GTK_RECEIVES_DEFAULT: - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: - - - - - - - -@wid: -@flag: - - - - - - - -@wid: -@flag: - - - - - - - -@widget: -@data: - - - - - - - -@width: -@height: - - - - - - -@x: -@y: -@width: -@height: - - - - - - -@selection: -@target: -@type: -@format: -@data: -@length: - - - - - - -@x: -@y: -@width: -@height: - - - - - - -@offset_x: -@offset_y: -@shape_mask: - - - - - - -@type: -@first_arg_name: -@Varargs: -@Returns: - - - - - - - -@type: -@nargs: -@args: -@Returns: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: -@widget_pointer: - - - - - - - -@widget: -@arg: - - - - - - - -@widget: -@nargs: -@args: - - - - - - - -@widget: -@first_arg_name: -@Varargs: - - - - - - - -@widget: -@nargs: -@args: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: -@area: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: -@requisition: - - - - - - - -@widget: -@requisition: - - - - - - - -@widget: -@allocation: - - - - - - - -@widget: -@accel_signal: -@accel_group: -@accel_key: -@accel_mods: -@accel_flags: - - - - - - - -@widget: -@accel_group: -@accel_key: -@accel_mods: - - - - - - - -@widget: -@accel_signal: -@visible_only: - - - - - - - -@widget: -@accel_group: -@accel_key: -@accel_mods: -@Returns: - - - - - - - -@widget: -@event: -@Returns: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: -@new_parent: - - - - - - - -@widget: -@x: -@y: - - - - - - - -@widget: -@area: -@intersection: -@Returns: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: -@name: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: -@state: - - - - - - - -@widget: -@sensitive: - - - - - - - -@widget: -@parent: - - - - - - - -@widget: -@parent_window: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: -@x: -@y: - - - - - - - -@widget: -@width: -@height: - - - - - - - -@widget: -@events: - - - - - - - -@widget: -@events: - - - - - - - -@widget: -@mode: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: -@widget_type: -@Returns: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: -@colormap: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: -@visual: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: -@x: -@y: - - - - - - - -@widget: -@ancestor: -@Returns: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: -@style: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: - - - - - - - -@widget: - - - - - - - -@style: - - - - - - - -@cmap: - - - - - - - -@visual: - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@style: - - - - - - - -@colormap: - - - - - - - -@visual: - - - - - - - -@Returns: - - - - - - - -@Returns: - - - - - - - -@Returns: - - - - - - - -@widget: -@shape_mask: -@offset_x: -@offset_y: - - - - - - - -@widget: -@path_length: -@path: -@path_reversed: - - - - - - - -@widget: -@path_length: -@path: -@path_reversed: - - - - - - - -@widget: -@Returns: - - - - - - - -@widget: - - - - - - - -@widget: -@style: - - - - - - - - - - - - - - - - - - - - - -@widget: - - - - - - - -@widget: -@x: -@y: -@width: -@height: - - - - - - - -@widget: -@x: -@y: -@width: -@height: - - - - - - - -@widget: - - - - - - - -@widget: -@app_paintable: - - - - - - - -@widget: -@name: - - - - - - - -@widget: -@hadjustment: -@vadjustment: -@Returns: - - - - - - - -@widget: - - - - - - - -@widget: the object which received the signal. - - - - - - -@widget: the object which received the signal. - - - - - - -@widget: the object which received the signal. - - - - - - -@widget: the object which received the signal. - - - - - - -@widget: the object which received the signal. - - - - - - -@widget: the object which received the signal. - - - - - - -@widget: the object which received the signal. -@area: - - - - - - -@widget: the object which received the signal. - - - - - - -@widget: the object which received the signal. - - - - - - -@widget: the object which received the signal. -@requisition: - - - - - - -@widget: the object which received the signal. -@allocation: - - - - - - -@widget: the object which received the signal. -@state: - - - - - - -@widget: the object which received the signal. -@old_parent: - - - - - - -@widget: the object which received the signal. -@previous_style: - - - - - - -@widget: the object which received the signal. -@accel_signal_id: -@accel_group: -@accel_key: -@accel_mods: -@accel_flags: - - - - - - -@widget: the object which received the signal. -@accel_group: -@accel_key: -@accel_mods: - - - - - - -@widget: the object which received the signal. - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@data: -@info: -@time: - - - - - - -@widget: the object which received the signal. -@data: -@time: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@drag_context: - - - - - - -@widget: the object which received the signal. -@drag_context: - - - - - - -@widget: the object which received the signal. -@drag_context: - - - - - - -@widget: the object which received the signal. -@drag_context: -@time: - - - - - - -@widget: the object which received the signal. -@drag_context: -@x: -@y: -@time: -@Returns: - - - - - - -@widget: the object which received the signal. -@drag_context: -@x: -@y: -@time: -@Returns: - - - - - - -@widget: the object which received the signal. -@drag_context: -@data: -@info: -@time: - - - - - - -@widget: the object which received the signal. -@drag_context: -@x: -@y: -@data: -@info: -@time: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@event: -@Returns: - - - - - - -@widget: the object which received the signal. -@message: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/gtk/tmpl/gtkwindow.sgml b/docs/reference/gtk/tmpl/gtkwindow.sgml deleted file mode 100644 index 3ec1f78c3a..0000000000 --- a/docs/reference/gtk/tmpl/gtkwindow.sgml +++ /dev/null @@ -1,300 +0,0 @@ - -GtkWindow - - - - - - - - - - - - - - - - - - - - - - - - - -@type: -@Returns: - - - - - - - -@window: -@title: - - - - - - - -@window: -@wmclass_name: -@wmclass_class: - - - - - - - -@window: -@focus: - - - - - - - -@window: -@defaultw: - - - - -Changes how a toplevel window deals with its size request and user resize -attempts. There are really only two reasonable ways to call this function: - - - -gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE) -means that the window is user-resizable. - - - - -gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, TRUE) -means that the window's size is program-controlled, and should simply match -the current size request of the window's children. - - - -The first policy is the default, that is, by default windows are designed to -be resized by users. - - - -The basic ugly truth of this function is that it should be simply: - - void gtk_window_set_user_resizeable(GtkWidget* window, gboolean setting); - -So, pretend it is like that, and only use the two policies mentioned above. -GTK+ 1.4 may replace gtk_window_set_policy() with a nicer function like -gtk_window_set_user_resizeable(). - - - -If set to TRUE, the @allow_grow parameter allows the user to expand the window -beyond the size request of its child widgets. If @allow_grow is TRUE, be sure to -check that your child widgets work properly as the window is resized. - - - -A toplevel window will always change size to ensure its child widgets receive -their requested size. This means that if you add child widgets, the toplevel -window will expand to contain them. However, normally the toplevel will not -shrink to fit the size request of its children if it's too large; the -@auto_shrink parameter causes the window to shrink when child widgets have too -much space. @auto_shrink is normally used with the second of the two window -policies mentioned above. That is, set @auto_shrink to TRUE if you want the -window to have a fixed, always-optimal size determined by your program. - - - -Note that @auto_shrink doesn't do anything if @allow_shrink and @allow_grow are -both set to FALSE. - - - -Neither of the two suggested window policies set the @allow_shrink paramter to -TRUE. If @allow_shrink is TRUE, the user can shrink the window so that its -children do not receive their full size request; this is basically a bad thing, -because most widgets will look wrong if this happens. Furthermore GTK+ has a -tendency to re-expand the window if size is recalculated for any reason. The -upshot is that @allow_shrink should always be set to FALSE. - - - -Sometimes when you think you want to use @allow_shrink, the real problem is that -some specific child widget is requesting too much space, so the user can't -shrink the window sufficiently. Perhaps you are calling gtk_widget_set_usize() -on a child widget, and forcing its size request to be too large. Instead of -setting the child's usize, consider using gtk_window_set_default_size() so that -the child gets a larger allocation than it requests. - - -@window: the window -@allow_shrink: whether the user can shrink the window below its size request -@allow_grow: whether the user can grow the window larger than its size request -@auto_shrink: whether the window automatically snaps back to its size request if -it's larger - - - - - - - -@window: -@accel_group: - - - - - - - -@window: -@accel_group: - - - - - - - - - - - - - - -@window: -@Returns: - - - - - - - -@window: -@Returns: - - - - - - - -@window: -@modal: - - - - - - - -@window: -@xid: - - - - - - - -@window: -@xid: - - - - - - - -@window: -@width: -@height: - - - - - - - -@window: -@geometry_widget: -@geometry: -@geom_mask: - - - - - - - -@window: -@position: - - - - - - - -@window: -@parent: - - - - - - - -@window: the object which received the signal. -@widget: - - - -The type of the window. - - - - -The title of the window. - - - - -If the window shrinks automatically when widgets within it shrink. - - - - -If the window can be resized to a smaller size by the user. - - - - -If the window can be resized to a larger size by the user. - - - - -If the window is modal, i.e. it grabs all GTK+ events. - - - - -The position of the window. - - diff --git a/gdk-pixbuf/.cvsignore b/gdk-pixbuf/.cvsignore deleted file mode 100644 index e80ab794d8..0000000000 --- a/gdk-pixbuf/.cvsignore +++ /dev/null @@ -1,12 +0,0 @@ -Makefile.in -Makefile -.deps -.xvpics -.libs -*.la -*.lo -testpixbuf -testpixbuf-drawable -testpixbuf-scale -testanimation -gdk-pixbuf-features.h diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog deleted file mode 100644 index 16f08f6cf6..0000000000 --- a/gdk-pixbuf/ChangeLog +++ /dev/null @@ -1,1705 +0,0 @@ -2000-04-04 Ettore Perazzoli - - * gdk-pixbuf/gdk-pixbuf-animation.c - (gdk_pixbuf_animation_get_width): New accessor function. - (gdk_pixbuf_animation_get_height): New accessor function. - (gdk_pixbuf_animation_get_num_frames): New accessor function. - (gdk_pixbuf_animation_get_frames): New accessor function. - -2000-04-01 Federico Mena Quintero - - * gdk-pixbuf/gdk-pixbuf.c: Reverted Mark's change. The refcount - is private information, and the art_pixbuf will go away soon. - -2000-03-31 Mark Crichton - - * gdk-pixbuf/gdk-pixbuf.c: Added gdk_pixbuf_get_refcount - and gdk_pixbuf_get_artpixbuf accessor functions. - -2000-03-29 Federico Mena Quintero - - * gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_get_has_alpha): Return - gboolean instead of int. - -2000-03-29 Radek Doulik - - * gdk-pixbuf/gdk-pixbuf-animation.c - (gdk_pixbuf_animation_new_from_file): same as below - - * gdk-pixbuf/io-gif.c (gif_get_lzw): added update of width and - height in GdkPixbufAnimation - -2000-03-28 Radek Doulik - - * gdk-pixbuf/io-gif.c (gif_get_lzw): test also for - context->frame_done_func and context->anim_done_func to make - progressive animation loading work - - * gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done): - added priv->pixbuf = NULL as pixbuf is now in frame (and to make - gdk_pixbuf_loader_prepare happy) - (gdk_pixbuf_loader_frame_done): update animation bbox - - * gdk-pixbuf/gdk-pixbuf.h: added bbox size (width, height) to - _GdkPixbufAnimation - -2000-03-27 Radek Doulik - - * gdk-pixbuf/io-gif.c (gif_get_lzw): use frame_len and frame_width - instead of width and height - -2000-03-27 Owen Taylor - - * gdk-pixbuf/pixops/pixops.c: Fix problem with - precendence of >> and & which was keeping composite_color - from working with non-gray images. - -2000-03-08 Jonathan Blandford - - * gdk-pixbuf/io-gif.c (gdk_pixbuf__gif_image_load): free the context. - (gdk_pixbuf__gif_image_load_animation): free the context. - -2000-03-06 Arjan van de Ven - - * gdk-pixbuf/io-bmp.c: Fixed to pointer-bugs and a - mis-interpretation of the Microsoft documentation. Now - it can load .BMP files that are not generated by The Gimp - as well. - -2000-03-01 Mark Crichton - - * configure.in: Added BUILD_CANVAS_ITEM stuff to (finally) - fix the last auto* build bug (where we have libart, but no - gnome-libs) - - * gdk-pixbuf/Makefile.am: Same. - -2000-02-28 Matt Wilson - - * gdk-pixbuf/gdk-pixbuf-drawable.c: s/unsigned long/guint32/g, - s/unsigned short/guint16/g, s/unsigned char/guint8/g - -2000-02-26 Federico Mena Quintero - - * README: We don't require libgif/ungif nor libXpm. - - * NEWS: This was outdated, so updated it. - -2000-02-25 Federico Mena Quintero - - * gdk-pixbuf.m4: Use the correct name for - gdk-pixbuf/gdk-pixbuf.h. Thanks to Jacob Berkman for pointing - this out. - -2000-02-21 Federico Mena Quintero - - * configure.in (GDK_PIXBUF_MINOR): Bumped version number to 0.6.0. - - * doc/compiling.sgml: New appendix documenting the gdk-pixbuf - library's particular options to configure.in. - - * doc/gdk-pixbuf.sgml: Include compiling.sgml appendix via an - entity. - - * doc/Makefile.am (gdk-pixbuf.html): Added compiling.sgml. - - * gdk-pixbuf/io-ico.c (gdk_pixbuf__ico_image_load_increment): - Fixed typo in prototype name. - - * configure.in: Changed duplicated AC_MSG_CHECKING message to - something more meaningful; now it is "checking whether dynamic - modules work". - - * gdk-pixbuf/pixops/Makefile.am (noinst_PROGRAMS): Do not install - the timescale program. - - Integrated Miguel de Icaza's patch for optionally - creating a single static library with all the image format modules - in it. - -2000-02-20 Miguel de Icaza - - * gdk-pixbuf/io-xpm.c (gdk_pixbuf__xpm_image_load): Add prefix. - (gdk_pixbuf__xpm_image_load_xpm_data): Add prefix. - - * gdk-pixbuf/io-tiff.c (gdk_pixbuf__tiff_image_load_real): Add prefix. - (gdk_pixbuf__tiff_image_stop_load): Add prefix. - (gdk_pixbuf__tiff_image_load_increment): Add prefix. - (gdk_pixbuf__tiff_image_load): Add prefix. - (gdk_pixbuf__tiff_image_stop_load): Update invocation. - (gdk_pixbuf__tiff_image_begin_load): Add prefix. - - * gdk-pixbuf/io-ras.c (gdk_pixbuf__ras_image_load): Add prefix. - (gdk_pixbuf__ras_image_load): Updated invocation. - (gdk_pixbuf__ras_image_begin_load): Add prefix. - (gdk_pixbuf__ras_image_stop_load): Add prefix. - (gdk_pixbuf__ras_image_load_increment): Add prefix. - - * gdk-pixbuf/io-pnm.c (gdk_pixbuf__pnm_image_begin_load): Add prefix. - (gdk_pixbuf__pnm_image_stop_load): Add prefix. - (gdk_pixbuf__pnm_image_load_increment): Add prefix - (gdk_pixbuf__pnm_image_load): Add prefix. - - * gdk-pixbuf/io-jpeg.c (gdk_pixbuf__jpeg_image_load): Add prefix. - (gdk_pixbuf__jpeg_image_load_increment): Add prefix. - (gdk_pixbuf__jpeg_image_begin_load): Add prefix. - (gdk_pixbuf__jpeg_image_stop_load): Add prefix. - - * gdk-pixbuf/io-ico.c (gdk_pixbuf__ico_image_load): Add prefix. - (gdk_pixbuf__ico_image_load): update invocation. - (gdk_pixbuf__ico_image_load_increment): Add prefix. - (gdk_pixbuf__ico_image_load): update invocation. - (gdk_pixbuf__ico_image_begin_load): Add prefix. - (gdk_pixbuf__ico_image_load): update invocation. - (gdk_pixbuf__ico_image_stop_load): Add prefix. - - * gdk-pixbuf/io-gif.c (gdk_pixbuf__gif_image_load_animation): Add prefix. - (gdk_pixbuf__gif_image_load): Add prefix. - (gdk_pixbuf__gif_image_begin_load): Add prefix. - (gdk_pixbuf__gif_image_load_increment): Add prefix. - (gdk_pixbuf__gif_image_load_animation): Add prefix. - (gdk_pixbuf__gif_image_stop_load): Add prefix. - - * gdk-pixbuf/io-bmp.c (gdk_pixbuf__bmp_image_load): Add prefix. - (gdk_pixbuf__bmp_image_load): Rename function called. - (gdk_pixbuf__bmp_image_load_increment): Add prefix - - * gdk-pixbuf/io-png.c (gdk_pixbuf__png_image_load): Add prefix. - (gdk_pixbuf__png_image_begin_load): Add prefix. - (gdk_pixbuf__png_image_stop_load): Add prefix. - (gdk_pixbuf__png_image_load_increment): Add prefix. - - * gdk-pixbuf/gdk-pixbuf-io.c (file_formats): Make this static. - (gdk_pixbuf_load_module): Load the shared library entry points - using a "gdk_pixbuf__$module_name" prefix. - (pixbuf_module_symbol): Wrapper routine that uses the module - prefix for the modules to load the information. - - * configure.in (GDK_PIXBUF_VERSION): New option --disable-modules - lets the user specify that gdk-pixbuf should link all image loader - code into the library instaed of creating shared library modules. - - (dynworks): Renamed the automake conditional DYNAMIC_MODULES_WORK - to BUILD_DYNAMIC_MODULES. - -2000-02-19 Jonathan Blandford - - * gdk-pixbuf/io-gif.c (new_context): fix case where initial - colormap entry is Transparent. - -2000-02-19 Owen Taylor - - * gdk-pixbuf/pixops/pixops.c (scale_pixel): Fix error in - scale factors for non-alpha case. - -2000-02-14 Mark Crichton - - * gdk-pixbuf/io-xpm.c (xpm_extract_color): Added check for "g" color type. - Imlib/libXpm handle this, but we didn't. - -2000-02-14 Darin Adler - - * gdk-pixbuf/testpixbuf.c: Remove now-unnecessary cast. - * .cvsignore: gdk-pixbuf/.cvsignore: More to ignore. - -2000-02-14 Elliot Lee - * gdk-pixbuf/gdk-pixbuf.h, gdk-pixbuf/gdk-pixbuf-data.c: Make passed-in argument 'const'. - -2000-02-04 Michael Meeks - - * gdk-pixbuf/io-gif.c (struct _GifContext): add x,y_offset. - (gif_get_frame_info): put the offsets on the context. - (gif_get_lzw): copy them off into the frame. - (new_context): no change required; will 0 offsets by default. - -2000-01-28 Michael Meeks - - * gdk-pixbuf/pixops/pixops.c (pixops_process): const + nasty - un-consting cast. - - * gdk-pixbuf/pixops/pixops.h: const. - - * gdk-pixbuf/gdk-pixbuf-util.c: const. - - * gdk-pixbuf/gdk-pixbuf-scale.c: const. - - * gdk-pixbuf/gdk-pixbuf.h: constify lots of things. - -2000-02-03 Federico Mena Quintero - - * gdk-pixbuf/gdk-pixbuf-render.c - (gdk_pixbuf_render_threshold_alpha): Added sanity check for width - and height being >= 0. Also, do nothing if either of them is - zero. Thanks to Ettore for pointing this out. - (gdk_pixbuf_render_to_drawable): Likewise. - (gdk_pixbuf_render_to_drawable_alpha): Likewise. - -2000-02-02 Federico Mena Quintero - - * gdk-pixbuf/io-gif.c (gif_get_lzw): Removed debugging g_print. - Thanks to John Sullivan for the patch. - - * gdk-pixbuf/testpixbuf-drawable.c (configure_cb): Get a new area - of the screen when the window is resized. Thanks to David - N. Welton for pointing this out. - Misc. cleanups to the rest of the file. - -2000-02-01 Federico Mena Quintero - - * doc/tmpl/rendering.sgml: gnome_init() does not call - gdk_rgb_init(), so don't mention that it does in the - documentation. Thanks to Alexander Kruuse for - pointing this out. - -2000-01-31 Havoc Pennington - - * gdk-pixbuf/Makefile.am (noinst_PROGRAMS): no testpixbuf-foo target - -Mon Jan 31 12:38:50 2000 Owen Taylor - - * gdk-pixbuf/pixops/pixops.c (scale_line): Fix from Peter - Wainwright to fix 4a => 4a scaling. - -2000-01-29 Mark Crichton - - * gdk-pixbuf-config: Oh dear, we weren't Telsa/Alan proof... - put `libart-config --libs` in instead of -lart_lgpl. - -2000-01-22 Federico Mena Quintero - - * gdk-pixbuf/io-pnm.c (pnm_read_raw_scanline): Return an error on - invalid pnm type. - (pnm_read_ascii_scanline): Initialize data and mask. - - * gdk-pixbuf/io-xpm.c (pixbuf_create_from_xpm): Initialize - fallbackcolor to keep gcc happy. - - * configure.in: Bumped version number to 0.5.0. - - * gdk-pixbuf/pixops/timescale.c (dump_array): Removed unused variable. - (main): Return 0. - - * gdk-pixbuf/pixops/pixops.c (pixops_composite_color_nearest): Put - parentheses around + in a shift to remove a compiler warning. - (pixops_process): Likewise. - - Patch from Ross Golder to create an RPM - specfile: - - * configure.in: Added gdk-pixbuf.spec to AC_OUTPUT. - - * Makefile.am (EXTRA_DIST): Added gdk-pixbuf.spec.in - -2000-01-22 Federico Mena Quintero - - * gdk-pixbuf/gnome-canvas-pixbuf.c (PixbufPrivate): Removed the - x_set and y_set arguments. Now they are always on and start with - defaults of 0.0 in units. - (gnome_canvas_pixbuf_class_init): Likewise. - (gnome_canvas_pixbuf_set_arg): Likewise. - (gnome_canvas_pixbuf_get_arg): Likewise. - (compute_viewport_affine): Likewise; always use the priv->x and - priv->y fields. - - * doc/tmpl/gnome-canvas-pixbuf.sgml: Modified to reflect the - removal of the x_set/y_set arguments. - -2000-01-21 Federico Mena Quintero - - * gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_ref): Return the same pixbuf - as the input parameter. - - * gdk-pixbuf/gdk-pixbuf-animation.c (gdk_pixbuf_animation_ref): - Return the same animation as the input parameter. - -2000-01-16 Elliot Lee - - * gdk-pixbuf/Makefile.am: Don't link against libgnomecanvaspixbuf.la - -2000-01-16 Federico Mena Quintero - - * configure.in: Removed the broken --enable-canvas-pixbuf option. - Added the stuff necessary to substitute the variables in - gnomecanvaspixbufConf.sh.in. - - * gnomecanvaspixbufConf.sh.in: New gnome-config handler for the - tiny gnomecanvaspixbuf library. - - * Makefile.am: Build gnomecanvaspixbufConf.sh. - - * gdk-pixbuf/Makefile.am: Create a libgnomecanvaspixbuf and only - build it if gdk-pixbuf is being built outside of gnome-libs. - - * doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_render_pixmap_and_mask(). - - * gdk-pixbuf/gdk-pixbuf-render.c - (gdk_pixbuf_render_pixmap_and_mask): Renamed from - gdk_pixbuf_render_pixmap(). Do not create the mask if it is not - needed, and do not use a clipping mask when rendering the pixmap. - Tweaked documentation a little. - - * HACKING: New file with hacking policies for the gdk-pixbuf - module. - - * doc/Makefile.am (tmpl_sources): Added missing backslash. - - * doc/Makefile.am: Use gnomecanvaspixbuf in gnome-config when - scanning for docstrings. - - * gdk-pixbuf/gdk-pixbuf-util.c (gdk_pixbuf_copy_area): Made sanity - checks more stringent. Removed "gint" abominations. Made - documentation consistent with the rest of the functions. - - * doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_copy_area() to the - utilities section. - -2000-01-14 Jonathan Blandford - - * gdk-pixbuf/gdk-pixbuf-render.c (gdk_pixbuf_render_pixmap): new - function to let you create a gdk_pixmap from a gdk_pixbuf. - -2000-01-11 Jacob Berkman - - * gdk-pixbuf/pixops/Makefile.am (INCLUDES): added - $LIBART_CFLAGS to $INCLUDES - -2000-01-10 Elliot Lee - - * configure.in, gdk-pixbuf/Makefile.am: Build a libcanvas_pixbuf. - - * configure.in: Define version macros. Generate - gdk-pixbuf/gdk-pixbuf-features.h. Always INSIDE_GNOME. - - * gdk-pixbuf/Makefile.am: Add gdk-pixbuf-features.h - - * gdk-pixbuf/gdk-pixbuf.c: Add definitions of - gdk-pixbuf-features.h declarations, plus some initialization - stubs. - -2000-01-05 Owen Taylor - - * gdk-pixbuf/pixops/pixops.c: Fixed src_channels/dest_channels - confusion. (Again caught by Tomas Ogren's Purify) - -2000-01-07 Jonathan Blandford - - * gdk-pixbuf/gdk-pixbuf-xform.c (gdk_pixbuf_rotate): comment out - debugging printing. - - * gdk-pixbuf/gdk-pixbuf-io.c: Added progressive animation loading. - * gdk-pixbuf/gdk-pixbuf-io.h: Added progressive animation loading. - * gdk-pixbuf/gdk-pixbuf-loader.c: Added progressive animation - loading. - * gdk-pixbuf/gdk-pixbuf-loader.h: Added progressive animation - loading. - * gdk-pixbuf/io-gif.c (image_load_increment): I think the - ref-counting mess is finally fixed. Added progressive animation - loading. - (gif_get_lzw): remove memory_leak - - * doc/tmpl/gdk-pixbuf-loader.sgml: much longer long description - added. - -2000-01-05 Owen Taylor - - * gdk-pixbuf/pixops/pixops.c (pixops_process): Fix computation of end of run indices. - - * gdk-pixbuf/pixops/pixops.c: Fix double increments when dest_channels == 4. - (Pointed out by Tomas Ogren) - -2000-01-05 Mark Crichton - - * gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_eat_header_write): - Return 0 if gdk_pixbuf_load_loader_module returns FALSE. - -2000-01-05 Elliot Lee - - * gdk-pixbuf/pixops/Makefile.am: Link with -lm (to get 'ceil' function) - -2000-01-05 Owen Taylor - - * doc/Makefile.am doc/gdk-pixbuf-sections.txt - doc/gdk-pixbuf.sgml doc/tmpl/scaling.sgml: - Added scaling functions into gtk-doc framework. - - * gdk-pixbuf/gdk-pixbuf-scale.c: Documentation fixes. - - * gdk-pixbuf/testpixbuf-scale.c (expose_cb): Simplify a bit. - - * gdk-pixbuf/pixops/pixops.c (pixops_composite_color): Return - immediately if scale_x or scale_y is 0. - -2000-01-05 Owen Taylor - - * gdk-pixbuf/pixops/timescale.c: quick fix for initializing - arrays in benchmark. - -2000-01-05 Jonathan Blandford - - * gdk-pixbuf/gdk-pixbuf-io.h: Change the order of the update func - to make it more compatible with the rest of GTK. Added animation - framework for progressive loading. - - * gdk-pixbuf/io-bmp.c (image_begin_load): Modified to handle new - system. - * gdk-pixbuf/io-ico.c (image_begin_load): ditto - * gdk-pixbuf/io-png.c (image_begin_load): ditto - * gdk-pixbuf/io-ras.c (image_begin_load): ditto - * gdk-pixbuf/io-jpeg.c (image_begin_load): ditto - * gdk-pixbuf/io-pnm.c (image_begin_load): ditto - * gdk-pixbuf/io-tiff.c (image_begin_load): ditto - * gdk-pixbuf/io-gif.c (image_begin_load): ditto - -2000-01-05 Owen Taylor - - * gdk-pixbuf/pixops/README: Added a README with a TODO - and some explainations of the algorithms. - - * gdk-pixbuf/testpixbuf-scale.c: Set a background pixmap of None - to reduce flashing when resizing. - -2000-01-05 Owen Taylor - - * gdk-pixbuf/pixops/: Directory full of pixel data scaling - code that will eventually migrate into libart. - - * configure.in acconfig.h: Add checks for MMX compiler support - - * gdk-pixbuf/gdk-pixbuf.h gdk-pixbuf/gdk-pixbuf-scale.c: - Nice wrapper routines for the code in pixops that operate - on pixbufs instead of raw data. - - * gdk-pixbuf/testpixbuf-scale: Test program for scaling - routines. - -2000-01-05 Jonathan Blandford - - * doc/tmpl/animation.sgml: Documentation changes. - -2000-01-01 Federico Mena Quintero - - * gdk-pixbuf/gdk-pixbuf.h (GdkPixbufAnimation): Added reference - counting to animations. A web browser may want to share a single - copy of an animated GIF if it appears multiple times in a web - page, for example. - - * gdk-pixbuf/gdk-pixbuf-animation.c: New file. Moved the - animation functions here. - (gdk_pixbuf_animation_new_from_file): Prettified. Return a NULL - animation if the loader does not support multiframe loading and - the single-frame load returned NULL. Check that the filename is - not NULL. Updated inline documentation. - (gdk_pixbuf_animation_ref): New function. - (gdk_pixbuf_animation_unref): New function. - Removed gdk_pixbuf_animation_destroy() in favor of reference - counting. - - * gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): - Prettified. Made ref_count assertion more paranoid. Check that - the filename is not NULL. - (gdk_pixbuf_get_module): Use guchar * and guint for buffer and - size, respectively. - (gdk_pixbuf_new_from_xpm_data): Changed the "data" argument to - const char **. - - * gdk-pixbuf/io-gif.c (image_load_animation): Create the animation - with a reference count of 1. - - * gdk-pixbuf/Makefile.am (libgdk_pixbuf_la_SOURCES): Added - gdk-pixbuf-animation.c. - - * doc/tmpl/animation.sgml: Populated. It is still missing a - description of the overlay modes. - - * doc/gdk-pixbuf-sections.txt: Added the animation section. Moved - the canvas item section to the end, as it will be moved later to - gnome-libs. - - * doc/gdk-pixbuf.sgml: Added the animation section. - - * doc/Makefile.am (tmpl_sources): Added tmpl/animation.sgml. - -1999-12-26 Peter Teichman - - * gdk-pixbuf/Makefile.am (libpixbuf_tiff_la_LIBADD): add - $(LIBTIFF) to libpixbuf_tiff_la_LIBADD, proxying for mmarker. - This closes bug #4676. - -1999-12-23 Havoc Pennington - - * gdk-pixbuf/io-gif.c (image_load): Stuff that should have been - set to NULL here (specifically context->animation) was not being - set to NULL. use g_new0() to alloc the struct. - -1999-12-20 Jonathan Blandford - - * gdk-pixbuf/io-gif.c: finished work to make animated gifs load - correctly. Progressive loading needs some work, but that all - needs doing from the gdk-pixbuf-loader end, not here. - -1999-12-17 Jonathan Blandford - - * gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_animation_new_from_file): - moved the file here. It seems natural to put this function here, - as that's where the gdk_pixbuf_new_from_file function is, but it's - still a little convoluted. The source files might be played with - in a bit. - -1999-12-14 Jonathan Blandford - - * gdk-pixbuf/gdk-pixbuf-loader.c - (gdk_pixbuf_loader_get_animation): Gets the animation from the - loader. - -1999-12-16 Federico Mena Quintero - - * doc/tmpl/rendering.sgml: Added notice about initializing GdkRGB - before using the GdkPixbuf rendering functions. Thanks to Joe - Shaw for pointing this out. - -1999-12-13 Federico Mena Quintero - - * gdk-pixbuf/gnome-canvas-pixbuf.c - (gnome_canvas_pixbuf_class_init): Renamed arguments to - width_in_pixels, height_in_pixels, x_in_pixels, y_in_pixels, for - consistency with the new canvas. - (PixbufPrivate): Do the same renaming in the structure fields, for - consistency. - - * doc/tmpl/gnome-canvas-pixbuf.sgml: Updated for new argument names. - -1999-12-12 Federico Mena Quintero - - * gdk-pixbuf/Makefile.am (libgdk_pixbuf_la_LDFLAGS): Use a - conditional to see whether to link $(GNOME_LIBS) or not. - -1999-12-10 Jonathan Blandford - - * gdk-pixbuf/gdk-pixbuf-io.h: thinking about the new loading API. - - * gdk-pixbuf/gdk-pixbuf-drawable.c (gdk_pixbuf_get_from_drawable): - make a warning go away. - - * gdk-pixbuf/gdk-pixbuf.h: added new prototypes for animations. - - * gdk-pixbuf/gdk-pixbuf-loader.h: added new prototypes for - animations. - -1999-12-09 Michael Zucchi - - * gdk-pixbuf/gdk-pixbuf.h: Enable gdk_pixbuf_get_from_drawable() - api call. - - * gdk-pixbuf/gdk-pixbuf-drawable.c (gdk_pixbuf_get_from_drawable): - Filled in body of function. - (rgbconvert): Added GdkColormap parameter, and to all conversion - functions also. - (convert_real_slow): New function - should convert ANY visual/data - format properly, but it aint fast. Used as a fallback when an - optimised routine wont match. - (rgbconvert): Do very specific tests on the data format to verify - properly if the optimised version will do, otherwise use the - fallback function for all other data formats. - - * gdk-pixbuf/Makefile.am: Re-enabled building of - textpixbuf-drawable. - - * gdk-pixbuf/testpixbuf-drawable.c (main): Changed to use - gdk_pixbuf_get_from_drawable(). - -1999-12-08 Arjan van de Ven - - * gdk-pixbuf/gdk-pixbuf-drawable.c : Fixed the red/green/red - bug on two occasions. - * gdk-pixbuf/io-ras.c: Changed from the custom be32_to_cpu - function to the generic glib one. - -1999-12-08 Federico Mena Quintero - - * gdk-pixbuf/gdk-pixbuf-drawable.c: Fix includes. - (gdk_pixbuf_get_from_drawable): Implemented the zillion sanity - checks and API definition. The body needs filling in and it needs - to do the Right Thing(tm) for pixmaps plus the given colormap and - windows and their own colormaps. - - * gdk-pixbuf/gdk-pixbuf.h: Added prototype for - gdk_pixbuf_get_from_drawable(). Killed gdk-pixbuf-drawable.h. - - * gdk-pixbuf/Makefile.am: Re-added the gdk-pixbuf-drawable sources. - - * doc/tmpl/from-drawables.sgml: Populated. - - * doc/gdk-pixbuf.sgml: Added the from-drawables section. - - * doc/Makefile.am (tmpl_sources): Added tmpl/from-drawables.sgml. - - * doc/gdk-pixbuf-sections.txt: Added a section for getting pixbufs - from drawables. - -1999-12-07 Federico Mena Quintero - - * doc/tmpl/gnome-canvas-pixbuf.sgml: Added clarification about - reference counting for GdkPixbuf structures. - -1999-12-07 Martin Baulig - - * gdk-pixbuf/Makefile.am (testpixbuf_LDADD): Conditionally - include $(GNOME_LIBS) here. - -1999-12-05 Arjan van de Ven - - Added missing "include " to: - * gdk-pixbuf/io-ras.c - * gdk-pixbuf/io-bmp.c - * gdk-pixbuf/io-ico.c - -1999-12-06 Federico Mena Quintero - - * gdk-pixbuf/gdk-pixbuf-io.c (file_formats): Patch from Arjan to - fix an initializer. - -1999-12-05 Federico Mena Quintero - - * gdk-pixbuf/Makefile.am (testpixbuf_LDADD): Add back - $(GNOME_LIBS). This must compile outside of gnome-libs. If you - want, send me a patch to do the conditional stuff properly. - Otherwise, please read the GNOME Programming Guidelines, - especially the "CVS policies" section. - -1999-12-05 Jaka Mocnik - - * gdk-pixbuf/Makefile.am: removed GNOME_LIBS from testpixbuf_LDADD. - -1999-12-05 Arjan van de Ven - - * gdk-pixbuf/io-ico.c: Bug in palet-size - calculation fixed - -1999-12-04 Arjan van de Ven - - * gdk-pixbuf/io-bmp.c: Major cleanup, added support for - 32 bpp and 4 bpp (uncompressed) images, fixed 1bpp. - - * gdk-pixbuf/io-ras.c: Minor cleanup, ran through lclint - - * gdk-pixbuf/io-ico.c: Minor cleanup, fixed 1bpp icons, - ran through lclint. - - * gdk-pixbuf/gdk-pixbuf-io.c: Added detection of .CUR files - (Windows Cursor files). These are identical to .ICO files, - except for the signature and 2 extra fields for the hotspot. - -1999-12-03 Federico Mena Quintero - - * gdk-pixbuf/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_get_arg): - Removed unused variable `item'. - -1999-12-03 Jonathan Blandford - - * gdk-pixbuf/io-gif.c (gif_fill_in_lines): added a comment to - explain this function better. - -1999-12-02 Federico Mena Quintero - - Source files moved from src/ to gdk-pixbuf/, to be consistent with - other libraries. - - * doc/Makefile.am: Modified for the new source directory. - - * configure.in: Likewise. - - * Makefile.am: Likewise. - - * autogen.sh: Likewise. - - * gdk-pixbuf/Makefile.am: Likewise. - -1999-12-02 Federico Mena Quintero - - * src/testpixbuf.c: #include , and fix includes. - - * src/testpixbuf-drawable.c: #include , and fix includes. - - * src/io-xpm.c: Fix includes. - - * src/io-tiff.c: Fix includes. - - * src/io-ras.c: Fix includes, and do not include more stuff than needed. - - * src/io-pnm.c: Fix inlcudes, and do not include more stuff than needed. - - * src/io-png.c: Fix includes. - - * src/io-ico.c: Fix includes, and do not include more stuff than needed. - - * src/io-gif.c: Fix includes, and do not include more stuff than needed. - - * src/io-bmp.c: Fix includes, and do not include more stuff than needed. - - * src/gnome-canvas-pixbuf.c: Fix includes. - - * src/gdk-pixbuf.c: Fix includes. - - * src/gdk-pixbuf-util.c: Fix includes. - - * src/gdk-pixbuf-render.c: Fix includes. - - * src/gdk-pixbuf-io.h: Fix includes. - - * src/gdk-pixbuf-drawable.c: Fix includes. - - * src/gdk-pixbuf-drawable.h: Use angle brackets for the gdk-pixbuf - include files. - - * src/gdk-pixbuf-data.c: Fix includes. - - * src/gdk-pixbuf-loader.c: #include - - * src/gdk-pixbuf-loader.h: Use angle brackets for the gdk-pixbuf - include files. - - * src/Makefile.am: Commented out the gdk-pixbuf-drawable stuff, - since it is not finished. - - * src/gdk-pixbuf.h: Removed unused transformation prototypes. - - * src/gdk-pixbuf-util.c: New file with utility and convenience - functions for pixbufs. - - * src/Makefile.am (libgdk_pixbuf_la_SOURCES): Added gdk-pixbuf-util.c. - - * doc/gdk-pixbuf-sections.txt: Added section for utility functions. - - * doc/Makefile.am (tmpl_sources): Added tmpl/util.sgml. - - * doc/gdk-pixbuf.sgml: Added the utilities section. - - * doc/tmpl/util.sgml: Documentation for the utility functions. - -1999-11-29 Owen Taylor - - * src/gdk-pixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha): - Keep the mask around until after we draw ... since - the GC changes aren't flushed to the X server until we - draw, destroying it before that may result in BadPixmap - errors. - -1999-11-30 Havoc Pennington - - * configure.in: Add AM_CONDITIONAL for inside gnome-libs - - * src/Makefile.am: conditionalize GnomeCanvasPixbuf - -1999-11-29 Federico Mena Quintero - - * src/Makefile.am: Uncomment the GnomeCanvasPixbuf sources. This - should be made conditional, not blindly commented out. - -1999-11-29 Jonathan Blandford - - * src/Makefile.am (ICO_LIB): Added another loader from Arjan to - handle .ico files. Cool. - -1999-11-24 Jonathan Blandford - - * src/io-bmp.c (OneLine24): new patch from Arjan to handle - compressed bmps. - -1999-11-24 James Henstridge - - * configure.in (AC_OUTPUT): altered hack to place the symlink in the - top builddir rather than src. This still builds fine, and does not - get gtk-doc into an infinite loop when trying to find all the source - files. - -1999-11-23 Jonathan Blandford - - * Removed #PRAGMA } from headers. Also, make compile if you don't - have it installed, already. - -1999-11-22 Federico Mena Quintero - - * src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_draw): Create the - temporary buffer to the size of the interesction of the bounding - box and the expose area, not the whole expose area. This speeds - up things a lot. - - * src/gdk-pixbuf-render.c (gdk_pixbuf_render_threshold_alpha): Do - not paint black on the mask, since we already cleared it in a - single gdk_draw_rectangle() operation. - -1999-11-22 Raja R Harinath - - * configure.in (GDK_PIXBUF_DIR): Fix for srcdir != builddir. - -1999-11-22 Havoc Pennington - - * src/Makefile.am (GDK_PIXBUF_LIBS): Patch from Paul Fisher - adds all -lgdk-pixbuf and all other - dependencies to LIBADD variables for loadable modules. Necessary - for a Java dynamic loading thing to be able to figure it out. - -1999-11-22 Havoc Pennington - - * src/io-png.c (image_load_increment): Call the update_area - callback depending on the number of rows loaded in this increment. - - * src/testpixbuf.c (main): slow down the progressive load demo - -1999-11-16 Havoc Pennington - - * src/gdk-pixbuf-drawable.h: Get the quotes right on the #include - -1999-11-22 Jonathan Blandford - - * configure.in (GDK_PIXBUF_DIR): make the symlink. Does not work - for srcdir != buildir != . Beats me why; I can't figure it out. - AC_OUTPUT_COMMANDS doesn't seem to let me substitute it correctly. - -1999-11-21 Jonathan Blandford - - * src/gdk-pixbuf-io.c: added io-bmp from Arjan - - -1999-11-20 Michael Zucchi - - * src/gdk-pixbuf-drawable.c (gdk_pixbuf_from_drawable_core): - Rework/reorder of the code. Each case has been separated into - another function; its big but it should be quick. - gdk_pixbuf_rgba_from_drawable() will now return a pixbuf with - opaque alpha information. Not all depths/formats have been - tested, but 8, 15/16 and 24 (alinged 32) should work ok. - -1999-11-17 Larry Ewing - - * src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_bounds): - implement the bounds method correctly. - (compute_viewport_affine): compute the affine need to fit the - image within the viewport given by the args. - (compute_render_affine): call compute_viewport_affine. - -1999-11-16 Havoc Pennington - - * src/gdk-pixbuf-drawable.h: Use includes from the current - directory, not the system directory. - -Mon Nov 15 17:18:28 1999 George Lebl - - * src/testpixbuf-drawable.c: use includes from the current directory - rather then from the system include directory as gdk-pixbuf - includes are not yet installed when this is compiled. - -1999-11-13 Cody Russell - * src/testpixbuf-drawable.c: Added a test program for drawable - code. - - * src/Makefile.am: Build testpixbuf-drawable. - -1999-11-12 Cody Russell - - * src/gdk-pixbuf-drawable.c: Merged in Michael Zucchi's changes. - -1999-11-10 Federico Mena Quintero - - * doc/tmpl/gdk-pixbuf-loader.sgml: Populated. - - * doc/gdk-pixbuf.signals: Put in the real names of signal - arguments. - - * src/gdk-pixbuf-loader.c: Improved documentation comments. - -1999-11-10 Jonathan Blandford - - * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): emit the - closed signal. - - * src/io-ras.c (OneLineMapped_file): Now can handle indexing - correctly. Patch from Arjan to do so. - -1999-11-10 Michael Fulbright - - * src/io-pnm.c (pnm_ascii_read_scanline): Fixed loading of ASCII PNM - files. - - * src/testpixbuf.c: Added final queued draw when done loading image. - -1999-11-10 Jonathan Blandford - - * src/gdk-pixbuf-io.c (gdk_pixbuf_load_module): removed spurious - print statements. - -1999-11-10 Federico Mena Quintero - - * src/gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): Added - documentation. - -1999-11-09 Federico Mena Quintero - - * src/io-png.c: Fixed some incompatible pointer initializations. - - * src/io-jpeg.c (image_load_increment): Remove unused variable. - -1999-11-09 Michael Fulbright - - * src/testpixbuf.c: Fixed it to use timeout to read from file - for progressive loading. Set TBF_KBPS=n, where n is the number of - kilobytes/second to simulate in downloading. n has to be an integer. - - * src/io-jpeg.c: Slight cosmetic cleanup. - - * src/io-pnm.c: Fixed raw PNM loading bug. Also discovered that ASCII - PBM loading has a similar problem and will address tomorrow. - -1999-11-09 Havoc Pennington - - * src/Makefile.am (libgdk_pixbuf_la_SOURCES): build the - gdk-pixbuf-drawable stuff. - -1999-11-09 Federico Mena Quintero - - * configure.in: Bumped version number to 0.4. - -1999-11-09 Michael Fulbright - - * src/io-pnm.c : Finished progressive PNM loading code. Should handle - all types of PNM files now. - - * src/io-jpeg.c (image_load_increment): Figured out problem with - loading Progressive JPEG's progressively (say that 10 times fast). - Currently for Progressive JPEG's the entire image is loaded before - it is displayed. libjpeg supports a fancier mechanism which I may - implement later. - - With these changes all JPEG formats appear to load properly for me. - -1999-11-08 Jonathan Blandford - - * src/io-ras.c (image_load_increment): Final patch from Arjan. - Seems to do progressive loading. - -1999-11-08 Michael Fulbright - - * src/io-pnm.c image_load (): Fixed so we do not create a separate - pixel buffer when reading in image - we reuse the pixel data in - the GdkPixbuf structure instead. - -1999-11-08 Michael Fulbright - - * src/io-pnm.c pnm_read_ascii_scanline (): Added support for - ASCII PNM files. Note I haven't tested loaded ASCII PBM files because - I can't seem to find a utility to convert into this format. - Next is to add progressive loading support for the PNM format. - -1999-11-07 Federico Mena Quintero - - * doc/tmpl/gnome-canvas-pixbuf.sgml: Finished detailed explanation - of the width, height, x, and y setting and pixels arguments. - -1999-11-05 Jonathan Blandford - - * src/io-ras.c (image_load): third patch. Now it seems to load. - - * src/gdk-pixbuf-io.c: second patch Arjan van de Ven - to autodetect/load the sunras files. - - * src/io-ras.c (image_load): new file from Arjan van de Ven - to begin the ras loader. - -1999-11-05 Federico Mena Quintero - - * doc/gdk-pixbuf-sections.txt: Removed gdk-pixbuf-io, since it is - for internal use only. - - * doc/gdk-pixbuf.sgml: Likewise. - - * doc/tmpl/gnome-canvas-pixbuf.sgml: Finished docs. - -1999-11-05 Michael Fulbright - - * src/io-pnm.c: Implemented support for reading raw PBM/PGM/PPM - files from a file. Next step is support for ASCII files, and - then incremental loading. - -1999-11-04 Federico Mena Quintero - - * Makefile.am: Added doc to SUBDIRS. - -1999-11-04 Michael Fulbright - - * src/io-jpeg.c: Prettied up code slightly. - * src/io-pnm.c: Start of pnm loader (from file and progressively). - Doesn't do much yet (will finish tomorrow). - * src/gdk-pixbuf-io.c: Added pnm to structure of known types. - -1999-11-04 Federico Mena Quintero - - * doc/tmpl/rendering.sgml: Populated. - - * doc/Makefile.am: Added the template files. - -1999-11-04 Havoc Pennington - - * src/gdk-pixbuf-render.c (gdk_pixbuf_render_to_drawable): In - docs, explain what a dither offset is for. - (gdk_pixbuf_render_to_drawable_alpha): Explain why you would use - this function vs. gdk_pixbuf_render_to_drawable(). - -1999-11-04 Havoc Pennington - - * configure.in: Use libart-config correctly; find gnome-config - separately. Fix GNOME_LIBS to be correct in "no gnome installed - yet" case. - - * src/Makefile.am: Link to GNOME_LIBS instead of a hardcoded - library list. - - Patch untested in the inside-gnome-libs case, I need to commit - then check out to the gnome-libs I'm using. - -1999-11-04 Michael Fulbright - - * src/io-jpeg.c (image_begin_load): Add update_func callback. - * src/io-jpeg.c (image_load_increment): Call updated callback when - new graphic data decoded. - -1999-11-04 Jonathan Blandford - - * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_update): handle the - actual update. - * src/io-png.c (image_begin_load): add a update_func callback. - * src/io-gif.c (image_begin_load): add a update_func callback. - (gif_get_lzw): added the update_func ability - - * src/io-tiff.c (image_begin_load): add a update_func callback. - -1999-11-04 Federico Mena Quintero - - * doc/tmpl/gdk-pixbuf.sgml: Populated. - - * doc/tmpl/refcounting.sgml: Populated. - - * doc/tmpl/file-loading.sgml: Populated. - - * src/gdk-pixbuf.c: Added documentation comments. - - * src/gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Added - documentation comments. - - * doc/: Finished integrating the documentation framework. - -1999-11-03 Federico Mena Quintero - - * configure.in: Removed libgif stuff now that we do not depend on it. - Added the necessary cruft for gtk-doc. - - * src/Makefile.am: Unconditionally build the GIF loader. - -1999-11-03 Jonathan Blandford - - * src/io-gif.c (gif_read): renamed ReadOK to gif_read. - Added a lot of comments to the file. - - * src/Makefile.am (libpixbuf_gif_la_LIBADD): Remove dependency on - lib*gif!!!! - -1999-11-03 Michael Fulbright - - * src/io-jpeg.c (image_load_increment): Further removal of - bugginess in local buffering code. Handles grayscale jpegs - correctly now. - - * src/io-jpeg.c (image_load_stop): Was freeing local context - for jpeg library before calling jpeg_decompres_finish (). - -1999-11-03 Jonathan Blandford - - * src/io-gif.c (image_load_increment): now handle arbitrary buffer - sizes. - (gif_get_lzw): set the transparency to the right val. - -1999-11-03 Federico Mena Quintero - - * src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_init): - Initiailize the x and y fields. - (gnome_canvas_pixbuf_destroy): Queue a redraw upon destruction. - (PixbufPrivate): Renamed need_size_update to need_xform_update. - (recompute_bounding_box): Do not use temporary values. - -1999-11-03 Jonathan Blandford - - * src/io-gif.c (set_gif_lzw_clear_code): new state. Fixes - un-compressed gifs. - - * src/gnome-canvas-pixbuf.c (recompute_bounding_box): remove - unneeded x,y,h,w vars. - -1999-11-03 Larry Ewing - - * src/gnome-canvas-pixbuf.c (compute_render_affine): adjust - render_affine calculation for x,y offsets. - (gnome_canvas_pixbuf_set_arg): add x,y args. - (gnome_canvas_pixbuf_get_arg): add x,y args. - (recompute_bounding_box): simply code using ArtDrect and the - render_affine. Removed compute_xform_vectors as it was no longer - needed. - -1999-11-03 Federico Mena Quintero - - * src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_point): I'm a - doofus. Return a distance, not a boolean, for opaque images. - - * src/gnome-canvas-pixbuf.c (recompute_bounding_box): Do proper - rounding of bounding box coordinates. - (gnome_canvas_pixbuf_bounds): Implemented the ::bounds() method. - (gnome_canvas_pixbuf_draw): Use the correct alpha threshold value. - -1999-11-03 Jonathan Blandford - - * src/io-gif.c (gif_prepare_lzw): s/lwz/lzw/g - -1999-11-03 Michael Fulbright - - * src/io-jpg.c (image_load_increment): Fixed code which moved - buffer around as new data comes in to work properly. JPEG progressive - loading should be working now except for grayscale JPEG's, which I - will look into next. - -1999-11-03 - * src/testpixbuf.c: A GtkFunction needs to return a value for deterministic behaviour. - Also put dot printing back in. - -1999-11-03 - - * src/io-gif.c (gif_get_extension): Read 'til the next empty block - correctly, now. - -1999-11-02 Cody Russell - * src/gdk-pixbuf-drawable.c: Changed the behavior to return NULL - if part of the requested image is offscreen, rather than clipping - the image. - -1999-11-02 Jonathan Blandford - - * src/io-gif.c (gif_fill_in_lines): Fill in the gif's blank areas - for interlacing and progressive loading. - -1999-11-02 Cody Russell - * src/gdk-pixbuf-drawable.c (gdk_pixbuf_from_drawable_core): Now - calls gdk_pixbuf_new_from_art_pixbuf() instead of gdk_pixbuf_new(). - -1999-11-02 Jonathan Blandford - - * src/io-gif.c (gif_main_loop): Now progressive gif loading works! - It's a little slow though. )-: - -1999-11-02 Elliot Lee - * src/gdk-pixbuf-loader.[ch], src/gdk-pixbuf-io.h: Make the arguments to the - write/load_increment operations const-correct. - -1999-11-02 Federico Mena Quintero - - * src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_point): - Implemented the ::point() method. We do a simple containment test - instead of a full distance calculation since the canvas is going - to change to that scheme, anyways. - -1999-11-02 Elliot Lee - - * src/testpixbuf.c: Allow using $TBF_READLEN to specify the size of the chunks - that are read from the input file. - -1999-11-02 Larry Ewing - - * src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_render): add aa - render function. - (gnome_canvas_pixbuf_class_init): add gnome_canvas_pixbuf_render - to class. - -1999-11-02 Federico Mena Quintero - - * src/gnome-canvas-pixbuf.c (compute_render_affine): Moved the - affine computation code from ::draw() to here, since it is needed - by ::point() as well. - -1999-11-02 Elliot Lee - - * src/gdk-pixbuf-loader.c: Reorganize gdk_pixbuf_loader_write into - three functions, and eliminate duplication of code from write() - and close(). Also fix bug where the 128-byte header was being - written twice. - -1999-11-01 Federico Mena Quintero - * src/gnome-canvas-pixbuf.c (recompute_bounding_box): Fixed - bounding box computation. - -1999-11-01 Federico Mena Quintero - - * src/gnome-canvas-pixbuf.c: Start of the pixbuf canvas item. - Drawing affines seem to work. Bounding box is fubared. ::point() - is not implemented. This is a work in progress. - - * src/Makefile.am: Added gnome-canvas-pixbuf.[ch] to the list of - sources. - - * configure.in: Sigh. We need to link in libgnomeui for the - canvas stuff. This mess will disappear when gdk-pixbuf gets - folded into gnome-libs. - -1999-10-30 Jonathan Blandford - - * src/io-gif.c: Some more work. Now it generates a gdk_pixbuf of - the right size, at a minimum, even if the image is squished and - the wrong color. - (ReadImage): lets get the offset right. This will let transparent - gifs work. - -1999-10-29 Michael Fulbright - - * src/io-jpeg.c: image_load_increment(): Fixed bug when - image width was not a multiple of 4 - always use the - gdk_pixbuf rowstride to increment pointers! - -1999-10-29 Michael Fulbright - - * src/io-jpeg.c: Added first cut at progressive jpeg loading. - Currently does not handle either progressive jpeg files (jpeg - files with multiple scans at different quality settings), but - I plan on adding this support soon. These are fairly rare in - my experience, so it shouldn't slow people down too much. - Grayscale jpegs also don't work but that should be easy to fix. - -1999-10-29 Michael Fulbright - - * src/testpixbuf.c: Added title to windows so you can identify - progressive and file windows. - -1999-10-29 Michael Fulbright - - * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Actually - load the image handler when we determine the image type. - - * src/gdk-pixbuf-io.[ch] (gdk_pixbuf_load_module): Changed the - previously static function load_image_handler () to - a public function gdk_pixbuf_load_module (). It is needed in - gdk-pixbuf-loader.c to load image handler modules. This function - is different from gdk_pixbuf_get_module (), which only returns - a reference to the required handler, because it actually loads - the handler into memory. Both actions should possibly be combined - in a convenience function since one w/o the other doesn't seem to - make much sense. - -1999-10-28 Jonathan Blandford - - * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): don't send a - 0 length buffer. - -1999-10-28 Federico Mena Quintero - - * src/gdk-pixbuf-render.c (gdk_pixbuf_render_to_drawable): New - function to render a portion of a pixbuf to a drawable. Ignores - alpha information and takes in a GC. - (gdk_pixbuf_render_to_drawable_alpha): New function to render a - portion of a pixbuf to a drawable. It automatically creates a GC - and a clipping mask for alpha pixbufs. - -1999-10-28 Jonathan Blandford - - * src/gdk-pixbuf.h: turned convenience macros into convenience - functions so some error checking could be added. - - * src/io-tiff.c (image_load_increment): started work on the tiff - non-incremental loader. - (image_begin_load): Finished the incremental loader. - - * src/io-gif.c (image_load_increment): started work on the gif - incremental loader. - - * src/gdk-pixbuf-io.h: Changed ModuleType to GdkPixbufModule. - -1999-10-27 Federico Mena Quintero - - * src/gdk-pixbuf-render.c (gdk_pixbuf_render_threshold_alpha): New - function to threshold a pixbuf's alpha channel into a bitmap. - - * src/gdk-pixbuf.c (gdk_pixbuf_new): Fixed so that it will - contemplate future extensions to ArtPixBuf's formats. - - * src/io-png.c (png_info_callback): Use the new API of gdk_pixbuf_new(). - - * src/gdk-pixbuf.h (gdk_pixbuf_get_height): Added some convenience - macros to fetch the ArtPixBuf's fields. - -1999-10-27 Havoc Pennington - - * src/testpixbuf.c (main): Display the progressive load - - * src/io-png.c (setup_png_transformations): Break transformation - code into separate function - (png_info_callback): Use setup_png_transformations - -1999-10-27 Havoc Pennington - - * src/gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): Check - properly whether the XPM module has already been loaded - (gdk_pixbuf_new_from_file): Check properly if loader module - was already loaded (was checking if load symbol was present - in order to decide whether to re-load; should check module != - NULL, then load != NULL) - (image_handler_load): Check in present working directory, - makes it easier to debug for now - (file_formats): This array initializer was seriously on crack, - was assigning a function pointer to a GModule* - - * src/testpixbuf.c (main): Change type of pixbuf_loader to GdkPixbufLoader* - -1999-10-27 Havoc Pennington - - * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_finalize): - Fix typo that prevented compilation - (gdk_pixbuf_loader_destroy): ditto - -1999-10-27 Federico Mena Quintero - - * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_new): Return a - GdkPixbufLoader, not a GtkObject. - (gtk_marshal_NONE__INT_INT_INT_INT): Made static. - (gdk_pixbuf_loader_get_type): Documented. - (gdk_pixbuf_loader_class_init): Initialize the parent class - correctly. - (gdk_pixbuf_loader_destroy): Added sanity checks. Call the parent - class destroy function. - (gdk_pixbuf_loader_new): Documented. - (gdk_pixbuf_loader_finalize): Call the parent class finalize - function. - (gdk_pixbuf_loader_write): Use size_t for count. - -1999-10-27 Michael Fulbright - - * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_destroy): Fixed - logic so we only try to close loader if it wasn't previously closed. - -1999-10-27 Michael Fulbright - - * src/gdk-pixbuf-loader.c: Made sure image_loader struct member of - pixbuf_loader properly initialized. - - * src/testpixbuf.c: Made sure we cleanup pixbuf_loader properly - when done. - -1999-10-26 Jonathan Blandford - - * src/gdk-pixbuf-io.c (image_handler_load): load the vtable fully. - - * src/gdk-pixbuf-loader.c: Finished initial cut at the object. - -1999-10-26 Havoc Pennington - - * src/gdk-pixbuf-loader.h: fix signals - - * src/gdk-pixbuf-io.h: add new vtable fields - - -1999-10-26 Jonathan Blandford - - * src/gdk-pixbuf-loader.h: New Class. Beginning of progrssive - loading. - -1999-10-25 Federico Mena Quintero - - * configure.in (CFLAGS): Patch from Uwe Koloska - to fix a stupid typo of mine. - -1999-10-22 Havoc Pennington - - * src/io-xpm.c (mem_buffer): Clean up stupid - increment-inside-array-dereference thing - - * src/testpixbuf.c: Add XPM data tests. - - * src/io-xpm.c: Make the XPM data buffer const, fix const - correctness throughout the code. - -1999-10-22 Havoc Pennington - - * src/gdk-pixbuf.h: Export gdk_pixbuf_new_from_xpm_data() - -1999-10-22 Havoc Pennington - - * src/io-xpm.c (image_load_xpm_data): Export this symbol for - loading an XPM from memory. - - * src/gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): New - function, loads pixbuf from xpm data - (image_handler_load): Add g_return_if_fail() to ensure the same - module isn't loaded twice. Add g_module_symbol() to scan for XPM - loader function. - -1999-10-22 Federico Mena Quintero - - * src/io-png.c (image_load): Patch from Kristian Hogsberg - Kristensen to avoid allocating extra row - buffers; the rows can be read in directly into the main pixel - buffer. - -1999-10-20 Federico Mena Quintero - - * src/gdk-pixbuf-io.c (image_handler_load): Free path. - -1999-10-20 Federico Mena Quintero - - * configure.in: Bumped version number to 0.3. - - * src/Makefile.am (lbgdk_pixbuf_la_LDFLAGS): Added a libtool - version number for the library. - -1999-10-20 Federico Mena Quintero - - * src/gdk-pixbuf.h (GdkPixbuf): Removed the unref_fn field. Now - all memory management of the buffer is done by libart. - - * src/gdk-pixbuf.c (gdk_pixbuf_unref): Do destruction here. - Removed gdk_pixbuf_destroy, gdk_pixbuf_duplicate. - - * src/gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Implemented in - terms of the libart functions. Removed the old code. - - * src/gdk-pixbuf-io.c (image_handler_load): Removed the save - symbols. Saving will not be implemented in GdkPixbuf. - - * src/io-gif.c: Removed the saving stub. - (image_load): Fixed memory management to fail gracefully if we run - out of memory while loading the image. Close the gif file when we - are done. This still needs more error handling for the DGif - functions. - - * src/io-jpeg.c (image_load): Some robustness fixes. - - * src/io-png.c: Removed the saving stuff. - (image_load): Some memory management fixes. - - * src/io-tiff.c (image_load): Ditto. - - * src/io-xpm.c (pixbuf_create_from_xpm): Ditto. - -1999-10-18 Havoc Pennington - - * subautogen.sh: New name for macros/autogen.sh - - * autogen.sh: use subautogen.sh - -1999-10-18 Federico Mena Quintero - - * src/*: Reindented to use the GNOME Indentation. Renamed - GdkPixBuf to GdkPixbuf, for consistency with the function names - (and it is also easier to type) :-) - -1999-10-18 Havoc Pennington - - * configure.in: Use AM_PATH_GLIB instead of glib-config directly - - * src/Makefile.am: Re-enable testpixbuf with GTK_CFLAGS/GTK_LIBS - -1999-10-18 Havoc Pennington - - * Makefile.am (SUBDIRS): Remove "macros" - - * configure.in: Don't use GNOME_INIT, handle case where we are - inside gnome-libs. AM_PATH_GTK for the GIF test - - * src/Makefile.am: Change flags to work without libgnomeui, - comment out testpixbuf for now - -1999-10-18 Federico Mena Quintero - - * configure.in: Use $GTK_LIBS as the extra libs when checking for - libgif/libungif, as they need the X libraries. Fixes bug #2472. - -1999-10-10 Cody Russell - * src/gdk-pixbuf-drawable.c: core function now determines whether - the requested geometry is on screen or not, and if some is not - then the request is clamped to geometry that is on the screen. - - Changed 'pixbuf' to 'art_pixbuf' in core function. - -1999-10-08 Michael Fulbright - - * src/gdk-pixbuf-data.c: Added to load rgb data from const data. - - * src/testpifbuf: Changed test program to display cdrom from rgb data - if no filename given to test program. - -1999-10-07 Cody Russell - * src/gdk-pixbuf-drawable.[ch]: Added. (Actually, Miguel committed - them, but I wrote them). - - * src/gdk-pixbuf-drawable.h: Added a missing ; so things will now - compile. - - * src/Makefile.am: Added gdk-pixbuf-drawable.[ch] to - libgdk_pixbuf_la_SOURCES and libgdk_pixbufinclude_HEADERS. - - * src/gdk-pixbuf-drawable.c: Added #include "gdk-pixbuf-drawable.h" - to fix compilation. - - * src/gdk-pixbuf-drawable.[ch]: Changed functions to return - GdkPixBuf* instead of ArtPixBuf*. - -1999-09-22 Michael Meeks - - * src/gdk-pixbuf.c (gdk_pixbuf_new): created. - (gdk_pixbuf_scale): use gdk_pixbuf_new + return a new scaled image. - - * src/gdk-pixbuf.h (struct _GdkPixBuf): Re-organise struct, + add - GdkPixBufUnrefFunc + gdk_pixbuf_new. - - * src/io-jpeg.c (image_load): clean to use gdk_pixbuf_new. - - * src/io-xpm.c (_pixbuf_create_from_xpm): ditto. - - * src/io-tiff.c (image_load): ditto + fix leak - - * src/io-png.c (image_load): ditto + add more exit points; monitor.png - crashes this module ( add warning :-) - - * src/io-bmp.c (image_load): ditto. - - * src/io-gif.c (image_load): ditto. - -1999-09-18 Michael Meeks - - * src/gdk-pixbuf.c (gdk_pixbuf_scale): Hack rgba support in so - it doesn't crash scaling with alpha. - -1999-09-17 Federico Mena Quintero - - * src/io-bmp.c (image_load): Set the initial ref_count to 1. - - * src/io-gif.c (image_load): Likewise. - - * src/io-jpeg.c (image_load): Likewise. - - * src/io-png.c (image_load): Likewise. - - * src/io-tiff.c (image_load): Likewise. - - * src/io-xpm.c (_pixbuf_create_from_xpm): Likewise. - - * src/gdk-pixbuf-io.c (gdk_pixbuf_load_image): Added an assertion - for the ref_count to be != 0. - - * src/gdk-pixbuf.c (gdk_pixbuf_ref): Be more paranoid with sanity - checking. - (gdk_pixbuf_unref): Fix incorrect sanity check and comparison. - -1999-08-09 Federico Mena Quintero - - * src/io-png.c (image_save): Fixed compiler warnings. Fixed write - to unallocated memory (row_ptr), and fixed its type as well. Take - into account the ArtPixbuf's rowstride when assigning the row - pointers. - - * src/gdk-pixbuf.c: Fixup includes. - - * src/gdk-pixbuf-io.c: Likewise. - -Sat Jul 31 19:19:47 CEST 1999 - - * src/gdk-pixbuf-io.c: - * src/io-png.c: Fixed two obvious C syntax bugs - -1999-07-29 Mark Crichton - - * src/io-png.c (image_save): Added PNG saving function - - * src/gdk-pixbuf-io.c: Changed image_save function format. Now it's - image_save(GdkPixBuf *p, FILE *f, ...) - - -1999-07-26 Michael Zucchi - - * src/Makefile.am (*_LIB): Only build the relevant loaders which - require extra libraries if we actually have those libraries. - -1999-07-23 Richard Hestilow - - * src/gdk-pixbuf.h: Include glib.h as it uses g* datatypes - * gdk_pixbufConf.sh.in: Added for gnome-config - * Makefile.am: - * configure.in: Modified to generate gdk_pixbufConf.sh - -1999-07-20 Mark Crichton - - * src/gdk-pixbuf.c (gdk_pixbuf_rotate): Fixed rotation. Now a bbox - calculation needs to be done. - -1999-07-18 Larry Ewing - - * src/io-xpm.c: - * src/io-gif.c: - * src/io-png.c: - * src/io-jpeg.c: Fix a few memory leaks in the, most of them in - error cases but one or two in the common case. There are probably - a few small ones left. - -1999-07-18 Mark Crichton - - * configure.in: removed version.h. - - * src/gdk-pixbuf-io.c (pixbuf_check_tiff): Minor readability - improvements. - -1999-07-17 Mark Crichton - - * src/gdk-pixbuf.c: Removed gdk_pixbuf_free, redundant code. - (gdk_pixbuf_rotate): Added pixbuf rotation code. - (gdk_pixbuf_scale): Changed // comments to /* */ - - * src/gdk-pixbuf.h (gdk_pixbuf_destroy): Added gdk_pixbuf_destroy - function to header. - -1999-07-16 Larry Ewing - - * src/testpixbuf.c (expose_func): reverted the expose everything - changes, I'm not sure why these went in. - (config_func): bring this up to date with the new pixbuf_scale - semantics. - - * src/gdk-pixbuf-io.c: added a couple of warnings to the module - loading code so that poeple can diagnose problems better. - - * src/gdk-pixbuf.c (gdk_pixbux_scale): fix the borkedness, also it - no longer allocates a new pixbuf, which make things nicer for the - rest of the code. Unfortunately there is still a problem with - scaling rgba images. - -1999-07-16 Mark Crichton - - * src/testpixbuf.c (config_func): ConfigureEvent handler. This - calls gdk_pixbuf_scale. However, something is not working. - N.B.: current pixmap is now stored in user_data with a key of - "pixmap" - - * src/gdk-pixbuf.c (gdk_pixbuf_scale): Implemented scaling function. - Something is still borked, however. - -1999-07-15 Larry Ewing - - * src/io-jpeg.c (image_load): add raph@gimp.org's fix to the jpeg - indexing routine - - * src/testpixbuf.c (main): fix up the file routines a little so - that you can load multiple files given the file names - -1999-07-14 Larry Ewing - - * src/testpixbuf.c (expose_func): added an almost proper expose - handler for testpixbuf - -1999-07-13 Mark Crichton - - * configure.in: Fixed GIF check. Replaced " with ' - * src/gdk-pixbuf.c: More (minor) work on gdk_pixbuf_scale - -1999-07-13 Mark Crichton - - * configure.in: I am a bonehead. Added gif-lib check. diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am deleted file mode 100644 index 9e34123b3e..0000000000 --- a/gdk-pixbuf/Makefile.am +++ /dev/null @@ -1,196 +0,0 @@ -SUBDIRS = pixops - -if BUILD_CANVAS_ITEM -CANVAS_PIXBUF_LIB = libgnomecanvaspixbuf.la -CANVAS_PIXBUF_HEADERFILES=gnome-canvas-pixbuf.h -libgnomecanvaspixbuf_la_SOURCES = gnome-canvas-pixbuf.c -EXTRA_GNOME_LIBS = $(GNOME_LIBS) -else -CANVAS_PIXBUF_LIB = -CANVAS_PIXBUF_HEADERFILES = -EXTRA_GNOME_LIBS = -endif - -lib_LTLIBRARIES = \ - libgdk_pixbuf.la \ - $(CANVAS_PIXBUF_LIB) - -libgnomecanvaspixbuf_la_LDFLAGS = $(EXTRA_GNOME_LIBS) - -libexecdir = $(libdir)/gdk-pixbuf/loaders - -# -# The PNG plugin. -# -libpixbuf_png_la_SOURCES = io-png.c -libpixbuf_png_la_LDFLAGS = -avoid-version -module -libpixbuf_png_la_LIBADD = $(LIBPNG) - -# -# The JPEG loader -# -libpixbuf_jpeg_la_SOURCES = io-jpeg.c -libpixbuf_jpeg_la_LDFLAGS = -avoid-version -module -libpixbuf_jpeg_la_LIBADD = $(LIBJPEG) - -# -# The XPM loader -# -libpixbuf_xpm_la_SOURCES = io-xpm.c -libpixbuf_xpm_la_LDFLAGS = -avoid-version -module -libpixbuf_xpm_la_LIBADD = - -# -# The GIF loader -# -libpixbuf_gif_la_SOURCES = io-gif.c -libpixbuf_gif_la_LDFLAGS = -avoid-version -module -libpixbuf_gif_la_LIBADD = - -# -# The ICO loader -# -libpixbuf_ico_la_SOURCES = io-ico.c -libpixbuf_ico_la_LDFLAGS = -avoid-version -module -libpixbuf_ico_la_LIBADD = - -# -# The RAS loader -# -libpixbuf_ras_la_SOURCES = io-ras.c -libpixbuf_ras_la_LDFLAGS = -avoid-version -module -libpixbuf_ras_la_LIBADD = - -# -# The TIFF loader -# -libpixbuf_tiff_la_SOURCES = io-tiff.c -libpixbuf_tiff_la_LDFLAGS = -avoid-version -module -libpixbuf_tiff_la_LIBADD = $(LIBTIFF) - -# -# The PNM loader -# -libpixbuf_pnm_la_SOURCES = io-pnm.c -libpixbuf_pnm_la_LDFLAGS = -avoid-version -module -libpixbuf_pnm_la_LIBADD = - -# -# The BMP loader -# -libpixbuf_bmp_la_SOURCES = io-bmp.c -libpixbuf_bmp_la_LDFLAGS = -avoid-version -module -libpixbuf_bmp_la_LIBADD = - -if HAVE_PNG -PNG_LIB = libpixbuf-png.la -endif - -if HAVE_JPEG -JPEG_LIB = libpixbuf-jpeg.la -endif - -GIF_LIB = libpixbuf-gif.la - -ICO_LIB = libpixbuf-ico.la - -RAS_LIB = libpixbuf-ras.la - -if HAVE_TIFF -TIFF_LIB = libpixbuf-tiff.la -endif - -XPM_LIB = libpixbuf-xpm.la - -PNM_LIB = libpixbuf-pnm.la - -BMP_LIB = libpixbuf-bmp.la - -if BUILD_DYNAMIC_MODULES - -libexec_LTLIBRARIES = \ - $(PNG_LIB) \ - $(JPEG_LIB) \ - $(GIF_LIB) \ - $(ICO_LIB) \ - $(RAS_LIB) \ - $(XPM_LIB) \ - $(TIFF_LIB) \ - $(PNM_LIB) \ - $(BMP_LIB) - - -extra_sources = - -else -libexec_LTLIBRARIES = - -extra_sources = $(libpixbuf_png_la_SOURCES) \ - $(libpixbuf_jpeg_la_SOURCES) \ - $(libpixbuf_xpm_la_SOURCES) \ - $(libpixbuf_gif_la_SOURCES) \ - $(libpixbuf_ico_la_SOURCES) \ - $(libpixbuf_ras_la_SOURCES) \ - $(libpixbuf_tiff_la_SOURCES) \ - $(libpixbuf_pnm_la_SOURCES) \ - $(libpixbuf_bmp_la_SOURCES) - -builtin_libraries = -endif - -noinst_PROGRAMS = testpixbuf testpixbuf-drawable testanimation testpixbuf-scale - -DEPS = libgdk_pixbuf.la -INCLUDES = -I$(top_srcdir) -I$(top_builddir) \ - -I$(top_srcdir)/gdk-pixbuf \ - -I$(top_builddir)/gdk-pixbuf \ - $(GLIB_CFLAGS) $(LIBART_CFLAGS) $(GTK_CFLAGS) -AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(libexecdir)\"" - -LDADDS = libgdk_pixbuf.la $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS) $(STATIC_LIB_DEPS) - -if INSIDE_GNOME_LIBS -testpixbuf_LDADD = $(LDADDS) $(LIBART_LIBS) -lgmodule -testpixbuf_drawable_LDADD = $(LDADDS) -testpixbuf_scale_LDADD = $(LDADDS) -testanimation_LDADD = $(LDADDS) $(LIBART_LIBS) -lgmodule -else -testpixbuf_LDADD = $(LDADDS) $(LIBART_LIBS) $(GNOME_LIBS) -lgmodule -testpixbuf_drawable_LDADD = $(LDADDS) $(GNOME_LIBS) -testpixbuf_scale_LDADD = $(LDADDS) $(GNOME_LIBS) -testanimation_LDADD = $(LDADDS) $(LIBART_LIBS) $(GNOME_LIBS) -lgmodule -endif - - -GDK_PIXBUF_LIBS = $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS) - -# -# The GdkPixBuf library -# - -libgdk_pixbufincludedir = $(includedir)/gdk-pixbuf - -libgdk_pixbuf_la_SOURCES = \ - gdk-pixbuf.c \ - gdk-pixbuf-animation.c \ - gdk-pixbuf-data.c \ - gdk-pixbuf-drawable.c \ - gdk-pixbuf-io.c \ - gdk-pixbuf-loader.c \ - gdk-pixbuf-render.c \ - gdk-pixbuf-scale.c \ - gdk-pixbuf-util.c \ - $(extra_sources) - -libgdk_pixbuf_la_LDFLAGS = -version-info 1:0:0 $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS) -libgdk_pixbuf_la_LIBADD = pixops/libpixops.la - -libgdk_pixbufinclude_HEADERS = \ - gdk-pixbuf.h \ - gdk-pixbuf-loader.h \ - gdk-pixbuf-features.h \ - $(CANVAS_PIXBUF_HEADERFILES) - -noinst_HEADERS = \ - gdk-pixbuf-io.h - diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c deleted file mode 100644 index 09e21c4593..0000000000 --- a/gdk-pixbuf/gdk-pixbuf-animation.c +++ /dev/null @@ -1,225 +0,0 @@ -/* GdkPixbuf library - Simple animation support - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Jonathan Blandford - * Havoc Pennington - * - * 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. - */ - -#include -#include "gdk-pixbuf-io.h" - - - -/** - * gdk_pixbuf_animation_new_from_file: - * @filename: Name of file to load. - * - * Creates a new animation by loading it from a file. The file format is - * detected automatically. If the file's format does not support multi-frame - * images, then an animation with a single frame will be created. - * - * Return value: A newly created animation with a reference count of 1, or NULL - * if any of several error conditions ocurred: the file could not be opened, - * there was no loader for the file's format, there was not enough memory to - * allocate the image buffer, or the image file contained invalid data. - **/ -GdkPixbufAnimation * -gdk_pixbuf_animation_new_from_file (const char *filename) -{ - GdkPixbufAnimation *animation; - int size; - FILE *f; - guchar buffer [128]; - GdkPixbufModule *image_module; - - g_return_val_if_fail (filename != NULL, NULL); - - f = fopen (filename, "r"); - if (!f) - return NULL; - - size = fread (&buffer, 1, sizeof (buffer), f); - - if (size == 0) { - fclose (f); - return NULL; - } - - image_module = gdk_pixbuf_get_module (buffer, size); - if (!image_module) { - g_warning ("Unable to find handler for file: %s", filename); - fclose (f); - return NULL; - } - - if (image_module->module == NULL) - gdk_pixbuf_load_module (image_module); - - if (image_module->load_animation == NULL) { - GdkPixbuf *pixbuf; - GdkPixbufFrame *frame; - - /* Keep this logic in sync with gdk_pixbuf_new_from_file() */ - - if (image_module->load == NULL) { - fclose (f); - return NULL; - } - - fseek (f, 0, SEEK_SET); - pixbuf = (* image_module->load) (f); - fclose (f); - - if (pixbuf) - g_assert (pixbuf->ref_count > 0); - else - return NULL; - - frame = g_new (GdkPixbufFrame, 1); - frame->pixbuf = pixbuf; - frame->x_offset = 0; - frame->y_offset = 0; - frame->delay_time = -1; - frame->action = GDK_PIXBUF_FRAME_RETAIN; - - animation = g_new0 (GdkPixbufAnimation, 1); - animation->ref_count = 1; - animation->n_frames = 1; - animation->frames = g_list_prepend (NULL, frame); - animation->width = gdk_pixbuf_get_width (pixbuf); - animation->height = gdk_pixbuf_get_height (pixbuf); - } else { - fseek (f, 0, SEEK_SET); - animation = (* image_module->load_animation) (f); - fclose (f); - } - - return animation; -} - -/** - * gdk_pixbuf_animation_ref: - * @animation: An animation. - * - * Adds a reference to an animation. It must be released afterwards using - * gdk_pixbuf_animation_unref(). - * - * Return value: The same as the @animation argument. - **/ -GdkPixbufAnimation * -gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation) -{ - g_return_val_if_fail (animation != NULL, NULL); - g_return_val_if_fail (animation->ref_count > 0, NULL); - - animation->ref_count++; - return animation; -} - -/** - * gdk_pixbuf_animation_unref: - * @animation: An animation. - * - * Removes a reference from an animation. It will be destroyed when the - * reference count drops to zero. At that point, all the frames in the - * animation will be freed and their corresponding pixbufs will be unreferenced. - **/ -void -gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation) -{ - g_return_if_fail (animation != NULL); - g_return_if_fail (animation->ref_count > 0); - - animation->ref_count--; - - if (animation->ref_count == 0) { - GList *l; - GdkPixbufFrame *frame; - - for (l = animation->frames; l; l = l->next) { - frame = l->data; - gdk_pixbuf_unref (frame->pixbuf); - g_free (frame); - } - - g_list_free (animation->frames); - g_free (animation); - } -} - -/** - * gdk_pixbuf_animation_get_width: - * @animation: An animation. - * - * Return the width of @animation. - **/ -int -gdk_pixbuf_animation_get_width (GdkPixbufAnimation *animation) -{ - g_return_val_if_fail (animation != NULL, 0); - g_return_val_if_fail (animation->ref_count > 0, 0); - - return animation->width; -} - -/** - * gdk_pixbuf_animation_get_height: - * @animation: An animation. - * - * Return the height of @animation. - **/ -int -gdk_pixbuf_animation_get_height (GdkPixbufAnimation *animation) -{ - g_return_val_if_fail (animation != NULL, 0); - g_return_val_if_fail (animation->ref_count > 0, 0); - - return animation->height; -} - -/** - * gdk_pixbuf_animation_get_num_frames: - * @animation: An animation. - * - * Return the number of frames in @animation. - **/ -int -gdk_pixbuf_animation_get_num_frames (GdkPixbufAnimation *animation) -{ - g_return_val_if_fail (animation != NULL, 0); - g_return_val_if_fail (animation->ref_count > 0, 0); - - return animation->n_frames; -} - -/** - * gdk_pixbuf_animation_get_frames: - * @animation: An animation. - * - * Return the frames of @animation as a list of - * GdkPixbufAnimationFrame objects. - **/ -GList * -gdk_pixbuf_animation_get_frames (GdkPixbufAnimation *animation) -{ - g_return_val_if_fail (animation != NULL, 0); - g_return_val_if_fail (animation->ref_count > 0, 0); - - return animation->frames; -} diff --git a/gdk-pixbuf/gdk-pixbuf-data.c b/gdk-pixbuf/gdk-pixbuf-data.c deleted file mode 100644 index 247a67e4fd..0000000000 --- a/gdk-pixbuf/gdk-pixbuf-data.c +++ /dev/null @@ -1,69 +0,0 @@ -/* GdkPixbuf library - Image creation from in-memory buffers - * - * Copyright (C) 1999 The Free Software Foundation - * - * Author: Federico Mena-Quintero - * - * 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. - */ - -#include -#include "gdk-pixbuf.h" - - - -/** - * gdk_pixbuf_new_from_data: - * @data: Image data in 8-bit/sample packed format. - * @format: Color format used for the data. - * @has_alpha: Whether the data has an opacity channel. - * @width: Width of the image in pixels. - * @height: Height of the image in pixels. - * @rowstride: Distance in bytes between rows. - * @dfunc: Function used to free the data when the pixbuf's reference count - * drops to zero, or NULL if the data should not be freed. - * @dfunc_data: Closure data to pass to the destroy notification function. - * - * Creates a new #GdkPixbuf out of in-memory RGB data. - * - * Return value: A newly-created #GdkPixbuf structure with a reference count of - * 1. - **/ -GdkPixbuf * -gdk_pixbuf_new_from_data (const guchar *data, ArtPixFormat format, gboolean has_alpha, - int width, int height, int rowstride, - ArtDestroyNotify dfunc, gpointer dfunc_data) -{ - ArtPixBuf *art_pixbuf; - - /* Only 8-bit/sample RGB buffers are supported for now */ - - g_return_val_if_fail (data != NULL, NULL); - g_return_val_if_fail (format == ART_PIX_RGB, NULL); - g_return_val_if_fail (width > 0, NULL); - g_return_val_if_fail (height > 0, NULL); - - if (has_alpha) - art_pixbuf = art_pixbuf_new_rgba_dnotify ((art_u8 *)data, width, height, rowstride, - dfunc_data, dfunc); - else - art_pixbuf = art_pixbuf_new_rgb_dnotify ((art_u8 *)data, width, height, rowstride, - dfunc_data, dfunc); - - g_assert (art_pixbuf != NULL); - - return gdk_pixbuf_new_from_art_pixbuf (art_pixbuf); -} diff --git a/gdk-pixbuf/gdk-pixbuf-features.h.in b/gdk-pixbuf/gdk-pixbuf-features.h.in deleted file mode 100644 index 0681f49610..0000000000 --- a/gdk-pixbuf/gdk-pixbuf-features.h.in +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef GDK_PIXBUF_FEATURES_H -#define GDK_PIXBUF_FEATURES_H 1 - -#define GDK_PIXBUF_MAJOR (@GDK_PIXBUF_MAJOR@) -#define GDK_PIXBUF_MINOR (@GDK_PIXBUF_MINOR@) -#define GDK_PIXBUF_MICRO (@GDK_PIXBUF_MICRO@) -#define GDK_PIXBUF_VERSION "@GDK_PIXBUF_VERSION@" - -extern const guint gdk_pixbuf_major_version, gdk_pixbuf_minor_version, gdk_pixbuf_micro_version; -extern const char *gdk_pixbuf_version; - -#endif diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c deleted file mode 100644 index 491543a277..0000000000 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ /dev/null @@ -1,484 +0,0 @@ -/* GdkPixbuf library - Main loading interface. - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Miguel de Icaza - * Federico Mena-Quintero - * - * 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. - */ - -#include -#include -#include -#include "gdk-pixbuf-io.h" - - - -static gboolean -pixbuf_check_png (guchar *buffer, int size) -{ - if (size < 28) - return FALSE; - - if (buffer [0] != 0x89 || - buffer [1] != 'P' || - buffer [2] != 'N' || - buffer [3] != 'G' || - buffer [4] != 0x0d || - buffer [5] != 0x0a || - buffer [6] != 0x1a || - buffer [7] != 0x0a) - return FALSE; - - return TRUE; -} - -static gboolean -pixbuf_check_jpeg (guchar *buffer, int size) -{ - if (size < 10) - return FALSE; - - if (buffer [0] != 0xff || buffer [1] != 0xd8) - return FALSE; - - return TRUE; -} - -static gboolean -pixbuf_check_tiff (guchar *buffer, int size) -{ - if (size < 10) - return FALSE; - - if (buffer [0] == 'M' && - buffer [1] == 'M' && - buffer [2] == 0 && - buffer [3] == 0x2a) - return TRUE; - - if (buffer [0] == 'I' && - buffer [1] == 'I' && - buffer [2] == 0x2a && - buffer [3] == 0) - return TRUE; - - return FALSE; -} - -static gboolean -pixbuf_check_gif (guchar *buffer, int size) -{ - if (size < 20) - return FALSE; - - if (strncmp (buffer, "GIF8", 4) == 0) - return TRUE; - - return FALSE; -} - -static gboolean -pixbuf_check_xpm (guchar *buffer, int size) -{ - if (size < 20) - return FALSE; - - if (strncmp (buffer, "/* XPM */", 9) == 0) - return TRUE; - - return FALSE; -} - -static gboolean -pixbuf_check_pnm (guchar *buffer, int size) -{ - if (size < 20) - return FALSE; - - if (buffer [0] == 'P') { - if (buffer [1] == '1' || - buffer [1] == '2' || - buffer [1] == '3' || - buffer [1] == '4' || - buffer [1] == '5' || - buffer [1] == '6') - return TRUE; - } - return FALSE; -} -static gboolean -pixbuf_check_sunras (guchar *buffer, int size) -{ - if (size < 32) - return FALSE; - - if (buffer [0] != 0x59 || - buffer [1] != 0xA6 || - buffer [2] != 0x6A || - buffer [3] != 0x95) - return FALSE; - - return TRUE; -} - -static gboolean -pixbuf_check_ico (guchar *buffer, int size) -{ - /* Note that this may cause false positives, but .ico's don't - have a magic number.*/ - if (size < 6) - return FALSE; - if (buffer [0] != 0x0 || - buffer [1] != 0x0 || - ((buffer [2] != 0x1)&&(buffer[2]!=0x2)) || - buffer [3] != 0x0 || - buffer [5] != 0x0 ) - return FALSE; - - return TRUE; -} - - -static gboolean -pixbuf_check_bmp (guchar *buffer, int size) -{ - if (size < 20) - return FALSE; - - if (buffer [0] != 'B' || buffer [1] != 'M') - return FALSE; - - return TRUE; -} - -static GdkPixbufModule file_formats [] = { - { "png", pixbuf_check_png, NULL, NULL, NULL, NULL, NULL, NULL }, - { "jpeg", pixbuf_check_jpeg, NULL, NULL, NULL, NULL, NULL, NULL }, - { "tiff", pixbuf_check_tiff, NULL, NULL, NULL, NULL, NULL, NULL }, - { "gif", pixbuf_check_gif, NULL, NULL, NULL, NULL, NULL, NULL }, -#define XPM_FILE_FORMAT_INDEX 4 - { "xpm", pixbuf_check_xpm, NULL, NULL, NULL, NULL, NULL, NULL }, - { "pnm", pixbuf_check_pnm, NULL, NULL, NULL, NULL, NULL, NULL }, - { "ras", pixbuf_check_sunras, NULL, NULL, NULL, NULL, NULL, NULL }, - { "ico", pixbuf_check_ico, NULL, NULL, NULL, NULL, NULL, NULL }, - { "bmp", pixbuf_check_bmp, NULL, NULL, NULL, NULL, NULL, NULL }, - { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } -}; - -#ifdef USE_GMODULE -static gboolean -pixbuf_module_symbol (GModule *module, const char *module_name, const char *symbol_name, gpointer *symbol) -{ - char *full_symbol_name = g_strconcat ("gdk_pixbuf__", module_name, "_", symbol_name, NULL); - gboolean return_value; - - return_value = g_module_symbol (module, full_symbol_name, symbol); - g_free (full_symbol_name); - - return return_value; -} - -/* actually load the image handler - gdk_pixbuf_get_module only get a */ -/* reference to the module to load, it doesn't actually load it */ -/* perhaps these actions should be combined in one function */ -void -gdk_pixbuf_load_module (GdkPixbufModule *image_module) -{ - char *module_name; - char *path; - GModule *module; - gpointer load_sym; - char *name; - - g_return_if_fail (image_module->module == NULL); - - name = image_module->module_name; - - module_name = g_strconcat ("pixbuf-", name, NULL); - path = g_module_build_path (PIXBUF_LIBDIR, module_name); - - module = g_module_open (path, G_MODULE_BIND_LAZY); - if (!module) { - /* Debug feature, check in present working directory */ - g_free (path); - path = g_module_build_path ("", module_name); - module = g_module_open (path, G_MODULE_BIND_LAZY); - - if (!module) { - g_warning ("Unable to load module: %s: %s", path, g_module_error ()); - g_free (module_name); - g_free (path); - return; - } - g_free (path); - } else { - g_free (path); - } - - g_free (module_name); - - image_module->module = module; - - if (pixbuf_module_symbol (module, name, "image_load", &load_sym)) - image_module->load = load_sym; - - if (pixbuf_module_symbol (module, name, "image_load_xpm_data", &load_sym)) - image_module->load_xpm_data = load_sym; - - if (pixbuf_module_symbol (module, name, "image_begin_load", &load_sym)) - image_module->begin_load = load_sym; - - if (pixbuf_module_symbol (module, name, "image_stop_load", &load_sym)) - image_module->stop_load = load_sym; - - if (pixbuf_module_symbol (module, name, "image_load_increment", &load_sym)) - image_module->load_increment = load_sym; - - if (pixbuf_module_symbol (module, name, "image_load_animation", &load_sym)) - image_module->load_animation = load_sym; -} -#else - -#define mname(type,fn) gdk_pixbuf__ ## type ## _image_ ##fn -#define m_load(type) extern GdkPixbuf * mname(type,load) (FILE *f); -#define m_load_xpm_data(type) extern GdkPixbuf * mname(type,load_xpm_data) (const char **data); -#define m_begin_load(type) \ - extern gpointer mname(type,begin_load) (ModulePreparedNotifyFunc prepare_func, \ - ModuleUpdatedNotifyFunc update_func, \ - ModuleFrameDoneNotifyFunc frame_done_func,\ - ModuleAnimationDoneNotifyFunc anim_done_func,\ - gpointer user_data); -#define m_stop_load(type) extern void mname(type,stop_load) (gpointer context); -#define m_load_increment(type) extern gboolean mname(type,load_increment) (gpointer context, const guchar *buf, guint size); -#define m_load_animation(type) extern GdkPixbufAnimation * mname(type,load_animation) (FILE *f); - -m_load (png); -m_begin_load (png); -m_load_increment (png); -m_stop_load (png); -m_load (bmp); -m_begin_load (bmp); -m_load_increment (bmp); -m_stop_load (bmp); -m_load (gif); -m_begin_load (gif); -m_load_increment (gif); -m_stop_load (gif); -m_load_animation (gif); -m_load (ico); -m_begin_load (ico); -m_load_increment (ico); -m_stop_load (ico); -m_load (jpeg); -m_begin_load (jpeg); -m_load_increment (jpeg); -m_stop_load (jpeg); -m_load (pnm); -m_begin_load (pnm); -m_load_increment (pnm); -m_stop_load (pnm); -m_load (ras); -m_begin_load (ras); -m_load_increment (ras); -m_stop_load (ras); -m_load (tiff); -m_begin_load (tiff); -m_load_increment (tiff); -m_stop_load (tiff); -m_load (xpm); -m_load_xpm_data (xpm); - -void -gdk_pixbuf_load_module (GdkPixbufModule *image_module) -{ - image_module->module = (void *) 1; - - if (strcmp (image_module->module_name, "png") == 0){ - image_module->load = mname (png,load); - image_module->begin_load = mname (png,begin_load); - image_module->load_increment = mname (png,load_increment); - image_module->stop_load = mname (png,stop_load); - return; - } - - if (strcmp (image_module->module_name, "bmp") == 0){ - image_module->load = mname (bmp,load); - image_module->begin_load = mname (bmp,begin_load); - image_module->load_increment = mname (bmp,load_increment); - image_module->stop_load = mname (bmp,stop_load); - return; - } - - if (strcmp (image_module->module_name, "gif") == 0){ - image_module->load = mname (gif,load); - image_module->begin_load = mname (gif,begin_load); - image_module->load_increment = mname (gif,load_increment); - image_module->stop_load = mname (gif,stop_load); - image_module->load_animation = mname (gif,load_animation); - return; - } - - if (strcmp (image_module->module_name, "ico") == 0){ - image_module->load = mname (ico,load); - image_module->begin_load = mname (ico,begin_load); - image_module->load_increment = mname (ico,load_increment); - image_module->stop_load = mname (ico,stop_load); - return; - } - - if (strcmp (image_module->module_name, "jpeg") == 0){ - image_module->load = mname (jpeg,load); - image_module->begin_load = mname (jpeg,begin_load); - image_module->load_increment = mname (jpeg,load_increment); - image_module->stop_load = mname (jpeg,stop_load); - return; - } - if (strcmp (image_module->module_name, "pnm") == 0){ - image_module->load = mname (pnm,load); - image_module->begin_load = mname (pnm,begin_load); - image_module->load_increment = mname (pnm,load_increment); - image_module->stop_load = mname (pnm,stop_load); - return; - } - if (strcmp (image_module->module_name, "ras") == 0){ - image_module->load = mname (ras,load); - image_module->begin_load = mname (ras,begin_load); - image_module->load_increment = mname (ras,load_increment); - image_module->stop_load = mname (ras,stop_load); - return; - } - if (strcmp (image_module->module_name, "tiff") == 0){ - image_module->load = mname (tiff,load); - image_module->begin_load = mname (tiff,begin_load); - image_module->load_increment = mname (tiff,load_increment); - image_module->stop_load = mname (tiff,stop_load); - return; - } - if (strcmp (image_module->module_name, "xpm") == 0){ - image_module->load = mname (xpm,load); - image_module->load_xpm_data = mname (xpm,load_xpm_data); - return; - } -} - - -#endif - - - -GdkPixbufModule * -gdk_pixbuf_get_module (guchar *buffer, guint size) -{ - int i; - - for (i = 0; file_formats [i].module_name; i++) { - if ((* file_formats [i].format_check) (buffer, size)) - return &(file_formats[i]); - } - - return NULL; -} - -/** - * gdk_pixbuf_new_from_file: - * @filename: Name of file to load. - * - * Creates a new pixbuf by loading an image from a file. The file format is - * detected automatically. - * - * Return value: A newly-created pixbuf with a reference count of 1, or NULL if - * any of several error conditions occurred: the file could not be opened, - * there was no loader for the file's format, there was not enough memory to - * allocate the image buffer, or the image file contained invalid data. - **/ -GdkPixbuf * -gdk_pixbuf_new_from_file (const char *filename) -{ - GdkPixbuf *pixbuf; - int size; - FILE *f; - guchar buffer [128]; - GdkPixbufModule *image_module; - - g_return_val_if_fail (filename != NULL, NULL); - - f = fopen (filename, "r"); - if (!f) - return NULL; - - size = fread (&buffer, 1, sizeof (buffer), f); - if (size == 0) { - fclose (f); - return NULL; - } - - image_module = gdk_pixbuf_get_module (buffer, size); - if (!image_module) { - g_warning ("Unable to find handler for file: %s", filename); - fclose (f); - return NULL; - } - - if (image_module->module == NULL) - gdk_pixbuf_load_module (image_module); - - if (image_module->load == NULL) { - fclose (f); - return NULL; - } - - fseek (f, 0, SEEK_SET); - pixbuf = (* image_module->load) (f); - fclose (f); - - if (pixbuf) - g_assert (pixbuf->ref_count > 0); - - return pixbuf; -} - -/** - * gdk_pixbuf_new_from_xpm_data: - * @data: Pointer to inline XPM data. - * - * Creates a new pixbuf by parsing XPM data in memory. This data is commonly - * the result of including an XPM file into a program's C source. - * - * Return value: A newly-created pixbuf with a reference count of 1. - **/ -GdkPixbuf * -gdk_pixbuf_new_from_xpm_data (const char **data) -{ - GdkPixbuf *(* load_xpm_data) (const char **data); - GdkPixbuf *pixbuf; - - if (file_formats[XPM_FILE_FORMAT_INDEX].module == NULL) - gdk_pixbuf_load_module (&file_formats[XPM_FILE_FORMAT_INDEX]); - - if (file_formats[XPM_FILE_FORMAT_INDEX].module == NULL) { - g_warning ("Can't find gdk-pixbuf module for parsing inline XPM data"); - return NULL; - } else if (file_formats[XPM_FILE_FORMAT_INDEX].load_xpm_data == NULL) { - g_warning ("gdk-pixbuf XPM module lacks XPM data capability"); - return NULL; - } else - load_xpm_data = file_formats[XPM_FILE_FORMAT_INDEX].load_xpm_data; - - pixbuf = (* load_xpm_data) (data); - return pixbuf; -} diff --git a/gdk-pixbuf/gdk-pixbuf-io.h b/gdk-pixbuf/gdk-pixbuf-io.h deleted file mode 100644 index 4e439ce9b6..0000000000 --- a/gdk-pixbuf/gdk-pixbuf-io.h +++ /dev/null @@ -1,84 +0,0 @@ -/* GdkPixbuf library - Io handling. This is an internal header for gdk-pixbuf. - * You should never use it unless you are doing developement for gdkpixbuf itself. - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Mark Crichton - * Miguel de Icaza - * Federico Mena-Quintero - * Jonathan Blandford - * Michael Fulbright - * - * 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 GDK_PIXBUF_IO_H -#define GDK_PIXBUF_IO_H - -#include -#include -#include "gdk-pixbuf.h" - -#ifdef __cplusplus -extern "C" { -#endif - - - -typedef void (* ModulePreparedNotifyFunc) (GdkPixbuf *pixbuf, gpointer user_data); -typedef void (* ModuleUpdatedNotifyFunc) (GdkPixbuf *pixbuf, - guint x, guint y, - guint width, guint height, - gpointer user_data); -/* Needed only for animated images. */ -typedef void (* ModuleFrameDoneNotifyFunc) (GdkPixbufFrame *frame, - gpointer user_data); -typedef void (* ModuleAnimationDoneNotifyFunc) (GdkPixbuf *pixbuf, - gpointer user_data); - -typedef struct _GdkPixbufModule GdkPixbufModule; -struct _GdkPixbufModule { - char *module_name; - gboolean (* format_check) (guchar *buffer, int size); - GModule *module; - GdkPixbuf *(* load) (FILE *f); - GdkPixbuf *(* load_xpm_data) (const char **data); - - /* Incremental loading */ - - gpointer (* begin_load) (ModulePreparedNotifyFunc prepare_func, - ModuleUpdatedNotifyFunc update_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data); - void (* stop_load) (gpointer context); - gboolean (* load_increment) (gpointer context, const guchar *buf, guint size); - - /* Animation loading */ - GdkPixbufAnimation *(* load_animation) (FILE *f); -}; - - -GdkPixbufModule *gdk_pixbuf_get_module (guchar *buffer, guint size); -void gdk_pixbuf_load_module (GdkPixbufModule *image_module); - - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c deleted file mode 100644 index 777b767d14..0000000000 --- a/gdk-pixbuf/gdk-pixbuf-loader.c +++ /dev/null @@ -1,509 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* GdkPixbuf library - Main header file - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Mark Crichton - * Miguel de Icaza - * Federico Mena-Quintero - * Jonathan Blandford - * - * 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. - */ - -#include -#include -#include "gdk-pixbuf-loader.h" -#include "gdk-pixbuf-io.h" - - - -enum { - AREA_UPDATED, - AREA_PREPARED, - FRAME_DONE, - ANIMATION_DONE, - CLOSED, - LAST_SIGNAL -}; - -static GtkObjectClass *parent_class; - -static void gdk_pixbuf_loader_class_init (GdkPixbufLoaderClass *klass); -static void gdk_pixbuf_loader_init (GdkPixbufLoader *loader); -static void gdk_pixbuf_loader_destroy (GtkObject *loader); -static void gdk_pixbuf_loader_finalize (GtkObject *loader); - -static guint pixbuf_loader_signals[LAST_SIGNAL] = { 0 }; - - - -/* Internal data */ - -#define LOADER_HEADER_SIZE 128 - -typedef struct { - GdkPixbuf *pixbuf; - GdkPixbufAnimation *animation; - gboolean closed; - guchar header_buf[LOADER_HEADER_SIZE]; - gint header_buf_offset; - GdkPixbufModule *image_module; - gpointer context; -} GdkPixbufLoaderPrivate; - - - -/* our marshaller */ -typedef void (* GtkSignal_NONE__INT_INT_INT_INT) (GtkObject *object, - gint arg1, gint arg2, gint arg3, gint arg4, - gpointer user_data); -static void -gtk_marshal_NONE__INT_INT_INT_INT (GtkObject *object, GtkSignalFunc func, gpointer func_data, - GtkArg * args) -{ - GtkSignal_NONE__INT_INT_INT_INT rfunc; - - rfunc = (GtkSignal_NONE__INT_INT_INT_INT) func; - (*rfunc) (object, - GTK_VALUE_INT (args[0]), - GTK_VALUE_INT (args[1]), - GTK_VALUE_INT (args[2]), - GTK_VALUE_INT (args[3]), - func_data); -} - - - -/** - * gdk_pixbuf_loader_get_type: - * @void: - * - * Registers the #GdkPixubfLoader class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the #GdkPixbufLoader class. - **/ -GtkType -gdk_pixbuf_loader_get_type (void) -{ - static GtkType loader_type = 0; - - if (!loader_type) { - static const GtkTypeInfo loader_info = { - "GdkPixbufLoader", - sizeof (GdkPixbufLoader), - sizeof (GdkPixbufLoaderClass), - (GtkClassInitFunc) gdk_pixbuf_loader_class_init, - (GtkObjectInitFunc) gdk_pixbuf_loader_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - loader_type = gtk_type_unique (GTK_TYPE_OBJECT, &loader_info); - } - - return loader_type; -} - -static void -gdk_pixbuf_loader_class_init (GdkPixbufLoaderClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - - parent_class = gtk_type_class (gtk_object_get_type ()); - - pixbuf_loader_signals[AREA_PREPARED] = - gtk_signal_new ("area_prepared", - GTK_RUN_LAST, - parent_class->type, - GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, area_prepared), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - pixbuf_loader_signals[AREA_UPDATED] = - gtk_signal_new ("area_updated", - GTK_RUN_LAST, - parent_class->type, - GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, area_updated), - gtk_marshal_NONE__INT_INT_INT_INT, - GTK_TYPE_NONE, 4, - GTK_TYPE_INT, - GTK_TYPE_INT, - GTK_TYPE_INT, - GTK_TYPE_INT); - - pixbuf_loader_signals[FRAME_DONE] = - gtk_signal_new ("frame_done", - GTK_RUN_LAST, - parent_class->type, - GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, frame_done), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - pixbuf_loader_signals[ANIMATION_DONE] = - gtk_signal_new ("animation_done", - GTK_RUN_LAST, - parent_class->type, - GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, animation_done), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - pixbuf_loader_signals[CLOSED] = - gtk_signal_new ("closed", - GTK_RUN_LAST, - parent_class->type, - GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, closed), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, pixbuf_loader_signals, LAST_SIGNAL); - - object_class->destroy = gdk_pixbuf_loader_destroy; - object_class->finalize = gdk_pixbuf_loader_finalize; -} - -static void -gdk_pixbuf_loader_init (GdkPixbufLoader *loader) -{ - GdkPixbufLoaderPrivate *priv; - - priv = g_new0 (GdkPixbufLoaderPrivate, 1); - loader->private = priv; -} - -static void -gdk_pixbuf_loader_destroy (GtkObject *object) -{ - GdkPixbufLoader *loader; - GdkPixbufLoaderPrivate *priv = NULL; - - g_return_if_fail (object != NULL); - g_return_if_fail (GDK_IS_PIXBUF_LOADER (object)); - - loader = GDK_PIXBUF_LOADER (object); - priv = loader->private; - - if (!priv->closed) - gdk_pixbuf_loader_close (loader); - - if (priv->animation) - gdk_pixbuf_animation_unref (priv->animation); - if (priv->pixbuf) - gdk_pixbuf_unref (priv->pixbuf); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -gdk_pixbuf_loader_finalize (GtkObject *object) -{ - GdkPixbufLoader *loader; - GdkPixbufLoaderPrivate *priv = NULL; - - loader = GDK_PIXBUF_LOADER (object); - priv = loader->private; - - g_free (priv); - - if (GTK_OBJECT_CLASS (parent_class)->finalize) - (* GTK_OBJECT_CLASS (parent_class)->finalize) (object); -} - -static void -gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf, gpointer loader) -{ - GdkPixbufLoaderPrivate *priv = NULL; - - priv = GDK_PIXBUF_LOADER (loader)->private; - gdk_pixbuf_ref (pixbuf); - g_assert (priv->pixbuf == NULL); - - priv->pixbuf = pixbuf; - gtk_signal_emit (GTK_OBJECT (loader), pixbuf_loader_signals[AREA_PREPARED]); -} - -static void -gdk_pixbuf_loader_update (GdkPixbuf *pixbuf, guint x, guint y, guint width, guint height, gpointer loader) -{ - GdkPixbufLoaderPrivate *priv = NULL; - - priv = GDK_PIXBUF_LOADER (loader)->private; - - gtk_signal_emit (GTK_OBJECT (loader), - pixbuf_loader_signals[AREA_UPDATED], - x, y, - /* sanity check in here. Defend against an errant loader */ - MIN (width, gdk_pixbuf_get_width (priv->pixbuf)), - MIN (height, gdk_pixbuf_get_height (priv->pixbuf))); -} - -static void -gdk_pixbuf_loader_frame_done (GdkPixbufFrame *frame, gpointer loader) -{ - GdkPixbufLoaderPrivate *priv = NULL; - - priv = GDK_PIXBUF_LOADER (loader)->private; - - priv->pixbuf = NULL; - - if (priv->animation == NULL) { - priv->animation = g_new0 (GdkPixbufAnimation, 1); - priv->animation->n_frames = 0; - priv->animation->ref_count = 1; - priv->animation->width = gdk_pixbuf_get_width (frame->pixbuf); - priv->animation->height = gdk_pixbuf_get_height (frame->pixbuf); - } else { - int w, h; - - /* update bbox size */ - w = gdk_pixbuf_get_width (frame->pixbuf); - h = gdk_pixbuf_get_height (frame->pixbuf); - - if (w > priv->animation->width) { - priv->animation->width = h; - } - if (h > priv->animation->height) { - priv->animation->height = h; - } - } - - priv->animation->frames = g_list_append (priv->animation->frames, frame); - priv->animation->n_frames ++; - gtk_signal_emit (GTK_OBJECT (loader), - pixbuf_loader_signals[FRAME_DONE], - frame); -} - -static void -gdk_pixbuf_loader_animation_done (GdkPixbuf *pixbuf, gpointer loader) -{ - gtk_signal_emit (GTK_OBJECT (loader), - pixbuf_loader_signals[ANIMATION_DONE]); -} - - - -/** - * gdk_pixbuf_loader_new: - * - * Creates a new pixbuf loader object. - * - * Return value: A newly-created pixbuf loader. - **/ -GdkPixbufLoader * -gdk_pixbuf_loader_new (void) -{ - return gtk_type_new (gdk_pixbuf_loader_get_type ()); -} - -static int -gdk_pixbuf_loader_load_module(GdkPixbufLoader *loader) -{ - GdkPixbufLoaderPrivate *priv = loader->private; - - priv->image_module = gdk_pixbuf_get_module (priv->header_buf, priv->header_buf_offset); - - if (priv->image_module == NULL) - return 0; - - if (priv->image_module->module == NULL) - gdk_pixbuf_load_module (priv->image_module); - - if (priv->image_module->module == NULL) - return 0; - - if ((priv->image_module->begin_load == NULL) || - (priv->image_module->stop_load == NULL) || - (priv->image_module->load_increment == NULL)) { - g_warning ("module %s does not support incremental loading.\n", - priv->image_module->module_name); - return 0; - } - - priv->context = (*priv->image_module->begin_load) (gdk_pixbuf_loader_prepare, - gdk_pixbuf_loader_update, - gdk_pixbuf_loader_frame_done, - gdk_pixbuf_loader_animation_done, - loader); - - if (priv->context == NULL) { - g_warning("Failed to begin progressive load"); - return 0; - } - - if( (* priv->image_module->load_increment) (priv->context, priv->header_buf, priv->header_buf_offset) ) - return priv->header_buf_offset; - - return 0; -} - -static int -gdk_pixbuf_loader_eat_header_write (GdkPixbufLoader *loader, const guchar *buf, size_t count) -{ - int nbytes; - GdkPixbufLoaderPrivate *priv = loader->private; - - nbytes = MIN(LOADER_HEADER_SIZE - priv->header_buf_offset, count); - memcpy (priv->header_buf + priv->header_buf_offset, buf, nbytes); - - priv->header_buf_offset += nbytes; - - if(priv->header_buf_offset >= LOADER_HEADER_SIZE) { - if (gdk_pixbuf_loader_load_module(loader) == 0) - return 0; - } - return nbytes; -} - -/** - * gdk_pixbuf_loader_write: - * @loader: A pixbuf loader. - * @buf: Pointer to image data. - * @count: Length of the @buf buffer in bytes. - * - * This will cause a pixbuf loader to parse the next @count bytes of an image. - * It will return TRUE if the data was loaded successfully, and FALSE if an - * error occurred. In the latter case, the loader will be closed, and will not - * accept further writes. - * - * Return value: #TRUE if the write was successful, or #FALSE if the loader - * cannot parse the buffer. - **/ -gboolean -gdk_pixbuf_loader_write (GdkPixbufLoader *loader, const guchar *buf, size_t count) -{ - GdkPixbufLoaderPrivate *priv; - - g_return_val_if_fail (loader != NULL, FALSE); - g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), FALSE); - - g_return_val_if_fail (buf != NULL, FALSE); - g_return_val_if_fail (count >= 0, FALSE); - - priv = loader->private; - - /* we expect it's not to be closed */ - g_return_val_if_fail (priv->closed == FALSE, FALSE); - - if (priv->image_module == NULL) { - int eaten; - - eaten = gdk_pixbuf_loader_eat_header_write(loader, buf, count); - if (eaten <= 0) - return FALSE; - - count -= eaten; - buf += eaten; - } - - if (count > 0 && priv->image_module->load_increment) - return (* priv->image_module->load_increment) (priv->context, buf, count); - - return TRUE; -} - -/** - * gdk_pixbuf_loader_get_pixbuf: - * @loader: A pixbuf loader. - * - * Queries the GdkPixbuf that a pixbuf loader is currently creating. In general - * it only makes sense to call this function afer the "area_prepared" signal has - * been emitted by the loader; this means that enough data has been read to know - * the size of the image that will be allocated. If the loader has not received - * enough data via gdk_pixbuf_loader_write(), then this function returns NULL. - * The returned pixbuf will be the same in all future calls to the loader, so - * simply calling gdk_pixbuf_ref() should be sufficient to continue using it. - * - * Return value: The GdkPixbuf that the loader is creating, or NULL if not - * enough data has been read to determine how to create the image buffer. - **/ -GdkPixbuf * -gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader) -{ - GdkPixbufLoaderPrivate *priv; - - g_return_val_if_fail (loader != NULL, NULL); - g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), NULL); - - priv = loader->private; - - return priv->pixbuf; -} - -/** - * gdk_pixbuf_loader_get_animation: - * @loader: A pixbuf loader - * - * Queries the GdkPixbufAnimation that a pixbuf loader is currently creating. - * In general it only makes sense to call this function afer the "area_prepared" - * signal has been emitted by the loader. If the image is not an animation, - * then it will return NULL. - * - * Return value: The GdkPixbufAnimation that the loader is loading, or NULL if - not enough data has been read to determine the information. - **/ -GdkPixbufAnimation * -gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader) -{ - GdkPixbufLoaderPrivate *priv; - - g_return_val_if_fail (loader != NULL, NULL); - g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), NULL); - - priv = loader->private; - - return priv->animation; -} - -/** - * gdk_pixbuf_loader_close: - * @loader: A pixbuf loader. - * - * Informs a pixbuf loader that no further writes with gdk_pixbuf_load_write() - * will occur, so that it can free its internal loading structures. - **/ -void -gdk_pixbuf_loader_close (GdkPixbufLoader *loader) -{ - GdkPixbufLoaderPrivate *priv; - - g_return_if_fail (loader != NULL); - g_return_if_fail (GDK_IS_PIXBUF_LOADER (loader)); - - priv = loader->private; - - /* we expect it's not closed */ - g_return_if_fail (priv->closed == FALSE); - - /* We have less the 128 bytes in the image. Flush it, and keep going. */ - if (priv->image_module == NULL) - gdk_pixbuf_loader_load_module (loader); - - if (priv->image_module && priv->image_module->stop_load) - (* priv->image_module->stop_load) (priv->context); - - priv->closed = TRUE; - - gtk_signal_emit (GTK_OBJECT (loader), - pixbuf_loader_signals[CLOSED]); -} - diff --git a/gdk-pixbuf/gdk-pixbuf-loader.h b/gdk-pixbuf/gdk-pixbuf-loader.h deleted file mode 100644 index 9f9a79dc25..0000000000 --- a/gdk-pixbuf/gdk-pixbuf-loader.h +++ /dev/null @@ -1,88 +0,0 @@ -/* GdkPixbuf library - Main header file - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Mark Crichton - * Miguel de Icaza - * Federico Mena-Quintero - * Jonathan Blandford - * - * 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 GDK_PIXBUF_LOADER_H -#define GDK_PIXBUF_LOADER_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - - -#define GDK_TYPE_PIXBUF_LOADER (gdk_pixbuf_loader_get_type ()) -#define GDK_PIXBUF_LOADER(obj) (GTK_CHECK_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoader)) -#define GDK_PIXBUF_LOADER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass)) -#define GDK_IS_PIXBUF_LOADER(obj) (GTK_CHECK_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER)) -#define GDK_IS_PIXBUF_LOADER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER)) - - -typedef struct _GdkPixbufLoader GdkPixbufLoader; -struct _GdkPixbufLoader -{ - GtkObject object; - - /* < Private > */ - gpointer private; -}; - -typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass; -struct _GdkPixbufLoaderClass { - GtkObjectClass parent_class; - - void (* area_prepared) (GdkPixbufLoader *loader); - - void (* area_updated) (GdkPixbufLoader *loader, - guint x, guint y, guint width, guint height); - - void (* frame_done) (GdkPixbufLoader *loader, GdkPixbufFrame *frame); - - void (* animation_done) (GdkPixbufLoader *loader); - - void (* closed) (GdkPixbufLoader *loader); -}; - - - -GtkType gdk_pixbuf_loader_get_type (void); -GdkPixbufLoader *gdk_pixbuf_loader_new (void); -gboolean gdk_pixbuf_loader_write (GdkPixbufLoader *loader, - const guchar *buf, - size_t count); -GdkPixbuf *gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader); -GdkPixbufAnimation *gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader); -void gdk_pixbuf_loader_close (GdkPixbufLoader *loader); - - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/gdk-pixbuf/gdk-pixbuf-scale.c b/gdk-pixbuf/gdk-pixbuf-scale.c deleted file mode 100644 index 0f621d1d61..0000000000 --- a/gdk-pixbuf/gdk-pixbuf-scale.c +++ /dev/null @@ -1,214 +0,0 @@ -#include "gdk-pixbuf.h" -#include "pixops/pixops.h" -#include "math.h" - -/** - * gdk_pixbuf_scale: - * @src: a #GdkPixbuf - * @dest: the #GdkPixbuf into which to render the results - * @dest_x: the left coordinate for region to render - * @dest_y: the top coordinate for region to render - * @dest_width: the width of the region to render - * @dest_height: the height of the region to render - * @offset_x: the offset in the X direction (currently rounded to an integer) - * @offset_y: the offset in the Y direction (currently rounded to an integer) - * @scale_x: the scale factor in the X direction - * @scale_y: the scale factor in the Y direction - * @filter_level: the filter quality for the transformation. - * - * Transforms the image by source image by scaling by @scale_x and @scale_y then - * translating by @offset_x and @offset_y, then renders the rectangle - * (@dest,@dest_y,@dest_width,@dest_height) of the resulting image onto the - * destination drawable replacing the previous contents. - **/ -void -gdk_pixbuf_scale (const GdkPixbuf *src, - GdkPixbuf *dest, - int dest_x, - int dest_y, - int dest_width, - int dest_height, - double offset_x, - double offset_y, - double scale_x, - double scale_y, - ArtFilterLevel filter_level) -{ - offset_x = floor (offset_x + 0.5); - offset_y = floor (offset_y + 0.5); - - pixops_scale (dest->art_pixbuf->pixels + dest_y * dest->art_pixbuf->rowstride + dest_x * dest->art_pixbuf->n_channels, - -offset_x, -offset_y, dest_width - offset_x, dest_height - offset_y, - dest->art_pixbuf->rowstride, dest->art_pixbuf->n_channels, dest->art_pixbuf->has_alpha, - src->art_pixbuf->pixels, src->art_pixbuf->width, src->art_pixbuf->height, - src->art_pixbuf->rowstride, src->art_pixbuf->n_channels, src->art_pixbuf->has_alpha, - scale_x, scale_y, filter_level); -} - -/** - * gdk_pixbuf_composite: - * @src: a #GdkPixbuf - * @dest: the #GdkPixbuf into which to render the results - * @dest_x: the left coordinate for region to render - * @dest_y: the top coordinate for region to render - * @dest_width: the width of the region to render - * @dest_height: the height of the region to render - * @offset_x: the offset in the X direction (currently rounded to an integer) - * @offset_y: the offset in the Y direction (currently rounded to an integer) - * @scale_x: the scale factor in the X direction - * @scale_y: the scale factor in the Y direction - * @filter_level: the filter quality for the transformation. - * @overall_alpha: overall alpha for source image (0..255) - * - * Transforms the image by source image by scaling by @scale_x and @scale_y then - * translating by @offset_x and @offset_y, then composites the rectangle - * (@dest,@dest_y,@dest_width,@dest_height) of the resulting image onto the - * destination drawable. - **/ -void -gdk_pixbuf_composite (const GdkPixbuf *src, - GdkPixbuf *dest, - int dest_x, - int dest_y, - int dest_width, - int dest_height, - double offset_x, - double offset_y, - double scale_x, - double scale_y, - ArtFilterLevel filter_level, - int overall_alpha) -{ - offset_x = floor (offset_x + 0.5); - offset_y = floor (offset_y + 0.5); - pixops_composite (dest->art_pixbuf->pixels + dest_y * dest->art_pixbuf->rowstride + dest_x * dest->art_pixbuf->n_channels, - -offset_x, -offset_y, dest_width - offset_x, dest_height - offset_y, - dest->art_pixbuf->rowstride, dest->art_pixbuf->n_channels, dest->art_pixbuf->has_alpha, - src->art_pixbuf->pixels, src->art_pixbuf->width, src->art_pixbuf->height, - src->art_pixbuf->rowstride, src->art_pixbuf->n_channels, src->art_pixbuf->has_alpha, - scale_x, scale_y, filter_level, overall_alpha); -} - -/** - * gdk_pixbuf_composite_color: - * @src: a #GdkPixbuf - * @dest: the #GdkPixbuf into which to render the results - * @dest_x: the left coordinate for region to render - * @dest_y: the top coordinate for region to render - * @dest_width: the width of the region to render - * @dest_height: the height of the region to render - * @offset_x: the offset in the X direction (currently rounded to an integer) - * @offset_y: the offset in the Y direction (currently rounded to an integer) - * @scale_x: the scale factor in the X direction - * @scale_y: the scale factor in the Y direction - * @filter_level: the filter quality for the transformation. - * @overall_alpha: overall alpha for source image (0..255) - * @check_x: the X offset for the checkboard (origin of checkboard is at -@check_x, -@check_y) - * @check_y: the Y offset for the checkboard - * @check_size: the size of checks in the checkboard (must be a power of two) - * @color1: the color of check at upper left - * @color2: the color of the other check - * - * Transforms the image by source image by scaling by @scale_x and @scale_y then - * translating by @offset_x and @offset_y, then composites the rectangle - * (@dest,@dest_y,@dest_width,@dest_height) of the resulting image with - * a checkboard of the colors @color1 and @color2 and renders it onto the - * destination drawable. - **/ -void -gdk_pixbuf_composite_color (const GdkPixbuf *src, - GdkPixbuf *dest, - int dest_x, - int dest_y, - int dest_width, - int dest_height, - double offset_x, - double offset_y, - double scale_x, - double scale_y, - ArtFilterLevel filter_level, - int overall_alpha, - int check_x, - int check_y, - int check_size, - art_u32 color1, - art_u32 color2) -{ - offset_x = floor (offset_x + 0.5); - offset_y = floor (offset_y + 0.5); - - pixops_composite_color (dest->art_pixbuf->pixels + dest_y * dest->art_pixbuf->rowstride + dest_x * dest->art_pixbuf->n_channels, - -offset_x, -offset_y, dest_width - offset_x, dest_height - offset_y, - dest->art_pixbuf->rowstride, dest->art_pixbuf->n_channels, dest->art_pixbuf->has_alpha, - src->art_pixbuf->pixels, src->art_pixbuf->width, src->art_pixbuf->height, - src->art_pixbuf->rowstride, src->art_pixbuf->n_channels, src->art_pixbuf->has_alpha, - scale_x, scale_y, filter_level, overall_alpha, check_x, check_y, check_size, color1, color2); -} - -/** - * gdk_pixbuf_scale_simple: - * @src: a #GdkPixbuf - * @dest_width: the width of destination image - * @dest_height: the height of destination image - * @filter_level: the filter quality for the transformation. - * - * Scale the #GdkPixbuf @src to @dest_width x @dest_height and render the result into - * a new #GdkPixbuf. - * - * Return value: the new #GdkPixbuf - **/ -GdkPixbuf * -gdk_pixbuf_scale_simple (const GdkPixbuf *src, - int dest_width, - int dest_height, - ArtFilterLevel filter_level) -{ - GdkPixbuf *dest = gdk_pixbuf_new (ART_PIX_RGB, src->art_pixbuf->has_alpha, 8, dest_width, dest_height); - - gdk_pixbuf_scale (src, dest, 0, 0, dest_width, dest_height, 0, 0, - (double)dest_width / src->art_pixbuf->width, - (double)dest_height / src->art_pixbuf->height, - filter_level); - - return dest; -} - -/** - * gdk_pixbuf_composite_color_simple: - * @src: a #GdkPixbuf - * @dest_width: the width of destination image - * @dest_height: the height of destination image - * @filter_level: the filter quality for the transformation. - * @overall_alpha: overall alpha for source image (0..255) - * @check_size: the size of checks in the checkboard (must be a power of two) - * @color1: the color of check at upper left - * @color2: the color of the other check - * - * Scale the #GdkPixbuf @src to @dest_width x @dest_height composite the result with - * a checkboard of colors @color1 and @color2 and render the result into - * a new #GdkPixbuf. - * - * Return value: the new #GdkPixbuf - **/ -GdkPixbuf * -gdk_pixbuf_composite_color_simple (const GdkPixbuf *src, - int dest_width, - int dest_height, - ArtFilterLevel filter_level, - int overall_alpha, - int check_size, - art_u32 color1, - art_u32 color2) -{ - GdkPixbuf *dest = gdk_pixbuf_new (ART_PIX_RGB, src->art_pixbuf->has_alpha, 8, dest_width, dest_height); - - gdk_pixbuf_composite_color (src, dest, 0, 0, dest_width, dest_height, 0, 0, - (double)dest_width / src->art_pixbuf->width, - (double)dest_height / src->art_pixbuf->height, - filter_level, overall_alpha, 0, 0, check_size, color1, color2); - - return dest; -} - - - diff --git a/gdk-pixbuf/gdk-pixbuf-util.c b/gdk-pixbuf/gdk-pixbuf-util.c deleted file mode 100644 index 96a8ca49bf..0000000000 --- a/gdk-pixbuf/gdk-pixbuf-util.c +++ /dev/null @@ -1,144 +0,0 @@ -/* GdkPixbuf library - Utilities and miscellaneous convenience functions - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Federico Mena-Quintero - * Cody Russell - * - * 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. - */ - -#include -#include "gdk-pixbuf.h" - - - -/** - * gdk_pixbuf_add_alpha: - * @pixbuf: A pixbuf. - * @substitute_color: Whether to substitute a color for zero opacity. If this - * is #FALSE, then the (@r, @g, @b) arguments will be ignored. - * @r: Red value to substitute. - * @g: Green value to substitute. - * @b: Blue value to substitute. - * - * Takes an existing pixbuf and adds an alpha channel to it. If the original - * pixbuf already had alpha information, then the contents of the new pixbuf are - * exactly the same as the original's. Otherwise, the new pixbuf will have all - * pixels with full opacity if @substitute_color is #FALSE. If - * @substitute_color is #TRUE, then the color specified by (@r, @g, @b) will be - * substituted for zero opacity. - * - * Return value: A newly-created pixbuf with a reference count of 1. - **/ -GdkPixbuf * -gdk_pixbuf_add_alpha (GdkPixbuf *pixbuf, gboolean substitute_color, guchar r, guchar g, guchar b) -{ - ArtPixBuf *apb; - ArtPixBuf *new_apb; - GdkPixbuf *new_pixbuf; - int x, y; - - g_return_val_if_fail (pixbuf != NULL, NULL); - - apb = pixbuf->art_pixbuf; - g_return_val_if_fail (apb->format == ART_PIX_RGB, NULL); - g_return_val_if_fail (apb->n_channels == 3 || apb->n_channels == 4, NULL); - g_return_val_if_fail (apb->bits_per_sample == 8, NULL); - - if (apb->has_alpha) { - new_apb = art_pixbuf_duplicate (apb); - if (!new_apb) - return NULL; - - return gdk_pixbuf_new_from_art_pixbuf (new_apb); - } - - new_pixbuf = gdk_pixbuf_new (ART_PIX_RGB, TRUE, 8, apb->width, apb->height); - if (!new_pixbuf) - return NULL; - - new_apb = new_pixbuf->art_pixbuf; - - for (y = 0; y < apb->height; y++) { - guchar *src, *dest; - guchar tr, tg, tb; - - src = apb->pixels + y * apb->rowstride; - dest = new_apb->pixels + y * new_apb->rowstride; - - for (x = 0; x < apb->width; x++) { - tr = *dest++ = *src++; - tg = *dest++ = *src++; - tb = *dest++ = *src++; - - if (substitute_color && tr == r && tg == g && tb == b) - *dest++ = 0; - else - *dest++ = 255; - } - } - - return new_pixbuf; -} - -/** - * gdk_pixbuf_copy_area: - * @src_pixbuf: Source pixbuf. - * @src_x: Source X coordinate within @src_pixbuf. - * @src_y: Source Y coordinate within @src_pixbuf. - * @width: Width of the area to copy. - * @height: Height of the area to copy. - * @dest_pixbuf: Destination pixbuf. - * @dest_x: X coordinate within @dest_pixbuf. - * @dest_y: Y coordinate within @dest_pixbuf. - * - * Copies a rectangular area from @src_pixbuf to @dest_pixbuf. Conversion of - * pixbuf formats is done automatically. - **/ -void -gdk_pixbuf_copy_area (const GdkPixbuf *src_pixbuf, - int src_x, int src_y, - int width, int height, - GdkPixbuf *dest_pixbuf, - int dest_x, int dest_y) -{ - const ArtPixBuf *src_apb; - ArtPixBuf *dest_apb; - - g_return_if_fail (src_pixbuf != NULL); - g_return_if_fail (dest_pixbuf != NULL); - - src_apb = src_pixbuf->art_pixbuf; - dest_apb = dest_pixbuf->art_pixbuf; - - g_return_if_fail (src_x >= 0 && src_x + width <= src_apb->width); - g_return_if_fail (src_y >= 0 && src_y + height <= src_apb->height); - - g_return_if_fail (dest_x >= 0 && dest_x + width <= dest_apb->width); - g_return_if_fail (dest_y >= 0 && dest_y + height <= dest_apb->height); - - /* This will perform format conversions automatically */ - - gdk_pixbuf_scale (src_pixbuf, - dest_pixbuf, - dest_x, dest_y, - width, height, - (double) (dest_x - src_x), - (double) (dest_y - src_y), - 1.0, 1.0, - ART_FILTER_NEAREST); -} diff --git a/gdk-pixbuf/gdk-pixbuf-xform.c b/gdk-pixbuf/gdk-pixbuf-xform.c deleted file mode 100644 index f118d9234a..0000000000 --- a/gdk-pixbuf/gdk-pixbuf-xform.c +++ /dev/null @@ -1,95 +0,0 @@ -GdkPixbuf * -gdk_pixbuf_scale (const GdkPixbuf *pixbuf, gint w, gint h) -{ - art_u8 *pixels; - gint rowstride; - double affine[6]; - ArtAlphaGamma *alphagamma; - ArtPixBuf *art_pixbuf = NULL; - GdkPixbuf *copy = NULL; - - alphagamma = NULL; - - affine[1] = affine[2] = affine[4] = affine[5] = 0; - - affine[0] = w / (double)(pixbuf->art_pixbuf->width); - affine[3] = h / (double)(pixbuf->art_pixbuf->height); - - /* rowstride = w * pixbuf->art_pixbuf->n_channels; */ - rowstride = w * 3; - - pixels = art_alloc (h * rowstride); - art_rgb_pixbuf_affine (pixels, 0, 0, w, h, rowstride, - pixbuf->art_pixbuf, - affine, ART_FILTER_NEAREST, alphagamma); - - if (pixbuf->art_pixbuf->has_alpha) - /* should be rgba */ - art_pixbuf = art_pixbuf_new_rgb(pixels, w, h, rowstride); - else - art_pixbuf = art_pixbuf_new_rgb(pixels, w, h, rowstride); - - copy = gdk_pixbuf_new (art_pixbuf, NULL); - - if (!copy) - art_free (pixels); - - return copy; -} - -GdkPixbuf * -gdk_pixbuf_rotate (GdkPixbuf *pixbuf, gdouble angle) -{ - art_u8 *pixels; - gint rowstride, w, h; - gdouble rad; - double rot[6], trans[6], affine[6]; - ArtAlphaGamma *alphagamma = NULL; - ArtPixBuf *art_pixbuf = NULL; - - w = pixbuf->art_pixbuf->width; - h = pixbuf->art_pixbuf->height; - - rad = (M_PI * angle / 180.0); - - rot[0] = cos(rad); - rot[1] = sin(rad); - rot[2] = -sin(rad); - rot[3] = cos(rad); - rot[4] = rot[5] = 0; - - trans[0] = trans[3] = 1; - trans[1] = trans[2] = 0; - trans[4] = -(double)w / 2.0; - trans[5] = -(double)h / 2.0; - - art_affine_multiply(rot, trans, rot); - - trans[0] = trans[3] = 1; - trans[1] = trans[2] = 0; - trans[4] = (double)w / 2.0; - trans[5] = (double)h / 2.0; - - art_affine_multiply(affine, rot, trans); -/* - g_print("Affine: %e %e %e %e %e %e\n", affine[0], affine[1], affine[2], - affine[3], affine[4], affine[5]); -*/ - /* rowstride = w * pixbuf->art_pixbuf->n_channels; */ - rowstride = w * 3; - - pixels = art_alloc (h * rowstride); - art_rgb_pixbuf_affine (pixels, 0, 0, w, h, rowstride, - pixbuf->art_pixbuf, - affine, ART_FILTER_NEAREST, alphagamma); - if (pixbuf->art_pixbuf->has_alpha) - /* should be rgba */ - art_pixbuf = art_pixbuf_new_rgb(pixels, w, h, rowstride); - else - art_pixbuf = art_pixbuf_new_rgb(pixels, w, h, rowstride); - - art_pixbuf_free (pixbuf->art_pixbuf); - pixbuf->art_pixbuf = art_pixbuf; - - return pixbuf; -} diff --git a/gdk-pixbuf/gdk-pixbuf.c b/gdk-pixbuf/gdk-pixbuf.c deleted file mode 100644 index 1c7162267a..0000000000 --- a/gdk-pixbuf/gdk-pixbuf.c +++ /dev/null @@ -1,315 +0,0 @@ -/* GdkPixbuf library - Basic memory management - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Mark Crichton - * Miguel de Icaza - * Federico Mena-Quintero - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include "gdk-pixbuf.h" - - - -/* Reference counting */ - -/** - * gdk_pixbuf_ref: - * @pixbuf: A pixbuf. - * - * Adds a reference to a pixbuf. It must be released afterwards using - * gdk_pixbuf_unref(). - * - * Return value: The same as the @pixbuf argument. - **/ -GdkPixbuf * -gdk_pixbuf_ref (GdkPixbuf *pixbuf) -{ - g_return_val_if_fail (pixbuf != NULL, NULL); - g_return_val_if_fail (pixbuf->ref_count > 0, NULL); - - pixbuf->ref_count++; - return pixbuf; -} - -/** - * gdk_pixbuf_unref: - * @pixbuf: A pixbuf. - * - * Removes a reference from a pixbuf. It will be destroyed when the reference - * count drops to zero. - **/ -void -gdk_pixbuf_unref (GdkPixbuf *pixbuf) -{ - g_return_if_fail (pixbuf != NULL); - g_return_if_fail (pixbuf->ref_count > 0); - - pixbuf->ref_count--; - - if (pixbuf->ref_count == 0) { - art_pixbuf_free (pixbuf->art_pixbuf); - pixbuf->art_pixbuf = NULL; - g_free (pixbuf); - } -} - - - -/* Wrap a libart pixbuf */ - -/** - * gdk_pixbuf_new_from_art_pixbuf: - * @art_pixbuf: A libart pixbuf. - * - * Creates a #GdkPixbuf by wrapping a libart pixbuf. - * - * Return value: A newly-created #GdkPixbuf structure with a reference count of - * 1. - **/ -GdkPixbuf * -gdk_pixbuf_new_from_art_pixbuf (ArtPixBuf *art_pixbuf) -{ - GdkPixbuf *pixbuf; - - g_return_val_if_fail (art_pixbuf != NULL, NULL); - - pixbuf = g_new (GdkPixbuf, 1); - pixbuf->ref_count = 1; - pixbuf->art_pixbuf = art_pixbuf; - - return pixbuf; -} - -/* Destroy notification function for gdk_pixbuf_new() */ -static void -free_buffer (gpointer user_data, gpointer data) -{ - free (data); -} - - - -/* Create an empty pixbuf */ - -/** - * gdk_pixbuf_new: - * @format: Image format. - * @has_alpha: Whether the image should have transparency information. - * @bits_per_sample: Number of bits per color sample. - * @width: Width of image in pixels. - * @height: Height of image in pixels. - * - * Creates a new #GdkPixbuf structure and allocates a buffer for it. The buffer - * has an optimal rowstride. Note that the buffer is not cleared; you will have - * to fill it completely. - * - * Return value: A newly-created #GdkPixbuf with a reference count of 1, or NULL - * if not enough memory could be allocated for the image buffer. - **/ -GdkPixbuf * -gdk_pixbuf_new (ArtPixFormat format, gboolean has_alpha, int bits_per_sample, - int width, int height) -{ - guchar *buf; - int channels; - int rowstride; - - g_return_val_if_fail (format == ART_PIX_RGB, NULL); - g_return_val_if_fail (bits_per_sample == 8, NULL); - g_return_val_if_fail (width > 0, NULL); - g_return_val_if_fail (height > 0, NULL); - - /* Always align rows to 32-bit boundaries */ - - channels = has_alpha ? 4 : 3; - rowstride = 4 * ((channels * width + 3) / 4); - - buf = malloc (height * rowstride); - if (!buf) - return NULL; - - return gdk_pixbuf_new_from_data (buf, format, has_alpha, width, height, rowstride, - free_buffer, NULL); -} - - - -/* Convenience functions */ - -/** - * gdk_pixbuf_get_format: - * @pixbuf: A pixbuf. - * - * Queries the image format (color model) of a pixbuf. - * - * Return value: Image format. - **/ -ArtPixFormat -gdk_pixbuf_get_format (GdkPixbuf *pixbuf) -{ - g_return_val_if_fail (pixbuf != NULL, ART_PIX_RGB); - g_assert (pixbuf->art_pixbuf != NULL); - - return pixbuf->art_pixbuf->format; -} - -/** - * gdk_pixbuf_get_n_channels: - * @pixbuf: A pixbuf. - * - * Queries the number of channels of a pixbuf. - * - * Return value: Number of channels. - **/ -int -gdk_pixbuf_get_n_channels (GdkPixbuf *pixbuf) -{ - g_return_val_if_fail (pixbuf != NULL, -1); - g_assert (pixbuf->art_pixbuf != NULL); - - return pixbuf->art_pixbuf->n_channels; -} - -/** - * gdk_pixbuf_get_has_alpha: - * @pixbuf: A pixbuf. - * - * Queries whether a pixbuf has an alpha channel (opacity information). - * - * Return value: TRUE if it has an alpha channel, FALSE otherwise. - **/ -gboolean -gdk_pixbuf_get_has_alpha (GdkPixbuf *pixbuf) -{ - g_return_val_if_fail (pixbuf != NULL, -1); - g_assert (pixbuf->art_pixbuf != NULL); - - return pixbuf->art_pixbuf->has_alpha; -} - -/** - * gdk_pixbuf_get_bits_per_sample: - * @pixbuf: A pixbuf. - * - * Queries the number of bits per color sample in a pixbuf. - * - * Return value: Number of bits per color sample. - **/ -int -gdk_pixbuf_get_bits_per_sample (GdkPixbuf *pixbuf) -{ - g_return_val_if_fail (pixbuf != NULL, -1); - g_assert (pixbuf->art_pixbuf != NULL); - - return pixbuf->art_pixbuf->bits_per_sample; -} - -/** - * gdk_pixbuf_get_pixels: - * @pixbuf: A pixbuf. - * - * Queries a pointer to the pixel data of a pixbuf. - * - * Return value: A pointer to the pixbuf's pixel data. - **/ -guchar * -gdk_pixbuf_get_pixels (GdkPixbuf *pixbuf) -{ - g_return_val_if_fail (pixbuf != NULL, NULL); - g_assert (pixbuf->art_pixbuf != NULL); - - return pixbuf->art_pixbuf->pixels; -} - -/** - * gdk_pixbuf_get_width: - * @pixbuf: A pixbuf. - * - * Queries the width of a pixbuf. - * - * Return value: Width in pixels. - **/ -int -gdk_pixbuf_get_width (GdkPixbuf *pixbuf) -{ - g_return_val_if_fail (pixbuf != NULL, -1); - g_assert (pixbuf->art_pixbuf != NULL); - - return pixbuf->art_pixbuf->width; -} - -/** - * gdk_pixbuf_get_height: - * @pixbuf: A pixbuf. - * - * Queries the height of a pixbuf. - * - * Return value: Height in pixels. - **/ -int -gdk_pixbuf_get_height (GdkPixbuf *pixbuf) -{ - g_return_val_if_fail (pixbuf != NULL, -1); - g_assert (pixbuf->art_pixbuf != NULL); - - return pixbuf->art_pixbuf->height; -} - -/** - * gdk_pixbuf_get_rowstride: - * @pixbuf: A pixbuf. - * - * Queries the rowstride of a pixbuf, or the number of bytes between rows. - * - * Return value: Number of bytes between rows. - **/ -int -gdk_pixbuf_get_rowstride (GdkPixbuf *pixbuf) -{ - g_return_val_if_fail (pixbuf != NULL, -1); - g_assert (pixbuf->art_pixbuf != NULL); - - return pixbuf->art_pixbuf->rowstride; -} - - - -/* General initialization hooks */ -const guint gdk_pixbuf_major_version=GDK_PIXBUF_MAJOR, - gdk_pixbuf_minor_version=GDK_PIXBUF_MINOR, - gdk_pixbuf_micro_version=GDK_PIXBUF_MICRO; - -const char *gdk_pixbuf_version = GDK_PIXBUF_VERSION; - -void -gdk_pixbuf_preinit(gpointer app, gpointer modinfo) -{ -} - -void -gdk_pixbuf_postinit(gpointer app, gpointer modinfo) -{ -} diff --git a/gdk-pixbuf/gdk-pixbuf.h b/gdk-pixbuf/gdk-pixbuf.h deleted file mode 100644 index aca5ab36bd..0000000000 --- a/gdk-pixbuf/gdk-pixbuf.h +++ /dev/null @@ -1,258 +0,0 @@ -/* GdkPixbuf library - Main header file - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Mark Crichton - * Miguel de Icaza - * Federico Mena-Quintero - * - * 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 GDK_PIXBUF_H -#define GDK_PIXBUF_H - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* GdkPixbuf structures */ -typedef struct _GdkPixbuf GdkPixbuf; -typedef struct _GdkPixbufFrame GdkPixbufFrame; -typedef struct _GdkPixbufAnimation GdkPixbufAnimation; - -struct _GdkPixbuf { - /* Reference count */ - int ref_count; - - /* Libart pixbuf */ - ArtPixBuf *art_pixbuf; -}; - -/* GIF-like animation overlay modes for frames */ -typedef enum { - GDK_PIXBUF_FRAME_RETAIN, - GDK_PIXBUF_FRAME_DISPOSE, - GDK_PIXBUF_FRAME_REVERT -} GdkPixbufFrameAction; - -struct _GdkPixbufFrame { - /* The pixbuf with this frame's image data */ - GdkPixbuf *pixbuf; - - /* Offsets for overlaying onto the animation's area */ - int x_offset; - int y_offset; - - /* Frame duration in ms */ - int delay_time; - - /* Overlay mode */ - GdkPixbufFrameAction action; -}; - -struct _GdkPixbufAnimation { - /* Reference count */ - int ref_count; - - /* Number of frames */ - int n_frames; - - /* List of GdkPixbufFrame structures */ - GList *frames; - - /* bounding box size */ - int width, height; -}; - - - -/* Convenience functions */ - -ArtPixFormat gdk_pixbuf_get_format (GdkPixbuf *pixbuf); -int gdk_pixbuf_get_n_channels (GdkPixbuf *pixbuf); -gboolean gdk_pixbuf_get_has_alpha (GdkPixbuf *pixbuf); -int gdk_pixbuf_get_bits_per_sample (GdkPixbuf *pixbuf); -guchar *gdk_pixbuf_get_pixels (GdkPixbuf *pixbuf); -int gdk_pixbuf_get_width (GdkPixbuf *pixbuf); -int gdk_pixbuf_get_height (GdkPixbuf *pixbuf); -int gdk_pixbuf_get_rowstride (GdkPixbuf *pixbuf); - -/* Reference counting */ - -GdkPixbuf *gdk_pixbuf_ref (GdkPixbuf *pixbuf); -void gdk_pixbuf_unref (GdkPixbuf *pixbuf); - -/* Wrap a libart pixbuf */ -GdkPixbuf *gdk_pixbuf_new_from_art_pixbuf (ArtPixBuf *art_pixbuf); - -/* Create a blank pixbuf with an optimal rowstride and a new buffer */ -GdkPixbuf *gdk_pixbuf_new (ArtPixFormat format, gboolean has_alpha, int bits_per_sample, - int width, int height); - -/* Simple loading */ - -GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename); - -GdkPixbuf *gdk_pixbuf_new_from_data (const guchar *data, - ArtPixFormat format, - gboolean has_alpha, - int width, int height, - int rowstride, - ArtDestroyNotify dfunc, - gpointer dfunc_data); - -GdkPixbuf *gdk_pixbuf_new_from_xpm_data (const char **data); - -/* Adding an alpha channel */ -GdkPixbuf *gdk_pixbuf_add_alpha (GdkPixbuf *pixbuf, gboolean substitute_color, - guchar r, guchar g, guchar b); - -/* Rendering to a drawable */ - -/* Alpha compositing mode */ -typedef enum { - GDK_PIXBUF_ALPHA_BILEVEL, - GDK_PIXBUF_ALPHA_FULL -} GdkPixbufAlphaMode; - -void gdk_pixbuf_render_threshold_alpha (GdkPixbuf *pixbuf, GdkBitmap *bitmap, - int src_x, int src_y, - int dest_x, int dest_y, - int width, int height, - int alpha_threshold); - -void gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, - GdkDrawable *drawable, GdkGC *gc, - int src_x, int src_y, - int dest_x, int dest_y, - int width, int height, - GdkRgbDither dither, - int x_dither, int y_dither); - -void gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, GdkDrawable *drawable, - int src_x, int src_y, - int dest_x, int dest_y, - int width, int height, - GdkPixbufAlphaMode alpha_mode, - int alpha_threshold, - GdkRgbDither dither, - int x_dither, int y_dither); - -void gdk_pixbuf_render_pixmap_and_mask (GdkPixbuf *pixbuf, - GdkPixmap **pixmap_return, GdkBitmap **mask_return, - int alpha_threshold); - -/* Fetching a region from a drawable */ -GdkPixbuf *gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, - GdkDrawable *src, GdkColormap *cmap, - int src_x, int src_y, - int dest_x, int dest_y, - int width, int height); - -/* Copy an area of a pixbuf onto another one */ -void gdk_pixbuf_copy_area (const GdkPixbuf *src_pixbuf, - int src_x, int src_y, - int width, int height, - GdkPixbuf *dest_pixbuf, - int dest_x, int dest_y); - -/* Scaling */ - -void gdk_pixbuf_scale (const GdkPixbuf *src, - GdkPixbuf *dest, - int dest_x, - int dest_y, - int dest_width, - int dest_height, - double offset_x, - double offset_y, - double scale_x, - double scale_y, - ArtFilterLevel filter_level); -void gdk_pixbuf_composite (const GdkPixbuf *src, - GdkPixbuf *dest, - int dest_x, - int dest_y, - int dest_width, - int dest_height, - double offset_x, - double offset_y, - double scale_x, - double scale_y, - ArtFilterLevel filter_level, - int overall_alpha); -void gdk_pixbuf_composite_color (const GdkPixbuf *src, - GdkPixbuf *dest, - int dest_x, - int dest_y, - int dest_width, - int dest_height, - double offset_x, - double offset_y, - double scale_x, - double scale_y, - ArtFilterLevel filter_level, - int overall_alpha, - int check_x, - int check_y, - int check_size, - art_u32 color1, - art_u32 color2); - -GdkPixbuf *gdk_pixbuf_scale_simple (const GdkPixbuf *src, - int dest_width, - int dest_height, - ArtFilterLevel filter_level); -GdkPixbuf *gdk_pixbuf_composite_color_simple (const GdkPixbuf *src, - int dest_width, - int dest_height, - ArtFilterLevel filter_level, - int overall_alpha, - int check_size, - art_u32 color1, - art_u32 color2); - -/* Animation support */ - -GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename); - -GdkPixbufAnimation *gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation); -void gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation); - -int gdk_pixbuf_animation_get_width (GdkPixbufAnimation *animation); -int gdk_pixbuf_animation_get_height (GdkPixbufAnimation *animation); -GList *gdk_pixbuf_animation_get_frames (GdkPixbufAnimation *animation); -int gdk_pixbuf_animation_get_num_frames (GdkPixbufAnimation *animation); - -/* General (presently empty) initialization hooks, primarily for gnome-libs */ -void gdk_pixbuf_preinit (gpointer app, gpointer modinfo); -void gdk_pixbuf_postinit (gpointer app, gpointer modinfo); - - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/gdk-pixbuf/gnome-canvas-pixbuf.c b/gdk-pixbuf/gnome-canvas-pixbuf.c deleted file mode 100644 index e9410558e9..0000000000 --- a/gdk-pixbuf/gnome-canvas-pixbuf.c +++ /dev/null @@ -1,833 +0,0 @@ -/* GNOME libraries - GdkPixbuf item for the GNOME canvas - * - * Copyright (C) 1999 The Free Software Foundation - * - * Author: Federico Mena-Quintero - * - * 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. - */ - -#include -#include -#include -#include -#include "gdk-pixbuf.h" -#include -#include "gnome-canvas-pixbuf.h" - - - -/* Private part of the GnomeCanvasPixbuf structure */ -typedef struct { - /* Our gdk-pixbuf */ - GdkPixbuf *pixbuf; - - /* Width value */ - double width; - - /* Height value */ - double height; - - /* X translation */ - double x; - - /* Y translation */ - double y; - - /* Whether dimensions are set and whether they are in pixels or units */ - guint width_set : 1; - guint width_in_pixels : 1; - guint height_set : 1; - guint height_in_pixels : 1; - guint x_in_pixels : 1; - guint y_in_pixels : 1; - - /* Whether the pixbuf has changed */ - guint need_pixbuf_update : 1; - - /* Whether the transformation or size have changed */ - guint need_xform_update : 1; -} PixbufPrivate; - - - -/* Object argument IDs */ -enum { - ARG_0, - ARG_PIXBUF, - ARG_WIDTH, - ARG_WIDTH_SET, - ARG_WIDTH_IN_PIXELS, - ARG_HEIGHT, - ARG_HEIGHT_SET, - ARG_HEIGHT_IN_PIXELS, - ARG_X, - ARG_X_IN_PIXELS, - ARG_Y, - ARG_Y_IN_PIXELS -}; - -static void gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class); -static void gnome_canvas_pixbuf_init (GnomeCanvasPixbuf *cpb); -static void gnome_canvas_pixbuf_destroy (GtkObject *object); -static void gnome_canvas_pixbuf_set_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void gnome_canvas_pixbuf_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); - -static void gnome_canvas_pixbuf_update (GnomeCanvasItem *item, double *affine, - ArtSVP *clip_path, int flags); -static void gnome_canvas_pixbuf_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, int y, int width, int height); -static void gnome_canvas_pixbuf_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf); -static double gnome_canvas_pixbuf_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, - GnomeCanvasItem **actual_item); -static void gnome_canvas_pixbuf_bounds (GnomeCanvasItem *item, - double *x1, double *y1, double *x2, double *y2); - -static GnomeCanvasItemClass *parent_class; - - - -/** - * gnome_canvas_pixbuf_get_type: - * @void: - * - * Registers the #GnomeCanvasPixbuf class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the #GnomeCanvasPixbuf class. - **/ -GtkType -gnome_canvas_pixbuf_get_type (void) -{ - static GtkType canvas_pixbuf_type = 0; - - if (!canvas_pixbuf_type) { - static const GtkTypeInfo canvas_pixbuf_info = { - "GnomeCanvasPixbuf", - sizeof (GnomeCanvasPixbuf), - sizeof (GnomeCanvasPixbufClass), - (GtkClassInitFunc) gnome_canvas_pixbuf_class_init, - (GtkObjectInitFunc) gnome_canvas_pixbuf_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - canvas_pixbuf_type = gtk_type_unique (gnome_canvas_item_get_type (), - &canvas_pixbuf_info); - } - - return canvas_pixbuf_type; -} - -/* Class initialization function for the pixbuf canvas item */ -static void -gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - object_class = (GtkObjectClass *) class; - item_class = (GnomeCanvasItemClass *) class; - - parent_class = gtk_type_class (gnome_canvas_item_get_type ()); - - gtk_object_add_arg_type ("GnomeCanvasPixbuf::pixbuf", - GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_PIXBUF); - gtk_object_add_arg_type ("GnomeCanvasPixbuf::width", - GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_WIDTH); - gtk_object_add_arg_type ("GnomeCanvasPixbuf::width_set", - GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_WIDTH_SET); - gtk_object_add_arg_type ("GnomeCanvasPixbuf::width_in_pixels", - GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_WIDTH_IN_PIXELS); - gtk_object_add_arg_type ("GnomeCanvasPixbuf::height", - GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEIGHT); - gtk_object_add_arg_type ("GnomeCanvasPixbuf::height_set", - GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HEIGHT_SET); - gtk_object_add_arg_type ("GnomeCanvasPixbuf::height_in_pixels", - GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HEIGHT_IN_PIXELS); - gtk_object_add_arg_type ("GnomeCanvasPixbuf::x", - GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X); - gtk_object_add_arg_type ("GnomeCanvasPixbuf::x_in_pixels", - GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_X_IN_PIXELS); - gtk_object_add_arg_type ("GnomeCanvasPixbuf::y", - GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y); - gtk_object_add_arg_type ("GnomeCanvasPixbuf::y_in_pixels", - GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_Y_IN_PIXELS); - - - object_class->destroy = gnome_canvas_pixbuf_destroy; - object_class->set_arg = gnome_canvas_pixbuf_set_arg; - object_class->get_arg = gnome_canvas_pixbuf_get_arg; - - item_class->update = gnome_canvas_pixbuf_update; - item_class->draw = gnome_canvas_pixbuf_draw; - item_class->render = gnome_canvas_pixbuf_render; - item_class->point = gnome_canvas_pixbuf_point; - item_class->bounds = gnome_canvas_pixbuf_bounds; -} - -/* Object initialization function for the pixbuf canvas item */ -static void -gnome_canvas_pixbuf_init (GnomeCanvasPixbuf *gcp) -{ - PixbufPrivate *priv; - - priv = g_new0 (PixbufPrivate, 1); - gcp->priv = priv; - - priv->width = 0.0; - priv->height = 0.0; - priv->x = 0.0; - priv->y = 0.0; -} - -/* Destroy handler for the pixbuf canvas item */ -static void -gnome_canvas_pixbuf_destroy (GtkObject *object) -{ - GnomeCanvasItem *item; - GnomeCanvasPixbuf *gcp; - PixbufPrivate *priv; - - g_return_if_fail (object != NULL); - g_return_if_fail (GNOME_IS_CANVAS_PIXBUF (object)); - - item = GNOME_CANVAS_ITEM (object); - gcp = (GNOME_CANVAS_PIXBUF (object)); - priv = gcp->priv; - - gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2); - - if (priv->pixbuf) - gdk_pixbuf_unref (priv->pixbuf); - - g_free (priv); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - - -/* Set_arg handler for the pixbuf canvas item */ -static void -gnome_canvas_pixbuf_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - GnomeCanvasPixbuf *gcp; - PixbufPrivate *priv; - GdkPixbuf *pixbuf; - double val; - - item = GNOME_CANVAS_ITEM (object); - gcp = GNOME_CANVAS_PIXBUF (object); - priv = gcp->priv; - - switch (arg_id) { - case ARG_PIXBUF: - pixbuf = GTK_VALUE_POINTER (*arg); - if (pixbuf != priv->pixbuf) { - if (pixbuf) { - g_return_if_fail (pixbuf->art_pixbuf->format == ART_PIX_RGB); - g_return_if_fail (pixbuf->art_pixbuf->n_channels == 3 - || pixbuf->art_pixbuf->n_channels == 4); - g_return_if_fail (pixbuf->art_pixbuf->bits_per_sample == 8); - - gdk_pixbuf_ref (pixbuf); - } - - if (priv->pixbuf) - gdk_pixbuf_unref (priv->pixbuf); - - priv->pixbuf = pixbuf; - } - - priv->need_pixbuf_update = TRUE; - gnome_canvas_item_request_update (item); - break; - - case ARG_WIDTH: - val = GTK_VALUE_DOUBLE (*arg); - g_return_if_fail (val >= 0.0); - priv->width = val; - priv->need_xform_update = TRUE; - gnome_canvas_item_request_update (item); - break; - - case ARG_WIDTH_SET: - priv->width_set = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE; - priv->need_xform_update = TRUE; - gnome_canvas_item_request_update (item); - break; - - case ARG_WIDTH_IN_PIXELS: - priv->width_in_pixels = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE; - priv->need_xform_update = TRUE; - gnome_canvas_item_request_update (item); - break; - - case ARG_HEIGHT: - val = GTK_VALUE_DOUBLE (*arg); - g_return_if_fail (val >= 0.0); - priv->height = val; - priv->need_xform_update = TRUE; - gnome_canvas_item_request_update (item); - break; - - case ARG_HEIGHT_SET: - priv->height_set = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE; - priv->need_xform_update = TRUE; - gnome_canvas_item_request_update (item); - break; - - case ARG_HEIGHT_IN_PIXELS: - priv->height_in_pixels = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE; - priv->need_xform_update = TRUE; - gnome_canvas_item_request_update (item); - break; - - case ARG_X: - priv->x = GTK_VALUE_DOUBLE (*arg); - priv->need_xform_update = TRUE; - gnome_canvas_item_request_update (item); - break; - - case ARG_X_IN_PIXELS: - priv->x_in_pixels = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE; - priv->need_xform_update = TRUE; - gnome_canvas_item_request_update (item); - break; - - case ARG_Y: - priv->y = GTK_VALUE_DOUBLE (*arg); - priv->need_xform_update = TRUE; - gnome_canvas_item_request_update (item); - break; - - case ARG_Y_IN_PIXELS: - priv->y_in_pixels = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE; - priv->need_xform_update = TRUE; - gnome_canvas_item_request_update (item); - break; - - default: - break; - } -} - -/* Get_arg handler for the pixbuf canvasi item */ -static void -gnome_canvas_pixbuf_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - GnomeCanvasPixbuf *gcp; - PixbufPrivate *priv; - - gcp = GNOME_CANVAS_PIXBUF (object); - priv = gcp->priv; - - switch (arg_id) { - case ARG_PIXBUF: - GTK_VALUE_POINTER (*arg) = priv->pixbuf; - break; - - case ARG_WIDTH: - GTK_VALUE_DOUBLE (*arg) = priv->width; - break; - - case ARG_WIDTH_SET: - GTK_VALUE_BOOL (*arg) = priv->width_set; - break; - - case ARG_WIDTH_IN_PIXELS: - GTK_VALUE_BOOL (*arg) = priv->width_in_pixels; - break; - - case ARG_HEIGHT: - GTK_VALUE_DOUBLE (*arg) = priv->height; - break; - - case ARG_HEIGHT_SET: - GTK_VALUE_BOOL (*arg) = priv->height_set; - break; - - case ARG_HEIGHT_IN_PIXELS: - GTK_VALUE_BOOL (*arg) = priv->height_in_pixels; - break; - - case ARG_X: - GTK_VALUE_DOUBLE (*arg) = priv->x; - break; - - case ARG_X_IN_PIXELS: - GTK_VALUE_BOOL (*arg) = priv->x_in_pixels; - break; - - case ARG_Y: - GTK_VALUE_DOUBLE (*arg) = priv->y; - break; - - case ARG_Y_IN_PIXELS: - GTK_VALUE_BOOL (*arg) = priv->y_in_pixels; - break; - - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - - - -/* Bounds and utilities */ - -/* Computes the amount by which the unit horizontal and vertical vectors will be - * scaled by an affine transformation. - */ -static void -compute_xform_scaling (double *affine, ArtPoint *i_c, ArtPoint *j_c) -{ - ArtPoint orig, orig_c; - ArtPoint i, j; - - /* Origin */ - - orig.x = 0.0; - orig.y = 0.0; - art_affine_point (&orig_c, &orig, affine); - - /* Horizontal and vertical vectors */ - - i.x = 1.0; - i.y = 0.0; - art_affine_point (i_c, &i, affine); - i_c->x -= orig_c.x; - i_c->y -= orig_c.y; - - j.x = 0.0; - j.y = 1.0; - art_affine_point (j_c, &j, affine); - j_c->x -= orig_c.x; - j_c->y -= orig_c.y; -} - -/* computes the addtional resolution dependent affine needed to - * fit the image within its viewport defined by x,y,width and height - * args - */ -static void -compute_viewport_affine (GnomeCanvasPixbuf *gcp, double *viewport_affine, double *i2c) -{ - PixbufPrivate *priv; - ArtPoint i_c, j_c; - double i_len, j_len; - double si_len, sj_len; - double ti_len, tj_len; - double scale[6], translate[6]; - double w, h; - - priv = gcp->priv; - - /* Compute scaling vectors and required width/height */ - - compute_xform_scaling (i2c, &i_c, &j_c); - - i_len = sqrt (i_c.x * i_c.x + i_c.y * i_c.y); - j_len = sqrt (j_c.x * j_c.x + j_c.y * j_c.y); - - if (priv->width_set) - w = priv->width; - else - w = priv->pixbuf->art_pixbuf->width; - - if (priv->height_set) - h = priv->height; - else - h = priv->pixbuf->art_pixbuf->height; - - /* Convert i_len and j_len into scaling factors */ - - if (priv->width_in_pixels) { - if (i_len > GNOME_CANVAS_EPSILON) - si_len = 1.0 / i_len; - else - si_len = 0.0; - } else - si_len = 1.0; - - si_len *= w / priv->pixbuf->art_pixbuf->width; - - if (priv->height_in_pixels) { - if (j_len > GNOME_CANVAS_EPSILON) - sj_len = 1.0 / j_len; - else - sj_len = 0.0; - } else - sj_len = 1.0; - - sj_len *= h / priv->pixbuf->art_pixbuf->height; - - /* Calculate translation offsets */ - - if (priv->x_in_pixels) { - if (i_len > GNOME_CANVAS_EPSILON) - ti_len = 1.0 / i_len; - else - ti_len = 0.0; - } else - ti_len = 1.0; - - ti_len *= priv->x; - - if (priv->y_in_pixels) { - if (j_len > GNOME_CANVAS_EPSILON) - tj_len = 1.0 / j_len; - else - tj_len = 0.0; - } else - tj_len = 1.0; - - tj_len *= priv->y; - - /* Compute the final affine */ - - art_affine_scale (scale, si_len, sj_len); - art_affine_translate (translate, ti_len, tj_len); - art_affine_multiply (viewport_affine, scale, translate); -} - -/* Computes the affine transformation with which the pixbuf needs to be - * transformed to render it on the canvas. This is not the same as the - * item_to_canvas transformation because we may need to scale the pixbuf - * by some other amount. - */ -static void -compute_render_affine (GnomeCanvasPixbuf *gcp, double *render_affine, double *i2c) -{ - double viewport_affine[6]; - - compute_viewport_affine (gcp, viewport_affine, i2c); - art_affine_multiply (render_affine, viewport_affine, i2c); -} - -/* Recomputes the bounding box of a pixbuf canvas item. The horizontal and - * vertical dimensions may be specified in units or pixels, separately, so we - * have to compute the components individually for each dimension. - */ -static void -recompute_bounding_box (GnomeCanvasPixbuf *gcp) -{ - GnomeCanvasItem *item; - PixbufPrivate *priv; - double i2c[6], render_affine[6]; - ArtDRect rect; - - item = GNOME_CANVAS_ITEM (gcp); - priv = gcp->priv; - - if (!priv->pixbuf) { - item->x1 = item->y1 = item->x2 = item->y2 = 0.0; - return; - } - - rect.x0 = 0.0; - rect.x1 = priv->pixbuf->art_pixbuf->width; - - rect.y0 = 0.0; - rect.y1 = priv->pixbuf->art_pixbuf->height; - - gnome_canvas_item_i2c_affine (item, i2c); - compute_render_affine (gcp, render_affine, i2c); - art_drect_affine_transform (&rect, &rect, render_affine); - - item->x1 = floor (rect.x0); - item->y1 = floor (rect.y0); - item->x2 = ceil (rect.x1); - item->y2 = ceil (rect.y1); -} - - - -/* Update sequence */ - -/* Update handler for the pixbuf canvas item */ -static void -gnome_canvas_pixbuf_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) -{ - GnomeCanvasPixbuf *gcp; - PixbufPrivate *priv; - - gcp = GNOME_CANVAS_PIXBUF (item); - priv = gcp->priv; - - if (parent_class->update) - (* parent_class->update) (item, affine, clip_path, flags); - - if (((flags & GNOME_CANVAS_UPDATE_VISIBILITY) - && !(GTK_OBJECT_FLAGS (item) & GNOME_CANVAS_ITEM_VISIBLE)) - || (flags & GNOME_CANVAS_UPDATE_AFFINE) - || priv->need_pixbuf_update - || priv->need_xform_update) - gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2); - - /* If we need a pixbuf update, or if the item changed visibility to - * shown, recompute the bounding box. - */ - if (priv->need_pixbuf_update - || priv->need_xform_update - || ((flags & GNOME_CANVAS_UPDATE_VISIBILITY) - && (GTK_OBJECT_FLAGS (gcp) & GNOME_CANVAS_ITEM_VISIBLE)) - || (flags & GNOME_CANVAS_UPDATE_AFFINE)) { - recompute_bounding_box (gcp); - gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2); - priv->need_pixbuf_update = FALSE; - priv->need_xform_update = FALSE; - } -} - - - -/* Rendering */ - -/* This is private to libart, but we need it. Sigh. */ -extern void art_rgb_affine_run (int *p_x0, int *p_x1, int y, int src_width, int src_height, - const double affine[6]); - -/* Fills the specified buffer with the transformed version of a pixbuf */ -static void -transform_pixbuf (guchar *dest, int x, int y, int width, int height, int rowstride, - GdkPixbuf *pixbuf, double *affine) -{ - ArtPixBuf *apb; - int xx, yy; - double inv[6]; - guchar *src, *d; - ArtPoint src_p, dest_p; - int run_x1, run_x2; - int src_x, src_y; - int i; - - apb = pixbuf->art_pixbuf; - - art_affine_invert (inv, affine); - - for (yy = 0; yy < height; yy++) { - dest_p.y = y + yy + 0.5; - - run_x1 = x; - run_x2 = x + width; - art_rgb_affine_run (&run_x1, &run_x2, yy + y, - apb->width, apb->height, - inv); - - d = dest + yy * rowstride + (run_x1 - x) * 4; - - for (xx = run_x1; xx < run_x2; xx++) { - dest_p.x = xx + 0.5; - art_affine_point (&src_p, &dest_p, inv); - src_x = floor (src_p.x); - src_y = floor (src_p.y); - - src = apb->pixels + src_y * apb->rowstride + src_x * apb->n_channels; - - for (i = 0; i < apb->n_channels; i++) - *d++ = *src++; - - if (!apb->has_alpha) - *d++ = 255; /* opaque */ - } - } -} - -/* Draw handler for the pixbuf canvas item */ -static void -gnome_canvas_pixbuf_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, int y, int width, int height) -{ - GnomeCanvasPixbuf *gcp; - PixbufPrivate *priv; - double i2c[6], render_affine[6]; - guchar *buf; - GdkPixbuf *pixbuf; - ArtIRect p_rect, a_rect, d_rect; - int w, h; - - gcp = GNOME_CANVAS_PIXBUF (item); - priv = gcp->priv; - - if (!priv->pixbuf) - return; - - gnome_canvas_item_i2c_affine (item, i2c); - compute_render_affine (gcp, render_affine, i2c); - - /* Compute the area we need to repaint */ - - p_rect.x0 = item->x1; - p_rect.y0 = item->y1; - p_rect.x1 = item->x2; - p_rect.y1 = item->y2; - - a_rect.x0 = x; - a_rect.y0 = y; - a_rect.x1 = x + width; - a_rect.y1 = y + height; - - art_irect_intersect (&d_rect, &p_rect, &a_rect); - if (art_irect_empty (&d_rect)) - return; - - /* Create a temporary buffer and transform the pixbuf there */ - - w = d_rect.x1 - d_rect.x0; - h = d_rect.y1 - d_rect.y0; - - buf = g_new0 (guchar, w * h * 4); - transform_pixbuf (buf, - d_rect.x0, d_rect.y0, - w, h, - w * 4, - priv->pixbuf, render_affine); - - pixbuf = gdk_pixbuf_new_from_data (buf, ART_PIX_RGB, TRUE, w, h, w * 4, NULL, NULL); - - gdk_pixbuf_render_to_drawable_alpha (pixbuf, drawable, - 0, 0, - d_rect.x0 - x, d_rect.y0 - y, - w, h, - GDK_PIXBUF_ALPHA_BILEVEL, - 128, - GDK_RGB_DITHER_MAX, - d_rect.x0, d_rect.y0); - - gdk_pixbuf_unref (pixbuf); - g_free (buf); -} - -/* Render handler for the pixbuf canvas item */ -static void -gnome_canvas_pixbuf_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf) -{ - GnomeCanvasPixbuf *gcp; - PixbufPrivate *priv; - double i2c[6], render_affine[6]; - - gcp = GNOME_CANVAS_PIXBUF (item); - priv = gcp->priv; - - if (!priv->pixbuf) - return; - - gnome_canvas_item_i2c_affine (item, i2c); - compute_render_affine (gcp, render_affine, i2c); - gnome_canvas_buf_ensure_buf (buf); - - art_rgb_pixbuf_affine (buf->buf, - buf->rect.x0, buf->rect.y0, buf->rect.x1, buf->rect.y1, - buf->buf_rowstride, - priv->pixbuf->art_pixbuf, - render_affine, - ART_FILTER_NEAREST, NULL); - - buf->is_bg = 0; -} - - - -/* Point handler for the pixbuf canvas item */ -static double -gnome_canvas_pixbuf_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, - GnomeCanvasItem **actual_item) -{ - GnomeCanvasPixbuf *gcp; - PixbufPrivate *priv; - double i2c[6], render_affine[6], inv[6]; - ArtPoint c, p; - int px, py; - double no_hit; - ArtPixBuf *apb; - guchar *src; - - gcp = GNOME_CANVAS_PIXBUF (item); - priv = gcp->priv; - - *actual_item = item; - - no_hit = item->canvas->pixels_per_unit * 2 + 10; - - if (!priv->pixbuf) - return no_hit; - - apb = priv->pixbuf->art_pixbuf; - - gnome_canvas_item_i2c_affine (item, i2c); - compute_render_affine (gcp, render_affine, i2c); - art_affine_invert (inv, render_affine); - - c.x = cx; - c.y = cy; - art_affine_point (&p, &c, inv); - px = p.x; - py = p.y; - - if (px < 0 || px >= apb->width || py < 0 || py >= apb->height) - return no_hit; - - if (!apb->has_alpha) - return 0.0; - - src = apb->pixels + py * apb->rowstride + px * apb->n_channels; - - if (src[3] < 128) - return no_hit; - else - return 0.0; -} - - - -/* Bounds handler for the pixbuf canvas item */ -static void -gnome_canvas_pixbuf_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2) -{ - GnomeCanvasPixbuf *gcp; - PixbufPrivate *priv; - double i2c[6], viewport_affine[6]; - ArtDRect rect; - - gcp = GNOME_CANVAS_PIXBUF (item); - priv = gcp->priv; - - if (!priv->pixbuf) { - *x1 = *y1 = *x2 = *y2 = 0.0; - return; - } - - rect.x0 = 0.0; - rect.x1 = priv->pixbuf->art_pixbuf->width; - - rect.y0 = 0.0; - rect.y1 = priv->pixbuf->art_pixbuf->height; - - gnome_canvas_item_i2c_affine (item, i2c); - compute_viewport_affine (gcp, viewport_affine, i2c); - art_drect_affine_transform (&rect, &rect, viewport_affine); - - *x1 = rect.x0; - *y1 = rect.y0; - *x2 = rect.x1; - *y2 = rect.y1; -} diff --git a/gdk-pixbuf/gnome-canvas-pixbuf.h b/gdk-pixbuf/gnome-canvas-pixbuf.h deleted file mode 100644 index d7f6009dd4..0000000000 --- a/gdk-pixbuf/gnome-canvas-pixbuf.h +++ /dev/null @@ -1,64 +0,0 @@ -/* GNOME libraries - GdkPixbuf item for the GNOME canvas - * - * Copyright (C) 1999 The Free Software Foundation - * - * Author: Federico Mena-Quintero - * - * 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 GNOME_CANVAS_PIXBUF_H -#define GNOME_CANVAS_PIXBUF_H - -#include -#include - -BEGIN_GNOME_DECLS - - - -#define GNOME_TYPE_CANVAS_PIXBUF (gnome_canvas_pixbuf_get_type ()) -#define GNOME_CANVAS_PIXBUF(obj) (GTK_CHECK_CAST ((obj), \ - GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbuf)) -#define GNOME_CANVAS_PIXBUF_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), \ - GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbufClass)) -#define GNOME_IS_CANVAS_PIXBUF(obj) (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CANVAS_PIXBUF)) -#define GNOME_IS_CANVAS_PIXBUF_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), \ - GNOME_TYPE_CANVAS_PIXBUF)) - - -typedef struct _GnomeCanvasPixbuf GnomeCanvasPixbuf; -typedef struct _GnomeCanvasPixbufClass GnomeCanvasPixbufClass; - -struct _GnomeCanvasPixbuf { - GnomeCanvasItem item; - - /* Private data */ - gpointer priv; -}; - -struct _GnomeCanvasPixbufClass { - GnomeCanvasItemClass parent_class; -}; - - -GtkType gnome_canvas_pixbuf_get_type (void); - - - -END_GNOME_DECLS - -#endif diff --git a/gdk-pixbuf/io-bmp.c b/gdk-pixbuf/io-bmp.c deleted file mode 100644 index 2aa4fb4f3a..0000000000 --- a/gdk-pixbuf/io-bmp.c +++ /dev/null @@ -1,768 +0,0 @@ -/* GdkPixbuf library - Windows Bitmap image loader - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Arjan van de Ven - * Federico Mena-Quintero - * - * Based on io-ras.c - * - * 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. - */ - -/* - -Known bugs: - * 4bpp compressed files don't work - * bi-tonal files aren't tested with palettes - -*/ - -#include -#include -#include -#include -#include -#include - - - - - -/* - -These structures are actually dummies. These are according to -the "Windows API reference guide volume II" as written by -Borland International, but GCC fiddles with the alignment of -the internal members, so these aren't actually usable. - -*/ - -struct BitmapFileHeader { - gushort bfType; - guint bfSize; - guint reserverd; - guint bfOffbits; -}; - -struct BitmapInfoHeader { - guint biSize; - guint biWidth; - guint biHeight; - gushort biPlanes; - gushort biBitCount; - guint biCompression; - guint biSizeImage; - guint biXPelsPerMeter; - guint biYPelsPerMeter; - guint biClrUsed; - guint biClrImportant; -}; - -/* - -DumpBIH printf's the values in a BitmapInfoHeader to the screen, for -debugging purposes. - -*/ -#if DUMPBIH -static void DumpBIH(unsigned char *BIH) -{ - printf("biSize = %i \n", - (int) (BIH[3] << 24) + (BIH[2] << 16) + (BIH[1] << 8) + - (BIH[0])); - printf("biWidth = %i \n", - (int) (BIH[7] << 24) + (BIH[6] << 16) + (BIH[5] << 8) + - (BIH[4])); - printf("biHeight = %i \n", - (int) (BIH[11] << 24) + (BIH[10] << 16) + (BIH[9] << 8) + - (BIH[8])); - printf("biPlanes = %i \n", (int) (BIH[13] << 8) + (BIH[12])); - printf("biBitCount = %i \n", (int) (BIH[15] << 8) + (BIH[14])); - printf("biCompress = %i \n", - (int) (BIH[19] << 24) + (BIH[18] << 16) + (BIH[17] << 8) + - (BIH[16])); - printf("biSizeImage = %i \n", - (int) (BIH[23] << 24) + (BIH[22] << 16) + (BIH[21] << 8) + - (BIH[20])); - printf("biXPels = %i \n", - (int) (BIH[27] << 24) + (BIH[26] << 16) + (BIH[25] << 8) + - (BIH[24])); - printf("biYPels = %i \n", - (int) (BIH[31] << 24) + (BIH[30] << 16) + (BIH[29] << 8) + - (BIH[28])); - printf("biClrUsed = %i \n", - (int) (BIH[35] << 24) + (BIH[34] << 16) + (BIH[33] << 8) + - (BIH[32])); - printf("biClrImprtnt= %i \n", - (int) (BIH[39] << 24) + (BIH[38] << 16) + (BIH[37] << 8) + - (BIH[36])); -} -#endif -/* struct headerpair contains the decoded width/height/depth info for - the current bitmap */ - -struct headerpair { - guint width; - guint height; - guint depth; - guint Negative; /* Negative = 1 -> top down BMP, - Negative = 0 -> bottom up BMP */ -}; - -/* Data needed for the "state" during decompression */ -struct bmp_compression_state { - gint phase; /* 0 = clean, - 1 = count received - 2 = escape received - 3 = in "raw" run - 4 = Relative part 1 is next - 5 = Relative part 2 is next - 6 = end of image -> No more input allowed - */ - gint RunCount; - gint XDelta; - gint YDelta; -}; - -/* Progressive loading */ - -struct bmp_progressive_state { - ModulePreparedNotifyFunc prepared_func; - ModuleUpdatedNotifyFunc updated_func; - gpointer user_data; - - gint HeaderSize; /* The size of the header-part (incl colormap) */ - guchar *HeaderBuf; /* The buffer for the header (incl colormap) */ - gint HeaderDone; /* The nr of bytes actually in HeaderBuf */ - - gint LineWidth; /* The width of a line in bytes */ - guchar *LineBuf; /* Buffer for 1 line */ - gint LineDone; /* # of bytes in LineBuf */ - gint Lines; /* # of finished lines */ - - gint Type; /* - 32 = RGB + alpha - 24 = RGB - 4 = 4 bpp colormapped - 8 = 8 bpp colormapped - 1 = 1 bit bitonal - */ - gint Compressed; - struct bmp_compression_state compr; - - - struct headerpair Header; /* Decoded (BE->CPU) header */ - - - GdkPixbuf *pixbuf; /* Our "target" */ -}; - -gpointer -gdk_pixbuf__bmp_image_begin_load(ModulePreparedNotifyFunc prepared_func, - ModuleUpdatedNotifyFunc updated_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc - anim_done_func, gpointer user_data); - -void gdk_pixbuf__bmp_image_stop_load(gpointer data); -gboolean gdk_pixbuf__bmp_image_load_increment(gpointer data, guchar * buf, - guint size); - - - -/* Shared library entry point --> This should be removed when - generic_image_load enters gdk-pixbuf-io. */ -GdkPixbuf *gdk_pixbuf__bmp_image_load(FILE * f) -{ - guchar *membuf; - size_t length; - struct bmp_progressive_state *State; - - GdkPixbuf *pb; - - State = - gdk_pixbuf__bmp_image_begin_load(NULL, NULL, NULL, NULL, NULL); - membuf = g_malloc(4096); - - g_assert(membuf != NULL); - - - while (feof(f) == 0) { - length = fread(membuf, 1, 4096, f); - if (length > 0) - - (void) - gdk_pixbuf__bmp_image_load_increment(State, - membuf, - length); - - } - g_free(membuf); - if (State->pixbuf != NULL) - gdk_pixbuf_ref(State->pixbuf); - - pb = State->pixbuf; - - gdk_pixbuf__bmp_image_stop_load(State); - return pb; -} - -static void DecodeHeader(unsigned char *BFH, unsigned char *BIH, - struct bmp_progressive_state *State) -{ -#if DUMPBIH - DumpBIH(BIH); -#endif - - State->Header.width = - (int) (BIH[7] << 24) + (BIH[6] << 16) + (BIH[5] << 8) + - (BIH[4]); - State->Header.height = - (int) (BIH[11] << 24) + (BIH[10] << 16) + (BIH[9] << 8) + - (BIH[8]); - State->Header.depth = (int) (BIH[15] << 8) + (BIH[14]);; - - State->Type = State->Header.depth; /* This may be less trivial someday */ - State->HeaderSize = - (int) ((BFH[13] << 24) + (BFH[12] << 16) + (BFH[11] << 8) + - (BFH[10])); - if (State->HeaderSize >= 14 + 40 + 1024) - State->HeaderBuf = - g_realloc(State->HeaderBuf, State->HeaderSize); - - if ((BIH[16] != 0) || (BIH[17] != 0) || (BIH[18] != 0) - || (BIH[19] != 0)) { - State->Compressed = 1; - } - - /* Negative heights indicates bottom-down pixelorder */ - if (State->Header.height < 0) { - State->Header.height = -State->Header.height; - State->Header.Negative = 1; - } - if (State->Header.width < 0) { - State->Header.width = -State->Header.width; - State->Header.Negative = 0; - } - - if (State->Type == 32) - State->LineWidth = State->Header.width * 4; - if (State->Type == 24) - State->LineWidth = State->Header.width * 3; - if (State->Type == 8) - State->LineWidth = State->Header.width * 1; - if (State->Type == 4) - State->LineWidth = (State->Header.width + 1) / 2; - if (State->Type == 1) { - State->LineWidth = State->Header.width / 8; - if ((State->Header.width & 7) != 0) - State->LineWidth++; - } - - /* Pad to a 32 bit boundary */ - if (((State->LineWidth % 4) > 0) && (State->Compressed == 0)) - State->LineWidth = (State->LineWidth / 4) * 4 + 4; - - - if (State->LineBuf == NULL) - State->LineBuf = g_malloc(State->LineWidth); - - g_assert(State->LineBuf != NULL); - - - if (State->pixbuf == NULL) { - if (State->Type == 32) - State->pixbuf = - gdk_pixbuf_new(ART_PIX_RGB, TRUE, 8, - (gint) State->Header.width, - (gint) State->Header.height); - else - State->pixbuf = - gdk_pixbuf_new(ART_PIX_RGB, FALSE, 8, - (gint) State->Header.width, - (gint) State->Header.height); - - if (State->prepared_func != NULL) - /* Notify the client that we are ready to go */ - (*State->prepared_func) (State->pixbuf, State->user_data); - - } - -} - -/* - * func - called when we have pixmap created (but no image data) - * user_data - passed as arg 1 to func - * return context (opaque to user) - */ - -gpointer -gdk_pixbuf__bmp_image_begin_load(ModulePreparedNotifyFunc prepared_func, - ModuleUpdatedNotifyFunc updated_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc - anim_done_func, gpointer user_data) -{ - struct bmp_progressive_state *context; - - context = g_new0(struct bmp_progressive_state, 1); - context->prepared_func = prepared_func; - context->updated_func = updated_func; - context->user_data = user_data; - - context->HeaderSize = 54; - context->HeaderBuf = g_malloc(14 + 40 + 1024); - /* 14 for the BitmapFileHeader, 40 for the BitmapImageHeader and - 1024 for the colormap */ - - context->HeaderDone = 0; - - context->LineWidth = 0; - context->LineBuf = NULL; - context->LineDone = 0; - context->Lines = 0; - - context->Type = 0; - - memset(&context->Header, 0, sizeof(struct headerpair)); - memset(&context->compr, 0, sizeof(struct bmp_compression_state)); - - - context->pixbuf = NULL; - - - return (gpointer) context; -} - -/* - * context - returned from image_begin_load - * - * free context, unref gdk_pixbuf - */ -void gdk_pixbuf__bmp_image_stop_load(gpointer data) -{ - struct bmp_progressive_state *context = - (struct bmp_progressive_state *) data; - - - g_return_if_fail(context != NULL); - - if (context->LineBuf != NULL) - g_free(context->LineBuf); - context->LineBuf = NULL; - - if (context->HeaderBuf != NULL) - g_free(context->HeaderBuf); - context->LineBuf = NULL; - - if (context->pixbuf) - gdk_pixbuf_unref(context->pixbuf); - - g_free(context); -} - - -/* -The OneLineXX functions are called when 1 line worth of data is present. -OneLine24 is the 24 bpp-version. -*/ -static void OneLine32(struct bmp_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - if (context->Header.Negative == 0) - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - (context->Header.height - context->Lines - 1); - else - Pixels = - context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - context->Lines; - while (X < context->Header.width) { - Pixels[X * 4 + 0] = context->LineBuf[X * 4 + 2]; - Pixels[X * 4 + 1] = context->LineBuf[X * 4 + 1]; - Pixels[X * 4 + 2] = context->LineBuf[X * 4 + 0]; - Pixels[X * 4 + 3] = context->LineBuf[X * 4 + 3]; - X++; - } - -} - -static void OneLine24(struct bmp_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - if (context->Header.Negative == 0) - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - (context->Header.height - context->Lines - 1); - else - Pixels = - context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - context->Lines; - while (X < context->Header.width) { - Pixels[X * 3 + 0] = context->LineBuf[X * 3 + 2]; - Pixels[X * 3 + 1] = context->LineBuf[X * 3 + 1]; - Pixels[X * 3 + 2] = context->LineBuf[X * 3 + 0]; - X++; - } - -} - -static void OneLine8(struct bmp_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - if (context->Header.Negative == 0) - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - (context->Header.height - context->Lines - 1); - else - Pixels = - context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - context->Lines; - while (X < context->Header.width) { - Pixels[X * 3 + 0] = - context->HeaderBuf[4 * context->LineBuf[X] + 56]; - Pixels[X * 3 + 1] = - context->HeaderBuf[4 * context->LineBuf[X] + 55]; - Pixels[X * 3 + 2] = - context->HeaderBuf[4 * context->LineBuf[X] + 54]; - X++; - } -} - -static void OneLine4(struct bmp_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - if (context->Header.Negative == 0) - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - (context->Header.height - context->Lines - 1); - else - Pixels = - context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - context->Lines; - - while (X < context->Header.width) { - guchar Pix; - - Pix = context->LineBuf[X / 2]; - - Pixels[X * 3 + 0] = - context->HeaderBuf[4 * (Pix >> 4) + 56]; - Pixels[X * 3 + 1] = - context->HeaderBuf[4 * (Pix >> 4) + 55]; - Pixels[X * 3 + 2] = - context->HeaderBuf[4 * (Pix >> 4) + 54]; - X++; - if (X < context->Header.width) { - /* Handle the other 4 bit pixel only when there is one */ - Pixels[X * 3 + 0] = - context->HeaderBuf[4 * (Pix & 15) + 56]; - Pixels[X * 3 + 1] = - context->HeaderBuf[4 * (Pix & 15) + 55]; - Pixels[X * 3 + 2] = - context->HeaderBuf[4 * (Pix & 15) + 54]; - X++; - } - } - -} - -static void OneLine1(struct bmp_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - if (context->Header.Negative == 0) - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - (context->Header.height - context->Lines - 1); - else - Pixels = - context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - context->Lines; - while (X < context->Header.width) { - gint Bit; - - Bit = (context->LineBuf[X / 8]) >> (7 - (X & 7)); - Bit = Bit & 1; - Pixels[X * 3 + 0] = Bit * 255; - Pixels[X * 3 + 1] = Bit * 255; - Pixels[X * 3 + 2] = Bit * 255; - X++; - } -} - - -static void OneLine(struct bmp_progressive_state *context) -{ - context->LineDone = 0; - if (context->Lines >= context->Header.height) - return; - - if (context->Type == 32) - OneLine32(context); - if (context->Type == 24) - OneLine24(context); - if (context->Type == 8) - OneLine8(context); - if (context->Type == 4) - OneLine4(context); - if (context->Type == 1) - OneLine1(context); - - context->Lines++; - - if (context->updated_func != NULL) { - (*context->updated_func) (context->pixbuf, - 0, - context->Lines, - context->Header.width, - context->Header.height, - context->user_data); - - } -} - -/* DoCompressedByte handles 1 byte of incomming compressed data */ -void DoCompressedByte(struct bmp_progressive_state *context, guchar ** buf, - gint * size) -{ - gint BytesToCopy; - switch (context->compr.phase) { - case 0: /* Neutral state */ - if ((*buf)[0] != 0) { /* run count */ - context->compr.phase = 1; - context->compr.RunCount = (*buf)[0]; - - } else { /* Escape */ - context->compr.phase = 2; - } - (*buf)++; - (*size)--; - break; - case 1: /* Run count received.... */ - while (context->compr.RunCount > 0) { - BytesToCopy = - context->LineWidth - context->LineDone; - if (BytesToCopy > context->compr.RunCount) - BytesToCopy = context->compr.RunCount; - if (BytesToCopy > 0) { - memset(context->LineBuf + - context->LineDone, (*buf)[0], - BytesToCopy); - - context->compr.RunCount -= BytesToCopy; - context->LineDone += BytesToCopy; - } - if ((context->LineDone >= context->LineWidth) - && (context->LineWidth > 0)) { - OneLine(context); - } - } - context->compr.phase = 0; - (*buf)++; - (*size)--; - break; - case 2: /* Escape received */ - if ((*buf)[0] == 0) { /* End of line */ - context->compr.phase = 0; - if (context->LineDone > 0) - OneLine(context); - } else if ((*buf)[0] == 1) { /* End of image */ - OneLine(context); - context->compr.phase = 6; - (*size) = 0; - break; - } else if ((*buf)[0] == 2) { /* Cursor displacement */ - context->compr.phase = 4; - } else { - context->compr.phase = 3; - context->compr.RunCount = (*buf)[0]; - if (context->compr.RunCount & 1) - context->compr.phase = 7; - - } - (*buf)++; - (*size)--; - - break; - case 3: - while ((context->compr.RunCount > 0) - && (*size > 0)) { - BytesToCopy = - context->LineWidth - context->LineDone; - if (BytesToCopy > context->compr.RunCount) - BytesToCopy = context->compr.RunCount; - if (BytesToCopy > *size) - BytesToCopy = *size; - - if (BytesToCopy > 0) { - memcpy(context->LineBuf + - context->LineDone, *buf, - BytesToCopy); - - context->compr.RunCount -= BytesToCopy; - (*buf) += BytesToCopy; - (*size) -= BytesToCopy; - context->LineDone += BytesToCopy; - } - if ((context->LineDone >= context->LineWidth) - && (context->LineWidth > 0)) - OneLine(context); - } - if (context->compr.RunCount <= 0) - context->compr.phase = 0; - - break; - case 4: - context->compr.phase = 5; - context->compr.XDelta = (*buf)[0]; - (*buf)++; - (*size)--; - break; - case 5: - context->compr.phase = 0; - context->compr.YDelta = (*buf)[0]; - g_assert(0); /* No implementatio of this yet */ - /* If this happens, please email me (arjan@fenrus.demon.nl) - the image concerned. */ - (*buf)++; - (*size)--; - break; - case 6: - (*size) = 0; - break; - case 7: /* Odd raw run */ - while ((context->compr.RunCount > 0) && (*size > 0)) { - BytesToCopy = - context->LineWidth - context->LineDone; - if (BytesToCopy > context->compr.RunCount) - BytesToCopy = context->compr.RunCount; - if (BytesToCopy > *size) - BytesToCopy = *size; - - if (BytesToCopy > 0) { - memcpy(context->LineBuf + - context->LineDone, *buf, - BytesToCopy); - - context->compr.RunCount -= BytesToCopy; - (*buf) += BytesToCopy; - (*size) -= BytesToCopy; - context->LineDone += BytesToCopy; - } - if ((context->LineDone >= context->LineWidth) - && (context->LineWidth > 0)) - OneLine(context); - } - if (context->compr.RunCount <= 0) - context->compr.phase = 8; - - break; - case 8: /* Eat dummy byte; */ - (*buf)++; - (*size)--; - context->compr.phase = 0; - break; - } -} - -/* - * context - from image_begin_load - * buf - new image data - * size - length of new image data - * - * append image data onto inrecrementally built output image - */ -gboolean gdk_pixbuf__bmp_image_load_increment(gpointer data, guchar * buf, - guint size) -{ - struct bmp_progressive_state *context = - (struct bmp_progressive_state *) data; - - gint BytesToCopy; - - while (size > 0) { - g_assert(context->LineDone >= 0); - if (context->HeaderDone < context->HeaderSize) { /* We still - have headerbytes to do */ - BytesToCopy = - context->HeaderSize - context->HeaderDone; - if (BytesToCopy > size) - BytesToCopy = size; - - memmove(context->HeaderBuf + context->HeaderDone, - buf, BytesToCopy); - - size -= BytesToCopy; - buf += BytesToCopy; - context->HeaderDone += BytesToCopy; - - } else if (context->Compressed) { - /* Compression is done 1 byte at a time for now */ - DoCompressedByte(context, &buf, &size); - - } else { - /* Uncompressed pixeldata */ - BytesToCopy = - context->LineWidth - context->LineDone; - if (BytesToCopy > size) - BytesToCopy = size; - - if (BytesToCopy > 0) { - memmove(context->LineBuf + - context->LineDone, buf, - BytesToCopy); - - size -= BytesToCopy; - buf += BytesToCopy; - context->LineDone += BytesToCopy; - } - if ((context->LineDone >= context->LineWidth) - && (context->LineWidth > 0)) - OneLine(context); - - - } - - if (context->HeaderDone >= 14 + 40) - DecodeHeader(context->HeaderBuf, - context->HeaderBuf + 14, context); - - - } - - return TRUE; -} diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c deleted file mode 100644 index 926871a3dc..0000000000 --- a/gdk-pixbuf/io-gif.c +++ /dev/null @@ -1,1230 +0,0 @@ -/* GdkPixbuf library - GIF image loader - * - * Copyright (C) 1999 Mark Crichton - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Jonathan Blandford - * Adapted from the gimp gif filter written by Adam Moss - * Gimp work based on earlier work. - * Permission to relicense under the LGPL obtained. - * - * 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. - */ - -/* This loader is very hairy code. - * - * The main loop was not designed for incremental loading, so when it was hacked - * in it got a bit messy. Basicly, every function is written to expect a failed - * read_gif, and lets you call it again assuming that the bytes are there. - * - * A note on Animations: - * Currently, it doesn't correctly read the different colormap per frame. This - * needs implementing sometime. - * - * Return vals. - * Unless otherwise specified, these are the return vals for most functions: - * - * 0 -> success - * -1 -> more bytes needed. - * -2 -> failure; abort the load - * -3 -> control needs to be passed back to the main loop - * \_ (most of the time returning 0 will get this, but not always) - * - * >1 -> for functions that get a guchar, the char will be returned. - * - * -jrb (11/03/1999) - */ - -/* - * If you have any images that crash this code, please, please let me know and - * send them to me. - * - */ - - - -#include -#include -#include -#include "gdk-pixbuf.h" -#include "gdk-pixbuf-io.h" - - - -#define MAXCOLORMAPSIZE 256 -#define MAX_LZW_BITS 12 - -#define INTERLACE 0x40 -#define LOCALCOLORMAP 0x80 -#define BitSet(byte, bit) (((byte) & (bit)) == (bit)) -#define LM_to_uint(a,b) (((b)<<8)|(a)) - - - -typedef unsigned char CMap[3][MAXCOLORMAPSIZE]; - -/* Possible states we can be in. */ -enum { - GIF_START, - GIF_GET_COLORMAP, - GIF_GET_NEXT_STEP, - GIF_GET_FRAME_INFO, - GIF_GET_EXTENTION, - GIF_GET_COLORMAP2, - GIF_PREPARE_LZW, - GIF_LZW_FILL_BUFFER, - GIF_LZW_CLEAR_CODE, - GIF_GET_LZW, - GIF_DONE, -}; - - -typedef struct _Gif89 Gif89; -struct _Gif89 -{ - int transparent; - int delay_time; - int input_flag; - int disposal; -}; - -typedef struct _GifContext GifContext; -struct _GifContext -{ - int state; /* really only relevant for progressive loading */ - unsigned int width; - unsigned int height; - CMap color_map; - CMap frame_color_map; - unsigned int bit_pixel; - unsigned int color_resolution; - unsigned int background; - unsigned int aspect_ratio; - GdkPixbuf *pixbuf; - GdkPixbufAnimation *animation; - GdkPixbufFrame *frame; - Gif89 gif89; - - /* stuff per frame. As we only support the first one, not so - * relevant. But still needed */ - int frame_len; - int frame_height; - int frame_interlace; - int x_offset; - int y_offset; - - /* Static read only */ - FILE *file; - - /* progressive read, only. */ - ModulePreparedNotifyFunc prepare_func; - ModuleUpdatedNotifyFunc update_func; - ModuleFrameDoneNotifyFunc frame_done_func; - ModuleAnimationDoneNotifyFunc anim_done_func; - gpointer user_data; - guchar *buf; - guint ptr; - guint size; - guint amount_needed; - - /* colormap context */ - gint colormap_index; - gint colormap_flag; - - /* extension context */ - guchar extension_label; - guchar extension_flag; - - /* get block context */ - guchar block_count; - guchar block_buf[280]; - gint block_ptr; - - int old_state; /* used by lzw_fill buffer */ - /* get_code context */ - int code_curbit; - int code_lastbit; - int code_done; - int code_last_byte; - int lzw_code_pending; - - /* lzw context */ - gint lzw_fresh; - gint lzw_code_size; - guchar lzw_set_code_size; - gint lzw_max_code; - gint lzw_max_code_size; - gint lzw_firstcode; - gint lzw_oldcode; - gint lzw_clear_code; - gint lzw_end_code; - gint *lzw_sp; - - gint lzw_table[2][(1 << MAX_LZW_BITS)]; - gint lzw_stack[(1 << (MAX_LZW_BITS)) * 2 + 1]; - - /* painting context */ - gint draw_xpos; - gint draw_ypos; - gint draw_pass; -}; - -static int GetDataBlock (GifContext *, unsigned char *); - - - -#ifdef IO_GIFDEBUG -static int count = 0; -#endif - -/* Returns TRUE if read is OK, - * FALSE if more memory is needed. */ -static int -gif_read (GifContext *context, guchar *buffer, size_t len) -{ - gint retval; -#ifdef IO_GIFDEBUG - gint i; -#endif - if (context->file) { -#ifdef IO_GIFDEBUG - count += len; - g_print ("Fsize :%d\tcount :%d\t", len, count); -#endif - retval = (fread(buffer, len, 1, context->file) != 0); -#ifdef IO_GIFDEBUG - if (len < 100) { - for (i = 0; i < len; i++) - g_print ("%d ", buffer[i]); - } - g_print ("\n"); -#endif - return retval; - } else { -#ifdef IO_GIFDEBUG -/* g_print ("\tlooking for %d bytes. size == %d, ptr == %d\n", len, context->size, context->ptr); */ -#endif - if ((context->size - context->ptr) >= len) { -#ifdef IO_GIFDEBUG - count += len; -#endif - memcpy (buffer, context->buf + context->ptr, len); - context->ptr += len; - context->amount_needed = 0; -#ifdef IO_GIFDEBUG - g_print ("Psize :%d\tcount :%d\t", len, count); - if (len < 100) { - for (i = 0; i < len; i++) - g_print ("%d ", buffer[i]); - } - g_print ("\n"); -#endif - return TRUE; - } - context->amount_needed = len - (context->size - context->ptr); - } - return 0; -} - -/* Changes the stage to be GIF_GET_COLORMAP */ -static void -gif_set_get_colormap (GifContext *context) -{ - context->colormap_flag = TRUE; - context->colormap_index = 0; - context->state = GIF_GET_COLORMAP; -} - -static void -gif_set_get_colormap2 (GifContext *context) -{ - context->colormap_flag = TRUE; - context->colormap_index = 0; - context->state = GIF_GET_COLORMAP2; -} - -static gint -gif_get_colormap (GifContext *context) -{ - unsigned char rgb[3]; - - while (context->colormap_index < context->bit_pixel) { - if (!gif_read (context, rgb, sizeof (rgb))) { - /*g_message (_("GIF: bad colormap\n"));*/ - return -1; - } - - context->color_map[0][context->colormap_index] = rgb[0]; - context->color_map[1][context->colormap_index] = rgb[1]; - context->color_map[2][context->colormap_index] = rgb[2]; - - context->colormap_flag &= (rgb[0] == rgb[1] && rgb[1] == rgb[2]); - context->colormap_index ++; - } - - return 0; -} - -/* - * in order for this function to work, we need to perform some black magic. - * We want to return -1 to let the calling function know, as before, that it needs - * more bytes. If we return 0, we were able to successfully read all block->count bytes. - * Problem is, we don't want to reread block_count every time, so we check to see if - * context->block_count is 0 before we read in the function. - * - * As a result, context->block_count MUST be 0 the first time the get_data_block is called - * within a context, and cannot be 0 the second time it's called. - */ - -static int -get_data_block (GifContext *context, - unsigned char *buf, - gint *empty_block) -{ - - if (context->block_count == 0) { - if (!gif_read (context, &context->block_count, 1)) { - return -1; - } - } - - if (context->block_count == 0) - if (empty_block) { - *empty_block = TRUE; - return 0; - } - - if (!gif_read (context, buf, context->block_count)) { - return -1; - } - - return 0; -} - -static void -gif_set_get_extension (GifContext *context) -{ - context->state = GIF_GET_EXTENTION; - context->extension_flag = TRUE; - context->extension_label = 0; - context->block_count = 0; - context->block_ptr = 0; -} - -static int -gif_get_extension (GifContext *context) -{ - gint retval; - gint empty_block = FALSE; - - if (context->extension_flag) { - if (context->extension_label == 0) { - /* I guess bad things can happen if we have an extension of 0 )-: */ - /* I should look into this sometime */ - if (!gif_read (context, & context->extension_label , 1)) { - return -1; - } - } - - switch (context->extension_label) { - case 0xf9: /* Graphic Control Extension */ - retval = get_data_block (context, (unsigned char *) context->block_buf, NULL); - if (retval != 0) - return retval; - if (context->pixbuf == NULL) { - /* I only want to set the transparency if I haven't - * created the pixbuf yet. */ - context->gif89.disposal = (context->block_buf[0] >> 2) & 0x7; - context->gif89.input_flag = (context->block_buf[0] >> 1) & 0x1; - context->gif89.delay_time = LM_to_uint (context->block_buf[1], context->block_buf[2]); - - if ((context->block_buf[0] & 0x1) != 0) { - context->gif89.transparent = context->block_buf[3]; - } else { - context->gif89.transparent = -1; - } - } - - /* Now we've successfully loaded this one, we continue on our way */ - context->block_count = 0; - context->extension_flag = FALSE; - default: - /* Unhandled extension */ - break; - } - } - /* read all blocks, until I get an empty block, in case there was an extension I didn't know about. */ - do { - retval = get_data_block (context, (unsigned char *) context->block_buf, &empty_block); - if (retval != 0) - return retval; - context->block_count = 0; - } while (!empty_block); - - return 0; -} - -static int ZeroDataBlock = FALSE; - -static int -GetDataBlock (GifContext *context, - unsigned char *buf) -{ -/* unsigned char count; */ - - if (!gif_read (context, &context->block_count, 1)) { - /*g_message (_("GIF: error in getting DataBlock size\n"));*/ - return -1; - } - - ZeroDataBlock = context->block_count == 0; - - if ((context->block_count != 0) && (!gif_read (context, buf, context->block_count))) { - /*g_message (_("GIF: error in reading DataBlock\n"));*/ - return -1; - } - - return context->block_count; -} - - -static void -gif_set_lzw_fill_buffer (GifContext *context) -{ - context->block_count = 0; - context->old_state = context->state; - context->state = GIF_LZW_FILL_BUFFER; -} - -static int -gif_lzw_fill_buffer (GifContext *context) -{ - gint retval; - - if (context->code_done) { - if (context->code_curbit >= context->code_lastbit) { - g_message ("GIF: ran off the end of by bits\n"); - return -2; - } - g_message ("trying to read more data after we've done stuff\n"); - return -2; - } - - context->block_buf[0] = context->block_buf[context->code_last_byte - 2]; - context->block_buf[1] = context->block_buf[context->code_last_byte - 1]; - - retval = get_data_block (context, &context->block_buf[2], NULL); - - if (retval == -1) - return -1; - - if (context->block_count == 0) - context->code_done = TRUE; - - context->code_last_byte = 2 + context->block_count; - context->code_curbit = (context->code_curbit - context->code_lastbit) + 16; - context->code_lastbit = (2 + context->block_count) * 8; - - context->state = context->old_state; - return 0; -} - -static int -get_code (GifContext *context, - int code_size) -{ - int i, j, ret; - - if ((context->code_curbit + code_size) >= context->code_lastbit){ - gif_set_lzw_fill_buffer (context); - return -3; - } - - ret = 0; - for (i = context->code_curbit, j = 0; j < code_size; ++i, ++j) - ret |= ((context->block_buf[i / 8] & (1 << (i % 8))) != 0) << j; - - context->code_curbit += code_size; - - return ret; -} - - -static void -set_gif_lzw_clear_code (GifContext *context) -{ - context->state = GIF_LZW_CLEAR_CODE; - context->lzw_code_pending = -1; -} - -static int -gif_lzw_clear_code (GifContext *context) -{ - gint code; - - code = get_code (context, context->lzw_code_size); - if (code == -3) - return -0; - - context->lzw_firstcode = context->lzw_oldcode = code; - context->lzw_code_pending = code; - context->state = GIF_GET_LZW; - return 0; -} - -static int -lzw_read_byte (GifContext *context) -{ - int code, incode; - gint retval; - gint my_retval; - register int i; - - if (context->lzw_code_pending != -1) { - retval = context->lzw_code_pending; - context->lzw_code_pending = -1; - return retval; - } - - if (context->lzw_fresh) { - context->lzw_fresh = FALSE; - do { - retval = get_code (context, context->lzw_code_size); - if (retval < 0) { - return retval; - } - - context->lzw_firstcode = context->lzw_oldcode = retval; - } while (context->lzw_firstcode == context->lzw_clear_code); - return context->lzw_firstcode; - } - - if (context->lzw_sp > context->lzw_stack) { - my_retval = *--(context->lzw_sp); - return my_retval; - } - - while ((code = get_code (context, context->lzw_code_size)) >= 0) { - if (code == context->lzw_clear_code) { - for (i = 0; i < context->lzw_clear_code; ++i) { - context->lzw_table[0][i] = 0; - context->lzw_table[1][i] = i; - } - for (; i < (1 << MAX_LZW_BITS); ++i) - context->lzw_table[0][i] = context->lzw_table[1][i] = 0; - context->lzw_code_size = context->lzw_set_code_size + 1; - context->lzw_max_code_size = 2 * context->lzw_clear_code; - context->lzw_max_code = context->lzw_clear_code + 2; - context->lzw_sp = context->lzw_stack; - - set_gif_lzw_clear_code (context); - return -3; - } else if (code == context->lzw_end_code) { - int count; - unsigned char buf[260]; - - /*g_error (" DID WE EVER EVER GET HERE\n");*/ - g_error ("Unhandled Case. If you have an image that causes this, let me know.\n"); - - if (ZeroDataBlock) { - return -2; - } - - while ((count = GetDataBlock (context, buf)) > 0) - ; - - if (count != 0) { - /*g_print (_("GIF: missing EOD in data stream (common occurence)"));*/ - return -2; - } - } - - incode = code; - - if (code >= context->lzw_max_code) { - *(context->lzw_sp)++ = context->lzw_firstcode; - code = context->lzw_oldcode; - } - - while (code >= context->lzw_clear_code) { - *(context->lzw_sp)++ = context->lzw_table[1][code]; - - if (code == context->lzw_table[0][code]) { - /*g_message (_("GIF: circular table entry BIG ERROR\n"));*/ - /*gimp_quit ();*/ - return -2; - } - code = context->lzw_table[0][code]; - } - - *(context->lzw_sp)++ = context->lzw_firstcode = context->lzw_table[1][code]; - - if ((code = context->lzw_max_code) < (1 << MAX_LZW_BITS)) { - context->lzw_table[0][code] = context->lzw_oldcode; - context->lzw_table[1][code] = context->lzw_firstcode; - ++context->lzw_max_code; - if ((context->lzw_max_code >= context->lzw_max_code_size) && - (context->lzw_max_code_size < (1 << MAX_LZW_BITS))) { - context->lzw_max_code_size *= 2; - ++context->lzw_code_size; - } - } - - context->lzw_oldcode = incode; - - if (context->lzw_sp > context->lzw_stack) { - my_retval = *--(context->lzw_sp); - return my_retval; - } - } - return code; -} - -static void -gif_set_get_lzw (GifContext *context) -{ - context->state = GIF_GET_LZW; - context->draw_xpos = 0; - context->draw_ypos = 0; - context->draw_pass = 0; -} - -static void -gif_fill_in_pixels (GifContext *context, guchar *dest, gint offset, guchar v) -{ - guchar *pixel = NULL; - - if (context->gif89.transparent != -1) { - pixel = dest + (context->draw_ypos + offset) * gdk_pixbuf_get_rowstride (context->pixbuf) + context->draw_xpos * 4; - *pixel = context->color_map [0][(guchar) v]; - *(pixel+1) = context->color_map [1][(guchar) v]; - *(pixel+2) = context->color_map [2][(guchar) v]; - *(pixel+3) = (guchar) ((v == context->gif89.transparent) ? 0 : 65535); - } else { - pixel = dest + (context->draw_ypos + offset) * gdk_pixbuf_get_rowstride (context->pixbuf) + context->draw_xpos * 3; - *pixel = context->color_map [0][(guchar) v]; - *(pixel+1) = context->color_map [1][(guchar) v]; - *(pixel+2) = context->color_map [2][(guchar) v]; - } -} - - -/* only called if progressive and interlaced */ -static void -gif_fill_in_lines (GifContext *context, guchar *dest, guchar v) -{ - switch (context->draw_pass) { - case 0: - if (context->draw_ypos > 4) { - gif_fill_in_pixels (context, dest, -4, v); - gif_fill_in_pixels (context, dest, -3, v); - } - if (context->draw_ypos < (context->frame_height - 4)) { - gif_fill_in_pixels (context, dest, 3, v); - gif_fill_in_pixels (context, dest, 4, v); - } - /* we don't need a break here. We draw the outer pixels first, then the - * inner ones, then the innermost ones. case 0 needs to draw all 3 bands. - * case 1, just the last two, and case 2 just draws the last one*/ - case 1: - if (context->draw_ypos > 2) - gif_fill_in_pixels (context, dest, -2, v); - if (context->draw_ypos < (context->frame_height - 2)) - gif_fill_in_pixels (context, dest, 2, v); - /* no break as above. */ - case 2: - if (context->draw_ypos > 1) - gif_fill_in_pixels (context, dest, -1, v); - if (context->draw_ypos < (context->frame_height - 1)) - gif_fill_in_pixels (context, dest, 1, v); - case 3: - default: - break; - } -} - -static int -gif_get_lzw (GifContext *context) -{ - guchar *dest, *temp; - gint lower_bound, upper_bound; /* bounds for emitting the area_updated signal */ - gboolean bound_flag; - gint first_pass; /* bounds for emitting the area_updated signal */ - gint v; - - if (context->pixbuf == NULL) { - context->pixbuf = gdk_pixbuf_new (ART_PIX_RGB, - context->gif89.transparent != -1, - 8, - context->frame_len, - context->frame_height); - - if (context->prepare_func) - (* context->prepare_func) (context->pixbuf, context->user_data); - if (context->animation || context->frame_done_func || context->anim_done_func) { - context->frame = g_new (GdkPixbufFrame, 1); - context->frame->x_offset = context->x_offset; - context->frame->y_offset = context->y_offset;; - context->frame->delay_time = context->gif89.delay_time; - switch (context->gif89.disposal) { - case 0: - case 1: - context->frame->action = GDK_PIXBUF_FRAME_RETAIN; - break; - case 2: - context->frame->action = GDK_PIXBUF_FRAME_DISPOSE; - break; - case 3: - context->frame->action = GDK_PIXBUF_FRAME_REVERT; - break; - default: - context->frame->action = GDK_PIXBUF_FRAME_RETAIN; - break; - } - context->frame->pixbuf = context->pixbuf; - if (context->animation) { - int w,h; - context->animation->n_frames ++; - context->animation->frames = g_list_append (context->animation->frames, context->frame); - w = gdk_pixbuf_get_width (context->pixbuf); - h = gdk_pixbuf_get_height (context->pixbuf); - if (w > context->animation->width) - context->animation->width = w; - if (h > context->animation->height) - context->animation->height = h; - } - } - } - dest = gdk_pixbuf_get_pixels (context->pixbuf); - - bound_flag = FALSE; - lower_bound = upper_bound = context->draw_ypos; - first_pass = context->draw_pass; - - while (TRUE) { - v = lzw_read_byte (context); - if (v < 0) { - goto finished_data; - } - bound_flag = TRUE; - - if (context->gif89.transparent != -1) { - temp = dest + context->draw_ypos * gdk_pixbuf_get_rowstride (context->pixbuf) + context->draw_xpos * 4; - *temp = context->color_map [0][(guchar) v]; - *(temp+1) = context->color_map [1][(guchar) v]; - *(temp+2) = context->color_map [2][(guchar) v]; - *(temp+3) = (guchar) ((v == context->gif89.transparent) ? 0 : -1); - } else { - temp = dest + context->draw_ypos * gdk_pixbuf_get_rowstride (context->pixbuf) + context->draw_xpos * 3; - *temp = context->color_map [0][(guchar) v]; - *(temp+1) = context->color_map [1][(guchar) v]; - *(temp+2) = context->color_map [2][(guchar) v]; - } - - if (context->prepare_func && context->frame_interlace) - gif_fill_in_lines (context, dest, v); - - context->draw_xpos++; - - if (context->draw_xpos == context->frame_len) { - context->draw_xpos = 0; - if (context->frame_interlace) { - switch (context->draw_pass) { - case 0: - case 1: - context->draw_ypos += 8; - break; - case 2: - context->draw_ypos += 4; - break; - case 3: - context->draw_ypos += 2; - break; - } - - if (context->draw_ypos >= context->frame_height) { - context->draw_pass++; - switch (context->draw_pass) { - case 1: - context->draw_ypos = 4; - break; - case 2: - context->draw_ypos = 2; - break; - case 3: - context->draw_ypos = 1; - break; - default: - goto done; - } - } - } else { - context->draw_ypos++; - } - if (context->draw_pass != first_pass) { - if (context->draw_ypos > lower_bound) { - lower_bound = 0; - upper_bound = context->frame_height; - } else { - - } - } else - upper_bound = context->draw_ypos; - } - if (context->draw_ypos >= context->frame_height) - break; - } - done: - /* we got enough data. there may be more (ie, newer layers) but we can quit now */ - if (context->animation || context->frame_done_func || context->anim_done_func) { - context->state = GIF_GET_NEXT_STEP; - } else - context->state = GIF_DONE; - v = 0; - finished_data: - if (bound_flag && context->update_func) { - if (lower_bound <= upper_bound && first_pass == context->draw_pass) { - (* context->update_func) - (context->pixbuf, - 0, lower_bound, - gdk_pixbuf_get_width (context->pixbuf), - upper_bound - lower_bound, - context->user_data); - } else { - if (lower_bound <= upper_bound) { - (* context->update_func) - (context->pixbuf, - 0, 0, - gdk_pixbuf_get_width (context->pixbuf), - gdk_pixbuf_get_height (context->pixbuf), - context->user_data); - } else { - (* context->update_func) - (context->pixbuf, - 0, 0, - gdk_pixbuf_get_width (context->pixbuf), - upper_bound, - context->user_data); - (* context->update_func) - (context->pixbuf, - 0, lower_bound, - gdk_pixbuf_get_width (context->pixbuf), - gdk_pixbuf_get_height (context->pixbuf), - context->user_data); - } - } - } - - if ((context->animation || context->frame_done_func || context->anim_done_func) - && context->state == GIF_GET_NEXT_STEP) { - if (context->frame_done_func) - (* context->frame_done_func) (context->frame, - context->user_data); - if (context->frame_done_func) - gdk_pixbuf_unref (context->pixbuf); - context->pixbuf = NULL; - context->frame = NULL; - } - - return v; -} - -static void -gif_set_prepare_lzw (GifContext *context) -{ - context->state = GIF_PREPARE_LZW; - context->lzw_code_pending = -1; -} -static int -gif_prepare_lzw (GifContext *context) -{ - gint i; - - if (!gif_read (context, &(context->lzw_set_code_size), 1)) { - /*g_message (_("GIF: EOF / read error on image data\n"));*/ - return -1; - } - - context->lzw_code_size = context->lzw_set_code_size + 1; - context->lzw_clear_code = 1 << context->lzw_set_code_size; - context->lzw_end_code = context->lzw_clear_code + 1; - context->lzw_max_code_size = 2 * context->lzw_clear_code; - context->lzw_max_code = context->lzw_clear_code + 2; - context->lzw_fresh = TRUE; - context->code_curbit = 0; - context->code_lastbit = 0; - context->code_last_byte = 0; - context->code_done = FALSE; - - for (i = 0; i < context->lzw_clear_code; ++i) { - context->lzw_table[0][i] = 0; - context->lzw_table[1][i] = i; - } - for (; i < (1 << MAX_LZW_BITS); ++i) - context->lzw_table[0][i] = context->lzw_table[1][0] = 0; - - context->lzw_sp = context->lzw_stack; - gif_set_get_lzw (context); - - return 0; -} - -/* needs 13 bytes to proceed. */ -static gint -gif_init (GifContext *context) -{ - unsigned char buf[16]; - char version[4]; - - if (!gif_read (context, buf, 6)) { - /* Unable to read magic number */ - return -1; - } - - if (strncmp ((char *) buf, "GIF", 3) != 0) { - /* Not a GIF file */ - return -1; - } - - strncpy (version, (char *) buf + 3, 3); - version[3] = '\0'; - - if ((strcmp (version, "87a") != 0) && (strcmp (version, "89a") != 0)) { - /* bad version number, not '87a' or '89a' */ - return -1; - } - - /* read the screen descriptor */ - if (!gif_read (context, buf, 7)) { - /* Failed to read screen descriptor */ - return -1; - } - - context->width = LM_to_uint (buf[0], buf[1]); - context->height = LM_to_uint (buf[2], buf[3]); - context->bit_pixel = 2 << (buf[4] & 0x07); - context->color_resolution = (((buf[4] & 0x70) >> 3) + 1); - context->background = buf[5]; - context->aspect_ratio = buf[6]; - - if (BitSet (buf[4], LOCALCOLORMAP)) { - gif_set_get_colormap (context); - } else { - context->state = GIF_GET_NEXT_STEP; - } - return 0; -} - -static void -gif_set_get_frame_info (GifContext *context) -{ - context->state = GIF_GET_FRAME_INFO; -} - -static gint -gif_get_frame_info (GifContext *context) -{ - unsigned char buf[9]; - if (!gif_read (context, buf, 9)) { - return -1; - } - /* Okay, we got all the info we need. Lets record it */ - context->frame_len = LM_to_uint (buf[4], buf[5]); - context->frame_height = LM_to_uint (buf[6], buf[7]); - context->x_offset = LM_to_uint (buf[0], buf[1]); - context->y_offset = LM_to_uint (buf[2], buf[3]); - - if (context->frame_height > context->height) { - /* we don't want to resize things. So we exit */ - context->state = GIF_DONE; - return -2; - } - - context->frame_interlace = BitSet (buf[8], INTERLACE); - if (BitSet (buf[8], LOCALCOLORMAP)) { - /* Does this frame have it's own colormap. */ - /* really only relevant when looking at the first frame - * of an animated gif. */ - /* if it does, we need to re-read in the colormap, - * the gray_scale, and the bit_pixel */ - context->bit_pixel = 1 << ((buf[8] & 0x07) + 1); - gif_set_get_colormap2 (context); - return 0; - } - gif_set_prepare_lzw (context); - return 0; - -} - -static gint -gif_get_next_step (GifContext *context) -{ - unsigned char c; - while (TRUE) { - if (!gif_read (context, &c, 1)) { - return -1; - } - if (c == ';') { - /* GIF terminator */ - /* hmm. Not 100% sure what to do about this. Should - * i try to return a blank image instead? */ - context->state = GIF_DONE; - return -2; - } - - if (c == '!') { - /* Check the extention */ - gif_set_get_extension (context); - return 0; - } - - /* look for frame */ - if (c != ',') { - /* Not a valid start character */ - continue; - } - /* load the frame */ - gif_set_get_frame_info (context); - return 0; - } -} - - -static gint -gif_main_loop (GifContext *context) -{ - gint retval = 0; - - do { - switch (context->state) { - case GIF_START: - retval = gif_init (context); - break; - - case GIF_GET_COLORMAP: - retval = gif_get_colormap (context); - if (retval == 0) - context->state = GIF_GET_NEXT_STEP; - break; - - case GIF_GET_NEXT_STEP: - retval = gif_get_next_step (context); - break; - - case GIF_GET_FRAME_INFO: - retval = gif_get_frame_info (context); - break; - - case GIF_GET_EXTENTION: - retval = gif_get_extension (context); - if (retval == 0) - context->state = GIF_GET_NEXT_STEP; - break; - - case GIF_GET_COLORMAP2: - retval = gif_get_colormap (context); - if (retval == 0) - gif_set_prepare_lzw (context); - break; - - case GIF_PREPARE_LZW: - retval = gif_prepare_lzw (context); - break; - - case GIF_LZW_FILL_BUFFER: - retval = gif_lzw_fill_buffer (context); - break; - - case GIF_LZW_CLEAR_CODE: - retval = gif_lzw_clear_code (context); - break; - - case GIF_GET_LZW: - retval = gif_get_lzw (context); - break; - - case GIF_DONE: - default: - retval = 0; - goto done; - }; - } while ((retval == 0) || (retval == -3)); - done: - return retval; -} - -static GifContext * -new_context (void) -{ - GifContext *context; - - context = g_new0 (GifContext, 1); - - context->pixbuf = NULL; - context->file = NULL; - context->state = GIF_START; - context->prepare_func = NULL; - context->update_func = NULL; - context->frame_done_func = NULL; - context->anim_done_func = NULL; - context->user_data = NULL; - context->buf = NULL; - context->amount_needed = 0; - context->gif89.transparent = -1; - context->gif89.delay_time = -1; - context->gif89.input_flag = -1; - context->gif89.disposal = -1; - - return context; -} -/* Shared library entry point */ -GdkPixbuf * -gdk_pixbuf__gif_image_load (FILE *file) -{ - GifContext *context; - GdkPixbuf *pixbuf; - - g_return_val_if_fail (file != NULL, NULL); - - context = new_context (); - context->file = file; - - gif_main_loop (context); - - pixbuf = context->pixbuf; - g_free (context); - - return pixbuf; -} - -gpointer -gdk_pixbuf__gif_image_begin_load (ModulePreparedNotifyFunc prepare_func, - ModuleUpdatedNotifyFunc update_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data) -{ - GifContext *context; - -#ifdef IO_GIFDEBUG - count = 0; -#endif - context = new_context (); - context->prepare_func = prepare_func; - context->update_func = update_func; - context->frame_done_func = frame_done_func; - context->anim_done_func = anim_done_func; - context->user_data = user_data; - - return (gpointer) context; -} - -void -gdk_pixbuf__gif_image_stop_load (gpointer data) -{ - GifContext *context = (GifContext *) data; - - /* FIXME: free the animation data */ - - if (context->pixbuf) - gdk_pixbuf_unref (context->pixbuf); - if (context->animation) - gdk_pixbuf_animation_unref (context->animation); -/* g_free (context->buf);*/ - g_free (context); -} - -gboolean -gdk_pixbuf__gif_image_load_increment (gpointer data, guchar *buf, guint size) -{ - gint retval; - GifContext *context = (GifContext *) data; - - if (context->amount_needed == 0) { - /* we aren't looking for some bytes. */ - /* we can use buf now, but we don't want to keep it around at all. - * it will be gone by the end of the call. */ - context->buf = buf; - context->ptr = 0; - context->size = size; - } else { - /* we need some bytes */ - if (size < context->amount_needed) { - context->amount_needed -= size; - /* copy it over and return */ - memcpy (context->buf + context->size, buf, size); - context->size += size; - return TRUE; - } else if (size == context->amount_needed) { - memcpy (context->buf + context->size, buf, size); - context->size += size; - } else { - context->buf = g_realloc (context->buf, context->size + size); - memcpy (context->buf + context->size, buf, size); - context->size += size; - } - } - - retval = gif_main_loop (context); - - if (retval == -2) - return FALSE; - if (retval == -1) { - /* we didn't have enough memory */ - /* prepare for the next image_load_increment */ - if (context->buf == buf) { - g_assert (context->size == size); - context->buf = (guchar *)g_new (guchar, context->amount_needed + (context->size - context->ptr)); - memcpy (context->buf, buf + context->ptr, context->size - context->ptr); - } else { - /* copy the left overs to the begining of the buffer */ - /* and realloc the memory */ - memmove (context->buf, context->buf + context->ptr, context->size - context->ptr); - context->buf = g_realloc (context->buf, context->amount_needed + (context->size - context->ptr)); - } - context->size = context->size - context->ptr; - context->ptr = 0; - } else { - /* we are prolly all done */ - if (context->buf == buf) - context->buf = NULL; - } - return TRUE; -} - -GdkPixbufAnimation * -gdk_pixbuf__gif_image_load_animation (FILE *file) -{ - GifContext *context; - GdkPixbufAnimation *animation; - - g_return_val_if_fail (file != NULL, NULL); - - context = new_context (); - context->animation = g_new (GdkPixbufAnimation, 1); - context->animation->ref_count = 1; - context->animation->n_frames = 0; - context->animation->frames = NULL; - context->animation->width = 0; - context->animation->height = 0; - context->file = file; - - gif_main_loop (context); - - animation = context->animation; - g_free (context); - return animation; -} diff --git a/gdk-pixbuf/io-ico.c b/gdk-pixbuf/io-ico.c deleted file mode 100644 index 4cb699576e..0000000000 --- a/gdk-pixbuf/io-ico.c +++ /dev/null @@ -1,689 +0,0 @@ -/* GdkPixbuf library - Windows Icon/Cursor image loader - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Arjan van de Ven - * Federico Mena-Quintero - * - * Based on io-bmp.c - * - * 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. - */ - -#undef DUMPBIH -/* - -Icons are just like BMP's, except for the header. - -Known bugs: - * bi-tonal files aren't tested - -*/ - -#include -#include -#include -#include -#include "gdk-pixbuf.h" -#include "gdk-pixbuf-io.h" - - - - -/* - -These structures are actually dummies. These are according to -the "Windows API reference guide volume II" as written by -Borland International, but GCC fiddles with the alignment of -the internal members. - -*/ - -struct BitmapFileHeader { - gushort bfType; - guint bfSize; - guint reserverd; - guint bfOffbits; -}; - -struct BitmapInfoHeader { - guint biSize; - guint biWidth; - guint biHeight; - gushort biPlanes; - gushort biBitCount; - guint biCompression; - guint biSizeImage; - guint biXPelsPerMeter; - guint biYPelsPerMeter; - guint biClrUsed; - guint biClrImportant; -}; - -#ifdef DUMPBIH -/* - -DumpBIH printf's the values in a BitmapInfoHeader to the screen, for -debugging purposes. - -*/ -static void DumpBIH(unsigned char *BIH) -{ - printf("biSize = %i \n", - (int)(BIH[3] << 24) + (BIH[2] << 16) + (BIH[1] << 8) + (BIH[0])); - printf("biWidth = %i \n", - (int)(BIH[7] << 24) + (BIH[6] << 16) + (BIH[5] << 8) + (BIH[4])); - printf("biHeight = %i \n", - (int)(BIH[11] << 24) + (BIH[10] << 16) + (BIH[9] << 8) + - (BIH[8])); - printf("biPlanes = %i \n", (int)(BIH[13] << 8) + (BIH[12])); - printf("biBitCount = %i \n", (int)(BIH[15] << 8) + (BIH[14])); - printf("biCompress = %i \n", - (int)(BIH[19] << 24) + (BIH[18] << 16) + (BIH[17] << 8) + - (BIH[16])); - printf("biSizeImage = %i \n", - (int)(BIH[23] << 24) + (BIH[22] << 16) + (BIH[21] << 8) + - (BIH[20])); - printf("biXPels = %i \n", - (int)(BIH[27] << 24) + (BIH[26] << 16) + (BIH[25] << 8) + - (BIH[24])); - printf("biYPels = %i \n", - (int)(BIH[31] << 24) + (BIH[30] << 16) + (BIH[29] << 8) + - (BIH[28])); - printf("biClrUsed = %i \n", - (int)(BIH[35] << 24) + (BIH[34] << 16) + (BIH[33] << 8) + - (BIH[32])); - printf("biClrImprtnt= %i \n", - (int)(BIH[39] << 24) + (BIH[38] << 16) + (BIH[37] << 8) + - (BIH[36])); -} -#endif - -/* Progressive loading */ -struct headerpair { - guint width; - guint height; - guint depth; - guint Negative; /* Negative = 1 -> top down BMP, - Negative = 0 -> bottom up BMP */ -}; - -struct ico_progressive_state { - ModulePreparedNotifyFunc prepared_func; - ModuleUpdatedNotifyFunc updated_func; - gpointer user_data; - - gint HeaderSize; /* The size of the header-part (incl colormap) */ - guchar *HeaderBuf; /* The buffer for the header (incl colormap) */ - gint BytesInHeaderBuf; /* The size of the allocated HeaderBuf */ - gint HeaderDone; /* The nr of bytes actually in HeaderBuf */ - - gint LineWidth; /* The width of a line in bytes */ - guchar *LineBuf; /* Buffer for 1 line */ - gint LineDone; /* # of bytes in LineBuf */ - gint Lines; /* # of finished lines */ - - gint Type; /* - 24 = RGB - 8 = 8 bit colormapped - 1 = 1 bit bitonal - */ - - - struct headerpair Header; /* Decoded (BE->CPU) header */ - - gint DIBoffset; - gint ImageScore; - - - GdkPixbuf *pixbuf; /* Our "target" */ -}; - -gpointer -gdk_pixbuf__ico_image_begin_load(ModulePreparedNotifyFunc prepared_func, - ModuleUpdatedNotifyFunc updated_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data); -void gdk_pixbuf__ico_image_stop_load(gpointer data); -gboolean gdk_pixbuf__ico_image_load_increment(gpointer data, guchar * buf, guint size); - - - -/* Shared library entry point --> Can go when generic_image_load - enters gdk-pixbuf-io */ -GdkPixbuf * -gdk_pixbuf__ico_image_load(FILE * f) -{ - guchar *membuf; - size_t length; - struct ico_progressive_state *State; - - GdkPixbuf *pb; - - State = gdk_pixbuf__ico_image_begin_load(NULL, NULL, NULL, NULL, NULL); - membuf = g_malloc(4096); - - g_assert(membuf != NULL); - - while (feof(f) == 0) { - length = fread(membuf, 1, 4096, f); - if (length > 0) - gdk_pixbuf__ico_image_load_increment(State, membuf, length); - - } - g_free(membuf); - if (State->pixbuf != NULL) - gdk_pixbuf_ref(State->pixbuf); - - pb = State->pixbuf; - - gdk_pixbuf__ico_image_stop_load(State); - return pb; -} - -static void DecodeHeader(guchar *Data, gint Bytes, - struct ico_progressive_state *State) -{ -/* For ICO's we have to be very clever. There are multiple images possible - in an .ICO. For now, we select (in order of priority): - 1) The one with the highest number of colors - 2) The largest one - */ - - gint IconCount = 0; /* The number of icon-versions in the file */ - guchar *BIH; /* The DIB for the used icon */ - guchar *Ptr; - gint I; - - /* Step 1: The ICO header */ - - IconCount = (Data[5] << 8) + (Data[4]); - - State->HeaderSize = 6 + IconCount*16; - - if (State->HeaderSize>State->BytesInHeaderBuf) { - State->HeaderBuf=g_realloc(State->HeaderBuf,State->HeaderSize); - State->BytesInHeaderBuf = State->HeaderSize; - } - if (Bytes < State->HeaderSize) - return; - - /* We now have all the "short-specs" of the versions - So we iterate through them and select the best one */ - - State->ImageScore = 0; - State->DIBoffset = 0; - Ptr = Data + 6; - for (I=0;IState->ImageScore) { - State->ImageScore = ThisScore; - State->DIBoffset = (Ptr[15]<<24)+(Ptr[14]<<16)+ - (Ptr[13]<<8) + (Ptr[12]); - - } - - - Ptr += 16; - } - - /* We now have a winner, pointed to in State->DIBoffset, - so we know how many bytes are in the "header" part. */ - - State->HeaderSize = State->DIBoffset + 40; /* 40 = sizeof(InfoHeader) */ - - if (State->HeaderSize>State->BytesInHeaderBuf) { - State->HeaderBuf=g_realloc(State->HeaderBuf,State->HeaderSize); - State->BytesInHeaderBuf = State->HeaderSize; - } - if (BytesHeaderSize) - return; - - BIH = Data+State->DIBoffset; - -#ifdef DUMPBIH - DumpBIH(BIH); -#endif - - /* Add the palette to the headersize */ - - State->Header.width = - (int)(BIH[7] << 24) + (BIH[6] << 16) + (BIH[5] << 8) + (BIH[4]); - State->Header.height = - (int)(BIH[11] << 24) + (BIH[10] << 16) + (BIH[9] << 8) + (BIH[8])/2; - /* /2 because the BIH height includes the transparency mask */ - State->Header.depth = (BIH[15] << 8) + (BIH[14]);; - - State->Type = State->Header.depth; - if (State->Lines>=State->Header.height) - State->Type = 1; /* The transparency mask is 1 bpp */ - - - - /* Determine the palette size. If the header indicates 0, it - is actually the maximum for the bpp. You have to love the - guys who made the spec. */ - I = (int)(BIH[35] << 24) + (BIH[34] << 16) + (BIH[33] << 8) + (BIH[32]); - I = I*4; - if ((I==0)&&(State->Type==1)) - I = 2*4; - if ((I==0)&&(State->Type==4)) - I = 16*4; - if ((I==0)&&(State->Type==8)) - I = 256*4; - - State->HeaderSize+=I; - - if (State->HeaderSize>State->BytesInHeaderBuf) { - State->HeaderBuf=g_realloc(State->HeaderBuf,State->HeaderSize); - State->BytesInHeaderBuf = State->HeaderSize; - } - if (Bytes < State->HeaderSize) - return; - - if ((BIH[16] != 0) || (BIH[17] != 0) || (BIH[18] != 0) - || (BIH[19] != 0)) { - g_assert(0); /* Compressed icons aren't allowed */ - } - - /* Negative heights mean top-down pixel-order */ - if (State->Header.height < 0) { - State->Header.height = -State->Header.height; - State->Header.Negative = 1; - } - if (State->Header.width < 0) { - State->Header.width = -State->Header.width; - } - - if (State->Type == 24) - State->LineWidth = State->Header.width * 3; - if (State->Type == 8) - State->LineWidth = State->Header.width * 1; - if (State->Type == 4) { - State->LineWidth = (State->Header.width+1)/2; - } - if (State->Type == 1) { - State->LineWidth = State->Header.width / 8; - if ((State->Header.width & 7) != 0) - State->LineWidth++; - } - - /* Pad to a 32 bit boundary */ - if (((State->LineWidth % 4) > 0)) - State->LineWidth = (State->LineWidth / 4) * 4 + 4; - - - if (State->LineBuf == NULL) - State->LineBuf = g_malloc(State->LineWidth); - - g_assert(State->LineBuf != NULL); - - - if (State->pixbuf == NULL) { - State->pixbuf = - gdk_pixbuf_new(ART_PIX_RGB, TRUE, 8, - (gint) State->Header.width, - (gint) State->Header.height); - - if (State->prepared_func != NULL) - /* Notify the client that we are ready to go */ - (*State->prepared_func) (State->pixbuf, - State->user_data); - - } - -} - -/* - * func - called when we have pixmap created (but no image data) - * user_data - passed as arg 1 to func - * return context (opaque to user) - */ - -gpointer -gdk_pixbuf__ico_image_begin_load(ModulePreparedNotifyFunc prepared_func, - ModuleUpdatedNotifyFunc updated_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data) -{ - struct ico_progressive_state *context; - - context = g_new0(struct ico_progressive_state, 1); - context->prepared_func = prepared_func; - context->updated_func = updated_func; - context->user_data = user_data; - - context->HeaderSize = 54; - context->HeaderBuf = g_malloc(14 + 40 + 4*256 + 512); - /* 4*256 for the colormap */ - context->BytesInHeaderBuf = 14 + 40 + 4*256 + 512 ; - context->HeaderDone = 0; - - context->LineWidth = 0; - context->LineBuf = NULL; - context->LineDone = 0; - context->Lines = 0; - - context->Type = 0; - - memset(&context->Header, 0, sizeof(struct headerpair)); - - - context->pixbuf = NULL; - - - return (gpointer) context; -} - -/* - * context - returned from image_begin_load - * - * free context, unref gdk_pixbuf - */ -void gdk_pixbuf__ico_image_stop_load(gpointer data) -{ - struct ico_progressive_state *context = - (struct ico_progressive_state *) data; - - - g_return_if_fail(context != NULL); - - if (context->LineBuf != NULL) - g_free(context->LineBuf); - context->LineBuf = NULL; - if (context->HeaderBuf != NULL) - g_free(context->HeaderBuf); - - if (context->pixbuf) - gdk_pixbuf_unref(context->pixbuf); - - g_free(context); -} - - -static void OneLine24(struct ico_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - if (context->Header.Negative == 0) - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - (context->Header.height - context->Lines - 1); - else - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - context->Lines; - while (X < context->Header.width) { - Pixels[X * 4 + 0] = context->LineBuf[X * 3 + 2]; - Pixels[X * 4 + 1] = context->LineBuf[X * 3 + 1]; - Pixels[X * 4 + 2] = context->LineBuf[X * 3 + 0]; - X++; - } - -} - -static void OneLine8(struct ico_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - if (context->Header.Negative == 0) - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - (context->Header.height - context->Lines - 1); - else - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - context->Lines; - while (X < context->Header.width) { - /* The joys of having a BGR byteorder */ - Pixels[X * 4 + 0] = - context->HeaderBuf[4 * context->LineBuf[X] + 42+context->DIBoffset]; - Pixels[X * 4 + 1] = - context->HeaderBuf[4 * context->LineBuf[X] + 41+context->DIBoffset]; - Pixels[X * 4 + 2] = - context->HeaderBuf[4 * context->LineBuf[X] + 40+context->DIBoffset]; - X++; - } -} -static void OneLine4(struct ico_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - if (context->Header.Negative == 0) - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - (context->Header.height - context->Lines - 1); - else - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - context->Lines; - - while (X < context->Header.width) { - guchar Pix; - - Pix = context->LineBuf[X/2]; - - Pixels[X * 4 + 0] = - context->HeaderBuf[4 * (Pix>>4) + 42+context->DIBoffset]; - Pixels[X * 4 + 1] = - context->HeaderBuf[4 * (Pix>>4) + 41+context->DIBoffset]; - Pixels[X * 4 + 2] = - context->HeaderBuf[4 * (Pix>>4) + 40+context->DIBoffset]; - X++; - if (XHeader.width) { - /* Handle the other 4 bit pixel only when there is one */ - Pixels[X * 4 + 0] = - context->HeaderBuf[4 * (Pix&15) + 42+context->DIBoffset]; - Pixels[X * 4 + 1] = - context->HeaderBuf[4 * (Pix&15) + 41+context->DIBoffset]; - Pixels[X * 4 + 2] = - context->HeaderBuf[4 * (Pix&15) + 40+context->DIBoffset]; - X++; - } - } - -} - -static void OneLine1(struct ico_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - if (context->Header.Negative == 0) - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - (context->Header.height - context->Lines - 1); - else - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - context->Lines; - while (X < context->Header.width) { - int Bit; - - Bit = (context->LineBuf[X / 8]) >> (7 - (X & 7)); - Bit = Bit & 1; - /* The joys of having a BGR byteorder */ - Pixels[X * 4 + 0] = Bit*255; - Pixels[X * 4 + 1] = Bit*255; - Pixels[X * 4 + 2] = Bit*255; - X++; - } -} - -static void OneLineTransp(struct ico_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - if (context->Header.Negative == 0) - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - (2*context->Header.height - context->Lines - 1); - else - Pixels = context->pixbuf->art_pixbuf->pixels + - gdk_pixbuf_get_rowstride(context->pixbuf) * - (context->Lines-context->Header.height); - while (X < context->Header.width) { - int Bit; - - Bit = (context->LineBuf[X / 8]) >> (7 - (X & 7)); - Bit = Bit & 1; - /* The joys of having a BGR byteorder */ - Pixels[X * 4 + 3] = 255-Bit*255; -#if 0 - if (Bit){ - Pixels[X*4+0] = 255; - Pixels[X*4+1] = 255; - } else { - Pixels[X*4+0] = 0; - Pixels[X*4+1] = 0; - } -#endif - X++; - } -} - - -static void OneLine(struct ico_progressive_state *context) -{ - context->LineDone = 0; - - if (context->Lines >= context->Header.height*2) { - return; - } - - if (context->Lines Header.height) { - - if (context->Type == 24) - OneLine24(context); - if (context->Type == 8) - OneLine8(context); - if (context->Type == 4) - OneLine4(context); - if (context->Type == 1) - OneLine1(context); - } else - { - OneLineTransp(context); - } - - context->Lines++; - if (context->Lines>=context->Header.height) { - context->Type = 1; - context->LineWidth = context->Header.width / 8; - if ((context->Header.width & 7) != 0) - context->LineWidth++; - /* Pad to a 32 bit boundary */ - if (((context->LineWidth % 4) > 0)) - context->LineWidth = (context->LineWidth / 4) * 4 + 4; - - } - - - if (context->updated_func != NULL) { - (*context->updated_func) (context->pixbuf, - 0, - context->Lines, - context->Header.width, - context->Header.height, - context->user_data); - - } -} - -/* - * context - from image_begin_load - * buf - new image data - * size - length of new image data - * - * append image data onto inrecrementally built output image - */ -gboolean -gdk_pixbuf__ico_image_load_increment(gpointer data, guchar * buf, guint size) -{ - struct ico_progressive_state *context = - (struct ico_progressive_state *) data; - - gint BytesToCopy; - - while (size > 0) { - g_assert(context->LineDone >= 0); - if (context->HeaderDone < context->HeaderSize) { /* We still - have headerbytes to do */ - BytesToCopy = - context->HeaderSize - context->HeaderDone; - if (BytesToCopy > size) - BytesToCopy = size; - - memmove(context->HeaderBuf + context->HeaderDone, - buf, BytesToCopy); - - size -= BytesToCopy; - buf += BytesToCopy; - context->HeaderDone += BytesToCopy; - - } else - { - BytesToCopy = - context->LineWidth - context->LineDone; - if (BytesToCopy > size) - BytesToCopy = size; - - if (BytesToCopy > 0) { - memmove(context->LineBuf + - context->LineDone, buf, - BytesToCopy); - - size -= BytesToCopy; - buf += BytesToCopy; - context->LineDone += BytesToCopy; - } - if ((context->LineDone >= context->LineWidth) && - (context->LineWidth > 0)) - OneLine(context); - - - } - - if (context->HeaderDone >= 6) - DecodeHeader(context->HeaderBuf, - context->HeaderDone, context); - - - } - - return TRUE; -} diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c deleted file mode 100644 index 0845a3dc3c..0000000000 --- a/gdk-pixbuf/io-jpeg.c +++ /dev/null @@ -1,550 +0,0 @@ -/* GdkPixbuf library - JPEG image loader - * - * Copyright (C) 1999 Michael Zucchi - * Copyright (C) 1999 The Free Software Foundation - * - * Progressive loading code Copyright (C) 1999 Red Hat, Inc. - * - * Authors: Michael Zucchi - * Federico Mena-Quintero - * Michael Fulbright - * - * 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. - */ - - -/* - Progressive file loading notes (11/03/1999) ... - - These are issues I know of and will be dealing with shortly: - - - Currently does not handle progressive jpegs - this - requires a change in the way image_load_increment () calls - libjpeg. Progressive jpegs are rarer but I will add this - support asap. - - - error handling is not as good as it should be - - */ - - -#include -#include -#include -#include -#include -#include -#include "gdk-pixbuf.h" -#include "gdk-pixbuf-io.h" - - - -/* we are a "source manager" as far as libjpeg is concerned */ -#define JPEG_PROG_BUF_SIZE 4096 - -typedef struct { - struct jpeg_source_mgr pub; /* public fields */ - - JOCTET buffer[JPEG_PROG_BUF_SIZE]; /* start of buffer */ - long skip_next; /* number of bytes to skip next read */ - -} my_source_mgr; - -typedef my_source_mgr * my_src_ptr; - -/* error handler data */ -struct error_handler_data { - struct jpeg_error_mgr pub; - sigjmp_buf setjmp_buffer; -}; - -/* progressive loader context */ -typedef struct { - ModuleUpdatedNotifyFunc updated_func; - ModulePreparedNotifyFunc prepared_func; - gpointer user_data; - - GdkPixbuf *pixbuf; - guchar *dptr; /* current position in pixbuf */ - - gboolean did_prescan; /* are we in image data yet? */ - gboolean got_header; /* have we loaded jpeg header? */ - gboolean src_initialized;/* TRUE when jpeg lib initialized */ - struct jpeg_decompress_struct cinfo; - struct error_handler_data jerr; -} JpegProgContext; - -GdkPixbuf *gdk_pixbuf__jpeg_image_load (FILE *f); -gpointer gdk_pixbuf__jpeg_image_begin_load (ModulePreparedNotifyFunc func, - ModuleUpdatedNotifyFunc func2, - ModuleFrameDoneNotifyFunc func3, - ModuleAnimationDoneNotifyFunc func4, - gpointer user_data); -void gdk_pixbuf__jpeg_image_stop_load (gpointer context); -gboolean gdk_pixbuf__jpeg_image_load_increment(gpointer context, guchar *buf, guint size); - - -static void -fatal_error_handler (j_common_ptr cinfo) -{ - /* FIXME: - * We should somehow signal what error occurred to the caller so the - * caller can handle the error message */ - struct error_handler_data *errmgr; - - errmgr = (struct error_handler_data *) cinfo->err; - cinfo->err->output_message (cinfo); - siglongjmp (errmgr->setjmp_buffer, 1); - return; -} - -/* Destroy notification function for the libart pixbuf */ -static void -free_buffer (gpointer user_data, gpointer data) -{ - free (data); -} - - -/* explode gray image data from jpeg library into rgb components in pixbuf */ -static void -explode_gray_into_buf (struct jpeg_decompress_struct *cinfo, - guchar **lines) -{ - gint i, j; - guint w; - - g_return_if_fail (cinfo != NULL); - g_return_if_fail (cinfo->output_components == 1); - - /* Expand grey->colour. Expand from the end of the - * memory down, so we can use the same buffer. - */ - w = cinfo->image_width; - for (i = cinfo->rec_outbuf_height - 1; i >= 0; i--) { - guchar *from, *to; - - from = lines[i] + w - 1; - to = lines[i] + (w - 1) * 3; - for (j = w - 1; j >= 0; j--) { - to[0] = from[0]; - to[1] = from[0]; - to[2] = from[0]; - to -= 3; - from--; - } - } -} - -/* Shared library entry point */ -GdkPixbuf * -gdk_pixbuf__jpeg_image_load (FILE *f) -{ - gint w, h, i; - guchar *pixels = NULL; - guchar *dptr; - guchar *lines[4]; /* Used to expand rows, via rec_outbuf_height, - * from the header file: - * " Usually rec_outbuf_height will be 1 or 2, - * at most 4." - */ - guchar **lptr; - struct jpeg_decompress_struct cinfo; - struct error_handler_data jerr; - - /* setup error handler */ - cinfo.err = jpeg_std_error (&jerr.pub); - jerr.pub.error_exit = fatal_error_handler; - - if (sigsetjmp (jerr.setjmp_buffer, 1)) { - /* Whoops there was a jpeg error */ - if (pixels) - free (pixels); - - jpeg_destroy_decompress (&cinfo); - return NULL; - } - - /* load header, setup */ - jpeg_create_decompress (&cinfo); - jpeg_stdio_src (&cinfo, f); - jpeg_read_header (&cinfo, TRUE); - jpeg_start_decompress (&cinfo); - cinfo.do_fancy_upsampling = FALSE; - cinfo.do_block_smoothing = FALSE; - - w = cinfo.output_width; - h = cinfo.output_height; - - pixels = g_malloc (h * w * 3); - if (!pixels) { - jpeg_destroy_decompress (&cinfo); - return NULL; - } - - dptr = pixels; - - /* decompress all the lines, a few at a time */ - - while (cinfo.output_scanline < cinfo.output_height) { - lptr = lines; - for (i = 0; i < cinfo.rec_outbuf_height; i++) { - *lptr++ = dptr; - dptr += w * 3; - } - - jpeg_read_scanlines (&cinfo, lines, cinfo.rec_outbuf_height); - - if (cinfo.output_components == 1) - explode_gray_into_buf (&cinfo, lines); - } - - jpeg_finish_decompress (&cinfo); - jpeg_destroy_decompress (&cinfo); - - return gdk_pixbuf_new_from_data (pixels, ART_PIX_RGB, FALSE, - w, h, w * 3, - free_buffer, NULL); -} - - -/**** Progressive image loading handling *****/ - -/* these routines required because we are acting as a source manager for */ -/* libjpeg. */ -static void -init_source (j_decompress_ptr cinfo) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - - src->skip_next = 0; -} - - -static void -term_source (j_decompress_ptr cinfo) -{ - /* XXXX - probably should scream something has happened */ -} - - -/* for progressive loading (called "I/O Suspension" by libjpeg docs) */ -/* we do nothing except return "FALSE" */ -static boolean -fill_input_buffer (j_decompress_ptr cinfo) -{ - return FALSE; -} - - -static void -skip_input_data (j_decompress_ptr cinfo, long num_bytes) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - long num_can_do; - - /* move as far as we can into current buffer */ - /* then set skip_next to catch the rest */ - if (num_bytes > 0) { - num_can_do = MIN (src->pub.bytes_in_buffer, num_bytes); - src->pub.next_input_byte += (size_t) num_can_do; - src->pub.bytes_in_buffer -= (size_t) num_can_do; - - src->skip_next = num_bytes - num_can_do; - } -} - - -/* - * func - called when we have pixmap created (but no image data) - * user_data - passed as arg 1 to func - * return context (opaque to user) - */ - -gpointer -gdk_pixbuf__jpeg_image_begin_load (ModulePreparedNotifyFunc prepared_func, - ModuleUpdatedNotifyFunc updated_func, - ModuleFrameDoneNotifyFunc frame_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data) -{ - JpegProgContext *context; - my_source_mgr *src; - - context = g_new0 (JpegProgContext, 1); - context->prepared_func = prepared_func; - context->updated_func = updated_func; - context->user_data = user_data; - context->pixbuf = NULL; - context->got_header = FALSE; - context->did_prescan = FALSE; - context->src_initialized = FALSE; - - /* create libjpeg structures */ - jpeg_create_decompress (&context->cinfo); - - context->cinfo.src = (struct jpeg_source_mgr *) g_new0 (my_source_mgr, 1); - src = (my_src_ptr) context->cinfo.src; - - context->cinfo.err = jpeg_std_error (&context->jerr.pub); - - src = (my_src_ptr) context->cinfo.src; - src->pub.init_source = init_source; - src->pub.fill_input_buffer = fill_input_buffer; - src->pub.skip_input_data = skip_input_data; - src->pub.resync_to_restart = jpeg_resync_to_restart; - src->pub.term_source = term_source; - src->pub.bytes_in_buffer = 0; - src->pub.next_input_byte = NULL; - - return (gpointer) context; -} - -/* - * context - returned from image_begin_load - * - * free context, unref gdk_pixbuf - */ -void -gdk_pixbuf__jpeg_image_stop_load (gpointer data) -{ - JpegProgContext *context = (JpegProgContext *) data; - - g_return_if_fail (context != NULL); - - if (context->pixbuf) - gdk_pixbuf_unref (context->pixbuf); - - jpeg_finish_decompress(&context->cinfo); - jpeg_destroy_decompress(&context->cinfo); - - if (context->cinfo.src) { - my_src_ptr src = (my_src_ptr) context->cinfo.src; - - g_free (src); - } - - g_free (context); -} - - - - -/* - * context - from image_begin_load - * buf - new image data - * size - length of new image data - * - * append image data onto inrecrementally built output image - */ -gboolean -gdk_pixbuf__jpeg_image_load_increment (gpointer data, guchar *buf, guint size) -{ - JpegProgContext *context = (JpegProgContext *)data; - struct jpeg_decompress_struct *cinfo; - my_src_ptr src; - guint num_left, num_copy; - guint last_bytes_left; - guint spinguard; - gboolean first; - guchar *bufhd; - - g_return_val_if_fail (context != NULL, FALSE); - g_return_val_if_fail (buf != NULL, FALSE); - - src = (my_src_ptr) context->cinfo.src; - - cinfo = &context->cinfo; - - /* XXXXXXX (drmike) - loop(s) below need to be recoded now I - * have a grasp of what the flow needs to be! - */ - - - /* skip over data if requested, handle unsigned int sizes cleanly */ - /* only can happen if we've already called jpeg_get_header once */ - if (context->src_initialized && src->skip_next) { - if (src->skip_next > size) { - src->skip_next -= size; - return TRUE; - } else { - num_left = size - src->skip_next; - bufhd = buf + src->skip_next; - src->skip_next = 0; - } - } else { - num_left = size; - bufhd = buf; - } - - if (num_left == 0) - return TRUE; - - last_bytes_left = 0; - spinguard = 0; - first = TRUE; - while (TRUE) { - - /* handle any data from caller we haven't processed yet */ - if (num_left > 0) { - if(src->pub.bytes_in_buffer && - src->pub.next_input_byte != src->buffer) - memmove(src->buffer, src->pub.next_input_byte, - src->pub.bytes_in_buffer); - - - num_copy = MIN (JPEG_PROG_BUF_SIZE - src->pub.bytes_in_buffer, - num_left); - -/* if (num_copy == 0) - g_error ("Buffer overflow!"); -*/ - memcpy(src->buffer + src->pub.bytes_in_buffer, bufhd,num_copy); - src->pub.next_input_byte = src->buffer; - src->pub.bytes_in_buffer += num_copy; - bufhd += num_copy; - num_left -= num_copy; - } else { - /* did anything change from last pass, if not return */ - if (first) { - last_bytes_left = src->pub.bytes_in_buffer; - first = FALSE; - } else if (src->pub.bytes_in_buffer == last_bytes_left) - spinguard++; - else - last_bytes_left = src->pub.bytes_in_buffer; - } - - /* should not go through twice and not pull bytes out of buf */ - if (spinguard > 2) - return TRUE; - - /* try to load jpeg header */ - if (!context->got_header) { - int rc; - - rc = jpeg_read_header (cinfo, TRUE); - context->src_initialized = TRUE; - - if (rc == JPEG_SUSPENDED) - continue; - - context->got_header = TRUE; - -#if 0 - if (jpeg_has_multiple_scans (cinfo)) { - g_print ("io-jpeg.c: Does not currently " - "support progressive jpeg files.\n"); - return FALSE; - } -#endif - context->pixbuf = gdk_pixbuf_new(ART_PIX_RGB, - /*have_alpha*/ FALSE, - 8, - cinfo->image_width, - cinfo->image_height); - - if (context->pixbuf == NULL) { - /* Failed to allocate memory */ - g_error ("Couldn't allocate gdkpixbuf"); - } - - /* Use pixbuf buffer to store decompressed data */ - context->dptr = context->pixbuf->art_pixbuf->pixels; - - /* Notify the client that we are ready to go */ - (* context->prepared_func) (context->pixbuf, - context->user_data); - - } else if (!context->did_prescan) { - int rc; - - /* start decompression */ - rc = jpeg_start_decompress (cinfo); - cinfo->do_fancy_upsampling = FALSE; - cinfo->do_block_smoothing = FALSE; - - if (rc == JPEG_SUSPENDED) - continue; - - context->did_prescan = TRUE; - } else { - - /* we're decompressing so feed jpeg lib scanlines */ - guchar *lines[4]; - guchar **lptr; - guchar *rowptr; - gint nlines, i; - gint start_scanline; - - /* keep going until we've done all scanlines */ - while (cinfo->output_scanline < cinfo->output_height) { - start_scanline = cinfo->output_scanline; - lptr = lines; - rowptr = context->dptr; - for (i=0; i < cinfo->rec_outbuf_height; i++) { - *lptr++ = rowptr; - rowptr += context->pixbuf->art_pixbuf->rowstride; - } - - nlines = jpeg_read_scanlines (cinfo, lines, - cinfo->rec_outbuf_height); - if (nlines == 0) - break; - - /* handle gray */ - if (cinfo->output_components == 1) - explode_gray_into_buf (cinfo, lines); - - context->dptr += nlines * context->pixbuf->art_pixbuf->rowstride; - - /* send updated signal */ - (* context->updated_func) (context->pixbuf, - 0, - cinfo->output_scanline-1, - cinfo->image_width, - nlines, - context->user_data); - -#undef DEBUG_JPEG_PROGRESSIVE -#ifdef DEBUG_JPEG_PROGRESSIVE - - if (start_scanline != cinfo->output_scanline) - g_print("jpeg: Input pass=%2d, next input scanline=%3d," - " emitted %3d - %3d\n", - cinfo->input_scan_number, cinfo->input_iMCU_row * 16, - start_scanline, cinfo->output_scanline - 1); - - - - g_print ("Scanline %d of %d - ", - cinfo->output_scanline, - cinfo->output_height); -/* g_print ("rec_height %d -", cinfo->rec_outbuf_height); */ - g_print ("Processed %d lines - bytes left = %d\n", - nlines, cinfo->src->bytes_in_buffer); -#endif - } - /* did entire image */ - if (cinfo->output_scanline >= cinfo->output_height) - return TRUE; - else - continue; - } - } - - return TRUE; -} diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c deleted file mode 100644 index 3ad9bb3fd2..0000000000 --- a/gdk-pixbuf/io-png.c +++ /dev/null @@ -1,524 +0,0 @@ -/* GdkPixbuf library - JPEG image loader - * - * Copyright (C) 1999 Mark Crichton - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Mark Crichton - * Federico Mena-Quintero - * - * 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. - */ - -#include -#include -#include -#include "gdk-pixbuf.h" -#include "gdk-pixbuf-io.h" - - - -static void -setup_png_transformations(png_structp png_read_ptr, png_infop png_info_ptr, - gboolean *fatal_error_occurred, - png_uint_32* width_p, png_uint_32* height_p, - int* color_type_p) -{ - png_uint_32 width, height; - int bit_depth, color_type, interlace_type, compression_type, filter_type; - int channels; - - /* Get the image info */ - - png_get_IHDR (png_read_ptr, png_info_ptr, - &width, &height, - &bit_depth, - &color_type, - &interlace_type, - &compression_type, - &filter_type); - - /* set_expand() basically needs to be called unless - we are already in RGB/RGBA mode - */ - if (color_type == PNG_COLOR_TYPE_PALETTE && - bit_depth <= 8) { - - /* Convert indexed images to RGB */ - png_set_expand (png_read_ptr); - - } else if (color_type == PNG_COLOR_TYPE_GRAY && - bit_depth < 8) { - - /* Convert grayscale to RGB */ - png_set_expand (png_read_ptr); - - } else if (png_get_valid (png_read_ptr, - png_info_ptr, PNG_INFO_tRNS)) { - - /* If we have transparency header, convert it to alpha - channel */ - png_set_expand(png_read_ptr); - - } else if (bit_depth < 8) { - - /* If we have < 8 scale it up to 8 */ - png_set_expand(png_read_ptr); - - - /* Conceivably, png_set_packing() is a better idea; - * God only knows how libpng works - */ - } - - /* If we are 16-bit, convert to 8-bit */ - if (bit_depth == 16) { - png_set_strip_16(png_read_ptr); - } - - /* If gray scale, convert to RGB */ - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { - png_set_gray_to_rgb(png_read_ptr); - } - - /* If interlaced, handle that */ - if (interlace_type != PNG_INTERLACE_NONE) { - png_set_interlace_handling(png_read_ptr); - } - - /* Update the info the reflect our transformations */ - png_read_update_info(png_read_ptr, png_info_ptr); - - png_get_IHDR (png_read_ptr, png_info_ptr, - &width, &height, - &bit_depth, - &color_type, - &interlace_type, - &compression_type, - &filter_type); - - *width_p = width; - *height_p = height; - *color_type_p = color_type; - -#ifndef G_DISABLE_CHECKS - /* Check that the new info is what we want */ - - if (bit_depth != 8) { - g_warning("Bits per channel of transformed PNG is %d, not 8.", bit_depth); - *fatal_error_occurred = TRUE; - return; - } - - if ( ! (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) ) { - g_warning("Transformed PNG not RGB or RGBA."); - *fatal_error_occurred = TRUE; - return; - } - - channels = png_get_channels(png_read_ptr, png_info_ptr); - if ( ! (channels == 3 || channels == 4) ) { - g_warning("Transformed PNG has %d channels, must be 3 or 4.", channels); - *fatal_error_occurred = TRUE; - return; - } -#endif -} - -/* Destroy notification function for the libart pixbuf */ -static void -free_buffer (gpointer user_data, gpointer data) -{ - free (data); -} - -/* Shared library entry point */ -GdkPixbuf * -gdk_pixbuf__png_image_load (FILE *f) -{ - png_structp png_ptr; - png_infop info_ptr, end_info; - gboolean failed = FALSE; - gint i, ctype, bpp; - png_uint_32 w, h; - png_bytepp rows; - guchar *pixels; - - png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - if (!png_ptr) - return NULL; - - info_ptr = png_create_info_struct (png_ptr); - if (!info_ptr) { - png_destroy_read_struct (&png_ptr, NULL, NULL); - return NULL; - } - - end_info = png_create_info_struct (png_ptr); - if (!end_info) { - png_destroy_read_struct (&png_ptr, &info_ptr, NULL); - return NULL; - } - - if (setjmp (png_ptr->jmpbuf)) { - png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); - return NULL; - } - - png_init_io (png_ptr, f); - png_read_info (png_ptr, info_ptr); - - setup_png_transformations(png_ptr, info_ptr, &failed, &w, &h, &ctype); - - if (failed) { - png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); - return NULL; - } - - if (ctype & PNG_COLOR_MASK_ALPHA) - bpp = 4; - else - bpp = 3; - - pixels = malloc (w * h * bpp); - if (!pixels) { - png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); - return NULL; - } - - rows = g_new (png_bytep, h); - - for (i = 0; i < h; i++) - rows[i] = pixels + i * w * bpp; - - png_read_image (png_ptr, rows); - png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); - g_free (rows); - - if (ctype & PNG_COLOR_MASK_ALPHA) - return gdk_pixbuf_new_from_data (pixels, ART_PIX_RGB, TRUE, - w, h, w * 4, - free_buffer, NULL); - else - return gdk_pixbuf_new_from_data (pixels, ART_PIX_RGB, FALSE, - w, h, w * 3, - free_buffer, NULL); -} - -/* These avoid the setjmp()/longjmp() crap in libpng */ -static void png_error_callback (png_structp png_read_ptr, - png_const_charp error_msg); - -static void png_warning_callback(png_structp png_read_ptr, - png_const_charp warning_msg); - -/* Called at the start of the progressive load */ -static void png_info_callback (png_structp png_read_ptr, - png_infop png_info_ptr); - -/* Called for each row; note that you will get duplicate row numbers - for interlaced PNGs */ -static void png_row_callback (png_structp png_read_ptr, - png_bytep new_row, - png_uint_32 row_num, - int pass_num); - -/* Called after reading the entire image */ -static void png_end_callback (png_structp png_read_ptr, - png_infop png_info_ptr); - -typedef struct _LoadContext LoadContext; - -struct _LoadContext { - png_structp png_read_ptr; - png_infop png_info_ptr; - - ModulePreparedNotifyFunc prepare_func; - ModuleUpdatedNotifyFunc update_func; - gpointer notify_user_data; - - GdkPixbuf* pixbuf; - - /* row number of first row seen, or -1 if none yet seen */ - - gint first_row_seen_in_chunk; - - /* pass number for the first row seen */ - - gint first_pass_seen_in_chunk; - - /* row number of last row seen */ - gint last_row_seen_in_chunk; - - gint last_pass_seen_in_chunk; - - /* highest row number seen */ - gint max_row_seen_in_chunk; - - guint fatal_error_occurred : 1; - -}; - -gpointer -gdk_pixbuf__png_image_begin_load (ModulePreparedNotifyFunc prepare_func, - ModuleUpdatedNotifyFunc update_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data) -{ - LoadContext* lc; - - lc = g_new0(LoadContext, 1); - - lc->fatal_error_occurred = FALSE; - - lc->prepare_func = prepare_func; - lc->update_func = update_func; - lc->notify_user_data = user_data; - - lc->first_row_seen_in_chunk = -1; - lc->last_row_seen_in_chunk = -1; - lc->first_pass_seen_in_chunk = -1; - lc->last_pass_seen_in_chunk = -1; - lc->max_row_seen_in_chunk = -1; - - /* Create the main PNG context struct */ - - lc->png_read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - lc, /* error/warning callback data */ - png_error_callback, - png_warning_callback); - - if (lc->png_read_ptr == NULL) { - g_free(lc); - return NULL; - } - - /* Create the auxiliary context struct */ - - lc->png_info_ptr = png_create_info_struct(lc->png_read_ptr); - - if (lc->png_info_ptr == NULL) { - png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL); - g_free(lc); - return NULL; - } - - png_set_progressive_read_fn(lc->png_read_ptr, - lc, /* callback data */ - png_info_callback, - png_row_callback, - png_end_callback); - - - return lc; -} - -void -gdk_pixbuf__png_image_stop_load (gpointer context) -{ - LoadContext* lc = context; - - g_return_if_fail(lc != NULL); - - gdk_pixbuf_unref(lc->pixbuf); - - png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL); - g_free(lc); -} - -gboolean -gdk_pixbuf__png_image_load_increment(gpointer context, guchar *buf, guint size) -{ - LoadContext* lc = context; - - g_return_val_if_fail(lc != NULL, FALSE); - - /* reset */ - lc->first_row_seen_in_chunk = -1; - lc->last_row_seen_in_chunk = -1; - lc->first_pass_seen_in_chunk = -1; - lc->last_pass_seen_in_chunk = -1; - lc->max_row_seen_in_chunk = -1; - - /* Invokes our callbacks as needed */ - png_process_data(lc->png_read_ptr, lc->png_info_ptr, buf, size); - - if (lc->fatal_error_occurred) - return FALSE; - else { - if (lc->first_row_seen_in_chunk >= 0) { - /* We saw at least one row */ - gint pass_diff = lc->last_pass_seen_in_chunk - lc->first_pass_seen_in_chunk; - - g_assert(pass_diff >= 0); - - if (pass_diff == 0) { - /* start and end row were in the same pass */ - (lc->update_func)(lc->pixbuf, 0, - lc->first_row_seen_in_chunk, - lc->pixbuf->art_pixbuf->width, - (lc->last_row_seen_in_chunk - - lc->first_row_seen_in_chunk) + 1, - lc->notify_user_data); - } else if (pass_diff == 1) { - /* We have from the first row seen to - the end of the image (max row - seen), then from the top of the - image to the last row seen */ - /* first row to end */ - (lc->update_func)(lc->pixbuf, 0, - lc->first_row_seen_in_chunk, - lc->pixbuf->art_pixbuf->width, - (lc->max_row_seen_in_chunk - - lc->first_row_seen_in_chunk) + 1, - lc->notify_user_data); - /* top to last row */ - (lc->update_func)(lc->pixbuf, - 0, 0, - lc->pixbuf->art_pixbuf->width, - lc->last_row_seen_in_chunk + 1, - lc->notify_user_data); - } else { - /* We made at least one entire pass, so update the - whole image */ - (lc->update_func)(lc->pixbuf, - 0, 0, - lc->pixbuf->art_pixbuf->width, - lc->max_row_seen_in_chunk + 1, - lc->notify_user_data); - } - } - - return TRUE; - } -} - -/* Called at the start of the progressive load, once we have image info */ -static void -png_info_callback (png_structp png_read_ptr, - png_infop png_info_ptr) -{ - LoadContext* lc; - png_uint_32 width, height; - int color_type; - gboolean have_alpha = FALSE; - gboolean failed = FALSE; - - lc = png_get_progressive_ptr(png_read_ptr); - - if (lc->fatal_error_occurred) - return; - - - setup_png_transformations(lc->png_read_ptr, - lc->png_info_ptr, - &failed, - &width, &height, &color_type); - - if (failed) { - lc->fatal_error_occurred = TRUE; - return; - } - - /* If we have alpha, set a flag */ - if (color_type & PNG_COLOR_MASK_ALPHA) - have_alpha = TRUE; - - lc->pixbuf = gdk_pixbuf_new(ART_PIX_RGB, have_alpha, 8, width, height); - - if (lc->pixbuf == NULL) { - /* Failed to allocate memory */ - lc->fatal_error_occurred = TRUE; - return; - } - - /* Notify the client that we are ready to go */ - - if (lc->prepare_func) - (* lc->prepare_func) (lc->pixbuf, lc->notify_user_data); - - return; -} - -/* Called for each row; note that you will get duplicate row numbers - for interlaced PNGs */ -static void -png_row_callback (png_structp png_read_ptr, - png_bytep new_row, - png_uint_32 row_num, - int pass_num) -{ - LoadContext* lc; - guchar* old_row = NULL; - - lc = png_get_progressive_ptr(png_read_ptr); - - if (lc->fatal_error_occurred) - return; - - if (lc->first_row_seen_in_chunk < 0) { - lc->first_row_seen_in_chunk = row_num; - lc->first_pass_seen_in_chunk = pass_num; - } - - lc->max_row_seen_in_chunk = MAX(lc->max_row_seen_in_chunk, ((gint)row_num)); - lc->last_row_seen_in_chunk = row_num; - lc->last_pass_seen_in_chunk = pass_num; - - old_row = lc->pixbuf->art_pixbuf->pixels + (row_num * lc->pixbuf->art_pixbuf->rowstride); - - png_progressive_combine_row(lc->png_read_ptr, old_row, new_row); -} - -/* Called after reading the entire image */ -static void -png_end_callback (png_structp png_read_ptr, - png_infop png_info_ptr) -{ - LoadContext* lc; - - lc = png_get_progressive_ptr(png_read_ptr); - - if (lc->fatal_error_occurred) - return; -} - -static void -png_error_callback(png_structp png_read_ptr, - png_const_charp error_msg) -{ - LoadContext* lc; - - lc = png_get_error_ptr(png_read_ptr); - - lc->fatal_error_occurred = TRUE; - - fprintf(stderr, "Fatal error loading PNG: %s\n", error_msg); -} - -static void -png_warning_callback(png_structp png_read_ptr, - png_const_charp warning_msg) -{ - LoadContext* lc; - - lc = png_get_error_ptr(png_read_ptr); - - fprintf(stderr, "Warning loading PNG: %s\n", warning_msg); -} - diff --git a/gdk-pixbuf/io-pnm.c b/gdk-pixbuf/io-pnm.c deleted file mode 100644 index c3ac215fa5..0000000000 --- a/gdk-pixbuf/io-pnm.c +++ /dev/null @@ -1,860 +0,0 @@ -/* GdkPixbuf library - PNM image loader - * - * Copyright (C) 1999 Red Hat, Inc. - * - * Authors: Michael Fulbright - * - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include "gdk-pixbuf.h" -#include "gdk-pixbuf-io.h" - - - -#define PNM_BUF_SIZE 4096 - -#define PNM_SUSPEND 0 -#define PNM_OK 1 -#define PNM_FATAL_ERR -1 - -typedef enum { - PNM_FORMAT_PGM, - PNM_FORMAT_PGM_RAW, - PNM_FORMAT_PPM, - PNM_FORMAT_PPM_RAW, - PNM_FORMAT_PBM, - PNM_FORMAT_PBM_RAW -} PnmFormat; - -typedef struct { - guchar buffer[PNM_BUF_SIZE]; - guchar *next_byte; - guint bytes_left; -} PnmIOBuffer; - -typedef struct { - ModuleUpdatedNotifyFunc updated_func; - ModulePreparedNotifyFunc prepared_func; - gpointer user_data; - - GdkPixbuf *pixbuf; - guchar *pixels; /* incoming pixel data buffer */ - guchar *dptr; /* current position in pixbuf */ - - PnmIOBuffer inbuf; - - guint width; - guint height; - guint maxval; - guint rowstride; - PnmFormat type; - - guint output_row; /* last row to be completed */ - guint output_col; - gboolean did_prescan; /* are we in image data yet? */ - gboolean got_header; /* have we loaded jpeg header? */ -} PnmLoaderContext; - -GdkPixbuf *gdk_pixbuf__pnm_image_load (FILE *f); -gpointer gdk_pixbuf__pnm_image_begin_load (ModulePreparedNotifyFunc func, - ModuleUpdatedNotifyFunc func2, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data); -void gdk_pixbuf__pnm_image_stop_load (gpointer context); -gboolean gdk_pixbuf__pnm_image_load_increment(gpointer context, guchar *buf, guint size); - -static void explode_bitmap_into_buf (PnmLoaderContext *context); -static void explode_gray_into_buf (PnmLoaderContext *context); - -/* Destroy notification function for the libart pixbuf */ -static void -free_buffer (gpointer user_data, gpointer data) -{ - free (data); -} - - -/* explode bitmap data into rgb components */ -/* we need to know what the row so we can */ -/* do sub-byte expansion (since 1 byte = 8 pixels) */ -/* context->dptr MUST point at first byte in incoming data */ -/* which corresponds to first pixel of row y */ -static void -explode_bitmap_into_buf (PnmLoaderContext *context) -{ - gint j; - guchar *from, *to, data; - gint bit; - guchar *dptr; - gint wid, x, y; - - g_return_if_fail (context != NULL); - g_return_if_fail (context->dptr != NULL); - - /* I'm no clever bit-hacker so I'm sure this can be optimized */ - dptr = context->dptr; - y = context->output_row; - wid = context->width; - - from = dptr + (wid - 1)/8; - to = dptr + (wid - 1) * 3; -/* bit = 7 - (((y+1)*wid-1) % 8); */ - bit = 7 - ((wid-1) % 8); - - /* get first byte and align properly */ - data = from[0]; - for (j = 0; j < bit; j++, data >>= 1); - - for (x = wid-1; x >= 0; x--) { - -/* g_print ("%c", (data & 1) ? '*' : ' '); */ - - to[0] = to[1] = to[2] = (data & 1) ? 0x00 : 0xff; - - to -= 3; - bit++; - - if (bit > 7) { - from--; - data = from[0]; - bit = 0; - } else { - data >>= 1; - } - } - -/* g_print ("\n"); */ -} - -/* explode gray image row into rgb components in pixbuf */ -static void -explode_gray_into_buf (PnmLoaderContext *context) -{ - gint j; - guchar *from, *to; - guint w; - - g_return_if_fail (context != NULL); - g_return_if_fail (context->dptr != NULL); - - /* Expand grey->colour. Expand from the end of the - * memory down, so we can use the same buffer. - */ - w = context->width; - from = context->dptr + w - 1; - to = context->dptr + (w - 1) * 3; - for (j = w - 1; j >= 0; j--) { - to[0] = from[0]; - to[1] = from[0]; - to[2] = from[0]; - to -= 3; - from--; - } -} - -/* skip over whitespace in file from current pos. */ -/* also skips comments */ -/* returns pointer to first non-whitespace char hit or, or NULL if */ -/* we ran out of data w/o hitting a whitespace */ -/* internal pointer in inbuf isnt moved ahead in this case */ -static guchar * -skip_ahead_whitespace (PnmIOBuffer *inbuf) -{ - gboolean in_comment; - guchar *ptr; - guint num_left; - - g_return_val_if_fail (inbuf != NULL, NULL); - g_return_val_if_fail (inbuf->next_byte != NULL, NULL); - - in_comment = FALSE; - num_left = inbuf->bytes_left; - ptr = inbuf->next_byte; - while (num_left > 0) { - if (in_comment) { - if (*ptr == '\n') - in_comment = FALSE; - } else if (*ptr == '#') { - in_comment = TRUE; - } else if (!isspace (*ptr)) { - inbuf->bytes_left -= (ptr-inbuf->next_byte); - inbuf->next_byte = ptr; - return ptr; - } - ptr ++; - num_left--; - } - return NULL; -} - -/* reads into buffer until we hit whitespace in file from current pos, */ -/* return NULL if ran out of data */ -/* advances inbuf if successful */ -static guchar * -read_til_whitespace (PnmIOBuffer *inbuf, guchar *buf, guint size) -{ - guchar *p; - guchar *ptr; - guint num_left; - - g_return_val_if_fail (inbuf != NULL, NULL); - g_return_val_if_fail (inbuf->next_byte != NULL, NULL); - - p = buf; - num_left = inbuf->bytes_left; - ptr = inbuf->next_byte; - while (num_left > 0 && (p-buf)+1 < size) { - if (isspace (*ptr)) { - *p = '\0'; - inbuf->bytes_left = num_left; - inbuf->next_byte = ptr; - return ptr; - } else { - *p = *ptr; - p++; - ptr++; - num_left--; - } - } - return NULL; -} - -/* read next number from buffer */ -/* -1 if failed, 0 if successful */ -static gint -read_next_number (PnmIOBuffer *inbuf, guint *value) -{ - guchar *tmpptr; - guchar *old_next_byte; - gchar *errptr; - guint old_bytes_left; - guchar buf[128]; - - g_return_val_if_fail (inbuf != NULL, -1); - g_return_val_if_fail (inbuf->next_byte != NULL, -1); - g_return_val_if_fail (value != NULL, -1); - - old_next_byte = inbuf->next_byte; - old_bytes_left = inbuf->bytes_left; - - if ((tmpptr = skip_ahead_whitespace (inbuf)) == NULL) - return -1; - - if ((tmpptr = read_til_whitespace (inbuf, buf, 128)) == NULL) { - inbuf->next_byte = old_next_byte; - inbuf->bytes_left = old_bytes_left; - return -1; - } - - *value = strtol (buf, &errptr, 10); - - if (*errptr != '\0') { - inbuf->next_byte = old_next_byte; - inbuf->bytes_left = old_bytes_left; - return -1; - } - - return 0; -} - -/* returns PNM_OK, PNM_SUSPEND, or PNM_FATAL_ERR */ -static gint -pnm_read_header (PnmLoaderContext *context) -{ - guchar *old_next_byte; - guint old_bytes_left; - PnmIOBuffer *inbuf; - guint w, h; - gint rc; - PnmFormat type; - - g_return_val_if_fail (context != NULL, PNM_FATAL_ERR); - - inbuf = &context->inbuf; - old_bytes_left = inbuf->bytes_left; - old_next_byte = inbuf->next_byte; - - /* file must start with a 'P' followed by a numeral */ - /* so loop till we get enough data to determine type*/ - if (inbuf->bytes_left < 2) - return PNM_SUSPEND; - - if (*inbuf->next_byte != 'P') - return PNM_FATAL_ERR; - - switch (*(inbuf->next_byte+1)) { - case '1': - type = PNM_FORMAT_PBM; - break; - case '2': - type = PNM_FORMAT_PGM; - break; - case '3': - type = PNM_FORMAT_PPM; - break; - case '4': - type = PNM_FORMAT_PBM_RAW; - break; - case '5': - type = PNM_FORMAT_PGM_RAW; - break; - case '6': - type = PNM_FORMAT_PPM_RAW; - break; - default: - return PNM_FATAL_ERR; - } - - context->type = type; - - inbuf->next_byte += 2; - inbuf->bytes_left -= 2; - - /* now read remainder of header */ - if ((rc = read_next_number (inbuf, &w))) { - inbuf->next_byte = old_next_byte; - inbuf->bytes_left = old_bytes_left; - return PNM_SUSPEND; - } - - if ((rc = read_next_number (inbuf, &h))) { - inbuf->next_byte = old_next_byte; - inbuf->bytes_left = old_bytes_left; - return PNM_SUSPEND; - } - - context->width = w; - context->height = h; - - switch (type) { - case PNM_FORMAT_PPM: - case PNM_FORMAT_PPM_RAW: - case PNM_FORMAT_PGM: - case PNM_FORMAT_PGM_RAW: - if ((rc = read_next_number (inbuf, &context->maxval)) < 0) { - inbuf->next_byte = old_next_byte; - inbuf->bytes_left = old_bytes_left; - return PNM_SUSPEND; - } - break; - default: - break; - } - - return PNM_OK; -} - - -static gint -pnm_read_raw_scanline (PnmLoaderContext *context) -{ - guint numpix; - guint numbytes, offset; - PnmIOBuffer *inbuf; - - g_return_val_if_fail (context != NULL, PNM_FATAL_ERR); - -/*G_BREAKPOINT(); */ - - inbuf = &context->inbuf; - - switch (context->type) { - case PNM_FORMAT_PBM_RAW: - numpix = inbuf->bytes_left * 8; - break; - case PNM_FORMAT_PGM_RAW: - numpix = inbuf->bytes_left; - break; - case PNM_FORMAT_PPM_RAW: - numpix = inbuf->bytes_left/3; - break; - default: - g_warning ("io-pnm.c: Illegal raw pnm type!\n"); - return PNM_FATAL_ERR; - } - - numpix = MIN (numpix, context->width - context->output_col); - - if (numpix == 0) - return PNM_SUSPEND; - - context->dptr = context->pixels + - context->output_row * context->rowstride; - - switch (context->type) { - case PNM_FORMAT_PBM_RAW: - numbytes = numpix/8 + ((numpix % 8) ? 1 : 0); - offset = context->output_col/8; - break; - case PNM_FORMAT_PGM_RAW: - numbytes = numpix; - offset = context->output_col; - break; - case PNM_FORMAT_PPM_RAW: - numbytes = numpix*3; - offset = context->output_col*3; - break; - default: - g_warning ("io-pnm.c: Illegal raw pnm type!\n"); - return PNM_FATAL_ERR; - } - - memcpy (context->dptr + offset, inbuf->next_byte, numbytes); - - inbuf->next_byte += numbytes; - inbuf->bytes_left -= numbytes; - - context->output_col += numpix; - if (context->output_col == context->width) { - if ( context->type == PNM_FORMAT_PBM_RAW ) - explode_bitmap_into_buf(context); - else if ( context->type == PNM_FORMAT_PGM_RAW ) - explode_gray_into_buf (context); - - context->output_col = 0; - context->output_row++; - - } else { - return PNM_SUSPEND; - } - - return PNM_OK; -} - - -static gint -pnm_read_ascii_scanline (PnmLoaderContext *context) -{ - guint offset; - gint rc; - guint value, numval, i; - guchar data; - guchar mask; - guchar *old_next_byte, *dptr; - guint old_bytes_left; - PnmIOBuffer *inbuf; - - g_return_val_if_fail (context != NULL, PNM_FATAL_ERR); - - data = mask = 0; - - inbuf = &context->inbuf; - - context->dptr = context->pixels + - context->output_row * context->rowstride; - - switch (context->type) { - case PNM_FORMAT_PBM: - numval = MIN (8, context->width - context->output_col); - offset = context->output_col/8; - break; - case PNM_FORMAT_PGM: - numval = 1; - offset = context->output_col; - break; - case PNM_FORMAT_PPM: - numval = 3; - offset = context->output_col*3; - break; - - default: - g_warning ("Can't happen\n"); - return PNM_FATAL_ERR; - } - - dptr = context->dptr + offset; - - while (TRUE) { - if (context->type == PNM_FORMAT_PBM) { - mask = 0x80; - data = 0; - numval = MIN (8, context->width - context->output_col); - } - - old_next_byte = inbuf->next_byte; - old_bytes_left = inbuf->bytes_left; - - for (i=0; inext_byte = old_next_byte; - inbuf->bytes_left = old_bytes_left; - return PNM_SUSPEND; - } - switch (context->type) { - case PNM_FORMAT_PBM: - if (value) - data |= mask; - mask >>= 1; - - break; - case PNM_FORMAT_PGM: - *dptr++ = (guchar)(255.0*((double)value/(double)context->maxval)); - break; - case PNM_FORMAT_PPM: - *dptr++ = (guchar)(255.0*((double)value/(double)context->maxval)); - break; - default: - g_warning ("io-pnm.c: Illegal raw pnm type!\n"); - break; - } - } - - if (context->type == PNM_FORMAT_PBM) { - *dptr++ = data; - context->output_col += numval; - } else { - context->output_col++; - } - - if (context->output_col == context->width) { - if ( context->type == PNM_FORMAT_PBM ) - explode_bitmap_into_buf(context); - else if ( context->type == PNM_FORMAT_PGM ) - explode_gray_into_buf (context); - - context->output_col = 0; - context->output_row++; - break; - } - - } - - return PNM_OK; -} - -/* returns 1 if a scanline was converted, 0 means we ran out of data */ -static gint -pnm_read_scanline (PnmLoaderContext *context) -{ - gint rc; - - g_return_val_if_fail (context != NULL, PNM_FATAL_ERR); - - /* read in image data */ - /* for raw formats this is trivial */ - switch (context->type) { - case PNM_FORMAT_PBM_RAW: - case PNM_FORMAT_PGM_RAW: - case PNM_FORMAT_PPM_RAW: - rc = pnm_read_raw_scanline (context); - if (rc == PNM_SUSPEND) - return rc; - break; - - case PNM_FORMAT_PBM: - case PNM_FORMAT_PGM: - case PNM_FORMAT_PPM: - rc = pnm_read_ascii_scanline (context); - if (rc == PNM_SUSPEND) - return rc; - break; - - default: - g_warning ("Cannot load these image types (yet)\n"); - return PNM_FATAL_ERR; - } - - return PNM_OK; -} - -/* Shared library entry point */ -GdkPixbuf * -gdk_pixbuf__pnm_image_load (FILE *f) -{ - gint nbytes; - gint rc; - - PnmLoaderContext context; - PnmIOBuffer *inbuf; - - /* pretend to be doing progressive loading */ - context.updated_func = NULL; - context.prepared_func = NULL; - context.user_data = NULL; - context.inbuf.bytes_left = 0; - context.inbuf.next_byte = NULL; - context.pixels = NULL; - context.pixbuf = NULL; - context.got_header = context.did_prescan = FALSE; - - inbuf = &context.inbuf; - - while (TRUE) { - guint num_to_read; - - /* keep buffer as full as possible */ - num_to_read = PNM_BUF_SIZE - inbuf->bytes_left; - - if (inbuf->next_byte != NULL && inbuf->bytes_left > 0) - memmove (inbuf->buffer, inbuf->next_byte, - inbuf->bytes_left); - - nbytes = fread (inbuf->buffer+inbuf->bytes_left, - 1, num_to_read, f); - inbuf->bytes_left += nbytes; - inbuf->next_byte = inbuf->buffer; - - /* ran out of data and we haven't exited main loop */ - if (inbuf->bytes_left == 0) { - if (context.pixbuf) - gdk_pixbuf_unref (context.pixbuf); - g_warning ("io-pnm.c: Ran out of data...\n"); - return NULL; - } - - /* get header if needed */ - if (!context.got_header) { - - rc = pnm_read_header (&context); - if (rc == PNM_FATAL_ERR) - return NULL; - else if (rc == PNM_SUSPEND) - continue; - - context.got_header = TRUE; - } - - /* scan until we hit image data */ - if (!context.did_prescan) { - - if (skip_ahead_whitespace (inbuf) == NULL) - continue; - - context.did_prescan = TRUE; - context.output_row = 0; - context.output_col = 0; - - context.rowstride = context.width * 3; - context.pixels = g_malloc (context.height * - context.width * 3); - if (!context.pixels) { - /* Failed to allocate memory */ - g_error ("Couldn't allocate pixel buf"); - } - } - - /* if we got here we're reading image data */ - while (context.output_row < context.height) { - - rc = pnm_read_scanline (&context); - - if (rc == PNM_SUSPEND) { - break; - } else if (rc == PNM_FATAL_ERR) { - if (context.pixbuf) - gdk_pixbuf_unref (context.pixbuf); - g_warning ("io-pnm.c: error reading rows..\n"); - return NULL; - } - } - - if (context.output_row < context.height) - continue; - else - break; - } - - return gdk_pixbuf_new_from_data (context.pixels, ART_PIX_RGB, FALSE, - context.width, context.height, - context.width * 3, free_buffer, NULL); - -} - -/* - * func - called when we have pixmap created (but no image data) - * user_data - passed as arg 1 to func - * return context (opaque to user) - */ - -gpointer -gdk_pixbuf__pnm_image_begin_load (ModulePreparedNotifyFunc prepared_func, - ModuleUpdatedNotifyFunc updated_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data) -{ - PnmLoaderContext *context; - - context = g_new0 (PnmLoaderContext, 1); - context->prepared_func = prepared_func; - context->updated_func = updated_func; - context->user_data = user_data; - context->pixbuf = NULL; - context->pixels = NULL; - context->got_header = FALSE; - context->did_prescan = FALSE; - - context->inbuf.bytes_left = 0; - context->inbuf.next_byte = NULL; - - return (gpointer) context; -} - -/* - * context - returned from image_begin_load - * - * free context, unref gdk_pixbuf - */ -void -gdk_pixbuf__pnm_image_stop_load (gpointer data) -{ - PnmLoaderContext *context = (PnmLoaderContext *) data; - - g_return_if_fail (context != NULL); - - if (context->pixbuf) - gdk_pixbuf_unref (context->pixbuf); - - g_free (context); -} - - - - -/* - * context - from image_begin_load - * buf - new image data - * size - length of new image data - * - * append image data onto inrecrementally built output image - */ -gboolean -gdk_pixbuf__pnm_image_load_increment (gpointer data, guchar *buf, guint size) -{ - PnmLoaderContext *context = (PnmLoaderContext *)data; - PnmIOBuffer *inbuf; - - guchar *old_next_byte; - guint old_bytes_left; - guchar *bufhd; - guint num_left, spinguard; - gint rc; - - g_return_val_if_fail (context != NULL, FALSE); - g_return_val_if_fail (buf != NULL, FALSE); - - bufhd = buf; - inbuf = &context->inbuf; - old_bytes_left = inbuf->bytes_left; - old_next_byte = inbuf->next_byte; - - num_left = size; - spinguard = 0; - while (TRUE) { - guint num_to_copy; - - /* keep buffer as full as possible */ - num_to_copy = MIN (PNM_BUF_SIZE - inbuf->bytes_left, num_left); - - if (num_to_copy == 0) - spinguard++; - - if (spinguard > 1) - return TRUE; - - if (inbuf->next_byte != NULL && inbuf->bytes_left > 0) - memmove (inbuf->buffer, inbuf->next_byte, - inbuf->bytes_left); - - memcpy (inbuf->buffer + inbuf->bytes_left, bufhd, num_to_copy); - bufhd += num_to_copy; - inbuf->bytes_left += num_to_copy; - inbuf->next_byte = inbuf->buffer; - num_left -= num_to_copy; - - /* ran out of data and we haven't exited main loop */ - if (inbuf->bytes_left == 0) - return TRUE; - - /* get header if needed */ - if (!context->got_header) { - rc = pnm_read_header (context); - if (rc == PNM_FATAL_ERR) - return FALSE; - else if (rc == PNM_SUSPEND) - continue; - - context->got_header = TRUE; - } - - /* scan until we hit image data */ - if (!context->did_prescan) { - if (skip_ahead_whitespace (inbuf) == NULL) - continue; - - context->did_prescan = TRUE; - context->output_row = 0; - context->output_col = 0; - - context->pixbuf = gdk_pixbuf_new(ART_PIX_RGB, - /*have_alpha*/ FALSE, - 8, - context->width, - context->height); - - if (context->pixbuf == NULL) { - /* Failed to allocate memory */ - g_error ("Couldn't allocate gdkpixbuf"); - } - - context->pixels = context->pixbuf->art_pixbuf->pixels; - context->rowstride = context->pixbuf->art_pixbuf->rowstride; - - /* Notify the client that we are ready to go */ - (* context->prepared_func) (context->pixbuf, - context->user_data); - - } - - /* if we got here we're reading image data */ - while (context->output_row < context->height) { - rc = pnm_read_scanline (context); - - if (rc == PNM_SUSPEND) { - break; - } else if (rc == PNM_FATAL_ERR) { - if (context->pixbuf) - gdk_pixbuf_unref (context->pixbuf); - g_warning ("io-pnm.c: error reading rows..\n"); - return FALSE; - } else if (rc == PNM_OK) { - - /* send updated signal */ - (* context->updated_func) (context->pixbuf, - 0, - context->output_row-1, - context->width, - 1, - context->user_data); - } - } - - if (context->output_row < context->height) - continue; - else - break; - } - - return TRUE; -} diff --git a/gdk-pixbuf/io-ras.c b/gdk-pixbuf/io-ras.c deleted file mode 100644 index f14fea3399..0000000000 --- a/gdk-pixbuf/io-ras.c +++ /dev/null @@ -1,444 +0,0 @@ -/* GdkPixbuf library - SUNRAS image loader - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Arjan van de Ven - * Federico Mena-Quintero - * - * Based on io-gif.c, io-tiff.c and io-png.c - * - * 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. - */ - -/* - -Known bugs: - * Compressed rasterfiles don't work yet - -*/ - -#include -#include -#include -#include -#include "gdk-pixbuf.h" -#include "gdk-pixbuf-io.h" - - - - -/* - Header structure for sunras files. - All values are in big-endian order on disk - - Note: Every scanline is padded to be a multiple of 16 bits - */ - -struct rasterfile { - guint magic; - guint width; - guint height; - guint depth; - guint length; - guint type; - guint maptype; - guint maplength; -}; - -/* - This does a byte-order swap. Does glib have something like - be32_to_cpu() ?? -*/ - -/* Progressive loading */ - -struct ras_progressive_state { - ModulePreparedNotifyFunc prepared_func; - ModuleUpdatedNotifyFunc updated_func; - gpointer user_data; - - gint HeaderSize; /* The size of the header-part (incl colormap) */ - guchar *HeaderBuf; /* The buffer for the header (incl colormap) */ - gint HeaderDone; /* The nr of bytes actually in HeaderBuf */ - - gint LineWidth; /* The width of a line in bytes */ - guchar *LineBuf; /* Buffer for 1 line */ - gint LineDone; /* # of bytes in LineBuf */ - gint Lines; /* # of finished lines */ - - gint RasType; /* 32 = BGRA - 24 = BGR - 8 = 8 bit colormapped - 1 = 1 bit bitonal - */ - - - struct rasterfile Header; /* Decoded (BE->CPU) header */ - - - GdkPixbuf *pixbuf; /* Our "target" */ -}; - -gpointer -gdk_pixbuf__ras_image_begin_load(ModulePreparedNotifyFunc prepared_func, - ModuleUpdatedNotifyFunc updated_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data); -void gdk_pixbuf__ras_image_stop_load(gpointer data); -gboolean gdk_pixbuf__ras_image_load_increment(gpointer data, guchar * buf, guint size); - - - -/* Shared library entry point */ -GdkPixbuf *gdk_pixbuf__ras_image_load(FILE * f) -{ - guchar *membuf; - size_t length; - struct ras_progressive_state *State; - - GdkPixbuf *pb; - - State = gdk_pixbuf__ras_image_begin_load(NULL, NULL, NULL, NULL, NULL); - - membuf = g_malloc(4096); - - g_assert(membuf != NULL); - - while (feof(f) == 0) { - length = fread(membuf, 1, 4096, f); - (void)gdk_pixbuf__ras_image_load_increment(State, membuf, length); - } - g_free(membuf); - if (State->pixbuf != NULL) - gdk_pixbuf_ref(State->pixbuf); - - pb = State->pixbuf; - - gdk_pixbuf__ras_image_stop_load(State); - return pb; -} - -static void RAS2State(struct rasterfile *RAS, - struct ras_progressive_state *State) -{ - State->Header.width = GUINT32_FROM_BE(RAS->width); - State->Header.height = GUINT32_FROM_BE(RAS->height); - State->Header.depth = GUINT32_FROM_BE(RAS->depth); - State->Header.type = GUINT32_FROM_BE(RAS->type); - State->Header.maptype = GUINT32_FROM_BE(RAS->maptype); - State->Header.maplength = GUINT32_FROM_BE(RAS->maplength); - - g_assert(State->Header.maplength <= 768); /* Otherwise, we are in trouble */ - - State->RasType = State->Header.depth; /* This may be less trivial someday */ - State->HeaderSize = 32 + State->Header.maplength; - - if (State->RasType == 32) - State->LineWidth = State->Header.width * 4; - if (State->RasType == 24) - State->LineWidth = State->Header.width * 3; - if (State->RasType == 8) - State->LineWidth = State->Header.width * 1; - if (State->RasType == 1) { - State->LineWidth = State->Header.width / 8; - if ((State->Header.width & 7) != 0) - State->LineWidth++; - } - - /* Now padd the line to be a multiple of 16 bits */ - if ((State->LineWidth & 1) != 0) - State->LineWidth++; - - if (State->LineBuf == NULL) - State->LineBuf = g_malloc(State->LineWidth); - - g_assert(State->LineBuf != NULL); - - - if (State->pixbuf == NULL) { - if (State->RasType == 32) - State->pixbuf = gdk_pixbuf_new(ART_PIX_RGB, TRUE, - 8, - (gint) - State->Header.width, - (gint) - State->Header. - height); - else - State->pixbuf = - gdk_pixbuf_new(ART_PIX_RGB, FALSE, 8, - (gint) State->Header.width, - (gint) State->Header.height); - if (State->prepared_func != NULL) - /* Notify the client that we are ready to go */ - (*State->prepared_func) (State->pixbuf, - State->user_data); - - } - - if ((State->Header.maplength==0)&&(State->RasType==1)) { - State->HeaderBuf[32] = 255; - State->HeaderBuf[33] = 0; - State->HeaderBuf[34] = 255; - State->HeaderBuf[35] = 0; - State->HeaderBuf[36] = 255; - State->HeaderBuf[37] = 0; - } - -} - -/* - * func - called when we have pixmap created (but no image data) - * user_data - passed as arg 1 to func - * return context (opaque to user) - */ - -gpointer -gdk_pixbuf__ras_image_begin_load(ModulePreparedNotifyFunc prepared_func, - ModuleUpdatedNotifyFunc updated_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data) -{ - struct ras_progressive_state *context; - - context = g_new0(struct ras_progressive_state, 1); - context->prepared_func = prepared_func; - context->updated_func = updated_func; - context->user_data = user_data; - - context->HeaderSize = 32; - context->HeaderBuf = g_malloc(32 + 768); /* 32 for rasheader, - 768 for the colormap */ - context->HeaderDone = 0; - - context->LineWidth = 0; - context->LineBuf = NULL; - context->LineDone = 0; - context->Lines = 0; - - context->RasType = 0; - - memset(&context->Header, 0, sizeof(struct rasterfile)); - - - context->pixbuf = NULL; - - - return (gpointer) context; -} - -/* - * context - returned from image_begin_load - * - * free context, unref gdk_pixbuf - */ -void -gdk_pixbuf__ras_image_stop_load(gpointer data) -{ - struct ras_progressive_state *context = - (struct ras_progressive_state *) data; - - - g_return_if_fail(context != NULL); - - if (context->LineBuf != NULL) - g_free(context->LineBuf); - if (context->HeaderBuf != NULL) - g_free(context->HeaderBuf); - - if (context->pixbuf) - gdk_pixbuf_unref(context->pixbuf); - - g_free(context); -} - -/* - OneLine is called when enough data is received to process 1 line - of pixels - */ - -static void OneLine32(struct ras_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - Pixels = context->pixbuf->art_pixbuf->pixels + - context->pixbuf->art_pixbuf->rowstride * context->Lines; - while (X < context->Header.width) { - /* The joys of having a BGR byteorder */ - Pixels[X * 4 + 0] = context->LineBuf[X * 4 + 2]; - Pixels[X * 4 + 1] = context->LineBuf[X * 4 + 1]; - Pixels[X * 4 + 2] = context->LineBuf[X * 4 + 0]; - Pixels[X * 4 + 3] = context->LineBuf[X * 4 + 3]; - X++; - } -} - -static void OneLine24(struct ras_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - Pixels = context->pixbuf->art_pixbuf->pixels + - context->pixbuf->art_pixbuf->rowstride * context->Lines; - while (X < context->Header.width) { - /* The joys of having a BGR byteorder */ - Pixels[X * 3 + 0] = context->LineBuf[X * 3 + 2]; - Pixels[X * 3 + 1] = context->LineBuf[X * 3 + 1]; - Pixels[X * 3 + 2] = context->LineBuf[X * 3 + 0]; - X++; - } - -} - -static void OneLine8(struct ras_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - Pixels = context->pixbuf->art_pixbuf->pixels + - context->pixbuf->art_pixbuf->rowstride * context->Lines; - while (X < context->Header.width) { - /* The joys of having a BGR byteorder */ - Pixels[X * 3 + 0] = - context->HeaderBuf[context->LineBuf[X] + 32]; - Pixels[X * 3 + 1] = - context->HeaderBuf[context->LineBuf[X] + 256 + 32]; - Pixels[X * 3 + 2] = - context->HeaderBuf[context->LineBuf[X] + 512 + 32]; - X++; - } -} - -static void OneLine1(struct ras_progressive_state *context) -{ - gint X; - guchar *Pixels; - - X = 0; - Pixels = context->pixbuf->art_pixbuf->pixels + - context->pixbuf->art_pixbuf->rowstride * context->Lines; - while (X < context->Header.width) { - int Bit; - - Bit = (context->LineBuf[X/8])>>(7-(X&7)); - Bit = Bit & 1; - /* The joys of having a BGR byteorder */ - Pixels[X * 3 + 0] = - context->HeaderBuf[Bit + 32]; - Pixels[X * 3 + 1] = - context->HeaderBuf[Bit + 2 + 32]; - Pixels[X * 3 + 2] = - context->HeaderBuf[Bit + 4 + 32]; - X++; - } -} - - -static void OneLine(struct ras_progressive_state *context) -{ - if (context->RasType == 32) - OneLine32(context); - if (context->RasType == 24) - OneLine24(context); - if (context->RasType == 8) - OneLine8(context); - if (context->RasType == 1) - OneLine1(context); - - context->LineDone = 0; - if (context->Lines > context->Header.height) - return; - context->Lines++; - - if (context->updated_func != NULL) { - (*context->updated_func) (context->pixbuf, - 0, - context->Lines, - context->Header.width, - context->Header.height, - context->user_data); - - } -} - -/* - * context - from image_begin_load - * buf - new image data - * size - length of new image data - * - * append image data onto inrecrementally built output image - */ -gboolean -gdk_pixbuf__ras_image_load_increment(gpointer data, guchar * buf, guint size) -{ - struct ras_progressive_state *context = - (struct ras_progressive_state *) data; - - gint BytesToCopy; - - while (size > 0) { - if (context->HeaderDone < context->HeaderSize) { /* We still - have headerbytes to do */ - BytesToCopy = - context->HeaderSize - context->HeaderDone; - if (BytesToCopy > size) - BytesToCopy = size; - - memmove(context->HeaderBuf + context->HeaderDone, - buf, BytesToCopy); - - size -= BytesToCopy; - buf += BytesToCopy; - context->HeaderDone += BytesToCopy; - - } else { - /* Pixeldata only */ - BytesToCopy = - context->LineWidth - context->LineDone; - if (BytesToCopy > size) - BytesToCopy = size; - - if (BytesToCopy > 0) { - memmove(context->LineBuf + - context->LineDone, buf, - BytesToCopy); - - size -= BytesToCopy; - buf += BytesToCopy; - context->LineDone += BytesToCopy; - } - if ((context->LineDone >= context->LineWidth) && - (context->LineWidth > 0)) - OneLine(context); - - - } - - if (context->HeaderDone >= 32) - RAS2State((struct rasterfile *) context->HeaderBuf, - context); - - - } - - return TRUE; -} diff --git a/gdk-pixbuf/io-tiff.c b/gdk-pixbuf/io-tiff.c deleted file mode 100644 index 587ecf8558..0000000000 --- a/gdk-pixbuf/io-tiff.c +++ /dev/null @@ -1,202 +0,0 @@ -/* GdkPixbuf library - JPEG image loader - * - * Copyright (C) 1999 Mark Crichton - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Mark Crichton - * Federico Mena-Quintero - * Jonathan Blandford - * - * 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. - */ - -/* Following code (almost) blatantly ripped from Imlib */ - -#include -#include -#include -#include -#include -#include "gdk-pixbuf.h" -#include "gdk-pixbuf-io.h" - - - -typedef struct _TiffData TiffData; -struct _TiffData -{ - ModulePreparedNotifyFunc prepare_func; - ModuleUpdatedNotifyFunc update_func; - gpointer user_data; - - gchar *tempname; - FILE *file; - gboolean all_okay; -}; - - - -GdkPixbuf * -gdk_pixbuf__tiff_image_load_real (FILE *f, TiffData *context) -{ - TIFF *tiff; - guchar *pixels = NULL; - guchar *tmppix; - gint w, h, x, y, num_pixs, fd; - uint32 *rast, *tmp_rast; - GdkPixbuf *pixbuf; - - fd = fileno (f); - tiff = TIFFFdOpen (fd, "libpixbuf-tiff", "r"); - - if (!tiff) - return NULL; - - TIFFGetField (tiff, TIFFTAG_IMAGEWIDTH, &w); - TIFFGetField (tiff, TIFFTAG_IMAGELENGTH, &h); - num_pixs = w * h; - pixbuf = gdk_pixbuf_new (ART_PIX_RGB, TRUE, 8, w, h); - - if (context) - (* context->prepare_func) (pixbuf, context->user_data); - - /* Yes, it needs to be _TIFFMalloc... */ - rast = (uint32 *) _TIFFmalloc (num_pixs * sizeof (uint32)); - - if (!rast) { - TIFFClose (tiff); - return NULL; - } - - if (TIFFReadRGBAImage (tiff, w, h, rast, 0)) { - pixels = gdk_pixbuf_get_pixels (pixbuf); - if (!pixels) { - _TIFFfree (rast); - TIFFClose (tiff); - return NULL; - } - tmppix = pixels; - - for (y = 0; y < h; y++) { - /* Unexplainable...are tiffs backwards? */ - /* Also looking at the GIMP plugin, this - * whole reading thing can be a bit more - * robust. - */ - tmp_rast = rast + ((h - y - 1) * w); - for (x = 0; x < w; x++) { - tmppix[0] = TIFFGetR (*tmp_rast); - tmppix[1] = TIFFGetG (*tmp_rast); - tmppix[2] = TIFFGetB (*tmp_rast); - tmppix[3] = TIFFGetA (*tmp_rast); - tmp_rast++; - tmppix += 4; - } - } - } - _TIFFfree (rast); - TIFFClose (tiff); - - if (context) { - (* context->update_func) (pixbuf, 0, 0, w, h, context->user_data); - gdk_pixbuf_unref (pixbuf); - } - - return pixbuf; -} - - - -/* Static loader */ - -GdkPixbuf * -gdk_pixbuf__tiff_image_load (FILE *f) -{ - return gdk_pixbuf__tiff_image_load_real (f, NULL); -} - - - -/* Progressive loader */ -/* - * Tiff loading progressively cannot be done. We write it to a file, then load - * the file when it's done. It's not pretty. - */ - - -gpointer -gdk_pixbuf__tiff_image_begin_load (ModulePreparedNotifyFunc prepare_func, - ModuleUpdatedNotifyFunc update_func, - ModuleFrameDoneNotifyFunc frame_done_func, - ModuleAnimationDoneNotifyFunc anim_done_func, - gpointer user_data) -{ - TiffData *context; - gint fd; - - context = g_new (TiffData, 1); - context->prepare_func = prepare_func; - context->update_func = update_func; - context->user_data = user_data; - context->all_okay = TRUE; - context->tempname = g_strdup ("/tmp/gdkpixbuf-tif-tmp.XXXXXX"); - fd = mkstemp (context->tempname); - if (fd < 0) { - g_free (context); - return NULL; - } - - context->file = fdopen (fd, "w"); - if (context->file == NULL) { - g_free (context); - return NULL; - } - - return context; -} - -void -gdk_pixbuf__tiff_image_stop_load (gpointer data) -{ - TiffData *context = (TiffData*) data; - - g_return_if_fail (data != NULL); - - fflush (context->file); - rewind (context->file); - if (context->all_okay) - gdk_pixbuf__tiff_image_load_real (context->file, context); - - fclose (context->file); - unlink (context->tempname); - g_free ((TiffData *) context); -} - -gboolean -gdk_pixbuf__tiff_image_load_increment (gpointer data, guchar *buf, guint size) -{ - TiffData *context = (TiffData *) data; - - g_return_val_if_fail (data != NULL, FALSE); - - if (fwrite (buf, sizeof (guchar), size, context->file) != size) { - context->all_okay = FALSE; - return FALSE; - } - - return TRUE; -} - diff --git a/gdk-pixbuf/io-xpm.c b/gdk-pixbuf/io-xpm.c deleted file mode 100644 index f6fd6a9be3..0000000000 --- a/gdk-pixbuf/io-xpm.c +++ /dev/null @@ -1,465 +0,0 @@ -/* GdkPixbuf library - JPEG image loader - * - * Copyright (C) 1999 Mark Crichton - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Mark Crichton - * Federico Mena-Quintero - * - * 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. - */ - -#include -#include -#include -#include -#include -#include "gdk-pixbuf.h" - - - -/* I have must have done something to deserve this. - * XPM is such a crappy format to handle. - * This code is an ugly hybred from gdkpixmap.c - * modified to respect transparent colors. - * It's still a mess, though. - */ - -enum buf_op { - op_header, - op_cmap, - op_body -}; - -typedef struct { - gchar *color_string; - GdkColor color; - gint transparent; -} _XPMColor; - -struct file_handle { - FILE *infile; - gchar *buffer; - guint buffer_size; -}; - -struct mem_handle { - const gchar **data; - int offset; -}; - -static gint -xpm_seek_string (FILE *infile, const gchar *str, gint skip_comments) -{ - char instr[1024]; - - while (!feof (infile)) { - fscanf (infile, "%1023s", instr); - if (skip_comments == TRUE && strcmp (instr, "/*") == 0) { - fscanf (infile, "%1023s", instr); - while (!feof (infile) && strcmp (instr, "*/") != 0) - fscanf (infile, "%1023s", instr); - fscanf (infile, "%1023s", instr); - } - - if (strcmp (instr, str) == 0) - return TRUE; - } - - return FALSE; -} - -static gint -xpm_seek_char (FILE *infile, gchar c) -{ - gint b, oldb; - - while ((b = getc (infile)) != EOF) { - if (c != b && b == '/') { - b = getc (infile); - if (b == EOF) - return FALSE; - - else if (b == '*') { /* we have a comment */ - b = -1; - do { - oldb = b; - b = getc (infile); - if (b == EOF) - return FALSE; - } while (!(oldb == '*' && b == '/')); - } - } else if (c == b) - return TRUE; - } - - return FALSE; -} - -static gint -xpm_read_string (FILE *infile, gchar **buffer, guint *buffer_size) -{ - gint c; - guint cnt = 0, bufsiz, ret = FALSE; - gchar *buf; - - buf = *buffer; - bufsiz = *buffer_size; - if (buf == NULL) { - bufsiz = 10 * sizeof (gchar); - buf = g_new (gchar, bufsiz); - } - - do { - c = getc (infile); - } while (c != EOF && c != '"'); - - if (c != '"') - goto out; - - while ((c = getc (infile)) != EOF) { - if (cnt == bufsiz) { - guint new_size = bufsiz * 2; - - if (new_size > bufsiz) - bufsiz = new_size; - else - goto out; - - buf = g_realloc (buf, bufsiz); - buf[bufsiz - 1] = '\0'; - } - - if (c != '"') - buf[cnt++] = c; - else { - buf[cnt] = 0; - ret = TRUE; - break; - } - } - - out: - buf[bufsiz - 1] = '\0'; /* ensure null termination for errors */ - *buffer = buf; - *buffer_size = bufsiz; - return ret; -} - -static const gchar * -xpm_skip_whitespaces (const gchar *buffer) -{ - gint32 index = 0; - - while (buffer[index] != 0 && (buffer[index] == 0x20 || buffer[index] == 0x09)) - index++; - - return &buffer[index]; -} - -static const gchar * -xpm_skip_string (const gchar *buffer) -{ - gint32 index = 0; - - while (buffer[index] != 0 && buffer[index] != 0x20 && buffer[index] != 0x09) - index++; - - return &buffer[index]; -} - -/* Xlib crashed once at a color name lengths around 125 */ -#define MAX_COLOR_LEN 120 - -static gchar * -xpm_extract_color (const gchar *buffer) -{ - gint counter, numnames; - const gchar *ptr = NULL; - gchar ch, temp[128]; - gchar color[MAX_COLOR_LEN], *retcol; - gint space; - - counter = 0; - while (ptr == NULL) { - if ((buffer[counter] == 'c') || (buffer[counter] == 'g')) { - ch = buffer[counter + 1]; - if (ch == 0x20 || ch == 0x09) - ptr = &buffer[counter + 1]; - } else if (buffer[counter] == 0) - return NULL; - - counter++; - } - ptr = xpm_skip_whitespaces (ptr); - - if (ptr[0] == 0) - return NULL; - else if (ptr[0] == '#') { - counter = 1; - while (ptr[counter] != 0 && - ((ptr[counter] >= '0' && ptr[counter] <= '9') || - (ptr[counter] >= 'a' && ptr[counter] <= 'f') || - (ptr[counter] >= 'A' && ptr[counter] <= 'F'))) - counter++; - retcol = g_new (gchar, counter + 1); - strncpy (retcol, ptr, counter); - - retcol[counter] = 0; - - return retcol; - } - color[0] = 0; - numnames = 0; - - space = MAX_COLOR_LEN - 1; - while (space > 0) { - sscanf (ptr, "%127s", temp); - - if (((gint) ptr[0] == 0) || - (strcmp ("s", temp) == 0) || (strcmp ("m", temp) == 0) || - (strcmp ("g", temp) == 0) || (strcmp ("g4", temp) == 0)) - break; - else { - if (numnames > 0) { - space -= 1; - strcat (color, " "); - } - - strncat (color, temp, space); - space -= MIN (space, strlen (temp)); - ptr = xpm_skip_string (ptr); - ptr = xpm_skip_whitespaces (ptr); - numnames++; - } - } - - retcol = g_strdup (color); - return retcol; -} - -/* (almost) direct copy from gdkpixmap.c... loads an XPM from a file */ - -static const gchar * -file_buffer (enum buf_op op, gpointer handle) -{ - struct file_handle *h = handle; - - switch (op) { - case op_header: - if (xpm_seek_string (h->infile, "XPM", FALSE) != TRUE) - break; - - if (xpm_seek_char (h->infile, '{') != TRUE) - break; - /* Fall through to the next xpm_seek_char. */ - - case op_cmap: - xpm_seek_char (h->infile, '"'); - fseek (h->infile, -1, SEEK_CUR); - /* Fall through to the xpm_read_string. */ - - case op_body: - xpm_read_string (h->infile, &h->buffer, &h->buffer_size); - return h->buffer; - - default: - g_assert_not_reached (); - } - - return NULL; -} - -/* This reads from memory */ -static const gchar * -mem_buffer (enum buf_op op, gpointer handle) -{ - struct mem_handle *h = handle; - switch (op) { - case op_header: - case op_cmap: - case op_body: - if (h->data[h->offset]) { - const gchar* retval; - - retval = h->data[h->offset]; - h->offset += 1; - return retval; - } - break; - - default: - g_assert_not_reached (); - break; - } - - return NULL; -} - -/* Destroy notification function for the libart pixbuf */ -static void -free_buffer (gpointer user_data, gpointer data) -{ - free (data); -} - -/* This function does all the work. */ -static GdkPixbuf * -pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handle), gpointer handle) -{ - gint w, h, n_col, cpp; - gint cnt, xcnt, ycnt, wbytes, n, ns; - gint is_trans = FALSE; - const gchar *buffer; - gchar *name_buf; - gchar pixel_str[32]; - GHashTable *color_hash; - _XPMColor *colors, *color, *fallbackcolor; - guchar *pixels, *pixtmp; - - fallbackcolor = NULL; - - buffer = (*get_buf) (op_header, handle); - if (!buffer) { - g_warning ("No XPM header found"); - return NULL; - } - sscanf (buffer, "%d %d %d %d", &w, &h, &n_col, &cpp); - if (cpp >= 32) { - g_warning ("XPM has more than 31 chars per pixel."); - return NULL; - } - - /* The hash is used for fast lookups of color from chars */ - color_hash = g_hash_table_new (g_str_hash, g_str_equal); - - name_buf = g_new (gchar, n_col * (cpp + 1)); - colors = g_new (_XPMColor, n_col); - - for (cnt = 0; cnt < n_col; cnt++) { - gchar *color_name; - - buffer = (*get_buf) (op_cmap, handle); - if (!buffer) { - g_warning ("Can't load XPM colormap"); - g_hash_table_destroy (color_hash); - g_free (name_buf); - g_free (colors); - return NULL; - } - - color = &colors[cnt]; - color->color_string = &name_buf[cnt * (cpp + 1)]; - strncpy (color->color_string, buffer, cpp); - color->color_string[cpp] = 0; - buffer += strlen (color->color_string); - color->transparent = FALSE; - - color_name = xpm_extract_color (buffer); - - if ((color_name == NULL) || (g_strcasecmp (color_name, "None") == 0) - || (gdk_color_parse (color_name, &color->color) == FALSE)) { - color->transparent = TRUE; - is_trans = TRUE; - } - - g_free (color_name); - g_hash_table_insert (color_hash, color->color_string, color); - - if (cnt == 0) - fallbackcolor = color; - } - - if (is_trans) - pixels = malloc (w * h * 4); - else - pixels = malloc (w * h * 3); - - if (!pixels) { - g_hash_table_destroy (color_hash); - g_free (colors); - g_free (name_buf); - return NULL; - } - - wbytes = w * cpp; - pixtmp = pixels; - - for (ycnt = 0; ycnt < h; ycnt++) { - buffer = (*get_buf) (op_body, handle); - if ((!buffer) || (strlen (buffer) < wbytes)) - continue; - - for (n = 0, cnt = 0, xcnt = 0; n < wbytes; n += cpp, xcnt++) { - strncpy (pixel_str, &buffer[n], cpp); - pixel_str[cpp] = 0; - ns = 0; - - color = g_hash_table_lookup (color_hash, pixel_str); - - /* Bad XPM...punt */ - if (!color) - color = fallbackcolor; - - *pixtmp++ = color->color.red >> 8; - *pixtmp++ = color->color.green >> 8; - *pixtmp++ = color->color.blue >> 8; - - if (is_trans && color->transparent) - *pixtmp++ = 0; - else if (is_trans) - *pixtmp++ = 0xFF; - } - } - - g_hash_table_destroy (color_hash); - g_free (colors); - g_free (name_buf); - - return gdk_pixbuf_new_from_data (pixels, ART_PIX_RGB, is_trans, - w, h, is_trans ? (w * 4) : (w * 3), - free_buffer, NULL); -} - -/* Shared library entry point for file loading */ -GdkPixbuf * -gdk_pixbuf__xpm_image_load (FILE *f) -{ - GdkPixbuf *pixbuf; - struct file_handle h; - - memset (&h, 0, sizeof (h)); - h.infile = f; - pixbuf = pixbuf_create_from_xpm (file_buffer, &h); - g_free (h.buffer); - - return pixbuf; -} - -/* Shared library entry point for memory loading */ -GdkPixbuf * -gdk_pixbuf__xpm_image_load_xpm_data (const gchar **data) -{ - GdkPixbuf *pixbuf; - struct mem_handle h; - - h.data = data; - h.offset = 0; - - pixbuf = pixbuf_create_from_xpm (mem_buffer, &h); - - return pixbuf; -} diff --git a/gdk-pixbuf/pixops/.cvsignore b/gdk-pixbuf/pixops/.cvsignore deleted file mode 100644 index 8027cd33b5..0000000000 --- a/gdk-pixbuf/pixops/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -Makefile -Makefile.in -.libs -.deps -*.lo -*.la -timescale diff --git a/gdk-pixbuf/pixops/Makefile.am b/gdk-pixbuf/pixops/Makefile.am deleted file mode 100644 index 9cdb3b3197..0000000000 --- a/gdk-pixbuf/pixops/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -noinst_LTLIBRARIES = libpixops.la - -INCLUDES = $(GLIB_CFLAGS) $(LIBART_CFLAGS) - -noinst_PROGRAMS = timescale - -timescale_SOURCES = timescale.c -timescale_LDADD = libpixops.la $(GLIB_LIBS) -lm - -if USE_MMX -mmx_sources = \ - have_mmx.S \ - scale_line_22_33_mmx.S \ - composite_line_22_4a4_mmx.S \ - composite_line_color_22_4a4_mmx.S -endif - -libpixops_la_SOURCES = \ - pixops.c \ - pixops.h \ - pixops-internal.h \ - $(mmx_sources) diff --git a/gdk-pixbuf/pixops/README b/gdk-pixbuf/pixops/README deleted file mode 100644 index 957a0b3cbe..0000000000 --- a/gdk-pixbuf/pixops/README +++ /dev/null @@ -1,110 +0,0 @@ -The code in this directory implements optimized, filtered scaling -for pixmap data. - -This code is copyright Red Hat, Inc, 2000 and licensed under the terms -of the GNU Lesser General Public License (LGPL). - -(If you want to use it in a project where that license is not -appropriate, please contact me, and most likely something can be -worked out.) - -Owen Taylor - -PRINCIPLES -========== - -The general principle of this code is that it first computes a filter -matrix for the given filtering mode, and then calls a general driver -routine, passing in functions to composite pixels and lines. - -(The pixel functions are used for handling edge cases, and the line -functions are simply used for the middle parts of the image.) - -The system is designed so that the line functions can be simple, -don't have to worry about special cases, can be selected to -be specific to the particular formats involved. This allows them -to be hyper-optimized. Since most of the compution time is -spent in these functions, this results in an overall fast design. - -MMX assembly code for Intel (and compatible) processors is included -for a number of the most common special cases: - - scaling from RGB to RGB - compositing from RGBA to RGBx - compositing against a color from RGBA and storing in a RGBx buffer - -TODO -==== - -* ART_FILTER_HYPER is not correctly implemented. It is currently - implemented as a filter that is derived by doing linear interpolation - on the source image and then averaging that with a box filter. - - It should be defined as followed (see art_filterlevel.h) - - "HYPER is the highest quality reconstruction function. It is derived - from the hyperbolic filters in Wolberg's "Digital Image Warping," - and is formally defined as the hyperbolic-filter sampling the ideal - hyperbolic-filter interpolated image (the filter is designed to be - idempotent for 1:1 pixel mapping). It is the slowest and highest - quality." - - The current HYPER is probably as slow, but lower quality. Also, there - are some subtle errors in the calculation current HYPER that show up as dark - stripes if you scale a constant-color image. - -* There are some roundoff errors in the compositing routines. - the _nearest() variants do it right, most of the other code - is wrong to some degree or another. - - For instance, in composite line, we have: - - dest[0] = ((0xff0000 - a) * dest[0] + r) >> 24; - - if a is 0, then we have: - - (0xff0000 * dest[0] + r) >> 24 - - which gives results which are 1 to low: - - 255 => 254, 1 => 0. - - So, this should be something like: - - ((0xff0000 - a) * dest[0] + r + 0xffffff) >> 24; - - (Not checked, caveat emptor) - - An alternatve formulation of this as: - - dest[0] + (r - a * dest[0] + 0xffffff) >> 24 - - may be better numerically, but would need consideration for overflow. - -* The generic functions could be sped up considerably by - switching around conditionals and inner loops in various - places. - -* Right now, in several of the most common cases, there are - optimized mmx routines, but no optimized C routines. - - For instance, there is a - - pixops_composite_line_22_4a4_mmx() - - But no - - pixops_composite_line_22_4a4() - - Also, it may be desirable to include a few more special cases - in particular: - - pixops_composite_line_22_4a3() - - May be desirable. - -* Scaling down images by large scale factors is _slow_ since huge filter - matrixes are computed. (e.g., to scale down by a factor of 100, we compute - 101x101 filter matrixes. At some point, it would be more efficent to - switch over to subsampling when scaling down - one should never need a filter - matrix bigger than 16x16. - diff --git a/gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S b/gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S deleted file mode 100644 index f3edc8ab08..0000000000 --- a/gdk-pixbuf/pixops/composite_line_22_4a4_mmx.S +++ /dev/null @@ -1,208 +0,0 @@ - .file "composite_line_22_4a4_mmx.S" - .version "01.01" -gcc2_compiled.: -.text - .align 16 -.globl pixops_composite_line_22_4a4_mmx - .type pixops_composite_line_22_4a4_mmx,@function -/* - * Arguments - * - * weights: 8(%ebp) - * p: 12(%ebp) %esi - * q1: 16(%ebp) - * q2: 20(%ebp) - * xstep: 24(%ebp) - * p_end: 28(%ebp) - * xinit: 32(%ebp) - * -*/ -pixops_composite_line_22_4a4_mmx: -/* - * Function call entry - */ - pushl %ebp - movl %esp,%ebp - subl $28,%esp - pushl %edi - pushl %esi - pushl %ebx -/* Locals: - * int x %ebx - * int x_scaled -24(%ebp) - */ - -/* - * Setup - */ -/* Initialize variables */ - movl 32(%ebp),%ebx - movl 32(%ebp),%edx - sarl $16,%edx - movl 12(%ebp),%esi - - movl %edx,-24(%ebp) - - cmpl %esi,28(%ebp) - je .out - -/* Load initial values into %mm1, %mm3 */ - shll $2, %edx - - pxor %mm4, %mm4 - - movl 16(%ebp),%edi - movl (%edi, %edx), %eax - movd (%edi, %edx), %mm5 - punpcklbw %mm4, %mm5 - shrl $24, %eax - movl $0x010101, %ecx - mull %ecx - orl $0xff000000, %eax - movd %eax, %mm1 - punpcklbw %mm4, %mm1 - pmullw %mm5,%mm1 - - movl -24(%ebp),%edx - shll $2, %edx - - movl 20(%ebp),%edi - movl (%edi, %edx), %eax - movd (%edi, %edx), %mm5 - punpcklbw %mm4, %mm5 - shrl $24, %eax - movl $0x010101, %ecx - mull %ecx - orl $0xff000000, %eax - movd %eax, %mm3 - punpcklbw %mm4, %mm3 - pmullw %mm5,%mm3 - - psrlw $8,%mm1 - psrlw $8,%mm3 - - addl $65536,%ebx - movl %ebx,%edx - sarl $16,%edx - - jmp .newx - .p2align 4,,7 -.loop: -/* int x_index = (x & 0xf000) >> 12 */ - movl %ebx,%eax - andl $0xf000,%eax - shrl $7,%eax - - movq (%edi,%eax),%mm4 - pmullw %mm0,%mm4 - movq 8(%edi,%eax),%mm5 - pmullw %mm1,%mm5 - movq 16(%edi,%eax),%mm6 - movq 24(%edi,%eax),%mm7 - pmullw %mm2,%mm6 - pmullw %mm3,%mm7 - paddw %mm4, %mm5 - paddw %mm6, %mm7 - paddw %mm5, %mm7 - - movl $0xffff,%ecx - movd %ecx,%mm4 - psllq $48,%mm4 - movq %mm4,%mm6 - psubw %mm7,%mm4 - pand %mm6,%mm4 - - movq %mm4,%mm5 - psrlq $16,%mm4 - por %mm4,%mm5 - psrlq $32,%mm5 - por %mm4,%mm5 - - psrlw $8,%mm5 - - movd (%esi),%mm7 - pxor %mm4,%mm4 - punpcklbw %mm4, %mm7 - - pmullw %mm7,%mm5 - -/* x += x_step; */ - addl 24(%ebp),%ebx -/* x_scale = x >> 16; */ - movl %ebx,%edx - sarl $16,%edx - - paddw %mm5,%mm6 - - psrlw $8,%mm6 - packuswb %mm6, %mm6 - movd %mm6,(%esi) - - addl $4, %esi - - cmpl %esi,28(%ebp) - je .out - - cmpl %edx,-24(%ebp) - je .loop - -.newx: - movl %edx,-24(%ebp) -/* - * Load the two new values into %mm1, %mm3, move old values into %mm0, %mm2 - */ - movq %mm1, %mm0 - movq %mm3, %mm2 - - shll $2, %edx - -# %mm4 will always be already clear here -# pxor %mm4, %mm4 - - movl 16(%ebp),%edi - movl (%edi, %edx), %eax - movd (%edi, %edx), %mm5 - punpcklbw %mm4, %mm5 - shrl $24, %eax - movl $0x010101, %ecx - mull %ecx -/* - * mull destroyed %edx, need to reconstitute - */ - movl -24(%ebp),%edx - shll $2, %edx - - orl $0xff000000, %eax - movd %eax, %mm1 - punpcklbw %mm4, %mm1 - pmullw %mm5,%mm1 - - movl 20(%ebp),%edi - movl (%edi, %edx), %eax - movd (%edi, %edx), %mm5 - punpcklbw %mm4, %mm5 - shrl $24, %eax - movl $0x010101, %ecx - mull %ecx - orl $0xff000000, %eax - movd %eax, %mm3 - punpcklbw %mm4, %mm3 - pmullw %mm5,%mm3 - - psrlw $8,%mm1 - psrlw $8,%mm3 - - movl 8(%ebp),%edi - - jmp .loop - -.out: - movl %esi,%eax - emms - leal -40(%ebp),%esp - popl %ebx - popl %esi - popl %edi - movl %ebp,%esp - popl %ebp - ret diff --git a/gdk-pixbuf/pixops/composite_line_color_22_4a4_mmx.S b/gdk-pixbuf/pixops/composite_line_color_22_4a4_mmx.S deleted file mode 100644 index e3fd640d65..0000000000 --- a/gdk-pixbuf/pixops/composite_line_color_22_4a4_mmx.S +++ /dev/null @@ -1,219 +0,0 @@ - .file "composite_line_color_22_4a4_mmx.S" - .version "01.01" -gcc2_compiled.: -.text - .align 16 -.globl pixops_composite_line_color_22_4a4_mmx - .type pixops_composite_line_color_22_4a4_mmx,@function -/* - * Arguments - * - * weights: 8(%ebp) - * p: 12(%ebp) %esi - * q1: 16(%ebp) - * q2: 20(%ebp) - * xstep: 24(%ebp) - * p_end: 28(%ebp) - * xinit: 32(%ebp) - * dest_x: 36(%ebp) - * check_shift: 40(%ebp) - * colors: 44(%ebp) - * -*/ -pixops_composite_line_color_22_4a4_mmx: -/* - * Function call entry - */ - pushl %ebp - movl %esp,%ebp - subl $28,%esp - pushl %edi - pushl %esi - pushl %ebx -/* Locals: - * int x %ebx - * int x_scaled -24(%ebp) - */ - -/* - * Setup - */ -/* Initialize variables */ - movl 32(%ebp),%ebx - movl 32(%ebp),%edx - sarl $16,%edx - movl 12(%ebp),%esi - - movl %edx,-24(%ebp) - - cmpl %esi,28(%ebp) - je .out - -/* Load initial values into %mm1, %mm3 */ - shll $2, %edx - - pxor %mm4, %mm4 - - movl 16(%ebp),%edi - movl (%edi, %edx), %eax - movd (%edi, %edx), %mm5 - punpcklbw %mm4, %mm5 - shrl $24, %eax - movl $0x010101, %ecx - mull %ecx - orl $0xff000000, %eax - movd %eax, %mm1 - punpcklbw %mm4, %mm1 - pmullw %mm5,%mm1 - -/* - * mull destroyed %edx, need to reconstitute - */ - movl -24(%ebp),%edx - shll $2, %edx - - movl 20(%ebp),%edi - movl (%edi, %edx), %eax - movd (%edi, %edx), %mm5 - punpcklbw %mm4, %mm5 - shrl $24, %eax - movl $0x010101, %ecx - mull %ecx - orl $0xff000000, %eax - movd %eax, %mm3 - punpcklbw %mm4, %mm3 - pmullw %mm5,%mm3 - - psrlw $8,%mm1 - psrlw $8,%mm3 - - addl $65536,%ebx - movl %ebx,%edx - sarl $16,%edx - - jmp .newx - .p2align 4,,7 -.loop: -/* int x_index = (x & 0xf000) >> 12 */ - movl %ebx,%eax - andl $0xf000,%eax - shrl $7,%eax - - movq (%edi,%eax),%mm4 - pmullw %mm0,%mm4 - movq 8(%edi,%eax),%mm5 - pmullw %mm1,%mm5 - movq 16(%edi,%eax),%mm6 - movq 24(%edi,%eax),%mm7 - pmullw %mm2,%mm6 - pmullw %mm3,%mm7 - paddw %mm4, %mm5 - paddw %mm6, %mm7 - paddw %mm5, %mm7 - - movl $0xffff,%ecx - movd %ecx,%mm4 - psllq $48,%mm4 - movq %mm4,%mm6 - psubw %mm7,%mm4 - pand %mm6,%mm4 - - movq %mm4,%mm5 - psrlq $16,%mm4 - por %mm4,%mm5 - psrlq $32,%mm5 - por %mm4,%mm5 - - psrlw $8,%mm5 - - movl 36(%ebp),%eax - incl 36(%ebp) - - movl 40(%ebp),%ecx - shrl %cl,%eax - andl $1,%eax - - movl 44(%ebp),%ecx - movq (%ecx,%eax,8),%mm6 - - pmullw %mm6,%mm5 - -/* x += x_step; */ - addl 24(%ebp),%ebx -/* x_scale = x >> 16; */ - movl %ebx,%edx - sarl $16,%edx - - paddw %mm5,%mm7 - - psrlw $8,%mm7 - packuswb %mm7, %mm7 - movd %mm7,(%esi) - - addl $4, %esi - - cmpl %esi,28(%ebp) - je .out - - cmpl %edx,-24(%ebp) - je .loop - -.newx: - movl %edx,-24(%ebp) -/* - * Load the two new values into %mm1, %mm3, move old values into %mm0, %mm2 - */ - movq %mm1, %mm0 - movq %mm3, %mm2 - - shll $2, %edx - - pxor %mm4, %mm4 - - movl 16(%ebp),%edi - movl (%edi, %edx), %eax - movd (%edi, %edx), %mm5 - punpcklbw %mm4, %mm5 - shrl $24, %eax - movl $0x010101, %ecx - mull %ecx -/* - * mull destroyed %edx, need to reconstitute - */ - movl -24(%ebp),%edx - shll $2, %edx - - orl $0xff000000, %eax - movd %eax, %mm1 - punpcklbw %mm4, %mm1 - pmullw %mm5,%mm1 - - movl 20(%ebp),%edi - movl (%edi, %edx), %eax - movd (%edi, %edx), %mm5 - punpcklbw %mm4, %mm5 - shrl $24, %eax - movl $0x010101, %ecx - mull %ecx - orl $0xff000000, %eax - movd %eax, %mm3 - punpcklbw %mm4, %mm3 - pmullw %mm5,%mm3 - - psrlw $8,%mm1 - psrlw $8,%mm3 - - movl 8(%ebp),%edi - - jmp .loop - -.out: - movl %esi,%eax - emms - leal -40(%ebp),%esp - popl %ebx - popl %esi - popl %edi - movl %ebp,%esp - popl %ebp - ret diff --git a/gdk-pixbuf/pixops/have_mmx.S b/gdk-pixbuf/pixops/have_mmx.S deleted file mode 100644 index da222500fe..0000000000 --- a/gdk-pixbuf/pixops/have_mmx.S +++ /dev/null @@ -1,42 +0,0 @@ - .file "have_mmx.S" - .version "01.01" -gcc2_compiled.: -.text - .align 16 -.globl pixops_have_mmx - .type pixops_have_mmx,@function - -pixops_have_mmx: - push %ebx - -# Check if bit 21 in flags word is writeable - - pushfl - popl %eax - movl %eax,%ebx - xorl $0x00200000, %eax - pushl %eax - popfl - pushfl - popl %eax - - cmpl %eax, %ebx - - je .notfound - -# OK, we have CPUID - - movl $1, %eax - cpuid - - test $0x00800000, %edx - jz .notfound - - movl $1, %eax - jmp .out - -.notfound: - movl $0, %eax -.out: - popl %ebx - ret \ No newline at end of file diff --git a/gdk-pixbuf/pixops/pixops-internal.h b/gdk-pixbuf/pixops/pixops-internal.h deleted file mode 100644 index b6ed3c0599..0000000000 --- a/gdk-pixbuf/pixops/pixops-internal.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifdef USE_MMX -art_u8 *pixops_scale_line_22_33_mmx (art_u32 weights[16][8], art_u8 *p, art_u8 *q1, art_u8 *q2, int x_step, art_u8 *p_stop, int x_init); -art_u8 *pixops_composite_line_22_4a4_mmx (art_u32 weights[16][8], art_u8 *p, art_u8 *q1, art_u8 *q2, int x_step, art_u8 *p_stop, int x_init); -art_u8 *pixops_composite_line_color_22_4a4_mmx (art_u32 weights[16][8], art_u8 *p, art_u8 *q1, art_u8 *q2, int x_step, art_u8 *p_stop, int x_init, int dest_x, int check_shift, int *colors); -int pixops_have_mmx (void); -#endif - diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c deleted file mode 100644 index 78bf44eda6..0000000000 --- a/gdk-pixbuf/pixops/pixops.c +++ /dev/null @@ -1,1528 +0,0 @@ -#include -#include -#include "config.h" - -#include "pixops.h" -#include "pixops-internal.h" - -#define SUBSAMPLE_BITS 4 -#define SUBSAMPLE (1 << SUBSAMPLE_BITS) -#define SUBSAMPLE_MASK ((1 << SUBSAMPLE_BITS)-1) -#define SCALE_SHIFT 16 - -typedef struct _PixopsFilter PixopsFilter; - -struct _PixopsFilter -{ - int *weights; - int n_x; - int n_y; - double x_offset; - double y_offset; -}; - -typedef art_u8 *(*PixopsLineFunc) (int *weights, int n_x, int n_y, - art_u8 *dest, int dest_x, art_u8 *dest_end, int dest_channels, int dest_has_alpha, - art_u8 **src, int src_channels, art_boolean src_has_alpha, - int x_init, int x_step, int src_width, - int check_size, art_u32 color1, art_u32 color2); - -typedef void (*PixopsPixelFunc) (art_u8 *dest, int dest_x, int dest_channels, int dest_has_alpha, - int src_has_alpha, int check_size, art_u32 color1, - art_u32 color2, - int r, int g, int b, int a); - -static int -get_check_shift (int check_size) -{ - int check_shift = 0; - g_return_val_if_fail (check_size >= 0, 4); - - while (!(check_size & 1)) - { - check_shift++; - check_size >>= 1; - } - - return check_shift; -} - -static void -pixops_scale_nearest (art_u8 *dest_buf, - int render_x0, - int render_y0, - int render_x1, - int render_y1, - int dest_rowstride, - int dest_channels, - art_boolean dest_has_alpha, - const art_u8 *src_buf, - int src_width, - int src_height, - int src_rowstride, - int src_channels, - art_boolean src_has_alpha, - double scale_x, - double scale_y) -{ - int i, j; - int x; - int x_step = (1 << SCALE_SHIFT) / scale_x; - int y_step = (1 << SCALE_SHIFT) / scale_y; - -#define INNER_LOOP(SRC_CHANNELS,DEST_CHANNELS) \ - for (j=0; j < (render_x1 - render_x0); j++) \ - { \ - const art_u8 *p = src + (x >> SCALE_SHIFT) * SRC_CHANNELS; \ - \ - dest[0] = p[0]; \ - dest[1] = p[1]; \ - dest[2] = p[2]; \ - \ - if (DEST_CHANNELS == 4) \ - { \ - if (SRC_CHANNELS == 4) \ - dest[3] = p[3]; \ - else \ - dest[3] = 0xff; \ - } \ - \ - dest += DEST_CHANNELS; \ - x += x_step; \ - } - - for (i = 0; i < (render_y1 - render_y0); i++) - { - const art_u8 *src = src_buf + ((i * y_step + y_step / 2) >> SCALE_SHIFT) * src_rowstride; - art_u8 *dest = dest_buf + i * dest_rowstride; - - x = render_x0 * x_step + x_step / 2; - - if (src_channels == 3) - { - if (dest_channels == 3) - { - INNER_LOOP (3, 3); - } - else - { - INNER_LOOP (3, 4); - } - } - else if (src_channels == 4) - { - if (dest_channels == 3) - { - INNER_LOOP (4, 3); - } - else - { - for (j=0; j < (render_x1 - render_x0); j++) - { - const art_u8 *p = src + (x >> SCALE_SHIFT) * 4; - - *(art_u32 *)dest = *(art_u32 *)p; - - dest += 4; - x += x_step; - } - } - } - } -#undef INNER_LOOP -} - -static void -pixops_composite_nearest (art_u8 *dest_buf, - int render_x0, - int render_y0, - int render_x1, - int render_y1, - int dest_rowstride, - int dest_channels, - art_boolean dest_has_alpha, - const art_u8 *src_buf, - int src_width, - int src_height, - int src_rowstride, - int src_channels, - art_boolean src_has_alpha, - double scale_x, - double scale_y, - int overall_alpha) -{ - int i, j; - int x; - int x_step = (1 << SCALE_SHIFT) / scale_x; - int y_step = (1 << SCALE_SHIFT) / scale_y; - - for (i = 0; i < (render_y1 - render_y0); i++) - { - const art_u8 *src = src_buf + (((i + render_y0) * y_step + y_step / 2) >> SCALE_SHIFT) * src_rowstride; - art_u8 *dest = dest_buf + i * dest_rowstride + render_x0 * dest_channels; - - x = render_x0 * x_step + x_step / 2; - - for (j=0; j < (render_x1 - render_x0); j++) - { - const art_u8 *p = src + (x >> SCALE_SHIFT) * src_channels; - unsigned int a0; - - if (src_has_alpha) - a0 = (p[3] * overall_alpha + 0xff) >> 8; - else - a0 = overall_alpha; - - if (dest_has_alpha) - { - unsigned int a1 = dest[3]; - unsigned int total = a0 + a1; - - if (total) - { - dest[0] = (a0 * src[0] + a1 * dest[0]) / (total); - dest[1] = (a0 * src[1] + a1 * dest[1]) / (total); - dest[2] = (a0 * src[2] + a1 * dest[2]) / (total); - dest[3] = total - ((a0 * a1 + 0xff) >> 8); - } - else - { - dest[0] = 0; - dest[1] = 0; - dest[2] = 0; - dest[3] = 0; - } - } - else - { - dest[0] = dest[0] + ((a0 * (p[0] - dest[0]) + 0xff) >> 8); - dest[1] = dest[1] + ((a0 * (p[1] - dest[1]) + 0xff) >> 8); - dest[2] = dest[2] + ((a0 * (p[2] - dest[2]) + 0xff) >> 8); - - if (dest_channels == 4) - dest[3] = 0xff; - } - - dest += dest_channels; - x += x_step; - } - } -} - -static void -pixops_composite_color_nearest (art_u8 *dest_buf, - int render_x0, - int render_y0, - int render_x1, - int render_y1, - int dest_rowstride, - int dest_channels, - art_boolean dest_has_alpha, - const art_u8 *src_buf, - int src_width, - int src_height, - int src_rowstride, - int src_channels, - art_boolean src_has_alpha, - double scale_x, - double scale_y, - int overall_alpha, - int check_x, - int check_y, - int check_size, - art_u32 color1, - art_u32 color2) -{ - int i, j; - int x; - int x_step = (1 << SCALE_SHIFT) / scale_x; - int y_step = (1 << SCALE_SHIFT) / scale_y; - int r1, g1, b1, r2, g2, b2; - int check_shift = get_check_shift (check_size); - - for (i = 0; i < (render_y1 - render_y0); i++) - { - const art_u8 *src = src_buf + (((i + render_y0) * y_step + y_step/2) >> SCALE_SHIFT) * src_rowstride; - art_u8 *dest = dest_buf + i * dest_rowstride; - - x = render_x0 * x_step + x_step / 2; - - if (((i + check_y) >> check_shift) & 1) - { - r1 = (color2 & 0xff0000) >> 16; - g1 = (color2 & 0xff00) >> 8; - b1 = color2 & 0xff; - - r2 = (color1 & 0xff0000) >> 16; - g2 = (color1 & 0xff00) >> 8; - b2 = color1 & 0xff; - } - else - { - r1 = (color1 & 0xff0000) >> 16; - g1 = (color1 & 0xff00) >> 8; - b1 = color1 & 0xff; - - r2 = (color2 & 0xff0000) >> 16; - g2 = (color2 & 0xff00) >> 8; - b2 = color2 & 0xff; - } - - for (j=0 ; j < (render_x1 - render_x0); j++) - { - const art_u8 *p = src + (x >> SCALE_SHIFT) * src_channels; - unsigned int a0; - - if (src_has_alpha) - a0 = (p[3] * overall_alpha + 0xff) >> 8; - else - a0 = overall_alpha; - - if (((j + check_x) >> check_shift) & 1) - { - dest[0] = r2 + ((a0 * ((int)p[0] - r2) + 0xff) >> 8); - dest[1] = g2 + ((a0 * ((int)p[1] - g2) + 0xff) >> 8); - dest[2] = b2 + ((a0 * ((int)p[2] - b2) + 0xff) >> 8); - } - else - { - dest[0] = r1 + ((a0 * ((int)p[0] - r1) + 0xff) >> 8); - dest[1] = g1 + ((a0 * ((int)p[1] - g1) + 0xff) >> 8); - dest[2] = b1 + ((a0 * ((int)p[2] - b1) + 0xff) >> 8); - } - - if (dest_channels == 4) - dest[3] = 0xff; - - dest += dest_channels; - x += x_step; - } - } -} - -static void -composite_pixel (art_u8 *dest, int dest_x, int dest_channels, int dest_has_alpha, - int src_has_alpha, int check_size, art_u32 color1, art_u32 color2, - int r, int g, int b, int a) -{ - if (dest_has_alpha) - { - unsigned int w = (((1 << 16) - a) * dest[3]) >> 8; - unsigned int total = a + w; - - if (total) - { - dest[0] = (r + w * dest[0]) / total; - dest[1] = (g + w * dest[1]) / total; - dest[2] = (b + w * dest[2]) / total; - dest[3] = (r * w) >> 16; - } - else - { - dest[0] = 0; - dest[1] = 0; - dest[2] = 0; - dest[3] = 0; - } - } - else - { - dest[0] = ((0xff0000 - a) * dest[0] + r) >> 24; - dest[1] = ((0xff0000 - a) * dest[1] + g) >> 24; - dest[2] = ((0xff0000 - a) * dest[2] + b) >> 24; - } -} - -static art_u8 * -composite_line (int *weights, int n_x, int n_y, - art_u8 *dest, int dest_x, art_u8 *dest_end, int dest_channels, int dest_has_alpha, - art_u8 **src, int src_channels, art_boolean src_has_alpha, - int x_init, int x_step, int src_width, - int check_size, art_u32 color1, art_u32 color2) -{ - int x = x_init; - int i, j; - - while (dest < dest_end) - { - int x_scaled = x >> SCALE_SHIFT; - unsigned int r = 0, g = 0, b = 0, a = 0; - int *pixel_weights; - - pixel_weights = weights + ((x >> (SCALE_SHIFT - SUBSAMPLE_BITS)) & SUBSAMPLE_MASK) * n_x * n_y; - - for (i=0; i> 8; - unsigned int total = a + w; - - if (total) - { - dest[0] = (r + w * dest[0]) / total; - dest[1] = (r + w * dest[1]) / total; - dest[2] = (r + w * dest[2]) / total; - dest[3] = (r * w) >> 16; - } - else - { - dest[0] = 0; - dest[1] = 0; - dest[2] = 0; - dest[3] = 0; - } - } - else - { - dest[0] = ((0xff0000 - a) * dest[0] + r) >> 24; - dest[1] = ((0xff0000 - a) * dest[1] + g) >> 24; - dest[2] = ((0xff0000 - a) * dest[2] + b) >> 24; - } - - dest += dest_channels; - x += x_step; - } - - return dest; -} - -static art_u8 * -composite_line_22_4a4 (int *weights, int n_x, int n_y, - art_u8 *dest, int dest_x, art_u8 *dest_end, int dest_channels, int dest_has_alpha, - art_u8 **src, int src_channels, art_boolean src_has_alpha, - int x_init, int x_step, int src_width, - int check_size, art_u32 color1, art_u32 color2) -{ - int x = x_init; - art_u8 *src0 = src[0]; - art_u8 *src1 = src[1]; - - g_return_val_if_fail (src_channels != 3, dest); - g_return_val_if_fail (src_has_alpha, dest); - - while (dest < dest_end) - { - int x_scaled = x >> SCALE_SHIFT; - unsigned int r, g, b, a, ta; - int *pixel_weights; - art_u8 *q0, *q1; - int w1, w2, w3, w4; - - q0 = src0 + x_scaled * 4; - q1 = src1 + x_scaled * 4; - - pixel_weights = (int *)((char *)weights + ((x >> (SCALE_SHIFT - SUBSAMPLE_BITS - 4)) & (SUBSAMPLE_MASK << 4))); - - w1 = pixel_weights[0]; - w2 = pixel_weights[1]; - w3 = pixel_weights[2]; - w4 = pixel_weights[3]; - - a = w1 * q0[3]; - r = a * q0[0]; - g = a * q0[1]; - b = a * q0[2]; - - ta = w2 * q0[7]; - r += ta * q0[4]; - g += ta * q0[5]; - b += ta * q0[6]; - a += ta; - - ta = w3 * q0[3]; - r += ta * q0[0]; - g += ta * q0[1]; - b += ta * q0[2]; - a += ta; - - ta += w4 * q1[7]; - r += ta * q1[4]; - g += ta * q1[5]; - b += ta * q1[6]; - a += ta; - - dest[0] = ((0xff0000 - a) * dest[0] + r) >> 24; - dest[1] = ((0xff0000 - a) * dest[1] + g) >> 24; - dest[2] = ((0xff0000 - a) * dest[2] + b) >> 24; - dest[3] = a >> 16; - - dest += 4; - x += x_step; - } - - return dest; -} - -#ifdef USE_MMX -static art_u8 * -composite_line_22_4a4_mmx_stub (int *weights, int n_x, int n_y, - art_u8 *dest, int dest_x, art_u8 *dest_end, int dest_channels, int dest_has_alpha, - art_u8 **src, int src_channels, art_boolean src_has_alpha, - int x_init, int x_step, int src_width, - int check_size, art_u32 color1, art_u32 color2) -{ - art_u32 mmx_weights[16][8]; - int j; - - for (j=0; j<16; j++) - { - mmx_weights[j][0] = 0x00010001 * (weights[4*j] >> 8); - mmx_weights[j][1] = 0x00010001 * (weights[4*j] >> 8); - mmx_weights[j][2] = 0x00010001 * (weights[4*j + 1] >> 8); - mmx_weights[j][3] = 0x00010001 * (weights[4*j + 1] >> 8); - mmx_weights[j][4] = 0x00010001 * (weights[4*j + 2] >> 8); - mmx_weights[j][5] = 0x00010001 * (weights[4*j + 2] >> 8); - mmx_weights[j][6] = 0x00010001 * (weights[4*j + 3] >> 8); - mmx_weights[j][7] = 0x00010001 * (weights[4*j + 3] >> 8); - } - - return pixops_composite_line_22_4a4_mmx (mmx_weights, dest, src[0], src[1], x_step, dest_end, x_init); -} -#endif /* USE_MMX */ - -static void -composite_pixel_color (art_u8 *dest, int dest_x, int dest_channels, int dest_has_alpha, - int src_has_alpha, int check_size, art_u32 color1, art_u32 color2, - int r, int g, int b, int a) -{ - int dest_r, dest_g, dest_b; - int check_shift = get_check_shift (check_size); - - if ((dest_x >> check_shift) & 1) - { - dest_r = (color2 & 0xff0000) >> 16; - dest_g = (color2 & 0xff00) >> 8; - dest_b = color2 & 0xff; - } - else - { - dest_r = (color1 & 0xff0000) >> 16; - dest_g = (color1 & 0xff00) >> 8; - dest_b = color1 & 0xff; - } - - dest[0] = ((0xff0000 - a) * dest_r + r) >> 24; - dest[1] = ((0xff0000 - a) * dest_g + g) >> 24; - dest[2] = ((0xff0000 - a) * dest_b + b) >> 24; - - if (dest_has_alpha) - dest[3] = 0xff; - else if (dest_channels == 4) - dest[3] = a >> 16; -} - -static art_u8 * -composite_line_color (int *weights, int n_x, int n_y, - art_u8 *dest, int dest_x, art_u8 *dest_end, int dest_channels, int dest_has_alpha, - art_u8 **src, int src_channels, art_boolean src_has_alpha, - int x_init, int x_step, int src_width, - int check_size, art_u32 color1, art_u32 color2) -{ - int x = x_init; - int i, j; - int check_shift = get_check_shift (check_size); - int dest_r1, dest_g1, dest_b1; - int dest_r2, dest_g2, dest_b2; - - g_return_val_if_fail (check_size != 0, dest); - - dest_r1 = (color1 & 0xff0000) >> 16; - dest_g1 = (color1 & 0xff00) >> 8; - dest_b1 = color1 & 0xff; - - dest_r2 = (color2 & 0xff0000) >> 16; - dest_g2 = (color2 & 0xff00) >> 8; - dest_b2 = color2 & 0xff; - - while (dest < dest_end) - { - int x_scaled = x >> SCALE_SHIFT; - unsigned int r = 0, g = 0, b = 0, a = 0; - int *pixel_weights; - - pixel_weights = weights + ((x >> (SCALE_SHIFT - SUBSAMPLE_BITS)) & SUBSAMPLE_MASK) * n_x * n_y; - - for (i=0; i> check_shift) & 1) - { - dest[0] = ((0xff0000 - a) * dest_r2 + r) >> 24; - dest[1] = ((0xff0000 - a) * dest_g2 + g) >> 24; - dest[2] = ((0xff0000 - a) * dest_b2 + b) >> 24; - } - else - { - dest[0] = ((0xff0000 - a) * dest_r1 + r) >> 24; - dest[1] = ((0xff0000 - a) * dest_g1 + g) >> 24; - dest[2] = ((0xff0000 - a) * dest_b1 + b) >> 24; - } - - if (dest_has_alpha) - dest[3] = 0xff; - else if (dest_channels == 4) - dest[3] = a >> 16; - - dest += dest_channels; - x += x_step; - dest_x++; - } - - return dest; -} - -#ifdef USE_MMX -static art_u8 * -composite_line_color_22_4a4_mmx_stub (int *weights, int n_x, int n_y, - art_u8 *dest, int dest_x, art_u8 *dest_end, int dest_channels, int dest_has_alpha, - art_u8 **src, int src_channels, art_boolean src_has_alpha, - int x_init, int x_step, int src_width, - int check_size, art_u32 color1, art_u32 color2) -{ - art_u32 mmx_weights[16][8]; - int check_shift = get_check_shift (check_size); - int colors[4]; - int j; - - for (j=0; j<16; j++) - { - mmx_weights[j][0] = 0x00010001 * (weights[4*j] >> 8); - mmx_weights[j][1] = 0x00010001 * (weights[4*j] >> 8); - mmx_weights[j][2] = 0x00010001 * (weights[4*j + 1] >> 8); - mmx_weights[j][3] = 0x00010001 * (weights[4*j + 1] >> 8); - mmx_weights[j][4] = 0x00010001 * (weights[4*j + 2] >> 8); - mmx_weights[j][5] = 0x00010001 * (weights[4*j + 2] >> 8); - mmx_weights[j][6] = 0x00010001 * (weights[4*j + 3] >> 8); - mmx_weights[j][7] = 0x00010001 * (weights[4*j + 3] >> 8); - } - - colors[0] = (color1 & 0xff00) << 8 | (color1 & 0xff); - colors[1] = (color1 & 0xff0000) >> 16; - colors[2] = (color2 & 0xff00) << 8 | (color2 & 0xff); - colors[3] = (color2 & 0xff0000) >> 16; - - return pixops_composite_line_color_22_4a4_mmx (mmx_weights, dest, src[0], src[1], x_step, dest_end, x_init, - dest_x, check_shift, colors); -} -#endif /* USE_MMX */ - -static void -scale_pixel (art_u8 *dest, int dest_x, int dest_channels, int dest_has_alpha, - int src_has_alpha, int check_size, art_u32 color1, art_u32 color2, - int r, int g, int b, int a) -{ - if (src_has_alpha) - { - if (a) - { - dest[0] = r / a; - dest[1] = g / a; - dest[2] = b / a; - dest[3] = a >> 16; - } - else - { - dest[0] = 0; - dest[1] = 0; - dest[2] = 0; - dest[3] = 0; - } - } - else - { - dest[0] = (r + 0xffffff) >> 24; - dest[1] = (g + 0xffffff) >> 24; - dest[2] = (b + 0xffffff) >> 24; - - if (dest_has_alpha) - dest[3] = 0xff; - } -} - -static art_u8 * -scale_line (int *weights, int n_x, int n_y, - art_u8 *dest, int dest_x, art_u8 *dest_end, int dest_channels, int dest_has_alpha, - art_u8 **src, int src_channels, art_boolean src_has_alpha, - int x_init, int x_step, int src_width, - int check_size, art_u32 color1, art_u32 color2) -{ - int x = x_init; - int i, j; - - while (dest < dest_end) - { - int x_scaled = x >> SCALE_SHIFT; - int *pixel_weights; - - pixel_weights = weights + ((x >> (SCALE_SHIFT - SUBSAMPLE_BITS)) & SUBSAMPLE_MASK) * n_x * n_y; - - if (src_has_alpha) - { - unsigned int r = 0, g = 0, b = 0, a = 0; - for (i=0; i> 16; - } - else - { - dest[0] = 0; - dest[1] = 0; - dest[2] = 0; - dest[3] = 0; - } - } - else - { - unsigned int r = 0, g = 0, b = 0; - for (i=0; i> 16; - dest[1] = (g + 0xffff) >> 16; - dest[2] = (b + 0xffff) >> 16; - - if (dest_has_alpha) - dest[3] = 0xff; - } - - dest += dest_channels; - - x += x_step; - } - - return dest; -} - -#ifdef USE_MMX -static art_u8 * -scale_line_22_33_mmx_stub (int *weights, int n_x, int n_y, - art_u8 *dest, int dest_x, art_u8 *dest_end, int dest_channels, int dest_has_alpha, - art_u8 **src, int src_channels, art_boolean src_has_alpha, - int x_init, int x_step, int src_width, - int check_size, art_u32 color1, art_u32 color2) -{ - art_u32 mmx_weights[16][8]; - int j; - - for (j=0; j<16; j++) - { - mmx_weights[j][0] = 0x00010001 * (weights[4*j] >> 8); - mmx_weights[j][1] = 0x00010001 * (weights[4*j] >> 8); - mmx_weights[j][2] = 0x00010001 * (weights[4*j + 1] >> 8); - mmx_weights[j][3] = 0x00010001 * (weights[4*j + 1] >> 8); - mmx_weights[j][4] = 0x00010001 * (weights[4*j + 2] >> 8); - mmx_weights[j][5] = 0x00010001 * (weights[4*j + 2] >> 8); - mmx_weights[j][6] = 0x00010001 * (weights[4*j + 3] >> 8); - mmx_weights[j][7] = 0x00010001 * (weights[4*j + 3] >> 8); - } - - return pixops_scale_line_22_33_mmx (mmx_weights, dest, src[0], src[1], x_step, dest_end, x_init); -} -#endif /* USE_MMX */ - -static art_u8 * -scale_line_22_33 (int *weights, int n_x, int n_y, - art_u8 *dest, art_u8 *dest_end, int dest_channels, int dest_has_alpha, - art_u8 **src, int src_channels, art_boolean src_has_alpha, - int x_init, int x_step, int src_width, - int check_size, art_u32 color1, art_u32 color2) -{ - int x = x_init; - art_u8 *src0 = src[0]; - art_u8 *src1 = src[1]; - - while (dest < dest_end) - { - unsigned int r, g, b; - int x_scaled = x >> SCALE_SHIFT; - int *pixel_weights; - art_u8 *q0, *q1; - int w1, w2, w3, w4; - - q0 = src0 + x_scaled * 3; - q1 = src1 + x_scaled * 3; - - pixel_weights = (int *)((char *)weights + ((x >> (SCALE_SHIFT - SUBSAMPLE_BITS - 4)) & (SUBSAMPLE_MASK << 4))); - - w1 = pixel_weights[0]; - w2 = pixel_weights[1]; - w3 = pixel_weights[2]; - w4 = pixel_weights[3]; - - r = w1 * q0[0]; - g = w1 * q0[1]; - b = w1 * q0[2]; - - r += w2 * q0[3]; - g += w2 * q0[4]; - b += w2 * q0[5]; - - r += w3 * q1[0]; - g += w3 * q1[1]; - b += w3 * q1[2]; - - r += w4 * q1[4]; - g += w4 * q1[5]; - b += w4 * q1[6]; - - dest[0] = r >> 16; - dest[1] = g >> 16; - dest[2] = b >> 16; - - dest += 3; - - x += x_step; - } - - return dest; -} - -static void -process_pixel (int *weights, int n_x, int n_y, - art_u8 *dest, int dest_x, int dest_channels, int dest_has_alpha, - art_u8 **src, int src_channels, art_boolean src_has_alpha, - int x_start, int src_width, - int check_size, art_u32 color1, art_u32 color2, - PixopsPixelFunc pixel_func) -{ - unsigned int r = 0, g = 0, b = 0, a = 0; - int i, j; - - for (i=0; in_y); - - int x_step = (1 << SCALE_SHIFT) / scale_x; - int y_step = (1 << SCALE_SHIFT) / scale_y; - - int dest_x; - int scaled_x_offset = floor (filter->x_offset * (1 << SCALE_SHIFT)); - - int run_end_index = (((src_width - filter->n_x + 1) << SCALE_SHIFT) - scaled_x_offset - 1) / x_step + 1 - render_x0; - int check_shift = check_size ? get_check_shift (check_size) : 0; - - y = render_y0 * y_step + floor (filter->y_offset * (1 << SCALE_SHIFT)); - for (i = 0; i < (render_y1 - render_y0); i++) - { - int y_start = y >> SCALE_SHIFT; - int x_start; - int *run_weights = filter->weights + ((y >> (SCALE_SHIFT - SUBSAMPLE_BITS)) & SUBSAMPLE_MASK) * filter->n_x * filter->n_y * SUBSAMPLE; - art_u8 *new_outbuf; - art_u32 tcolor1, tcolor2; - - art_u8 *outbuf = dest_buf + dest_rowstride * i; - art_u8 *outbuf_end = outbuf + dest_channels * (render_x1 - render_x0); - - if (((i + check_y) >> check_shift) & 1) - { - tcolor1 = color2; - tcolor2 = color1; - } - else - { - tcolor1 = color1; - tcolor2 = color2; - } - - for (j=0; jn_y; j++) - { - if (y_start < 0) - line_bufs[j] = (art_u8 *)src_buf; - else if (y_start < src_height) - line_bufs[j] = (art_u8 *)src_buf + src_rowstride * y_start; - else - line_bufs[j] = (art_u8 *)src_buf + src_rowstride * (src_height - 1); - - y_start++; - } - - dest_x = check_x; - x = render_x0 * x_step + scaled_x_offset; - x_start = x >> SCALE_SHIFT; - - while (x_start < 0 && outbuf < outbuf_end) - { - process_pixel (run_weights + ((x >> (SCALE_SHIFT - SUBSAMPLE_BITS)) & SUBSAMPLE_MASK) * (filter->n_x * filter->n_y), filter->n_x, filter->n_y, - outbuf, dest_x, dest_channels, dest_has_alpha, - line_bufs, src_channels, src_has_alpha, - x >> SCALE_SHIFT, src_width, - check_size, tcolor1, tcolor2, pixel_func); - - x += x_step; - x_start = x >> SCALE_SHIFT; - dest_x++; - outbuf += dest_channels; - } - - new_outbuf = (*line_func)(run_weights, filter->n_x, filter->n_y, - outbuf, dest_x, - MIN (outbuf_end, dest_buf + dest_rowstride * i + run_end_index * dest_channels), - dest_channels, dest_has_alpha, - line_bufs, src_channels, src_has_alpha, - x, x_step, src_width, check_size, tcolor1, tcolor2); - - dest_x += (new_outbuf - outbuf) / dest_channels; - - x = dest_x * x_step + scaled_x_offset; - outbuf = new_outbuf; - - while (outbuf < outbuf_end) - { - process_pixel (run_weights + ((x >> (SCALE_SHIFT - SUBSAMPLE_BITS)) & SUBSAMPLE_MASK) * (filter->n_x * filter->n_y), filter->n_x, filter->n_y, - outbuf, dest_x, dest_channels, dest_has_alpha, - line_bufs, src_channels, src_has_alpha, - x >> SCALE_SHIFT, src_width, - check_size, tcolor1, tcolor2, pixel_func); - - x += x_step; - dest_x++; - outbuf += dest_channels; - } - - y += y_step; - } - - g_free (line_bufs); -} - -static void -tile_make_weights (PixopsFilter *filter, double x_scale, double y_scale, double overall_alpha) -{ - int i_offset, j_offset; - - int n_x = ceil(1/x_scale + 1); - int n_y = ceil(1/y_scale + 1); - - filter->x_offset = 0; - filter->y_offset = 0; - filter->n_x = n_x; - filter->n_y = n_y; - filter->weights = g_new (int, SUBSAMPLE * SUBSAMPLE * n_x * n_y); - - for (i_offset=0; i_offsetweights + ((i_offset*SUBSAMPLE) + j_offset) * n_x * n_y; - double x = (double)j_offset / 16; - double y = (double)i_offset / 16; - int i,j; - - for (i = 0; i < n_y; i++) - { - double tw, th; - - if (i < y) - { - if (i + 1 > y) - th = MIN(i+1, y + 1/y_scale) - y; - else - th = 0; - } - else - { - if (y + 1/y_scale > i) - th = MIN(i+1, y + 1/y_scale) - i; - else - th = 0; - } - - for (j = 0; j < n_x; j++) - { - if (j < x) - { - if (j + 1 > x) - tw = MIN(j+1, x + 1/x_scale) - x; - else - tw = 0; - } - else - { - if (x + 1/x_scale > j) - tw = MIN(j+1, x + 1/x_scale) - j; - else - tw = 0; - } - - *(pixel_weights + n_x * i + j) = 65536 * tw * x_scale * th * y_scale * overall_alpha; - } - } - } -} - -static void -bilinear_make_fast_weights (PixopsFilter *filter, double x_scale, double y_scale, double overall_alpha) -{ - int i_offset, j_offset; - double *x_weights, *y_weights; - int n_x, n_y; - - if (x_scale > 1.0) /* Bilinear */ - { - n_x = 2; - filter->x_offset = 0.5 * (1/x_scale - 1); - } - else /* Tile */ - { - n_x = ceil(1.0 + 1.0/x_scale); - filter->x_offset = 0.0; - } - - if (y_scale > 1.0) /* Bilinear */ - { - n_y = 2; - filter->y_offset = 0.5 * (1/y_scale - 1); - } - else /* Tile */ - { - n_y = ceil(1.0 + 1.0/y_scale); - filter->y_offset = 0.0; - } - - filter->n_y = n_y; - filter->n_x = n_x; - filter->weights = g_new (int, SUBSAMPLE * SUBSAMPLE * n_x * n_y); - - x_weights = g_new (double, n_x); - y_weights = g_new (double, n_y); - - for (i_offset=0; i_offsetweights + ((i_offset*SUBSAMPLE) + j_offset) * n_x * n_y; - double x = (double)j_offset / 16; - double y = (double)i_offset / 16; - int i,j; - - if (x_scale > 1.0) /* Bilinear */ - { - for (i = 0; i < n_x; i++) - { - x_weights[i] = ((i == 0) ? (1 - x) : x) / x_scale; - } - } - else /* Tile */ - { - for (i = 0; i < n_x; i++) - { - if (i < x) - { - if (i + 1 > x) - x_weights[i] = MIN(i+1, x + 1/x_scale) - x; - else - x_weights[i] = 0; - } - else - { - if (x + 1/x_scale > i) - x_weights[i] = MIN(i+1, x + 1/x_scale) - i; - else - x_weights[i] = 0; - } - } - } - - if (y_scale > 1.0) /* Bilinear */ - { - for (i = 0; i < n_y; i++) - { - y_weights[i] = ((i == 0) ? (1 - y) : y) / y_scale; - } - } - else /* Tile */ - { - for (i = 0; i < n_y; i++) - { - if (i < y) - { - if (i + 1 > y) - y_weights[i] = MIN(i+1, y + 1/y_scale) - y; - else - y_weights[i] = 0; - } - else - { - if (y + 1/y_scale > i) - y_weights[i] = MIN(i+1, y + 1/y_scale) - i; - else - y_weights[i] = 0; - } - } - } - - for (i = 0; i < n_y; i++) - for (j = 0; j < n_x; j++) - *(pixel_weights + n_x * i + j) = 65536 * x_weights[j] * x_scale * y_weights[i] * y_scale * overall_alpha; - } - - g_free (x_weights); - g_free (y_weights); -} - -static double -bilinear_quadrant (double bx0, double bx1, double by0, double by1) -{ - double ax0, ax1, ay0, ay1; - double x0, x1, y0, y1; - - ax0 = 0.; - ax1 = 1.; - ay0 = 0.; - ay1 = 1.; - - if (ax0 < bx0) - { - if (ax1 > bx0) - { - x0 = bx0; - x1 = MIN (ax1, bx1); - } - else - return 0; - } - else - { - if (bx1 > ax0) - { - x0 = ax0; - x1 = MIN (ax1, bx1); - } - else - return 0; - } - - if (ay0 < by0) - { - if (ay1 > by0) - { - y0 = by0; - y1 = MIN (ay1, by1); - } - else - return 0; - } - else - { - if (by1 > ay0) - { - y0 = ay0; - y1 = MIN (ay1, by1); - } - else - return 0; - } - - return 0.25 * (x1*x1 - x0*x0) * (y1*y1 - y0*y0); -} - -static void -bilinear_make_weights (PixopsFilter *filter, double x_scale, double y_scale, double overall_alpha) -{ - int i_offset, j_offset; - - int n_x = ceil(1/x_scale + 2.0); - int n_y = ceil(1/y_scale + 2.0); - - filter->x_offset = -1.0; - filter->y_offset = -1.0; - filter->n_x = n_x; - filter->n_y = n_y; - - filter->weights = g_new (int, SUBSAMPLE * SUBSAMPLE * n_x * n_y); - - for (i_offset=0; i_offsetweights + ((i_offset*SUBSAMPLE) + j_offset) * n_x * n_y; - double x = (double)j_offset / 16; - double y = (double)i_offset / 16; - int i,j; - - for (i = 0; i < n_y; i++) - for (j = 0; j < n_x; j++) - { - double w; - - w = bilinear_quadrant (0.5 + j - (x + 1 / x_scale), 0.5 + j - x, 0.5 + i - (y + 1 / y_scale), 0.5 + i - y); - w += bilinear_quadrant (1.5 + x - j, 1.5 + (x + 1 / x_scale) - j, 0.5 + i - (y + 1 / y_scale), 0.5 + i - y); - w += bilinear_quadrant (0.5 + j - (x + 1 / x_scale), 0.5 + j - x, 1.5 + y - i, 1.5 + (y + 1 / y_scale) - i); - w += bilinear_quadrant (1.5 + x - j, 1.5 + (x + 1 / x_scale) - j, 1.5 + y - i, 1.5 + (y + 1 / y_scale) - i); - - *(pixel_weights + n_x * i + j) = 65536 * w * x_scale * y_scale * overall_alpha; - } - } -} - -void -pixops_composite_color (art_u8 *dest_buf, - int render_x0, - int render_y0, - int render_x1, - int render_y1, - int dest_rowstride, - int dest_channels, - art_boolean dest_has_alpha, - const art_u8 *src_buf, - int src_width, - int src_height, - int src_rowstride, - int src_channels, - art_boolean src_has_alpha, - double scale_x, - double scale_y, - ArtFilterLevel filter_level, - int overall_alpha, - int check_x, - int check_y, - int check_size, - art_u32 color1, - art_u32 color2) -{ - PixopsFilter filter; - PixopsLineFunc line_func; - -#ifdef USE_MMX - art_boolean found_mmx = pixops_have_mmx(); -#endif - - g_return_if_fail (!(dest_channels == 3 && dest_has_alpha)); - g_return_if_fail (!(src_channels == 3 && src_has_alpha)); - - if (scale_x == 0 || scale_y == 0) - return; - - if (!src_has_alpha && overall_alpha == 255) - pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1, - dest_rowstride, dest_channels, dest_has_alpha, - src_buf, src_width, src_height, src_rowstride, src_channels, - src_has_alpha, scale_x, scale_y, filter_level); - - switch (filter_level) - { - case ART_FILTER_NEAREST: - pixops_composite_color_nearest (dest_buf, render_x0, render_y0, render_x1, render_y1, - dest_rowstride, dest_channels, dest_has_alpha, - src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha, - scale_x, scale_y, overall_alpha, - check_x, check_y, check_size, color1, color2); - return; - - case ART_FILTER_TILES: - tile_make_weights (&filter, scale_x, scale_y, overall_alpha / 255.); - break; - - case ART_FILTER_BILINEAR: - bilinear_make_fast_weights (&filter, scale_x, scale_y, overall_alpha / 255.); - break; - - case ART_FILTER_HYPER: - bilinear_make_weights (&filter, scale_x, scale_y, overall_alpha / 255.); - break; - } - -#ifdef USE_MMX - if (filter.n_x == 2 && filter.n_y == 2 && - dest_channels == 4 && src_channels == 4 && src_has_alpha && !dest_has_alpha && found_mmx) - line_func = composite_line_color_22_4a4_mmx_stub; - else -#endif - line_func = composite_line_color; - - pixops_process (dest_buf, render_x0, render_y0, render_x1, render_y1, - dest_rowstride, dest_channels, dest_has_alpha, - src_buf, src_width, src_height, src_rowstride, src_channels, - src_has_alpha, scale_x, scale_y, check_x, check_y, check_size, color1, color2, - &filter, line_func, composite_pixel_color); - - g_free (filter.weights); -} - -void -pixops_composite (art_u8 *dest_buf, - int render_x0, - int render_y0, - int render_x1, - int render_y1, - int dest_rowstride, - int dest_channels, - art_boolean dest_has_alpha, - const art_u8 *src_buf, - int src_width, - int src_height, - int src_rowstride, - int src_channels, - art_boolean src_has_alpha, - double scale_x, - double scale_y, - ArtFilterLevel filter_level, - int overall_alpha) -{ - PixopsFilter filter; - PixopsLineFunc line_func; - -#ifdef USE_MMX - art_boolean found_mmx = pixops_have_mmx(); -#endif - - g_return_if_fail (!(dest_channels == 3 && dest_has_alpha)); - g_return_if_fail (!(src_channels == 3 && src_has_alpha)); - - if (scale_x == 0 || scale_y == 0) - return; - - if (!src_has_alpha && overall_alpha == 255) - pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1, - dest_rowstride, dest_channels, dest_has_alpha, - src_buf, src_width, src_height, src_rowstride, src_channels, - src_has_alpha, scale_x, scale_y, filter_level); - - switch (filter_level) - { - case ART_FILTER_NEAREST: - pixops_composite_nearest (dest_buf, render_x0, render_y0, render_x1, render_y1, - dest_rowstride, dest_channels, dest_has_alpha, - src_buf, src_width, src_height, src_rowstride, src_channels, - src_has_alpha, scale_x, scale_y, overall_alpha); - return; - - case ART_FILTER_TILES: - tile_make_weights (&filter, scale_x, scale_y, overall_alpha / 255.); - break; - - case ART_FILTER_BILINEAR: - bilinear_make_fast_weights (&filter, scale_x, scale_y, overall_alpha / 255.); - break; - - case ART_FILTER_HYPER: - bilinear_make_weights (&filter, scale_x, scale_y, overall_alpha / 255.); - break; - } - - if (filter.n_x == 2 && filter.n_y == 2 && - dest_channels == 4 && src_channels == 4 && src_has_alpha && !dest_has_alpha) - { -#ifdef USE_MMX - if (found_mmx) - line_func = composite_line_22_4a4_mmx_stub; - else -#endif - line_func = composite_line_22_4a4; - } - else - line_func = composite_line; - - pixops_process (dest_buf, render_x0, render_y0, render_x1, render_y1, - dest_rowstride, dest_channels, dest_has_alpha, - src_buf, src_width, src_height, src_rowstride, src_channels, - src_has_alpha, scale_x, scale_y, 0, 0, 0, 0, 0, - &filter, line_func, composite_pixel); - - g_free (filter.weights); -} - -void -pixops_scale (art_u8 *dest_buf, - int render_x0, - int render_y0, - int render_x1, - int render_y1, - int dest_rowstride, - int dest_channels, - art_boolean dest_has_alpha, - const art_u8 *src_buf, - int src_width, - int src_height, - int src_rowstride, - int src_channels, - art_boolean src_has_alpha, - double scale_x, - double scale_y, - ArtFilterLevel filter_level) -{ - PixopsFilter filter; - PixopsLineFunc line_func; - -#ifdef USE_MMX - art_boolean found_mmx = pixops_have_mmx(); -#endif - - g_return_if_fail (!(dest_channels == 3 && dest_has_alpha)); - g_return_if_fail (!(src_channels == 3 && src_has_alpha)); - g_return_if_fail (!(src_has_alpha && !dest_has_alpha)); - - if (scale_x == 0 || scale_y == 0) - return; - - switch (filter_level) - { - case ART_FILTER_NEAREST: - pixops_scale_nearest (dest_buf, render_x0, render_y0, render_x1, render_y1, - dest_rowstride, dest_channels, dest_has_alpha, - src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha, - scale_x, scale_y); - return; - - case ART_FILTER_TILES: - tile_make_weights (&filter, scale_x, scale_y, 1.0); - break; - - case ART_FILTER_BILINEAR: - bilinear_make_fast_weights (&filter, scale_x, scale_y, 1.0); - break; - - case ART_FILTER_HYPER: - bilinear_make_weights (&filter, scale_x, scale_y, 1.0); - break; - } - -#ifdef USE_MMX - if (filter.n_x == 2 && filter.n_y == 2 && - found_mmx && dest_channels == 3 && src_channels == 3) - line_func = scale_line_22_33_mmx_stub; - else -#endif - line_func = scale_line; - - pixops_process (dest_buf, render_x0, render_y0, render_x1, render_y1, - dest_rowstride, dest_channels, dest_has_alpha, - src_buf, src_width, src_height, src_rowstride, src_channels, - src_has_alpha, scale_x, scale_y, 0, 0, 0, 0, 0, - &filter, line_func, scale_pixel); - - g_free (filter.weights); -} - diff --git a/gdk-pixbuf/pixops/pixops.h b/gdk-pixbuf/pixops/pixops.h deleted file mode 100644 index 193d659180..0000000000 --- a/gdk-pixbuf/pixops/pixops.h +++ /dev/null @@ -1,80 +0,0 @@ -#include -#include - -/* Scale src_buf from src_width / src_height by factors scale_x, scale_y - * and composite the portion corresponding to - * render_x, render_y, render_width, render_height in the new - * coordinate system into dest_buf starting at 0, 0 - */ -void pixops_composite (art_u8 *dest_buf, - int render_x0, - int render_y0, - int render_x1, - int render_y1, - int dest_rowstride, - int dest_channels, - int dest_has_alpha, - const art_u8 *src_buf, - int src_width, - int src_height, - int src_rowstride, - int src_channels, - int src_has_alpha, - double scale_x, - double scale_y, - ArtFilterLevel filter_level, - int overall_alpha); - -/* Scale src_buf from src_width / src_height by factors scale_x, scale_y - * and composite the portion corresponding to - * render_x, render_y, render_width, render_height in the new - * coordinate system against a checkboard with checks of size check_size - * of the colors color1 and color2 into dest_buf starting at 0, 0 - */ -void pixops_composite_color (art_u8 *dest_buf, - int render_x0, - int render_y0, - int render_x1, - int render_y1, - int dest_rowstride, - int dest_channels, - int dest_has_alpha, - const art_u8 *src_buf, - int src_width, - int src_height, - int src_rowstride, - int src_channels, - int src_has_alpha, - double scale_x, - double scale_y, - ArtFilterLevel filter_level, - int overall_alpha, - int check_x, - int check_y, - int check_size, - art_u32 color1, - art_u32 color2); - -/* Scale src_buf from src_width / src_height by factors scale_x, scale_y - * and composite the portion corresponding to - * render_x, render_y, render_width, render_height in the new - * coordinate system into dest_buf starting at 0, 0 - */ -void pixops_scale (art_u8 *dest_buf, - int render_x0, - int render_y0, - int render_x1, - int render_y1, - int dest_rowstride, - int dest_channels, - int dest_has_alpha, - const art_u8 *src_buf, - int src_width, - int src_height, - int src_rowstride, - int src_channels, - int src_has_alpha, - double scale_x, - double scale_y, - ArtFilterLevel filter_level); - diff --git a/gdk-pixbuf/pixops/scale_line_22_33_mmx.S b/gdk-pixbuf/pixops/scale_line_22_33_mmx.S deleted file mode 100644 index e253fc1889..0000000000 --- a/gdk-pixbuf/pixops/scale_line_22_33_mmx.S +++ /dev/null @@ -1,152 +0,0 @@ - .file "scale_line_22_33_mmx.S" - .version "01.01" -gcc2_compiled.: -.text - .align 16 -.globl pixops_scale_line_22_33_mmx - .type pixops_scale_line_22_33_mmx,@function -/* - * Arguments - * - * weights: 8(%ebp) - * p: 12(%ebp) %esi - * q1: 16(%ebp) - * q2: 20(%ebp) - * xstep: 24(%ebp) - * p_end: 28(%ebp) - * xinit: 32(%ebp) - * -*/ -pixops_scale_line_22_33_mmx: -/* - * Function call entry - */ - pushl %ebp - movl %esp,%ebp - subl $28,%esp - pushl %edi - pushl %esi - pushl %ebx -/* Locals: - * int x %ebx - * int x_scaled -24(%ebp) - */ - -/* - * Setup - */ -/* Initialize variables */ - movl 32(%ebp),%ebx - movl 32(%ebp),%edx - sarl $16,%edx - movl 12(%ebp),%esi - - cmpl %esi,28(%ebp) - je .out - -/* Load initial values into %mm1, %mm3 */ - leal (%edx,%edx,2),%edx # Multiply by 3 - - movl 16(%ebp),%edi - pxor %mm4, %mm4 - movzbl 2(%edi,%edx),%ecx - shll $16,%ecx - movzwl (%edi,%edx),%eax - orl %eax,%ecx - movd %ecx, %mm1 - punpcklbw %mm4, %mm1 - - movl 20(%ebp),%edi - movzbl 2(%edi,%edx),%ecx - shll $16,%ecx - movzwl (%edi,%edx),%eax - orl %eax,%ecx - movd %ecx, %mm3 - punpcklbw %mm4, %mm3 - - addl $65536,%ebx - movl %ebx,%edx - sarl $16,%edx - - jmp .newx - .p2align 4,,7 -.loop: -/* int x_index = (x & 0xf000) >> 12 */ - movl %ebx,%eax - andl $0xf000,%eax - shrl $7,%eax - - movq (%edi,%eax),%mm4 - pmullw %mm0,%mm4 - movq 8(%edi,%eax),%mm5 - pmullw %mm1,%mm5 - movq 16(%edi,%eax),%mm6 - movq 24(%edi,%eax),%mm7 - pmullw %mm2,%mm6 - pmullw %mm3,%mm7 - paddw %mm4, %mm5 - paddw %mm6, %mm7 - paddw %mm5, %mm7 - - psrlw $8, %mm7 - packuswb %mm7, %mm7 - movd %mm7, %eax - - movb %al, (%esi) - shrl $8, %eax - movw %ax, 1(%esi) - addl $3, %esi - - cmpl %esi,28(%ebp) - je .out - -/* x += x_step; */ - addl 24(%ebp),%ebx -/* x_scale = x >> 16; */ - movl %ebx,%edx - sarl $16,%edx - - cmpl %edx,-24(%ebp) - je .loop - -.newx: - movl %edx,-24(%ebp) -/* - * Load the two new values into %mm1, %mm3, move old values into %mm0, %mm2 - */ - movq %mm1, %mm0 - movq %mm3, %mm2 - - leal (%edx,%edx,2),%edx # Multiply by 3 - - movl 16(%ebp),%edi - pxor %mm4, %mm4 - movzbl 2(%edi,%edx),%ecx - shll $16,%ecx - movzwl (%edi,%edx),%eax - orl %eax,%ecx - movd %ecx, %mm1 - punpcklbw %mm4, %mm1 - - movl 20(%ebp),%edi - movzbl 2(%edi,%edx),%ecx - shll $16,%ecx - movzwl (%edi,%edx),%eax - orl %eax,%ecx - movd %ecx, %mm3 - punpcklbw %mm4, %mm3 - - movl 8(%ebp),%edi - - jmp .loop - -.out: - movl %esi,%eax - emms - leal -40(%ebp),%esp - popl %ebx - popl %esi - popl %edi - movl %ebp,%esp - popl %ebp - ret diff --git a/gdk-pixbuf/pixops/timescale.c b/gdk-pixbuf/pixops/timescale.c deleted file mode 100644 index d0ea257487..0000000000 --- a/gdk-pixbuf/pixops/timescale.c +++ /dev/null @@ -1,232 +0,0 @@ -#include -#include -#include -#include -#include -#include "pixops.h" - -struct timeval start_time; - -void start_timing (void) -{ - gettimeofday (&start_time, NULL); -} - -double -stop_timing (const char *test, int iterations, int bytes) -{ - struct timeval stop_time; - double msecs; - - gettimeofday (&stop_time, NULL); - if (stop_time.tv_usec < start_time.tv_usec) - { - stop_time.tv_usec += 1000000; - stop_time.tv_sec -= 1; - } - - msecs = (stop_time.tv_sec - start_time.tv_sec) * 1000. + - (stop_time.tv_usec - start_time.tv_usec) / 1000.; - - printf("%s%d\t%.1f\t\t%.2f\t\t%.2f\n", - test, iterations, msecs, msecs / iterations, ((double)bytes * iterations) / (1000*msecs)); - - return ((double)bytes * iterations) / (1000*msecs); -} - -void -init_array (double times[3][3][4]) -{ - int i, j, k; - - for (i=0; i<3; i++) - for (j=0; j<3; j++) - for (k=0; k<4; k++) - times[i][j][k] = -1; -} - -void -dump_array (double times[3][3][4]) -{ - int i, j; - - printf(" 3\t4\t4a\n"); - for (i=0; i<3; i++) - { - for (j=0; j<4; j++) - { - if (j == 0) - switch (i) - { - case 0: - printf("3 "); - break; - case 1: - printf("4 "); - break; - case 2: - printf("4a "); - break; - } - else - printf(" "); - - printf("%6.2f %6.2f %6.2f", - times[i][0][j], times[i][1][j], times[i][2][j]); - - switch (j) - { - case ART_FILTER_NEAREST: - printf (" NEAREST\n"); - break; - case ART_FILTER_TILES: - printf (" TILES\n"); - break; - case ART_FILTER_BILINEAR: - printf (" BILINEAR\n"); - break; - case ART_FILTER_HYPER: - printf (" HYPER\n"); - break; - } - } - } - printf("\n"); -} - -#define ITERS 10 - -int main (int argc, char **argv) -{ - int src_width, src_height, dest_width, dest_height; - char *src_buf, *dest_buf; - int src_index, dest_index; - int i; - double scale_times[3][3][4]; - double composite_times[3][3][4]; - double composite_color_times[3][3][4]; - - if (argc == 5) - { - src_width = atoi(argv[1]); - src_height = atoi(argv[2]); - dest_width = atoi(argv[3]); - dest_height = atoi(argv[4]); - } - else if (argc == 1) - { - src_width = 343; - src_height = 343; - dest_width = 711; - dest_height = 711; - } - else - { - fprintf (stderr, "Usage: scale [src_width src_height dest_width dest_height]\n"); - exit(1); - } - - - printf ("Scaling from (%d, %d) to (%d, %d)\n\n", src_width, src_height, dest_width, dest_height); - - init_array (scale_times); - init_array (composite_times); - init_array (composite_color_times); - - for (src_index = 0; src_index < 3; src_index++) - for (dest_index = 0; dest_index < 3; dest_index++) - { - int src_channels = (src_index == 0) ? 3 : 4; - int src_has_alpha = (src_index == 2); - int dest_channels = (dest_index == 0) ? 3 : 4; - int dest_has_alpha = (dest_index == 2); - - int src_rowstride = (src_channels*src_width + 3) & ~3; - int dest_rowstride = (dest_channels *dest_width + 3) & ~3; - - int filter_level; - - src_buf = malloc(src_rowstride * src_height); - memset (src_buf, 0x80, src_rowstride * src_height); - - dest_buf = malloc(dest_rowstride * dest_height); - memset (dest_buf, 0x80, dest_rowstride * dest_height); - - for (filter_level = ART_FILTER_NEAREST ; filter_level <= ART_FILTER_HYPER; filter_level++) - { - printf ("src_channels = %d (%s); dest_channels = %d (%s); filter_level=", - src_channels, src_has_alpha ? "alpha" : "no alpha", - dest_channels, dest_has_alpha ? "alpha" : "no alpha"); - switch (filter_level) - { - case ART_FILTER_NEAREST: - printf ("ART_FILTER_NEAREST\n"); - break; - case ART_FILTER_TILES: - printf ("ART_FILTER_TILES\n"); - break; - case ART_FILTER_BILINEAR: - printf ("ART_FILTER_BILINEAR\n"); - break; - case ART_FILTER_HYPER: - printf ("ART_FILTER_HYPER\n"); - break; - } - - printf("\t\t\titers\ttotal\t\tmsecs/iter\tMpixels/sec\t\n"); - - - if (!(src_has_alpha && !dest_has_alpha)) - { - start_timing (); - for (i = 0; i < ITERS; i++) - { - pixops_scale (dest_buf, 0, 0, dest_width, dest_height, dest_rowstride, dest_channels, dest_has_alpha, - src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha, - (double)dest_width / src_width, (double)dest_height / src_height, - filter_level); - } - scale_times[src_index][dest_index][filter_level] = - stop_timing (" scale\t\t", ITERS, dest_height * dest_width); - } - - start_timing (); - for (i = 0; i < ITERS; i++) - { - pixops_composite (dest_buf, 0, 0, dest_width, dest_height, dest_rowstride, dest_channels, dest_has_alpha, - src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha, - (double)dest_width / src_width, (double)dest_height / src_height, - filter_level, 255); - } - composite_times[src_index][dest_index][filter_level] = - stop_timing (" composite\t\t", ITERS, dest_height * dest_width); - - start_timing (); - for (i = 0; i < ITERS; i++) - { - pixops_composite_color (dest_buf, 0, 0, dest_width, dest_height, dest_rowstride, dest_channels, dest_has_alpha, - src_buf, src_width, src_height, src_rowstride, src_channels, src_has_alpha, - (double)dest_width / src_width, (double)dest_height / src_height, - filter_level, 255, 0, 0, 16, 0xaaaaaa, 0x555555); - } - composite_color_times[src_index][dest_index][filter_level] = - stop_timing (" composite color\t", ITERS, dest_height * dest_width); - - printf ("\n"); - } - printf ("\n"); - - free (src_buf); - free (dest_buf); - } - - printf ("SCALE\n=====\n\n"); - dump_array (scale_times); - - printf ("COMPOSITE\n=========\n\n"); - dump_array (composite_times); - - printf ("COMPOSITE_COLOR\n===============\n\n"); - dump_array (composite_color_times); - return 0; -} diff --git a/gdk-pixbuf/test-gdk-pixbuf.c b/gdk-pixbuf/test-gdk-pixbuf.c deleted file mode 100644 index 5b96dddd0d..0000000000 --- a/gdk-pixbuf/test-gdk-pixbuf.c +++ /dev/null @@ -1,33 +0,0 @@ -/* GdkPixbuf library - test program - * - * Copyright (C) 1999 The Free Software Foundation - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * 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. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "gdk-pixbuf.h" -#include "gdk-pixbuf-loader.h" -#include "gnome-canvas-pixbuf.h" - - - -int -main (int argc, char **argv) -{ -} diff --git a/gdk/Makefile.am b/gdk/Makefile.am index f189da3dfb..da64ec791b 100644 --- a/gdk/Makefile.am +++ b/gdk/Makefile.am @@ -15,6 +15,7 @@ INCLUDES = @STRIP_BEGIN@ \ @GTK_DEBUG_FLAGS@ \ @GTK_XIM_FLAGS@ \ @GTK_LOCALE_FLAGS@ \ + @PANGO_CFLAGS@ \ @GLIB_CFLAGS@ \ @x_cflags@ \ @STRIP_END@ @@ -30,6 +31,7 @@ libgdk_la_LDFLAGS = @STRIP_BEGIN@ \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -release $(LT_RELEASE) \ -export-dynamic \ + @PANGO_LIBS@ \ @GLIB_DEPLIBS@ \ @x_ldflags@ \ @x_libs@ \ @@ -64,6 +66,7 @@ gdk_public_h_sources = @STRIP_BEGIN@ \ gdkim.h \ gdkimage.h \ gdkinput.h \ + gdkpango.h \ gdkpixmap.h \ gdkprivate.h \ gdkproperty.h \ diff --git a/gdk/gdk.h b/gdk/gdk.h index d609e5b494..fcf2a370d7 100644 --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c index baec9d62d1..969c3feea2 100644 --- a/gdk/gdkdraw.c +++ b/gdk/gdkdraw.c @@ -445,3 +445,20 @@ gdk_draw_lines (GdkDrawable *drawable, ((GdkDrawablePrivate *)drawable)->klass->draw_lines (drawable, gc, points, npoints); } + +void +gdk_draw_layout (GdkDrawable *drawable, + GdkGC *gc, + gint x, + gint y, + PangoLayout *layout) +{ + + g_return_if_fail (drawable != NULL); + g_return_if_fail (gc != NULL); + + if (GDK_DRAWABLE_DESTROYED (drawable)) + return; + + ((GdkDrawablePrivate *)drawable)->klass->draw_layout (drawable, gc, x, y, layout); +} diff --git a/gdk/gdkdrawable.h b/gdk/gdkdrawable.h index 3b05d24a27..782fc946c3 100644 --- a/gdk/gdkdrawable.h +++ b/gdk/gdkdrawable.h @@ -108,6 +108,11 @@ struct _GdkDrawableClass GdkGC *gc, GdkPoint *points, gint npoints); + void (*draw_layout) (GdkDrawable *drawable, + GdkGC *gc, + gint x, + gint y, + PangoLayout *layout); }; /* Manipulation of drawables @@ -136,88 +141,93 @@ void gdk_drawable_unref (GdkDrawable *drawable); /* Drawing */ -void gdk_draw_point (GdkDrawable *drawable, - GdkGC *gc, - gint x, - gint y); -void gdk_draw_line (GdkDrawable *drawable, - GdkGC *gc, - gint x1, - gint y1, - gint x2, - gint y2); -void gdk_draw_rectangle (GdkDrawable *drawable, - GdkGC *gc, - gint filled, - gint x, - gint y, - gint width, - gint height); -void gdk_draw_arc (GdkDrawable *drawable, - GdkGC *gc, - gint filled, - gint x, - gint y, - gint width, - gint height, - gint angle1, - gint angle2); -void gdk_draw_polygon (GdkDrawable *drawable, - GdkGC *gc, - gint filled, - GdkPoint *points, - gint npoints); -void gdk_draw_string (GdkDrawable *drawable, - GdkFont *font, - GdkGC *gc, - gint x, - gint y, - const gchar *string); -void gdk_draw_text (GdkDrawable *drawable, - GdkFont *font, - GdkGC *gc, - gint x, - gint y, - const gchar *text, - gint text_length); -void gdk_draw_text_wc (GdkDrawable *drawable, - GdkFont *font, - GdkGC *gc, - gint x, - gint y, - const GdkWChar *text, - gint text_length); -void gdk_draw_drawable (GdkDrawable *drawable, - GdkGC *gc, - GdkDrawable *src, - gint xsrc, - gint ysrc, - gint xdest, - gint ydest, - gint width, - gint height); -void gdk_draw_image (GdkDrawable *drawable, - GdkGC *gc, - GdkImage *image, - gint xsrc, - gint ysrc, - gint xdest, - gint ydest, - gint width, - gint height); -void gdk_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints); -void gdk_draw_segments (GdkDrawable *drawable, - GdkGC *gc, - GdkSegment *segs, - gint nsegs); -void gdk_draw_lines (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints); - +void gdk_draw_point (GdkDrawable *drawable, + GdkGC *gc, + gint x, + gint y); +void gdk_draw_line (GdkDrawable *drawable, + GdkGC *gc, + gint x1, + gint y1, + gint x2, + gint y2); +void gdk_draw_rectangle (GdkDrawable *drawable, + GdkGC *gc, + gint filled, + gint x, + gint y, + gint width, + gint height); +void gdk_draw_arc (GdkDrawable *drawable, + GdkGC *gc, + gint filled, + gint x, + gint y, + gint width, + gint height, + gint angle1, + gint angle2); +void gdk_draw_polygon (GdkDrawable *drawable, + GdkGC *gc, + gint filled, + GdkPoint *points, + gint npoints); +void gdk_draw_string (GdkDrawable *drawable, + GdkFont *font, + GdkGC *gc, + gint x, + gint y, + const gchar *string); +void gdk_draw_text (GdkDrawable *drawable, + GdkFont *font, + GdkGC *gc, + gint x, + gint y, + const gchar *text, + gint text_length); +void gdk_draw_text_wc (GdkDrawable *drawable, + GdkFont *font, + GdkGC *gc, + gint x, + gint y, + const GdkWChar *text, + gint text_length); +void gdk_draw_drawable (GdkDrawable *drawable, + GdkGC *gc, + GdkDrawable *src, + gint xsrc, + gint ysrc, + gint xdest, + gint ydest, + gint width, + gint height); +void gdk_draw_image (GdkDrawable *drawable, + GdkGC *gc, + GdkImage *image, + gint xsrc, + gint ysrc, + gint xdest, + gint ydest, + gint width, + gint height); +void gdk_draw_points (GdkDrawable *drawable, + GdkGC *gc, + GdkPoint *points, + gint npoints); +void gdk_draw_segments (GdkDrawable *drawable, + GdkGC *gc, + GdkSegment *segs, + gint nsegs); +void gdk_draw_lines (GdkDrawable *drawable, + GdkGC *gc, + GdkPoint *points, + gint npoints); +void gdk_draw_layout (GdkDrawable *drawable, + GdkGC *gc, + gint x, + gint y, + PangoLayout *layout); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gdk/gdkpango.h b/gdk/gdkpango.h new file mode 100644 index 0000000000..26b967055f --- /dev/null +++ b/gdk/gdkpango.h @@ -0,0 +1,45 @@ +/* GDK - The GIMP Drawing Kit + * 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 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 __GDK_PANGO_H__ +#define __GDK_PANGO_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Pango interaction */ + +/* FIXME: The following function needs more parameters so that we can + * properly deal with different visuals, the potential for multiple + * screens in the future, etc. The PangoContext needs enough information + * in it to create new GC's and to set the colors on those GC's. + * A colormap is not sufficient. + */ +PangoContext *gdk_pango_context_get (void); +void gdk_pango_context_set_colormap (PangoContext *context, + GdkColormap *colormap); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __GDK_FONT_H__ */ diff --git a/gdk/gdkpixbuf-drawable.c b/gdk/gdkpixbuf-drawable.c deleted file mode 100644 index d4834a8276..0000000000 --- a/gdk/gdkpixbuf-drawable.c +++ /dev/null @@ -1,1130 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* GdkPixbuf library - convert X drawable information to RGB - * - * Copyright (C) 1999 Michael Zucchi - * - * Authors: Michael Zucchi - * Cody Russell - * Federico Mena-Quintero - * - * 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. - */ - -#include -#include -#include -#include "gdk-pixbuf.h" - -#if (G_BYTE_ORDER == G_LITTLE_ENDIAN) -#define LITTLE -#endif -#define d(x) - - - -static guint32 mask_table[] = { - 0x00000000, 0x00000001, 0x00000003, 0x00000007, - 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, - 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff, - 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, - 0x0000ffff, 0x0001ffff, 0x0003ffff, 0x0007ffff, - 0x000fffff, 0x001fffff, 0x003fffff, 0x007fffff, - 0x00ffffff, 0x01ffffff, 0x03ffffff, 0x07ffffff, - 0x0fffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, - 0xffffffff -}; - - - -/* - convert 1 bits-pixel data - no alpha -*/ -static void -rgb1 (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - guint8 *s; - register guint8 data; - guint8 *o; - guint8 *srow = image->mem, *orow = pixels; - - d (printf ("1 bits/pixel\n")); - - /* convert upto 8 pixels/time */ - /* its probably not worth trying to make this run very fast, who uses - 1 bit displays anymore? */ - width = image->width; - height = image->height; - bpl = image->bpl; - - for (yy = 0; yy < height; yy++) { - s = srow; - o = orow; - - for (xx = 0; xx < width; xx ++) { - data = srow[xx >> 3] >> (7 - (xx & 7)) & 1; - *o++ = colormap->colors[data].red; - *o++ = colormap->colors[data].green; - *o++ = colormap->colors[data].blue; - } - srow += bpl; - orow += rowstride; - } -} - -/* - convert 1 bits/pixel data - with alpha -*/ -static void -rgb1a (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - guint8 *s; - register guint8 data; - guint8 *o; - guint8 *srow = image->mem, *orow = pixels; - guint32 remap[2]; - - d (printf ("1 bits/pixel\n")); - - /* convert upto 8 pixels/time */ - /* its probably not worth trying to make this run very fast, who uses - 1 bit displays anymore? */ - width = image->width; - height = image->height; - bpl = image->bpl; - - for (xx = 0; xx < 2; xx++) { -#ifdef LITTLE - remap[xx] = 0xff000000 - | colormap->colors[xx].blue << 16 - | colormap->colors[xx].green << 8 - | colormap->colors[xx].red; -#else - remap[xx] = 0xff - | colormap->colors[xx].red << 24 - | colormap->colors[xx].green << 16 - | colormap->colors[xx].blue << 8; -#endif - } - - for (yy = 0; yy < height; yy++) { - s = srow; - o = orow; - - for (xx = 0; xx < width; xx ++) { - data = srow[xx >> 3] >> (7 - (xx & 7)) & 1; - *o++ = remap[data]; - } - srow += bpl; - orow += rowstride; - } -} - -/* - convert 8 bits/pixel data - no alpha -*/ -static void -rgb8 (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - guint32 mask; - register guint32 data; - guint8 *srow = image->mem, *orow = pixels; - register guint8 *s; - register guint8 *o; - - width = image->width; - height = image->height; - bpl = image->bpl; - - d (printf ("8 bit, no alpha output\n")); - - mask = mask_table[image->depth]; - - for (yy = 0; yy < height; yy++) { - s = srow; - o = orow; - for (xx = 0; xx < width; xx++) { - data = *s++ & mask; - *o++ = colormap->colors[data].red; - *o++ = colormap->colors[data].green; - *o++ = colormap->colors[data].blue; - } - srow += bpl; - orow += rowstride; - } -} - -/* - convert 8 bits/pixel data - with alpha -*/ -static void -rgb8a (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - guint32 mask; - register guint32 data; - guint32 remap[256]; - register guint8 *s; /* read 2 pixels at once */ - register guint32 *o; - guint8 *srow = image->mem, *orow = pixels; - - width = image->width; - height = image->height; - bpl = image->bpl; - - d (printf ("8 bit, with alpha output\n")); - - mask = mask_table[image->depth]; - - for (xx = 0; xx < colormap->size; xx++) { -#ifdef LITTLE - remap[xx] = 0xff000000 - | colormap->colors[xx].blue << 16 - | colormap->colors[xx].green << 8 - | colormap->colors[xx].red; -#else - remap[xx] = 0xff - | colormap->colors[xx].red << 24 - | colormap->colors[xx].green << 16 - | colormap->colors[xx].blue << 8; -#endif - } - - for (yy = 0; yy < height; yy++) { - s = srow; - o = (guint32 *) orow; - for (xx = 0; xx < width; xx ++) { - data = *s++ & mask; - *o++ = remap[data]; - } - srow += bpl; - orow += rowstride; - } -} - -/* - convert 16 bits/pixel data - no alpha - data in lsb format -*/ -static void -rgb565lsb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - -#ifdef LITTLE - register guint32 *s; /* read 2 pixels at once */ -#else - register guint8 *s; /* read 2 pixels at once */ -#endif - register guint16 *o; - guint8 *srow = image->mem, *orow = pixels; - - width = image->width; - height = image->height; - bpl = image->bpl; - - for (yy = 0; yy < height; yy++) { -#ifdef LITTLE - s = (guint32 *) srow; -#else - s = (guint32 *) srow; -#endif - o = (guint16 *) orow; - for (xx = 1; xx < width; xx += 2) { - register guint32 data; -#ifdef LITTLE - data = *s++; - *o++ = (data & 0xf800) >> 8 | (data & 0x7e0) << 5; - *o++ = (data & 0x1f) << 3 | (data & 0xf8000000) >> 16; - *o++ = ((data & 0x7e00000) >> 19) | (data & 0x1f0000) >> 5; -#else - /* swap endianness first */ - data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; - s += 4; - *o++ = (data & 0xf800) | (data & 0x7e0) >> 3; - *o++ = (data & 0x1f) << 11 | (data & 0xf8000000) >> 24; - *o++ = ((data & 0x7e00000) >> 11) | (data & 0x1f0000) >> 13; -#endif - } - /* check for last remaining pixel */ - if (width & 1) { - register guint16 data; -#ifdef LITTLE - data = *((short *) s); -#else - data = *((short *) s); - data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); -#endif - ((char *) o)[0] = (data >> 8) & 0xf8; - ((char *) o)[1] = (data >> 3) & 0xfc; - ((char *) o)[2] = (data << 3) & 0xf8; - } - srow += bpl; - orow += rowstride; - } -} - -/* - convert 16 bits/pixel data - no alpha - data in msb format -*/ -static void -rgb565msb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - -#ifdef LITTLE - register guint8 *s; /* need to swap data order */ -#else - register guint32 *s; /* read 2 pixels at once */ -#endif - register guint16 *o; - guint8 *srow = image->mem, *orow = pixels; - - width = image->width; - height = image->height; - bpl = image->bpl; - - for (yy = 0; yy < height; yy++) { -#ifdef LITTLE - s = srow; -#else - s = (guint32 *) srow; -#endif - o = (guint16 *) orow; - for (xx = 1; xx < width; xx += 2) { - register guint32 data; -#ifdef LITTLE - /* swap endianness first */ - data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; - s += 4; - *o++ = (data & 0xf800) >> 8 | (data & 0x7e0) << 5; - *o++ = (data & 0x1f) << 3 | (data & 0xf8000000) >> 16; - *o++ = ((data & 0x7e00000) >> 19) | (data & 0x1f0000) >> 5; -#else - data = *s++; - *o++ = (data & 0xf800) | (data & 0x7e0) >> 3; - *o++ = (data & 0x1f) << 11 | (data & 0xf8000000) >> 24; - *o++ = ((data & 0x7e00000) >> 11) | (data & 0x1f0000) >> 13; -#endif - } - /* check for last remaining pixel */ - if (width & 1) { - register guint16 data; -#ifdef LITTLE - data = *((short *) s); - data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); -#else - data = *((short *) s); -#endif - ((char *) o)[0] = (data >> 8) & 0xf8; - ((char *) o)[1] = (data >> 3) & 0xfc; - ((char *) o)[2] = (data << 3) & 0xf8; - } - srow += bpl; - orow += rowstride; - } -} - -/* - convert 16 bits/pixel data - with alpha - data in lsb format -*/ -static void -rgb565alsb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - -#ifdef LITTLE - register guint16 *s; /* read 1 pixels at once */ -#else - register guint8 *s; -#endif - register guint32 *o; - - guint8 *srow = image->mem, *orow = pixels; - - width = image->width; - height = image->height; - bpl = image->bpl; - - for (yy = 0; yy < height; yy++) { -#ifdef LITTLE - s = (guint16 *) srow; -#else - s = (guint8 *) srow; -#endif - o = (guint32 *) orow; - for (xx = 0; xx < width; xx ++) { - register guint32 data; - /* rrrrrggg gggbbbbb -> rrrrr000 gggggg00 bbbbb000 aaaaaaaa */ - /* little endian: aaaaaaaa bbbbb000 gggggg00 rrrrr000 */ -#ifdef LITTLE - data = *s++; - *o++ = (data & 0xf800) >> 8 | (data & 0x7e0) << 5 - | (data & 0x1f) << 19 | 0xff000000; -#else - /* swap endianness first */ - data = s[0] | s[1] << 8; - s += 2; - *o++ = (data & 0xf800) << 16 | (data & 0x7e0) << 13 - | (data & 0x1f) << 11 | 0xff; -#endif - } - srow += bpl; - orow += rowstride; - } -} - -/* - convert 16 bits/pixel data - with alpha - data in msb format -*/ -static void -rgb565amsb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - -#ifdef LITTLE - register guint8 *s; -#else - register guint16 *s; /* read 1 pixels at once */ -#endif - register guint32 *o; - - guint8 *srow = image->mem, *orow = pixels; - - width = image->width; - height = image->height; - bpl = image->bpl; - - for (yy = 0; yy < height; yy++) { - s = srow; - o = (guint32 *) orow; - for (xx = 0; xx < width; xx ++) { - register guint32 data; - /* rrrrrggg gggbbbbb -> rrrrr000 gggggg00 bbbbb000 aaaaaaaa */ - /* little endian: aaaaaaaa bbbbb000 gggggg00 rrrrr000 */ -#ifdef LITTLE - /* swap endianness first */ - data = s[0] | s[1] << 8; - s += 2; - *o++ = (data & 0xf800) >> 8 | (data & 0x7e0) << 5 - | (data & 0x1f) << 19 | 0xff000000; -#else - data = *s++; - *o++ = (data & 0xf800) << 16 | (data & 0x7e0) << 13 - | (data & 0x1f) << 11 | 0xff; -#endif - } - srow += bpl; - orow += rowstride; - } -} - -/* - convert 15 bits/pixel data - no alpha - data in lsb format -*/ -static void -rgb555lsb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - -#ifdef LITTLE - register guint32 *s; /* read 2 pixels at once */ -#else - register guint8 *s; /* read 2 pixels at once */ -#endif - register guint16 *o; - guint8 *srow = image->mem, *orow = pixels; - - width = image->width; - height = image->height; - bpl = image->bpl; - - for (yy = 0; yy < height; yy++) { -#ifdef LITTLE - s = (guint32 *) srow; -#else - s = srow; -#endif - o = (guint16 *) orow; - for (xx = 1; xx < width; xx += 2) { - register guint32 data; -#ifdef LITTLE - data = *s++; - *o++ = (data & 0x7c00) >> 7 | (data & 0x3e0) << 6; - *o++ = (data & 0x1f) << 3 | (data & 0x7c000000) >> 15; - *o++ = ((data & 0x3e00000) >> 18) | (data & 0x1f0000) >> 5; -#else - /* swap endianness first */ - data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; - s += 4; - *o++ = (data & 0x7c00) << 1 | (data & 0x3e0) >> 2; - *o++ = (data & 0x1f) << 11 | (data & 0x7c000000) >> 23; - *o++ = ((data & 0x3e00000) >> 10) | (data & 0x1f0000) >> 13; -#endif - } - /* check for last remaining pixel */ - if (width & 1) { - register guint16 data; -#ifdef LITTLE - data = *((short *) s); -#else - data = *((short *) s); - data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); -#endif - ((char *) o)[0] = (data & 0x7c0) >> 7; - ((char *) o)[1] = (data & 0x3e0) >> 2; - ((char *) o)[2] = (data & 0x1f) << 3; - } - srow += bpl; - orow += rowstride; - } -} - -/* - convert 15 bits/pixel data - no alpha - data in msb format -*/ -static void -rgb555msb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - -#ifdef LITTLE - register guint8 *s; /* read 2 pixels at once */ -#else - register guint32 *s; /* read 2 pixels at once */ -#endif - register guint16 *o; - guint8 *srow = image->mem, *orow = pixels; - - width = image->width; - height = image->height; - bpl = image->bpl; - - for (yy = 0; yy < height; yy++) { - s = srow; - o = (guint16 *) orow; - for (xx = 1; xx < width; xx += 2) { - register guint32 data; -#ifdef LITTLE - /* swap endianness first */ - data = s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; - s += 4; - *o++ = (data & 0x7c00) >> 7 | (data & 0x3e0) << 6; - *o++ = (data & 0x1f) << 3 | (data & 0x7c000000) >> 15; - *o++ = ((data & 0x3e00000) >> 18) | (data & 0x1f0000) >> 5; -#else - data = *s++; - *o++ = (data & 0x7c00) << 1 | (data & 0x3e0) >> 2; - *o++ = (data & 0x1f) << 11 | (data & 0x7c000000) >> 23; - *o++ = ((data & 0x3e00000) >> 10) | (data & 0x1f0000) >> 13; -#endif - } - /* check for last remaining pixel */ - if (width & 1) { - register guint16 data; -#ifdef LITTLE - data = *((short *) s); - data = ((data >> 8) & 0xff) | ((data & 0xff) << 8); -#else - data = *((short *) s); -#endif - ((char *) o)[0] = (data & 0x7c0) >> 7; - ((char *) o)[1] = (data & 0x3e0) >> 2; - ((char *) o)[2] = (data & 0x1f) << 3; - } - srow += bpl; - orow += rowstride; - } -} - -/* - convert 15 bits/pixel data - with alpha - data in lsb format -*/ -static void -rgb555alsb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - -#ifdef LITTLE - register guint16 *s; /* read 1 pixels at once */ -#else - register guint8 *s; -#endif - register guint32 *o; - - guint8 *srow = image->mem, *orow = pixels; - - width = image->width; - height = image->height; - bpl = image->bpl; - - for (yy = 0; yy < height; yy++) { -#ifdef LITTLE - s = (guint16 *) srow; -#else - s = srow; -#endif - o = (guint32 *) orow; - for (xx = 0; xx < width; xx++) { - register guint32 data; - /* rrrrrggg gggbbbbb -> rrrrr000 gggggg00 bbbbb000 aaaaaaaa */ - /* little endian: aaaaaaaa bbbbb000 gggggg00 rrrrr000 */ -#ifdef LITTLE - data = *s++; - *o++ = (data & 0x7c00) >> 7 | (data & 0x3e0) << 6 - | (data & 0x1f) << 19 | 0xff000000; -#else - /* swap endianness first */ - data = s[0] | s[1] << 8; - s += 2; - *o++ = (data & 0x7c00) << 17 | (data & 0x3e0) << 14 - | (data & 0x1f) << 11 | 0xff; -#endif - } - srow += bpl; - orow += rowstride; - } -} - -/* - convert 15 bits/pixel data - with alpha - data in msb format -*/ -static void -rgb555amsb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - -#ifdef LITTLE - register guint16 *s; /* read 1 pixels at once */ -#else - register guint8 *s; -#endif - register guint32 *o; - - guint8 *srow = image->mem, *orow = pixels; - - width = image->width; - height = image->height; - bpl = image->bpl; - - for (yy = 0; yy < height; yy++) { -#ifdef LITTLE - s = (guint16 *) srow; -#else - s = srow; -#endif - o = (guint32 *) orow; - for (xx = 0; xx < width; xx++) { - register guint32 data; - /* rrrrrggg gggbbbbb -> rrrrr000 gggggg00 bbbbb000 aaaaaaaa */ - /* little endian: aaaaaaaa bbbbb000 gggggg00 rrrrr000 */ -#ifdef LITTLE - /* swap endianness first */ - data = s[0] | s[1] << 8; - s += 2; - *o++ = (data & 0x7c00) >>7 | (data & 0x3e0) << 6 - | (data & 0x1f) << 19 | 0xff000000; -#else - data = *s++; - *o++ = (data & 0x7c00) << 17 | (data & 0x3e0) << 14 - | (data & 0x1f) << 11 | 0xff; -#endif - } - srow += bpl; - orow += rowstride; - } -} - - -static void -rgb888alsb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - - guint8 *s; /* for byte order swapping */ - guint8 *o; - guint8 *srow = image->mem, *orow = pixels; - - width = image->width; - height = image->height; - bpl = image->bpl; - - d (printf ("32 bits/pixel with alpha\n")); - - /* lsb data */ - for (yy = 0; yy < height; yy++) { - s = srow; - o = orow; - for (xx = 0; xx < width; xx++) { - *o++ = s[2]; - *o++ = s[1]; - *o++ = s[0]; - *o++ = 0xff; - s += 4; - } - srow += bpl; - orow += rowstride; - } -} - -static void -rgb888lsb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - - guint8 *srow = image->mem, *orow = pixels; - guint8 *o, *s; - - width = image->width; - height = image->height; - bpl = image->bpl; - - d (printf ("32 bit, lsb, no alpha\n")); - - for (yy = 0; yy < height; yy++) { - s = srow; - o = orow; - for (xx = 0; xx < width; xx++) { - *o++ = s[2]; - *o++ = s[1]; - *o++ = s[0]; - s += 4; - } - srow += bpl; - orow += rowstride; - } -} - -static void -rgb888amsb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - - guint8 *srow = image->mem, *orow = pixels; -#ifdef LITTLE - guint32 *o; - guint32 *s; -#else - guint8 *s; /* for byte order swapping */ - guint8 *o; -#endif - - d (printf ("32 bit, msb, with alpha\n")); - - width = image->width; - height = image->height; - bpl = image->bpl; - - /* msb data */ - for (yy = 0; yy < height; yy++) { -#ifdef LITTLE - s = (guint32 *) srow; - o = (guint32 *) orow; -#else - s = srow; - o = orow; -#endif - for (xx = 0; xx < width; xx++) { -#ifdef LITTLE - *o++ = s[1]; - *o++ = s[2]; - *o++ = s[3]; - *o++ = 0xff; - s += 4; -#else - *o++ = (*s << 8) | 0xff; /* untested */ - s++; -#endif - } - srow += bpl; - orow += rowstride; - } -} - -static void -rgb888msb (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *colormap) -{ - int xx, yy; - int width, height; - int bpl; - - guint8 *srow = image->mem, *orow = pixels; - guint8 *s; - guint8 *o; - - d (printf ("32 bit, msb, no alpha\n")); - - width = image->width; - height = image->height; - bpl = image->bpl; - - for (yy = 0; yy < height; yy++) { - s = srow; - o = orow; - for (xx = 0; xx < width; xx++) { - *o++ = s[1]; - *o++ = s[2]; - *o++ = s[3]; - s += 4; - } - srow += bpl; - orow += rowstride; - } -} - -/* - This should work correctly with any display/any endianness, but will probably - run quite slow -*/ -static void -convert_real_slow (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *cmap, int alpha) -{ - int xx, yy; - int width, height; - int bpl; - guint8 *srow = image->mem, *orow = pixels; - guint8 *s; - guint8 *o; - guint32 pixel; - GdkVisual *v; - - width = image->width; - height = image->height; - bpl = image->bpl; - v = gdk_colormap_get_visual(cmap); - - d(printf("rgb mask/shift/prec = %x:%x:%x %d:%d:%d %d:%d:%d\n", - v->red_mask, v->green_mask, v->blue_mask, - v->red_shift, v->green_shift, v->blue_shift, - v->red_prec, v->green_prec, v->blue_prec)); - - for (yy = 0; yy < height; yy++) { - s = srow; - o = orow; - for (xx = 0; xx < width; xx++) { - pixel = gdk_image_get_pixel(image, xx, yy); - switch (v->type) { - /* I assume this is right for static & greyscale's too? */ - case GDK_VISUAL_STATIC_GRAY: - case GDK_VISUAL_GRAYSCALE: - case GDK_VISUAL_STATIC_COLOR: - case GDK_VISUAL_PSEUDO_COLOR: - *o++ = cmap->colors[pixel].red; - *o++ = cmap->colors[pixel].green; - *o++ = cmap->colors[pixel].blue; - break; - case GDK_VISUAL_TRUE_COLOR: - /* this is odd because it must sometimes shift left (otherwise - i'd just shift >> *_shift - 8 + *_prec), so this logic - should work for all bit sizes/shifts/etc */ - *o++ = ((pixel & v->red_mask) << (32 - v->red_shift - v->red_prec)) >> 24; - *o++ = ((pixel & v->green_mask) << (32 - v->green_shift - v->green_prec)) >> 24; - *o++ = ((pixel & v->blue_mask) << (32 - v->blue_shift - v->blue_prec)) >> 24; - break; - case GDK_VISUAL_DIRECT_COLOR: - *o++ = cmap->colors[((pixel & v->red_mask) << (32 - v->red_shift - v->red_prec)) >> 24].red; - *o++ = cmap->colors[((pixel & v->green_mask) << (32 - v->green_shift - v->green_prec)) >> 24].green; - *o++ = cmap->colors[((pixel & v->blue_mask) << (32 - v->blue_shift - v->blue_prec)) >> 24].blue; - break; - } - if (alpha) - *o++ = 0xff; - } - srow += bpl; - orow += rowstride; - } -} - -typedef void (* cfunc) (GdkImage *image, art_u8 *pixels, int rowstride, GdkColormap *cmap); - -static cfunc convert_map[] = { - rgb1,rgb1,rgb1a,rgb1a, - rgb8,rgb8,rgb8a,rgb8a, - rgb555lsb,rgb555msb,rgb555alsb,rgb555amsb, - rgb565lsb,rgb565msb,rgb565alsb,rgb565amsb, - rgb888lsb,rgb888msb,rgb888alsb,rgb888amsb -}; - -/* - perform actual conversion - - If we can, try and use the optimised code versions, but as a default - fallback, and always for direct colour, use the generic/slow but complete - conversion function. -*/ -static void -rgbconvert (GdkImage *image, art_u8 *pixels, int rowstride, int alpha, GdkColormap *cmap) -{ - int index = (image->byte_order == GDK_MSB_FIRST) | (alpha != 0) << 1; - int bank=5; /* default fallback converter */ - GdkVisual *v = gdk_colormap_get_visual(cmap); - - d(printf("masks = %x:%x:%x\n", v->red_mask, v->green_mask, v->blue_mask)); - d(printf("image depth = %d, bpp = %d\n", image->depth, image->bpp)); - - switch (v->type) { - /* I assume this is right for static & greyscale's too? */ - case GDK_VISUAL_STATIC_GRAY: - case GDK_VISUAL_GRAYSCALE: - case GDK_VISUAL_STATIC_COLOR: - case GDK_VISUAL_PSEUDO_COLOR: - switch (image->bpp) { - case 1: - bank = 0; - break; - case 8: - bank = 1; - break; - } - break; - case GDK_VISUAL_TRUE_COLOR: - switch (image->depth) { - case 15: - if (v->red_mask == 0x7c00 && v->green_mask == 0x3e0 && v->blue_mask == 0x1f - && image->bpp == 16) - bank = 2; - break; - case 16: - if (v->red_mask == 0xf800 && v->green_mask == 0x7e0 && v->blue_mask == 0x1f - && image->bpp == 16) - bank = 3; - break; - case 24: - case 32: - if (v->red_mask == 0xff0000 && v->green_mask == 0xff00 && v->blue_mask == 0xff - && image->bpp == 32) - bank = 4; - break; - } - break; - case GDK_VISUAL_DIRECT_COLOR: - /* always use the slow version */ - break; - } - - d(printf("converting using conversion function in bank %d\n", bank)); - - if (bank==5) { - convert_real_slow(image, pixels, rowstride, cmap, alpha); - } else { - index |= bank << 2; - (* convert_map[index]) (image, pixels, rowstride, cmap); - } -} - - -/* Exported functions */ - -/** - * gdk_pixbuf_get_from_drawable: - * @dest: Destination pixbuf, or NULL if a new pixbuf should be created. - * @src: Source drawable. - * @cmap: A colormap if @src is a pixmap. If it is a window, this argument will - * be ignored. - * @src_x: Source X coordinate within drawable. - * @src_y: Source Y coordinate within drawable. - * @dest_x: Destination X coordinate in pixbuf, or 0 if @dest is NULL. - * @dest_y: Destination Y coordinate in pixbuf, or 0 if @dest is NULL. - * @width: Width in pixels of region to get. - * @height: Height in pixels of region to get. - * - * Transfers image data from a Gdk drawable and converts it to an RGB(A) - * representation inside a GdkPixbuf. - * - * If the drawable @src is a pixmap, then a suitable colormap must be specified, - * since pixmaps are just blocks of pixel data without an associated colormap. - * If the drawable is a window, the @cmap argument will be ignored and the - * window's own colormap will be used instead. - * - * If the specified destination pixbuf @dest is #NULL, then this function will - * create an RGB pixbuf with 8 bits per channel and no alpha, with the same size - * specified by the @width and @height arguments. In this case, the @dest_x and - * @dest_y arguments must be specified as 0, otherwise the function will return - * #NULL. If the specified destination pixbuf is not NULL and it contains alpha - * information, then the filled pixels will be set to full opacity. - * - * If the specified drawable is a pixmap, then the requested source rectangle - * must be completely contained within the pixmap, otherwise the function will - * return #NULL. - * - * If the specified drawable is a window, then it must be viewable, i.e. all of - * its ancestors up to the root window must be mapped. Also, the specified - * source rectangle must be completely contained within the window and within - * the screen. If regions of the window are obscured by noninferior windows, the - * contents of those regions are undefined. The contents of regions obscured by - * inferior windows of a different depth than that of the source window will also - * be undefined. - * - * Return value: The same pixbuf as @dest if it was non-NULL, or a newly-created - * pixbuf with a reference count of 1 if no destination pixbuf was specified. - **/ -GdkPixbuf * -gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, - GdkDrawable *src, GdkColormap *cmap, - int src_x, int src_y, - int dest_x, int dest_y, - int width, int height) -{ - GdkWindowType window_type; - int src_width, src_height; - ArtPixBuf *apb = NULL; - GdkImage *image; - int rowstride, bpp, alpha; - - /* General sanity checks */ - - g_return_val_if_fail (src != NULL, NULL); - - window_type = gdk_window_get_type (src); - - if (window_type == GDK_WINDOW_PIXMAP) - g_return_val_if_fail (cmap != NULL, NULL); - else - /* FIXME: this is not perfect, since is_viewable() only tests - * recursively up the Gdk parent window tree, but stops at - * foreign windows or Gdk toplevels. I.e. if a window manager - * unmapped one of its own windows, this won't work. - */ - g_return_val_if_fail (gdk_window_is_viewable (src), NULL); - - if (!dest) - g_return_val_if_fail (dest_x == 0 && dest_y == 0, NULL); - else { - apb = dest->art_pixbuf; - - g_return_val_if_fail (apb->format == ART_PIX_RGB, NULL); - g_return_val_if_fail (apb->n_channels == 3 || apb->n_channels == 4, NULL); - g_return_val_if_fail (apb->bits_per_sample == 8, NULL); - } - - /* Coordinate sanity checks */ - - gdk_window_get_size (src, &src_width, &src_height); - - g_return_val_if_fail (src_x >= 0 && src_y >= 0, NULL); - g_return_val_if_fail (src_x + width <= src_width && src_y + height <= src_height, NULL); - - if (dest) { - g_return_val_if_fail (dest_x >= 0 && dest_y >= 0, NULL); - g_return_val_if_fail (dest_x + width <= apb->width, NULL); - g_return_val_if_fail (dest_y + height <= apb->height, NULL); - } - - if (window_type != GDK_WINDOW_PIXMAP) { - int ret; - int src_xorigin, src_yorigin; - int screen_width, screen_height; - int screen_srcx, screen_srcy; - - ret = gdk_window_get_origin (src, &src_xorigin, &src_yorigin); - g_return_val_if_fail (ret != FALSE, NULL); - - screen_width = gdk_screen_width (); - screen_height = gdk_screen_height (); - - screen_srcx = src_xorigin + src_x; - screen_srcy = src_yorigin + src_y; - - g_return_val_if_fail (screen_srcx >= 0 && screen_srcy >= 0, NULL); - g_return_val_if_fail (screen_srcx + width <= screen_width, NULL); - g_return_val_if_fail (screen_srcy + height <= screen_height, NULL); - } - - /* Get Image in ZPixmap format (packed bits). */ - image = gdk_image_get (src, src_x, src_y, width, height); - g_return_val_if_fail( image != NULL, NULL); - - /* Create the pixbuf if needed */ - if (!dest) { - dest = gdk_pixbuf_new (ART_PIX_RGB, FALSE, 8, width, height); - if (!dest) { - gdk_image_destroy(image); - return NULL; - } - - apb = dest->art_pixbuf; - } - - /* Get the colormap if needed */ - if (window_type != GDK_WINDOW_PIXMAP) - cmap = gdk_window_get_colormap (src); - - alpha = gdk_pixbuf_get_has_alpha(dest); - rowstride = gdk_pixbuf_get_rowstride(dest); - bpp = alpha?4:3; - - /* we offset into the image data based on the position we are retrieving from */ - rgbconvert(image, gdk_pixbuf_get_pixels(dest) + - (dest_y * rowstride) + (dest_x * bpp), - rowstride, - alpha, - cmap); - - gdk_image_destroy(image); - - return dest; -} diff --git a/gdk/gdkpixbuf-render.c b/gdk/gdkpixbuf-render.c deleted file mode 100644 index 19bf30deab..0000000000 --- a/gdk/gdkpixbuf-render.c +++ /dev/null @@ -1,382 +0,0 @@ -/* GdkPixbuf library - Rendering functions - * - * Copyright (C) 1999 The Free Software Foundation - * - * Author: Federico Mena-Quintero - * - * 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. - */ - -#include -#include -#include -#include "gdk-pixbuf.h" - - - -/** - * gdk_pixbuf_render_threshold_alpha: - * @pixbuf: A pixbuf. - * @bitmap: Bitmap where the bilevel mask will be painted to. - * @src_x: Source X coordinate. - * @src_y: source Y coordinate. - * @dest_x: Destination X coordinate. - * @dest_y: Destination Y coordinate. - * @width: Width of region to threshold. - * @height: Height of region to threshold. - * @alpha_threshold: Opacity values below this will be painted as zero; all - * other values will be painted as one. - * - * Takes the opacity values in a rectangular portion of a pixbuf and thresholds - * them to produce a bi-level alpha mask that can be used as a clipping mask for - * a drawable. - * - **/ -void -gdk_pixbuf_render_threshold_alpha (GdkPixbuf *pixbuf, GdkBitmap *bitmap, - int src_x, int src_y, - int dest_x, int dest_y, - int width, int height, - int alpha_threshold) -{ - ArtPixBuf *apb; - GdkGC *gc; - GdkColor color; - int x, y; - guchar *p; - int start, start_status; - int status; - - g_return_if_fail (pixbuf != NULL); - apb = pixbuf->art_pixbuf; - - g_return_if_fail (apb->format == ART_PIX_RGB); - g_return_if_fail (apb->n_channels == 3 || apb->n_channels == 4); - g_return_if_fail (apb->bits_per_sample == 8); - - g_return_if_fail (bitmap != NULL); - g_return_if_fail (width >= 0 && height >= 0); - g_return_if_fail (src_x >= 0 && src_x + width <= apb->width); - g_return_if_fail (src_y >= 0 && src_y + height <= apb->height); - - g_return_if_fail (alpha_threshold >= 0 && alpha_threshold <= 255); - - if (width == 0 || height == 0) - return; - - gc = gdk_gc_new (bitmap); - - if (!apb->has_alpha) { - color.pixel = (alpha_threshold == 255) ? 0 : 1; - gdk_gc_set_foreground (gc, &color); - gdk_draw_rectangle (bitmap, gc, TRUE, dest_x, dest_y, width, height); - gdk_gc_unref (gc); - return; - } - - color.pixel = 0; - gdk_gc_set_foreground (gc, &color); - gdk_draw_rectangle (bitmap, gc, TRUE, dest_x, dest_y, width, height); - - color.pixel = 1; - gdk_gc_set_foreground (gc, &color); - - for (y = 0; y < height; y++) { - p = (apb->pixels + (y + src_y) * apb->rowstride + src_x * apb->n_channels - + apb->n_channels - 1); - - start = 0; - start_status = *p < alpha_threshold; - - for (x = 0; x < width; x++) { - status = *p < alpha_threshold; - - if (status != start_status) { - if (!start_status) - gdk_draw_line (bitmap, gc, - start + dest_x, y + dest_y, - x - 1 + dest_x, y + dest_y); - - start = x; - start_status = status; - } - - p += apb->n_channels; - } - - if (!start_status) - gdk_draw_line (bitmap, gc, - start + dest_x, y + dest_y, - x - 1 + dest_x, y + dest_y); - } - - gdk_gc_unref (gc); -} - - - -/* Creates a buffer by stripping the alpha channel of a pixbuf */ -static guchar * -remove_alpha (ArtPixBuf *apb, int x, int y, int width, int height, int *rowstride) -{ - guchar *buf; - int xx, yy; - guchar *src, *dest; - - g_assert (apb->n_channels == 4); - g_assert (apb->has_alpha); - g_assert (width > 0 && height > 0); - g_assert (x >= 0 && x + width <= apb->width); - g_assert (y >= 0 && y + height <= apb->height); - - *rowstride = 4 * ((width * 3 + 3) / 4); - - buf = g_new (guchar, *rowstride * height); - - for (yy = 0; yy < height; yy++) { - src = apb->pixels + apb->rowstride * (yy + y) + x * apb->n_channels; - dest = buf + *rowstride * yy; - - for (xx = 0; xx < width; xx++) { - *dest++ = *src++; - *dest++ = *src++; - *dest++ = *src++; - src++; - } - } - - return buf; -} - -/** - * gdk_pixbuf_render_to_drawable: - * @pixbuf: A pixbuf. - * @drawable: Destination drawable. - * @gc: GC used for rendering. - * @src_x: Source X coordinate within pixbuf. - * @src_y: Source Y coordinate within pixbuf. - * @dest_x: Destination X coordinate within drawable. - * @dest_y: Destination Y coordinate within drawable. - * @width: Width of region to render, in pixels. - * @height: Height of region to render, in pixels. - * @dither: Dithering mode for GdkRGB. - * @x_dither: X offset for dither. - * @y_dither: Y offset for dither. - * - * Renders a rectangular portion of a pixbuf to a drawable while using the - * specified GC. This is done using GdkRGB, so the specified drawable must have - * the GdkRGB visual and colormap. Note that this function will ignore the - * opacity information for images with an alpha channel; the GC must already - * have the clipping mask set if you want transparent regions to show through. - * - * For an explanation of dither offsets, see the GdkRGB documentation. In - * brief, the dither offset is important when re-rendering partial regions of an - * image to a rendered version of the full image, or for when the offsets to a - * base position change, as in scrolling. The dither matrix has to be shifted - * for consistent visual results. If you do not have any of these cases, the - * dither offsets can be both zero. - **/ -void -gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, - GdkDrawable *drawable, GdkGC *gc, - int src_x, int src_y, - int dest_x, int dest_y, - int width, int height, - GdkRgbDither dither, - int x_dither, int y_dither) -{ - ArtPixBuf *apb; - guchar *buf; - int rowstride; - - g_return_if_fail (pixbuf != NULL); - apb = pixbuf->art_pixbuf; - - g_return_if_fail (apb->format == ART_PIX_RGB); - g_return_if_fail (apb->n_channels == 3 || apb->n_channels == 4); - g_return_if_fail (apb->bits_per_sample == 8); - - g_return_if_fail (drawable != NULL); - g_return_if_fail (gc != NULL); - - g_return_if_fail (width >= 0 && height >= 0); - g_return_if_fail (src_x >= 0 && src_x + width <= apb->width); - g_return_if_fail (src_y >= 0 && src_y + height <= apb->height); - - if (width == 0 || height == 0) - return; - - /* This will have to be modified once libart supports other image types. - * Also, GdkRGB does not have gdk_draw_rgb_32_image_dithalign(), so we - * have to pack the buffer first. - */ - - if (apb->has_alpha) - buf = remove_alpha (apb, src_x, src_y, width, height, &rowstride); - else { - buf = apb->pixels + src_y * apb->rowstride + src_x * 3; - rowstride = apb->rowstride; - } - - gdk_draw_rgb_image_dithalign (drawable, gc, - dest_x, dest_y, - width, height, - dither, - buf, rowstride, - x_dither, y_dither); - - if (apb->has_alpha) - g_free (buf); -} - - - -/** - * gdk_pixbuf_render_to_drawable_alpha: - * @pixbuf: A pixbuf. - * @drawable: Destination drawable. - * @src_x: Source X coordinate within pixbuf. - * @src_y: Source Y coordinates within pixbuf. - * @dest_x: Destination X coordinate within drawable. - * @dest_y: Destination Y coordinate within drawable. - * @width: Width of region to render, in pixels. - * @height: Height of region to render, in pixels. - * @alpha_mode: If the image does not have opacity information, this is ignored. - * Otherwise, specifies how to handle transparency when rendering. - * @alpha_threshold: If the image does have opacity information and @alpha_mode - * is GDK_PIXBUF_ALPHA_BILEVEL, specifies the threshold value for opacity - * values. - * @dither: Dithering mode for GdkRGB. - * @x_dither: X offset for dither. - * @y_dither: Y offset for dither. - * - * Renders a rectangular portion of a pixbuf to a drawable. This is done using - * GdkRGB, so the specified drawable must have the GdkRGB visual and colormap. - * - * When used with #GDK_PIXBUF_ALPHA_BILEVEL, this function has to create a bitmap - * out of the thresholded alpha channel of the image and, it has to set this - * bitmap as the clipping mask for the GC used for drawing. This can be a - * significant performance penalty depending on the size and the complexity of - * the alpha channel of the image. If performance is crucial, consider handling - * the alpha channel yourself (possibly by caching it in your application) and - * using gdk_pixbuf_render_to_drawable() or GdkRGB directly instead. - **/ -void -gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, GdkDrawable *drawable, - int src_x, int src_y, - int dest_x, int dest_y, - int width, int height, - GdkPixbufAlphaMode alpha_mode, - int alpha_threshold, - GdkRgbDither dither, - int x_dither, int y_dither) -{ - ArtPixBuf *apb; - GdkBitmap *bitmap = NULL; - GdkGC *gc; - - g_return_if_fail (pixbuf != NULL); - apb = pixbuf->art_pixbuf; - - g_return_if_fail (apb->format == ART_PIX_RGB); - g_return_if_fail (apb->n_channels == 3 || apb->n_channels == 4); - g_return_if_fail (apb->bits_per_sample == 8); - - g_return_if_fail (drawable != NULL); - g_return_if_fail (width >= 0 && height >= 0); - g_return_if_fail (src_x >= 0 && src_x + width <= apb->width); - g_return_if_fail (src_y >= 0 && src_y + height <= apb->height); - - if (width == 0 || height == 0) - return; - - gc = gdk_gc_new (drawable); - - if (apb->has_alpha) { - /* Right now we only support GDK_PIXBUF_ALPHA_BILEVEL, so we - * unconditionally create the clipping mask. - */ - - bitmap = gdk_pixmap_new (NULL, width, height, 1); - gdk_pixbuf_render_threshold_alpha (pixbuf, bitmap, - src_x, src_y, - 0, 0, - width, height, - alpha_threshold); - - gdk_gc_set_clip_mask (gc, bitmap); - gdk_gc_set_clip_origin (gc, dest_x, dest_y); - } - - gdk_pixbuf_render_to_drawable (pixbuf, drawable, gc, - src_x, src_y, - dest_x, dest_y, - width, height, - dither, - x_dither, y_dither); - - if (bitmap) - gdk_bitmap_unref (bitmap); - gdk_gc_unref (gc); -} - -/** - * gdk_pixbuf_render_pixmap_and_mask: - * @pixbuf: A pixbuf - * @pixmap_return: Return value for the created pixmap. - * @mask_return: Return value for the created mask. - * @alpha_threshold: Threshold value for opacity values. - * - * Creates a pixmap and a mask bitmap which are returned in the @pixmap_return - * and @mask_return arguments, respectively, and renders a pixbuf and its - * corresponding tresholded alpha mask to them. This is merely a convenience - * function; applications that need to render pixbufs with dither offsets or to - * given drawables should use gdk_pixbuf_render_to_drawable_alpha() or - * gdk_pixbuf_render_to_drawable(), and gdk_pixbuf_render_threshold_alpha(). - **/ -void -gdk_pixbuf_render_pixmap_and_mask (GdkPixbuf *pixbuf, - GdkPixmap **pixmap_return, GdkBitmap **mask_return, - int alpha_threshold) -{ - ArtPixBuf *apb; - - g_return_if_fail (pixbuf != NULL); - - apb = pixbuf->art_pixbuf; - - if (pixmap_return) { - GdkGC *gc; - - *pixmap_return = gdk_pixmap_new (NULL, apb->width, apb->height, - gdk_rgb_get_visual ()->depth); - gc = gdk_gc_new (*pixmap_return); - gdk_pixbuf_render_to_drawable (pixbuf, *pixmap_return, gc, - 0, 0, 0, 0, - apb->width, apb->height, - GDK_RGB_DITHER_NORMAL, - 0, 0); - gdk_gc_unref (gc); - } - - if (mask_return) { - *mask_return = gdk_pixmap_new (NULL, apb->width, apb->height, 1); - gdk_pixbuf_render_threshold_alpha (pixbuf, *mask_return, - 0, 0, 0, 0, - apb->width, apb->height, - alpha_threshold); - } -} diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h index 900339b68d..3878e3420d 100644 --- a/gdk/gdktypes.h +++ b/gdk/gdktypes.h @@ -30,6 +30,7 @@ /* GDK uses "glib". (And so does GTK). */ #include +#include #ifdef G_OS_WIN32 # ifdef GDK_COMPILATION diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index efe2fe57ae..48dd02f1c4 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -99,7 +99,11 @@ static void gdk_window_draw_lines (GdkDrawable *drawable, GdkGC *gc, GdkPoint *points, gint npoints); - +static void gdk_window_draw_layout (GdkDrawable *drawable, + GdkGC *gc, + gint x, + gint y, + PangoLayout *layout); /* All drawing operations on windows are forwarded through the following * class to enable the automatic-backing-store feature. @@ -115,7 +119,8 @@ GdkDrawableClass _gdk_window_class = { gdk_window_draw_drawable, gdk_window_draw_points, gdk_window_draw_segments, - gdk_window_draw_lines + gdk_window_draw_lines, + gdk_window_draw_layout }; GdkWindow * @@ -917,6 +922,29 @@ gdk_window_draw_lines (GdkDrawable *drawable, RESTORE_GC (gc); } +static void +gdk_window_draw_layout (GdkDrawable *drawable, + GdkGC *gc, + gint x, + gint y, + PangoLayout *layout) +{ + GdkWindowPrivate *private = (GdkWindowPrivate *)drawable; + + OFFSET_GC (gc); + + if (private->paint_stack) + { + GdkWindowPaint *paint = private->paint_stack->data; + gdk_draw_layout (paint->pixmap, gc, x - x_offset, y - y_offset, layout); + } + else + _gdk_windowing_window_class.draw_layout (drawable, gc, + x - x_offset, y - y_offset, layout); + + RESTORE_GC (gc); +} + /* Fixme - this is just like gdk_window_paint_init_bg */ static void gdk_window_clear_backing_rect (GdkWindow *window, diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am index a201cdb153..2cd04c1dd3 100644 --- a/gdk/x11/Makefile.am +++ b/gdk/x11/Makefile.am @@ -1,5 +1,7 @@ ## Process this file with automake to produce Makefile.in +libgdkincludedir = $(includedir)/gdk + INCLUDES = @STRIP_BEGIN@ \ -DG_LOG_DOMAIN=\"Gdk\" \ -I$(top_srcdir) \ @@ -8,6 +10,7 @@ INCLUDES = @STRIP_BEGIN@ \ @GTK_DEBUG_FLAGS@ \ @GTK_XIM_FLAGS@ \ @GTK_LOCALE_FLAGS@ \ + @PANGO_CFLAGS@ \ @GLIB_CFLAGS@ \ @x_cflags@ \ @STRIP_END@ @@ -52,9 +55,12 @@ libgdk_x11_la_SOURCES = \ gdkimage-x11.c \ gdkinput.c \ gdkmain-x11.c \ + gdkpango-x11.c \ gdkpixmap-x11.c \ gdkproperty-x11.c \ + gdkpoly-generic.h \ gdkpolyreg-generic.c \ + gdkregion-generic.h \ gdkregion-generic.c \ gdkselection-x11.c \ gdkvisual-x11.c \ @@ -68,7 +74,7 @@ libgdk_x11_la_SOURCES = \ gdkinputprivate.h \ $(xinput_sources) -INCLUDE_HEADERS = \ +libgdkinclude_HEADERS = \ gdkx.h EXTRA_PROGRAMS = gxid diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c index 5caa7a1351..c5218f022f 100644 --- a/gdk/x11/gdkdrawable-x11.c +++ b/gdk/x11/gdkdrawable-x11.c @@ -25,65 +25,72 @@ */ #include "gdkprivate-x11.h" +#include -static void gdk_x11_drawable_destroy (GdkDrawable *drawable); +static void gdk_x11_drawable_destroy (GdkDrawable *drawable); -static void gdk_x11_draw_rectangle (GdkDrawable *drawable, - GdkGC *gc, - gint filled, - gint x, - gint y, - gint width, - gint height); -static void gdk_x11_draw_arc (GdkDrawable *drawable, - GdkGC *gc, - gint filled, - gint x, - gint y, - gint width, - gint height, - gint angle1, - gint angle2); -static void gdk_x11_draw_polygon (GdkDrawable *drawable, - GdkGC *gc, - gint filled, - GdkPoint *points, - gint npoints); -static void gdk_x11_draw_text (GdkDrawable *drawable, - GdkFont *font, - GdkGC *gc, - gint x, - gint y, - const gchar *text, - gint text_length); -static void gdk_x11_draw_text_wc (GdkDrawable *drawable, - GdkFont *font, - GdkGC *gc, - gint x, - gint y, - const GdkWChar *text, - gint text_length); -static void gdk_x11_draw_drawable (GdkDrawable *drawable, - GdkGC *gc, - GdkPixmap *src, - gint xsrc, - gint ysrc, - gint xdest, - gint ydest, - gint width, - gint height); -static void gdk_x11_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints); -static void gdk_x11_draw_segments (GdkDrawable *drawable, - GdkGC *gc, - GdkSegment *segs, - gint nsegs); -static void gdk_x11_draw_lines (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints); +static void gdk_x11_draw_rectangle (GdkDrawable *drawable, + GdkGC *gc, + gint filled, + gint x, + gint y, + gint width, + gint height); +static void gdk_x11_draw_arc (GdkDrawable *drawable, + GdkGC *gc, + gint filled, + gint x, + gint y, + gint width, + gint height, + gint angle1, + gint angle2); +static void gdk_x11_draw_polygon (GdkDrawable *drawable, + GdkGC *gc, + gint filled, + GdkPoint *points, + gint npoints); +static void gdk_x11_draw_text (GdkDrawable *drawable, + GdkFont *font, + GdkGC *gc, + gint x, + gint y, + const gchar *text, + gint text_length); +static void gdk_x11_draw_text_wc (GdkDrawable *drawable, + GdkFont *font, + GdkGC *gc, + gint x, + gint y, + const GdkWChar *text, + gint text_length); +static void gdk_x11_draw_drawable (GdkDrawable *drawable, + GdkGC *gc, + GdkPixmap *src, + gint xsrc, + gint ysrc, + gint xdest, + gint ydest, + gint width, + gint height); +static void gdk_x11_draw_points (GdkDrawable *drawable, + GdkGC *gc, + GdkPoint *points, + gint npoints); +static void gdk_x11_draw_segments (GdkDrawable *drawable, + GdkGC *gc, + GdkSegment *segs, + gint nsegs); +static void gdk_x11_draw_lines (GdkDrawable *drawable, + GdkGC *gc, + GdkPoint *points, + gint npoints); + +static void gdk_x11_draw_layout (GdkDrawable *drawable, + GdkGC *gc, + gint x, + gint y, + PangoLayout *layout); GdkDrawableClass _gdk_x11_drawable_class = { @@ -97,7 +104,8 @@ GdkDrawableClass _gdk_x11_drawable_class = { gdk_x11_draw_drawable, gdk_x11_draw_points, gdk_x11_draw_segments, - gdk_x11_draw_lines + gdk_x11_draw_lines, + gdk_x11_draw_layout }; /***************************************************** @@ -471,3 +479,16 @@ gdk_x11_draw_lines (GdkDrawable *drawable, g_free (tmp_points); } + +static void +gdk_x11_draw_layout (GdkDrawable *drawable, + GdkGC *gc, + gint x, + gint y, + PangoLayout *layout) +{ + pango_x_render_layout (GDK_DRAWABLE_XDISPLAY (drawable), + GDK_DRAWABLE_XID (drawable), + GDK_GC_XGC (gc), + layout, x, y); +} diff --git a/gdk/x11/gdkpango-x11.c b/gdk/x11/gdkpango-x11.c new file mode 100644 index 0000000000..235213a8c1 --- /dev/null +++ b/gdk/x11/gdkpango-x11.c @@ -0,0 +1,134 @@ +/* GDK - The GIMP Drawing Kit + * 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 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. + */ + +#include "gdkprivate-x11.h" +#include "gdkpango.h" +#include + +#define GDK_INFO_KEY "gdk-info" + +typedef struct _GdkPangoXInfo GdkPangoXInfo; + +struct _GdkPangoXInfo +{ + GdkColormap *colormap; +}; + +static void +gdk_pango_context_destroy (GdkPangoXInfo *info) +{ + gdk_colormap_unref (info->colormap); + g_free (info); +} + +GC +duplicate_gc (Display *display, + Drawable drawable, + GC orig) +{ + GC result = XCreateGC (display, drawable, 0, NULL); + + XCopyGC (display, orig, ~((~1) << GCLastBit), result); + + return result; +} + +GC +gdk_pango_get_gc_func (PangoContext *context, + PangoAttrColor *fg_color, + GC base_gc) +{ + GdkPangoXInfo *info; + GdkColormap *colormap; + GdkColor color; + GC result; + + g_return_val_if_fail (context != NULL, NULL); + + info = pango_context_get_data (context, GDK_INFO_KEY); + g_return_val_if_fail (info != NULL, NULL); + + if (info->colormap) + colormap = info->colormap; + else + colormap = gdk_colormap_get_system(); + + /* FIXME. FIXME. FIXME. Only works for true color */ + + color.red = fg_color->red; + color.green = fg_color->green; + color.blue = fg_color->blue; + + if (gdk_colormap_alloc_color (colormap, &color, FALSE, TRUE)) + { + GC result = duplicate_gc (GDK_DISPLAY (), GDK_ROOT_WINDOW (), base_gc); + XSetForeground (GDK_DISPLAY (), result, color.pixel); + + return result; + } + else + return duplicate_gc (GDK_DISPLAY (), GDK_ROOT_WINDOW (), base_gc); + + return result; +} + +void +gdk_pango_free_gc_func (PangoContext *context, + GC gc) +{ + XFreeGC (GDK_DISPLAY (), gc); +} + +PangoContext * +gdk_pango_context_get (void) +{ + GdkPangoXInfo *info = g_new (GdkPangoXInfo, 1); + + PangoContext *result = pango_x_get_context (GDK_DISPLAY ()); + pango_context_set_data (result, GDK_INFO_KEY, + info, (GDestroyNotify)gdk_pango_context_destroy); + + pango_x_context_set_funcs (result, gdk_pango_get_gc_func, gdk_pango_free_gc_func); + info->colormap = NULL; + + return result; +} + +void +gdk_pango_context_set_colormap (PangoContext *context, + GdkColormap *colormap) +{ + GdkPangoXInfo *info; + + g_return_if_fail (context != NULL); + + info = pango_context_get_data (context, GDK_INFO_KEY); + g_return_if_fail (info != NULL); + + if (info->colormap != colormap) + { + if (info->colormap) + gdk_colormap_unref (info->colormap); + + info->colormap = colormap; + + if (info->colormap) + gdk_colormap_ref (info->colormap); + } +} diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 50b77f76c3..3d568eb88c 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -13,6 +13,7 @@ INCLUDES = @STRIP_BEGIN@ \ @GTK_DEBUG_FLAGS@ \ @GTK_XIM_FLAGS@ \ @GTK_LOCALE_FLAGS@ \ + @PANGO_CFLAGS@ \ @GLIB_CFLAGS@ \ @x_cflags@ \ @STRIP_END@ @@ -29,6 +30,7 @@ libgtk_la_LDFLAGS = @STRIP_BEGIN@ \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -release $(LT_RELEASE) \ -export-dynamic \ + @PANGO_LIBS@ \ @GLIB_DEPLIBS@ \ @x_ldflags@ \ @x_libs@ \ @@ -444,6 +446,7 @@ LDADDS = @STRIP_BEGIN@ \ @x_ldflags@ \ @x_libs@ \ @GDK_WLIBS@ \ + @PANGO_LIBS@ \ @GLIB_LIBS@ \ @GTK_LIBS_EXTRA@ \ -lm \ diff --git a/gtk/gdk-pixbuf-loader.c b/gtk/gdk-pixbuf-loader.c deleted file mode 100644 index 777b767d14..0000000000 --- a/gtk/gdk-pixbuf-loader.c +++ /dev/null @@ -1,509 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* GdkPixbuf library - Main header file - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Mark Crichton - * Miguel de Icaza - * Federico Mena-Quintero - * Jonathan Blandford - * - * 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. - */ - -#include -#include -#include "gdk-pixbuf-loader.h" -#include "gdk-pixbuf-io.h" - - - -enum { - AREA_UPDATED, - AREA_PREPARED, - FRAME_DONE, - ANIMATION_DONE, - CLOSED, - LAST_SIGNAL -}; - -static GtkObjectClass *parent_class; - -static void gdk_pixbuf_loader_class_init (GdkPixbufLoaderClass *klass); -static void gdk_pixbuf_loader_init (GdkPixbufLoader *loader); -static void gdk_pixbuf_loader_destroy (GtkObject *loader); -static void gdk_pixbuf_loader_finalize (GtkObject *loader); - -static guint pixbuf_loader_signals[LAST_SIGNAL] = { 0 }; - - - -/* Internal data */ - -#define LOADER_HEADER_SIZE 128 - -typedef struct { - GdkPixbuf *pixbuf; - GdkPixbufAnimation *animation; - gboolean closed; - guchar header_buf[LOADER_HEADER_SIZE]; - gint header_buf_offset; - GdkPixbufModule *image_module; - gpointer context; -} GdkPixbufLoaderPrivate; - - - -/* our marshaller */ -typedef void (* GtkSignal_NONE__INT_INT_INT_INT) (GtkObject *object, - gint arg1, gint arg2, gint arg3, gint arg4, - gpointer user_data); -static void -gtk_marshal_NONE__INT_INT_INT_INT (GtkObject *object, GtkSignalFunc func, gpointer func_data, - GtkArg * args) -{ - GtkSignal_NONE__INT_INT_INT_INT rfunc; - - rfunc = (GtkSignal_NONE__INT_INT_INT_INT) func; - (*rfunc) (object, - GTK_VALUE_INT (args[0]), - GTK_VALUE_INT (args[1]), - GTK_VALUE_INT (args[2]), - GTK_VALUE_INT (args[3]), - func_data); -} - - - -/** - * gdk_pixbuf_loader_get_type: - * @void: - * - * Registers the #GdkPixubfLoader class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the #GdkPixbufLoader class. - **/ -GtkType -gdk_pixbuf_loader_get_type (void) -{ - static GtkType loader_type = 0; - - if (!loader_type) { - static const GtkTypeInfo loader_info = { - "GdkPixbufLoader", - sizeof (GdkPixbufLoader), - sizeof (GdkPixbufLoaderClass), - (GtkClassInitFunc) gdk_pixbuf_loader_class_init, - (GtkObjectInitFunc) gdk_pixbuf_loader_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - loader_type = gtk_type_unique (GTK_TYPE_OBJECT, &loader_info); - } - - return loader_type; -} - -static void -gdk_pixbuf_loader_class_init (GdkPixbufLoaderClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - - parent_class = gtk_type_class (gtk_object_get_type ()); - - pixbuf_loader_signals[AREA_PREPARED] = - gtk_signal_new ("area_prepared", - GTK_RUN_LAST, - parent_class->type, - GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, area_prepared), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - pixbuf_loader_signals[AREA_UPDATED] = - gtk_signal_new ("area_updated", - GTK_RUN_LAST, - parent_class->type, - GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, area_updated), - gtk_marshal_NONE__INT_INT_INT_INT, - GTK_TYPE_NONE, 4, - GTK_TYPE_INT, - GTK_TYPE_INT, - GTK_TYPE_INT, - GTK_TYPE_INT); - - pixbuf_loader_signals[FRAME_DONE] = - gtk_signal_new ("frame_done", - GTK_RUN_LAST, - parent_class->type, - GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, frame_done), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - pixbuf_loader_signals[ANIMATION_DONE] = - gtk_signal_new ("animation_done", - GTK_RUN_LAST, - parent_class->type, - GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, animation_done), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - pixbuf_loader_signals[CLOSED] = - gtk_signal_new ("closed", - GTK_RUN_LAST, - parent_class->type, - GTK_SIGNAL_OFFSET (GdkPixbufLoaderClass, closed), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, pixbuf_loader_signals, LAST_SIGNAL); - - object_class->destroy = gdk_pixbuf_loader_destroy; - object_class->finalize = gdk_pixbuf_loader_finalize; -} - -static void -gdk_pixbuf_loader_init (GdkPixbufLoader *loader) -{ - GdkPixbufLoaderPrivate *priv; - - priv = g_new0 (GdkPixbufLoaderPrivate, 1); - loader->private = priv; -} - -static void -gdk_pixbuf_loader_destroy (GtkObject *object) -{ - GdkPixbufLoader *loader; - GdkPixbufLoaderPrivate *priv = NULL; - - g_return_if_fail (object != NULL); - g_return_if_fail (GDK_IS_PIXBUF_LOADER (object)); - - loader = GDK_PIXBUF_LOADER (object); - priv = loader->private; - - if (!priv->closed) - gdk_pixbuf_loader_close (loader); - - if (priv->animation) - gdk_pixbuf_animation_unref (priv->animation); - if (priv->pixbuf) - gdk_pixbuf_unref (priv->pixbuf); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -gdk_pixbuf_loader_finalize (GtkObject *object) -{ - GdkPixbufLoader *loader; - GdkPixbufLoaderPrivate *priv = NULL; - - loader = GDK_PIXBUF_LOADER (object); - priv = loader->private; - - g_free (priv); - - if (GTK_OBJECT_CLASS (parent_class)->finalize) - (* GTK_OBJECT_CLASS (parent_class)->finalize) (object); -} - -static void -gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf, gpointer loader) -{ - GdkPixbufLoaderPrivate *priv = NULL; - - priv = GDK_PIXBUF_LOADER (loader)->private; - gdk_pixbuf_ref (pixbuf); - g_assert (priv->pixbuf == NULL); - - priv->pixbuf = pixbuf; - gtk_signal_emit (GTK_OBJECT (loader), pixbuf_loader_signals[AREA_PREPARED]); -} - -static void -gdk_pixbuf_loader_update (GdkPixbuf *pixbuf, guint x, guint y, guint width, guint height, gpointer loader) -{ - GdkPixbufLoaderPrivate *priv = NULL; - - priv = GDK_PIXBUF_LOADER (loader)->private; - - gtk_signal_emit (GTK_OBJECT (loader), - pixbuf_loader_signals[AREA_UPDATED], - x, y, - /* sanity check in here. Defend against an errant loader */ - MIN (width, gdk_pixbuf_get_width (priv->pixbuf)), - MIN (height, gdk_pixbuf_get_height (priv->pixbuf))); -} - -static void -gdk_pixbuf_loader_frame_done (GdkPixbufFrame *frame, gpointer loader) -{ - GdkPixbufLoaderPrivate *priv = NULL; - - priv = GDK_PIXBUF_LOADER (loader)->private; - - priv->pixbuf = NULL; - - if (priv->animation == NULL) { - priv->animation = g_new0 (GdkPixbufAnimation, 1); - priv->animation->n_frames = 0; - priv->animation->ref_count = 1; - priv->animation->width = gdk_pixbuf_get_width (frame->pixbuf); - priv->animation->height = gdk_pixbuf_get_height (frame->pixbuf); - } else { - int w, h; - - /* update bbox size */ - w = gdk_pixbuf_get_width (frame->pixbuf); - h = gdk_pixbuf_get_height (frame->pixbuf); - - if (w > priv->animation->width) { - priv->animation->width = h; - } - if (h > priv->animation->height) { - priv->animation->height = h; - } - } - - priv->animation->frames = g_list_append (priv->animation->frames, frame); - priv->animation->n_frames ++; - gtk_signal_emit (GTK_OBJECT (loader), - pixbuf_loader_signals[FRAME_DONE], - frame); -} - -static void -gdk_pixbuf_loader_animation_done (GdkPixbuf *pixbuf, gpointer loader) -{ - gtk_signal_emit (GTK_OBJECT (loader), - pixbuf_loader_signals[ANIMATION_DONE]); -} - - - -/** - * gdk_pixbuf_loader_new: - * - * Creates a new pixbuf loader object. - * - * Return value: A newly-created pixbuf loader. - **/ -GdkPixbufLoader * -gdk_pixbuf_loader_new (void) -{ - return gtk_type_new (gdk_pixbuf_loader_get_type ()); -} - -static int -gdk_pixbuf_loader_load_module(GdkPixbufLoader *loader) -{ - GdkPixbufLoaderPrivate *priv = loader->private; - - priv->image_module = gdk_pixbuf_get_module (priv->header_buf, priv->header_buf_offset); - - if (priv->image_module == NULL) - return 0; - - if (priv->image_module->module == NULL) - gdk_pixbuf_load_module (priv->image_module); - - if (priv->image_module->module == NULL) - return 0; - - if ((priv->image_module->begin_load == NULL) || - (priv->image_module->stop_load == NULL) || - (priv->image_module->load_increment == NULL)) { - g_warning ("module %s does not support incremental loading.\n", - priv->image_module->module_name); - return 0; - } - - priv->context = (*priv->image_module->begin_load) (gdk_pixbuf_loader_prepare, - gdk_pixbuf_loader_update, - gdk_pixbuf_loader_frame_done, - gdk_pixbuf_loader_animation_done, - loader); - - if (priv->context == NULL) { - g_warning("Failed to begin progressive load"); - return 0; - } - - if( (* priv->image_module->load_increment) (priv->context, priv->header_buf, priv->header_buf_offset) ) - return priv->header_buf_offset; - - return 0; -} - -static int -gdk_pixbuf_loader_eat_header_write (GdkPixbufLoader *loader, const guchar *buf, size_t count) -{ - int nbytes; - GdkPixbufLoaderPrivate *priv = loader->private; - - nbytes = MIN(LOADER_HEADER_SIZE - priv->header_buf_offset, count); - memcpy (priv->header_buf + priv->header_buf_offset, buf, nbytes); - - priv->header_buf_offset += nbytes; - - if(priv->header_buf_offset >= LOADER_HEADER_SIZE) { - if (gdk_pixbuf_loader_load_module(loader) == 0) - return 0; - } - return nbytes; -} - -/** - * gdk_pixbuf_loader_write: - * @loader: A pixbuf loader. - * @buf: Pointer to image data. - * @count: Length of the @buf buffer in bytes. - * - * This will cause a pixbuf loader to parse the next @count bytes of an image. - * It will return TRUE if the data was loaded successfully, and FALSE if an - * error occurred. In the latter case, the loader will be closed, and will not - * accept further writes. - * - * Return value: #TRUE if the write was successful, or #FALSE if the loader - * cannot parse the buffer. - **/ -gboolean -gdk_pixbuf_loader_write (GdkPixbufLoader *loader, const guchar *buf, size_t count) -{ - GdkPixbufLoaderPrivate *priv; - - g_return_val_if_fail (loader != NULL, FALSE); - g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), FALSE); - - g_return_val_if_fail (buf != NULL, FALSE); - g_return_val_if_fail (count >= 0, FALSE); - - priv = loader->private; - - /* we expect it's not to be closed */ - g_return_val_if_fail (priv->closed == FALSE, FALSE); - - if (priv->image_module == NULL) { - int eaten; - - eaten = gdk_pixbuf_loader_eat_header_write(loader, buf, count); - if (eaten <= 0) - return FALSE; - - count -= eaten; - buf += eaten; - } - - if (count > 0 && priv->image_module->load_increment) - return (* priv->image_module->load_increment) (priv->context, buf, count); - - return TRUE; -} - -/** - * gdk_pixbuf_loader_get_pixbuf: - * @loader: A pixbuf loader. - * - * Queries the GdkPixbuf that a pixbuf loader is currently creating. In general - * it only makes sense to call this function afer the "area_prepared" signal has - * been emitted by the loader; this means that enough data has been read to know - * the size of the image that will be allocated. If the loader has not received - * enough data via gdk_pixbuf_loader_write(), then this function returns NULL. - * The returned pixbuf will be the same in all future calls to the loader, so - * simply calling gdk_pixbuf_ref() should be sufficient to continue using it. - * - * Return value: The GdkPixbuf that the loader is creating, or NULL if not - * enough data has been read to determine how to create the image buffer. - **/ -GdkPixbuf * -gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader) -{ - GdkPixbufLoaderPrivate *priv; - - g_return_val_if_fail (loader != NULL, NULL); - g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), NULL); - - priv = loader->private; - - return priv->pixbuf; -} - -/** - * gdk_pixbuf_loader_get_animation: - * @loader: A pixbuf loader - * - * Queries the GdkPixbufAnimation that a pixbuf loader is currently creating. - * In general it only makes sense to call this function afer the "area_prepared" - * signal has been emitted by the loader. If the image is not an animation, - * then it will return NULL. - * - * Return value: The GdkPixbufAnimation that the loader is loading, or NULL if - not enough data has been read to determine the information. - **/ -GdkPixbufAnimation * -gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader) -{ - GdkPixbufLoaderPrivate *priv; - - g_return_val_if_fail (loader != NULL, NULL); - g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), NULL); - - priv = loader->private; - - return priv->animation; -} - -/** - * gdk_pixbuf_loader_close: - * @loader: A pixbuf loader. - * - * Informs a pixbuf loader that no further writes with gdk_pixbuf_load_write() - * will occur, so that it can free its internal loading structures. - **/ -void -gdk_pixbuf_loader_close (GdkPixbufLoader *loader) -{ - GdkPixbufLoaderPrivate *priv; - - g_return_if_fail (loader != NULL); - g_return_if_fail (GDK_IS_PIXBUF_LOADER (loader)); - - priv = loader->private; - - /* we expect it's not closed */ - g_return_if_fail (priv->closed == FALSE); - - /* We have less the 128 bytes in the image. Flush it, and keep going. */ - if (priv->image_module == NULL) - gdk_pixbuf_loader_load_module (loader); - - if (priv->image_module && priv->image_module->stop_load) - (* priv->image_module->stop_load) (priv->context); - - priv->closed = TRUE; - - gtk_signal_emit (GTK_OBJECT (loader), - pixbuf_loader_signals[CLOSED]); -} - diff --git a/gtk/gdk-pixbuf-loader.h b/gtk/gdk-pixbuf-loader.h deleted file mode 100644 index 9f9a79dc25..0000000000 --- a/gtk/gdk-pixbuf-loader.h +++ /dev/null @@ -1,88 +0,0 @@ -/* GdkPixbuf library - Main header file - * - * Copyright (C) 1999 The Free Software Foundation - * - * Authors: Mark Crichton - * Miguel de Icaza - * Federico Mena-Quintero - * Jonathan Blandford - * - * 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 GDK_PIXBUF_LOADER_H -#define GDK_PIXBUF_LOADER_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - - -#define GDK_TYPE_PIXBUF_LOADER (gdk_pixbuf_loader_get_type ()) -#define GDK_PIXBUF_LOADER(obj) (GTK_CHECK_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoader)) -#define GDK_PIXBUF_LOADER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, GdkPixbufLoaderClass)) -#define GDK_IS_PIXBUF_LOADER(obj) (GTK_CHECK_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER)) -#define GDK_IS_PIXBUF_LOADER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER)) - - -typedef struct _GdkPixbufLoader GdkPixbufLoader; -struct _GdkPixbufLoader -{ - GtkObject object; - - /* < Private > */ - gpointer private; -}; - -typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass; -struct _GdkPixbufLoaderClass { - GtkObjectClass parent_class; - - void (* area_prepared) (GdkPixbufLoader *loader); - - void (* area_updated) (GdkPixbufLoader *loader, - guint x, guint y, guint width, guint height); - - void (* frame_done) (GdkPixbufLoader *loader, GdkPixbufFrame *frame); - - void (* animation_done) (GdkPixbufLoader *loader); - - void (* closed) (GdkPixbufLoader *loader); -}; - - - -GtkType gdk_pixbuf_loader_get_type (void); -GdkPixbufLoader *gdk_pixbuf_loader_new (void); -gboolean gdk_pixbuf_loader_write (GdkPixbufLoader *loader, - const guchar *buf, - size_t count); -GdkPixbuf *gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader); -GdkPixbufAnimation *gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader); -void gdk_pixbuf_loader_close (GdkPixbufLoader *loader); - - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index 19de8a8bfd..df1dcdff9a 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -279,6 +279,10 @@ gtk_check_button_size_allocate (GtkWidget *widget, GTK_CONTAINER (widget)->border_width - 1); child_allocation.height = MAX (1, allocation->height - (GTK_CONTAINER (widget)->border_width + 1) * 2); + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) + child_allocation.x = allocation->x + allocation->width + - (child_allocation.x - allocation->x + child_allocation.width); + gtk_widget_size_allocate (GTK_BIN (button)->child, &child_allocation); } } @@ -386,9 +390,11 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button, new_area.x, new_area.y, new_area.width, new_area.height); } - - x = widget->allocation.x + CHECK_BUTTON_CLASS (widget)->indicator_spacing + GTK_CONTAINER (widget)->border_width; - y = widget->allocation.y + (widget->allocation.height - CHECK_BUTTON_CLASS (widget)->indicator_size) / 2; + + /* FIXME: What is the + 1 doing here? + */ + x = widget->allocation.x + CHECK_BUTTON_CLASS (widget)->indicator_spacing + GTK_CONTAINER (widget)->border_width + 1; + y = widget->allocation.y + (widget->allocation.height - CHECK_BUTTON_CLASS (widget)->indicator_size) / 2 + 1; width = CHECK_BUTTON_CLASS (widget)->indicator_size; height = CHECK_BUTTON_CLASS (widget)->indicator_size; @@ -403,9 +409,12 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button, state_type = GTK_WIDGET_STATE (widget); } + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) + x = widget->allocation.x + widget->allocation.width - (width + x - widget->allocation.x); + gtk_paint_check (widget->style, window, state_type, shadow_type, area, widget, "checkbutton", - x + 1, y + 1, width, height); + x, y, width, height); } } diff --git a/gtk/gtkeditable.c b/gtk/gtkeditable.c index 04d64a50a6..503893d913 100644 --- a/gtk/gtkeditable.c +++ b/gtk/gtkeditable.c @@ -965,32 +965,3 @@ gtk_editable_changed (GtkEditable *editable) gtk_signal_emit (GTK_OBJECT (editable), editable_signals[CHANGED]); } - -#if 0 -static void -gtk_editable_parent_set (GtkWidget *widget, - GtkWidget *old_parent, - GtkWidget *editable) -{ - GtkWidget *parent; - - parent = old_parent; - while (parent) - { - gtk_signal_disconnect_by_func (GTK_OBJECT (parent), - GTK_SIGNAL_FUNC (gtk_editable_parent_set), - editable); - parent = parent->parent; - } - - parent = widget->parent; - while (parent) - { - gtk_signal_connect (GTK_OBJECT (parent), "parent_set", - GTK_SIGNAL_FUNC (gtk_editable_parent_set), - editable); - - parent = parent->parent; - } -} -#endif diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 50db536b07..c7b8901680 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -34,12 +34,19 @@ #include "gtksignal.h" #include "gtkstyle.h" +#include +#include + #define MIN_ENTRY_WIDTH 150 #define DRAW_TIMEOUT 20 - -/* If you are going to change this, see the note in entry_adjust_scroll */ #define INNER_BORDER 2 +/* Initial size of buffer, in bytes */ +#define MIN_SIZE 16 + +/* Maximum size of text buffer, in bytes */ +#define MAX_SIZE G_MAXUSHORT + enum { ARG_0, ARG_MAX_LENGTH, @@ -47,71 +54,70 @@ enum { }; -static void gtk_entry_class_init (GtkEntryClass *klass); -static void gtk_entry_init (GtkEntry *entry); -static void gtk_entry_set_arg (GtkObject *object, - GtkArg *arg, - guint arg_id); -static void gtk_entry_get_arg (GtkObject *object, - GtkArg *arg, - guint arg_id); -static void gtk_entry_finalize (GtkObject *object); -static void gtk_entry_realize (GtkWidget *widget); -static void gtk_entry_unrealize (GtkWidget *widget); -static void gtk_entry_draw_focus (GtkWidget *widget); -static void gtk_entry_size_request (GtkWidget *widget, - GtkRequisition *requisition); -static void gtk_entry_size_allocate (GtkWidget *widget, - GtkAllocation *allocation); -static void gtk_entry_make_backing_pixmap (GtkEntry *entry, - gint width, gint height); -static void gtk_entry_draw (GtkWidget *widget, - GdkRectangle *area); -static gint gtk_entry_expose (GtkWidget *widget, - GdkEventExpose *event); -static gint gtk_entry_button_press (GtkWidget *widget, - GdkEventButton *event); -static gint gtk_entry_button_release (GtkWidget *widget, - GdkEventButton *event); -static gint gtk_entry_motion_notify (GtkWidget *widget, - GdkEventMotion *event); -static gint gtk_entry_key_press (GtkWidget *widget, - GdkEventKey *event); -static gint gtk_entry_focus_in (GtkWidget *widget, - GdkEventFocus *event); -static gint gtk_entry_focus_out (GtkWidget *widget, - GdkEventFocus *event); -static void gtk_entry_draw_text (GtkEntry *entry); -static void gtk_entry_draw_cursor (GtkEntry *entry); -static void gtk_entry_draw_cursor_on_drawable - (GtkEntry *entry, - GdkDrawable *drawable); -static void gtk_entry_style_set (GtkWidget *widget, - GtkStyle *previous_style); -static void gtk_entry_state_changed (GtkWidget *widget, - GtkStateType previous_state); -#ifdef USE_XIM -static void gtk_entry_update_ic_attr (GtkWidget *widget); -#endif -static void gtk_entry_queue_draw (GtkEntry *entry); -static gint gtk_entry_timer (gpointer data); -static gint gtk_entry_position (GtkEntry *entry, - gint x); -static void entry_adjust_scroll (GtkEntry *entry); -static void gtk_entry_grow_text (GtkEntry *entry); -static void gtk_entry_insert_text (GtkEditable *editable, - const gchar *new_text, - gint new_text_length, - gint *position); -static void gtk_entry_delete_text (GtkEditable *editable, - gint start_pos, - gint end_pos); -static void gtk_entry_update_text (GtkEditable *editable, - gint start_pos, - gint end_pos); -static gchar *gtk_entry_get_chars (GtkEditable *editable, - gint start_pos, - gint end_pos); +static void gtk_entry_class_init (GtkEntryClass *klass); +static void gtk_entry_init (GtkEntry *entry); +static void gtk_entry_set_arg (GtkObject *object, + GtkArg *arg, + guint arg_id); +static void gtk_entry_get_arg (GtkObject *object, + GtkArg *arg, + guint arg_id); +static void gtk_entry_finalize (GtkObject *object); +static void gtk_entry_realize (GtkWidget *widget); +static void gtk_entry_unrealize (GtkWidget *widget); +static void gtk_entry_draw_focus (GtkWidget *widget); +static void gtk_entry_size_request (GtkWidget *widget, + GtkRequisition *requisition); +static void gtk_entry_size_allocate (GtkWidget *widget, + GtkAllocation *allocation); +static void gtk_entry_draw (GtkWidget *widget, + GdkRectangle *area); +static gint gtk_entry_expose (GtkWidget *widget, + GdkEventExpose *event); +static gint gtk_entry_button_press (GtkWidget *widget, + GdkEventButton *event); +static gint gtk_entry_button_release (GtkWidget *widget, + GdkEventButton *event); +static gint gtk_entry_motion_notify (GtkWidget *widget, + GdkEventMotion *event); +static gint gtk_entry_key_press (GtkWidget *widget, + GdkEventKey *event); +static gint gtk_entry_focus_in (GtkWidget *widget, + GdkEventFocus *event); +static gint gtk_entry_focus_out (GtkWidget *widget, + GdkEventFocus *event); +static void gtk_entry_draw_text (GtkEntry *entry); +static PangoAttrList *gtk_entry_get_attr_list (GtkEntry *entry); +static void gtk_entry_reset_attrs (GtkEntry *entry); +static void gtk_entry_ensure_layout (GtkEntry *entry); +static void gtk_entry_draw_cursor (GtkEntry *entry); +static void gtk_entry_style_set (GtkWidget *widget, + GtkStyle *previous_style); +static void gtk_entry_state_changed (GtkWidget *widget, + GtkStateType previous_state); +static void gtk_entry_queue_draw (GtkEntry *entry); +static gint gtk_entry_find_position (GtkEntry *entry, + gint x); +static void gtk_entry_get_cursor_locations (GtkEntry *entry, + gint *strong_x, + gint *weak_x); +static void entry_adjust_scroll (GtkEntry *entry); +static void gtk_entry_insert_text (GtkEditable *editable, + const gchar *new_text, + gint new_text_length, + gint *position); +static void gtk_entry_delete_text (GtkEditable *editable, + gint start_pos, + gint end_pos); +static void gtk_entry_update_text (GtkEditable *editable, + gint start_pos, + gint end_pos); +static gchar * gtk_entry_get_chars (GtkEditable *editable, + gint start_pos, + gint end_pos); + + + /* Binding actions */ static void gtk_entry_move_cursor (GtkEditable *editable, @@ -151,9 +157,6 @@ static void gtk_entry_set_selection (GtkEditable *editable, gint start, gint end); -static void gtk_entry_recompute_offsets (GtkEntry *entry); -static gint gtk_entry_find_position (GtkEntry *entry, - gint position); static void gtk_entry_set_position_from_editable (GtkEditable *editable, gint position); @@ -350,22 +353,18 @@ gtk_entry_init (GtkEntry *entry) GTK_WIDGET_SET_FLAGS (entry, GTK_CAN_FOCUS); entry->text_area = NULL; - entry->backing_pixmap = NULL; - entry->text = NULL; - entry->text_size = 0; + + entry->text_size = MIN_SIZE; + entry->text = g_malloc (entry->text_size); + entry->text[0] = '\0'; + entry->text_length = 0; entry->text_max_length = 0; + entry->n_bytes = 0; entry->scroll_offset = 0; entry->timer = 0; entry->button = 0; - entry->visible = 1; - - entry->char_offset = NULL; - entry->text_mb = NULL; - entry->text_mb_dirty = TRUE; - entry->use_wchar = FALSE; - - gtk_entry_grow_text (entry); + entry->ascent = 0; } GtkWidget* @@ -404,12 +403,6 @@ gtk_entry_set_text (GtkEntry *entry, tmp_pos = 0; gtk_editable_insert_text (editable, text, strlen (text), &tmp_pos); editable->current_pos = tmp_pos; - - editable->selection_start_pos = 0; - editable->selection_end_pos = 0; - - if (GTK_WIDGET_DRAWABLE (entry)) - gtk_entry_draw_text (entry); } void @@ -424,7 +417,6 @@ gtk_entry_append_text (GtkEntry *entry, tmp_pos = entry->text_length; gtk_editable_insert_text (GTK_EDITABLE(entry), text, strlen (text), &tmp_pos); - GTK_EDITABLE(entry)->current_pos = tmp_pos; } void @@ -439,7 +431,6 @@ gtk_entry_prepend_text (GtkEntry *entry, tmp_pos = 0; gtk_editable_insert_text (GTK_EDITABLE(entry), text, strlen (text), &tmp_pos); - GTK_EDITABLE(entry)->current_pos = tmp_pos; } void @@ -470,10 +461,9 @@ gtk_entry_set_visibility (GtkEntry *entry, g_return_if_fail (entry != NULL); g_return_if_fail (GTK_IS_ENTRY (entry)); - entry->visible = visible ? TRUE : FALSE; GTK_EDITABLE (entry)->visible = visible ? TRUE : FALSE; - gtk_entry_recompute_offsets (entry); - gtk_widget_queue_draw (GTK_WIDGET (entry)); + + gtk_entry_queue_draw (entry); } void @@ -492,24 +482,7 @@ gtk_entry_get_text (GtkEntry *entry) g_return_val_if_fail (entry != NULL, NULL); g_return_val_if_fail (GTK_IS_ENTRY (entry), NULL); - if (!entry->text_mb_dirty) - return entry->text_mb; - - if (entry->text_mb) - g_free(entry->text_mb); - - if (!entry->text) - { - entry->text_mb = g_new(gchar, 1); - entry->text_mb[0] = 0; - } - else - { - entry->text_mb = gtk_entry_get_chars(GTK_EDITABLE(entry), 0, -1); - } - entry->text_mb_dirty = 0; - - return entry->text_mb; + return entry->text; } static void @@ -529,17 +502,8 @@ gtk_entry_finalize (GtkObject *object) if (entry->text) g_free (entry->text); - if (entry->char_offset) - g_free (entry->char_offset); entry->text = NULL; - if (entry->text_mb) - g_free (entry->text_mb); - entry->text_mb = NULL; - - if (entry->backing_pixmap) - gdk_pixmap_unref (entry->backing_pixmap); - (* GTK_OBJECT_CLASS (parent_class)->finalize) (object); } @@ -600,82 +564,13 @@ gtk_entry_realize (GtkWidget *widget) gdk_window_set_background (widget->window, &widget->style->base[GTK_WIDGET_STATE (widget)]); gdk_window_set_background (entry->text_area, &widget->style->base[GTK_WIDGET_STATE (widget)]); -#ifdef USE_XIM - if (gdk_im_ready () && (editable->ic_attr = gdk_ic_attr_new ()) != NULL) - { - gint width, height; - GdkEventMask mask; - GdkColormap *colormap; - GdkICAttr *attr = editable->ic_attr; - GdkICAttributesType attrmask = GDK_IC_ALL_REQ; - GdkIMStyle style; - GdkIMStyle supported_style = GDK_IM_PREEDIT_NONE | - GDK_IM_PREEDIT_NOTHING | - GDK_IM_PREEDIT_POSITION | - GDK_IM_STATUS_NONE | - GDK_IM_STATUS_NOTHING; - - if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) - supported_style &= ~GDK_IM_PREEDIT_POSITION; - - attr->style = style = gdk_im_decide_style (supported_style); - attr->client_window = entry->text_area; - - if ((colormap = gtk_widget_get_colormap (widget)) != - gtk_widget_get_default_colormap ()) - { - attrmask |= GDK_IC_PREEDIT_COLORMAP; - attr->preedit_colormap = colormap; - } - attrmask |= GDK_IC_PREEDIT_FOREGROUND; - attrmask |= GDK_IC_PREEDIT_BACKGROUND; - attr->preedit_foreground = widget->style->fg[GTK_STATE_NORMAL]; - attr->preedit_background = widget->style->base[GTK_STATE_NORMAL]; - - switch (style & GDK_IM_PREEDIT_MASK) - { - case GDK_IM_PREEDIT_POSITION: - if (widget->style && widget->style->font->type != GDK_FONT_FONTSET) - { - g_warning ("over-the-spot style requires fontset"); - break; - } - - gdk_window_get_size (entry->text_area, &width, &height); - - attrmask |= GDK_IC_PREEDIT_POSITION_REQ; - attr->spot_location.x = 0; - attr->spot_location.y = height; - attr->preedit_area.x = 0; - attr->preedit_area.y = 0; - attr->preedit_area.width = width; - attr->preedit_area.height = height; - attr->preedit_fontset = widget->style->font; - - break; - } - editable->ic = gdk_ic_new (attr, attrmask); - - if (editable->ic == NULL) - g_warning ("Can't create input context."); - else - { - mask = gdk_window_get_events (entry->text_area); - mask |= gdk_ic_get_events (editable->ic); - gdk_window_set_events (entry->text_area, mask); - - if (GTK_WIDGET_HAS_FOCUS(widget)) - gdk_im_begin (editable->ic, entry->text_area); - } - } -#endif - gdk_window_show (entry->text_area); if (editable->selection_start_pos != editable->selection_end_pos) - gtk_editable_claim_selection (editable, TRUE, GDK_CURRENT_TIME); - - gtk_entry_recompute_offsets (entry); + { + gtk_editable_claim_selection (editable, TRUE, GDK_CURRENT_TIME); + gtk_entry_reset_attrs (entry); + } } static void @@ -688,19 +583,6 @@ gtk_entry_unrealize (GtkWidget *widget) entry = GTK_ENTRY (widget); -#ifdef USE_XIM - if (GTK_EDITABLE (widget)->ic) - { - gdk_ic_destroy (GTK_EDITABLE (widget)->ic); - GTK_EDITABLE (widget)->ic = NULL; - } - if (GTK_EDITABLE (widget)->ic_attr) - { - gdk_ic_attr_destroy (GTK_EDITABLE (widget)->ic_attr); - GTK_EDITABLE (widget)->ic_attr = NULL; - } -#endif - if (entry->text_area) { gdk_window_set_user_data (entry->text_area, NULL); @@ -749,9 +631,6 @@ gtk_entry_draw_focus (GtkWidget *widget) NULL, widget, "entry", 0, 0, width - 1, height - 1); } - - if (GTK_EDITABLE (widget)->editable) - gtk_entry_draw_cursor (GTK_ENTRY (widget)); } } @@ -759,13 +638,39 @@ static void gtk_entry_size_request (GtkWidget *widget, GtkRequisition *requisition) { + GtkEntry *entry; + PangoFontMetrics metrics; + PangoFont *font; + g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_ENTRY (widget)); g_return_if_fail (requisition != NULL); + entry = GTK_ENTRY (widget); + + /* We do this to deal with direction changes - should that be a signal? + */ + if (entry->layout) + { + pango_layout_unref (entry->layout); + entry->layout = NULL; + } + + gtk_entry_ensure_layout (entry); + + /* hackish for now, get metrics + */ + + font = pango_context_load_font (pango_layout_get_context (entry->layout), + widget->style->font_desc); + + pango_font_get_metrics (font, "fr_FR", &metrics); + pango_font_unref (font); + + entry->ascent = metrics.ascent; + requisition->width = MIN_ENTRY_WIDTH + (widget->style->klass->xthickness + INNER_BORDER) * 2; - requisition->height = (widget->style->font->ascent + - widget->style->font->descent + + requisition->height = ((metrics.ascent + metrics.descent) / PANGO_SCALE + (widget->style->klass->ythickness + INNER_BORDER) * 2); } @@ -803,23 +708,10 @@ gtk_entry_size_allocate (GtkWidget *widget, allocation->width - widget->style->klass->xthickness * 2, requisition.height - widget->style->klass->ythickness * 2); - /* And make sure the cursor is on screen */ - entry_adjust_scroll (entry); - -#ifdef USE_XIM - if (editable->ic && - (gdk_ic_get_style (editable->ic) & GDK_IM_PREEDIT_POSITION)) - { - gint width, height; - - gdk_window_get_size (entry->text_area, &width, &height); - editable->ic_attr->preedit_area.width = width; - editable->ic_attr->preedit_area.height = height; - gdk_ic_set_attr (editable->ic, editable->ic_attr, - GDK_IC_PREEDIT_AREA); - } -#endif } + + /* And make sure the cursor is on screen */ + entry_adjust_scroll (entry); } static void @@ -844,6 +736,7 @@ gtk_entry_draw (GtkWidget *widget, gdk_window_begin_paint_rect (entry->text_area, &tmp_area); gtk_widget_draw_focus (widget); gtk_entry_draw_text (GTK_ENTRY (widget)); + gtk_entry_draw_cursor (GTK_ENTRY (widget)); gdk_window_end_paint (entry->text_area); } } @@ -863,7 +756,10 @@ gtk_entry_expose (GtkWidget *widget, if (widget->window == event->window) gtk_widget_draw_focus (widget); else if (entry->text_area == event->window) - gtk_entry_draw_text (GTK_ENTRY (widget)); + { + gtk_entry_draw_text (GTK_ENTRY (widget)); + gtk_entry_draw_cursor (GTK_ENTRY (widget)); + } return FALSE; } @@ -901,7 +797,7 @@ gtk_entry_button_press (GtkWidget *widget, case GDK_BUTTON_PRESS: gtk_grab_add (widget); - tmp_pos = gtk_entry_position (entry, event->x + entry->scroll_offset); + tmp_pos = gtk_entry_find_position (entry, event->x + entry->scroll_offset); /* Set it now, so we display things right. We'll unset it * later if things don't work out */ editable->has_selection = TRUE; @@ -929,7 +825,7 @@ gtk_entry_button_press (GtkWidget *widget, { if (editable->selection_start_pos == editable->selection_end_pos || editable->has_selection) - editable->current_pos = gtk_entry_position (entry, event->x + entry->scroll_offset); + editable->current_pos = gtk_entry_find_position (entry, event->x + entry->scroll_offset); gtk_selection_convert (widget, GDK_SELECTION_PRIMARY, ctext_atom, event->time); } @@ -937,7 +833,7 @@ gtk_entry_button_press (GtkWidget *widget, { gtk_grab_add (widget); - tmp_pos = gtk_entry_position (entry, event->x + entry->scroll_offset); + tmp_pos = gtk_entry_find_position (entry, event->x + entry->scroll_offset); gtk_entry_set_selection (editable, tmp_pos, tmp_pos); editable->has_selection = FALSE; editable->current_pos = editable->selection_start_pos; @@ -983,7 +879,10 @@ gtk_entry_button_release (GtkWidget *widget, event->time)) editable->has_selection = TRUE; else - gtk_entry_queue_draw (entry); + { + gtk_entry_reset_attrs (entry); + gtk_entry_queue_draw (entry); + } } else { @@ -1023,14 +922,137 @@ gtk_entry_motion_notify (GtkWidget *widget, if (event->is_hint || (entry->text_area != event->window)) gdk_window_get_pointer (entry->text_area, &x, NULL, NULL); - GTK_EDITABLE(entry)->selection_end_pos = gtk_entry_position (entry, x + entry->scroll_offset); + GTK_EDITABLE(entry)->selection_end_pos = gtk_entry_find_position (entry, x + entry->scroll_offset); GTK_EDITABLE(entry)->current_pos = GTK_EDITABLE(entry)->selection_end_pos; + gtk_entry_reset_attrs (entry); entry_adjust_scroll (entry); gtk_entry_queue_draw (entry); return TRUE; } +struct { + guint keyval; + unicode_char_t ch; +} keyval_to_unicode[] = { + { GDK_hebrew_aleph, 0x5d0 }, + { GDK_hebrew_bet, 0x5d1 }, + { GDK_hebrew_gimel, 0x5d2 }, + { GDK_hebrew_dalet, 0x5d3 }, + { GDK_hebrew_he, 0x5d4 }, + { GDK_hebrew_waw, 0x5d5 }, + { GDK_hebrew_zayin, 0x5d6 }, + { GDK_hebrew_het, 0x5d7 }, + { GDK_hebrew_tet, 0x5d8 }, + { GDK_hebrew_yod, 0x5d9 }, + { GDK_hebrew_finalkaph, 0x5da }, + { GDK_hebrew_kaph, 0x5db }, + { GDK_hebrew_lamed, 0x5dc }, + { GDK_hebrew_finalmem, 0x5dd }, + { GDK_hebrew_mem, 0x5de }, + { GDK_hebrew_finalnun, 0x5df }, + { GDK_hebrew_nun, 0x5e0 }, + { GDK_hebrew_samech, 0x5e1 }, + { GDK_hebrew_ayin, 0x5e2 }, + { GDK_hebrew_finalpe, 0x5e3 }, + { GDK_hebrew_pe, 0x5e4 }, + { GDK_hebrew_finalzade, 0x5e5 }, + { GDK_hebrew_zade, 0x5e6 }, + { GDK_hebrew_qoph, 0x5e7 }, + { GDK_hebrew_resh, 0x5e8 }, + { GDK_hebrew_shin, 0x5e9 }, + { GDK_hebrew_taw, 0x5ea } +}; + +static unicode_char_t +find_unicode (gint keyval) +{ + gint first = 0; + gint last = G_N_ELEMENTS (keyval_to_unicode) - 1; + +#define KEYVAL(ind) keyval_to_unicode[ind].keyval + + if (KEYVAL (first) >= keyval) + return KEYVAL(first) == keyval ? keyval_to_unicode[first].ch : 0; + if (KEYVAL (last) <= keyval) + return KEYVAL(last) == keyval ? keyval_to_unicode[last].ch : 0; + + /* Invariant: KEYVAL(first) < keyval < KEYVAL(LAST) */ + + do + { + gint middle = (first + last) / 2; + if (KEYVAL(middle) > keyval) + last = middle; + else if (KEYVAL(middle) == keyval) + return keyval_to_unicode[middle].ch; + else + first = middle; + } + while (last > first + 1); + + return 0; + +#undef KEVAL +} + +/** + * unicode_guchar4_to_utf8: + * @ch: a ISO10646 character code + * @out: output buffer, must have at least 6 bytes of space. + * + * Convert a single character to utf8 + * + * Return value: number of bytes written + **/ +static int +ucs4_to_utf8 (unicode_char_t c, char *outbuf) +{ + size_t len = 0; + int first; + int i; + + if (c < 0x80) + { + first = 0; + len = 1; + } + else if (c < 0x800) + { + first = 0xc0; + len = 2; + } + else if (c < 0x10000) + { + first = 0xe0; + len = 3; + } + else if (c < 0x200000) + { + first = 0xf0; + len = 4; + } + else if (c < 0x4000000) + { + first = 0xf8; + len = 5; + } + else + { + first = 0xfc; + len = 6; + } + + for (i = len - 1; i > 0; --i) + { + outbuf[i] = (c & 0x3f) | 0x80; + c >>= 6; + } + outbuf[0] = c | first; + + return len; +} + static gint gtk_entry_key_press (GtkWidget *widget, GdkEventKey *event) @@ -1185,6 +1207,29 @@ gtk_entry_key_press (GtkWidget *widget, return_val = TRUE; } + else + { + unicode_char_t ch = find_unicode (event->keyval); + + if (ch != 0) + { + gint tmp_pos; + gchar buf[6]; + gint len; + + len = ucs4_to_utf8 (ch, buf); + + extend_selection = FALSE; + gtk_editable_delete_selection (editable); + + tmp_pos = editable->current_pos; + gtk_editable_insert_text (editable, buf, len, &tmp_pos); + editable->current_pos = tmp_pos; + + return_val = TRUE; + } + } + break; } @@ -1219,6 +1264,7 @@ gtk_entry_key_press (GtkWidget *widget, editable->selection_start_pos != editable->selection_end_pos, event->time); + gtk_entry_reset_attrs (entry); entry_adjust_scroll (entry); gtk_entry_queue_draw (entry); } @@ -1236,12 +1282,8 @@ gtk_entry_focus_in (GtkWidget *widget, GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS); gtk_widget_draw_focus (widget); - -#ifdef USE_XIM - if (GTK_EDITABLE(widget)->ic) - gdk_im_begin (GTK_EDITABLE(widget)->ic, GTK_ENTRY(widget)->text_area); -#endif - + gtk_entry_queue_draw (GTK_ENTRY (widget)); + return FALSE; } @@ -1255,38 +1297,85 @@ gtk_entry_focus_out (GtkWidget *widget, GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS); gtk_widget_draw_focus (widget); - -#ifdef USE_XIM - gdk_im_end (); -#endif + gtk_entry_queue_draw (GTK_ENTRY (widget)); return FALSE; } static void -gtk_entry_make_backing_pixmap (GtkEntry *entry, gint width, gint height) +gtk_entry_ensure_layout (GtkEntry *entry) { - gint pixmap_width, pixmap_height; + GtkWidget *widget = GTK_WIDGET (entry); + + PangoAttrList *attrs; - if (!entry->backing_pixmap) + if (!entry->layout) { - /* allocate */ - entry->backing_pixmap = gdk_pixmap_new (entry->text_area, - width, height, - -1); + entry->layout = gtk_widget_create_pango_layout (widget); + + attrs = gtk_entry_get_attr_list (entry); + pango_layout_set_text (entry->layout, entry->text, entry->n_bytes); + pango_layout_set_attributes (entry->layout, attrs); + pango_attr_list_unref (attrs); } - else +} + +static PangoAttrList * +gtk_entry_get_attr_list (GtkEntry *entry) +{ + GtkEditable *editable = GTK_EDITABLE (entry); + GtkWidget *widget = GTK_WIDGET (entry); + PangoAttribute *attr; + PangoAttrList *result; + + gint start_index = unicode_offset_to_index (entry->text, editable->selection_start_pos); + gint end_index = unicode_offset_to_index (entry->text, editable->selection_end_pos); + + result = pango_attr_list_new (); + + if (start_index != end_index) { - /* reallocate if sizes don't match */ - gdk_window_get_size (entry->backing_pixmap, - &pixmap_width, &pixmap_height); - if ((pixmap_width != width) || (pixmap_height != height)) + gint tmp; + GtkStateType selected_state = GTK_STATE_SELECTED; + if (!editable->has_selection) + selected_state = GTK_STATE_ACTIVE; + + if (end_index < start_index) { - gdk_pixmap_unref (entry->backing_pixmap); - entry->backing_pixmap = gdk_pixmap_new (entry->text_area, - width, height, - -1); + tmp = end_index; + end_index = start_index; + start_index = tmp; } + + attr = pango_attr_background_new (widget->style->bg[selected_state].red, + widget->style->bg[selected_state].green, + widget->style->bg[selected_state].blue); + attr->start_index = start_index; + attr->end_index = end_index; + + pango_attr_list_insert (result, attr); + + attr = pango_attr_foreground_new (widget->style->fg[selected_state].red, + widget->style->fg[selected_state].green, + widget->style->fg[selected_state].blue); + attr->start_index = start_index; + attr->end_index = end_index; + + pango_attr_list_insert (result, attr); + } + + return result; +} + +static void +gtk_entry_reset_attrs (GtkEntry *entry) +{ + if (entry->layout) + { + PangoAttrList *attrs = gtk_entry_get_attr_list (entry); + pango_layout_set_text (entry->layout, entry->text, entry->n_bytes); + pango_layout_set_attributes (entry->layout, attrs); + pango_attr_list_unref (attrs); } } @@ -1294,131 +1383,26 @@ static void gtk_entry_draw_text (GtkEntry *entry) { GtkWidget *widget; - GtkEditable *editable; - GtkStateType selected_state; - gint start_pos; - gint end_pos; - gint start_xoffset; - gint selection_start_pos; - gint selection_end_pos; - gint selection_start_xoffset; - gint selection_end_xoffset; - gint width, height; - gint y; - GdkDrawable *drawable; - GdkWChar *stars; - GdkWChar *toprint; - + PangoLayoutLine *line; + g_return_if_fail (entry != NULL); g_return_if_fail (GTK_IS_ENTRY (entry)); - if (entry->timer) - { - gtk_timeout_remove (entry->timer); - entry->timer = 0; - } - if (GTK_WIDGET_DRAWABLE (entry)) { + PangoRectangle logical_rect; + widget = GTK_WIDGET (entry); - editable = GTK_EDITABLE (entry); - if (!entry->text) - { - gtk_paint_flat_box (widget->style, entry->text_area, - GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE, - NULL, widget, "entry_bg", - 0, 0, -1, -1); + gtk_entry_ensure_layout (entry); - if (editable->editable) - gtk_entry_draw_cursor (entry); - return; - } - - gdk_window_get_size (entry->text_area, &width, &height); - - gtk_paint_flat_box (widget->style, entry->text_area, - GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE, - NULL, widget, "entry_bg", - 0, 0, width, height); - - y = (height - (widget->style->font->ascent + widget->style->font->descent)) / 2; - y += widget->style->font->ascent; - - start_pos = gtk_entry_find_position (entry, entry->scroll_offset); - start_xoffset = entry->char_offset[start_pos] - entry->scroll_offset; - - end_pos = gtk_entry_find_position (entry, entry->scroll_offset + width); - if (end_pos < entry->text_length) - end_pos += 1; - - selected_state = GTK_STATE_SELECTED; - if (!editable->has_selection) - selected_state = GTK_STATE_ACTIVE; - - selection_start_pos = MIN (editable->selection_start_pos, editable->selection_end_pos); - selection_end_pos = MAX (editable->selection_start_pos, editable->selection_end_pos); + line = pango_layout_get_lines (entry->layout)->data; + pango_layout_line_get_extents (line, NULL, &logical_rect); - selection_start_pos = CLAMP (selection_start_pos, start_pos, end_pos); - selection_end_pos = CLAMP (selection_end_pos, start_pos, end_pos); - - selection_start_xoffset = - entry->char_offset[selection_start_pos] - entry->scroll_offset; - selection_end_xoffset = - entry->char_offset[selection_end_pos] -entry->scroll_offset; - - /* if editable->visible, print a bunch of stars. If not, print the standard text. */ - if (editable->visible) - { - toprint = entry->text + start_pos; - } - else - { - gint i; - - stars = g_new (GdkWChar, end_pos - start_pos); - for (i = 0; i < end_pos - start_pos; i++) - stars[i] = '*'; - toprint = stars; - } - - if (selection_start_pos > start_pos) - gdk_draw_text_wc (entry->text_area, widget->style->font, - widget->style->fg_gc[GTK_WIDGET_STATE (widget)], - INNER_BORDER + start_xoffset, y, - toprint, - selection_start_pos - start_pos); - - if ((selection_end_pos >= start_pos) && - (selection_start_pos < end_pos) && - (selection_start_pos != selection_end_pos)) - { - gtk_paint_flat_box (widget->style, entry->text_area, - selected_state, GTK_SHADOW_NONE, - NULL, widget, "text", - INNER_BORDER + selection_start_xoffset, - INNER_BORDER, - selection_end_xoffset - selection_start_xoffset, - height - 2*INNER_BORDER); - gdk_draw_text_wc (entry->text_area, widget->style->font, - widget->style->fg_gc[selected_state], - INNER_BORDER + selection_start_xoffset, y, - toprint + selection_start_pos - start_pos, - selection_end_pos - selection_start_pos); - } - - if (selection_end_pos < end_pos) - gdk_draw_text_wc (entry->text_area, widget->style->font, - widget->style->fg_gc[GTK_WIDGET_STATE (widget)], - INNER_BORDER + selection_end_xoffset, y, - toprint + selection_end_pos - start_pos, - end_pos - selection_end_pos); - /* free the space allocated for the stars if it's neccessary. */ - if (!editable->visible) - g_free (toprint); - - if (editable->editable) - gtk_entry_draw_cursor_on_drawable (entry, entry->text_area); + gdk_draw_layout (entry->text_area, widget->style->text_gc [widget->state], + INNER_BORDER - entry->scroll_offset, + INNER_BORDER + (entry->ascent + logical_rect.y) / PANGO_SCALE, + entry->layout); } } @@ -1428,89 +1412,32 @@ gtk_entry_draw_cursor (GtkEntry *entry) g_return_if_fail (entry != NULL); g_return_if_fail (GTK_IS_ENTRY (entry)); - gtk_entry_draw_cursor_on_drawable (entry, entry->text_area); -} - -static void -gtk_entry_draw_cursor_on_drawable (GtkEntry *entry, GdkDrawable *drawable) -{ - GtkWidget *widget; - GtkEditable *editable; - gint xoffset; - gint text_area_height; - - g_return_if_fail (entry != NULL); - g_return_if_fail (GTK_IS_ENTRY (entry)); - if (GTK_WIDGET_DRAWABLE (entry)) { - widget = GTK_WIDGET (entry); - editable = GTK_EDITABLE (entry); - - xoffset = INNER_BORDER + entry->char_offset[editable->current_pos]; - xoffset -= entry->scroll_offset; - - gdk_window_get_size (entry->text_area, NULL, &text_area_height); + GtkWidget *widget = GTK_WIDGET (entry); + GtkEditable *editable = GTK_EDITABLE (entry); if (GTK_WIDGET_HAS_FOCUS (widget) && (editable->selection_start_pos == editable->selection_end_pos)) { - gdk_draw_line (drawable, widget->style->fg_gc[GTK_STATE_NORMAL], - xoffset, INNER_BORDER, - xoffset, text_area_height - INNER_BORDER); + gint xoffset = INNER_BORDER - entry->scroll_offset; + gint strong_x, weak_x; + gint text_area_height; + + gdk_window_get_size (entry->text_area, NULL, &text_area_height); + + gtk_entry_get_cursor_locations (entry, &strong_x, &weak_x); + + gdk_draw_line (entry->text_area, widget->style->bg_gc[GTK_STATE_SELECTED], + xoffset + strong_x, INNER_BORDER, + xoffset + strong_x, text_area_height - INNER_BORDER); + + if (weak_x != strong_x) + gdk_draw_line (entry->text_area, widget->style->fg_gc[GTK_STATE_NORMAL], + xoffset + weak_x, INNER_BORDER, + xoffset + weak_x, text_area_height - INNER_BORDER); + } - else - { - int width, height; - GdkRectangle area; - - gint yoffset = - (text_area_height - - (widget->style->font->ascent + widget->style->font->descent)) / 2 - + widget->style->font->ascent; - - area.x = xoffset; - area.y = INNER_BORDER; - area.width = 1; - area.height = text_area_height - INNER_BORDER; - - gdk_window_get_size (entry->text_area, &width, &height); - - gtk_paint_flat_box (widget->style, drawable, - GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE, - &area, widget, "entry_bg", - 0, 0, width, height); - - - /* Draw the character under the cursor again - */ - if ((editable->current_pos < entry->text_length) && - (editable->selection_start_pos == editable->selection_end_pos)) - { - GdkWChar c = editable->visible ? - *(entry->text + editable->current_pos) : - '*'; - - gdk_draw_text_wc (drawable, widget->style->font, - widget->style->fg_gc[GTK_WIDGET_STATE (widget)], - xoffset, yoffset, &c, 1); - } - } - - -#ifdef USE_XIM - if (GTK_WIDGET_HAS_FOCUS(widget) && gdk_im_ready() && editable->ic && - (gdk_ic_get_style (editable->ic) & GDK_IM_PREEDIT_POSITION)) - { - editable->ic_attr->spot_location.x = xoffset; - editable->ic_attr->spot_location.y = - (text_area_height + (widget->style->font->ascent - - widget->style->font->descent) + 1) / 2; - - gdk_ic_set_attr (editable->ic, - editable->ic_attr, GDK_IC_SPOT_LOCATION); - } -#endif } } @@ -1520,10 +1447,16 @@ gtk_entry_queue_draw (GtkEntry *entry) g_return_if_fail (entry != NULL); g_return_if_fail (GTK_IS_ENTRY (entry)); - if (!entry->timer) - entry->timer = gtk_timeout_add (DRAW_TIMEOUT, gtk_entry_timer, entry); + if (GTK_WIDGET_REALIZED (entry)) + { + GdkRectangle rect = { 0 }; + + gdk_window_get_size (entry->text_area, &rect.width, &rect.height); + gdk_window_invalidate_rect (entry->text_area, &rect, 0); + } } +#if 0 static gint gtk_entry_timer (gpointer data) { @@ -1533,71 +1466,144 @@ gtk_entry_timer (gpointer data) entry = GTK_ENTRY (data); entry->timer = 0; - gtk_entry_draw_text (entry); GDK_THREADS_LEAVE (); return FALSE; } +#endif static gint gtk_entry_find_position (GtkEntry *entry, gint x) { - gint start = 0; - gint end = entry->text_length; - gint half; - - if (x <= 0) - return 0; - if (x >= entry->char_offset[end]) - return end; + PangoLayoutLine *line; + gint index; + gboolean trailing; - /* invariant - char_offset[start] <= x < char_offset[end] */ + gtk_entry_ensure_layout (entry); - while (start != end) - { - half = (start+end)/2; - if (half == start) - return half; - else if (entry->char_offset[half] <= x) - start = half; - else - end = half; - } + line = pango_layout_get_lines (entry->layout)->data; - return start; + if (x < 0) + return gtk_widget_get_direction (GTK_WIDGET (entry)) == GTK_TEXT_DIR_LTR ? 0 : entry->text_length; + else if (pango_layout_line_x_to_index (line, x * PANGO_SCALE, &index, &trailing)) + return unicode_index_to_offset (entry->text, index + trailing); + else + return gtk_widget_get_direction (GTK_WIDGET (entry)) == GTK_TEXT_DIR_LTR ? entry->text_length : 0; } -static gint -gtk_entry_position (GtkEntry *entry, - gint x) +static void +gtk_entry_get_cursor_locations (GtkEntry *entry, + gint *strong_x, + gint *weak_x) { - return gtk_entry_find_position(entry, x); + GtkEditable *editable = GTK_EDITABLE (entry); + PangoLayoutLine *line; + + GtkTextDirection widget_dir = gtk_widget_get_direction (GTK_WIDGET (entry)); + GtkTextDirection dir1, dir2; + gint x1, x1_trailing; + gint x2, x2_trailing; + + gint index; + + gtk_entry_ensure_layout (entry); + line = pango_layout_get_lines (entry->layout)->data; + + if (editable->current_pos == 0) + { + PangoRectangle logical_rect; + pango_layout_line_get_extents (line, NULL, &logical_rect); + + dir1 = widget_dir; + x1_trailing = (widget_dir == GTK_TEXT_DIR_LTR) ? 0 : logical_rect.width; + } + else + { + index = unicode_offset_to_index (entry->text, editable->current_pos - 1); + pango_layout_line_index_to_x (line, index, FALSE, &x1); + pango_layout_line_index_to_x (line, index, TRUE, &x1_trailing); + + dir1 = x1 < x1_trailing ? GTK_TEXT_DIR_LTR : GTK_TEXT_DIR_RTL; + } + + + if (editable->current_pos == entry->text_length) + { + PangoRectangle logical_rect; + pango_layout_line_get_extents (line, NULL, &logical_rect); + + dir2 = widget_dir; + x2 = (widget_dir == GTK_TEXT_DIR_LTR) ? logical_rect.width : 0; + } + else + { + index = unicode_offset_to_index (entry->text, editable->current_pos); + pango_layout_line_index_to_x (line, index, FALSE, &x2); + pango_layout_line_index_to_x (line, index, TRUE, &x2_trailing); + + dir2 = x2 < x2_trailing ? GTK_TEXT_DIR_LTR : GTK_TEXT_DIR_RTL; + } + + if (strong_x) + { + if (dir1 == widget_dir) + *strong_x = x1_trailing / PANGO_SCALE; + else + *strong_x = x2 / PANGO_SCALE; + } + + if (weak_x) + { + if (dir1 == widget_dir) + *weak_x = x2 / PANGO_SCALE; + else + *weak_x = x1_trailing / PANGO_SCALE; + } + } static void entry_adjust_scroll (GtkEntry *entry) { - gint xoffset, max_offset; + GtkWidget *widget; + gint min_offset, max_offset; gint text_area_width; + gint strong_x, weak_x; + gint strong_xoffset, weak_xoffset; + PangoLayoutLine *line; + PangoRectangle logical_rect; g_return_if_fail (entry != NULL); g_return_if_fail (GTK_IS_ENTRY (entry)); - if (!entry->text_area) + widget = GTK_WIDGET (entry); + text_area_width = widget->allocation.width - 2 * (widget->style->klass->xthickness + INNER_BORDER); + + if (!entry->layout) return; - - gdk_window_get_size (entry->text_area, &text_area_width, NULL); - text_area_width -= 2 * INNER_BORDER; - + + line = pango_layout_get_lines (entry->layout)->data; + /* Display as much text as we can */ - max_offset = MAX(0, entry->char_offset[entry->text_length] - text_area_width); - if (entry->scroll_offset > max_offset) - entry->scroll_offset = max_offset; + pango_layout_line_get_extents (line, NULL, &logical_rect); - /* And make sure cursor is on screen. Note that the cursor is + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) + { + min_offset = 0; + max_offset = MAX (min_offset, logical_rect.width / PANGO_SCALE - text_area_width); + } + else + { + max_offset = logical_rect.width / PANGO_SCALE - text_area_width; + min_offset = MIN (0, max_offset); + } + + entry->scroll_offset = CLAMP (entry->scroll_offset, min_offset, max_offset); + + /* And make sure cursors are on screen. Note that the cursor is * actually drawn one pixel into the INNER_BORDER space on * the right, when the scroll is at the utmost right. This * looks better to to me than confining the cursor inside the @@ -1606,43 +1612,39 @@ entry_adjust_scroll (GtkEntry *entry) * on the left. This might need changing if one changed * INNER_BORDER from 2 to 1, as one would do on a * small-screen-real-estate display. + * + * We always make sure that the strong cursor is on screen, and + * put the weak cursor on screen if possible. */ - xoffset = entry->char_offset[GTK_EDITABLE(entry)->current_pos]; - xoffset -= entry->scroll_offset; - if (xoffset < 0) - entry->scroll_offset += xoffset; - else if (xoffset > text_area_width) - entry->scroll_offset += xoffset - text_area_width; + gtk_entry_get_cursor_locations (entry, &strong_x, &weak_x); + + strong_xoffset = strong_x - entry->scroll_offset; - gtk_widget_queue_draw (GTK_WIDGET (entry)); -} - -static void -gtk_entry_grow_text (GtkEntry *entry) -{ - gint previous_size; - gint i; - - g_return_if_fail (entry != NULL); - g_return_if_fail (GTK_IS_ENTRY (entry)); - - previous_size = entry->text_size; - if (!entry->text_size) - entry->text_size = 128; - else - entry->text_size *= 2; - entry->text = g_realloc (entry->text, entry->text_size * sizeof(GdkWChar)); - entry->char_offset = g_realloc (entry->char_offset, - entry->text_size * sizeof(guint)); - - if (entry->text_length == 0) /* initial allocation */ + if (strong_xoffset < 0) { - entry->char_offset[0] = 0; + entry->scroll_offset += strong_xoffset; + strong_xoffset = 0; + } + else if (strong_xoffset > text_area_width) + { + entry->scroll_offset += strong_xoffset - text_area_width; + strong_xoffset = text_area_width; } - for (i = previous_size; i < entry->text_size; i++) - entry->text[i] = '\0'; + weak_xoffset = weak_x - entry->scroll_offset; + + if (weak_xoffset < 0 && strong_xoffset - weak_xoffset <= text_area_width) + { + entry->scroll_offset += weak_xoffset; + } + else if (weak_xoffset > text_area_width && + strong_xoffset - (weak_xoffset - text_area_width) >= 0) + { + entry->scroll_offset += weak_xoffset - text_area_width; + } + + gtk_widget_queue_draw (GTK_WIDGET (entry)); } static void @@ -1651,176 +1653,86 @@ gtk_entry_insert_text (GtkEditable *editable, gint new_text_length, gint *position) { - GdkWChar *text; - gint start_pos; - gint end_pos; - gint last_pos; - gint max_length; - gint i; - - guchar *new_text_nt; - gint insertion_length; - GdkWChar *insertion_text; - + gint index; + gint n_chars; GtkEntry *entry; GtkWidget *widget; g_return_if_fail (editable != NULL); g_return_if_fail (GTK_IS_ENTRY (editable)); + g_return_if_fail (position != NULL); + g_return_if_fail (*position >= 0 || *position < GTK_ENTRY (editable)->text_size); entry = GTK_ENTRY (editable); widget = GTK_WIDGET (editable); - if ((entry->text_length == 0) && (entry->use_wchar == FALSE)) - { - if (!GTK_WIDGET_REALIZED (widget)) - gtk_widget_ensure_style (widget); - if ((widget->style) && (widget->style->font->type == GDK_FONT_FONTSET)) - entry->use_wchar = TRUE; - } - if (new_text_length < 0) - { - new_text_nt = (gchar *)new_text; - new_text_length = strlen (new_text); - if (new_text_length <= 0) return; - } - else if (new_text_length == 0) - { - return; - } - else - { - /* make a null-terminated copy of new_text */ - new_text_nt = g_new (gchar, new_text_length + 1); - memcpy (new_text_nt, new_text, new_text_length); - new_text_nt[new_text_length] = 0; - } - - /* The algorithms here will work as long as, the text size (a - * multiple of 2), fits into a guint16 but we specify a shorter - * maximum length so that if the user pastes a very long text, there - * is not a long hang from the slow X_LOCALE functions. */ - - if (entry->text_max_length == 0) - max_length = 2047; - else - max_length = MIN (2047, entry->text_max_length); + new_text_length = strlen (new_text); - /* Convert to wide characters */ - insertion_text = g_new (GdkWChar, new_text_length); - if (entry->use_wchar) - insertion_length = gdk_mbstowcs (insertion_text, new_text_nt, - new_text_length); - else - for (insertion_length=0; new_text_nt[insertion_length]; insertion_length++) - insertion_text[insertion_length] = new_text_nt[insertion_length]; - if (new_text_nt != (guchar *)new_text) - g_free (new_text_nt); - - /* Make sure we do not exceed the maximum size of the entry. */ - if (insertion_length + entry->text_length > max_length) - insertion_length = max_length - entry->text_length; - - /* Don't insert anything, if there was nothing to insert. */ - if (insertion_length <= 0) + n_chars = unicode_strlen (new_text, new_text_length); + if (entry->text_max_length > 0 && n_chars + entry->text_length > entry->text_max_length) { - g_free(insertion_text); - return; + gdk_beep (); + n_chars = entry->text_max_length - entry->text_length; } - /* Make sure we are inserting at integral character position */ - start_pos = *position; - if (start_pos < 0) - start_pos = 0; - else if (start_pos > entry->text_length) - start_pos = entry->text_length; - - end_pos = start_pos + insertion_length; - last_pos = insertion_length + entry->text_length; - - if (editable->selection_start_pos >= *position) - editable->selection_start_pos += insertion_length; - if (editable->selection_end_pos >= *position) - editable->selection_end_pos += insertion_length; - - while (last_pos >= entry->text_size) - gtk_entry_grow_text (entry); - - text = entry->text; - for (i = last_pos - 1; i >= end_pos; i--) - text[i] = text[i- (end_pos - start_pos)]; - for (i = start_pos; i < end_pos; i++) - text[i] = insertion_text[i - start_pos]; - g_free (insertion_text); - - /* Fix up the the character offsets */ - - if (GTK_WIDGET_REALIZED (entry)) + if (new_text_length + entry->n_bytes + 1 > entry->text_size) { - gint offset = 0; - - for (i = last_pos; i >= end_pos; i--) - entry->char_offset[i] - = entry->char_offset[i - insertion_length]; - - for (i=start_pos; in_bytes + 1 > entry->text_size) { - entry->char_offset[i] = entry->char_offset[start_pos] + offset; - if (editable->visible) - { - offset += gdk_char_width_wc (GTK_WIDGET (entry)->style->font, - entry->text[i]); - } + if (entry->text_size == 0) + entry->text_size = MIN_SIZE; else { - offset += gdk_char_width (GTK_WIDGET (entry)->style->font, '*'); + if (2 * (guint)entry->text_size < MAX_SIZE && + 2 * (guint)entry->text_size > entry->text_size) + entry->text_size *= 2; + else + { + entry->text_size = MAX_SIZE; + new_text_length = entry->text_size - new_text_length - 1; + break; + } } } - for (i = end_pos; i <= last_pos; i++) - entry->char_offset[i] += offset; + + entry->text = g_realloc (entry->text, entry->text_size); } - entry->text_length += insertion_length; - *position = end_pos; + index = unicode_offset_to_index (entry->text, *position); - entry->text_mb_dirty = 1; + g_memmove (entry->text + index + new_text_length, entry->text + index, entry->n_bytes - index); + memcpy (entry->text + index, new_text, new_text_length); + + entry->n_bytes += new_text_length; + entry->text_length += n_chars; + + /* NUL terminate for safety and convenience */ + entry->text[entry->n_bytes] = '\0'; + + if (editable->current_pos > *position) + editable->current_pos += n_chars; + + if (editable->selection_start_pos > *position) + editable->selection_start_pos += n_chars; + + if (editable->selection_end_pos > *position) + editable->selection_end_pos += n_chars; + + *position += n_chars; + + if (entry->layout) + pango_layout_set_text (entry->layout, entry->text, entry->n_bytes); + + gtk_entry_reset_attrs (entry); gtk_entry_queue_draw (entry); } -/* Recompute the x offsets of all characters in the buffer */ -static void -gtk_entry_recompute_offsets (GtkEntry *entry) -{ - gint i; - gint offset = 0; - - for (i=0; itext_length; i++) - { - entry->char_offset[i] = offset; - if (GTK_EDITABLE (entry)->visible) - { - offset += gdk_char_width_wc (GTK_WIDGET (entry)->style->font, - entry->text[i]); - } - else - { - offset += gdk_char_width (GTK_WIDGET (entry)->style->font, '*'); - } - } - - entry->char_offset[i] = offset; -} - static void gtk_entry_delete_text (GtkEditable *editable, gint start_pos, gint end_pos) { - GdkWChar *text; - gint deletion_length; - gint i; - GtkEntry *entry; g_return_if_fail (editable != NULL); @@ -1830,41 +1742,34 @@ gtk_entry_delete_text (GtkEditable *editable, if (end_pos < 0) end_pos = entry->text_length; - - if (editable->selection_start_pos > start_pos) - editable->selection_start_pos -= MIN(end_pos, editable->selection_start_pos) - start_pos; - if (editable->selection_end_pos > start_pos) - editable->selection_end_pos -= MIN(end_pos, editable->selection_end_pos) - start_pos; if ((start_pos < end_pos) && (start_pos >= 0) && (end_pos <= entry->text_length)) { - text = entry->text; - deletion_length = end_pos - start_pos; + gint start_index = unicode_offset_to_index (entry->text, start_pos); + gint end_index = unicode_offset_to_index (entry->text, end_pos); - /* Fix up the character offsets */ - if (GTK_WIDGET_REALIZED (entry)) - { - gint deletion_width = - entry->char_offset[end_pos] - entry->char_offset[start_pos]; + g_memmove (entry->text + start_index, entry->text + end_index, entry->n_bytes - end_index); + entry->text_length -= (end_pos - start_pos); + entry->n_bytes -= (end_index - start_index); + + if (editable->current_pos > start_pos) + editable->current_pos -= MIN (editable->current_pos, end_pos) - start_pos; - for (i = 0 ; i <= entry->text_length - end_pos; i++) - entry->char_offset[start_pos+i] = entry->char_offset[end_pos+i] - deletion_width; - } + if (editable->selection_start_pos > start_pos) + editable->selection_start_pos -= MIN (editable->selection_start_pos, end_pos) - start_pos; - for (i = end_pos; i < entry->text_length; i++) - text[i - deletion_length] = text[i]; + if (editable->selection_end_pos > start_pos) + editable->selection_end_pos -= MIN (editable->selection_end_pos, end_pos) - start_pos; - for (i = entry->text_length - deletion_length; i < entry->text_length; i++) - text[i] = '\0'; - - entry->text_length -= deletion_length; - editable->current_pos = start_pos; } - entry->text_mb_dirty = 1; + gtk_entry_reset_attrs (entry); gtk_entry_queue_draw (entry); + + if (entry->layout) + pango_layout_set_text (entry->layout, entry->text, entry->n_bytes); } static void @@ -1872,7 +1777,10 @@ gtk_entry_update_text (GtkEditable *editable, gint start_pos, gint end_pos) { - gtk_entry_queue_draw (GTK_ENTRY(editable)); + GtkEntry *entry = GTK_ENTRY (editable); + + gtk_entry_reset_attrs (entry); + gtk_entry_queue_draw (entry); } static gchar * @@ -1881,6 +1789,7 @@ gtk_entry_get_chars (GtkEditable *editable, gint end_pos) { GtkEntry *entry; + gint start_index, end_index; g_return_val_if_fail (editable != NULL, NULL); g_return_val_if_fail (GTK_IS_ENTRY (editable), NULL); @@ -1890,35 +1799,13 @@ gtk_entry_get_chars (GtkEditable *editable, if (end_pos < 0) end_pos = entry->text_length; - start_pos = MIN(entry->text_length, start_pos); - end_pos = MIN(entry->text_length, end_pos); + start_pos = MIN (entry->text_length, start_pos); + end_pos = MIN (entry->text_length, end_pos); - if (start_pos <= end_pos) - { - guchar *mbstr; - if (entry->use_wchar) - { - GdkWChar ch; - if (end_pos >= entry->text_size) - gtk_entry_grow_text(entry); - ch = entry->text[end_pos]; - entry->text[end_pos] = 0; - mbstr = gdk_wcstombs (entry->text + start_pos); - entry->text[end_pos] = ch; - return (gchar *)mbstr; - } - else - { - gint i; - mbstr = g_new (gchar, end_pos - start_pos + 1); - for (i=0; itext[start_pos + i]; - mbstr[i] = 0; - return (gchar *)mbstr; - } - } - else - return NULL; + start_index = unicode_offset_to_index (entry->text, start_pos); + end_index = unicode_offset_to_index (entry->text, end_pos); + + return g_strndup (entry->text + start_index, end_index - start_index); } static void @@ -1966,7 +1853,6 @@ static void gtk_move_forward_word (GtkEntry *entry) { GtkEditable *editable; - GdkWChar *text; gint i; editable = GTK_EDITABLE (entry); @@ -1980,23 +1866,33 @@ gtk_move_forward_word (GtkEntry *entry) if (entry->text && (editable->current_pos < entry->text_length)) { - text = entry->text; - i = editable->current_pos; - - if ((entry->use_wchar) ? (!gdk_iswalnum (text[i])) : (!isalnum (text[i]))) - for (; i < entry->text_length; i++) - { - if ((entry->use_wchar) ? gdk_iswalnum (text[i]) : isalnum (text[i])) - break; - } + PangoLogAttr *log_attrs; + gint n_attrs, old_pos; - for (; i < entry->text_length; i++) - { - if ((entry->use_wchar) ? (!gdk_iswalnum (text[i])) : (!isalnum (text[i]))) - break; - } + gtk_entry_ensure_layout (entry); + pango_layout_get_log_attrs (entry->layout, &log_attrs, &n_attrs); - editable->current_pos = i; + i = old_pos = editable->current_pos; + + /* Advance over white space */ + while (i < n_attrs && log_attrs[i].is_white) + i++; + + /* Find the next word beginning */ + i++; + while (i < n_attrs && !log_attrs[i].is_word_stop) + i++; + + editable->current_pos = MAX (entry->text_length, i); + + /* Back up over white space */ + while (i > 0 && log_attrs[i - 1].is_white) + i--; + + if (i != old_pos) + editable->current_pos = i; + + g_free (log_attrs); } } @@ -2004,7 +1900,6 @@ static void gtk_move_backward_word (GtkEntry *entry) { GtkEditable *editable; - GdkWChar *text; gint i; editable = GTK_EDITABLE (entry); @@ -2018,27 +1913,19 @@ gtk_move_backward_word (GtkEntry *entry) if (entry->text && editable->current_pos > 0) { - text = entry->text; + PangoLogAttr *log_attrs; + gint n_attrs; + + gtk_entry_ensure_layout (entry); + pango_layout_get_log_attrs (entry->layout, &log_attrs, &n_attrs); + i = editable->current_pos - 1; - if ((entry->use_wchar) ? (!gdk_iswalnum (text[i])) : (!isalnum (text[i]))) - for (; i >= 0; i--) - { - if ((entry->use_wchar) ? gdk_iswalnum (text[i]) : isalnum (text[i])) - break; - } - for (; i >= 0; i--) - { - if ((entry->use_wchar) ? (!gdk_iswalnum (text[i])) : (!isalnum (text[i]))) - { - i++; - break; - } - } - - if (i < 0) - i = 0; - - editable->current_pos = i; + + /* Find the previous word beginning */ + while (i > 0 && !log_attrs[i].is_word_stop) + i--; + + g_free (log_attrs); } } @@ -2206,15 +2093,21 @@ gtk_entry_set_selection (GtkEditable *editable, gint start, gint end) { + GtkEntry *entry; + g_return_if_fail (editable != NULL); g_return_if_fail (GTK_IS_ENTRY (editable)); + entry = GTK_ENTRY (editable); + if (end < 0) end = GTK_ENTRY (editable)->text_length; editable->selection_start_pos = start; editable->selection_end_pos = end; + gtk_entry_reset_attrs (entry); + gtk_entry_queue_draw (GTK_ENTRY (editable)); } @@ -2234,60 +2127,17 @@ gtk_entry_set_max_length (GtkEntry *entry, g_return_if_fail (GTK_IS_ENTRY (entry)); if (max && entry->text_length > max) - gtk_editable_delete_text(GTK_EDITABLE(entry), max, -1); + gtk_editable_delete_text (GTK_EDITABLE(entry), max, -1); + entry->text_max_length = max; } -#ifdef USE_XIM -static void -gtk_entry_update_ic_attr (GtkWidget *widget) -{ - GtkEditable *editable = (GtkEditable *) widget; - GdkICAttributesType mask = 0; - - if (editable->ic == NULL) - return; - - gdk_ic_get_attr (editable->ic, editable->ic_attr, - GDK_IC_PREEDIT_FOREGROUND | - GDK_IC_PREEDIT_BACKGROUND | - GDK_IC_PREEDIT_FONTSET); - - if (editable->ic_attr->preedit_foreground.pixel != - widget->style->fg[GTK_STATE_NORMAL].pixel) - { - mask |= GDK_IC_PREEDIT_FOREGROUND; - editable->ic_attr->preedit_foreground - = widget->style->fg[GTK_STATE_NORMAL]; - } - if (editable->ic_attr->preedit_background.pixel != - widget->style->base[GTK_STATE_NORMAL].pixel) - { - mask |= GDK_IC_PREEDIT_BACKGROUND; - editable->ic_attr->preedit_background - = widget->style->base[GTK_STATE_NORMAL]; - } - if ((gdk_ic_get_style (editable->ic) & GDK_IM_PREEDIT_POSITION) && - widget->style->font != NULL && - widget->style->font->type == GDK_FONT_FONTSET && - !gdk_font_equal (editable->ic_attr->preedit_fontset, - widget->style->font)) - { - mask |= GDK_IC_PREEDIT_FONTSET; - editable->ic_attr->preedit_fontset = widget->style->font; - } - - if (mask) - gdk_ic_set_attr (editable->ic, editable->ic_attr, mask); -} -#endif /* USE_XIM */ static void gtk_entry_style_set (GtkWidget *widget, GtkStyle *previous_style) { GtkEntry *entry; - gint scroll_char; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_ENTRY (widget)); @@ -2296,17 +2146,10 @@ gtk_entry_style_set (GtkWidget *widget, { entry = GTK_ENTRY (widget); - scroll_char = gtk_entry_find_position (entry, entry->scroll_offset); - gtk_entry_recompute_offsets (GTK_ENTRY (widget)); - entry->scroll_offset = entry->char_offset[scroll_char]; entry_adjust_scroll (entry); gdk_window_set_background (widget->window, &widget->style->base[GTK_WIDGET_STATE (widget)]); gdk_window_set_background (entry->text_area, &widget->style->base[GTK_WIDGET_STATE (widget)]); - -#ifdef USE_XIM - gtk_entry_update_ic_attr (widget); -#endif } } @@ -2321,12 +2164,9 @@ gtk_entry_state_changed (GtkWidget *widget, { gdk_window_set_background (widget->window, &widget->style->base[GTK_WIDGET_STATE (widget)]); gdk_window_set_background (GTK_ENTRY (widget)->text_area, &widget->style->base[GTK_WIDGET_STATE (widget)]); - -#ifdef USE_XIM - gtk_entry_update_ic_attr (widget); -#endif } if (GTK_WIDGET_DRAWABLE (widget)) gtk_widget_queue_clear(widget); } + diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h index 7ef9f158df..20977cea19 100644 --- a/gtk/gtkentry.h +++ b/gtk/gtkentry.h @@ -30,7 +30,7 @@ #include #include - +#include #ifdef __cplusplus extern "C" { @@ -55,27 +55,20 @@ struct _GtkEntry GdkWindow *text_area; GdkPixmap *backing_pixmap; GdkCursor *cursor; - GdkWChar *text; + gchar *text; - guint16 text_size; /* allocated size */ - guint16 text_length; /* length in use */ + guint16 text_size; /* allocated size, in bytes */ + + guint16 text_length; /* length in use, in chars */ guint16 text_max_length; - gint scroll_offset; - guint visible : 1; /* deprecated - see editable->visible */ - guint32 timer; + + /*< private >*/ guint button; - - /* The x-offset of each character (including the last insertion position) - * only valid when the widget is realized */ - gint *char_offset; - - /* Same as 'text', but in multibyte */ - gchar *text_mb; - /* If true, 'text' and 'text_mb' are not coherent */ - guint text_mb_dirty : 1; - /* If true, we use the encoding of wchar_t as the encoding of 'text'. - * Otherwise we use the encoding of multi-byte characters instead. */ - guint use_wchar : 1; + guint32 timer; + guint16 n_bytes; /* length in use, in bytes */ + PangoLayout *layout; + gint scroll_offset; + gint ascent; /* font ascent, in pango units */ }; struct _GtkEntryClass diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h index feb22aa001..39d999b3ac 100644 --- a/gtk/gtkenums.h +++ b/gtk/gtkenums.h @@ -77,6 +77,14 @@ typedef enum GTK_DIR_RIGHT } GtkDirectionType; +/* Reading directions for text */ +typedef enum +{ + GTK_TEXT_DIR_NONE, + GTK_TEXT_DIR_RTL, + GTK_TEXT_DIR_LTR +} GtkTextDirection; + /* justification for label and maybe other widgets (text?) */ typedef enum { diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index dc3ca9788f..e89c62cef6 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -354,29 +354,36 @@ gtk_frame_paint (GtkWidget *widget, if (frame->label) { - label_area_width = (widget->allocation.width - - GTK_CONTAINER (frame)->border_width * 2 - - widget->style->klass->xthickness * 2); - - x2 = ((label_area_width - frame->label_width) * frame->label_xalign + - GTK_CONTAINER (frame)->border_width + widget->style->klass->xthickness); - y2 = (GTK_CONTAINER (frame)->border_width + widget->style->font->ascent); + gfloat xalign; - gtk_paint_shadow_gap (widget->style, widget->window, - GTK_STATE_NORMAL, frame->shadow_type, - area, widget, "frame", - widget->allocation.x + x, - widget->allocation.y + y + height_extra / 2, - widget->allocation.width - x * 2, - widget->allocation.height - y * 2 - height_extra / 2, - GTK_POS_TOP, - x2 + 2 - x, frame->label_width - 4); + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) + xalign = frame->label_xalign; + else + xalign = 1 - frame->label_xalign; + + label_area_width = (widget->allocation.width - + GTK_CONTAINER (frame)->border_width * 2 - + widget->style->klass->xthickness * 2); - gtk_paint_string (widget->style, widget->window, GTK_WIDGET_STATE (widget), - area, widget, "frame", - widget->allocation.x + x2 + 3, - widget->allocation.y + y2, - frame->label); + x2 = ((label_area_width - frame->label_width) * xalign + + GTK_CONTAINER (frame)->border_width + widget->style->klass->xthickness); + y2 = (GTK_CONTAINER (frame)->border_width + widget->style->font->ascent); + + gtk_paint_shadow_gap (widget->style, widget->window, + GTK_STATE_NORMAL, frame->shadow_type, + area, widget, "frame", + widget->allocation.x + x, + widget->allocation.y + y + height_extra / 2, + widget->allocation.width - x * 2, + widget->allocation.height - y * 2 - height_extra / 2, + GTK_POS_TOP, + x2 + 2 - x, frame->label_width - 4); + + gtk_paint_string (widget->style, widget->window, GTK_WIDGET_STATE (widget), + area, widget, "frame", + widget->allocation.x + x2 + 3, + widget->allocation.y + y2, + frame->label); } else gtk_paint_shadow (widget->style, widget->window, diff --git a/gtk/gtkhbbox.c b/gtk/gtkhbbox.c index 8ba84d7089..a86652ebf6 100644 --- a/gtk/gtkhbbox.c +++ b/gtk/gtkhbbox.c @@ -272,8 +272,14 @@ gtk_hbutton_box_size_allocate (GtkWidget *widget, { child_allocation.width = child_width; child_allocation.height = child_height; - child_allocation.x = x; + + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) + child_allocation.x = x; + else + child_allocation.x = allocation->x + allocation->width - (x - allocation->x + child_width); + child_allocation.y = y; + gtk_widget_size_allocate (child->widget, &child_allocation); x += childspace; } diff --git a/gtk/gtkhbox.c b/gtk/gtkhbox.c index 89c96aa569..467c45109d 100644 --- a/gtk/gtkhbox.c +++ b/gtk/gtkhbox.c @@ -163,6 +163,7 @@ gtk_hbox_size_allocate (GtkWidget *widget, gint width; gint extra; gint x; + GtkTextDirection direction; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_HBOX (widget)); @@ -171,6 +172,8 @@ gtk_hbox_size_allocate (GtkWidget *widget, box = GTK_BOX (widget); widget->allocation = *allocation; + direction = gtk_widget_get_direction (widget); + nvis_children = 0; nexpand_children = 0; children = box->children; @@ -264,6 +267,9 @@ gtk_hbox_size_allocate (GtkWidget *widget, child_allocation.x = x + (child_width - child_allocation.width) / 2; } + if (direction == GTK_TEXT_DIR_RTL) + child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width; + gtk_widget_size_allocate (child->widget, &child_allocation); x += child_width + box->spacing; @@ -320,6 +326,9 @@ gtk_hbox_size_allocate (GtkWidget *widget, child_allocation.x = x + (child_width - child_allocation.width) / 2 - child_width; } + if (direction == GTK_TEXT_DIR_RTL) + child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width; + gtk_widget_size_allocate (child->widget, &child_allocation); x -= (child_width + box->spacing); diff --git a/gtk/gtkhscale.c b/gtk/gtkhscale.c index 51037cb579..0adfdcc599 100644 --- a/gtk/gtkhscale.c +++ b/gtk/gtkhscale.c @@ -29,7 +29,6 @@ #include "gtksignal.h" #include "gdk/gdkkeysyms.h" - #define SCALE_CLASS(w) GTK_SCALE_CLASS (GTK_OBJECT (w)->klass) #define RANGE_CLASS(w) GTK_RANGE_CLASS (GTK_OBJECT (w)->klass) @@ -314,7 +313,6 @@ gtk_hscale_size_request (GtkWidget *widget, GtkRequisition *requisition) { GtkScale *scale; - gint value_width; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_HSCALE (widget)); @@ -326,24 +324,25 @@ gtk_hscale_size_request (GtkWidget *widget, widget->style->klass->xthickness) * 2; requisition->height = (RANGE_CLASS (scale)->slider_width + widget->style->klass->ythickness * 2); - + if (scale->draw_value) { - value_width = gtk_scale_get_value_width (scale); + gint value_width, value_height; + gtk_scale_get_value_size (scale, &value_width, &value_height); if ((scale->value_pos == GTK_POS_LEFT) || (scale->value_pos == GTK_POS_RIGHT)) { requisition->width += value_width + SCALE_CLASS (scale)->value_spacing; - if (requisition->height < (widget->style->font->ascent + widget->style->font->descent)) - requisition->height = widget->style->font->ascent + widget->style->font->descent; + if (requisition->height < value_height) + requisition->height = value_height; } else if ((scale->value_pos == GTK_POS_TOP) || (scale->value_pos == GTK_POS_BOTTOM)) { if (requisition->width < value_width) requisition->width = value_width; - requisition->height += widget->style->font->ascent + widget->style->font->descent; + requisition->height += value_height; } } } @@ -398,23 +397,25 @@ gtk_hscale_pos_trough (GtkHScale *hscale, if (scale->draw_value) { + gint value_width, value_height; + gtk_scale_get_value_size (scale, &value_width, &value_height); + *x = 0; *y = 0; switch (scale->value_pos) { case GTK_POS_LEFT: - *x += gtk_scale_get_value_width (scale) + SCALE_CLASS (scale)->value_spacing; + *x += value_width + SCALE_CLASS (scale)->value_spacing; *y = (widget->allocation.height - *h) / 2; *w -= *x; break; case GTK_POS_RIGHT: - *w -= gtk_scale_get_value_width (scale) + SCALE_CLASS (scale)->value_spacing; + *w -= value_width + SCALE_CLASS (scale)->value_spacing; *y = (widget->allocation.height - *h) / 2; break; case GTK_POS_TOP: - *y = (widget->style->font->ascent + widget->style->font->descent + - (widget->allocation.height - widget->requisition.height) / 2); + *y = (value_height + (widget->allocation.height - widget->requisition.height) / 2); break; case GTK_POS_BOTTOM: *y = (widget->allocation.height - widget->requisition.height) / 2; @@ -510,7 +511,6 @@ gtk_hscale_draw_value (GtkScale *scale) GtkStateType state_type; GtkWidget *widget; gchar buffer[32]; - gint text_width; gint width, height; gint x, y; @@ -521,30 +521,30 @@ gtk_hscale_draw_value (GtkScale *scale) if (scale->draw_value) { - sprintf (buffer, "%0.*f", GTK_RANGE (scale)->digits, GTK_RANGE (scale)->adjustment->value); - text_width = gdk_string_measure (GTK_WIDGET (scale)->style->font, buffer); + PangoLayout *layout; + PangoRectangle logical_rect; + sprintf (buffer, "%0.*f", GTK_RANGE (scale)->digits, GTK_RANGE (scale)->adjustment->value); + + layout = gtk_widget_create_pango_layout (widget); + pango_layout_set_text (layout, buffer, strlen (buffer)); + pango_layout_get_extents (layout, NULL, &logical_rect); + switch (scale->value_pos) { case GTK_POS_LEFT: gdk_window_get_position (GTK_RANGE (scale)->trough, &x, &y); gdk_window_get_size (GTK_RANGE (scale)->trough, &width, &height); - x -= SCALE_CLASS (scale)->value_spacing + text_width; - y += ((height - - (GTK_WIDGET (scale)->style->font->ascent + - GTK_WIDGET (scale)->style->font->descent)) / 2 + - GTK_WIDGET (scale)->style->font->ascent); + x -= SCALE_CLASS (scale)->value_spacing + logical_rect.width / 1000; + y += (height - logical_rect.height / 1000) / 2; break; case GTK_POS_RIGHT: gdk_window_get_position (GTK_RANGE (scale)->trough, &x, &y); gdk_window_get_size (GTK_RANGE (scale)->trough, &width, &height); x += width + SCALE_CLASS (scale)->value_spacing; - y += ((height - - (GTK_WIDGET (scale)->style->font->ascent + - GTK_WIDGET (scale)->style->font->descent)) / 2 + - GTK_WIDGET (scale)->style->font->ascent); + y += (height - logical_rect.height / 1000) / 2; break; case GTK_POS_TOP: gdk_window_get_position (GTK_RANGE (scale)->slider, &x, NULL); @@ -552,10 +552,10 @@ gtk_hscale_draw_value (GtkScale *scale) gdk_window_get_size (GTK_RANGE (scale)->slider, &width, NULL); gdk_window_get_size (GTK_RANGE (scale)->trough, NULL, &height); - x += widget->allocation.x + (width - text_width) / 2; + x += widget->allocation.x + (width - logical_rect.width / 1000) / 2; x = CLAMP (x, widget->allocation.x, - widget->allocation.x + widget->allocation.width - text_width); - y -= GTK_WIDGET (scale)->style->font->descent; + widget->allocation.x + widget->allocation.width - logical_rect.width / 1000); + y -= logical_rect.height / 1000; break; case GTK_POS_BOTTOM: gdk_window_get_position (GTK_RANGE (scale)->slider, &x, NULL); @@ -563,22 +563,30 @@ gtk_hscale_draw_value (GtkScale *scale) gdk_window_get_size (GTK_RANGE (scale)->slider, &width, NULL); gdk_window_get_size (GTK_RANGE (scale)->trough, NULL, &height); - x += widget->allocation.x + (width - text_width) / 2; + x += widget->allocation.x + (width - logical_rect.width / 1000) / 2; x = CLAMP (x, widget->allocation.x, - widget->allocation.x + widget->allocation.width - text_width); - y += height + GTK_WIDGET (scale)->style->font->ascent; + widget->allocation.x + widget->allocation.width - logical_rect.width / 1000); + y += height; break; } state_type = GTK_STATE_NORMAL; if (!GTK_WIDGET_IS_SENSITIVE (scale)) state_type = GTK_STATE_INSENSITIVE; - + +#if 0 gtk_paint_string (GTK_WIDGET (scale)->style, GTK_WIDGET (scale)->window, state_type, NULL, GTK_WIDGET (scale), "hscale", x, y, buffer); +#endif + + gdk_draw_layout (GTK_WIDGET (scale)->window, + GTK_WIDGET (scale)->style->fg_gc [state_type], + x, y, layout); + + pango_layout_unref (layout); } } diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 697f5e10b0..c4bcbfd157 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -28,6 +28,9 @@ #include "gtklabel.h" #include "gdk/gdkkeysyms.h" #include "gdk/gdki18n.h" +#include +#include + enum { ARG_0, @@ -37,35 +40,6 @@ enum { ARG_WRAP }; -typedef struct _GtkLabelULine GtkLabelULine; -struct _GtkLabelWord -{ - GdkWChar *beginning; - gint length; - - /* FIXME: - * We need (space,width) only before we've set (x,y), so to save - * memory, these pairs should really be wrapped in a union. - * I haven't yet figured out how to do this without making the code - * look ugly. - */ - gint space; - gint width; - gint x; - gint y; - GtkLabelWord *next; - gint uline_y; - GtkLabelULine *uline; -}; - -struct _GtkLabelULine -{ - gint x1; - gint x2; - gint y; - GtkLabelULine *next; -}; - static void gtk_label_class_init (GtkLabelClass *klass); static void gtk_label_init (GtkLabel *label); static void gtk_label_set_arg (GtkObject *object, @@ -82,18 +56,9 @@ static void gtk_label_style_set (GtkWidget *widget, static gint gtk_label_expose (GtkWidget *widget, GdkEventExpose *event); -static GtkLabelWord* gtk_label_word_alloc (void); -static GtkLabelULine* gtk_label_uline_alloc (void); -static void gtk_label_free_words (GtkLabel *label); -static void gtk_label_free_ulines (GtkLabelWord *word); -static gint gtk_label_split_text (GtkLabel *label); - static GtkMiscClass *parent_class = NULL; -static GMemChunk *word_chunk = NULL; -static GMemChunk *uline_chunk = NULL; - GtkType gtk_label_get_type (void) { @@ -208,14 +173,13 @@ gtk_label_init (GtkLabel *label) GTK_WIDGET_SET_FLAGS (label, GTK_NO_WINDOW); label->label = NULL; - label->label_wc = NULL; label->pattern = NULL; - label->words = NULL; - - label->max_width = 0; label->jtype = GTK_JUSTIFY_CENTER; label->wrap = FALSE; + + label->layout = NULL; + label->rtl = (gtk_widget_get_direction (GTK_WIDGET (label)) == GTK_TEXT_DIR_RTL); gtk_label_set_text (label, ""); } @@ -235,16 +199,13 @@ gtk_label_new (const gchar *str) static inline void gtk_label_set_text_internal (GtkLabel *label, - gchar *str, - GdkWChar *str_wc) + gchar *str) { - gtk_label_free_words (label); - g_free (label->label); - g_free (label->label_wc); - + label->label = str; - label->label_wc = str_wc; + if (label->layout) + pango_layout_set_text (label->layout, str, strlen (str)); gtk_widget_queue_resize (GTK_WIDGET (label)); } @@ -253,28 +214,9 @@ void gtk_label_set_text (GtkLabel *label, const gchar *str) { - GdkWChar *str_wc; - gint len; - gint wc_len; - g_return_if_fail (GTK_IS_LABEL (label)); - if (!str) - str = ""; - if (!label->label || strcmp (label->label, str)) - { - /* Convert text to wide characters */ - len = strlen (str); - str_wc = g_new (GdkWChar, len + 1); - wc_len = gdk_mbstowcs (str_wc, str, len + 1); - if (wc_len >= 0) - { - str_wc[wc_len] = '\0'; - gtk_label_set_text_internal (label, g_strdup (str), str_wc); - } - else - g_free (str_wc); - } + gtk_label_set_text_internal (label, g_strdup (str ? str : "")); } void @@ -283,8 +225,6 @@ gtk_label_set_pattern (GtkLabel *label, { g_return_if_fail (GTK_IS_LABEL (label)); - gtk_label_free_words (label); - g_free (label->pattern); label->pattern = g_strdup (pattern); @@ -300,10 +240,15 @@ gtk_label_set_justify (GtkLabel *label, if ((GtkJustification) label->jtype != jtype) { - gtk_label_free_words (label); - label->jtype = jtype; + if (label->layout) + { + /* No real need to be this drastic, but easier than duplicating the code */ + pango_layout_unref (label->layout); + label->layout = NULL; + } + gtk_widget_queue_resize (GTK_WIDGET (label)); } } @@ -318,8 +263,6 @@ gtk_label_set_line_wrap (GtkLabel *label, if (label->wrap != wrap) { - gtk_label_free_words (label); - label->wrap = wrap; gtk_widget_queue_resize (GTK_WIDGET (label)); @@ -348,427 +291,53 @@ gtk_label_finalize (GtkObject *object) label = GTK_LABEL (object); g_free (label->label); - g_free (label->label_wc); g_free (label->pattern); - gtk_label_free_words (label); + if (label->layout) + pango_layout_unref (label->layout); GTK_OBJECT_CLASS (parent_class)->finalize (object); } -static GtkLabelULine* -gtk_label_uline_alloc (void) +static PangoAttrList * +gtk_label_pattern_to_attrs (GtkLabel *label) { - GtkLabelULine *uline; - - if (!uline_chunk) - uline_chunk = g_mem_chunk_create (GtkLabelWord, 32, G_ALLOC_AND_FREE); + PangoAttrList *attrs = pango_attr_list_new (); - uline = g_chunk_new0 (GtkLabelULine, uline_chunk); - - uline->next = NULL; - - return uline; -} - -static void -gtk_label_free_ulines (GtkLabelWord *word) -{ - while (word->uline) + if (label->pattern) { - GtkLabelULine *uline = word->uline; + const char *start; + const char *p = label->label; + const char *q = label->pattern; - word->uline = uline->next; - g_chunk_free (uline, uline_chunk); - } -} - -static GtkLabelWord* -gtk_label_word_alloc (void) -{ - GtkLabelWord * word; - - if (!word_chunk) - word_chunk = g_mem_chunk_create (GtkLabelWord, 32, G_ALLOC_AND_FREE); - - word = g_chunk_new0 (GtkLabelWord, word_chunk); - - word->beginning = NULL; - word->next = NULL; - word->uline = NULL; - - return word; -} - -static void -gtk_label_free_words (GtkLabel *label) -{ - while (label->words) - { - GtkLabelWord *word = label->words; - - label->words = word->next; - - gtk_label_free_ulines (word); - - g_chunk_free (word, word_chunk); - } -} - -static gint -gtk_label_split_text (GtkLabel *label) -{ - GtkLabelWord *word, **tailp; - gint space_width, line_width, max_line_width; - GdkWChar *str, *p; - - gtk_label_free_words (label); - if (label->label == NULL) - return 0; - - /* Split text at new-lines. */ - space_width = gdk_string_width (GTK_WIDGET (label)->style->font, " "); - - line_width = 0; - max_line_width = 0; - tailp = &label->words; - str = label->label_wc; - - while (*str) - { - word = gtk_label_word_alloc (); - - if (str == label->label_wc || str[-1] == '\n') + while (1) { - /* Paragraph break */ - word->space = 0; - - max_line_width = MAX (line_width, max_line_width); - line_width = 0; - } - else if (str[0] == ' ') - { - while (str[0] == ' ') + while (*p && *q && *q != '_') { - str++; - word->space += space_width; + p = unicode_next_utf8 (p); + q++; } - } - else - { - /* Regular inter-word space */ - word->space = space_width; - } - - word->beginning = str; - - word->length = 0; - p = word->beginning; - while (*p && *p != '\n') - { - word->length++; - p++; - } - - word->width = gdk_text_width_wc (GTK_WIDGET (label)->style->font, str, word->length); - - str += word->length; - if (*str) - str++; - - line_width += word->space + word->width; - - *tailp = word; - tailp = &word->next; - } - - /* Add an empty word to represent an empty line - */ - if (str == label->label_wc || str[-1] == '\n') - { - word = gtk_label_word_alloc (); - - word->space = 0; - word->beginning = str; - word->length = 0; - word->width = 0; - - *tailp = word; - tailp = &word->next; - } - - return MAX (line_width, max_line_width); -} - -/* this needs to handle white space better. */ -static gint -gtk_label_split_text_wrapped (GtkLabel *label) -{ - GtkLabelWord *word, **tailp; - gint space_width, line_width, max_line_width; - GdkWChar *str, *p; - - gtk_label_free_words (label); - if (label->label == NULL) - return 0; - - /* Split text at new-lines. (Or at spaces in the case of paragraphs). */ - space_width = gdk_string_width (GTK_WIDGET (label)->style->font, " "); - - line_width = 0; - max_line_width = 0; - tailp = &label->words; - str = label->label_wc; - while (*str) - { - word = gtk_label_word_alloc (); - - if (str == label->label_wc || str[-1] == '\n') - { - /* Paragraph break */ - word->space = 0; - - max_line_width = MAX (line_width, max_line_width); - line_width = 0; - } - else if (str[0] == ' ') - { - gint nspaces = 0; - - while (str[0] == ' ') + start = p; + while (*p && *q && *q == '_') { - nspaces++; - str++; + p = unicode_next_utf8 (p); + q++; + } + + if (p > start) + { + PangoAttribute *attr = pango_attr_underline_new (PANGO_UNDERLINE_LOW); + attr->start_index = start - label->label; + attr->end_index = p - label->label; + + pango_attr_list_insert (attrs, attr); } - - if (label->jtype == GTK_JUSTIFY_FILL) - word->space = (space_width * 3 + 1) / 2; else - word->space = space_width * nspaces; - } - else - { - /* Regular inter-word space */ - word->space = space_width; - } - - word->beginning = str; - word->length = 0; - p = word->beginning; - while (*p && !gdk_iswspace (*p)) - { - word->length++; - p++; - } - word->width = gdk_text_width_wc (GTK_WIDGET (label)->style->font, str, word->length); - - str += word->length; - if (*str) - str++; - - line_width += word->space + word->width; - - *tailp = word; - tailp = &word->next; - } - - return MAX (line_width, max_line_width); -} - -/* gtk_label_pick_width - * - * Split paragraphs, trying to make each line at least min_width, - * and trying even harder to make each line no longer than max_width. - * - * Returns the length of the longest resulting line. - * - * (The reason we go to all this effort to pick a paragraph width is to - * try to avoid the lame look of a short paragraph with a - * short final line.) - */ -static gint -gtk_label_pick_width (GtkLabel *label, - gint min_width, - gint max_width) -{ - GtkLabelWord *word; - gint width, line_width; - - g_return_val_if_fail (label->wrap, min_width); - - line_width = 0; - width = 0; - for (word = label->words; word; word = word->next) - { - if (word->space == 0 - || (line_width - && (line_width >= min_width - || line_width + word->width + word->space > max_width))) - { - /* New line */ - width = MAX (width, line_width); - line_width = 0; - } - line_width += word->space + word->width; - } - - return MAX (width, line_width); -} - -/* Here, we finalize the lines. - * This is only for non-wrap labels. Wrapped labels - * use gtk_label_finalize_wrap instead. - */ -static void -gtk_label_finalize_lines (GtkLabel *label, - GtkRequisition *requisition, - gint max_line_width) -{ - GtkLabelWord *line; - gint y, baseline_skip, y_max; - gint i, j; - gchar *ptrn; - - g_return_if_fail (!label->wrap); - ptrn = label->pattern; - - y = 0; - baseline_skip = (GTK_WIDGET (label)->style->font->ascent + - GTK_WIDGET (label)->style->font->descent + 2); - - for (line = label->words; line; line = line->next) - { - if (label->jtype == GTK_JUSTIFY_CENTER) - line->x = (max_line_width - line->width) / 2; - else if (label->jtype == GTK_JUSTIFY_RIGHT) - line->x = max_line_width - line->width; - else - line->x = 0; - - line->y = y + GTK_WIDGET (label)->style->font->ascent + 1; - y_max = 0; - - /* now we deal with the underline stuff; */ - if (ptrn && ptrn[0] != '\0') - { - for (i = 0; i < line->length; i++) - { - if (ptrn[i] == '\0') - break; - else if (ptrn[i] == '_') - { - gint descent; - gint rbearing; - gint lbearing; - gint width; - gint offset; - GtkLabelULine *uline; - - for (j = i + 1; j < line->length; j++) - { - if (ptrn[j] == '\0') - break; - else if (ptrn[j] == ' ') - break; - } - - /* good. Now we have an underlined segment. - * let's measure it and record it. - */ - offset = gdk_text_width_wc (GTK_WIDGET (label)->style->font, - line->beginning, - i); - gdk_text_extents_wc (GTK_WIDGET (label)->style->font, - line->beginning+i, - j-i, &lbearing, - &rbearing, &width, NULL, - &descent); - y_max = MAX (descent + 2, y_max); - uline = gtk_label_uline_alloc (); - uline->x1 = offset + line->x + lbearing - 1; - uline->x2 = offset + line->x + rbearing; - uline->y = line->y + descent + 2; - uline->next = line->uline; - line->uline = uline; - i = j - 1; - } - } - if (strlen (ptrn) > line->length) - /* the + 1 is for line breaks. */ - ptrn += line->length + 1; - else - ptrn = NULL; - } - y += (baseline_skip + y_max); - } - - label->max_width = max_line_width; - requisition->width = max_line_width + 2 * label->misc.xpad; - requisition->height = y + 2 * label->misc.ypad; -} - -/* this finalizes word-wrapped words */ -static void -gtk_label_finalize_lines_wrap (GtkLabel *label, - GtkRequisition *requisition, - gint max_line_width) -{ - GtkLabelWord *word, *line, *next_line; - GtkWidget *widget; - gchar *ptrn; - gint x, y, space, extra_width, add_space, baseline_skip; - - g_return_if_fail (label->wrap); - - ptrn = label->pattern; - y = 0; - baseline_skip = (GTK_WIDGET (label)->style->font->ascent + - GTK_WIDGET (label)->style->font->descent + 1); - - for (line = label->words; line != 0; line = next_line) - { - space = 0; - extra_width = max_line_width - line->width; - - for (next_line = line->next; next_line; next_line = next_line->next) - { - if (next_line->space == 0) - break; /* New paragraph */ - if (next_line->space + next_line->width > extra_width) break; - extra_width -= next_line->space + next_line->width; - space += next_line->space; } - - line->x = 0; - line->y = y + GTK_WIDGET (label)->style->font->ascent + 1; - x = line->width; - add_space = 0; - - for (word = line->next; word != next_line; word = word->next) - { - if (next_line && next_line->space) - { - /* Not last line of paragraph --- fill line if needed */ - if (label->jtype == GTK_JUSTIFY_FILL) { - add_space = (extra_width * word->space + space / 2) / space; - extra_width -= add_space; - space -= word->space; - } - } - - word->x = x + word->space + add_space; - word->y = line->y; - x = word->x + word->width; - } - - y += (baseline_skip); } - - label->max_width = max_line_width; - widget = GTK_WIDGET (label); - requisition->width = max_line_width + 2 * label->misc.xpad; - requisition->height = y + 2 * label->misc.ypad + 1; + + return attrs; } static void @@ -776,6 +345,7 @@ gtk_label_size_request (GtkWidget *widget, GtkRequisition *requisition) { GtkLabel *label; + PangoRectangle logical_rect; g_return_if_fail (GTK_IS_LABEL (widget)); g_return_if_fail (requisition != NULL); @@ -802,43 +372,143 @@ gtk_label_size_request (GtkWidget *widget, * Too much of a pain to detect all these case, so always re-fill. I * don't think it's really that slow. */ + + requisition->width = label->misc.xpad; + requisition->height = label->misc.ypad; + + /* Detect direction changes. FIXME: make this a signal + */ + if (label->rtl != (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) && + label->layout) + { + label->rtl = !label->rtl; + pango_layout_unref (label->layout); + label->layout = NULL; + } + if (!label->layout) + { + PangoAlignment align = PANGO_ALIGN_LEFT; /* Quiet gcc */ + PangoAttrList *attrs = gtk_label_pattern_to_attrs (label); + + label->layout = gtk_widget_create_pango_layout (widget); + pango_layout_set_attributes (label->layout, attrs); + pango_attr_list_unref (attrs); + + pango_layout_set_text (label->layout, label->label, strlen (label->label)); + + switch (label->jtype) + { + case GTK_JUSTIFY_LEFT: + align = PANGO_ALIGN_LEFT; + break; + case GTK_JUSTIFY_RIGHT: + align = PANGO_ALIGN_RIGHT; + break; + case GTK_JUSTIFY_CENTER: + align = PANGO_ALIGN_LEFT; + break; + case GTK_JUSTIFY_FILL: + /* FIXME: This just doesn't work to do this */ + align = PANGO_ALIGN_LEFT; + pango_layout_set_justify (label->layout, TRUE); + break; + default: + g_assert_not_reached(); + } + + pango_layout_set_alignment (label->layout, align); + } + if (label->wrap) { GtkWidgetAuxInfo *aux_info; gint longest_paragraph; - - longest_paragraph = gtk_label_split_text_wrapped (label); - + gint width, height; + aux_info = gtk_object_get_data (GTK_OBJECT (widget), "gtk-aux-info"); if (aux_info && aux_info->width > 0) { - label->max_width = MAX (aux_info->width - 2 * label->misc.xpad, 1); - gtk_label_split_text_wrapped (label); + pango_layout_set_width (label->layout, aux_info->width * 1000); + pango_layout_get_extents (label->layout, NULL, &logical_rect); + + requisition->width += aux_info->width; + requisition->height += logical_rect.height / 1000; } else { - label->max_width = gdk_string_width (GTK_WIDGET (label)->style->font, - "This is a good enough length for any line to have."); - label->max_width = MIN (label->max_width, (gdk_screen_width () + 1) / 2); - label->max_width = MIN (label->max_width, longest_paragraph); + pango_layout_set_width (label->layout, -1); + pango_layout_get_extents (label->layout, NULL, &logical_rect); + + width = logical_rect.width; + height = logical_rect.height; + + /* Try to guess a reasonable maximum width + */ + longest_paragraph = width; + + width = MIN (width, + 1000 * gdk_string_width (GTK_WIDGET (label)->style->font, + "This long string gives a good enough length for any line to have.")); + width = MIN (width, + 1000 * (gdk_screen_width () + 1) / 2); + + pango_layout_set_width (label->layout, width); + pango_layout_get_extents (label->layout, NULL, &logical_rect); + height = logical_rect.height; + + /* Unfortunately, the above may leave us with a very unbalanced looking paragraph, + * so we try short search for a narrower width that leaves us with the same height + */ if (longest_paragraph > 0) { gint nlines, perfect_width; - - nlines = (longest_paragraph + label->max_width - 1) / label->max_width; + + nlines = (longest_paragraph + width - 1) / width; perfect_width = (longest_paragraph + nlines - 1) / nlines; - label->max_width = gtk_label_pick_width (label, - perfect_width, - label->max_width); + + if (perfect_width < width) + { + pango_layout_set_width (label->layout, perfect_width); + pango_layout_get_extents (label->layout, NULL, &logical_rect); + + if (logical_rect.height <= height) + { + width = perfect_width; + height = logical_rect.height; + } + else + { + gint mid_width = (perfect_width + width) / 2; + + if (mid_width > perfect_width) + { + pango_layout_set_width (label->layout, mid_width); + pango_layout_get_extents (label->layout, NULL, &logical_rect); + + if (logical_rect.height <= height) + { + width = mid_width; + height = logical_rect.height; + } + } + } + } } + + pango_layout_set_width (label->layout, width); + + requisition->width += width / 1000; + requisition->height += height / 1000; } - gtk_label_finalize_lines_wrap (label, requisition, label->max_width); } - else if (!label->words) + else /* !label->wrap */ { - label->max_width = gtk_label_split_text (label); - gtk_label_finalize_lines (label, requisition, label->max_width); + pango_layout_set_width (label->layout, -1); + pango_layout_get_extents (label->layout, NULL, &logical_rect); + + requisition->width += logical_rect.width / 1000; + requisition->height += logical_rect.height / 1000; } } @@ -851,14 +521,15 @@ gtk_label_style_set (GtkWidget *widget, g_return_if_fail (GTK_IS_LABEL (widget)); label = GTK_LABEL (widget); - - /* Clear the list of words so that they are recomputed on - * size_request - */ - if (previous_style && label->words) - gtk_label_free_words (label); + + if (previous_style && label->layout) + { + pango_layout_unref (label->layout); + label->layout = NULL; + } } +#if 0 static void gtk_label_paint_word (GtkLabel *label, gint x, @@ -887,6 +558,7 @@ gtk_label_paint_word (GtkLabel *label, widget, "label", x + uline->x1, x + uline->x2, y + uline->y); } +#endif static gint gtk_label_expose (GtkWidget *widget, @@ -894,8 +566,8 @@ gtk_label_expose (GtkWidget *widget, { GtkLabel *label; GtkMisc *misc; - GtkLabelWord *word; gint x, y; + gfloat xalign; g_return_val_if_fail (GTK_IS_LABEL (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); @@ -907,6 +579,11 @@ gtk_label_expose (GtkWidget *widget, { misc = GTK_MISC (widget); + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) + xalign = misc->xalign; + else + xalign = 1. - misc->xalign; + /* * GC Clipping */ @@ -914,22 +591,14 @@ gtk_label_expose (GtkWidget *widget, gdk_gc_set_clip_rectangle (widget->style->fg_gc[widget->state], &event->area); x = floor (widget->allocation.x + (gint)misc->xpad - + (((gint)widget->allocation.width - - (gint)label->max_width - 2 * (gint)misc->xpad) - * misc->xalign) + 0.5); + + ((widget->allocation.width - widget->requisition.width) * xalign) + + 0.5); y = floor (widget->allocation.y + (gint)misc->ypad - + (((gint)widget->allocation.height - - (gint)widget->requisition.height) - * misc->yalign) + 0.5); + + ((widget->allocation.height - widget->requisition.height) * misc->yalign) + + 0.5); - for (word = label->words; word; word = word->next) - { - gchar save = word->beginning[word->length]; - word->beginning[word->length] = '\0'; - gtk_label_paint_word (label, x, y, word, &event->area); - word->beginning[word->length] = save; - } + gdk_draw_layout (widget->window, widget->style->fg_gc [widget->state], x, y, label->layout); gdk_gc_set_clip_mask (widget->style->white_gc, NULL); gdk_gc_set_clip_mask (widget->style->fg_gc[widget->state], NULL); @@ -940,69 +609,80 @@ gtk_label_expose (GtkWidget *widget, guint gtk_label_parse_uline (GtkLabel *label, - const gchar *string) + const gchar *str) { guint accel_key = GDK_VoidSymbol; - GdkWChar *p, *q, *string_wc; - gchar *r; + + gchar *new_str; gchar *pattern; - gint length, wc_length; + const gchar *src; + gchar *dest, *pattern_dest; gboolean underscore; - + g_return_val_if_fail (GTK_IS_LABEL (label), GDK_VoidSymbol); - g_return_val_if_fail (string != NULL, GDK_VoidSymbol); + g_return_val_if_fail (str != NULL, GDK_VoidSymbol); /* Convert text to wide characters */ - length = strlen (string); - string_wc = g_new (GdkWChar, length + 1); - wc_length = gdk_mbstowcs (string_wc, string, length + 1); - if (wc_length < 0) - { - g_free (string_wc); - return GDK_VoidSymbol; - } - string_wc[wc_length] = '\0'; - - pattern = g_new (gchar, length+1); + new_str = g_new (gchar, strlen (str) + 1); + pattern = g_new (gchar, unicode_strlen (str, -1) + 1); underscore = FALSE; + + src = str; + dest = new_str; + pattern_dest = pattern; - p = q = string_wc; - r = pattern; - - while (*p) + while (*src) { + unicode_char_t c; + gchar *next_src; + + next_src = unicode_get_utf8 (src, &c); + if (!next_src) + { + g_warning ("Invalid input string"); + g_free (new_str); + g_free (pattern); + return GDK_VoidSymbol; + } + if (underscore) { - if (*p == '_') - *r++ = ' '; + if (c == '_') + *pattern_dest++ = ' '; else { - *r++ = '_'; + *pattern_dest++ = '_'; if (accel_key == GDK_VoidSymbol) - accel_key = gdk_keyval_to_lower (*p); + accel_key = gdk_keyval_to_lower (c); } + + while (src < next_src) + *dest++ = *src++; - *q++ = *p; underscore = FALSE; } else { - if (*p == '_') - underscore = TRUE; + if (c == '_') + { + underscore = TRUE; + src = next_src; + } else { - *q++ = *p; - *r++ = ' '; + while (src < next_src) + *dest++ = *src++; + + *pattern_dest++ = ' '; } } - p++; } - *q = 0; - *r = 0; + *dest = 0; + *pattern_dest = 0; - gtk_label_set_text_internal (label, gdk_wcstombs (string_wc), string_wc); + gtk_label_set_text_internal (label, new_str); gtk_label_set_pattern (label, pattern); g_free (pattern); diff --git a/gtk/gtklabel.h b/gtk/gtklabel.h index 74fb70e907..d079e544ac 100644 --- a/gtk/gtklabel.h +++ b/gtk/gtklabel.h @@ -54,14 +54,14 @@ struct _GtkLabel GtkMisc misc; gchar *label; - GdkWChar *label_wc; - gchar *pattern; + gchar *pattern; - GtkLabelWord *words; - - guint max_width : 16; guint jtype : 2; - gboolean wrap; + gboolean wrap : 1; + + /*< private >*/ + gint rtl : 2; /* Base dir, cached to detect changes */ + PangoLayout *layout; }; struct _GtkLabelClass diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h index a18c4a6bc7..25462d4c99 100644 --- a/gtk/gtkprivate.h +++ b/gtk/gtkprivate.h @@ -42,14 +42,16 @@ extern "C" { typedef enum { PRIVATE_GTK_USER_STYLE = 1 << 0, - PRIVATE_GTK_REDRAW_PENDING = 1 << 1, + PRIVATE_GTK_REDRAW_PENDING = 1 << 1, /* Unused */ PRIVATE_GTK_RESIZE_PENDING = 1 << 2, PRIVATE_GTK_RESIZE_NEEDED = 1 << 3, PRIVATE_GTK_LEAVE_PENDING = 1 << 4, PRIVATE_GTK_HAS_SHAPE_MASK = 1 << 5, PRIVATE_GTK_IN_REPARENT = 1 << 6, - PRIVATE_GTK_IS_OFFSCREEN = 1 << 7, - PRIVATE_GTK_FULLDRAW_PENDING = 1 << 8 + PRIVATE_GTK_IS_OFFSCREEN = 1 << 7, /* Unused */ + PRIVATE_GTK_FULLDRAW_PENDING = 1 << 8, + PRIVATE_GTK_DIRECTION_SET = 1 << 9, /* If the reading direction is not DIR_NONE */ + PRIVATE_GTK_DIRECTION_LTR = 1 << 10, /* If the reading direction is DIR_LTR */ } GtkPrivateFlags; /* Macros for extracting a widgets private_flags from GtkWidget. @@ -64,6 +66,8 @@ typedef enum #define GTK_WIDGET_IN_REPARENT(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_IN_REPARENT) != 0) #define GTK_WIDGET_IS_OFFSCREEN(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_IS_OFFSCREEN) != 0) #define GTK_WIDGET_FULLDRAW_PENDING(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_FULLDRAW_PENDING) != 0) +#define GTK_WIDGET_DIRECTION_SET(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_DIRECTION_SET) != 0) +#define GTK_WIDGET_DIRECTION_LTR(obj) ((GTK_PRIVATE_FLAGS (obj) & PRIVATE_GTK_DIRECTION_LTR) != 0) /* Macros for setting and clearing private widget flags. * we use a preprocessor string concatenation here for a clear diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c index 1c8ffc5112..ee4c46c386 100644 --- a/gtk/gtkradiobutton.c +++ b/gtk/gtkradiobutton.c @@ -419,6 +419,9 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button, else shadow_type = GTK_SHADOW_OUT; + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) + x = widget->allocation.x + widget->allocation.width - (width + x - widget->allocation.x); + gtk_paint_option (widget->style, widget->window, GTK_WIDGET_STATE (widget), shadow_type, area, widget, "radiobutton", diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index cf97c48ae8..48302baaa8 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -791,6 +791,8 @@ gtk_rc_style_unref (GtkRcStyle *rc_style) g_free (rc_style->fontset_name); if (rc_style->font_name) g_free (rc_style->font_name); + if (rc_style->font_desc) + pango_font_description_free (rc_style->font_desc); for (i=0 ; i<5 ; i++) if (rc_style->bg_pixmap_name[i]) @@ -1252,6 +1254,11 @@ gtk_rc_style_to_style (GtkRcStyle *rc_style) else style->font = old_font; } + + if (rc_style->font_desc) + style->font_desc = pango_font_description_copy (rc_style->font_desc); + else + style->font_desc = pango_font_description_from_string ("Sans 10"); for (i = 0; i < 5; i++) { @@ -1337,6 +1344,8 @@ gtk_rc_style_init (GSList *rc_styles) proto_style->font_name = g_strdup (rc_style->font_name); if (!proto_style->fontset_name && rc_style->fontset_name) proto_style->fontset_name = g_strdup (rc_style->fontset_name); + if (!proto_style->font_desc && rc_style->font_desc) + proto_style->font_desc = pango_font_description_copy (rc_style->font_desc); if (!proto_style->engine && rc_style->engine) { diff --git a/gtk/gtkrc.h b/gtk/gtkrc.h index 70d8ebaaef..9eb5ef8df0 100644 --- a/gtk/gtkrc.h +++ b/gtk/gtkrc.h @@ -49,6 +49,7 @@ struct _GtkRcStyle gchar *font_name; gchar *fontset_name; gchar *bg_pixmap_name[5]; + PangoFontDescription *font_desc; GtkRcFlags color_flags[5]; GdkColor fg[5]; diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index e4cc0aada3..14002ad64b 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -28,7 +28,6 @@ #include "gtkcontainer.h" #include "gtkscale.h" - #define SCALE_CLASS(w) GTK_SCALE_CLASS (GTK_OBJECT (w)->klass) enum { @@ -262,25 +261,29 @@ gtk_scale_set_value_pos (GtkScale *scale, } } -gint -gtk_scale_get_value_width (GtkScale *scale) +void +gtk_scale_get_value_size (GtkScale *scale, + gint *width, + gint *height) { GtkRange *range; - gchar buffer[128]; - gfloat value; - gint temp; - gint return_val; - gint digits; - gint i, j; - g_return_val_if_fail (scale != NULL, 0); - g_return_val_if_fail (GTK_IS_SCALE (scale), 0); + g_return_if_fail (scale != NULL); + g_return_if_fail (GTK_IS_SCALE (scale)); - return_val = 0; if (scale->draw_value) { + PangoLayout *layout; + PangoRectangle logical_rect; + gchar buffer[128]; + gfloat value; + gint digits; + gint i, j; + range = GTK_RANGE (scale); + layout = gtk_widget_create_pango_layout (GTK_WIDGET (scale)); + value = ABS (range->adjustment->lower); if (value == 0) value = 1; digits = log10 (value) + 1; @@ -298,8 +301,14 @@ gtk_scale_get_value_width (GtkScale *scale) buffer[i++] = '0'; buffer[i] = '\0'; - return_val = gdk_string_measure (GTK_WIDGET (scale)->style->font, buffer); + pango_layout_set_text (layout, buffer, i); + pango_layout_get_extents (layout, NULL, &logical_rect); + if (width) + *width = logical_rect.width / 1000; + if (height) + *height = logical_rect.width / 1000; + value = ABS (range->adjustment->upper); if (value == 0) value = 1; digits = log10 (value) + 1; @@ -317,11 +326,37 @@ gtk_scale_get_value_width (GtkScale *scale) buffer[i++] = '0'; buffer[i] = '\0'; - temp = gdk_string_measure (GTK_WIDGET (scale)->style->font, buffer); - return_val = MAX (return_val, temp); + pango_layout_set_text (layout, buffer, i); + pango_layout_get_extents (layout, NULL, &logical_rect); + + if (width) + *width = MAX (*width, logical_rect.width / 1000); + if (height) + *height = MAX (*height, logical_rect.height / 1000); + + pango_layout_unref (layout); + } + else + { + if (width) + *width = 0; + if (height) + *height = 0; } - return return_val; +} + +gint +gtk_scale_get_value_width (GtkScale *scale) +{ + gint width; + + g_return_val_if_fail (scale != NULL, 0); + g_return_val_if_fail (GTK_IS_SCALE (scale), 0); + + gtk_scale_get_value_size (scale, &width, NULL); + + return width; } void diff --git a/gtk/gtkscale.h b/gtk/gtkscale.h index 63ab9b0c62..2e2a84317c 100644 --- a/gtk/gtkscale.h +++ b/gtk/gtkscale.h @@ -66,7 +66,6 @@ struct _GtkScaleClass void (* draw_value) (GtkScale *scale); }; - GtkType gtk_scale_get_type (void); void gtk_scale_set_digits (GtkScale *scale, gint digits); @@ -75,10 +74,12 @@ void gtk_scale_set_draw_value (GtkScale *scale, void gtk_scale_set_value_pos (GtkScale *scale, GtkPositionType pos); gint gtk_scale_get_value_width (GtkScale *scale); +void gtk_scale_get_value_size (GtkScale *scale, + gint *width, + gint *height); void gtk_scale_draw_value (GtkScale *scale); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 15f7555dc2..8a69390aee 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -512,6 +512,9 @@ gtk_spin_button_size_allocate (GtkWidget *widget, if (child_allocation.width > ARROW_SIZE + 2 * widget->style->klass->xthickness) child_allocation.width -= ARROW_SIZE + 2 * widget->style->klass->xthickness; + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) + child_allocation.x += ARROW_SIZE + 2 * widget->style->klass->xthickness; + GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, &child_allocation); widget->allocation = *allocation; @@ -519,9 +522,14 @@ gtk_spin_button_size_allocate (GtkWidget *widget, if (GTK_WIDGET_REALIZED (widget)) { child_allocation.width = ARROW_SIZE + 2 * widget->style->klass->xthickness; - child_allocation.height = widget->requisition.height; - child_allocation.x = (allocation->x + allocation->width - ARROW_SIZE - - 2 * widget->style->klass->xthickness); + child_allocation.height = widget->requisition.height; + + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) + child_allocation.x = (allocation->x + allocation->width - ARROW_SIZE - + 2 * widget->style->klass->xthickness); + else + child_allocation.x = allocation->x; + child_allocation.y = allocation->y + (allocation->height - widget->requisition.height) / 2; gdk_window_move_resize (GTK_SPIN_BUTTON (widget)->panel, diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index b7f9ab98bd..d7aaa82121 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -745,9 +745,11 @@ gtk_style_destroy (GtkStyle *style) } gdk_font_unref (style->font); + pango_font_description_free (style->font_desc); + if (style->rc_style) gtk_rc_style_unref (style->rc_style); - + g_free (style); } @@ -3140,7 +3142,7 @@ gtk_default_draw_handle (GtkStyle *style, gtk_paint_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); - + if (!strcmp (detail, "paned")) { /* we want to ignore the shadow border in paned widgets */ diff --git a/gtk/gtkstyle.h b/gtk/gtkstyle.h index e2de64e04f..fca8c21edd 100644 --- a/gtk/gtkstyle.h +++ b/gtk/gtkstyle.h @@ -30,6 +30,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -72,6 +73,7 @@ struct _GtkStyle GdkColor black; GdkColor white; GdkFont *font; + PangoFontDescription *font_desc; GdkGC *fg_gc[5]; GdkGC *bg_gc[5]; @@ -96,7 +98,7 @@ struct _GtkStyle GtkThemeEngine *engine; gpointer engine_data; - + GtkRcStyle *rc_style; /* the Rc style from which this style * was created */ diff --git a/gtk/gtktable.c b/gtk/gtktable.c index e484479c88..8623260ef3 100644 --- a/gtk/gtktable.c +++ b/gtk/gtktable.c @@ -1486,6 +1486,7 @@ gtk_table_size_allocate_pass2 (GtkTable *table) gint x, y; gint row, col; GtkAllocation allocation; + GtkWidget *widget = GTK_WIDGET (table); children = table->children; while (children) @@ -1550,6 +1551,10 @@ gtk_table_size_allocate_pass2 (GtkTable *table) allocation.height = child_requisition.height; allocation.y = y + (max_height - allocation.height) / 2; } + + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) + allocation.x = widget->allocation.x + widget->allocation.width + - (allocation.x - widget->allocation.x) - allocation.width; gtk_widget_size_allocate (child->widget, &allocation); } diff --git a/gtk/gtkvscale.c b/gtk/gtkvscale.c index a27e0ae4b5..8578b52a82 100644 --- a/gtk/gtkvscale.c +++ b/gtk/gtkvscale.c @@ -317,14 +317,14 @@ gtk_vscale_size_request (GtkWidget *widget, GtkRequisition *requisition) { GtkScale *scale; - gint value_width; + gint value_width, value_height; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_VSCALE (widget)); g_return_if_fail (requisition != NULL); scale = GTK_SCALE (widget); - + requisition->width = (RANGE_CLASS (scale)->slider_width + widget->style->klass->ythickness * 2); requisition->height = (SCALE_CLASS (scale)->slider_length + @@ -332,21 +332,21 @@ gtk_vscale_size_request (GtkWidget *widget, if (scale->draw_value) { - value_width = gtk_scale_get_value_width (scale); + gtk_scale_get_value_size (scale, &value_width, &value_height); if ((scale->value_pos == GTK_POS_LEFT) || (scale->value_pos == GTK_POS_RIGHT)) { requisition->width += value_width + SCALE_CLASS (scale)->value_spacing; - if (requisition->height < (widget->style->font->ascent + widget->style->font->descent)) - requisition->height = widget->style->font->ascent + widget->style->font->descent; + if (requisition->height < (value_height)) + requisition->height = value_height; } else if ((scale->value_pos == GTK_POS_TOP) || (scale->value_pos == GTK_POS_BOTTOM)) { if (requisition->width < value_width) requisition->width = value_width; - requisition->height += widget->style->font->ascent + widget->style->font->descent; + requisition->height += value_height; } } } @@ -386,6 +386,7 @@ gtk_vscale_pos_trough (GtkVScale *vscale, { GtkWidget *widget; GtkScale *scale; + gint value_width, value_height; g_return_if_fail (vscale != NULL); g_return_if_fail (GTK_IS_VSCALE (vscale)); @@ -403,10 +404,12 @@ gtk_vscale_pos_trough (GtkVScale *vscale, *x = 0; *y = 0; + gtk_scale_get_value_size (scale, &value_width, &value_height); + switch (scale->value_pos) { case GTK_POS_LEFT: - *x = (gtk_scale_get_value_width (scale) + SCALE_CLASS (scale)->value_spacing + + *x = (value_width + SCALE_CLASS (scale)->value_spacing + (widget->allocation.width - widget->requisition.width) / 2); break; case GTK_POS_RIGHT: @@ -414,12 +417,12 @@ gtk_vscale_pos_trough (GtkVScale *vscale, break; case GTK_POS_TOP: *x = (widget->allocation.width - *w) / 2; - *y = widget->style->font->ascent + widget->style->font->descent; + *y = value_height; *h -= *y; break; case GTK_POS_BOTTOM: *x = (widget->allocation.width - *w) / 2; - *h -= widget->style->font->ascent + widget->style->font->descent; + *h -= value_height; break; } } @@ -512,7 +515,6 @@ gtk_vscale_draw_value (GtkScale *scale) GtkStateType state_type; GtkWidget *widget; gchar buffer[32]; - gint text_width; gint width, height; gint x, y; @@ -523,9 +525,15 @@ gtk_vscale_draw_value (GtkScale *scale) if (scale->draw_value) { - sprintf (buffer, "%0.*f", GTK_RANGE (scale)->digits, GTK_RANGE (scale)->adjustment->value); - text_width = gdk_string_measure (GTK_WIDGET (scale)->style->font, buffer); + PangoLayout *layout; + PangoRectangle logical_rect; + sprintf (buffer, "%0.*f", GTK_RANGE (scale)->digits, GTK_RANGE (scale)->adjustment->value); + + layout = gtk_widget_create_pango_layout (widget); + pango_layout_set_text (layout, buffer, strlen (buffer)); + pango_layout_get_extents (layout, NULL, &logical_rect); + switch (scale->value_pos) { case GTK_POS_LEFT: @@ -534,11 +542,9 @@ gtk_vscale_draw_value (GtkScale *scale) gdk_window_get_size (GTK_RANGE (scale)->trough, &width, NULL); gdk_window_get_size (GTK_RANGE (scale)->slider, NULL, &height); - x -= SCALE_CLASS (scale)->value_spacing + text_width; - y += widget->allocation.y + ((height - - (GTK_WIDGET (scale)->style->font->ascent + - GTK_WIDGET (scale)->style->font->descent)) / 2 + - GTK_WIDGET (scale)->style->font->ascent); + x -= SCALE_CLASS (scale)->value_spacing + logical_rect.width / 1000; + y += widget->allocation.y + (height - logical_rect.height / 1000) / 2 + + PANGO_ASCENT (logical_rect) / 1000; break; case GTK_POS_RIGHT: gdk_window_get_position (GTK_RANGE (scale)->trough, &x, NULL); @@ -547,38 +553,44 @@ gtk_vscale_draw_value (GtkScale *scale) gdk_window_get_size (GTK_RANGE (scale)->slider, NULL, &height); x += width + SCALE_CLASS (scale)->value_spacing; - y += widget->allocation.y + ((height - - (GTK_WIDGET (scale)->style->font->ascent + - GTK_WIDGET (scale)->style->font->descent)) / 2 + - GTK_WIDGET (scale)->style->font->ascent); + y += widget->allocation.y + (height - logical_rect.height / 1000) / 2 + + PANGO_ASCENT (logical_rect) / 1000; break; case GTK_POS_TOP: gdk_window_get_position (GTK_RANGE (scale)->trough, &x, &y); gdk_window_get_size (GTK_RANGE (scale)->slider, &width, NULL); gdk_window_get_size (GTK_RANGE (scale)->trough, NULL, &height); - x += (width - text_width) / 2; - y -= GTK_WIDGET (scale)->style->font->descent; + x += (width - logical_rect.width / 1000) / 2; + y -= PANGO_DESCENT (logical_rect) / 1000; break; case GTK_POS_BOTTOM: gdk_window_get_position (GTK_RANGE (scale)->trough, &x, &y); gdk_window_get_size (GTK_RANGE (scale)->slider, &width, NULL); gdk_window_get_size (GTK_RANGE (scale)->trough, NULL, &height); - x += (width - text_width) / 2; - y += height + GTK_WIDGET (scale)->style->font->ascent; + x += (width - logical_rect.width / 1000) / 2; + y += height + PANGO_ASCENT (logical_rect) / 1000; break; } state_type = GTK_STATE_NORMAL; if (!GTK_WIDGET_IS_SENSITIVE (scale)) state_type = GTK_STATE_INSENSITIVE; - + +#if 0 gtk_paint_string (GTK_WIDGET (scale)->style, GTK_WIDGET (scale)->window, state_type, NULL, GTK_WIDGET (scale), "vscale", x, y, buffer); +#endif + + gdk_draw_layout (GTK_WIDGET (scale)->window, + GTK_WIDGET (scale)->style->fg_gc [state_type], + x, y, layout); + + pango_layout_unref (layout); } } diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 62127f727c..9cd442e328 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -214,6 +214,8 @@ static const gchar *visual_key = "gtk-visual"; static const gchar *rc_style_key = "gtk-rc-style"; static guint rc_style_key_id = 0; +static GtkTextDirection gtk_default_direction = GTK_TEXT_DIR_LTR; + /***************************************** * gtk_widget_get_type: * @@ -3181,6 +3183,55 @@ gtk_widget_pop_style (void) } } +/** + * gtk_widget_create_pango_context: + * @widget: a #PangoWidget + * + * Create a new pango context with the appropriate colormap, + * font description, and base direction for drawing text for + * this widget. + * + * Return value: the new #PangoContext + **/ +PangoContext * +gtk_widget_create_pango_context (GtkWidget *widget) +{ + PangoContext *context; + + context = gdk_pango_context_get (); + + gdk_pango_context_set_colormap (context, gtk_widget_get_colormap (widget)); + pango_context_set_base_dir (context, + gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR ? + PANGO_DIRECTION_LTR : PANGO_DIRECTION_RTL); + pango_context_set_font_description (context, widget->style->font_desc); + + return context; +} + +/** + * gtk_widget_create_pango_layout: + * @widget: a #PangoWidget + * + * Create a new #PangoLayout with the appropriate colormap, + * font description, and base direction for drawing text for + * this widget. + * + * Return value: the new #PangoLayout + **/ +PangoLayout * +gtk_widget_create_pango_layout (GtkWidget *widget) +{ + PangoLayout *layout; + PangoContext *context; + + context = gtk_widget_create_pango_context (widget); + layout = pango_layout_new (context); + pango_context_unref (context); + + return layout; +} + /************************************************************* * gtk_widget_set_parent_window: * Set a non default parent window for widget @@ -3887,6 +3938,90 @@ gtk_widget_get_default_visual (void) return default_visual; } +/** + * gtk_widget_set_direction: + * @widget: a #GtkWidget + * @dir: the new direction + * + * Set the reading direction on a particular widget. This direction + * controls the primary direction for widgets containing text, + * and also the direction in which the children of a container are + * packed. The ability to set the direction is present in order + * so that correct localization into languages with right-to-left + * reading directions can be done. Generally, applications will + * let the default reading direction present, except for containers + * where the containers are arranged in an order that is explicitely + * visual rather than logical (such as buttons for text justificiation). + * + * If the direction is set to %GTK_TEXT_DIR_NONE, then the value + * set by gtk_widget_set_default_direction() will be used. + **/ +void +gtk_widget_set_direction (GtkWidget *widget, + GtkTextDirection dir) +{ + g_return_if_fail (widget != NULL); + + if (dir == GTK_TEXT_DIR_NONE) + GTK_PRIVATE_UNSET_FLAG (widget, GTK_DIRECTION_SET); + else + { + GTK_PRIVATE_SET_FLAG (widget, GTK_DIRECTION_SET); + if (dir == GTK_TEXT_DIR_LTR) + GTK_PRIVATE_SET_FLAG (widget, GTK_DIRECTION_LTR); + else + GTK_PRIVATE_UNSET_FLAG (widget, GTK_DIRECTION_LTR); + } +} + +/** + * gtk_widget_get_direction: + * @widget: a #GtkWidget + * + * Get the reading direction for a particular widget. See + * gtk_widget_set_direction(). + * + * Return value: the reading direction for the widget. + **/ +GtkTextDirection +gtk_widget_get_direction (GtkWidget *widget) +{ + g_return_val_if_fail (widget != NULL, GTK_TEXT_DIR_LTR); + + if (GTK_WIDGET_DIRECTION_SET (widget)) + return GTK_WIDGET_DIRECTION_LTR (widget) ? GTK_TEXT_DIR_LTR : GTK_TEXT_DIR_RTL; + else + return gtk_default_direction; +} + +/** + * gtk_widget_set_default_direction: + * @dir: the new default direction. This cannot be + * %GTK_TEXT_DIRECTION_NONE. + * + * Set the default reading direction for widgets where the + * direction has not been explicitely set by gtk_widget_set_direction(). + **/ +void +gtk_widget_set_default_direction (GtkTextDirection dir) +{ + g_return_if_fail (dir != GTK_TEXT_DIR_NONE); + + gtk_default_direction = dir; +} + +/** + * gtk_widget_get_default_direction: + * + * Return value: the current default direction. See + * gtk_widget_set_direction(). + **/ +GtkTextDirection +gtk_widget_get_default_direction (void) +{ + return gtk_default_direction; +} + static void gtk_widget_shutdown (GtkObject *object) { diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index 66568b4228..dd4ef46c94 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -572,6 +572,9 @@ void gtk_widget_restore_default_style (GtkWidget *widget); void gtk_widget_modify_style (GtkWidget *widget, GtkRcStyle *style); +PangoContext *gtk_widget_create_pango_context (GtkWidget *widget); +PangoLayout *gtk_widget_create_pango_layout (GtkWidget *widget); + /* handle composite names for GTK_COMPOSITE_CHILD widgets, * the returned name is newly allocated. */ @@ -604,6 +607,16 @@ GtkStyle* gtk_widget_get_default_style (void); GdkColormap* gtk_widget_get_default_colormap (void); GdkVisual* gtk_widget_get_default_visual (void); +/* Functions for setting directionality for widgets + */ + +void gtk_widget_set_direction (GtkWidget *widget, + GtkTextDirection dir); +GtkTextDirection gtk_widget_get_direction (GtkWidget *widget); + +void gtk_widget_set_default_direction (GtkTextDirection dir); +GtkTextDirection gtk_widget_get_default_direction (void); + /* Counterpart to gdk_window_shape_combine_mask. */ void gtk_widget_shape_combine_mask (GtkWidget *widget, @@ -626,6 +639,7 @@ void gtk_widget_class_path (GtkWidget *widget, gchar **path, gchar **path_reversed); + #if defined (GTK_TRACE_OBJECTS) && defined (__GNUC__) # define gtk_widget_ref gtk_object_ref # define gtk_widget_unref gtk_object_unref diff --git a/gtk/testgtk.c b/gtk/testgtk.c index df1b4940de..8555cfa881 100644 --- a/gtk/testgtk.c +++ b/gtk/testgtk.c @@ -1696,6 +1696,22 @@ void create_labels (void) gtk_container_add (GTK_CONTAINER (frame), label); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); + frame = gtk_frame_new ("Internationalized Label"); + label = gtk_label_new ("French (Français) Bonjour, Salut\n" + "Korean (한글) 안녕하세요, 안녕하십니까\n" + "Russian (Русский) Здравствуйте!"); + gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); + gtk_container_add (GTK_CONTAINER (frame), label); + gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); + + frame = gtk_frame_new ("Bidirection Label"); + label = gtk_label_new ("Arabic السلام عليكم\n" + "Hebrew שלום"); + gtk_widget_set_direction (label, GTK_TEXT_DIR_RTL); + gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT); + gtk_container_add (GTK_CONTAINER (frame), label); + gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); + vbox = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); frame = gtk_frame_new ("Line wrapped label"); @@ -1726,12 +1742,11 @@ void create_labels (void) frame = gtk_frame_new ("Underlined label"); label = gtk_label_new ("This label is underlined!\n" - "This one is underlined in ܸquite a funky fashion"); + "This one is underlined (こんにちは) in quite a funky fashion"); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_label_set_pattern (GTK_LABEL (label), "_________________________ _ _________ _ _____ _ __ __ ___ ____ _____"); gtk_container_add (GTK_CONTAINER (frame), label); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); - } if (!GTK_WIDGET_VISIBLE (window)) gtk_widget_show_all (window); @@ -5294,6 +5309,69 @@ create_file_selection (void) gtk_widget_destroy (window); } +void +flipping_toggled_cb (GtkWidget *widget, gpointer data) +{ + int state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); + int new_direction = state ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR; + + if (new_direction != gtk_widget_get_default_direction ()) + { + GList *toplevels; + + gtk_widget_set_default_direction (new_direction); + + toplevels = gtk_container_get_toplevels(); + while (toplevels) + { + gtk_widget_queue_resize (toplevels->data); + toplevels = toplevels->next; + } + } + +} + +void +create_flipping (void) +{ + static GtkWidget *window = NULL; + GtkWidget *check_button, *button; + + if (!window) + { + window = gtk_dialog_new (); + + gtk_signal_connect (GTK_OBJECT (window), "destroy", + GTK_SIGNAL_FUNC(gtk_widget_destroyed), + &window); + + gtk_window_set_title (GTK_WINDOW (window), "Bidirectional Flipping"); + + check_button = gtk_check_button_new_with_label ("Right-to-left global direction"); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), + check_button, TRUE, TRUE, 0); + + if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button), TRUE); + + gtk_signal_connect (GTK_OBJECT (check_button), "toggled", + flipping_toggled_cb, FALSE); + + gtk_container_set_border_width (GTK_CONTAINER (check_button), 10); + + button = gtk_button_new_with_label ("Close"); + gtk_signal_connect_object (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area), + button, TRUE, TRUE, 0); + } + + if (!GTK_WIDGET_VISIBLE (window)) + gtk_widget_show_all (window); + else + gtk_widget_destroy (window); +} + /* * GtkFontSelection */ @@ -8397,6 +8475,7 @@ create_main_window (void) { "entry", create_entry }, { "event watcher", create_event_watcher }, { "file selection", create_file_selection }, + { "flipping", create_flipping }, { "font selection", create_font_selection }, { "gamma curve", create_gamma_curve }, { "handle box", create_handle_box }, diff --git a/modules/engines/pixbuf/.cvsignore b/modules/engines/pixbuf/.cvsignore deleted file mode 100644 index 020d528ee0..0000000000 --- a/modules/engines/pixbuf/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile.in -Makefile -.deps -.libs -*.lo -*.la \ No newline at end of file diff --git a/modules/engines/pixbuf/ChangeLog b/modules/engines/pixbuf/ChangeLog deleted file mode 100644 index 7ac15fc565..0000000000 --- a/modules/engines/pixbuf/ChangeLog +++ /dev/null @@ -1,107 +0,0 @@ -Mon Mar 6 11:44:58 2000 Owen Taylor - - * docs/gap-geometry.fig: Moved into docs/ subdir - - * Makefile.am configure.in autogen.sh src/Makefile.am: - automakify - - * src/pixbuf.h src/pixbuf-render.c src/pixbuf-draw.c - src/pixbuf-main.c: Move sources into subdir and - rename. - -Mon Mar 6 11:02:07 2000 Owen Taylor - - * pixmap_theme_pixbuf.c: Handle drawing transparency without a - mask correctly. - - * pixmap_theme_main.c pixmap_theme_draw.c: Remove duplicate - includes. - -Sun Feb 6 21:34:30 2000 Owen Taylor - - * Started ChangeLog for pixbuf engine, check sources - into CVS. - -========== ChangeLog for pixmap engine =================== - -1999-11-22 Martin Baulig - - * pixmap_theme_main.c (theme_duplicate_style): Really copy the - `src_data->img_list', not just the pointer that points to it. - -Tue Oct 5 15:13:29 1999 Owen Taylor - - * pixmap_theme_draw.c (apply_theme_image): Don't set - background pixmap on pixmaps. - -1999-02-14 Raja R Harinath - - * Theme/gtk/Makefile.am.in (Makefile.am): Handle the case when - files are deleted. - -Thu Feb 11 21:16:53 1999 Owen Taylor - - * pixmap_theme_main.c (theme_data_unref): Free the - theme data structure as well as the contents. - -1999-02-03 Raja R Harinath - - * Theme/gtk/Makefile.am.in: New file. Theme/gtk/Makefile.am is - generated from this file when new *.png files are added. - -1999-01-23 Miguel de Icaza - - * pixmap_theme_main.c (theme_init): Turn on pixmap cache. - -Mon Jan 18 13:37:23 1999 Owen Taylor - - * Theme/gtk/gtkrc: Give buttons a gray background - color so they look a little less funny when initially - drawing. - -Wed Jan 13 18:58:25 1999 Owen Taylor - - * pixmap_theme_draw.c: Fixed pervasive mis-bracketing - that was causing drawing if the drawn region and - clipping region did NOT intersect, and a couple - of errors in computing source and destination - regions. - -1998-11-09 Federico Mena Quintero - - * pixmap_theme_draw.c: #include - -1998-11-07 Raja R Harinath - - * Theme/gtk/Makefile.am (theme_DATA): - Update to new directory contents. - * configure.in: Remove. - -Fri Nov 6 17:26:12 1998 Owen Taylor - - * pixmap_theme_main.c: Removed some debugging - printf's. - - * Theme/gtk/notebook1.c Theme/gtk/menubar.png: new - bigger pixmaps to reduce pixelation. - - * Theme/gtk/gtkrc: Reorganized to use several styles - instead of one huge style. Change clist backgrounds - to be prettier. - -Thu Nov 5 10:23:46 1998 Owen Taylor - - * pixmap_theme_draw.c (draw_shadow_gap): Fixed hard-coded - gap_side of '0'. - -Mon Nov 2 14:46:02 1998 Owen Taylor - - * pixmap_theme_draw.c (apply_theme_image_shadow_gap): Removed - several hundred lines of duplicated code with a bit of - reoriganization. - -Wed Oct 28 16:18:04 1998 Owen Taylor - - * pixmap_theme_main.c (theme_symbols): Removed lots - and lots of white space. - diff --git a/modules/engines/pixbuf/Makefile.am b/modules/engines/pixbuf/Makefile.am deleted file mode 100644 index 379aaed3ea..0000000000 --- a/modules/engines/pixbuf/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -INCLUDES = $(GTK_CFLAGS) - -enginedir = $(libdir)/gtk/themes/engines - -engine_LTLIBRARIES = libpixmap.la - -libpixmap_la_SOURCES = \ - pixbuf-draw.c \ - pixbuf-main.c \ - pixbuf-render.c \ - pixbuf.h - -libpixmap_la_LDFLAGS = -module -avoid-version -libpixmap_la_LIBADD = diff --git a/modules/engines/pixbuf/README b/modules/engines/pixbuf/README deleted file mode 100644 index 6b48ec67ca..0000000000 --- a/modules/engines/pixbuf/README +++ /dev/null @@ -1,17 +0,0 @@ -The code in this directory is a GTK+ theme engine based on the earlier -pixmap theme engine. - -The config files are meant to be compatible, but instead of rendering -using Imlib, it renders using GdkPixbuf. This makes the memory -management much more understandable, and also allows us to use -GdkPixbuf's high quality scaling. - -Most of the code was reworked/rewritten in the process to make it more -understandable and maintainable. - -There are lots of bugs here, a considersable number of bugs. But it's -cleaned up a great deal from the older pixmap engine. Please don't -make it uglier again. - -Owen Taylor -6 February 2000 \ No newline at end of file diff --git a/modules/engines/pixbuf/pixbuf-draw.c b/modules/engines/pixbuf/pixbuf-draw.c deleted file mode 100644 index d2276ef8e5..0000000000 --- a/modules/engines/pixbuf/pixbuf-draw.c +++ /dev/null @@ -1,1037 +0,0 @@ -/* GTK+ Pixbuf Engine - * Copyright (C) 1998-2000 Red Hat, 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. - * - * Written by Owen Taylor , based on code by - * Carsten Haitzler - */ - -#include "pixbuf.h" -#include - -static ThemeImage * -match_theme_image(GtkStyle *style, - ThemeMatchData *match_data) -{ - GList *tmp_list; - - tmp_list = ((ThemeData *)style->engine_data)->img_list; - - while (tmp_list) - { - guint flags; - ThemeImage *image = tmp_list->data; - tmp_list = tmp_list->next; - - if (match_data->function != image->match_data.function) - continue; - - flags = match_data->flags & image->match_data.flags; - - if (flags != image->match_data.flags) /* Required components not present */ - continue; - - if ((flags & THEME_MATCH_STATE) && - match_data->state != image->match_data.state) - continue; - - if ((flags & THEME_MATCH_SHADOW) && - match_data->shadow != image->match_data.shadow) - continue; - - if ((flags & THEME_MATCH_ARROW_DIRECTION) && - match_data->arrow_direction != image->match_data.arrow_direction) - continue; - - if ((flags & THEME_MATCH_ORIENTATION) && - match_data->orientation != image->match_data.orientation) - continue; - - if ((flags & THEME_MATCH_GAP_SIDE) && - match_data->gap_side != image->match_data.gap_side) - continue; - - if (image->match_data.detail && - (!image->match_data.detail || - strcmp (match_data->detail, image->match_data.detail) != 0)) - continue; - - return image; - } - - return NULL; -} - -static void -draw_simple_image(GtkStyle *style, - GdkWindow *window, - GdkRectangle *area, - GtkWidget *widget, - ThemeMatchData *match_data, - gboolean draw_center, - gboolean allow_setbg, - gint x, - gint y, - gint width, - gint height) -{ - ThemeImage *image; - gboolean setbg = FALSE; - - if ((width == -1) && (height == -1)) - { - gdk_window_get_size(window, &width, &height); - if (allow_setbg) - setbg = TRUE; - } - else if (width == -1) - gdk_window_get_size(window, &width, NULL); - else if (height == -1) - gdk_window_get_size(window, NULL, &height); - - if (!(match_data->flags & THEME_MATCH_ORIENTATION)) - { - match_data->flags |= THEME_MATCH_ORIENTATION; - - if (height > width) - match_data->orientation = GTK_ORIENTATION_VERTICAL; - else - match_data->orientation = GTK_ORIENTATION_HORIZONTAL; - } - - image = match_theme_image(style, match_data); - if (image) - { - if (image->background) - { - GdkBitmap *mask = NULL; - - if (image->background->stretch && setbg && - gdk_window_get_type (window) != GDK_WINDOW_PIXMAP) - { - GdkPixbuf *pixbuf = theme_pixbuf_get_pixbuf (image->background); - if (pixbuf && pixbuf->art_pixbuf->has_alpha) - mask = gdk_pixmap_new (window, width, height, 1); - } - - theme_pixbuf_render (image->background, - window, mask, area, - draw_center ? COMPONENT_ALL : COMPONENT_ALL | COMPONENT_CENTER, - FALSE, - x, y, width, height); - - if (mask) - { - gdk_window_shape_combine_mask (window, mask, 0, 0); - gdk_pixmap_unref (mask); - } - } - - if (image->overlay && draw_center) - theme_pixbuf_render (image->overlay, - window, NULL, area, COMPONENT_ALL, - TRUE, - x, y, width, height); - } -} - -static void -draw_gap_image(GtkStyle *style, - GdkWindow *window, - GdkRectangle *area, - GtkWidget *widget, - ThemeMatchData *match_data, - gboolean draw_center, - gint x, - gint y, - gint width, - gint height, - GtkPositionType gap_side, - gint gap_x, - gint gap_width) -{ - ThemeImage *image; - gboolean setbg = FALSE; - - if ((width == -1) && (height == -1)) - { - gdk_window_get_size(window, &width, &height); - setbg = TRUE; - } - else if (width == -1) - gdk_window_get_size(window, &width, NULL); - else if (height == -1) - gdk_window_get_size(window, NULL, &height); - - if (!(match_data->flags & THEME_MATCH_ORIENTATION)) - { - match_data->flags |= THEME_MATCH_ORIENTATION; - - if (height > width) - match_data->orientation = GTK_ORIENTATION_VERTICAL; - else - match_data->orientation = GTK_ORIENTATION_HORIZONTAL; - } - - match_data->flags |= THEME_MATCH_GAP_SIDE; - match_data->gap_side = gap_side; - - image = match_theme_image(style, match_data); - if (image) - { - gint thickness; - GdkRectangle r1, r2, r3; - GdkPixbuf *pixbuf = NULL; - guint components = COMPONENT_ALL; - - if (!draw_center) - components |= COMPONENT_CENTER; - - if (image->gap_start) - pixbuf = theme_pixbuf_get_pixbuf (image->gap_start); - - switch (gap_side) - { - case GTK_POS_TOP: - if (pixbuf) - thickness = pixbuf->art_pixbuf->height; - else - thickness = style->klass->ythickness; - - if (!draw_center) - components |= COMPONENT_NORTH_WEST | COMPONENT_NORTH | COMPONENT_NORTH_EAST; - - r1.x = x; - r1.y = y; - r1.width = gap_x; - r1.height = thickness; - r2.x = x + gap_x; - r2.y = y; - r2.width = gap_width; - r2.height = thickness; - r3.x = x + gap_x + gap_width; - r3.y = y; - r3.width = width - (gap_x + gap_width); - r3.height = thickness; - break; - - case GTK_POS_BOTTOM: - if (pixbuf) - thickness = pixbuf->art_pixbuf->height; - else - thickness = style->klass->ythickness; - - if (!draw_center) - components |= COMPONENT_SOUTH_WEST | COMPONENT_SOUTH | COMPONENT_SOUTH_EAST; - - r1.x = x; - r1.y = y + height - thickness; - r1.width = gap_x; - r1.height = thickness; - r2.x = x + gap_x; - r2.y = y + height - thickness; - r2.width = gap_width; - r2.height = thickness; - r3.x = x + gap_x + gap_width; - r3.y = y + height - thickness; - r3.width = width - (gap_x + gap_width); - r3.height = thickness; - break; - - case GTK_POS_LEFT: - if (pixbuf) - thickness = pixbuf->art_pixbuf->width; - else - thickness = style->klass->xthickness; - - if (!draw_center) - components |= COMPONENT_NORTH_WEST | COMPONENT_WEST | COMPONENT_SOUTH_WEST; - - r1.x = x; - r1.y = y; - r1.width = thickness; - r1.height = gap_x; - r2.x = x; - r2.y = y + gap_x; - r2.width = thickness; - r2.height = gap_width; - r3.x = x; - r3.y = y + gap_x + gap_width; - r3.width = thickness; - r3.height = height - (gap_x + gap_width); - break; - - case GTK_POS_RIGHT: - if (pixbuf) - thickness = pixbuf->art_pixbuf->width; - else - thickness = style->klass->xthickness; - - if (!draw_center) - components |= COMPONENT_NORTH_EAST | COMPONENT_EAST | COMPONENT_SOUTH_EAST; - - r1.x = x + width - thickness; - r1.y = y; - r1.width = thickness; - r1.height = gap_x; - r2.x = x + width - thickness; - r2.y = y + gap_x; - r2.width = thickness; - r2.height = gap_width; - r3.x = x + width - thickness; - r3.y = y + gap_x + gap_width; - r3.width = thickness; - r3.height = height - (gap_x + gap_width); - break; - } - - if (image->background) - theme_pixbuf_render (image->background, - window, NULL, area, components, FALSE, - x, y, width, height); - if (image->gap_start) - theme_pixbuf_render (image->gap_start, - window, NULL, area, COMPONENT_ALL, FALSE, - r1.x, r1.y, r1.width, r1.height); - if (image->gap) - theme_pixbuf_render (image->gap, - window, NULL, area, COMPONENT_ALL, FALSE, - r2.x, r2.y, r2.width, r2.height); - if (image->gap_end) - theme_pixbuf_render (image->gap_end, - window, NULL, area, COMPONENT_ALL, FALSE, - r3.x, r3.y, r3.width, r3.height); - } -} - -static void -draw_hline(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x1, - gint x2, - gint y) -{ - ThemeImage *image; - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_HLINE; - match_data.detail = detail; - match_data.flags = THEME_MATCH_ORIENTATION | THEME_MATCH_STATE; - match_data.state = state; - match_data.orientation = GTK_ORIENTATION_HORIZONTAL; - - image = match_theme_image(style, &match_data); - if (image) - { - if (image->background) - theme_pixbuf_render (image->background, - window, NULL, area, COMPONENT_ALL, FALSE, - x1, y, (x2 - x1) + 1, 2); - } -} - -static void -draw_vline(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint y1, - gint y2, - gint x) -{ - ThemeImage *image; - ThemeMatchData match_data; - - g_return_if_fail (style != NULL); - g_return_if_fail (window != NULL); - - match_data.function = TOKEN_D_VLINE; - match_data.detail = detail; - match_data.flags = THEME_MATCH_ORIENTATION | THEME_MATCH_STATE; - match_data.state = state; - match_data.orientation = GTK_ORIENTATION_VERTICAL; - - image = match_theme_image(style, &match_data); - if (image) - { - if (image->background) - theme_pixbuf_render (image->background, - window, NULL, area, COMPONENT_ALL, FALSE, - x, y1, 2, (y2 - y1) + 1); - } -} - -static void -draw_shadow(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_SHADOW; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.shadow = shadow; - match_data.state = state; - - draw_simple_image (style, window, area, widget, &match_data, FALSE, FALSE, - x, y, width, height); -} - -static void -draw_polygon(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - GdkPoint * points, - gint npoints, - gint fill) -{ -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif /* M_PI */ -#ifndef M_PI_4 -#define M_PI_4 0.78539816339744830962 -#endif /* M_PI_4 */ - - static const gdouble pi_over_4 = M_PI_4; - static const gdouble pi_3_over_4 = M_PI_4 * 3; - - GdkGC *gc3; - GdkGC *gc4; - gdouble angle; - gint i; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - g_return_if_fail(points != NULL); - - switch (shadow) - { - case GTK_SHADOW_IN: - gc3 = style->light_gc[state]; - gc4 = style->black_gc; - break; - case GTK_SHADOW_OUT: - gc3 = style->black_gc; - gc4 = style->light_gc[state]; - break; - default: - return; - } - - if (area) - { - gdk_gc_set_clip_rectangle(gc3, area); - gdk_gc_set_clip_rectangle(gc4, area); - } - if (fill) - gdk_draw_polygon(window, style->bg_gc[state], TRUE, points, npoints); - - npoints--; - - for (i = 0; i < npoints; i++) - { - if ((points[i].x == points[i + 1].x) && - (points[i].y == points[i + 1].y)) - angle = 0; - else - angle = atan2(points[i + 1].y - points[i].y, - points[i + 1].x - points[i].x); - - if ((angle > -pi_3_over_4) && (angle < pi_over_4)) - gdk_draw_line(window, gc3, - points[i].x, points[i].y, - points[i + 1].x, points[i + 1].y); - else - gdk_draw_line(window, gc4, - points[i].x, points[i].y, - points[i + 1].x, points[i + 1].y); - } - if (area) - { - gdk_gc_set_clip_rectangle(gc3, NULL); - gdk_gc_set_clip_rectangle(gc4, NULL); - } -} - -static void -draw_arrow(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - GtkArrowType arrow_direction, - gint fill, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_ARROW; - match_data.detail = detail; - match_data.flags = (THEME_MATCH_SHADOW | - THEME_MATCH_STATE | - THEME_MATCH_ARROW_DIRECTION); - match_data.shadow = shadow; - match_data.state = state; - match_data.arrow_direction = arrow_direction; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -static void -draw_diamond(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_DIAMOND; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.shadow = shadow; - match_data.state = state; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -static void -draw_oval(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_OVAL; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.shadow = shadow; - match_data.state = state; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -static void -draw_string(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - const gchar * string) -{ - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - if (state == GTK_STATE_INSENSITIVE) - { - if (area) - { - gdk_gc_set_clip_rectangle(style->white_gc, area); - gdk_gc_set_clip_rectangle(style->fg_gc[state], area); - } - - gdk_draw_string(window, style->font, style->fg_gc[state], x, y, string); - - if (area) - { - gdk_gc_set_clip_rectangle(style->white_gc, NULL); - gdk_gc_set_clip_rectangle(style->fg_gc[state], NULL); - } - } - else - { - gdk_gc_set_clip_rectangle(style->fg_gc[state], area); - gdk_draw_string(window, style->font, style->fg_gc[state], x, y, string); - gdk_gc_set_clip_rectangle(style->fg_gc[state], NULL); - } -} - -static void -draw_box(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_BOX; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.shadow = shadow; - match_data.state = state; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -static void -draw_flat_box(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_FLAT_BOX; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.shadow = shadow; - match_data.state = state; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -static void -draw_check(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_CHECK; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.shadow = shadow; - match_data.state = state; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -static void -draw_option(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_OPTION; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.shadow = shadow; - match_data.state = state; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -static void -draw_cross(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_CROSS; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.shadow = shadow; - match_data.state = state; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -static void -draw_ramp(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - GtkArrowType arrow_direction, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_RAMP; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.shadow = shadow; - match_data.state = state; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -static void -draw_tab(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_TAB; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.shadow = shadow; - match_data.state = state; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -static void -draw_shadow_gap(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height, - GtkPositionType gap_side, - gint gap_x, - gint gap_width) -{ - ThemeMatchData match_data; - - match_data.function = TOKEN_D_SHADOW_GAP; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.flags = (THEME_MATCH_SHADOW | - THEME_MATCH_STATE | - THEME_MATCH_ORIENTATION); - match_data.shadow = shadow; - match_data.state = state; - - draw_gap_image (style, window, area, widget, &match_data, FALSE, - x, y, width, height, gap_side, gap_x, gap_width); -} - -static void -draw_box_gap(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height, - GtkPositionType gap_side, - gint gap_x, - gint gap_width) -{ - ThemeMatchData match_data; - - match_data.function = TOKEN_D_BOX_GAP; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE; - match_data.flags = (THEME_MATCH_SHADOW | - THEME_MATCH_STATE | - THEME_MATCH_ORIENTATION); - match_data.shadow = shadow; - match_data.state = state; - - draw_gap_image (style, window, area, widget, &match_data, TRUE, - x, y, width, height, gap_side, gap_x, gap_width); -} - -static void -draw_extension(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height, - GtkPositionType gap_side) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - /* Why? */ - if (width >=0) - width++; - if (height >=0) - height++; - - match_data.function = TOKEN_D_EXTENSION; - match_data.detail = detail; - match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE | THEME_MATCH_GAP_SIDE; - match_data.shadow = shadow; - match_data.state = state; - match_data.gap_side = gap_side; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -static void -draw_focus(GtkStyle * style, - GdkWindow * window, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - /* Why? */ - if (width >=0) - width++; - if (height >=0) - height++; - - match_data.function = TOKEN_D_FOCUS; - match_data.detail = detail; - match_data.flags = 0; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, FALSE, - x, y, width, height); -} - -static void -draw_slider(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height, - GtkOrientation orientation) -{ - ThemeMatchData match_data; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - match_data.function = TOKEN_D_SLIDER; - match_data.detail = detail; - match_data.flags = (THEME_MATCH_SHADOW | - THEME_MATCH_STATE | - THEME_MATCH_ORIENTATION); - match_data.shadow = shadow; - match_data.state = state; - match_data.orientation = orientation; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height);} - - -static void -draw_handle(GtkStyle * style, - GdkWindow * window, - GtkStateType state, - GtkShadowType shadow, - GdkRectangle * area, - GtkWidget * widget, - gchar * detail, - gint x, - gint y, - gint width, - gint height, - GtkOrientation orientation) -{ - ThemeMatchData match_data; - - g_return_if_fail (style != NULL); - g_return_if_fail (window != NULL); - - match_data.function = TOKEN_D_HANDLE; - match_data.detail = detail; - match_data.flags = (THEME_MATCH_SHADOW | - THEME_MATCH_STATE | - THEME_MATCH_ORIENTATION); - match_data.shadow = shadow; - match_data.state = state; - match_data.orientation = orientation; - - draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE, - x, y, width, height); -} - -GtkStyleClass pixmap_default_class = -{ - 2, - 2, - draw_hline, - draw_vline, - draw_shadow, - draw_polygon, - draw_arrow, - draw_diamond, - draw_oval, - draw_string, - draw_box, - draw_flat_box, - draw_check, - draw_option, - draw_cross, - draw_ramp, - draw_tab, - draw_shadow_gap, - draw_box_gap, - draw_extension, - draw_focus, - draw_slider, - draw_handle -}; - diff --git a/modules/engines/pixbuf/pixbuf-main.c b/modules/engines/pixbuf/pixbuf-main.c deleted file mode 100644 index c0998d37e5..0000000000 --- a/modules/engines/pixbuf/pixbuf-main.c +++ /dev/null @@ -1,877 +0,0 @@ -/* GTK+ Pixbuf Engine - * Copyright (C) 1998-2000 Red Hat, 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. - * - * Written by Owen Taylor , based on code by - * Carsten Haitzler - */ - -#include "pixbuf.h" -#include - -/* Theme functions to export */ -void theme_init(GtkThemeEngine * engine); -void theme_exit(void); - -static struct - { - gchar *name; - guint token; - } -theme_symbols[] = -{ - { "image", TOKEN_IMAGE }, - { "function", TOKEN_FUNCTION }, - { "file", TOKEN_FILE }, - { "stretch", TOKEN_STRETCH }, - { "recolorable", TOKEN_RECOLORABLE }, - { "border", TOKEN_BORDER }, - { "detail", TOKEN_DETAIL }, - { "state", TOKEN_STATE }, - { "shadow", TOKEN_SHADOW }, - { "gap_side", TOKEN_GAP_SIDE }, - { "gap_file", TOKEN_GAP_FILE }, - { "gap_border", TOKEN_GAP_BORDER }, - { "gap_start_file", TOKEN_GAP_START_FILE }, - { "gap_start_border", TOKEN_GAP_START_BORDER }, - { "gap_end_file", TOKEN_GAP_END_FILE }, - { "gap_end_border", TOKEN_GAP_END_BORDER }, - { "overlay_file", TOKEN_OVERLAY_FILE }, - { "overlay_border", TOKEN_OVERLAY_BORDER }, - { "overlay_stretch", TOKEN_OVERLAY_STRETCH }, - { "arrow_direction", TOKEN_ARROW_DIRECTION }, - { "orientation", TOKEN_ORIENTATION }, - - { "HLINE", TOKEN_D_HLINE }, - { "VLINE", TOKEN_D_VLINE }, - { "SHADOW", TOKEN_D_SHADOW }, - { "POLYGON", TOKEN_D_POLYGON }, - { "ARROW", TOKEN_D_ARROW }, - { "DIAMOND", TOKEN_D_DIAMOND }, - { "OVAL", TOKEN_D_OVAL }, - { "STRING", TOKEN_D_STRING }, - { "BOX", TOKEN_D_BOX }, - { "FLAT_BOX", TOKEN_D_FLAT_BOX }, - { "CHECK", TOKEN_D_CHECK }, - { "OPTION", TOKEN_D_OPTION }, - { "CROSS", TOKEN_D_CROSS }, - { "RAMP", TOKEN_D_RAMP }, - { "TAB", TOKEN_D_TAB }, - { "SHADOW_GAP", TOKEN_D_SHADOW_GAP }, - { "BOX_GAP", TOKEN_D_BOX_GAP }, - { "EXTENSION", TOKEN_D_EXTENSION }, - { "FOCUS", TOKEN_D_FOCUS }, - { "SLIDER", TOKEN_D_SLIDER }, - { "ENTRY", TOKEN_D_ENTRY }, - { "HANDLE", TOKEN_D_HANDLE }, - - { "TRUE", TOKEN_TRUE }, - { "FALSE", TOKEN_FALSE }, - - { "TOP", TOKEN_TOP }, - { "UP", TOKEN_UP }, - { "BOTTOM", TOKEN_BOTTOM }, - { "DOWN", TOKEN_DOWN }, - { "LEFT", TOKEN_LEFT }, - { "RIGHT", TOKEN_RIGHT }, - - { "NORMAL", TOKEN_NORMAL }, - { "ACTIVE", TOKEN_ACTIVE }, - { "PRELIGHT", TOKEN_PRELIGHT }, - { "SELECTED", TOKEN_SELECTED }, - { "INSENSITIVE", TOKEN_INSENSITIVE }, - - { "NONE", TOKEN_NONE }, - { "IN", TOKEN_IN }, - { "OUT", TOKEN_OUT }, - { "ETCHED_IN", TOKEN_ETCHED_IN }, - { "ETCHED_OUT", TOKEN_ETCHED_OUT }, - { "HORIZONTAL", TOKEN_HORIZONTAL }, - { "VERTICAL", TOKEN_VERTICAL }, -}; - -static guint n_theme_symbols = sizeof(theme_symbols) / sizeof(theme_symbols[0]); - -static guint -theme_parse_file(GScanner *scanner, - ThemePixbuf **theme_pb) -{ - guint token; - gchar *pixmap; - - /* Skip 'blah_file' */ - token = g_scanner_get_next_token(scanner); - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_STRING) - return G_TOKEN_STRING; - - if (!*theme_pb) - *theme_pb = theme_pixbuf_new (); - - pixmap = gtk_rc_find_pixmap_in_path(scanner, scanner->value.v_string); - if (pixmap) - { - theme_pixbuf_set_filename (*theme_pb, pixmap); - g_free (pixmap); - } - - return G_TOKEN_NONE; -} - -static guint -theme_parse_border (GScanner *scanner, - ThemePixbuf **theme_pb) -{ - guint token; - gint left, right, top, bottom; - - /* Skip 'blah_border' */ - token = g_scanner_get_next_token(scanner); - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_LEFT_CURLY) - return G_TOKEN_LEFT_CURLY; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_INT) - return G_TOKEN_INT; - left = scanner->value.v_int; - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_COMMA) - return G_TOKEN_COMMA; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_INT) - return G_TOKEN_INT; - right = scanner->value.v_int; - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_COMMA) - return G_TOKEN_COMMA; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_INT) - return G_TOKEN_INT; - top = scanner->value.v_int; - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_COMMA) - return G_TOKEN_COMMA; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_INT) - return G_TOKEN_INT; - bottom = scanner->value.v_int; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_RIGHT_CURLY) - return G_TOKEN_RIGHT_CURLY; - - if (!*theme_pb) - *theme_pb = theme_pixbuf_new (); - - theme_pixbuf_set_border (*theme_pb, left, right, top, bottom); - - return G_TOKEN_NONE; -} - -static guint -theme_parse_stretch(GScanner *scanner, - ThemePixbuf **theme_pb) -{ - guint token; - gboolean stretch; - - /* Skip 'blah_stretch' */ - token = g_scanner_get_next_token(scanner); - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if (token == TOKEN_TRUE) - stretch = TRUE; - else if (token == TOKEN_FALSE) - stretch = FALSE; - else - return TOKEN_TRUE; - - if (!*theme_pb) - *theme_pb = theme_pixbuf_new (); - - theme_pixbuf_set_stretch (*theme_pb, stretch); - - return G_TOKEN_NONE; -} - -static guint -theme_parse_recolorable(GScanner * scanner, - ThemeImage * data) -{ - guint token; - - token = g_scanner_get_next_token(scanner); - if (token != TOKEN_RECOLORABLE) - return TOKEN_RECOLORABLE; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if (token == TOKEN_TRUE) - data->recolorable = 1; - else if (token == TOKEN_FALSE) - data->recolorable = 0; - else - return TOKEN_TRUE; - - return G_TOKEN_NONE; -} - -static guint -theme_parse_function(GScanner * scanner, - ThemeImage *data) -{ - guint token; - - token = g_scanner_get_next_token(scanner); - if (token != TOKEN_FUNCTION) - return TOKEN_FUNCTION; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if ((token >= TOKEN_D_HLINE) && (token <= TOKEN_D_HANDLE)) - data->match_data.function = token; - - return G_TOKEN_NONE; -} - -static guint -theme_parse_detail(GScanner * scanner, - ThemeImage * data) -{ - guint token; - - token = g_scanner_get_next_token(scanner); - if (token != TOKEN_DETAIL) - return TOKEN_DETAIL; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_STRING) - return G_TOKEN_STRING; - - if (data->match_data.detail) - g_free (data->match_data.detail); - - data->match_data.detail = g_strdup(scanner->value.v_string); - - return G_TOKEN_NONE; -} - -static guint -theme_parse_state(GScanner * scanner, - ThemeImage * data) -{ - guint token; - - token = g_scanner_get_next_token(scanner); - if (token != TOKEN_STATE) - return TOKEN_STATE; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if (token == TOKEN_NORMAL) - data->match_data.state = GTK_STATE_NORMAL; - else if (token == TOKEN_ACTIVE) - data->match_data.state = GTK_STATE_ACTIVE; - else if (token == TOKEN_PRELIGHT) - data->match_data.state = GTK_STATE_PRELIGHT; - else if (token == TOKEN_SELECTED) - data->match_data.state = GTK_STATE_SELECTED; - else if (token == TOKEN_INSENSITIVE) - data->match_data.state = GTK_STATE_INSENSITIVE; - else - return TOKEN_NORMAL; - - data->match_data.flags |= THEME_MATCH_STATE; - - return G_TOKEN_NONE; -} - -static guint -theme_parse_shadow(GScanner * scanner, - ThemeImage * data) -{ - guint token; - - token = g_scanner_get_next_token(scanner); - if (token != TOKEN_SHADOW) - return TOKEN_SHADOW; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if (token == TOKEN_NONE) - data->match_data.shadow = GTK_SHADOW_NONE; - else if (token == TOKEN_IN) - data->match_data.shadow = GTK_SHADOW_IN; - else if (token == TOKEN_OUT) - data->match_data.shadow = GTK_SHADOW_OUT; - else if (token == TOKEN_ETCHED_IN) - data->match_data.shadow = GTK_SHADOW_ETCHED_IN; - else if (token == TOKEN_ETCHED_OUT) - data->match_data.shadow = GTK_SHADOW_ETCHED_OUT; - else - return TOKEN_NONE; - - data->match_data.flags |= THEME_MATCH_SHADOW; - - return G_TOKEN_NONE; -} - -static guint -theme_parse_arrow_direction(GScanner * scanner, - ThemeImage * data) -{ - guint token; - - token = g_scanner_get_next_token(scanner); - if (token != TOKEN_ARROW_DIRECTION) - return TOKEN_ARROW_DIRECTION; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - if (token == TOKEN_UP) - data->match_data.arrow_direction = GTK_ARROW_UP; - else if (token == TOKEN_DOWN) - data->match_data.arrow_direction = GTK_ARROW_DOWN; - else if (token == TOKEN_LEFT) - data->match_data.arrow_direction = GTK_ARROW_LEFT; - else if (token == TOKEN_RIGHT) - data->match_data.arrow_direction = GTK_ARROW_RIGHT; - else - return TOKEN_UP; - - data->match_data.flags |= THEME_MATCH_ARROW_DIRECTION; - - return G_TOKEN_NONE; -} - -static guint -theme_parse_gap_side(GScanner * scanner, - ThemeImage * data) -{ - guint token; - - token = g_scanner_get_next_token(scanner); - if (token != TOKEN_GAP_SIDE) - return TOKEN_GAP_SIDE; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - - if (token == TOKEN_TOP) - data->match_data.gap_side = GTK_POS_TOP; - else if (token == TOKEN_BOTTOM) - data->match_data.gap_side = GTK_POS_BOTTOM; - else if (token == TOKEN_LEFT) - data->match_data.gap_side = GTK_POS_LEFT; - else if (token == TOKEN_RIGHT) - data->match_data.gap_side = GTK_POS_RIGHT; - else - return TOKEN_TOP; - - data->match_data.flags |= THEME_MATCH_GAP_SIDE; - - return G_TOKEN_NONE; -} - -static guint -theme_parse_orientation(GScanner * scanner, - ThemeImage * data) -{ - guint token; - - token = g_scanner_get_next_token(scanner); - if (token != TOKEN_ORIENTATION) - return TOKEN_ORIENTATION; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_EQUAL_SIGN) - return G_TOKEN_EQUAL_SIGN; - - token = g_scanner_get_next_token(scanner); - - if (token == TOKEN_HORIZONTAL) - data->match_data.orientation = GTK_ORIENTATION_HORIZONTAL; - else if (token == TOKEN_VERTICAL) - data->match_data.orientation = GTK_ORIENTATION_VERTICAL; - else - return TOKEN_HORIZONTAL; - - data->match_data.flags |= THEME_MATCH_ORIENTATION; - - return G_TOKEN_NONE; -} - -static void -theme_image_ref (ThemeImage *data) -{ - data->refcount++; -} - -static void -theme_image_unref (ThemeImage *data) -{ - data->refcount--; - if (data->refcount == 0) - { - if (data->match_data.detail) - g_free (data->match_data.detail); - if (data->background) - theme_pixbuf_destroy (data->background); - if (data->overlay) - theme_pixbuf_destroy (data->overlay); - if (data->gap_start) - theme_pixbuf_destroy (data->gap_start); - if (data->gap) - theme_pixbuf_destroy (data->gap); - if (data->gap_end) - theme_pixbuf_destroy (data->gap_end); - g_free (data); - } -} - -static void -theme_data_ref (ThemeData *theme_data) -{ - theme_data->refcount++; -} - -static void -theme_data_unref (ThemeData *theme_data) -{ - theme_data->refcount--; - if (theme_data->refcount == 0) - { - g_list_foreach (theme_data->img_list, (GFunc) theme_image_unref, NULL); - g_list_free (theme_data->img_list); - g_free (theme_data); - } -} - -static guint -theme_parse_image(GScanner *scanner, - ThemeData *theme_data, - ThemeImage **data_return) -{ - guint token; - ThemeImage *data; - - data = NULL; - token = g_scanner_get_next_token(scanner); - if (token != TOKEN_IMAGE) - return TOKEN_IMAGE; - - token = g_scanner_get_next_token(scanner); - if (token != G_TOKEN_LEFT_CURLY) - return G_TOKEN_LEFT_CURLY; - - data = g_malloc(sizeof(ThemeImage)); - - data->refcount = 1; - - data->background = NULL; - data->overlay = NULL; - data->gap_start = NULL; - data->gap = NULL; - data->gap_end = NULL; - - data->recolorable = FALSE; - - data->match_data.function = 0; - data->match_data.detail = NULL; - data->match_data.flags = 0; - - token = g_scanner_peek_next_token(scanner); - while (token != G_TOKEN_RIGHT_CURLY) - { - switch (token) - { - case TOKEN_FUNCTION: - token = theme_parse_function(scanner, data); - break; - case TOKEN_RECOLORABLE: - token = theme_parse_recolorable(scanner, data); - break; - case TOKEN_DETAIL: - token = theme_parse_detail(scanner, data); - break; - case TOKEN_STATE: - token = theme_parse_state(scanner, data); - break; - case TOKEN_SHADOW: - token = theme_parse_shadow(scanner, data); - break; - case TOKEN_GAP_SIDE: - token = theme_parse_gap_side(scanner, data); - break; - case TOKEN_ARROW_DIRECTION: - token = theme_parse_arrow_direction(scanner, data); - break; - case TOKEN_ORIENTATION: - token = theme_parse_orientation(scanner, data); - break; - case TOKEN_FILE: - token = theme_parse_file(scanner, &data->background); - break; - case TOKEN_BORDER: - token = theme_parse_border(scanner, &data->background); - break; - case TOKEN_STRETCH: - token = theme_parse_stretch(scanner, &data->background); - break; - case TOKEN_GAP_FILE: - token = theme_parse_file(scanner, &data->gap); - break; - case TOKEN_GAP_BORDER: - token = theme_parse_border(scanner, &data->gap); - break; - case TOKEN_GAP_START_FILE: - token = theme_parse_file(scanner, &data->gap_start); - break; - case TOKEN_GAP_START_BORDER: - token = theme_parse_border(scanner, &data->gap_start); - break; - case TOKEN_GAP_END_FILE: - token = theme_parse_file(scanner, &data->gap_end); - break; - case TOKEN_GAP_END_BORDER: - token = theme_parse_border(scanner, &data->gap_end); - break; - case TOKEN_OVERLAY_FILE: - token = theme_parse_file(scanner, &data->overlay); - break; - case TOKEN_OVERLAY_BORDER: - token = theme_parse_border(scanner, &data->overlay); - break; - case TOKEN_OVERLAY_STRETCH: - token = theme_parse_stretch(scanner, &data->overlay); - break; - default: - g_scanner_get_next_token(scanner); - token = G_TOKEN_RIGHT_CURLY; - break; - } - if (token != G_TOKEN_NONE) - { - /* error - cleanup for exit */ - theme_image_unref (data); - *data_return = NULL; - return token; - } - token = g_scanner_peek_next_token(scanner); - } - - token = g_scanner_get_next_token(scanner); - - if (token != G_TOKEN_RIGHT_CURLY) - { - /* error - cleanup for exit */ - theme_image_unref (data); - *data_return = NULL; - return G_TOKEN_RIGHT_CURLY; - } - - /* everything is fine now - insert yer cruft */ - *data_return = data; - return G_TOKEN_NONE; -} - -static guint -theme_parse_rc_style(GScanner * scanner, - GtkRcStyle * rc_style) -{ - static GQuark scope_id = 0; - ThemeData *theme_data; - guint old_scope; - guint token; - gint i; - ThemeImage *img; - - /* Set up a new scope in this scanner. */ - - if (!scope_id) - scope_id = g_quark_from_string("theme_engine"); - - /* If we bail out due to errors, we *don't* reset the scope, so the - * error messaging code can make sense of our tokens. - */ - old_scope = g_scanner_set_scope(scanner, scope_id); - - /* Now check if we already added our symbols to this scope - * (in some previous call to theme_parse_rc_style for the - * same scanner. - */ - - if (!g_scanner_lookup_symbol(scanner, theme_symbols[0].name)) - { - g_scanner_freeze_symbol_table(scanner); - for (i = 0; i < n_theme_symbols; i++) - g_scanner_scope_add_symbol(scanner, scope_id, - theme_symbols[i].name, - GINT_TO_POINTER(theme_symbols[i].token)); - g_scanner_thaw_symbol_table(scanner); - } - - /* We're ready to go, now parse the top level */ - - theme_data = g_new(ThemeData, 1); - theme_data->img_list = NULL; - theme_data->refcount = 1; - - token = g_scanner_peek_next_token(scanner); - while (token != G_TOKEN_RIGHT_CURLY) - { - switch (token) - { - case TOKEN_IMAGE: - img = NULL; - token = theme_parse_image(scanner, theme_data, &img); - break; - default: - g_scanner_get_next_token(scanner); - token = G_TOKEN_RIGHT_CURLY; - break; - } - - if (token != G_TOKEN_NONE) - { - g_list_foreach (theme_data->img_list, (GFunc)theme_image_unref, NULL); - g_list_free (theme_data->img_list); - g_free (theme_data); - return token; - } - else - { - theme_data->img_list = g_list_append(theme_data->img_list, img); - } - token = g_scanner_peek_next_token(scanner); - } - - g_scanner_get_next_token(scanner); - - rc_style->engine_data = theme_data; - g_scanner_set_scope(scanner, old_scope); - - return G_TOKEN_NONE; -} - -static void -theme_merge_rc_style(GtkRcStyle * dest, - GtkRcStyle * src) -{ - ThemeData *src_data = src->engine_data; - ThemeData *dest_data = dest->engine_data; - GList *tmp_list1, *tmp_list2; - - if (!dest_data) - { - dest_data = g_new(ThemeData, 1); - dest_data->img_list = NULL; - dest_data->refcount = 1; - dest->engine_data = dest_data; - } - - if (src_data->img_list) - { - /* Copy src image list and append to dest image list */ - - tmp_list2 = g_list_last (dest_data->img_list); - tmp_list1 = src_data->img_list; - - while (tmp_list1) - { - if (tmp_list2) - { - tmp_list2->next = g_list_alloc(); - tmp_list2->next->data = tmp_list1->data; - tmp_list2->next->prev = tmp_list2; - - tmp_list2 = tmp_list2->next; - } - else - { - dest_data->img_list = g_list_append (NULL, tmp_list1->data); - tmp_list2 = dest_data->img_list; - } - - theme_data_ref (tmp_list1->data); - tmp_list1 = tmp_list1->next; - } - } -} - -static void -theme_rc_style_to_style(GtkStyle * style, - GtkRcStyle * rc_style) -{ - ThemeData *data = rc_style->engine_data; - - style->klass = &pixmap_default_class; - style->engine_data = data; - theme_data_ref (data); -} - -static void -theme_duplicate_style(GtkStyle * dest, - GtkStyle * src) -{ - ThemeData *src_data = src->engine_data; - ThemeData *dest_data; - - dest_data = g_new(ThemeData, 1); - dest_data->img_list = g_list_copy (src_data->img_list); - g_list_foreach (dest_data->img_list, (GFunc)theme_image_ref, NULL); - - dest->klass = &pixmap_default_class; - dest->engine_data = dest_data; - theme_data_ref (dest_data); -} - -static void -theme_realize_style(GtkStyle * style) -{ -} - -static void -theme_unrealize_style(GtkStyle * style) -{ -} - -static void -theme_destroy_rc_style(GtkRcStyle * rc_style) -{ - theme_data_unref (rc_style->engine_data); -} - -static void -theme_destroy_style(GtkStyle * style) -{ - theme_data_unref (style->engine_data); -} - -static void -theme_set_background(GtkStyle * style, - GdkWindow * window, - GtkStateType state_type) -{ - GdkPixmap *pixmap; - gint parent_relative; - - g_return_if_fail(style != NULL); - g_return_if_fail(window != NULL); - - if (style->bg_pixmap[state_type]) - { - if (style->bg_pixmap[state_type] == (GdkPixmap *) GDK_PARENT_RELATIVE) - { - pixmap = NULL; - parent_relative = TRUE; - } - else - { - pixmap = style->bg_pixmap[state_type]; - parent_relative = FALSE; - } - - gdk_window_set_back_pixmap(window, pixmap, parent_relative); - } - else - gdk_window_set_background(window, &style->bg[state_type]); -} - -void -theme_init(GtkThemeEngine * engine) -{ - engine->parse_rc_style = theme_parse_rc_style; - engine->merge_rc_style = theme_merge_rc_style; - engine->rc_style_to_style = theme_rc_style_to_style; - engine->duplicate_style = theme_duplicate_style; - engine->realize_style = theme_realize_style; - engine->unrealize_style = theme_unrealize_style; - engine->destroy_rc_style = theme_destroy_rc_style; - engine->destroy_style = theme_destroy_style; - engine->set_background = theme_set_background; - - gdk_rgb_init(); - - /* - * We enable the caches unconditionally (the -1 is used - * to inform gnome-libs to ignore its setting for the - * cache - */ -#if 0 - gtk_widget_push_visual(gdk_imlib_get_visual()); - gtk_widget_push_colormap(gdk_imlib_get_colormap()); -#endif /* 0 */ -} - -void -theme_exit(void) -{ -} - -/* The following function will be called by GTK+ when the module - * is loaded and checks to see if we are compatible with the - * version of GTK+ that loads us. - */ -G_MODULE_EXPORT const gchar* g_module_check_init (GModule *module); -const gchar* -g_module_check_init (GModule *module) -{ - return gtk_check_version (GTK_MAJOR_VERSION, - GTK_MINOR_VERSION, - GTK_MICRO_VERSION - GTK_INTERFACE_AGE); -} diff --git a/modules/engines/pixbuf/pixbuf-render.c b/modules/engines/pixbuf/pixbuf-render.c deleted file mode 100644 index d3550456e0..0000000000 --- a/modules/engines/pixbuf/pixbuf-render.c +++ /dev/null @@ -1,345 +0,0 @@ -/* GTK+ Pixbuf Engine - * Copyright (C) 1998-2000 Red Hat, 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. - * - * Written by Owen Taylor , based on code by - * Carsten Haitzler - */ - -#include "pixbuf.h" -#include - -GCache *pixbuf_cache = NULL; - -static void -pixbuf_render (GdkPixbuf *src, - GdkWindow *window, - GdkBitmap *mask, - GdkRectangle *clip_rect, - gint src_x, - gint src_y, - gint src_width, - gint src_height, - gint dest_x, - gint dest_y, - gint dest_width, - gint dest_height) -{ - GdkPixbuf *tmp_pixbuf; - GdkRectangle rect; - int x_offset, y_offset; - - if (dest_width <= 0 || dest_height <= 0) - return; - - rect.x = dest_x; - rect.y = dest_y; - rect.width = dest_width; - rect.height = dest_height; - - /* FIXME: we need the full mask, not a partial mask; the following is, however, - * horribly expensive - */ - if (!mask && clip_rect && !gdk_rectangle_intersect (clip_rect, &rect, &rect)) - return; - - if (dest_width != src->art_pixbuf->width || - dest_height != src->art_pixbuf->height) - { - ArtPixBuf *partial_src_art; - GdkPixbuf *partial_src_gdk; - - if (src->art_pixbuf->n_channels == 3) - { - partial_src_art = - art_pixbuf_new_const_rgb (src->art_pixbuf->pixels + src_y * src->art_pixbuf->rowstride + src_x * src->art_pixbuf->n_channels, - src_width, - src_height, - src->art_pixbuf->rowstride); - } - else - { - partial_src_art = - art_pixbuf_new_const_rgba (src->art_pixbuf->pixels + src_y * src->art_pixbuf->rowstride + src_x * src->art_pixbuf->n_channels, - src_width, - src_height, - src->art_pixbuf->rowstride); - } - - partial_src_gdk = gdk_pixbuf_new_from_art_pixbuf (partial_src_art); - tmp_pixbuf = gdk_pixbuf_new (ART_PIX_RGB, src->art_pixbuf->has_alpha, 8, rect.width, rect.height); - - gdk_pixbuf_scale (partial_src_gdk, tmp_pixbuf, 0, 0, rect.width, rect.height, - dest_x - rect.x, dest_y - rect.y, - (double)dest_width / src_width, (double)dest_height / src_height, - ART_FILTER_BILINEAR); - - gdk_pixbuf_unref (partial_src_gdk); - - x_offset = 0; - y_offset = 0; - } - else - { - tmp_pixbuf = src; - gdk_pixbuf_ref (tmp_pixbuf); - - x_offset = src_x + rect.x - dest_x; - y_offset = src_y + rect.y - dest_y; - } - - if (mask) - { - GdkGC *tmp_gc; - - gdk_pixbuf_render_threshold_alpha (tmp_pixbuf, mask, - x_offset, y_offset, - rect.x, rect.y, - rect.width, rect.height, - 128); - - tmp_gc = gdk_gc_new (window); - gdk_pixbuf_render_to_drawable (tmp_pixbuf, window, tmp_gc, - x_offset, y_offset, - rect.x, rect.y, - rect.width, rect.height, - GDK_RGB_DITHER_NORMAL, - 0, 0); - gdk_gc_unref (tmp_gc); - } - else - gdk_pixbuf_render_to_drawable_alpha (tmp_pixbuf, window, - x_offset, y_offset, - rect.x, rect.y, - rect.width, rect.height, - GDK_PIXBUF_ALPHA_BILEVEL, 128, - GDK_RGB_DITHER_NORMAL, - 0, 0); - gdk_pixbuf_unref (tmp_pixbuf); -} - -ThemePixbuf * -theme_pixbuf_new (void) -{ - ThemePixbuf *result = g_new (ThemePixbuf, 1); - result->filename = NULL; - result->pixbuf = NULL; - - result->stretch = TRUE; - result->border_left = 0; - result->border_right = 0; - result->border_bottom = 0; - result->border_top = 0; - - return result; -} - -void -theme_pixbuf_destroy (ThemePixbuf *theme_pb) -{ - if (theme_pb->pixbuf) - g_cache_remove (pixbuf_cache, theme_pb->pixbuf); -} - -void -theme_pixbuf_set_filename (ThemePixbuf *theme_pb, - const char *filename) -{ - if (theme_pb->pixbuf) - { - g_cache_remove (pixbuf_cache, theme_pb->pixbuf); - theme_pb->pixbuf = NULL; - } - - if (theme_pb->filename) - g_free (theme_pb->filename); - - theme_pb->filename = g_strdup (filename); -} - -void -theme_pixbuf_set_border (ThemePixbuf *theme_pb, - gint left, - gint right, - gint top, - gint bottom) -{ - theme_pb->border_left = left; - theme_pb->border_right = right; - theme_pb->border_top = top; - theme_pb->border_bottom = bottom; -} - -void -theme_pixbuf_set_stretch (ThemePixbuf *theme_pb, - gboolean stretch) -{ - theme_pb->stretch = stretch; -} - -GdkPixbuf * -pixbuf_cache_value_new (gchar *filename) -{ - GdkPixbuf *result = gdk_pixbuf_new_from_file (filename); - if (!result) - g_warning("Pixbuf theme: Cannot load pixmap file %s\n", filename); - - return result; -} - -GdkPixbuf * -theme_pixbuf_get_pixbuf (ThemePixbuf *theme_pb) -{ - if (!theme_pb->pixbuf) - { - if (!pixbuf_cache) - pixbuf_cache = g_cache_new ((GCacheNewFunc)pixbuf_cache_value_new, - (GCacheDestroyFunc)gdk_pixbuf_unref, - (GCacheDupFunc)g_strdup, - (GCacheDestroyFunc)g_free, - g_str_hash, g_direct_hash, g_str_equal); - - theme_pb->pixbuf = g_cache_insert (pixbuf_cache, theme_pb->filename); - } - - return theme_pb->pixbuf; -} - -void -theme_pixbuf_render (ThemePixbuf *theme_pb, - GdkWindow *window, - GdkBitmap *mask, - GdkRectangle *clip_rect, - guint component_mask, - gboolean center, - gint x, - gint y, - gint width, - gint height) -{ - GdkPixbuf *pixbuf = theme_pixbuf_get_pixbuf (theme_pb); - gint src_x[4], src_y[4], dest_x[4], dest_y[4]; - - if (!pixbuf) - return; - - if (theme_pb->stretch) - { - src_x[0] = 0; - src_x[1] = theme_pb->border_left; - src_x[2] = pixbuf->art_pixbuf->width - theme_pb->border_right; - src_x[3] = pixbuf->art_pixbuf->width; - - src_y[0] = 0; - src_y[1] = theme_pb->border_top; - src_y[2] = pixbuf->art_pixbuf->height - theme_pb->border_bottom; - src_y[3] = pixbuf->art_pixbuf->height; - - dest_x[0] = x; - dest_x[1] = x + theme_pb->border_left; - dest_x[2] = x + width - theme_pb->border_right; - dest_x[3] = x + width; - - dest_y[0] = y; - dest_y[1] = y + theme_pb->border_top; - dest_y[2] = y + height - theme_pb->border_bottom; - dest_y[3] = y + height; - - if (component_mask & COMPONENT_ALL) - component_mask = (COMPONENT_ALL - 1) & ~component_mask; - -#define RENDER_COMPONENT(X1,X2,Y1,Y2) \ - pixbuf_render (pixbuf, window, mask, clip_rect, \ - src_x[X1], src_y[Y1], \ - src_x[X2] - src_x[X1], src_y[Y2] - src_y[Y1], \ - dest_x[X1], dest_y[Y1], \ - dest_x[X2] - dest_x[X1], dest_y[Y2] - dest_y[Y1]); - - if (component_mask & COMPONENT_NORTH_WEST) - RENDER_COMPONENT (0, 1, 0, 1); - - if (component_mask & COMPONENT_NORTH) - RENDER_COMPONENT (1, 2, 0, 1); - - if (component_mask & COMPONENT_NORTH_EAST) - RENDER_COMPONENT (2, 3, 0, 1); - - if (component_mask & COMPONENT_WEST) - RENDER_COMPONENT (0, 1, 1, 2); - - if (component_mask & COMPONENT_CENTER) - RENDER_COMPONENT (1, 2, 1, 2); - - if (component_mask & COMPONENT_EAST) - RENDER_COMPONENT (2, 3, 1, 2); - - if (component_mask & COMPONENT_SOUTH_WEST) - RENDER_COMPONENT (0, 1, 2, 3); - - if (component_mask & COMPONENT_SOUTH) - RENDER_COMPONENT (1, 2, 2, 3); - - if (component_mask & COMPONENT_SOUTH_EAST) - RENDER_COMPONENT (2, 3, 2, 3); - } - else - { - if (center) - { - x += (width - pixbuf->art_pixbuf->width) / 2; - y += (height - pixbuf->art_pixbuf->height) / 2; - - pixbuf_render (pixbuf, window, NULL, clip_rect, - 0, 0, - pixbuf->art_pixbuf->width, pixbuf->art_pixbuf->height, - x, y, - pixbuf->art_pixbuf->width, pixbuf->art_pixbuf->height); - } - else - { - GdkPixmap *tmp_pixmap; - GdkGC *tmp_gc; - GdkGCValues gc_values; - - tmp_pixmap = gdk_pixmap_new (window, - pixbuf->art_pixbuf->width, - pixbuf->art_pixbuf->height, - -1); - tmp_gc = gdk_gc_new (tmp_pixmap); - gdk_pixbuf_render_to_drawable (pixbuf, tmp_pixmap, tmp_gc, - 0, 0, - 0, 0, - pixbuf->art_pixbuf->width, pixbuf->art_pixbuf->height, - GDK_RGB_DITHER_NORMAL, - 0, 0); - gdk_gc_unref (tmp_gc); - - gc_values.fill = GDK_TILED; - gc_values.tile = tmp_pixmap; - tmp_gc = gdk_gc_new_with_values (window, - &gc_values, GDK_GC_FILL | GDK_GC_TILE); - if (clip_rect) - gdk_draw_rectangle (window, tmp_gc, TRUE, - clip_rect->x, clip_rect->y, clip_rect->width, clip_rect->height); - else - gdk_draw_rectangle (window, tmp_gc, TRUE, x, y, width, height); - - gdk_gc_unref (tmp_gc); - gdk_pixmap_unref (tmp_pixmap); - } - } -} diff --git a/modules/engines/pixbuf/pixbuf.h b/modules/engines/pixbuf/pixbuf.h deleted file mode 100644 index b6e92030f4..0000000000 --- a/modules/engines/pixbuf/pixbuf.h +++ /dev/null @@ -1,194 +0,0 @@ -/* GTK+ Pixbuf Engine - * Copyright (C) 1998-2000 Red Hat, 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. - * - * Written by Owen Taylor , based on code by - * Carsten Haitzler - */ - -#include -#include - -/* internals */ - -typedef struct _ThemeData ThemeData; -typedef struct _ThemeImage ThemeImage; -typedef struct _ThemeMatchData ThemeMatchData; -typedef struct _ThemePixbuf ThemePixbuf; - -enum -{ - TOKEN_IMAGE = G_TOKEN_LAST + 1, - TOKEN_FUNCTION, - TOKEN_FILE, - TOKEN_STRETCH, - TOKEN_RECOLORABLE, - TOKEN_BORDER, - TOKEN_DETAIL, - TOKEN_STATE, - TOKEN_SHADOW, - TOKEN_GAP_SIDE, - TOKEN_GAP_FILE, - TOKEN_GAP_BORDER, - TOKEN_GAP_START_FILE, - TOKEN_GAP_START_BORDER, - TOKEN_GAP_END_FILE, - TOKEN_GAP_END_BORDER, - TOKEN_OVERLAY_FILE, - TOKEN_OVERLAY_BORDER, - TOKEN_OVERLAY_STRETCH, - TOKEN_ARROW_DIRECTION, - TOKEN_D_HLINE, - TOKEN_D_VLINE, - TOKEN_D_SHADOW, - TOKEN_D_POLYGON, - TOKEN_D_ARROW, - TOKEN_D_DIAMOND, - TOKEN_D_OVAL, - TOKEN_D_STRING, - TOKEN_D_BOX, - TOKEN_D_FLAT_BOX, - TOKEN_D_CHECK, - TOKEN_D_OPTION, - TOKEN_D_CROSS, - TOKEN_D_RAMP, - TOKEN_D_TAB, - TOKEN_D_SHADOW_GAP, - TOKEN_D_BOX_GAP, - TOKEN_D_EXTENSION, - TOKEN_D_FOCUS, - TOKEN_D_SLIDER, - TOKEN_D_ENTRY, - TOKEN_D_HANDLE, - TOKEN_TRUE, - TOKEN_FALSE, - TOKEN_TOP, - TOKEN_UP, - TOKEN_BOTTOM, - TOKEN_DOWN, - TOKEN_LEFT, - TOKEN_RIGHT, - TOKEN_NORMAL, - TOKEN_ACTIVE, - TOKEN_PRELIGHT, - TOKEN_SELECTED, - TOKEN_INSENSITIVE, - TOKEN_NONE, - TOKEN_IN, - TOKEN_OUT, - TOKEN_ETCHED_IN, - TOKEN_ETCHED_OUT, - TOKEN_ORIENTATION, - TOKEN_HORIZONTAL, - TOKEN_VERTICAL, -}; - -typedef enum -{ - COMPONENT_NORTH_WEST = 1 << 0, - COMPONENT_NORTH = 1 << 1, - COMPONENT_NORTH_EAST = 1 << 2, - COMPONENT_WEST = 1 << 3, - COMPONENT_CENTER = 1 << 4, - COMPONENT_EAST = 1 << 5, - COMPONENT_SOUTH_EAST = 1 << 6, - COMPONENT_SOUTH = 1 << 7, - COMPONENT_SOUTH_WEST = 1 << 8, - COMPONENT_ALL = 1 << 9 -} ThemePixbufComponent; - -typedef enum { - THEME_MATCH_GAP_SIDE = 1 << 0, - THEME_MATCH_ORIENTATION = 1 << 1, - THEME_MATCH_STATE = 1 << 2, - THEME_MATCH_SHADOW = 1 << 3, - THEME_MATCH_ARROW_DIRECTION = 1 << 4 -} ThemeMatchFlags; - -struct _ThemeData -{ - guint refcount; - GList *img_list; -}; - -struct _ThemePixbuf -{ - gchar *filename; - GdkPixbuf *pixbuf; - gboolean stretch; - gint border_left; - gint border_right; - gint border_bottom; - gint border_top; -}; - -struct _ThemeMatchData -{ - guint function; /* Mandatory */ - gchar *detail; - - ThemeMatchFlags flags; - - GtkPositionType gap_side; - GtkOrientation orientation; - GtkStateType state; - GtkShadowType shadow; - GtkArrowType arrow_direction; -}; - -struct _ThemeImage -{ - guint refcount; - - ThemePixbuf *background; - ThemePixbuf *overlay; - ThemePixbuf *gap_start; - ThemePixbuf *gap; - ThemePixbuf *gap_end; - - gchar recolorable; - - ThemeMatchData match_data; -}; - - -ThemePixbuf *theme_pixbuf_new (void); -void theme_pixbuf_destroy (ThemePixbuf *theme_pb); -void theme_pixbuf_set_filename (ThemePixbuf *theme_pb, - const char *filename); -GdkPixbuf * theme_pixbuf_get_pixbuf (ThemePixbuf *theme_pb); -void theme_pixbuf_set_border (ThemePixbuf *theme_pb, - gint left, - gint right, - gint top, - gint bottom); -void theme_pixbuf_set_stretch (ThemePixbuf *theme_pb, - gboolean stretch); -void theme_pixbuf_render (ThemePixbuf *theme_pb, - GdkWindow *window, - GdkBitmap *mask, - GdkRectangle *clip_rect, - guint component_mask, - gboolean center, - gint dest_x, - gint dest_y, - gint dest_width, - gint dest_height); - - - -extern GtkStyleClass pixmap_default_class; diff --git a/tests/testgtk.c b/tests/testgtk.c index df1b4940de..8555cfa881 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -1696,6 +1696,22 @@ void create_labels (void) gtk_container_add (GTK_CONTAINER (frame), label); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); + frame = gtk_frame_new ("Internationalized Label"); + label = gtk_label_new ("French (Français) Bonjour, Salut\n" + "Korean (한글) 안녕하세요, 안녕하십니까\n" + "Russian (Русский) Здравствуйте!"); + gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); + gtk_container_add (GTK_CONTAINER (frame), label); + gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); + + frame = gtk_frame_new ("Bidirection Label"); + label = gtk_label_new ("Arabic السلام عليكم\n" + "Hebrew שלום"); + gtk_widget_set_direction (label, GTK_TEXT_DIR_RTL); + gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT); + gtk_container_add (GTK_CONTAINER (frame), label); + gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); + vbox = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); frame = gtk_frame_new ("Line wrapped label"); @@ -1726,12 +1742,11 @@ void create_labels (void) frame = gtk_frame_new ("Underlined label"); label = gtk_label_new ("This label is underlined!\n" - "This one is underlined in ܸquite a funky fashion"); + "This one is underlined (こんにちは) in quite a funky fashion"); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_label_set_pattern (GTK_LABEL (label), "_________________________ _ _________ _ _____ _ __ __ ___ ____ _____"); gtk_container_add (GTK_CONTAINER (frame), label); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); - } if (!GTK_WIDGET_VISIBLE (window)) gtk_widget_show_all (window); @@ -5294,6 +5309,69 @@ create_file_selection (void) gtk_widget_destroy (window); } +void +flipping_toggled_cb (GtkWidget *widget, gpointer data) +{ + int state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); + int new_direction = state ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR; + + if (new_direction != gtk_widget_get_default_direction ()) + { + GList *toplevels; + + gtk_widget_set_default_direction (new_direction); + + toplevels = gtk_container_get_toplevels(); + while (toplevels) + { + gtk_widget_queue_resize (toplevels->data); + toplevels = toplevels->next; + } + } + +} + +void +create_flipping (void) +{ + static GtkWidget *window = NULL; + GtkWidget *check_button, *button; + + if (!window) + { + window = gtk_dialog_new (); + + gtk_signal_connect (GTK_OBJECT (window), "destroy", + GTK_SIGNAL_FUNC(gtk_widget_destroyed), + &window); + + gtk_window_set_title (GTK_WINDOW (window), "Bidirectional Flipping"); + + check_button = gtk_check_button_new_with_label ("Right-to-left global direction"); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), + check_button, TRUE, TRUE, 0); + + if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button), TRUE); + + gtk_signal_connect (GTK_OBJECT (check_button), "toggled", + flipping_toggled_cb, FALSE); + + gtk_container_set_border_width (GTK_CONTAINER (check_button), 10); + + button = gtk_button_new_with_label ("Close"); + gtk_signal_connect_object (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window)); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area), + button, TRUE, TRUE, 0); + } + + if (!GTK_WIDGET_VISIBLE (window)) + gtk_widget_show_all (window); + else + gtk_widget_destroy (window); +} + /* * GtkFontSelection */ @@ -8397,6 +8475,7 @@ create_main_window (void) { "entry", create_entry }, { "event watcher", create_event_watcher }, { "file selection", create_file_selection }, + { "flipping", create_flipping }, { "font selection", create_font_selection }, { "gamma curve", create_gamma_curve }, { "handle box", create_handle_box },